Halcon判断一个点是否在某个区域
来源:互联网 发布:结构的刚度矩阵 编辑:程序博客网 时间:2024/06/05 09:43
* Index of all regions containing a given pixel* read_image (Image, 'fabrik')dev_close_window ()dev_open_window (0, 0, 512, 512, 'black', WindowID)dev_set_color ('white')dev_set_draw ('fill')* Segment an image using regiongrowingregiongrowing (Image, Regions, 1, 1, 3, 400)Button := 1dev_set_color ('red')while (Button == 1) * Click with the mouse on the region to be selected * Quit the loop with the right mouse button get_mbutton (WindowID, Row, Column, Button) get_region_index (Regions, Row, Column, Index) if (Index != []) select_obj (Regions, ObjectSelected, Index) endifendwhile
* * This example program shows how to use select_xld_point.* * Color code:* red - test point* white - contours, selected* dim gray - contours, not selected* * * dev_close_window ()dev_open_window (0, 0, 512, 512, 'black', WindowHandle)* * * PointRow := 100.0PointCol := 100.0gen_contour_polygon_xld (Contours, [50,50,150,150,50], [50,150,150,50,50])gen_contour_polygon_xld (Contour2, [50,50,150,150,50], [200,300,300,200,200])concat_obj (Contours, Contour2, Contours)select_xld_point (Contours, SelectedContours, PointRow, PointCol)gen_cross_contour_xld (Cross, PointRow, PointCol, 6, 0.785398)dev_clear_window ()dev_set_color ('dim gray')dev_display (Contours)dev_set_color ('white')dev_display (SelectedContours)dev_set_color ('red')dev_display (Cross)stop ()* * * * Contours that are not closed will be closed automatically.* Therefore, the selection for the open contours is exactly* the same as in the previous example.* PointRow := 100.0PointCol := 100.0gen_contour_polygon_xld (Contours, [50,50,150,150], [50,150,150,50])gen_contour_polygon_xld (Contour2, [50,50,150,150], [200,300,300,200])concat_obj (Contours, Contour2, Contours)select_xld_point (Contours, SelectedContours, PointRow, PointCol)gen_cross_contour_xld (Cross, PointRow, PointCol, 6, 0.785398)dev_clear_window ()dev_set_color ('dim gray')dev_display (Contours)dev_set_color ('white')dev_display (SelectedContours)dev_set_color ('red')dev_display (Cross)stop ()* * * * Intersecting line segments may cause holes in a polygon. Note that* line segments in real world applications will practically never intersect.* PointRow := 200.0PointCol := 200.0gen_contour_polygon_xld (Contours, [50,50,250,250,150,150,350,350,50], [50,250,250,150,150,350,350,50,50])select_xld_point (Contours, SelectedContours, PointRow, PointCol)gen_cross_contour_xld (Cross, PointRow, PointCol, 6, 0.785398)dev_clear_window ()dev_set_color ('dim gray')dev_display (Contours)dev_set_color ('white')dev_display (SelectedContours)dev_set_color ('red')dev_display (Cross)stop ()* * * * Points lying directly on one of the contour's line segments* cannot be classified reliably.* PointRow := 200.0PointCol := 200.0gen_contour_polygon_xld (Contours, [150,150,250,250,150], [100,200,200,100,100])gen_contour_polygon_xld (Contour2, [100,100,200,200,100], [150,250,250,150,150])concat_obj (Contours, Contour2, Contours)gen_contour_polygon_xld (Contour3, [150,150,250,250,150], [200,300,300,200,200])concat_obj (Contours, Contour3, Contours)gen_contour_polygon_xld (Contour4, [200,200,300,300,200], [150,250,250,150,150])concat_obj (Contours, Contour4, Contours)select_xld_point (Contours, SelectedContours, PointRow, PointCol)gen_cross_contour_xld (Cross, PointRow, PointCol, 6, 0.785398)dev_clear_window ()dev_set_color ('dim gray')dev_display (Contours)dev_set_color ('white')dev_display (SelectedContours)dev_set_color ('red')dev_display (Cross)
阅读全文
0 0
- Halcon判断一个点是否在某个区域
- iOS开发-判断一个点是否在某个区域
- iOS开发-判断一个点是否在某个区域
- iOS-如何判断触摸点是否在某个区域
- iOS 如何判断一个点在某个指定区域中
- 判断某个点是否在一个多边形中
- 地图处理方法-判断一个点是否在某个区域内
- 判断点是否在不规则区域范围内
- 判断点是否在封闭区域里面
- 判断点是否在多边形区域里面
- 判断某个点是否在多边形内
- Android 判断触摸点是否在某个view的区域,解决子view与parent的touch事件冲突
- 百度地图 判断一个标注点是否在多边形区域里
- JS - 百度地图 判断一个标注点是否在多边形区域里
- 百度地图 判断一个标注点是否在多边形区域里
- js判断一个地图标注点是否在多边形区域里
- 百度地图 判断一个标注点是否在多边形区域里
- 判断一个点是否在某个封闭曲线内的算法
- Qt沙漏进度和水波进度发布(重写Qwidget实现)
- Python 控制流
- JVM日志打印学习笔记
- 买卖股票的最佳时机 —LintCode
- 面试知识点总结之数据库
- Halcon判断一个点是否在某个区域
- 进军CSDN
- Python3-pandas
- CNN(卷积神经网络)、RNN(循环神经网络)、DNN(深度神经网络)的内部网络结构有什么区别?
- 故障:hibernate操作数据库时,可以正常添加数据库,但是使用下面的语句时,报错:Query为空。
- Ubuntu 16.04安装后的简单配置和常用软件安装
- 输出最小整数对,以第一个数为主键
- 线性表的链式表示和实现(单链表)
- ssh只允许自己定义的主机访问