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