Shape Context Algorithm

2017-06-20  本文已影响0人  小鱼恨

wiki链接:https://en.wikipedia.org/wiki/Shape_context
论文link:https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/shape/belongie-pami02.pdf
代码实现:https://github.com/tongxyh/shape-context

Shape Context顾名思义,是一种根据图形形状进行检测识别的算法
它的核心思想是:
选取图形形状轮廓中一定数量的点,通过计算每个点的周围点到该点的角度和距离来构建这个点对应的周围环境(context)矩阵,通过对不同图像之间的矩阵匹配度,来判断两幅图像是否拥有同样的形状

具体实现分为以下几个步骤:

Step 1: Finding a list of points on shape edges

The approach assumes that the shape of an object is essentially captured by a finite subset of the points on the internal or external contours on the object.
These can be simply obtained using the Canny edge detector and picking a random set of points from the edges. Note that these points need not and in general do not correspond to key-points such as maxima of curvature or inflection points. It is preferable to sample the shape with roughly uniform spacing(it helps get better matching accuracy), though it is not critical.

step 2: Computing the shape context

This step is described in detail in the Theory section

step 3: Computing the cost matrix
step 4: Finding the matching that minimizes total cost

(未完待续)

上一篇下一篇

猜你喜欢

热点阅读