Index:.../Matching/Shape-Based/find_shape_model_max_deformation.hdev
這個程序作了一個對比
for Search := 1 to 2 by 1
if (Search == 1)
WindowHandle := WindowHandle1
SubPixel := 'least_squares_high'
else
WindowHandle := WindowHandle2
SubPixel := ['least_squares_high','max_deformation 10']
endif
dev_set_window (WindowHandle)
dev_display (SearchImage)
disp_message (WindowHandle, DispString[Search - 1], 'window', 12, 12, 'black', 'true')
count_seconds (Seconds1)
find_shape_model (SearchImage, ModelID, 0, 0, 0.4, 1, 0.5, SubPixel, 0, 0.9, Row, Column, Angle, Score)
在匹配時對兩種Subpixel作了匹配,從算子的幫助文檔也可以看到, ['least_squares_high','max_deformation 10']這也是一種常規
的輸入方法。
vector_angle_to_rigid (0, 0, 0, Row[I], Column[I], Angle[I], HomMat2D)
affine_trans_contour_xld (ModelContours, ModelContoursTrans, HomMat2D)
做仿射變換,就是按一組向量然後把原模型投射到新的位置。