当前位置:网站首页>Class of color image processing based on Halcon learning_ ndim_ norm. hdev

Class of color image processing based on Halcon learning_ ndim_ norm. hdev

2022-07-05 07:56:00 BoomBiuBiu

Classification based on multi-channel images

* Read the picture 
read_image (Image, 'ic')

* Get the size of the picture 
get_image_size (Image, Width, Height)

* close window 
dev_close_window ()

* open windows 
dev_open_window (0, 0, Width, Height, 'black', WindowID)

* display picture 
dev_display (Image)

* Set the color to red 
dev_set_color ('red')

* use ROI Make matting 
gen_rectangle1 (Region, 360, 198, 369, 226)

* Create an empty area 
gen_empty_region (EmptyRegion)


*learn_ndim_norm -  by class_ndim_norm Construction class 
*learn_ndim_norm( Classification area ,  background ,  Images ,  The way ,  distance ,  Minimum scale ,  radius ,  center ,  quality )
*learn_ndim_norm from Foreground Region generates classification clusters , And in multi-channel images Image Generate the corresponding gray value , Can be in class_ndim_norm Use in .
* The background is determined in class_ndim_norm A class of pixels not found in . This parameter may be empty ( An empty object )
learn_ndim_norm (Region, EmptyRegion, Image, 'euclid', 10, 0.01, Radius, Center, Quality)

* Set the color to blue 
dev_set_color ('blue')

* Use hypersphere or hypercube to classify pixels 
class_ndim_norm (Image, Regions, 'euclid', 'multiple', Radius, Center)

* display picture 
dev_display (Image)

* Display area 
dev_display (Regions)

Cutout area :

  Recognition result :

 

原网站

版权声明
本文为[BoomBiuBiu]所创,转载请带上原文链接,感谢
https://yzsam.com/2022/02/202202140548302388.html