Camera Module

1,182 views
Skip to first unread message

John Tobias

unread,
Sep 9, 2012, 4:24:22 PM9/9/12
to panda...@googlegroups.com
Hello All,

Does anyone have tried to use the camera module (OV05650-MRBL-A64T)
http://www.omappedia.org/wiki/PandaBoard_Camera_Support?.
I used the example (yavta and gstreatemer) from this link
https://www.gitorious.org/omap4-v4l2-camera/pages/Home#Documentation.
But,
gstreamer gave me an error:

ERROR: Pipeline doesn't want to pause.
ERROR: from element /GstPipeline:pipeline0/GstV4l2Src:v4l2src0: Device
'/dev/video0' cannot capture at 640x480
Additional debug info:
gstv4l2object.c(2197): gst_v4l2_object_set_format ():
/GstPipeline:pipeline0/GstV4l2Src:v4l2src0:
Call to S_FMT failed for YU12 @ 640x480: Invalid argument
Setting pipeline to NULL ...
Freeing pipeline ...


and yavta gave me:

evice `OMAP4 ISS CSI2a output' on `media' is a video capture device.
Video format set: SGRBG10 (30314142) 2592x1944 (stride 5184) buffer
size 10077696
Video format: SGRBG10 (30314142) 2592x1944 (stride 5184) buffer size 10077696
1 buffers requested.
length: 10077696 offset: 0
Buffer 0 mapped at address 0xb64c8000.
Unable to start streaming: Invalid argument (22).
1 buffers released.


Regards,

john

arnold

unread,
Sep 10, 2012, 1:52:08 PM9/10/12
to panda...@googlegroups.com
Hi John

I have exactly the same problem.
root@devel:/home/debian/yavta# sudo ./yavta /dev/video1 -c2 -n1 -s640x480 -fSGRB
G10 -Fimg.bin
Device /dev/video1 opened.
Device `OMAP4 ISS CSI2b output' on `media' is a video capture device.
Video format set: SGRBG10 (30314142) 640x480 (stride 1280) buffer size 614400
Video format: SGRBG10 (30314142) 640x480 (stride 1280) buffer size 614400
1 buffers requested.
length: 614400 offset: 0
Buffer 0 mapped at address 0xb6db8000.
Unable to start streaming: Invalid argument (22).

I use a Pandaboard ES 4460 and the ov5650 cam (used the devel branch)
Could you fix the problem?

Best Regards
Arnold



John Tobias

unread,
Sep 11, 2012, 1:55:22 AM9/11/12
to panda...@googlegroups.com
We are in the same page... I'll let you know if I'm making progress...

john

John Tobias

unread,
Sep 24, 2012, 3:11:52 PM9/24/12
to panda...@googlegroups.com
Hi Arnold,

My sensor got detected. But, I have to luck running the yavta.
yavta /dev/video0 -c4 -n1 -s2592x1944 -fSGRBG10 -Fov5650-2592x194
Device /dev/video0 opened.
Device `OMAP4 ISS CSI2a output' on `media' is a video capture device.
Video format set: SGRBG10 (30314142) 2592x1944 (stride 5184) buffer
size 10077696
Video format: SGRBG10 (30314142) 2592x1944 (stride 5184) buffer size 10077696
1 buffers requested.
length: 10077696 offset: 0
Buffer 0 mapped at address 0xb64f1000.
Unable to start streaming: Invalid argument (22).
1 buffers released.

Regards,

john



On Mon, Sep 24, 2012 at 7:30 AM, <ahafne...@gmail.com> wrote:
> Hi john
>
> I could not fix the problem until know but I found an interesting site
> http://www.fungeekstuff.com/2012/09/how-to-use-the-ov5650-camera-board-on-the-pandaboard-omap4460/
>
> If you like to cross compile, just use
>
> export ARCH=arm ; export CROSS_COMPILE=arm-linux-gnueabihf-
> fakeroot debian/rules clean
> fakeroot debian/rules editconfigs
> do_tools=false skipabi=true skipmodule=true dpkg-buildpackage -B -aarmhf -uc
> -us
>
> and install the following .deb on the pandaboard
>
> sudo dpkg -i linux-headers-3.4.0-1485_3.4.0-1485.7_armhf.deb
> sudo dpkg -i linux-headers-3.4.0-1485-omap4_3.4.0-1485.7_armhf.deb
> sudo dpkg -i linux-image-3.4.0-1485-omap4_3.4.0-1485.7_armhf.deb
>
> The solution should work for the ov5650 and omap4460 but I have still the
> same problem.
> Maybe you can try if it is working for you and let me know.
>
> Can you please check your dmesg I get always the following message
> [ 1.916900] ov5650_reg_read(0x300a) = 0x56
> [ 1.917480] ov5650_reg_read(0x300b) = 0x51
> [ 1.917480] ov5650 3-0036: Detected a OV5651 chip, revision 1B/1C
>
> But there is no ov5651 available maybe my camera module is defect or there
> is an issue with the i2c.
> My module is labeled with OV5650MRBL-A64T R1.0
>
> BR
> Arnold

Gary Thomas

unread,
Sep 24, 2012, 6:06:40 PM9/24/12
to panda...@googlegroups.com

Since you are using my merged repository, you'll have to use media-ctl to set up
the video pipeline to make this capture do anything.

First, configure the pipeline:
  media-ctl -r
  media-ctl -l '"OMAP4 ISS CSI2a":1 -> "OMAP4 ISS CSI2a output":0 [1]'
  media-ctl -V '"ov5650 3-0036":0 [SGRBG10 2592x1944]'
  media-ctl -V '"OMAP4 ISS CSI2a":0 [SGRBG10 2592x1944]'

Then, capture the RAW data via something like this:
  yavta -c16 -fSGRBG10 -s2592x1944 -Ftest-#.raw10 /dev/video0

At this point, you'll have RAW10 data which can be converted to RGB using the rgb2bmp tool
  raw2bmp <file>.raw10 <file>.bmp 2592 1944 16 3

John Tobias

unread,
Sep 24, 2012, 7:21:13 PM9/24/12
to panda...@googlegroups.com
Hi Garry,

It works after executing the media-ctl commands. But, running the
commands (you've mentioned ,media-ctl,yavta) repeatedly the kernel are
throwing "omap4iss omap4iss: dma_alloc_coherent of size 10077696
failed".

Any idea?.

Regards,

john

Gary Thomas

unread,
Sep 25, 2012, 7:13:52 AM9/25/12
to panda...@googlegroups.com
This is caused by fragmentation of the CMA memory space.

Adjust 'CONFIG_CMA_SIZE_MBYTES' in your kernel config to be larger (default is 16).  Something like 64 works well.

Gary Thomas

unread,
Oct 7, 2012, 8:53:06 AM10/7/12
to panda...@googlegroups.com, ahafne...@gmail.com


On Saturday, October 6, 2012 10:47:47 AM UTC-6, (unknown) wrote:
Hi Gary

Fist of all thanks for your help
But I have some additional questions.
1) I use your merged repository Ubuntu 12.04
How can i find out witch image sizes and formats are supported when I use media-ctl
for me just the following works SGRBG10 2592x1944


This is the only resolution supported by the driver.  Additional settings are possible, but they require access to the magic registers within the sensor (chip) that are only available via NDA with OmniVision.  I didn't write the original driver, so I don't know where he got access to that data, nor is he around any more to help.
 
2) If i use the v4l-info tool i get the following output

### v4l2 device info [/dev/video0] ###
general info
    VIDIOC_QUERYCAP
        driver                  : "issvideo"
        card                    : "OMAP4 ISS CSI2a output"
        bus_info                : "media"
        version                 : 3.4.0
        capabilities            : 0x4000001 [VIDEO_CAPTURE,STREAMING]

standards

inputs
    VIDIOC_ENUMINPUT(0)
        index                   : 0
        name                    : "camera"
        type                    : CAMERA
        audioset                : 0
        tuner                   : 0
        std                     : 0x0 []
        status                  : 0x0 []

video capture
    VIDIOC_G_FMT(VIDEO_CAPTURE)
        type                    : VIDEO_CAPTURE
        fmt.pix.width           : 0
        fmt.pix.height          : 0
        fmt.pix.pixelformat     : 0x00000000 [....]
        fmt.pix.field           : ANY
        fmt.pix.bytesperline    : 0
        fmt.pix.sizeimage       : 0
        fmt.pix.colorspace      : unknown
        fmt.pix.priv            : 0

this is maybe the reason why it is not working with chesse or guvcview.
I am not an v4l expert therefore maybe you can give me an hint how fix this.
because I want to use the cam in opencv.


The problem is that those programs don't understand how to use the RAW Bayer encoded video.

The right way to solve this is to convert RAW10->YUV422 using the OMAP hardware, but I've not had any success making this work, nor in finding the information on how to fix the driver.

Perhaps you can find someone at TI willing to help with this.
 

Nipuna Gunasekera

unread,
Nov 12, 2012, 11:31:30 AM11/12/12
to panda...@googlegroups.com, ahafne...@gmail.com
http://webapps.nuhorizons.com/storefront/PartSearch.do
Search for "OV05640" part numbers.



On Fri, Nov 9, 2012 at 11:12 AM, <ahafne...@gmail.com> wrote:

Does anybody know where to get an ov5640 sensor for the OV_OMAP4_ADAPTER ?
(OV_OMAP4_ADAPTER  is the camera board for the panda board usually equipped with the ov5650 sensor)

Because the ov5640 supports YUYV8_1X16 threfore no conversion with the 'ISS ISP IPIPE' necessary

BR
Arnold

Reply all
Reply to author
Forward
0 new messages