Hello all - I am writing an application that will need to capture an image from the webcam of a MS Surface Go. I am using the code below to grab the image from an available webcam. This works perfectly on my desktop with a Logitech webcam. When I try to run it on my Surface Go tablet the image captured is significantly darker and seems to be poor quality.
I’ve attempted to use .normalize with different alpha and beta parameters to brighten the picture. I was able to do so but I end up with a somewhat grainy and color distorted result. Shouldn’t be necessary in the first place I wouldn’t think. I’ve tried other parameters in the VideoCapture method besides CAP_DSHOW to no avail. I’ve also confirmed that the webcam driver is up to date.
Looking for any ideas on what I might try next. Any ideas would be much appreciated.
import cv2 as cv
cam = cv.VideoCapture(1, cv.CAP_DSHOW)
s, img = cam.read()
if s:
cv.normalize(img, img, 0, 255, cv.NORM_MINMAX)
cv.namedWindow("cam-test")
cv.imshow("cam-test", img)
cv.waitKey(5000)
cv.destroyWindow("cam-test")
cv.imwrite("filename.jpg", img)
Screenshots from 1) Surface Go Camera 2) Picture captured by the Python code.