Halcon函數總結:
create_class_box( : : :ClassifHandle)
//創建一個分類器
learn_ndim_box(Foreground,Background,MultiChannelImage
: :ClassifHandle : ) //利用正反樣本訓練分類器
class_ndim_box(MultiChannelImage
: Regions :ClassifHandle
: ) //利用分類器分割圖像
close_class_box(
: : ClassifHandle : ) //關閉分類器,銷燬存儲空間
參考例程:class_ndim_box.hdev
=====================================================================================================
gen_rectangle2(
: Rectangle :Row,Column,Phi,Length1,Length2
: ) //創建一個任意方向的矩形
union1(Region
: RegionUnion : : ) //將所有輸入的region聯合爲一個region
create_class_gmm(
: : NumDim,NumClasses,NumCenters,CovarType,Preprocessing,NumComponents,RandSeed
:GMMHandle) //創建一個高斯混合模型的分類器
add_samples_image_class_gmm(Image,ClassRegions
: :GMMHandle,Randomize
: ) //從圖像中得到高斯混合模型的樣本
train_class_gmm(
: : GMMHandle,MaxIter,Threshold,ClassPriors,Regularize
:Centers,Iter)
//訓練高斯混合模型
clear_samples_class_gmm(
: : GMMHandle : ) //釋放高斯混合模型的訓練數據
classify_image_class_gmm(Image
: ClassRegions :GMMHandle,RejectionThreshold
: ) //利用高斯混合模型來分割圖像
region_to_mean(Regions,Image
:ImageMean : : ) //打印region的平均灰度值
clear_class_gmm( : :GMMHandle : ) //釋放高斯混合模型
=====================================================================================================
lines_gauss(Image
: Lines :Sigma,Low,High,LightDark,ExtractWidth,LineModel,CompleteJunctions
: ) //高斯檢測直線
clip_contours_xld(Contours
: ClippedContours :Row1,Column1,Row2,Column2
: ) //按照指定的rect剪切輪廓數據
參考例程clip_contours_xld.hdev
=====================================================================================================
clip_region(Region : RegionClipped : Row1,Column1,Row2,Column2 : ) //通過rect剪切一個region
clip_region_rel(Region : RegionClipped : Top,Bottom,Left,Right : ) //同過一個相對於圖像的尺寸來剪切圖像region
參考例程clip_region.hdev clip_region_rel.hdev
=====================================================================================================
region_to_bin(Region : BinImage :ForegroundGray,BackgroundGray,Width,Height : ) //將指定的region轉換爲指定尺寸和值的二值圖像
rectangle1_domain(Image : ImageReduced : Row1,Column1,Row2,Column2 : ) //從給定圖像產生rectangle
mean_image(Image : ImageMean :MaskWidth,MaskHeight : ) /平均值平滑圖像
paint_gray(ImageSource,ImageDestination : MixedImage : : ) //將一副圖像的灰度值打印到另一幅圖像上並且輸出
edges_sub_pix(Image : Edges :Filter,Alpha,Low,High : ) //利用指定的算子提取圖像邊緣
segment_contours_xld(Contours : ContoursSplit : Mode,SmoothCont,MaxLineDist1,MaxLineDist2 : ) //按照指定的形式(MODE,如Line)分離xld輪廓
//其他關於輪廓的函數待理解:regress_contours_xld union_collinear_contours_xld
參考例程close_contour_gaps.hdev
=====================================================================================================
gen_contour_polygon_xld( : Contour : Row, Col : ) //創建多邊形輪廓數據
close_contours_xld(Contours : ClosedContours : : ) //封閉輪廓
select_contours_xld(Contours : SelectedContours : Feature, Min1, Max1, Min2, Max2 : ) //按照給定的特徵選擇輪廓
參考例程 close_contours_xld.hdev