I'm attempting to capture a webimage from OPENCV v4.0 using a 240v LED lightsource to illuminate the field. As I'm based in Australia our mains power is 50hz and running Ubuntu 18.04
The logitech C270 webcam appears to be limited to 20fps and I am struggling to get a clean image as once the LED is on, horizontal banding scrolls down the image in the display window.
I have attempted to use v4l2-ctl to change the powerline frequency from 60hz to 50hz to no avail. The banding doesn't occur when the illumination source is a standard fluro light.
A sample of the image can be seen here: https://i.stack.imgur.com/HOgf0.jpg
Many thanks for any hints or tips. Very much appreciated and hope you are all safe and well during this hectic time.
From a code perspective I'm not doing anything fancy:
import numpy as np
import cv2
cap = cv2.VideoCapture(0)
cap.set(cv2.CAP_PROP_FRAME_WIDTH, 800)
cap.set(cv2.CAP_PROP_FRAME_HEIGHT, 600)
while(True):
# Capture frame-by-frame
ret, frame = cap.read()
# Our operations on the frame come here
gray = cv2.cvtColor(frame, cv2.COLOR_BGR2GRAY)
# Display the resulting frame
#cv2.imshow('frame',gray)
cv2.imshow('frame',frame)
if cv2.waitKey(1) & 0xFF == ord('q'):
break
# When everything done, release the capture
cap.release()
cv2.destroyAllWindows()
V4ltc export can be seen below: https://i.stack.imgur.com/fPmtG.jpg