please have a look at the following code
#include <iostream>
#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
#include <opencv2/imgproc/imgproc.hpp>
using namespace std;
using namespace cv;
int main()
{
VideoCapture *camera = new VideoCapture();
camera->open(0);
if(!camera->isOpened())
{
cout << "No Camera" << endl;
return -1;
}
Mat image,blur,canny;
namedWindow("Video");
while(true)
{
*camera>>image;
imshow("Video",image);
cv::GaussianBlur(image,blur,Size(7,7),1.5,1.5);
cv::Canny(blur,canny,0,30,3);
imshow("cANNY",canny);
if(waitKey(30)>=0)
{
break;
}
}
return 0;
}
This code generated following 2 outputs
Original
Canny
As you can see, the canny has detected LOT of edges which doesn't even exists. If this is an issue with the web camera frames per seconds, what kind of web cam should I use? how many Frames per seconds? I have tested this with the default web cam in DELL Inspiron 4030 and another USB 2.0 web cam. Both results are same.
If this is an issue with the code, how can I solve it?
My next target is background subtraction, and I feel that these unwanted stuff might fail me. Please help.