Halcon blob analysis basic processing steps

Halcon, blob analysis

Application scenario, the contrast of the gray image binarization clear

The basic process flow

1 read the image
read_image(变量名,'路径')   //halcon字符串使用单引号''
2 preprocessing
  • 2.1 ROI (Region of internesting) a region of interest,
  • 2.2 opened the contrast
  • Geometric transformation 2.3
  • 2.4 denoising
*使用灰度直方图,调整  插入代码
theashold(变量名,Regions,89,234)

A mixture of the above methods, see item specific case flexible transform

3 division
  • 3.1 open operator first expansion after corrosion
  • After closing operation expanded to 3.2 Corrosion
  • 3.3 corrosion
  • 3.4 expansion
  • communication connection is disconnected domain

Feature selection, using the feature histogram, the processing characteristics depending on the circumstances, to obtain particular desired character recognition, etc.

4 calculates Display Identification

Counting the number of symbols variable absolute value | something |

Calculated using the number of feature count_object

dev_display () display

dev_message


The basic steps of image processing is important that the idea of ​​how to get things of interest, operator flexibility in the use

Guess you like

Origin www.cnblogs.com/pythonzwd/p/12162546.html