Contour image extraction method based on Moore neighborhood tracing algorithm and Gabor filter

By combining the Moore neighborhood tracking algorithm and Gabor filter, setting the object number threshold, and using Kmeans clustering to filter the background, the problem of difficult contour extraction in complex backgrounds is solved, and efficient contour extraction is achieved in various scenarios.

CN115272704BActive Publication Date: 2025-09-16SOUTHEAST UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202210889506.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-07-27
Publication Date
2025-09-16
Estimated Expiration
2042-07-27

AI Technical Summary

Technical Problem

Existing technologies have difficulty in effectively extracting target contours in complex backgrounds, especially when the target is close to the background texture. The Moore neighborhood tracking algorithm and Gabor filter each have limitations, resulting in a decrease in the accuracy of contour extraction.

Method used

Combining the Moore's neighborhood tracking algorithm and Gabor filter, by setting the object number threshold N0, if the extraction effect is not good, the Gabor filter is used for further processing, and the Moore's neighborhood tracking algorithm is combined to extract fine contours. First, grayscale and binarization processing is performed, and Kmeans clustering is used to filter the background. Finally, the contour is output through the Moore's neighborhood tracking algorithm.

Benefits of technology

It improves the accuracy and applicability of contour extraction in a variety of scenarios, reduces the influence of ambient light and complex background, and is suitable for image processing where the target and background differ in feature dimensions such as color, light intensity, and texture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN115272704B_ABST
    Figure CN115272704B_ABST
Patent Text Reader

Abstract

The present invention discloses a contour image extraction method based on a Moore neighborhood tracing algorithm and a Gabor filter. The method solves the problems that the Moore neighborhood tracing algorithm has difficulty in contour extraction when the background texture is complex, while the Gabor filter has a low recognition rate when the main target and the background texture are close. The method is characterized by first using the Moore neighborhood tracing algorithm to extract the contour of the main target in the image, and then predicting the contour extraction effect based on the number of objects identified in the entire image. If the extraction effect is poor, the Gabor filter is first used to remove the complex background, and then the Moore neighborhood tracing algorithm is applied to extract the fine contour of the main target. The method is suitable for processing planar images in which the main target to be identified and the background differ in any characteristic dimension such as color, light intensity, texture, etc. Compared with existing methods, the method proposed by the present invention has good contour extraction effect, strong versatility, wide application range, and is not easily affected by ambient light and complex background.
Need to check novelty before this filing date? Find Prior Art

Claims

1. A contour image extraction method based on Moore neighborhood tracking algorithm and Gabor filter, characterized in that: It includes the following steps S1. Extract the boundary of the recognition object in the image through the Moore neighborhood tracking algorithm, and extract the number N of the recognized objects and the boundary B of the object; S2. Predict the boundary extraction effect through the number of recognition objects; Set a threshold N0 for the number N of the recognized objects, If N < N0, output the image boundary contour; If N > N0, it is considered that the boundary extraction effect is not ideal, and go to step S3 for further processing through the Gabor filter; S3. Segment the recognition object through the Gabor filter; In the step S3, it includes the following steps, Sb1. Preprocessing: Input the RGB image I0 and convert it into a grayscale image I1; Sb2. Set a group of Gabor filter arrays for extracting the Gabor features of the grayscale image I1; Sb3. According to the number M of different directions covered by the filter and the number L of wavelengths, K = M×L Gabor filters can be constructed; Applying the filter to the input image, the amplitude response GM of the filter can be obtained; Sb4. Post-process the extracted Gabor amplitude response GM and convert it into Gabor features so that the Gabor amplitude response can be used as a feature for classification; This step includes: Sb41. Smooth the amplitude response image GM with a Gaussian low-pass filter, obtain the x and y coordinates of each pixel on the original image, and concatenate them with the amplitude response features after smoothing to obtain a data set with spatial information and Gabor amplitude features; Sb42. Reconstruct and normalize this data set to obtain a matrix X that can be used for Kmeans classification; at this time, each pixel on the image has 2 spatial features and K Gabor features; In the step Sb42, the two-dimensional Gabor function can be expressed as: In the formula, x′ = x cosθ + y sinθ, y′ = -x sinθ + y cosθ; λ represents the wavelength of the cosine function, θ represents the direction of the Gabor function in degrees, ψ is the phase shift controlling the cosine function, γ is the spatial aspect ratio, and σ is the standard deviation of the Gaussian standard function; Sb5. Use the Kmeans mean clustering algorithm to divide the elements on the matrix X into 2 categories to obtain the classified label matrix X′, and set the values of the background area in the original image I0 to 0 according to the label data in the matrix X′ to filter out the background, and the remaining part is the image of the recognition object, generating a new image NI; S4. Perform graying and binarization processing on the new image NI, and extract the boundary of the recognition object in the image through the Moore neighborhood tracking algorithm, and output the image boundary contour.

2. The contour image extraction method based on Moore neighborhood tracing algorithm and Gabor filter according to claim 1, characterized in that: In the step S1, it includes the following steps, Sa1. Read the target image file and convert the original RGB image I0 into a grayscale image I1; Sa2. Convert the grayscale image I1 into a binary image BW through threshold segmentation.

3. The contour image extraction method based on Moore neighborhood tracing algorithm and Gabor filter according to claim 2, characterized in that: In the step S1, step Sa3 is also included, which includes using the Moore neighborhood tracking algorithm to calculate the region boundary in the image BW; the Moore neighborhood tracking algorithm finds the first boundary pixel of the image by scanning the image, and uses this pixel as the starting pixel to identify and track all boundary pixels on the binary image, and stops when the second entry into the starting point is in the same direction as the first entry; and extracts the number N of recognized objects and the boundary B of the object.

Citation Information

Patent Citations

  • Vehicle identification method based on Gabor feature extraction and sparse representation

    CN104091151A

  • System for automatically recognizing purity of Tibetan mastiff puppy

    CN104318267A