computer vision: extracting info about a shape given a contour (e.g. pointy, round…)

被刻印的时光 ゝ 提交于 2020-01-01 03:31:05

问题


Given the 2D contour of a shape in the form of lines and vertices, how can I Extract Information from that? like: Pointy, round, straight line. Shape similarities with a given shape.

Code is not necessary, I am more interested in concepts and the names of techniques involved to guide my search....

Thanks in advance.


回答1:


Image moments

One approach is to calculate the first and second order central moments of the shape described by the 2D contour. Using these values the elongation of the object can be calculated.

The central image moments can be combined to the seven moments of Hu, which are invariant to change in scale, rotation and translation (ie. they are very good for basic shape recognition). (More on image moments here).

Unitless ratio of perimeter and area

An other approach is to calculate the length of the perimeter (p) and the size of the inscribed area (a). Using these two values, the following ratio can be computed:

ratio = p^2 / (4 * pi * a)

The closer this ratio is to one, the more circle like is the described shape.

Other methods

  • Fourier descriptors
  • Ratio of shape area and the area of the convex hull of the shape



回答2:


Another method of contour shape classification is topological aproach based on the "size function" That could be useful for global shape recognition, but not for extracting "local" features like pointy/round/straight. http://en.wikipedia.org/wiki/Size_function Basically slicing contour by parametrized line and counting number of connected components depending on parameter. http://www.ingre.unimo.it/staff/landi/articoli/patrec.pdf




回答3:


What I think you might be looking for is often called Blob or Connectivity Analysis, which I believe was first developed at SRI (Stanford Research Institute). Image moments are one component of this area.



来源:https://stackoverflow.com/questions/1631081/computer-vision-extracting-info-about-a-shape-given-a-contour-e-g-pointy-rou

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!