Ask Your Question

wtswkz's profile - activity

2016-05-30 23:38:08 -0600 commented question The program can't start because opencv_world300d.dll is missing from your computer

it worked if copy the opencv_world300d.dll and opencv_world300.dll to the same directory as the source file when you run your program via VS. if you want to run the .exe directly by double click it, then the dlls should be in the same place as the ,exe. But waht I wonder is, why add the path of the dlls to the PATH, doesn't work?

2014-04-23 00:28:15 -0600 received badge  Self-Learner (source)
2014-04-23 00:22:50 -0600 answered a question Problem with Camera Capturing

I have solved this problem. It occurred to me that by using method 2 the first frame got from the external camera might be blank while the others are normal, so I add something to the code:
#include < opencv2\core\core.hpp >
#include < opencv2\highgui\highgui.hpp >
#include < iostream >
using namespace cv;
using namespace std;
int main()
{
char c;
int i = 0;
VideoCapture inputVideo(0); //0为外部摄像头的ID,1为笔记本内置摄像头的ID
Mat src;
for(;;)
{
inputVideo >> src;
if(src.empty() & i > 1) return 1;
if(i > 1) imshow("input",src);
i ++; c = waitKey(10);
if (c == 27) break;
}
return 0;
}

2014-04-19 05:04:10 -0600 received badge  Editor (source)
2014-04-19 04:58:11 -0600 asked a question Problem with Camera Capturing

I've got two ways to capture a camera. 1.using the functions in the opencv

 #include < opencv\cv.h
 #include < opencv\highgui.h 
 #include < iostream 
 using namespace std;
 using namespace cv;
 int main()
 {
     char c;
     CvCapture* capture = cvCreateCameraCapture(0);   //0 is the external camera ID,1 is the internal camera ID of my laptop.
     IplImage* src;
     for (;;)
    {
        src = cvQueryFrame(capture);         
        cvShowImage("Input", src);
        c = waitKey(10);
        if (c == 27) break;
    } 
   cvReleaseCapture(&capture);
   return 0;
 }
2.using the functions in the ***opencv2***
 #include < opencv2\core\core.hpp
 #include < opencv2\highgui\highgui.hpp 
 #include < iostream 
 using namespace cv;
 using namespace std;
 int main()
 {
     char c;
     VideoCapture inputVideo(0);    //0为外部摄像头的ID,1为笔记本内置摄像头的ID
     Mat src;
     for(;;)
     {
        inputVideo >> src;
        imshow("input",src);
        c = waitKey(10);
        if (c == 27) break;
     }
   return 0;
 }

By using the method 1, the program can read both the external and the internal camera's data;but the program can only read the internal camera's data with method 2. I don't know why method 1 and method 2 so different.
What should I do if I want to get the data of the external camera with method 2?
// my operation system is Window8.1, the version of my OPENCV is 2.4.8, the version of my Visual Studio is 2013. I need your help.