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
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).
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With