Hello everyone, i've worked recently on my source code for the image capturing duties. With the Hint of Mr. Herbrechtsmeier to use YUV everything worked quite well and now i get no failure message anymore and even the image.txt file gets filled with values separated by tabulators and a newline after each "picture" line. This numerical values should represent the colour values of each pixel. Now the main proble is, that every value is zero... Hint: the initialisation of mmap with NULL let's the system choose an empty area in the stack where the values from the camera memory can be mapped to. Now my question is. Has anyone an idea why there are only zeros? Is it an failure in the program flow? Is there something missing? Do i need an loop or delays for the image capturing process? I hope that someone can give me a hint or a solution for my problem. Regards, Kai Tiwisina Stefan Herbrechtsmeier schrieb: > Hi, > > Kai Tiwisina schrieb: >> Hello everyone, >> >> here is a little update to my question and to the source code. >> >> After i implemented an function with the VIDIOC_ENUM_FMT ioctl i >> recognized, that only two formats are support by the driver by now. >> (Thanks to Mr. Liakhovetski by the way ;) ) >> The output.txt shows the output of this function and mentions the two >> different types. >> >> One is definately the V4L2_PIX_FMT_YUYV format but i don't know the >> other one exactly... >> >> I changed my set_format function after i got this information and >> unfortunately nothing has changed... >> >> Perhaps there are some further possibilities to solve this Problem. >> >> Maybe there have some other v4l2 structures to be initialized, befor >> the VIDIOC_S_FMT ioctl runs? > You have to set fmt.fmt.pix.field toV4L2_FIELD_ANY and only YUV is > supported at the moment. > > Regards, > Stefan >> Guennadi Liakhovetski wrote: >>> Hi Kai >>> >>> On Mon, 23 Nov 2009, Kai Tiwisina wrote: >>> >>> >>>> Hello, >>>> >>>> my name is Kai Tiwisina and i'm a student in germany and i'm trying >>>> to communicate with a Omnivision ov9655 camera which is atteched >>>> with my embedded linux system via the v4l commands. >>>> >>>> I've written a small testprogram which should grow step by step >>>> while i'm trying one ioctl after another. >>>> Everything worked fine until i tried to use the VIDIOC_S_FMT ioctl. >>>> It's always giving me an "invalid argument" failure and i don't >>>> know why. >>>> >>> >>> Since you don't seem to have the source of the driver at hand, I'd >>> suggest to use the VIDIOC_ENUM_FMT >>> http://v4l2spec.bytesex.org/spec/r8367.htm ioctl to enumerate all >>> pixel formats supported be the driver. If the driver you're using is >>> the same, that Stefan (cc'ed) has submitted to the list, then indeed >>> it does not support the V4L2_PIX_FMT_RGB555 format, that you're >>> requesting, only various YUV (and a Bayer?) formats. >>> >>> >>>> Perhaps someone of you is able to help me with this ioctl and give >>>> an advice for a simple flow chart for a single frame image capture. >>>> Which ioctl steps are neccessary and where do i need loops and for >>>> what, because the capture-example.c from bytesex.org is way too >>>> general for my purpose. >>>> >>> >>> Thanks >>> Guennadi >>> --- >>> Guennadi Liakhovetski, Ph.D. >>> Freelance Open-Source Software Developer >>> http://www.open-technology.de/ >>> >>> >> > >