Ask Your Question

ferdna's profile - activity

2019-07-09 21:33:37 -0500 received badge  Famous Question (source)
2016-08-16 00:20:16 -0500 commented answer Problem extracting ippicv_.zip

found solution: you have to run as root.

2016-08-16 00:20:16 -0500 answered a question Problem extracting ippicv_.zip

you can also do -D WITH_IPP=OFF... it builds... seems to work... =|

2016-05-22 23:40:16 -0500 received badge  Notable Question (source)
2015-08-10 00:16:41 -0500 received badge  Popular Question (source)
2013-10-07 20:57:38 -0500 commented answer capture video from my web cam only shows gray.

I tried skype and i got same result. I clicked on "defaults" for the contrast and brightness and that did the trick. thank you =)

2013-10-07 20:56:10 -0500 answered a question capture video from my web cam only shows gray.

Okay. I found the problem. I played with contrast, brightness and other settings all you have to do is restore them to default values and camera should work again. It seems that if you change them with opencv it will store the values. =)

2013-10-02 14:10:21 -0500 commented answer capture video from my web cam only shows gray.

my opencv libraries and my compiler and my programs are x86... the driver for the camera is 64bits... do you think this is an issue?

2013-10-02 14:06:04 -0500 commented answer capture video from my web cam only shows gray.
2013-10-01 16:24:34 -0500 commented answer capture video from my web cam only shows gray.

same result. here is the generated test.jpg: i.imgur.com/tc4Ezu4.jpg and here is the "mat tmp": i.imgur.com/knFXqJw.jpg

2013-10-01 15:54:12 -0500 commented answer capture video from my web cam only shows gray.

No, it doesn't work. same result. =(

2013-10-01 15:53:53 -0500 received badge  Critic (source)
2013-09-30 18:12:33 -0500 commented question capture video from my web cam only shows gray.

srcFrame.type() i get: 16

2013-09-29 16:06:23 -0500 received badge  Editor (source)
2013-09-29 16:03:25 -0500 asked a question capture video from my web cam only shows gray.

trying to capture video from my web cam only shows gray.

Using:
- Visual Studio 2012 - C++/Qt.
- Logitech QuickCam Ultra Vision


this is what i get when i try to capture the frames:
i.imgur.com/x7zYVAX.jpg
the lines you see is my window curtains.


some code:

    //Opens the video device #0.
    cap = new VideoCapture(0);
    if (!cap->isOpened())
    {
        qDebug() << "Cannot open the video file" << endl;
        return;
    }

    cv::Mat srcFrame;
    //read a new frame from video.
    bool bSuccess = cap->read(srcFrame);
    if (!bSuccess)
    {
        qDebug() << "Cannot read a frame from video device." << endl;
        return;
    }

    scene->addPixmap(QPixmap::fromImage(Mat2QImage(srcFrame), Qt::AutoColor));

QImage MainWindow::Mat2QImage(cv::Mat const& src)
{
     cv::Mat temp; // make the same cv::Mat
     cvtColor(src, temp,CV_BGR2RGB); // cvtColor Makes a copt, that what i need
     QImage dest((uchar*) temp.data, temp.cols, temp.rows, temp.step, QImage::Format_RGB888);
     QImage dest2(dest);
     dest2.detach(); // enforce deep copy
     return dest2;
}

my .pro file:

win32 {

    INCLUDEPATH += C:/opencv/build/include
    LIBS += -LC:/opencv/build/x86/vc11/lib

    CONFIG(debug, debug|release) {
        LIBS += -lopencv_calib3d246d \
        -lopencv_contrib246d \
        -lopencv_core246d \
        -lopencv_features2d246d \
        #-lopencv_ffmpeg246d \
        -lopencv_flann246d \
        -lopencv_gpu246d \
        -lopencv_highgui246d \
        -lopencv_imgproc246d \
        -lopencv_legacy246d \
        -lopencv_ml246d \
        -lopencv_nonfree246d \
        -lopencv_objdetect246d \
        -lopencv_ocl246d \
        -lopencv_photo246d \
        -lopencv_stitching246d \
        -lopencv_superres246d \
        -lopencv_ts246d \
        -lopencv_video246d \
        -lopencv_videostab246d
    }
    CONFIG(release, debug|release) {
        LIBS += -lopencv_calib3d246 \
        -lopencv_contrib246 \
        -lopencv_core246 \
        -lopencv_features2d246 \
        #-lopencv_ffmpeg246 \
        -lopencv_flann246 \
        -lopencv_gpu246 \
        -lopencv_highgui246 \
        -lopencv_imgproc246 \
        -lopencv_legacy246 \
        -lopencv_ml246 \
        -lopencv_nonfree246 \
        -lopencv_objdetect246 \
        -lopencv_ocl246 \
        -lopencv_photo246 \
        -lopencv_stitching246 \
        -lopencv_superres246 \
        -lopencv_ts246 \
        -lopencv_video246 \
        -lopencv_videostab246
    }

}