I showed in many ways how to take images using a webcam in Python (see How can I take images using Python? ). You can see that images made using Python are significantly darker than images made using JavaScript. What's wrong?
Image example
The image on the left was taken using http://martin-thoma.com/html5/webcam/ , the following on the right: with the following Python code. Both were taken with the same (controlled) lightning situation (it was dark outside, and I only had electric lights) and the same webcams.

Code example
import cv2 camera_port = 0 camera = cv2.VideoCapture(camera_port) return_value, image = camera.read() cv2.imwrite("opencv.png", image) del(camera)
Question
Why is the image obtained with the Python image much darker than the one that was made using JavaScript, and how to fix it?
(Obtaining the same image quality, just its bright, may not be fixed.)
Pay attention to "how to fix it": it does not have to be opencv. If you know the ability to use webcam images using Python with another package (or without a package), this is also normal.
python opencv
Martin Thoma Feb 17 '15 at 17:06 2015-02-17 17:06
source share