Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

search object in video opencv [closed]

Tags:

c++

opencv

my problem I want to get an object in a video stream

Example: I want my cam either start once I pass a pen I want the system tells me that this is a pen if I switch my phone I want the system tell me that the phone

like image 557
Ryodo Avatar asked Nov 03 '22 23:11

Ryodo


1 Answers

Here's the OpenCV page on object tracking:

http://docs.opencv.org/modules/video/doc/motion_analysis_and_object_tracking.html

And here is an OpenCV tutorial on using CamShift:

https://code.ros.org/trac/opencv/browser/trunk/opencv/samples/cpp/camshiftdemo.cpp?rev=4118

Once you have an ellipse defining the region where a certain color scheme is detected, you can either then assume that the object is detected, or you can enforce further constraints like the size and shape of the object. This is obviously not scale/transformation invariant. This would also require training data (so you'd have to have prior knowledge about what the pen/phone looks like).

like image 163
Tim Sweet Avatar answered Nov 10 '22 10:11

Tim Sweet