zoukankan      html  css  js  c++  java
  • halcon Region间的交集、并集、补集。收集筛选的Region。图缩放到区域中。灰度图的交、补。

    【区域与区域】

    交集:intersection (区域1, 区域2, 交集图)

    并集:union2(区域1,区域2,并集图)

    补集(差异的区域):difference(大区域,小区域,补集图),或 complement (Region, 整幅图内Region的补集)

    【收集筛选的Region】

    area_center (ConnectedRegions, Area, Row, Column)
    *先创建空Region,用来收集筛选的Region
    gen_empty_region (EmptyRegion)
    for i := 0 to |Row|-1 by 1
        if (满足某个条件)   
             *把满足条件的Region收集到EmptyRegion中,注意select_obj的索引从1开始
             select_obj (ConnectedRegions, ObjectSelected, i+1) 
             union2 (ObjectSelected, EmptyRegion, EmptyRegion) 
        endif 
    endfor 
    *最终EmptyRegion集结了所有满足条件的Region

    【图与区域】

    图缩放到区域中:reduce_domain (图, 区域, 缩放到区域的图)

    【灰度图的交、补】

    即共同部分,差异部分。

    * 开、闭运算后,求不同部分、相同部分
    gray_opening_shape (Image, ImageOpening, 7, 7, 'octagon')
    gray_closing_shape (Image, ImageClosing, 7, 7, 'octagon')
    dyn_threshold (ImageOpening, ImageClosing, RegionDynThresh, 75, 'not_equal')
    dyn_threshold (ImageOpening, ImageClosing, RegionDynThresh, 75, 'equal')
  • 相关阅读:
    springboot定时任务框架Quartz
    Linux中安装Erlang
    prometheus常用函数详解
    Prometheus+Grafana+SpringBoot业务埋点可视化监控
    Prometheus+Grafana可视化监控SpringBoot项目
    prometheus的数据类型介绍
    DS:顺序栈
    DS:顺序队列
    Linux:06进程
    primer5:chap09顺序容器
  • 原文地址:https://www.cnblogs.com/xixixing/p/12101325.html
Copyright © 2011-2022 走看看