zoukankan      html  css  js  c++  java
  • Halcon算子翻译——break

    名称

    break - 结束循环执行或离开一个switch段。

    用法

    break( : : : )

    描述

      break结束最近的for,while,或repeat..until循环。 另外,break语句用于离开switch段,特别是在一个case分支的结尾处。 程序跳出,继续在随后的程序行中执行(The program execution is continued at the program line following the corresponding block.)。

      不在循环或switch段的break语句无效。

    案例(HDevelop)

    read_image (Image, 'monkey')
    threshold (Image, Region, 160, 180)
    connection (Region, Regions)
    Number := |Regions|
    AllRegionsValid := 1
    * check if for all regions area <=30
    for i := 1 to Number by 1
      ObjectSelected := Regions[i]
      area_center (ObjectSelected, Area, Row, Column)
      if (Area > 30)
        AllRegionsValid := 0
        break
      endif
    endfor

    结果

    break(作为算子)总是返回2(H_MSG_TRUE)。

    备选

    continue

    See also

    for, while, repeat, until, switch, case

    模块

    Foundation

    HDevelop例程

    two_camera_calibration.hdev        Perform high precision mosaicking using a special calibration object
    switch_case.hdev              Use switch/case statement for a multiway branch
    handeye_stationarycam_grasp_nut.hdev     Calculate pose for grasping a nut based on results of hand-eye calibration for a stationary camera
    camera_calibration_external.hdev      Measure positions on a caliper rule using camera calibration
    3d_matching_clamps.hdev            Recognize 3D objects in images using a 3D DXF model

  • 相关阅读:
    关于region Of interstROI
    二值图贴标签算法
    最大方差阈值分割OTSU
    已知空间N点坐标求圆心坐标,半径
    Blob Analysis Blob 分析
    前言
    Go基础学习
    Hive(数据仓库工具)
    Could not transfer artifact XXX,transfer failed for XXX 解决方案
    Docker
  • 原文地址:https://www.cnblogs.com/xhiong/p/7824910.html
Copyright © 2011-2022 走看看