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

  • 相关阅读:
    洛谷P1762 偶数
    复习1
    zoj3329 One Person Game
    poj2096 Collecting Bugs
    hdu4035 Maze
    Cogs 2856. [洛谷U14475]部落冲突
    洛谷P2474 [SCOI2008]天平
    洛谷P3802 小魔女帕琪
    清北刷题冲刺 11-03 p.m
    清北刷题冲刺 11-03 a.m
  • 原文地址:https://www.cnblogs.com/xhiong/p/7824910.html
Copyright © 2011-2022 走看看