本帖最后由 张满满 于 2023-10-24 13:33 编辑
这个样子?- dev_update_off ()
- read_image (Image, 'Image.jpg')
- **创建种植箱等大小的矩形
- lenght:= 1526
- width:= 782
- gen_rectangle2_contour_xld (Rectangle, 0, 0, 0, lenght/2, width/2)
- **创建
- create_shape_model_xld (Rectangle, 'auto', -0.39, 0.79, 'auto', 'auto', 'ignore_local_polarity', 5, ModelID)
- **查找
- find_shape_model (Image, ModelID, -0.39, 0.79, 0.5, 1, 0.5, 'least_squares', 0, 0.9, Row, Column, Angle, Score)
- **显示查找到的数据
- dev_display_shape_matching_results ( ModelID, 'red', Row, Column, Angle, 1, 1, 0)
- **缩进参数
- IndentX:=15
- IndentY:=15
- **分割矩形 看我封装的算子
- partition_rectangle2_contour_xld (Contours , Row, Column, Angle,lenght/2-IndentY, width/2-IndentX, 5,10, rows, cols, phis, len1s, len2s)
- area_center_xld (Contours, Area, Rows, Columns, PointOrder)
- **等差数列
- tuple_gen_sequence (1, |Area|, 1, Index)
- **显示
- dev_display (Image)
- dev_set_line_width (5)
- dev_set_color ('green')
- dev_display (Contours )
- disp_message_ext (200000, Index, 'image', Rows-40, Columns-30, 'magenta', 'false', 50)
复制代码
|