Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

webcam image capture focusing problem

Hi guys

I have written a basic code which captures an image from webcam using python 2.7 .

The code is as follows

import numpy
import cv2
cap = cv2.VideoCapture(0)
ret, frame =

This code gives the correct output but my camera takes a few seconds to focus so i get a black or dim image as output instead of a bright proper focused image..

how can i correct this problem. I am using cv2 and python 2.7