Welcome: Hunan Intelligent Applications Tecgnology CO.,ltd.-HNIAT.com
Language: Chinese ∷  English

Basic knowledge

Halcon Learning Notes-Image Segmentation

First, the basic knowledge of image channel is not introduced.

2. Single-channel image segmentation

1 threshold segmentation

Global Threshold, Local Threshold Method, Histogram Automatic Threshold (Adaptive Threshold)

Specify global thresholds

Threshold (Image: Region: MinGray, MaxGray) // Setting threshold manually

The local threshold method is described later.

Histogram Automatic Threshold (Adaptive Threshold)

Auto_threshold (Image: Region: Sigma:)

// The automatic threshold input must be a single channel image, and there will be multi-threshold segmentation. Sigma is used to smooth the gray histogram, which determines the degree of smoothing (segmentation meticulousness). When Sigma is large, the gray histogram will be smoothed to only one peak, and the segmentation is based on the wave of the smoothed histogram. Valley to carry out, Sigma small, the more detailed segmentation.

Image

3. Segmentation of color images

Decompose 3

Trans_from_rgb (red, green, blue, result1, result2, result3, color type space)

Fourth, collate the commonly used functions to extract simple results

The region of interest (ROI) can be used to further narrow the definition area. This avoids processing irrelevant regions and reduces computation time.

1. Set up ROI by setting up ROI assistant in graphics window, then animating and inserting code by hand.

Gen_rectangle 1 (ROI_0,*****)

2, reduce_domain is used to intercept the drawn ROI

Reduce_domain (full image, ROI area, reduced image)

3. Usually after thresholds, try connection to select the connected area, and then use area and shape selection method to select the shape you care about.


Threshold ()

Connection (Region, Output Region)

Select_shape (input, output, Requirments....)

Fifth, other functions:


Crop_rectangle1 (Image: Image Part: Row1, Column1, Row2, Column2:)

// Cut out a rectangular area, Image: Input multi-channel picture, ImagePart: Output multi-channel picture


Originally from Burning_foot's blog

Author: Han Zhaoxin

Origin: http://hanzhaoxin.cnblogs.com/

Copyright of this article belongs to the author and the blog park. Reprint is welcome, but this statement must be retained without the author's consent, and the link of the original text should be given clearly on the article page, otherwise the right to pursue legal responsibility will be reserved.

CONTACT US

Contact: Manager Xu

Phone: 13907330718

Tel: 0731-22222718

Email: hniatcom@163.com

Add: Room 603, 6th Floor, Shifting Room, No. 2, Orbit Zhigu, No. 79 Liancheng Road, Shifeng District, Zhuzhou City, Hunan Province

Scan the qr codeClose
the qr code