日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當(dāng)前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

【机器视觉】 while算子

發(fā)布時(shí)間:2024/4/24 编程问答 36 豆豆
生活随笔 收集整理的這篇文章主要介紹了 【机器视觉】 while算子 小編覺得挺不錯(cuò)的,現(xiàn)在分享給大家,幫大家做個(gè)參考.

00. 目錄

文章目錄

    • 00. 目錄
    • 01. 概述
    • 02. 簽名
    • 03. 描述
    • 04. 注意
    • 05. 參數(shù)
    • 06. 結(jié)果
    • 07. 附錄

01. 概述

while - 只要條件為真就開始執(zhí)行循環(huán)。

02. 簽名

while( : : Condition : )

03. 描述

只要Condition參數(shù)的值為’true’(或者數(shù)字不等于0),while就會(huì)循環(huán)運(yùn)行相應(yīng)的endwhile語句內(nèi)的循環(huán)體。

如果Condition判定為’false’(0),則程序在相應(yīng)的endwhile語句之后繼續(xù)運(yùn)行。

原文描述

while executes the loop body up to the corresponding endwhile statement as long as the Condition parameter evaluates to ‘true’ (or a number not equal 0).

If the condition evaluates to ‘false’ (0) the program is continued after the corresponding endwhile statement.

04. 注意

05. 參數(shù)

Condition (input_control) integer → (integer)
  循環(huán)的條件

06. 結(jié)果

如果指定參數(shù)的值正確,while(作為算子)返回2(H_MSG_TRUE)。 否則會(huì)引發(fā)異常并返回錯(cuò)誤代碼。

HDevelop例程

while.hdev Use a while loop to provide interaction until right mouse button is clicked

程序示例

dev_update_window ('off') dev_close_window () dev_open_window (0, 0, 512, 512, 'black', WindowID) read_image (Image, 'particle') dev_display (Image) stop () threshold (Image, Large, 110, 255) dilation_circle (Large, LargeDilation, 7.5) dev_display (Image) dev_set_draw ('margin') dev_set_line_width (3) dev_set_color ('green') dev_display (LargeDilation) dev_set_draw ('fill') stop () complement (LargeDilation, NotLarge) reduce_domain (Image, NotLarge, ParticlesRed) mean_image (ParticlesRed, Mean, 31, 31) dyn_threshold (ParticlesRed, Mean, SmallRaw, 3, 'light') opening_circle (SmallRaw, Small, 2.5) connection (Small, SmallConnection) dev_display (Image) dev_set_colored (12) dev_display (SmallConnection) stop () dev_set_color ('green') dev_display (Image) dev_display (SmallConnection) Button := 1 while (Button == 1)dev_set_color ('green')get_mbutton (WindowID, Row, Column, Button)dev_display (Image)dev_display (SmallConnection)dev_set_color ('red')select_region_point (SmallConnection, SmallSingle, Row, Column)dev_display (SmallSingle)NumSingle := |SmallSingle|if (NumSingle == 1)intensity (SmallSingle, Image, MeanGray, DeviationGray)area_center (SmallSingle, Area, Row, Column)dev_set_color ('yellow')set_tposition (WindowID, Row, Column)write_string (WindowID, 'Area='+Area+', Int='+MeanGray)endif endwhile dev_set_line_width (1) dev_update_window ('on')

07. 附錄

7.1 機(jī)器視覺博客匯總
網(wǎng)址:https://dengjin.blog.csdn.net/article/details/116837497

總結(jié)

以上是生活随笔為你收集整理的【机器视觉】 while算子的全部?jī)?nèi)容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網(wǎng)站內(nèi)容還不錯(cuò),歡迎將生活随笔推薦給好友。