Omnivision camera input

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...

Prop Info and Apps: http://www.rayslogic.com/

Comments

  • 16 Comments sorted by Date Added Votes
  • RaymanRayman Posts: 8,857
    edited December 2017 Vote Up0Vote Down
    BTW, the OV7675 might be a better option for P2 if you just want to show image, not save a high res picture to SD...

    My OV9653 camera board costs $19, but the OV7675 "ArduCam" is only $3.69
    Prop Info and Apps: http://www.rayslogic.com/
  • Excellent.

    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.
  • Rayman,

    Thanks for the mention, but my P1 code didn't help me at all... and I tried.

    Rich
  • Said that wrong...
    Meant using your video capture code...
    Prop Info and Apps: http://www.rayslogic.com/
  • I tried in vain yesterday to get RGB565 mode working...

    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...
    Prop Info and Apps: http://www.rayslogic.com/
  • rjo__ wrote: »
    What is the difference between the OV9650 and the OV9653? The docs I have don't seem to mention it.

    Not sure, but I think the registers work the same way for these two.
    Sometimes the code refers to OV965X...

    Prop Info and Apps: http://www.rayslogic.com/
  • I think I just found some settings that maybe I can use here:
    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...
    Prop Info and Apps: http://www.rayslogic.com/
  • RaymanRayman Posts: 8,857
    edited December 2017 Vote Up0Vote Down
    That code did the trick!
    Can now show QVGA preview in RGB656 using the 16-bit VGA (640x350) driver
    Prop Info and Apps: http://www.rayslogic.com/
  • RaymanRayman Posts: 8,857
    edited December 2017 Vote Up0Vote Down
    screen shot showing robot with pink feet and activity board on top.

    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...
    2016 x 1512 - 306K
    Prop Info and Apps: http://www.rayslogic.com/
  • rjo__rjo__ Posts: 1,953
    edited December 2017 Vote Up0Vote Down
    Wow.

    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.

  • Here is code and image for VGA (almost) preview.
    512KB isn't enough for full screen, so using the 640x350 16bpp example driver...
    2016 x 1512 - 249K
    Prop Info and Apps: http://www.rayslogic.com/
  • RaymanRayman Posts: 8,857
    edited December 2017 Vote Up0Vote Down
    BTW: The register settings code that I'm borrowing mentioned "implementation guide".
    Looked that up and it appears to be very useful...
    Much more detailed explanation of register settings...
    Prop Info and Apps: http://www.rayslogic.com/
  • Thanks.

    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.
  • RaymanRayman Posts: 8,857
    edited December 2017 Vote Up0Vote Down
    The OV2640 (the other module I have) can output in SVGA (800x600) mode.
    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...
    Prop Info and Apps: http://www.rayslogic.com/
  • OV2640...good unit. Doesn't work out of the box iirc. Easy to get it to do 8 bit gray... if I'm not confusing it with it's big brothers.

    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.


  • RaymanRayman Posts: 8,857
    edited December 2017 Vote Up0Vote Down
    Bufferless transfer between camera and screen would be nice...
    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...
    Prop Info and Apps: http://www.rayslogic.com/
Sign In or Register to comment.