HOW TO USE SIFT WITH VIDEO [closed]

asked 2017-01-19 09:00:09 -0600

updated 2017-01-19 09:03:09 -0600

LBerger gravatar image

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;
}
edit retag flag offensive reopen merge delete

Closed for the following reason not a real question by StevenPuttemans
close date 2017-01-19 10:46:38.065526

Comments

1

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".

Der Luftmensch gravatar imageDer Luftmensch ( 2017-01-19 10:42:45 -0600 )edit

Just like stated above, put some more effort into it next time!

StevenPuttemans gravatar imageStevenPuttemans ( 2017-01-19 10:46:54 -0600 )edit