Go Down

Topic: Video capture ! Possible? (Read 6 times) previous topic - next topic

sja785


This is the first time you've mentioned wheels.


Sorry, I must have not been clear enough in my second post. So far I have developed a car that receives commands over a WiFi connection. I have Arduino Uno, Arduino WiFi Shield and a Motor Sheild (although this does not fit directly on the arduino). I have programmed Arduino as a server which takes commands from a client program. Everything works fine (move forward, back, left, right, all things that a car is expected to do). However the car is hard to drive when no longer in the same room :)

That is why I thought of trying to plug in a camera.

MichaelMeissner



This is the first time you've mentioned wheels.


Sorry, I must have not been clear enough in my second post. So far I have developed a car that receives commands over a WiFi connection. I have Arduino Uno, Arduino WiFi Shield and a Motor Sheild (although this does not fit directly on the arduino). I have programmed Arduino as a server which takes commands from a client program. Everything works fine (move forward, back, left, right, all things that a car is expected to do). However the car is hard to drive when no longer in the same room :)

That is why I thought of trying to plug in a camera.

As other people have said, the Arduino is not fast enough to transmit video over wifi, nor does it have enough memory to buffer even a single frame of the video.  You might look at setups for after-market car backup monitors.  Here is a complete set I found on ebay that includes camera, wireless transmitter/receiver, and lcd.  You will need two 12 volt batteries to power these: http://www.ebay.com/itm/Wireless-car-rearview-kit-3-5-LCD-reverse-monitor-waterproof-backup-camera-/281059200644?pt=US_Rear_View_Monitors_Cams_Kits&hash=item41706f0e84

Note, this unit transmits over the 2.4Ghz spectrum which wifi also use, so perhaps this camera will overpower the wifi shield.

sja785

Hello, Just something that popped up in my mind right now. We agreed that the Atmel chip on the Arduino is not powerful enough for video processing. However, isn't it possible to change the Atmel chip on the Arduino with another Atmel chip that is more powerful that has the same or possible to match pin outs (if exists)?

PeterH

Presumably you have a user interface somewhere and the operator is intended to watch the video from the 'bot and send it commands in real time.

In that case I'd just use an IP camera and display that directly on the PC where the user interface is provided. If your user interface took the form of a web page served by the Arduino then you could embed the video directly in that page. Alternatively, host the web page elsewhere and use server-side scripting or client-side scripting to send commands to the Arduino in response to user commands; you could still embed the video in the page. If your user interface is not a web page and doesn't enable you to show video directly, then you could simply open a separate browser window to display the video and put it on the same screen.

Just because your Arduino is next to the camera and has a wireless connection, doesn't mean that the video has to go over that connection.

If you do have a genuine requirement to send the video and the Arduino commands via a shared WiFi adapter then the best way to achieve that is probably to use a Raspberry Pi on the 'bot to drive the camera and the Arduino - but that's a more expensive and complicated solution and it seems pretty unlikely there's any genuine need for that.
I only provide help via the forum - please do not contact me for private consultancy.

Grumpy_Mike

Quote
isn't it possible to change the Atmel chip on the Arduino with another Atmel chip that is more powerful that has the same or possible to match pin outs (if exists)?

No there is no such chip.

Quote
(I think RaspberryPI is too much for this type of project)

No it is not, it is possibly a little light if anything.

sja785

I do not want to beat a dead a horse. However I found the following video camera:
https://www.adafruit.com/products/397

The specs say "it outputs NTSC video and can take snapshots of that video and transmit them over the TTL serial link"

So this camera has two functions; (1) Output Video in NTSC format, and (2) Take Snapshots in JPEG format.

Is it that impossible to transmit the captured video over the Wi-Fi through arduino - given the camera already captures the video?
If it is impossible why is it impossible? What further processing is required which Arduino is not able to do?




Grumpy_Mike

Quote
s it that impossible to transmit the captured video over the Wi-Fi through arduino - given the camera already captures the video?

Because the data rate of that video signal is far in excess of the data rate that the arduino can handle.

AWOL

Quote
Is it that impossible to transmit the captured video over the Wi-Fi through arduino -

But it doesn't capture video, it capture snapshots.

"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

sja785


Because the data rate of that video signal is far in excess of the data rate that the arduino can handle.


So the video camera outputs a stream of bytes; you mean arduino is not able to loop through that stream of bytes (fast enough) to output on the Wi-Fi shield?


But it doesn't capture video, it capture snapshots.


It has a video output which you can connect to a screen.

AWOL

Quote
It has a video output which you can connect to a screen.

NTSC is an analogue standard, that is connected to an analogue screen.
What point are you trying to make?
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

sja785


NTSC is an analogue standard, that is connected to an analogue screen.
What point are you trying to make?


No point at all, just lack experience and asking questions...

So that is why it is hard for the arduino? Because it would need to convert that analog signal to digital?

AWOL

#26
Feb 27, 2013, 11:42 am Last Edit: Feb 27, 2013, 12:39 pm by AWOL Reason: 1
Quote
Because it would need to convert that analog signal to digital?

Bingo! The ADC on an Arduino simply isn't fast enough, and there isn't enough fast memory to buffer an image anyway.
Not only that, but to remove the redundant information (like JPEG does) to reduce the data rate out requires more processing power than the AVR can manage in a resonable time.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

sja785


Bingo! The ADC on an Arduino simply isn't fast enough, and there isn't enough fast memory to buffer an image anyway.
Not only that, but to remove the redundant information (like JPEG does) to reduce the data rate out requires more processing power than the AVR can manage in a resonable time.


Good, that make things more clear now :)
I assume there must be something (not arduino) which converts analog to digital.

If the video is already in digital format, would I be able to stream it over Wi-Fi using Arduino + Wi-Fi shield?
Or still the AVR chip on the Arduino is not fast enough?

AWOL

Quote
I assume there must be something (not arduino) which converts analog to digital.

Correct. Not only that, if you want colour, you have to decode the composite NTSC signal into its three components and digitise them separately (though the colour components have a very low bandwidth compared to the luminance signal).

Quote
If the video is already in digital format, would I be able to stream it over Wi-Fi using Arduino + Wi-Fi shield?

It depends what you mean by "digital format" - simple baseband digitised video, JPEG, motion-JPEG, MPEG or H264, or...
Baseband it probably the worst from the point of view of the AVR because there is almost nothing about the AVR that can handle the datarate, except at very reduced resolution, even if the processor is acting as a pass-through...in which case, it might be better not there at all.
The others require the video source to do the encoding, because the AVR simply isn't up to the job, and again, it is acting as a passthrough.

Simple arithmetic illustration:
Raw eight bit monochrome image at 160x120 resolution = 19200 bytes per frame.
At 30 frames per second = 576 000 bytes per second.
Even if you compress it (somehow, somewhere) at 30:1, that's still nearly 200kbit per second for a low-res, mono image.
Colour, at best, will add typically half as much again, maybe even as much again, i.e. doubling.
"Pete, it's a fool looks for logic in the chambers of the human heart." Ulysses Everett McGill.
Do not send technical questions via personal messaging - they will be ignored.

PeterH


Is it that impossible to transmit the captured video over the Wi-Fi through arduino - given the camera already captures the video?


Why are you obsessing over using the Arduino? It's completely unnecessary. Just get a camera with a network interface, and give the Arduino a separate interface if it needs one as well.
I only provide help via the forum - please do not contact me for private consultancy.

Go Up