halcon函式詳解

2021-08-19 09:55:44 字數 3175 閱讀 8277

comment

( : :comment : )

注釋語句

exit ( : : : ) 

退出函式

open_file ( : :filename, filetype : filehandle )

fwrite_string ( : :filehandle, string : )

寫入string

dev_close_window( : : : )

關閉活躍的圖形視窗。

read_image( : image : filename : )

;載入get_image_pointer1 (image : : : pointer, type, width, height )

獲得影象的資料。如:型別(= '位元組',' ' ',uint2 int2 等等) 和影象的尺寸( 的寬度和高度)

dev_open_window( ::row,column,widthheight,background :windowhandle )

開啟乙個圖形的視窗。

dev_set_part ( : :row1, column1, row2, column2 : )

修改影象顯示的位置

dev_set_draw (』fill』)

填滿選擇的區域

dev_set_draw (』margin』)

顯示的物件只有邊緣線,

dev_set_line_width (3)

線寬用line width指定

threshold ( image :region : mingray, maxgray : )

選取從輸入影象灰度值的g滿足下列條件:mingray < = g < = maxgray 的畫素。

dev_set_colored (number)

顯示region是用到的顏色數目

dev_set_color ( : :colorname : )

指定顏色

connection ( region :connectedregions : : )

合併所有選定畫素觸控相互連通區

fill_up ( region :regionfillup : : )

填補選擇區域中空洞的部分

fill_up_shape( region : regionfillup : feature, min, max : )

select_shape ( regions :selectedregions : features, operation, min, max : )

選擇帶有某些特徵的區域,operation是運算,如「與」「或」

smallest_rectangle1 (regions : : : row1, column1, row2, column2 )

以矩形畫素座標的角落,column1,row2(row1,column2)計算矩形區域( 平行輸入座標軸) 。

dev_display (object : : : ) 顯示

disp_rectangle1( : : windowhandle, row1, column1, row2, column2 : )

顯示的矩形排列成的。disp_rectangle1顯示乙個或多個矩形視窗的產量。描述乙個矩形左上角(row1,column1) 和右下角(row2,column2)。顯示效果如圖1.

texture_laws( image : imagetexture : filtertypes, shift, filtersize : )

texture_laws

實行紋理變換影象filtertypes:預置的過濾器shift :減少灰度變化filtersize:過濾的尺寸

mean_image ( image :imagemean : maskwidth, maskheight : )

平滑影象,原始灰度值的平均數maskwidth: 過濾器的寬度面具

bin_threshold( image : region : : )

自動確定閾值  region:黑暗的區域的影象

dyn_threshold( origimage, thresholdimage : regiondynthresh : offset,lightdark : )

比較兩個畫素的影象畫素regiondynthresh(out)分割區域offset: 減少噪音引起的問題lightdark提取光明、黑暗或類似的地方?

dilation_circle( region : regiondilation : radius : )

擴張有乙個圓形結構元素的地區 radius圓半徑

complement( region : regioncomplement : : )

返還補充的區域

reduce_domain( image, region : imagereduced : : )

減少定義領域的影象imagereduced=image- region

opening_circle( region : regionopening : radius : )

開啟具有圓形結構元素的地區,平滑影象的邊界。  radius:半徑

dev_clear_window( : : : )

清除檢視窗體

get_mbutton( : : windowhandle : row, column, button )

原地等待直到滑鼠按下

select_region_point( regions : destregions : row, column : )

選擇所有包含給定畫素的區域

dilation_rectangle1( region : regiondilation : width, height : )

擴張有矩形元素地區  width構建的矩形的寬度

difference( region, sub : regiondifference : : )

計算兩個區域的差異

gen_region_line( : regionlines : beginrow, begincol, endrow, endcol : )

計算區域(起始點和終點)中的線段

intersection( region1, region2 : regionintersection : : )

計算兩個區域的交叉點

shape_trans( region : regiontrans : type : )

變換形狀,形狀取決於type

halcon語句詳解

concat obj objects1,objects2 objectsconcat 連線兩個標誌性的物件。mean n image imagemean 在幾個通道上的平均的灰度值。gen empty obj emptyobject 建立乙個空的陣列。closing rectangle1 regio...

Halcon函式總結(一)

halcon函式總結 read image image filename 讀入影象 crop part image imagepart row,column,width,height 剪下影象 add image image1,image2 imageresult mult,add 影象灰度值相加 ...

Halcon 邊緣檢測運算元詳解

1.1 種類 halcon內常用的邊緣檢測運算元包括如下幾種 1.edges image 提取2d 影象邊緣 2.edges sub pix 提取2d影象亞畫素邊緣 3.edges object model 3d 提取3d影象邊緣 4.edges color和edges color sub pix ...