New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random horizontally flipped image #4
Comments
Unfortunately v4l2-ctl does not work, so it can't help in this case. This is the first report of such a problem. I think we need more info:
Have you check if sensor is correctly connected all the time? Do you have a second sensor to see if you have same problem? |
I tried 3 gc2035 sensors on 3 orange pi pcs with the same setup, it happened to all of them. Here are two screenshots showing the issue: gc2035.ko is set to use hres=0, image resolution is set to 640x480, and I get around 16fps. I noticed that it's not only h-flipping, the angle of the camera also changed a little bit. I imagine the sensor captured a bigger image say 1600x1200, and then got confused somehow and cropped 640x480 in a shifted area and sent a wrong sequence of the pixels... |
In my code, I tried the following setting, driver doesn't seems to respond to it:
or maybe it does, but the random h-flip happened even before this point.
What could be the cause? |
Hello guys ! I had replaced it (actually not replaced, just included another version in my program) with this version : https://gist.github.com/JulesThuillier/bc7d1a852a7dd070af2072d946e20eed And all controls worked ! I hope that will fix your problem ;) |
Please, upload to gist the file /usr/src/linux-headers-3.4.112-sun8i/include/linux/compiler.h to see what is wrong or if it alignment or else. |
Try to gab the images with https://github.com/avafinger/cap-v4l2 just to check if at some point you get the error. Compile using the A64 script: You will need Linux headers source files (/usr/src/linux-headers-XXXXXXX) when building for H3, and install the kernel headers. |
the videodev2.h header in the gist seems the same as the one I have. I only have one linux header, so I suppose <linux/compiler.h> and "/usr/src/linux-headers-3.4.112-sun8i/include/linux/compiler.h" would be the same?
|
I tried cap-v4l2, but I got the following error:
the odd thing is the code i have is basically doing the same thing, it was able to pass VIDIOC_S_PARM. the ioctl sequence of the code i have:
the ioctl sequence of cap-v4l2:
|
try first with: ./cap 640 480 4 1 -999 -1 -1 see the results. |
the code stops at |
dmesg has no difference between the two situations.
|
v4l2-cap was based on kernel 3.4.39/65 and 3.10.102/105. This sequence earlier than your current code here:
was to get rid of error you have pointed here: I will revisit the code for kernel 3.4.112/113, but can't do anything till weekend, i am busy at the moment and need to finish some stuffs. |
Just an update, i get same error on kernel 3.4.113 with my GC2035, oddly this very same code runs with OV5640 on the same kernel, suggesting is indeed something wrong with GC2035 code. |
Yeah, will do! |
I'm using v4l2 to do video capture with gc2035 on orange pi pc.
randomly, about 1 out of 20 times, it gives horizontally flipped image. the code was never changed.
I tried to use v4l2-ctl to change the setting, but got the following error:
I tried several gc2035 cameras on different orange pis, the random flipping happened to all of them.
Could this be a driver issue?
The text was updated successfully, but these errors were encountered: