Black horizontal lines appear on orbbec gemini e camera.
I also tried changing the power_line_frequency value, but it didn’t work. What values should I modify?
Below are the camera properties obtained using v4l2-ctl.
that’s the cause, that’s the solution. talk to orbbec customer support.
not an opencv problem insofar as opencv just uses available media APIs. maybe it’s not giving you access to all possible properties but that is yet to be determined.
debug this using your camera and any other camera program, without opencv.
figure out what your lighting does. this looks like mains frequency but it might not be. modern lighting can flicker at other frequencies.
This didn’t happen when I used other cameras. Compared to other good cameras, this camera uses a rolling shutter. Are there any values that need to be set separately when using a rolling shutter camera?
`V4L2_CID_EXPOSURE`: sets the exposure time in lines. The application needs to use `V4L2_CID_PIXEL_RATE`, `V4L2_CID_HBLANK`, and the frame width to compute the line time.
You might also look into whether your camera supports this control:
V4L2_CID_EXPOSURE_ABSOLUTE
This lets you set the exposure in absolute time units. The documentation says that the value should be interpreted as 100us, but I would suggest you verify that. (I use a camera that interprets the units as 1 ms, I think.)
However you approach it, you want your exposure time to match the lighting. So if your lights are exhibiting a 60Hz flicker (which is common but not guaranteed), you want an exposure time of 1/60th of a second or some integer multiple (1/30th, 1/20th, 1/15th)
Note, as Crackwitz alluded to, the flicker frequency can actually be double the line frequency. (so you might be able to use a 1/120th of a second exposure time as well as integer multiples)
I tried adjusting the exposure_absoulte value with v4l2-ctl, but the higher the value, the brighter it becomes, and the lower the value, the more flickering occurs.
That’s what I would expect - higher values are longer exposure times, so all else being equal, the image should get brighter. Smaller values ( < 1/60th of a second, say) flicker because some of the lines are being exposed when the lighting is “pulsing”, and other lines are exposed while the light is off (loosely speaking).
What values did you try for EXPOSURE_ABSOLUTE?
I’d try values of 167, 333, 500, 667. (assuming the units of 100us are correct for your camera)
You will probably need to adjust your gain to compensate for the longer exposure times. Also, your frame rate might be limited by these longer exposure times. If that’s an issue, consider getting different lighting (or a camera with a global shutter.)
When I tried setting it to 167, the flicker phenomenon disappeared, but the brightness became so bright that it was difficult to recognize the object. And I have to use this camera