0
$\begingroup$

I have an image which consists on an object in a plain black background. This is the reference image of the object. Now, My task is to take a webcam and obtain the video feed and I have to detect if the object is there in the video feed.

For instance consider I have the image of a pen with a plain black background. Now when I take move my webcam around the office space I should be able to find the object.

What is the best approach for this?

$\endgroup$
1
$\begingroup$

There is no straight-forward answer to this. But I can tell you the things you need to consider to choose a method.

Before getting into the methods to detect the object in the reference image, let me tell you about invariance.

  • If the object in the video is of the same scale as reference image? ( I am guessing NO), then you have to consider detecting at various scale.

  • If the object in the video is of the same orientation as reference image? (I am guessing NO), then you have to choose a feature that is rotation invariant)

Now about various method that you can use. Remember this is non exhaustive and there are many other methods.

  • If you have only one reference image, then it is difficult to say without looking at the reference image and the kind of video you are referring to. But a simple answer would be template matching. Other method could be to compute feature descriptors like SIFT/SURF or even color of reference image and then try to search for it in the video. Or you can also use image processing techniques like thresholding, canny edge detection etc.

  • If you have 100s of images of same reference image, you can train a SVM classifier. The choice of feature depends on the object in the reference image.

  • If you have lots of different images(like in 1000s) of the reference image class, then try deep learning approach. If you have few few images, it is still possible with this dlib library for deep learning using MMOD(check this), but you need check the accuracy.

So it all depends on the problem in hand specifically.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.