wiki鏈接:https://en.wikipedia.org/wiki/Shape_context
論文link:https://www2.eecs.berkeley.edu/Research/Projects/CS/vision/shape/belongie-pami02.pdf
代碼實現(xiàn):https://github.com/tongxyh/shape-context
Shape Context顧名思義,是一種根據(jù)圖形形狀進行檢測識別的算法
它的核心思想是:
選取圖形形狀輪廓中一定數(shù)量的點,通過計算每個點的周圍點到該點的角度和距離來構(gòu)建這個點對應(yīng)的周圍環(huán)境(context)矩陣嚷狞,通過對不同圖像之間的矩陣匹配度,來判斷兩幅圖像是否擁有同樣的形狀
具體實現(xiàn)分為以下幾個步驟:
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
(未完待續(xù))