Ask Your Question

Detect if object present in image | how to detect whether an object is found?

asked 2014-01-30 17:30:45 -0600

Hans22 gravatar image

updated 2014-01-30 17:43:27 -0600

Hi. I try to find a object in a picture. I tiried the openCV Example: Features2D + Homography to find a known object (

This works quiet well. My Idea is to have some pictures saved as template. Now I turn the Camera in space to detect this features.

Now I'm asking myself 1.) how can I measure that this object has been found? 2.) How can I measure the confidence, that this is the correct object found?

Thanks in advance

edit retag flag offensive close merge delete

2 answers

Sort by ยป oldest newest most voted

answered 2014-01-31 08:48:57 -0600

JohannesZ gravatar image

Try these steps:

  • extract features and match them (FLANN is more suitable in most cases by the way)
  • compute a homography via RANSAC
  • warp your scene image into the direction of your pattern
  • compute a similarity measure between both images (if the warp was correct,they have the same dimension). You can use a normalized cross correlation or a correlation coefficient for example.
edit flag offensive delete link more

answered 2014-01-31 06:21:52 -0600

conceptgame gravatar image

1) The size of the good matches is good start point. 2) Typically > 7-8 good matches means that you found the object.

edit flag offensive delete link more

Question Tools


Asked: 2014-01-30 17:30:45 -0600

Seen: 1,539 times

Last updated: Jan 31 '14