Halcon算子翻譯——if


名稱

if - 條件語句。

用法

if( : : Condition : )

描述

  if是一個條件語句,啟動一個if分段。 Condition參數必須計算為布爾值或整數表達式。

  如果Condition判斷為'true'(非0),則執行它下面的分段直到下一個相應的分段語句elseif,else或endif。 到達分段的結尾處時,在相應的endif語句之后繼續運行。

  如果Condition判斷為''false(0),則繼續執行下一個相應的分段語句elseif,else或endif。

參數

Condition (input_control) integer → (integer)
if語句的條件。
默認值: 1

結果

如果條件正確,if(作為算子)返回2(H_MSG_TRUE)。 否則會引發異常並返回錯誤代碼。

備選算子

elseif, else

See also

for, while, until

模塊

Foundation

HDevelop例程

print_check.hdev            Perform a typical print quality inspection using a variation model
point_line_to_hom_mat2d.hdev       Align image based on point-to-line correspondences for print quality inspection with a variation model
pm_illu.hdev                   Apply online pattern matching using a gray-value template that adapts to illumination changes
cbm_caliper.hdev           Measure the setting of a caliper using component-based matching in a perspectively distorted image
cbm_bin_switch.hdev          Locate a switch and test its state using component-based matching
best_match_rot_mg_clip1.hdev    Find position and orientation of clips using a gray-value template
3d_position_of_rectangle.hdev       Estimate 3D pose of rectangular objects


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM