并行计算
并行计算-Halcon12.0-win32:**** Hidden Message *****模板匹配模型:
* 创建形变模型
create_shape_model (Obj, 'auto', rad(-20), rad(20), 'auto', \
'auto', 'use_polarity', 30, 10, ModelID)
get_shape_model_contours (ModelXLD, ModelID, 1)
* 显示 创建形变模型
* area_center (Obj, Area, Row, Column)
* hom_mat2d_identity (HomMat2DIdentity)
* hom_mat2d_translate (HomMat2DIdentity, Row, Column, HomMat2DTranslate)
* affine_trans_contour_xld (ModelXLD,ContoursAffinTrans, HomMat2DTranslate)
* dev_set_line_width (2)
* dev_set_color ('yellow')
* dev_display (Obj)
* dev_display (ContoursAffinTrans)
* 在原图上查找匹配模板
* count_seconds (S1)
find_shape_model (Image, ModelID, rad(-20), rad(20), \
0.7, 0, 0.0, ['least_squares','max_deformation 16'], \
0, 0.6, Row, Column, Angle, Score)
* count_seconds (S2)
* Runtime := (S2 - S1) * 1000
* Clear the model
clear_shape_model (ModelID)
return ()
Mask创建过程,我采用MATLAB:clc,clear,close all
im = imread('43.bmp');
imshow(im)
im1 = im( 917:930, 1351:1366 );
imshow(im1)
k=1;
for i=1:size(im1,1)
for j=1:size(im1,2)
row(1,k) = i-1;
col(1,k) = j-1;
gray(1,k) = im1(i,j);
k=k+1;
end
end
row_sequence =
col_sequence =
gray_sequence =
支持一下支持一下 xuexiyixialalaallahaha 请多发些这方面的资料,想学习学习 支持学习,支持学习
页:
[1]