TA的每日心情 | 开心 前天 17:28 |
---|
签到天数: 380 天 连续签到: 1 天 [LV.9]以坛为家II

 
- 积分
- 1422
 
|
51Halcon诚邀您的加入,专注于机器视觉开发与应用技术,我们一直都在努力!
您需要 登录 才可以下载或查看,没有账号?会员注册
x
I want to create a module with OPENCV like on below. But function of opencv which is cv.matchShapes(...), support only a contour for searching. How can I create a reference model which has multiple contours with OPENCV?
Information: (contour1 is not supported for multiple contours)
- Python: cv2.matchShapes(<b>contour1</b>, contour2, method, parameter)
复制代码
Halcon Codes:
- read_image (Test, 'test.jpg')
- gen_rectangle1 (ROI_0, -3.64286, -31.5379, 152.201, 114.278)
- reduce_domain(Test, ROI_0, ImageReduced)
- create_shape_model (ImageReduced, 4, rad(0), rad(360), rad(1.6523), ['none','no_pregeneration'], 'use_polarity', [12,17,5], 4, ModelID)
- get_shape_model_contours(ModelContours, ModelID, 1)
- find_shape_model(Test, ModelID, -0.39, 0.79, 0.5, 1, 0.5, 'least_squares', 0, 0.9, Row, Column, Angle, Score)
复制代码
|
|