I installed a third-party driver and firmware to use my PS 4 Camera on PC and I need it to do a object detection project. Everything works fine on camera on Windows (the screen resolution looks buggy but this is simply how Windows read Sony data format).
Here is how it looks (I have a red light in the room):
—
When I open the same cam on OpenCV the image was looking very bright, or it looks very low quality.
Here is how the image looks in OpenCV when saved with imwrite():
In the first image you can clearly read ALIENWARE under the monitor, in the second image is clearly granulated.
I wrote the simplest code just to read and show the cam:
import cv2
#read
webcam = cv2.VideoCapture(0)
#visualize
while True:
ret, frame = webcam.read()
cv2.imshow('webcam', frame)
if cv2.waitKey(40) & 0xFF == ord('q'):
break
webcam.release()
cv2.destroyAllWindows()
How can I fix this?
12
Firstly, try running on console:
v4l2-ctl -l
Then, you can increase or decrease.
v4l2-ctl --set-ctrl=contrast=6 # change, increasing or decreasing