Ask Your Question

Revision history [back]

Images captured from webcam are cropped

Hi there, iḿ using OpenCv 2.4.8 trying to capture video from my webcam. The problem it's that sometimes I get a cropped like this: imageCropped Image.

This the code i 'm using:

void CaptureThread::run(){
this->activo=true;
cap = new VideoCapture(0);
cap->set(CV_CAP_PROP_FRAME_WIDTH, 640);
cap->set(CV_CAP_PROP_FRAME_HEIGHT, 480);

while(this->activo){
    QThread::msleep(10);
    Mat frame;
    cap->operator >>(frame);
    if( frame.empty() ){
        continue;
    }
    this->visor->setImage(frame);
    frame.release();
}

}

And every time I run the app i get this message:

HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP

HIGHGUI ERROR: V4L/V4L2: VIDIOC_S_CROP

Thanks, for you help. AM