Homography search v / s Contour definition

The problem lies in the detection of a known rectangular object in the image. Which of the following is less expensive:

  • Homography Search - To search for homography, we use a known object pattern to match functions.
  • Edge Detection - We are trying to detect the largest edge in the image. In this particular case, we assume that the largest contour will correspond to the known rectangular object that we are trying to find.

In both cases, we transform the perspective after detecting the object to define the perspective.

NOTE. We use the Open-CV functions to find homography and define a contour.

+3


source to share


1 answer


You should try to find the largest contour. This is the easiest and will be much faster. You need to locate the ends of the canna, then find the outlines and find the one that has the largest area. However, it can fail if the contours are unclear or if the object is larger, since it does not take shape into account. You can also apply both of your ideas for better results.

EDIT:

To answer your comment you have Canny edge + find contours + find most from find features + match features



I think the first combination is cheaper than computation. Also, there is a nice implementation of square / rectangle detection here .

However, if the outlines of the rectangle are not clear, and if, in addition, the rectangle is heavily textured, you should get better results with feature matching.

+3


source







All Articles