HOW TO USE SIFT WITH VIDEO [closed]
I WANT TO RUN SIFT (OPENCV 2.9 VERION), BUT NOT ONLY on ONE frame. I want to use my webcam live and see the result on the video
how to change my code ?
#include <opencv2/opencv.hpp>
#include <opencv2/nonfree/nonfree.hpp>
using namespace cv;
int main()
{
Mat img = imread("C:\\Users\\user\\Documents\\Visual Studio 2015\\Projects\\yakir-baby-analistic\\yakir1\\255.jpg", CV_LOAD_IMAGE_COLOR); // Read the file
SIFT sift;
vector<KeyPoint> key_points;
Mat descriptors;
sift(img, Mat(), key_points, descriptors);
Mat output_img;
drawKeypoints(img, key_points, output_img);
namedWindow("Image");
imshow("Image", output_img);
waitKey(0);
destroyWindow("Image");
return 0;
}
WRITING IN ALL CAPS IS NOT GOING TO INSPIRE ANYONE TO HELP YOU. Please, write in proper English, which also include spelling and punctuation.
This has nothing to do with OpenCV. You will need to use a loop (a for loop or a while loop) and perform a camera capture on each loop. Search the docs for "VideoCapture".
Just like stated above, put some more effort into it next time!