Omnivision camera input
in Propeller 2
I finally have my OV9653 camera module working with P2...
Took me a while to get I2C interface going, but then was easy using code from RJO_ (Thanks!)
This code shows a QVGA preview in center of VGA screen in grayscale.
I first tried to use RGB565 output, but haven't been able to make that work yet...
Going to work on that next...
Took me a while to get I2C interface going, but then was easy using code from RJO_ (Thanks!)
This code shows a QVGA preview in center of VGA screen in grayscale.
I first tried to use RGB565 output, but haven't been able to make that work yet...
Going to work on that next...
zip
![](/plugins/FileUpload/images/file.png)
139K
Comments
My OV9653 camera board costs $19, but the OV7675 "ArduCam" is only $3.69
I have an OV9650 that I haven't been able to destroy yet. I'll give it a try tomorrow.
I like the OV9655 because it is another one of those cameras that can be used straight out of the box...YUYV... Y=gray scale, ignore the UandV. What I don't particularly care for is that in the factory default mode the frame rate is highly dependent on ambient light... dropping way down in normal room lighting... good images though.
What is the difference between the OV9650 and the OV9653? The docs I have don't seem to mention it.
I'm feeling a little like ERCO... the OV7675 module(sans camera board) is available for $1.25 via EBAY in quantities of 50. The OV9650 module only( no carrier board) is $2 in quantities of 10.
As I recall both modules fit into the $6 Omnivision carrier boards.
Amazing prices... a great P2 opportunity.
Anyone have a firm idea how long it will take to dump a .3M image off to SD?
The only problem is that Omnivision is a direct competitor of ON SEMI... who has purchased an incredible number of camera companies. ON SEMI has camera products coming out of the wazzoo.
It would sure be nice to have one of their products as a P2 standard.
I can't see that ON SEMI has anything at these kinds of prices or performance per buck.
Maybe Parallax should consult with ON SEMI, pick something cheap with a global shutter/high frame/high sensitivity and get a group buy going.
My favorite camera is still Phil's Propcam. It is a really good match for the P2 and is going to be hard to beat for dynamic image processing.
Thanks for the mention, but my P1 code didn't help me at all... and I tried.
Rich
Meant using your video capture code...
It's amazing how many settings the camera has and it seems you have to have many of them correct in order to make it work how you want...
I took these YUV mode settings from a software example that I found for this camera.
But, I haven't found an RGB565 setting that works...
I either need to figure out how all the settings work (don't want to do this as it's very complex) or find an example somewhere that works...
Not sure, but I think the registers work the same way for these two.
Sometimes the code refers to OV965X...
https://github.com/openmv/openmv/blob/master/src/omv/ov9650.c
OpenMV may have some other things to borrow from...
They have face and eye detection codes, for example...
Can now show QVGA preview in RGB656 using the 16-bit VGA (640x350) driver
Top of screen painted red, bottom of screen showing birds pic.
BTW: Would be really nice to have 600 kB of RAM so can do 640x480 in 2bpp...
You complain too much:) 600x400x16b works fine.
I'm getting tired of being wrong: ON Semi bought Aptina. The MT9D111 works fresh from the box. 1600x1200 color resolution.
It has excellent image quality and low light performance. Slowish but probably best images I have gotten so far. I have the version with autofocus (which I'm not using)
$10 single quantity with carrier board. We can subsample to fill the screen and be able to have electronic zoom.
I think we should jump on this one. Politically correct, etc.
I'm not going to abandon my quest to get the OV7675 ramped up... 240FPS at qqVGA for $4 is just too good to pass up.
512KB isn't enough for full screen, so using the 640x350 16bpp example driver...
Looked that up and it appears to be very useful...
Much more detailed explanation of register settings...
We never want to say never. I haven't figured this out completely, but with 4 P2's you have more than enough memory and horse power. It would be neat to see the data coming in just in time for the display loop to use it. I don't know the actual limits of the resolution using this approach, but I would appreciate opinions.
For the stuff that I am doing, I need minimum 10x the RAM of a single image. No upper limit I could not use.
If we could on the fly convert 16-bit RGB565 into 8-bit RGB332 (one of the P2 video modes), then we could do full screen preview in fairly high resolution.
Not sure how that would look...
The OV2640 also says it can output in jpg format. That would be pretty neat, be able to save the full frame image directly to SD...
Back on the topic of getting higher res displays.
I don't think I'm quite up to it... So many things on my haven't done list, but I think this isvery worth the effort:
IF you can do this in an hour or less, then please give it a try. Put your image into an offscreen buffer... then try to feed it into a two line buffer and have that buffer serve as the data source for the vga.
If you can do that, I think we off to the races. I could easily be wrong of course:)
The other idea that has been annoying me is... why put the image into memory at all?
It seems like we could use the camera signals to drive the display... with a little processing to get the DACs to work... this is away from my focus point and beyond my present skill level, but I really would like to know if it is possible.
Problem is that maximum frame rate in SVGA mode is 30 fps. This will probably work with a 5" TFT LCD, but VGA monitor probably needs 60 fps...
VGA mode might be possible at 60 fps.
Seems like we really need external memory for a buffer...
Actually, this seems like a perfect fit for the hyperram chip that I just happen to have onboard...
My camera module came from: www.techtoys.com.hk
But, appears to be sold out now.
Anyway, I see other places selling the OV9653 camera.
Combining this with HyperRam should allow VGA and maybe HD display...
Thanks
http://www.techtoys.com.hk/Components/OmniVision Cameras/OV CMOS Camera Modules.htm
I thought I would make some progress with this while on vacation... That didn't work out...
Finally got around to testing Eval board adapter out.
Code needed a lot of updating, but it works again.
Here using a mirror so P2 can see itself![:) :)](https://forums.parallax.com/resources/emoji/smile.png)
Need to work on improving resolution though...
NIce, Ray.
How many data lines does it take?
It's using 16 P2 I/O pins, 8 as data bus, 8 for control.
There are some cheaper cameras over here, including a $5 one with VGA resolution...
I might have to switch to the arducam layout...
https://www.robotshop.com/en/arducam-640x480-03-mp-lens-ov7675-cmos-camera-module-w--adapter-board.html
Looking around some more, the CAM500B looks to be the best you can get that still has DVP and not MIPI output.
1080p would be interesting. Should be possible with HyperRam.
This guy is appears almost, but not quite pin compatible with my current setup:
https://www.friendlyarm.com/index.php?route=product/product&product_id=155