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

歡迎訪問 生活随笔!

生活随笔

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

编程问答

【机器视觉】 import算子

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

00. 目錄

文章目錄

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

01. 概述

import - 導(dǎo)入一個或多個外部程序。

02. 簽名

import( : : ProcedureSource : )

03. 描述

import語句可用于從HDevelop程序中導(dǎo)入其他外部程序。 導(dǎo)入的程序僅適用于包含導(dǎo)入語句的程序,但不作用于其他程序。

import語句可以出現(xiàn)在程序的任何一行中。 導(dǎo)入的程序只能在導(dǎo)入語句下方使用,并可能被后面的(相同名稱)導(dǎo)入程序取代。

proc()* unresolved procedure callimport ./the_one_dirproc()* resolves to ./the_one_dir/proc.hdvpimport ./the_other_dirproc()* resolves to ./the_other_dir/proc.hdvp

參數(shù)ProcedureSource指向外部程序的來源。 它可以是包含要使用的程序(和/或)程序庫的目錄的路徑或者程序庫的文件名。 在這兩種情況下,路徑可能是絕對的或相對的。 在后一種情況下,HDevelop把相對路徑解析為包含import語句的程序的文件位置。 如果路徑包含一個或多個空格,則路徑必須用引號括住,否則程序行將變?yōu)闊o效。

與系統(tǒng)相反,用戶定義和會話目錄HDevelop(ser-defined, and session directories HDevelop)僅在外部程序的import語句指定的目錄中查找,但不在其子目錄中遞歸查找。

請注意,import語句永遠(yuǎn)不會執(zhí)行,因此必須在該程序加載時已經(jīng)對ProcedureSource進(jìn)行了評估。 因此,ProcedureSource必須是一個常量表達(dá)式,特別是不能將一個字符串變量傳遞給ProcedureSource。

但是,ProcedureSource也可能包含環(huán)境變量,HDevelop會相應(yīng)地進(jìn)行解析。 無論實(shí)際使用的平臺如何,環(huán)境變量都必須以Windows語法表示,即%VARIABLE%。

import既不檢驗(yàn)路徑ProcedureSource是否存在,也不檢驗(yàn)它是否指向程序庫或包含程序的目錄。 因此,在任何情況下,具有不存在或無意義路徑的import語句仍然保持有效的程序行。

導(dǎo)入路徑在HDevelop的程序設(shè)置中分別列出。 當(dāng)然,這些路徑不能在程序設(shè)置中修改或停用。 此外,僅通過import語句提供的程序標(biāo)有特殊的圖標(biāo)。

在程序清單中,顯示的import語句輸入必須沒有帶括號,以強(qiáng)調(diào)該行是聲明而不是可執(zhí)行的算子。

原文描述

The import statement can be used to import additional external procedures from within a HDevelop program. The imported procedures become only available for the procedure that contains the import statement but not for other procedures.

import statements may occur in any line of a procedure. The imported procedures become only available below the import statement and may be overruled by later import statements.

proc()* unresolved procedure callimport ./the_one_dirproc()* resolves to ./the_one_dir/proc.hdvpimport ./the_other_dirproc()* resolves to ./the_other_dir/proc.hdvp

The parameter ProcedureSource points to the source of the external procedures. It can either be the path of a directory that contains the procedures and/or the procedure libraries to be used or directly the file name of a procedure library. In both cases, the path may either be absolute or relative. In the latter case, HDevelop interprets the path as being relative to the file location of the procedure that contains the import statement. The path has to be in quotes if it contains one or more spaces, otherwise the program line will become invalid.

Contrary to system, user-defined, and session directories HDevelop looks only in the directory specified by an import statement for external procedures but not recursively in its subdirectories.

Note, that an import statement is never executed and, therefore, ProcedureSource has to be evaluated already at the procedure’s loading time. Therefore, ProcedureSource has to be a constant expression, and, in particular, it is not possible to pass a string variable to ProcedureSource.

However, ProcedureSource may also contain environment variables, which HDevelop resolves accordingly. Environment variables, regardless of the platform actually used, must always be denoted in Windows syntax, i.e., %VARIABLE%.

import neither tests whether the path ProcedureSource exists nor whether it points to a procedure library or a directory that contains procedures at all. Therefore, import statements with nonexistent or pointless paths nonetheless stay valid program lines, in any case.

Import paths are listed separately in HDevelop’s procedure settings. Of course, these paths can’t be modified or deactivated from within the procedure settings. Furthermore, procedures that are available only via an import statement are marked with a special icon.

In the program listing, import statements are displayed and must be entered without parenthesis in order to emphasize that the line is a declaration and not an executable operator.

04. 注意

05. 參數(shù)

ProcedureSource (input_control)   string → (string)
File location of the external procedures to be loaded: either a directory or a procedure library

要加載的外部程序的文件位置:目錄或程序庫

06. 結(jié)果

import從不執(zhí)行。

HDevelop例程
variable_types.hdev Define variable types in HDevelop

07. 附錄

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

總結(jié)

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

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