A method for extracting the edge of a person's target image based on genetic characteristics

By combining genetic characteristics and fuzzy clustering methods, a new genetic mechanism is constructed, which solves the problems of noise sensitivity and low clustering accuracy of traditional edge image extraction methods in high-resolution images, and achieves higher edge image extraction accuracy and noise resistance.

CN117197484BActive Publication Date: 2026-01-06SICHUAN JIUZHOU ELECTRIC GROUP CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202311180391.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2023-09-13
Publication Date
2026-01-06
Estimated Expiration
2043-09-13

AI Technical Summary

Technical Problem

Existing technologies struggle to effectively address edge extraction methods in noisy environments, as edge detection methods are sensitive to noise. Furthermore, traditional methods are prone to losing detailed edge features in high-resolution images, exhibiting low clustering accuracy and severe premature convergence.

Method used

Combining genetic characteristics and fuzzy clustering methods, this paper constructs a method for extracting the edge of a human target image based on genetic characteristics. The method includes the following steps: Step 1: establishing an image matrix; Step 2: performing fuzzy clustering using genetic characteristics; Step 3: resetting the grayscale values ​​of pixels; and Step 4: performing edge extraction.

Benefits of technology

It improves the accuracy and noise resistance of edge image extraction, solves the problems of image detail loss and low clustering accuracy in traditional methods, and achieves higher clustering accuracy and noise resistance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117197484B_ABST
    Figure CN117197484B_ABST
Patent Text Reader

Abstract

The application discloses a kind of based on genetic character figure target edge image extraction method, it is related to image processing field.Data model of the figure target image to be handled is established, image is converted into figure target image matrix, and the grey value of each pixel point of image corresponds the element value in the corresponding position in matrix;Using the fuzzy clustering method with genetic characteristics to each pixel point in figure target image matrix is clustered, and the marking matrix for marking each pixel point belongs to class is generated;Using the corresponding relationship between marking matrix and figure target image matrix, the grey value of all pixel points in the same class is reset as the average grey value of the class, and the figure target clustering diagram is formed;Using 8 neighborhood method, the edge of figure target clustering diagram is extracted, and the figure target edge image is formed.The application not only makes clustering result more approximate real division, improves target clustering accuracy and noise immunity.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of image processing technology, and more specifically to a method for extracting the edge of a person's target image based on genetic characteristics. Background Technology

[0002] Edge images are images obtained by extracting edges from the original image. Edge image extraction is indispensable in image description and classification. It segments an image into several independent, non-overlapping regions, ensuring that no two adjacent regions are identical. Due to the diversity and complexity of images, edge image extraction is quite challenging. Factors such as image sensitivity, contrast, and noise all affect the extraction process. Currently, several extraction methods exist, including thresholding, template matching, region growing, and edge detection. These methods show good extraction results on certain types of images, but they are sensitive to noise and do not consider pixel location information. Designing a more reasonable, accurate, and noise-reducing edge image extraction method is one of the important directions in the field of intelligent image processing computing.

[0003] Threshold-based methods have yet to find a reasonable approach for threshold selection. These methods are highly sensitive to noise and do not consider pixel location information. Template matching methods are computationally intensive and unsuitable for processing large images. Edge detection methods detect edges based on differences in image features, but noise is often mistaken for image edges, meaning edge detection methods lack good noise resistance.

[0004] Traditional edge image extraction methods suffer from poor accuracy and noise resistance, specifically due to the following shortcomings: First, as imaging device resolution continues to improve, traditional methods lose detailed edge characteristics and important image information. Second, fixed clusterers rigidly divide samples, assigning each sample to only one specific class (cluster), while samples at the edge of a class (cluster) often exhibit the possibility of belonging to multiple classes (clusters), leading to low clustering accuracy. Third, traditional fuzzy clustering methods exhibit premature convergence when the number of samples, dimensionality, and number of classes is large, meaning they converge to local optima too early. The larger the clustering problem, the more prone premature convergence becomes. Summary of the Invention

[0005] The purpose of this invention is to overcome the shortcomings of the prior art and provide a method for extracting the edge of a person's target image based on genetic characteristics. This method combines genetic characteristics with fuzzy clustering methods, proposes a new genetic evolution process, and constructs a fuzzy clustering method based on the new genetic mechanism to improve the accuracy and noise resistance of target clustering.

[0006] The objective of this invention is achieved through the following technical solution:

[0007] A method for extracting the edge of a person's target image based on genetic characteristics includes the following steps:

[0008] Step 1: Establish a data model for the target image of the person to be processed, and convert the image into a target image matrix of the person. The gray value of each pixel in the image corresponds to the element value at the corresponding position in the matrix.

[0009] Step 2: Use a fuzzy clustering method with genetic properties to cluster each pixel in the target image matrix to generate a label matrix for labeling the class to which each pixel belongs;

[0010] Step 3: Using the correspondence between the label matrix and the target image matrix, reset the gray values ​​of all pixels in the same class to the average gray value of that class to form a target image cluster map.

[0011] Step 4: Use the 8-neighborhood method to extract edges from the human target cluster map to form the human target edge image.

[0012] Furthermore, the process of step 1 is as follows:

[0013] Step 11: Read the original image resolution size attribute and generate the corresponding empty matrix;

[0014] Step 12: Use Gaussian convolution filtering to denoise the original human target image and eliminate noise points;

[0015] Step 13: Process the empty matrix by traversing the original target images of people and setting the element values ​​corresponding to the empty matrix to the pixel grayscale values ​​of the original target images of people, thereby generating a matrix of target images of people for clustering.

[0016] Furthermore, the process of step 2 is as follows:

[0017] Step 21: Perform clustering processing on each pixel in the target image matrix and initialize the probability of each pixel belonging to the target class using a random probability method;

[0018] Step 22: Calculate the suitability value for each pixel;

[0019] Step 23: Sort the suitability values ​​in ascending order;

[0020] Step 24: Select the parent element to be crossed;

[0021] Step 25: Obtain the crossover individuals;

[0022] Step 26: Calculate the fitness value after crossover;

[0023] Step 27: Sort the fitness values ​​after crossover. The individual with the smallest fitness value is the optimal individual, and this individual will not participate in the subsequent mutation calculation.

[0024] Step 28: Perform mutation evolution calculations on the individuals that need to participate in the mutation calculation;

[0025] Step 29: Calculate the sum of fitness values ​​for all individuals after mutation and evolution. This value is used to measure the quality of individual evolution in each round of evolution.

[0026] Furthermore, steps 21 to 29 are repeated during one round of evolution. As the degree of evolution continues to advance, the fitness values ​​of all individuals show a decreasing trend until they tend to stabilize, thus finding the optimal clustering of pixels in the target image of the person.

[0027] Furthermore, in step 21, the specific steps for clustering each pixel in the target image matrix are as follows:

[0028] Step 211, for all pixels in the neighborhood p(i,j) Calculate the grayscale difference component with the neighborhood of this pixel. N The initial value is 0. If the difference is greater than a certain threshold... T ,but N=N+ 1, until each pixel obtains a N value;

[0029] Step 212, using grayscale values, gradients, N As features of pixels in a person's target image, construct a feature vector. V ;

[0030] Step 213, using Calculate two eigenvectors V i ,V j The similarity, of which V ik Represents the i-th vector. k dimensional components, S ( V i ,V j The smaller the value, the more... V i ,V j The more similar they are.

[0031] Furthermore, in step 22, the suitability value of each pixel is calculated using the Euclidean distance calculation method in multidimensional space. :

[0032]

[0033] in u ji Indicates the first j The sample belongs to the first i The probability of a cluster. m Represents the fuzzy factor. n Indicates the number of samples. x j Indicates the first j A sample vector, z i Represents the first in an individual i The center point vector of each cluster.

[0034] Furthermore, the first of the individuals mentioned i The center point of each cluster z i The vector calculation method is as follows:

[0035]

[0036] in u ji Indicates the first j The sample belongs to the first i The probability of a cluster. m Represents the fuzzy factor. n Indicates the number of samples. x j Indicates the first j A sample vector.

[0037] Furthermore, in step 24, a random intersection point of [1,L] is generated using the single-point intersection method as a new individual sample, where L is the length of the individual.

[0038] Furthermore, in step 28, the distance from the nearest center point to the mutation point sample to each cluster center point is calculated using the mutation method. Finally, the membership probability of the sample is changed to increase the membership probability to the nearest cluster and decrease the membership probability to other clusters.

[0039] Furthermore, the process in step 4 is as follows:

[0040] Step 41: Set the grayscale value of pixels within the same cluster: In the pixel clustering results, pixel clustering based on grayscale value is completed, and pixels with similar grayscale values ​​are divided into one class. The grayscale values ​​of pixels in the same class are reset to the grayscale mean of that class and rounded down.

[0041] Step 42: Image edge point determination: Traverse all pixels and select the pixel. p(i,j) Calculate the pixel point in the 8-neighborhood. p (i,j) The number of pixels with different gray values ​​in its 8-neighborhood is considered an image edge point. When the number of pixels with different gray values ​​is greater than 6, the pixel is considered an image edge point.

[0042] The beneficial effects of this invention are:

[0043] 1) Taking advantage of the high randomness of genetic characteristics and the ability to search a wider space, a fuzzy clustering method based on random mutation and crossover is proposed. This solves the problem that the iterative method cannot perform a wide search in the entire solution space, which leads to the solution found being too different from the global optimal solution, thus affecting the final clustering effect.

[0044] 2) By selecting grayscale, gradient, and neighborhood grayscale difference features as feature vectors for pixels in the target image of a person, the problem of difficulty in selecting features of different dimensions is solved.

[0045] 3) The problem of determining edge points is solved by calculating the number of pixels with different gray values ​​in the 8-neighborhood of each pixel after clustering. Attached Figure Description

[0046] Figure 1 This is a schematic diagram of the process for generating the marker matrix in step 2 of the present invention;

[0047] Figure 2 To verify the actual distribution of the three classes (clusters) in the IRIS dataset;

[0048] Figure 3 This is a graph showing the clustering results of the method of the present invention on the validation dataset;

[0049] Figure 4 This is a graph showing the clustering results of the FCM algorithm on the validation dataset;

[0050] Figure 5 This is a diagram illustrating the evolutionary process of the method of the present invention on a validation dataset;

[0051] Figure 6 This is a comparison chart of the clustering performance of the present invention and the FCM algorithm on the validation dataset;

[0052] Figure 7 The original image of the target person is shown for comparison of the effects of this invention and the FCM algorithm.

[0053] Figure 8 The generated image of the human target edge for this invention;

[0054] Figure 9 The edge image of the person target generated by the FCM algorithm;

[0055] Figure 10 This is the clustering effect of the method of the present invention on noisy images. Detailed Implementation

[0056] The technical solution of the present invention will be clearly and completely described below with reference to the embodiments. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0057] See Figures 1-10 The present invention provides a technical solution:

[0058] A method for extracting the edge of a person's target image based on genetic characteristics includes the following steps:

[0059] Step 1: Establish a data model for the target image of the person to be processed, and convert the image into a target image matrix of the person. The gray value of each pixel in the image corresponds to the element value at the corresponding position in the matrix.

[0060] Step 2: Use a fuzzy clustering method with genetic properties to cluster each pixel in the target image matrix to generate a label matrix to identify the class (cluster) to which each pixel belongs;

[0061] Step 3: Using the correspondence between the label matrix and the target image matrix, reset the gray values ​​of all pixels in the same class (cluster) to the average gray value of that class (cluster) to form a target image cluster map.

[0062] Step 4: Use the 8-neighborhood method to extract edges from the human target cluster map to form the human target edge image.

[0063] The process of step 1 is as follows:

[0064] Step 11: Read the original image resolution size attribute and generate the corresponding empty matrix;

[0065] Step 12: Use Gaussian convolution filtering to denoise the original human target image and eliminate noise points;

[0066] Step 13: Process the empty matrix by traversing the original target images of people and setting the element values ​​corresponding to the empty matrix to the pixel grayscale values ​​of the original target images of people, thereby generating a matrix of target images of people for clustering.

[0067] In this embodiment, the original format of the target image of the person is .jpg. The pixel attribute values ​​of the original image are read as M*N, where M represents the number of rows and N represents the number of columns. An M*N Zero matrix is ​​generated. Starting from the first pixel of the original object, all pixels are traversed, and the gray value of each pixel is filled into the corresponding position of the Zero matrix.

[0068] like Figure 1 As shown, the process of step 2 is as follows:

[0069] Step 21: Perform clustering processing on each pixel in the target image matrix and initialize the probability of each pixel belonging to the target class using a random probability method;

[0070] Step 22: Calculate the suitability value for each pixel;

[0071] Step 23: Sort the suitability values ​​in ascending order;

[0072] Step 24: Select the parent element to be crossed;

[0073] Step 25: Obtain the crossover individuals;

[0074] Step 26: Calculate the fitness value after crossover;

[0075] Step 27: Sort the fitness values ​​after crossover. The individual with the smallest fitness value is the optimal individual, and this individual will not participate in the subsequent mutation calculation.

[0076] Step 28: Perform mutation evolution calculations on the individuals that need to participate in the mutation calculation;

[0077] Step 29: Calculate the sum of fitness values ​​for all individuals after mutation and evolution. This value is used to measure the quality of individual evolution in each round of evolution.

[0078] Furthermore, steps 21 to 29 are repeated during one round of evolution. As the degree of evolution continues to advance, the fitness values ​​of all individuals show a decreasing trend until they tend to stabilize, thus finding the optimal clustering of pixels in the target image of the person.

[0079] In step 21 of this embodiment, the specific steps for clustering each pixel in the target image matrix are as follows:

[0080] Step 211, for all pixels in the neighborhood p(i,j) Calculate the grayscale difference component with the neighborhood of this pixel. N The initial value is 0. If the difference is greater than a certain threshold... T ,but N=N+ 1, until each pixel obtains a N Value; threshold T The values ​​differ depending on the type of image, for example, a smooth image. T The value is small, however, for clear images T The value varies considerably. N This indicates the number of similar pixels in the neighborhood. In this embodiment, it roughly includes background target pixels.N Set to 8, edge pixels N Compared to noise pixels N big.

[0081] Step 212, using grayscale values, gradients, N As features of pixels in a person's target image, construct a feature vector. V ;

[0082] Step 213, using Calculate two eigenvectors V i ,V j The similarity, of which V ik Represents the i-th vector. k dimensional components, S ( V i ,V j The smaller the value, the more... V i ,V j The more similar they are.

[0083] In this embodiment, in step 22, the suitability value (value function value) of each pixel is calculated using the Euclidean distance calculation method in multidimensional space. :

[0084]

[0085] in u ji Indicates the first j The sample belongs to the first i The probability of a cluster. m Represents the fuzzy factor. n Indicates the number of samples. x j Indicates the first j A sample vector, z i Represents the first in an individual i The center point vector of each cluster z i The calculation method is as follows:

[0086] in u ji Indicates the first j The sample belongs to the first i The probability of a cluster. m Represents the fuzzy factor. n Indicates the number of samples. x j Indicates the firstj A sample vector.

[0087] Figure 5 The diagram illustrates the evolutionary process of the method of this invention on a validation dataset. As the number of iterations increases, the value function value (fitness value) gradually decreases. After about 150 iterations, the value function value tends to stabilize, indicating that the optimal clustering partition has been obtained.

[0088] In step 24, a random crosspoint (CrossPoint) in the range [1, L] is generated as a new individual sample using the single-point crossover method, where L is the length of the individual. The crossover process involves combining the left side of one parent's crosspoint with the right side of another parent's crosspoint to form a new individual, thus generating two new individuals. Pairing all parents together will produce a number of new individuals equal to the number of parents. Therefore, the number of parents plus the number of new individuals equals the total number of individuals before selection. This achieves the goal of maintaining a constant total number of individuals.

[0089] In step 28, the nearest centroid distance mutation method is used to calculate the distance from the mutated sample to the centroid of each cluster. Finally, the membership probability of the sample is changed to increase the probability of membership to the nearest cluster and decrease the probability of membership to other clusters. When an individual in the population is selected for mutation, a random point (MutatePoint) in [1,L] is generated, similar to the crossover process. This point is called the mutation point.

[0090] In this embodiment, the process in step 4 is as follows:

[0091] Step 41: Set the grayscale value of pixels within the same cluster: In the pixel clustering results, pixel clustering based on grayscale value is completed, and pixels with similar grayscale values ​​are divided into one class. The grayscale values ​​of pixels in the same class are reset to the grayscale mean of that class and rounded down.

[0092] Step 42: Image edge point determination: Traverse all pixels and select the pixel. p(i,j) Calculate the pixel point in the 8-neighborhood. p(i,j) The number of pixels with different gray values ​​in its 8-neighborhood is considered an image edge point. When the number of pixels with different gray values ​​is greater than 6, the pixel is considered an image edge point.

[0093] To compare the method of this invention with the traditional fuzzy C-means clustering (FCM) algorithm, the following clustering and edge image generation experiments were conducted on the validation dataset IRIS:

[0094] Figure 2 The actual distribution of the three classes (clusters) in the validation dataset IRIS is shown. Figure 3 and Figure 4The figures show the clustering results of the method of this invention and the FCM algorithm on the validation dataset, respectively. It can be seen that the clustering results of the method of this invention are closer to the actual distribution.

[0095] Figure 6 The graph shows a comparison of the clustering performance of the present invention and the FCM algorithm on the validation dataset. The experimental results show that the difference in Ground Truth between the present invention and the dataset is smaller in different numbers of experiments.

[0096] Figure 7 The original image of the target person is shown for comparison of the effects of this invention and the FCM algorithm. Figure 8 and Figure 9 The images show the target edge images of a person generated by the present invention and the FCM algorithm, respectively. It is easy to see that the edge image of the person generated by the present invention has richer details and better edge extraction results.

[0097] To verify the noise resistance performance of the method of the present invention, salt-and-pepper noise with a signal-to-noise ratio (SNR) of 17.2 was added to the original image of the person target. Figure 10 This is the clustering effect of the method of the present invention on noisy images.

[0098] The above description is merely a preferred embodiment of the present invention. It should be understood that the present invention is not limited to the forms disclosed herein and should not be construed as excluding other embodiments. It can be used in various other combinations, modifications, and environments, and can be altered within the scope of the concept described herein through the above teachings or related technologies or knowledge. Modifications and variations made by those skilled in the art that do not depart from the spirit and scope of the present invention should be within the protection scope of the appended claims.

Claims

1. A method for extracting an edge image of a character target based on genetic characteristics, characterized in that: It comprises the following steps: Step 1: establishing a data model of the target image of the person to be processed, converting the image into a target image matrix of the person, and the gray value of each pixel point of the image corresponding to the element value at the corresponding position in the matrix; Step 2: using a fuzzy clustering method with genetic characteristics to perform clustering processing on each pixel point in the target image matrix of the person, and generating a marking matrix for marking the class to which each pixel point belongs; Step 3: using the correspondence between the marking matrix and the target image matrix of the person, resetting the gray values of all pixel points in the same class to the average gray value of the class, and forming a target clustering image of the person; Step 4: using an 8-neighbor method, performing edge extraction on the target clustering image of the person, and forming an edge image of the target image of the person; The process of step 2 is as follows: Step 21: performing clustering processing on each pixel point in the target image matrix of the person, and initializing the probability of each pixel point belonging to the target class by using a random probability method; Step 22: calculating the fitness value of each pixel point; Step 23: sorting the fitness values in ascending order; Step 24: selecting the parent to be crossed; Step 25: obtaining the individual after crossing; Step 26: calculating the fitness value after crossing; Step 27: sorting the fitness values after crossing, and the individual with the smallest fitness value is the optimal individual, which does not participate in the subsequent mutation calculation; Step 28: performing mutation evolution calculation on the individual that needs to participate in the mutation calculation; Step 29: calculating the sum of the fitness values of all individuals after mutation evolution, which is used as a measure of the goodness of the evolution of the individual in each round of evolution; In step 21, the specific steps of clustering processing on each pixel point in the target image matrix of the person are as follows: Step 211, for all pixel points in the neighborhood p(i,j) , calculate the difference component of the neighborhood gray value of the pixel point N , the initial value is 0, if the difference value is greater than a certain threshold T , then N=N+ 1, until each pixel point obtains a N value; Step 212, using the gray value, gradient, N As the feature of the pixel point of the character target image, the feature vector is constructed V ; Step 213, employing computing the similarity of two feature vectors V i , V j where V ik represents the i-th vector's i-th k dimensional component, S V i ,V j the smaller the value the more similar V i , V j the vectors are.​ The step 22 calculates the fitness value of each pixel point by using the Euclidean distance calculation method of multi-dimensional space J m : wherein u ji denotes the probability that the j i m n x j denotes the j z i denotes the center point vector of the i i i i i i i i i i i i i i i i i i i i i i i i i i i i i i <000 The center point of the cluster in the individual i z i The vector calculation method is as follows:​ wherein u ji denotes the probability that the j th sample belongs to the i th cluster, m denotes the fuzziness factor, n denotes the number of samples, x j denotes the j th sample vector.

2. The method of claim 1, wherein the method is based on genetic characteristics. The process of step 1 is as follows: Step 11: reading the resolution size attribute of the original image, and generating a corresponding empty matrix; Step 12: using a Gaussian convolution filter method to perform noise reduction processing on the original target image of the person, and eliminating noise points; Step 13: processing the empty matrix, traversing the original target image of the person, setting the element value corresponding to the empty matrix to the pixel gray value of the original target image of the person, and generating a target image matrix of the person for clustering.

3. The method of claim 1, wherein the method is based on genetic characteristics. Steps 21 to 29 are repeated in one round of evolution, and with the continuous advancement of the evolution degree, the sum of the fitness values of all individuals presents a decreasing trend until it tends to be stable, and the optimal clustering division of the pixel points in the target image of the person is found.

4. The method according to claim 3, wherein the method is characterized by: In step 24, a random crossover point of [1, L] is generated as a new individual sample by using a single-point crossover method, and L is the length of the individual.

5. The method of claim 3, wherein the method is based on genetic characteristics. In step 28, the distance of the mutation point sample to each cluster center point is calculated by using the nearest center point distance mutation method, and finally the membership probability of the sample is changed to increase the membership probability to the nearest cluster and decrease the membership probability to other clusters.

6. The method of claim 1, wherein the method is based on genetic characteristics. The process in step 4 is as follows: Step 41: setting the gray value of the pixel points in the same cluster: in the pixel point clustering result, the pixel point clustering based on the gray value is completed, the pixel points with similar gray values are divided into a class, and the gray value of the pixel points in the same class is reset to the gray mean value of the class and is rounded off; Step 42: image edge point determination: traverse all pixel points, take the 8-neighborhood of the pixel point p ( i,j ), calculate the number of pixel points p ( i, j ) whose gray scale values are not equal to those in its 8-neighborhood, when the number of pixel points whose gray scale values are not equal is greater than 6, the pixel point is an image edge point.

Citation Information

Patent Citations

  • Face recognition from video images

    AU2004212509A1

  • Map element extraction method and apparatus, and server

    US20210035314A1