Ask Your Question

dougieswim's profile - activity

2017-06-26 20:02:01 -0600 received badge  Scholar (source)
2017-06-26 19:42:58 -0600 commented answer OpenCv 3.2 Video file not displaying only header displays

I can find the CVView but cannot find the CVWindow and CVSlider code... sorry new to all of this. Really appreciate the help, new to OpenCV. Will definitely vote

2017-06-26 04:55:58 -0600 commented answer OpenCv 3.2 Video file not displaying only header displays

Thank you!

2017-06-26 02:02:57 -0600 asked a question OpenCv 3.2 Video file not displaying only header displays

I am trying to get OpenCv3.2 to open a video file but it only opens the window header. I am using a MacBook pro mid-2015 version and using C++ on Xcode. It is definitely reading it but nothing displays. Any help would be deeply appreciated.

using namespace cv;
using namespace std;

int main(int argc, char** argv){
   cvNamedWindow("xample2", CV_WINDOW_AUTOSIZE);
VideoCapture capture("/filename.mp4");
Mat frame;

if(!capture.isOpened()) {
    cout << "Could not open file" << endl;
    return -1;
}
while(true) {
    capture >> frame;
    if(frame.empty()) break;
    imshow( "xample2", frame );
    char c = cvWaitKey(1000);
    if( c == 27 ) break;
}

}

2017-06-26 01:44:40 -0600 asked a question OpenCV 3.2 Unable to display Video File

Hi All

I am trying to get OpenCV (3.2) to display a video file for me to hand annotate in the future. I am using a mdi-2015 macbook pro. I get the header for the window and it is definitely running but the video does not display under the header. The code I am using is;

include <iostream>

include <string>

include <vector>

include <fstream>

include <opencv2 opencv.hpp="">

include "opencv2/highgui/highgui.hpp"

include "opencv2/imgproc/imgproc.hpp"

include "opencv2/core/core.hpp"

include <opencv2 videoio="" videoio.hpp="">

include <opencv2 highgui="" highgui_c.h="">

using namespace cv; using namespace std;

int main(int argc, char** argv)

{ cvNamedWindow("xample2", CV_WINDOW_AUTOSIZE); VideoCapture capture("/Users/johnyoung/Code/GNside.mp4"); Mat frame;

if(!capture.isOpened()) {
    cout << "Could not open file" << endl;
    return -1;
}
while(true) {
    capture >> frame;
    if(frame.empty()) break;
    imshow( "xample2", frame );
    char c = cvWaitKey(1000);
    if( c == 27 ) break;
}

}