Ask Your Question

Mike Kao's profile - activity

2019-09-23 22:43:02 -0600 edited question cannot using VideoCapture by IPCam but Webcam is fine

cannot using VideoCapture by IPCam but Webcam is fine Hi, recently I bought a IP camera Acti E93. I can use rtsp://id:pa

2019-09-23 22:41:48 -0600 asked a question cannot using VideoCapture by IPCam but Webcam is fine

cannot using VideoCapture by IPCam but Webcam is fine Hi, recently I bought a IP camera Acti E93. I can use rtsp://id:pa

2017-03-19 02:08:10 -0600 answered a question information not available no symbols loaded opencv_world310d.dll

I have solved this problem with re-install my OS from windows 8.1 to windows 7. In windows 7, I set all the same environment and the project run fine. I don't know why, but it is work.

2017-03-10 05:49:56 -0600 asked a question information not available no symbols loaded opencv_world310d.dll

Hi, I have created a project that can run some basic operations, such as rgb2gray, blur..., when I want to use the MOG2 Background subtractor, the createBackgroundSubtractorMOG2(); is fine, but when I want to use the apply() method, It will show the error: "information not available no symbols loaded opencv_world310d.dll" I have made sure that the libler world310d.dll and world310.dll have added to the the Additional Dependencies.

I compiled this project in another computer, it is fine and run correctly.

Is there anything I missed? Thank you very for your help.

2016-11-06 01:04:03 -0600 commented answer flip and thread play Video error

Dear berak, It do capture from cam and play Video simultaneously, thank you.But there is a little difference, each time when the condition is true, I want to play the video entirely, not only play a frame. Thanks again.

I have isolated the playVideo into a function. It can work, but when the playVideo function is playing, the while loop in main is suspended. How can I run playVideo function and no-suspend the mail loop?

2016-11-05 09:00:54 -0600 commented question flip and thread play Video error

I count a variable, when this variable is greater than a threshold, the condition is true. btw, this variable will be reset when it has called the playVideo().

2016-11-05 08:40:23 -0600 commented question flip and thread play Video error

all I need is performing some image processing and when some condition happens, it play a video, but the processing should continue. So, can you give me any advice? Thank you much. I'm a newer for OpenCV.

2016-11-05 07:07:28 -0600 received badge  Editor (source)
2016-11-05 06:23:30 -0600 asked a question flip and thread play Video error

Hi,

I have a function(assume the function is A) that capture image from my webcam, and another function play a video (assume the function is B). Both of them can run independently well. but when I mix them by using thread mThead(B) in function A. The B function will fail. 
I have found that in function A if I execute the flip(...), the program can run into function B but it cannot play the video. If without flip(), the function B will correctly run.

Is there anyone know what happen to this? And how can I fix it?

Thank you very much.

This is some of my code:

using namespace cv;
using namespace std;

// Global variables
Mat frame; //current frame
int keyboard; //input from keyboard

void processVideo();
void playVideo();

int main()
{

    //create GUI windows
    namedWindow("Frame");
    processVideo();

    //destroy GUI windows
    destroyAllWindows();
    return EXIT_SUCCESS;
}

void playVideo(){
    VideoCapture cap("A.avi");
    Mat myframe;

    if (!cap.isOpened()) {
        cout << "Cannot open the video file on C++ API" << std::endl;
        exit(EXIT_FAILURE);
    }

    for (;;) {
        cap >> myframe;
        if (myframe.empty())
            break;
        imshow("Video Frame", myframe);
        int c = waitKey(10);
        if ((char)c == 27) { break; }
    }
    cap.release();
}

void processVideo() {
    Mat dst;

    //create the capture object
    VideoCapture cap(0);
    //open capture
    if (!cap.isOpened()){
        cout << "Open camera failed";
        exit(EXIT_FAILURE);
    }

    //read input data. ESC or 'q' for quitting
    while ((char)keyboard != 'q' && (char)keyboard != 27){
        //read the current frame
        if (!cap.read(dst)) {
            cerr << "Unable to read next frame." << endl;
            cerr << "Exiting..." << endl;
            exit(EXIT_FAILURE);
        }

        flip(dst, frame, 1);   //something image processing

        if (condition is true){
            thread mThread(playVideo);
            // wait the thread stop
            mThread.join();
        }

        //show the current frame and the fg masks
        imshow("Frame", frame);

        //get the input from the keyboard
        keyboard = waitKey(30);
    }

    //delete capture object
    cap.release();
}