Ask Your Question
2

has anyone used a 8 megapixel camera with opencv

asked 2013-12-10 13:08:19 -0600

mpatalberta gravatar image

I am using an 8 megapixel camera and when I set the resolution to 3264x2448 i get the following:

libv4l2: error converting / decoding frame data: v4l-convert: error destination buffer too small (16777216 < 23970816) VIDIOC_DQBUF: Bad address

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
6

answered 2013-12-11 04:56:28 -0600

Geppertm gravatar image

Hi, Yes I´m doing this. I´m using a 8MP USB3 Cam with Ubuntu 12.04.

You have to Edit the source of lib v4l. The problem ist the call of v4l2_read_and_convert(,..,..., int maxsize). There is a defined max size (16777216), if you change this to > 23970816 it will work.

I´m sorry that i actually couldn´t give you the File where to edit the value.

edit flag offensive delete link more

Comments

1

Actually, this should be reported as a bugfix. If you get the time, please visit the http://code.opencv.org/projects/opencv/wiki/How_to_contribute">how to contribute page. This should be noted down and maybe by adding an extra parameter, this can be solved. I think it was originally to make sure the size wasn't larger than possible to store in memory.

StevenPuttemans gravatar imageStevenPuttemans ( 2013-12-11 08:22:59 -0600 )edit

It´s a "Bug" of video4Linux not openCV.

Geppertm gravatar imageGeppertm ( 2013-12-11 09:37:30 -0600 )edit

Unfortunatly, i don´t know where to upload my changes or add a bug for v4l.

Geppertm gravatar imageGeppertm ( 2013-12-11 09:42:22 -0600 )edit
1

I have found the code for libv4l2 recompiled and found the issue. I have actually entered this as bug on opencv with notes of the fix on the libv4l2 tip.

mpatalberta gravatar imagempatalberta ( 2013-12-11 16:19:57 -0600 )edit

had made a change to http://git.linuxtv.org/v4l-utils.git/tree tip in file v4l-utils-HEAD-4dea4af/lib/libv4l2/libv4l2-priv.h The change was define V4L2_FRAME_BUF_SIZE (4096 * 4096)

to

define V4L2_FRAME_BUF_SIZE (2 * 4096 * 4096)

When the package is recompiled and then the shared object files updated the package now works with the 8 megapixel camera in the raw mode.

What action do you want me to take or maybe you have more insight into the how this is to work?

mpatalberta gravatar imagempatalberta ( 2013-12-11 16:35:35 -0600 )edit
1

I think the best way would be to make a Function which set´s this value in v4l2. So the lib would be compatible to older source which also has such a Limit.

Geppertm gravatar imageGeppertm ( 2013-12-12 03:01:13 -0600 )edit
1

I am in contact with libv4l2 person now [email protected] and have passed my fix plus the problem description. We can see what response we get.

mpatalberta gravatar imagempatalberta ( 2013-12-12 10:02:19 -0600 )edit

Great news, pleace keep me uptodate.

Geppertm gravatar imageGeppertm ( 2013-12-13 03:24:54 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-12-10 13:08:19 -0600

Seen: 929 times

Last updated: Dec 11 '13