PDA

View Full Version : Video Input



Aldo
11-11-2010, 08:48 PM
Hi folks !

Look at this camera : http://www.sparkfun.com/commerce/product_info.php?products_id=8667

Its a way good camera (640x480x30fps) for the price (circa ten bucks only !!!)

i was thinking about a project to use two propellers :

one to get the picture from this camera, assemble a packet and send down a RS-422 link

other to get that RS-422 link packet and display at a video monitor...

can the prop do this ?

Leon
11-11-2010, 09:10 PM
It isn't fast enough, and hasn't got enough memory.

Kye
11-11-2010, 09:34 PM
The prop actually can, but those camera's suck BTW. I used them in a project and they will fail on you after a while.

To do camera input is a major task in assembly. I can't release source I used to get data from those cameras or details on how to do so but I reconmend not using those sparkfun ones.

Bean
11-11-2010, 09:42 PM
Kye,
I'm not doubting you, but are you sure these are the same cameras that you were using ?

Is it possible you just got a bum one ?

These look nice for experimenting, but if they fail, it's not worth the hassle.

Bean

Leon
11-11-2010, 09:44 PM
You must have cut down a lot on the colours and/or resolution, then. What were you able to obtain?

Dr_Acula
11-11-2010, 10:27 PM
There are more and more cameras out there with amazing resolution and that write to sd cards.

And at the same time, we now have propeller code that can talk to an sd card.

I wonder if it is possible to record a picture to an sd card, then use a propeller to read it back? At the simplest level, you could use a 4PDT relay, but there is probably an electronic solution (?4066). The propeller takes control of the camera's power/photo buttons (again, maybe relays or analog switches). Records the photo. Then switch control of the sd card to the propeller and reboot the sd card. Read off the resulting jpg or even movie file.

wjsteele
11-11-2010, 11:47 PM
It isn't fast enough, and hasn't got enough memory.

I think Hanno would disagree with you. I've used his code to send the video to a second prop without any issues.

Granted, it's not HiRes VGA, but it is usable.

Bill

Leon
11-12-2010, 01:25 AM
With that camera and full color?

Hanno
11-12-2010, 02:27 AM
Howdy!
No, not that camera and not full color. I only did ntsc grayscale.

My PropCVCapture code currently grabs 240x200 frames with 16 shades of gray- at full frame rate. You can use PropCVFilter to run simple filters on that image to determine where a bright/dim point is or where a barcode pattern is. I used this to steer my DanceBot years ago- see the "Programming/Customizing Propeller" book for my 2 chapters or the Circuit Cellar article. You can stream the video to ViewPort the 2mbps connection gives you around 10fps.

Here's a tutorial:
http://forums.parallax.com/showthread.php?t=126769
Hanno

Aldo
11-12-2010, 08:19 AM
Found this article about this camera :

http://www.dtic.mil/cgi-bin/GetTRDoc?Location=U2&doc=GetTRDoc.pdf&AD=ADA499618

While its aimed at ARM, im sure Propeller can do it too.

Leon
11-12-2010, 09:55 AM
You won't get anything like full colour, 640x480 video, though.

wjsteele
11-12-2010, 09:58 AM
With that camera and full color?


While its aimed at ARM, im sure Propeller can do it too.

I'm sure it can... considering that the camera has selectable framerates (based in the clock you input) AND that it already uses 7 bit color scheme.

I think that you could essentially read the data directly from the camera in a cog and pass that to your buffer directly... which another cog could then render. Especially to Rayman's LCDs, who's inputs match pretty closely with the outputs of this camera.

Minor processing would be involved... but nothing that looks too difficult.

Bill

wjsteele
11-12-2010, 10:12 AM
Granted, it's not HiRes VGA, but it is usable.


You won't get anything like full colour, 640x480 video, though.


Right... that's why I said that in my first post! :-)

Bill

Rayman
11-12-2010, 01:35 PM
I had the same idea...

I've got a couple of these cameras with a similar interface:
http://www.primelec.com/Electronic-Components/Other/Samsung-14-Inch-VGA-CIS-p4826731.html

These also have a flashlight and a connector for the camera...

But, this all looked like too much work for me...

Now, I think I know how to make a relatively inexpensive Prop powered camcorder that can both capture HD video to SD card and also be a serial camera for low resolution still image captures. This is also going to be a lot of work, but with bigger payoff...

Rayman
11-12-2010, 01:51 PM
Also, I've found a Maxim video decoder that can take NTSC or PAL and convert it into this same standard RGB or YUV format...

So, if one can do like Kye has done and capture video directly (I'm pretty sure you can), then one could also use that chip to do the same thing, but with a TV source...

wjsteele
11-12-2010, 07:02 PM
Also, I've found a Maxim video decoder that can take NTSC or PAL and convert it into this same standard RGB or YUV format...

Yeah... we've been playing with the Max9526. It requires an external crystal... 27mhz I think and can support two inputs. It does 4x oversampling, so the quality is great. If I remember it's and 8bit output.

It's a great package and we're planning on using it in our next product.

Bill