Shop OBEX P1 Docs P2 Docs Learn Events
Omnivision camera input — Parallax Forums

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

Comments

  • RaymanRayman Posts: 14,651
    edited 2017-12-03 19:06
    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
  • rjo__rjo__ Posts: 2,114
    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.
  • rjo__rjo__ Posts: 2,114
    Rayman,

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

    Rich
  • RaymanRayman Posts: 14,651
    Said that wrong...
    Meant using your video capture code...
  • RaymanRayman Posts: 14,651
    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...
  • RaymanRayman Posts: 14,651
    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...

  • RaymanRayman Posts: 14,651
    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...
  • RaymanRayman Posts: 14,651
    edited 2017-12-05 00:58
    That code did the trick!
    Can now show QVGA preview in RGB656 using the 16-bit VGA (640x350) driver
  • RaymanRayman Posts: 14,651
    edited 2017-12-05 01:00
    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
  • rjo__rjo__ Posts: 2,114
    edited 2017-12-05 15:18
    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.

  • RaymanRayman Posts: 14,651
    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
  • RaymanRayman Posts: 14,651
    edited 2017-12-10 17:36
    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...
  • rjo__rjo__ Posts: 2,114
    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: 14,651
    edited 2017-12-12 17:32
    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...
  • rjo__rjo__ Posts: 2,114
    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: 14,651
    edited 2017-12-15 11:32
    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...
  • RaymanRayman Posts: 14,651
    edited 2019-06-17 17:39
    Just ordered this adapter for the Eval board.
    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...
    192 x 345 - 12K
  • rjo__rjo__ Posts: 2,114
    Absolutely love it. I think we are going to need at least two HyperRam chips... so when we are reading from one we can be writing to the other.

    Thanks
  • RaymanRayman Posts: 14,651
    Actually, it's not sold out... Was looking in the wrong place... Three different kinds with same interface here:
    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...
  • RaymanRayman Posts: 14,651
    edited 2021-02-24 22:23

    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 :)

    Need to work on improving resolution though...

  • NIce, Ray.
    How many data lines does it take?

  • RaymanRayman Posts: 14,651

    It's using 16 P2 I/O pins, 8 as data bus, 8 for control.

  • RaymanRayman Posts: 14,651

    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

  • RaymanRayman Posts: 14,651
    edited 2021-02-25 16:42

    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

Sign In or Register to comment.