Segmentation Method of Color Card Images Based on Peak Detection and DBSCAN Clustering

Through the image processing method based on peak detection and DBSCAN clustering, the paper-type color card images are segmented, which solves the problems of low segmentation efficiency and poor accuracy in the prior art, and realizes efficient and accurate color card image segmentation.

CN119399215BActive Publication Date: 2025-06-10JINGDEZHEN CERAMIC UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202411497890.1
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-10-25
Publication Date
2025-06-10
Estimated Expiration
2044-10-25

AI Technical Summary

Technical Problem

The prior art is difficult to efficiently and accurately divide the paper-type color card image into several color card block images, resulting in low efficiency and poor accuracy in the process of digitizing the color card.

Method used

The image processing method based on peak detection and DBSCAN clustering is adopted, and the color card image is segmented through Gaussian fuzzy preprocessing, eigenvalue peak detection and DBSCAN clustering technology. Specific steps include image enhancement, Gaussian blur processing, sliding window convolution calculation, boundary recognition and clustering screening.

Benefits of technology

It realizes efficient and precise segmentation of paper-type color card images, improves segmentation efficiency and accuracy, and can be suitable for color card images of different sizes, shapes and arrangements.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119399215B_ABST
    Figure CN119399215B_ABST
Patent Text Reader

Abstract

The present invention proposes a method for segmenting color card images based on peak detection and DBSCAN clustering, including: performing image enhancement on the layout color card image to obtain the enhanced layout color card image; using the Gaussian blur method to smooth the enhanced layout color card image to obtain the image eigenvalue after Gaussian blur; performing convolution calculation on the image eigenvalue after Gaussian blur along the vertical direction to obtain the column eigenvalue of the image, and performing column segmentation on the image based on the column eigenvalue; performing convolution calculation on the image eigenvalue after Gaussian blur along the horizontal direction to obtain the row eigenvalue of the image, and performing row segmentation on the image based on the row eigenvalue; screening the color card small pieces obtained by column segmentation and row segmentation by using the density-based spatial clustering algorithm with noise to obtain all the correct color card blocks. The present invention has wide applicability and flexibility, and can meet the color card image segmentation requirements in different fields and scenarios.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to an image processing method, and particularly to a method for segmenting a color card image based on peak detection and DBSCAN clustering. Background Art

[0002] In the current environment of globalization, informatization, and digitalization in the manufacturing industry, the leather, fur, feather, and their products and footwear industries, as important components of traditional industries, are facing a huge demand for digital transformation. This large market scale indicates a huge demand for innovative technologies in the industry.

[0003] In this context, with the rapid development of computer technology, automated image processing technology based on computer vision has brought new opportunities for color card digitization. Digitalizing physical color card images has had a profound impact on the management, design, production, and sustainable development of color card materials. The digitalization process of color cards enables each piece of color card material to be accurately recorded, classified, and tracked, greatly improving the accuracy and efficiency of color card material inventory management and providing reliable data support for production planning and material procurement; based on color card digitalization, diverse design schemes for various application products can also be quickly generated by screening and combining a large number of color card material samples, reducing the cost problems caused by repeated modifications due to mismatched color card materials and greatly enhancing the design efficiency and innovation ability of various products in this industry; color card digitalization can also help users save time and reduce costs during the process of material searching, selection, and comparison through precise color card image retrieval technology. Therefore, how to segment the current paper-based color card styles and convert them into several color card block images is a key link in color card digitization. Summary of the Invention

[0004] In view of the above situation, the main purpose of the present invention is to propose a method for segmenting a color card image based on peak detection and DBSCAN clustering to solve the above technical problems.

[0005] The present invention proposes a method for segmenting a color card image based on peak detection and DBSCAN clustering, and the method includes the following steps:

[0006] Step 1: Perform image enhancement on the layout color card image to obtain an enhanced layout color card image;

[0007] Step 2: Smooth the enhanced layout color card image using the Gaussian blur method to obtain the image eigenvalue after Gaussian blur;

[0008] Step 3: Along the vertical direction, use a sliding window method to perform convolution calculation on the image eigenvalue after Gaussian blur in the window to obtain the column eigenvalue of the image;

[0009] Obtain the maximum value of each local column feature and the two adjacent local minimum values of each local column feature based on the column feature values of the image;

[0010] Based on the maximum value of each local column feature and the two adjacent local minimum values of each local column feature, identify the boundaries of the columns of the layout color card image through significance discrimination, and perform column segmentation on the layout color card image;

[0011] Step 4: Horizontally, adopt the sliding window method to perform convolution calculation on the image feature values in the window after Gaussian blur to obtain the row feature values of the image;

[0012] Obtain the maximum value of each local row feature and the two adjacent local minimum values of each local row feature based on the row feature values of the image;

[0013] Based on the maximum value of each local row feature and the two adjacent local minimum values of each local row feature, identify the boundaries of the rows of the layout color card image through significance discrimination, and perform row segmentation on the layout color card image;

[0014] Step 5: Screen the color card small pieces obtained through column segmentation and row segmentation using the density-based spatial clustering of applications with noise (DBSCAN) algorithm to obtain all the correct color card blocks.

[0015] Compared with the prior art, the beneficial effects of the present invention are as follows:

[0016] 1. By combining Gaussian blur preprocessing, eigenvalue peak detection, and DBSCAN clustering technology, the present invention realizes efficient and accurate segmentation of paper layout color card images. Compared with traditional manual cutting, the present invention has a very high accuracy and greatly improves the efficiency;

[0017] 2. The image processing method of the present invention is not only applicable to standard paper layout color cards, but also can process color card images with different sizes, shapes, and arrangements. Through size normalization processing, the system can automatically adjust the size of the input image to meet different processing requirements. The image processing method of the present invention has wide applicability and flexibility, and can meet the color card image segmentation needs in different fields and scenarios.

[0018] The additional aspects and advantages of the present invention will be partially given in the following description, partially will become obvious from the following description, or be understood through the embodiments of the present invention. Description of the Drawings

[0019] Figure 1 It is a flowchart of the segmentation method of the color card image based on peak detection and DBSCAN clustering proposed by the present invention. Detailed Embodiments

[0020] Embodiments of the present invention will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below by referring to the accompanying drawings are exemplary and are only used to explain the present invention and should not be construed as a limitation of the present invention.

[0021] Referring to the following description and the accompanying drawings, these and other aspects of the embodiments of the present invention will be clear. In these descriptions and drawings, some specific embodiments of the embodiments of the present invention are specifically disclosed to represent some ways of implementing the principles of the embodiments of the present invention. However, it should be understood that the scope of the embodiments of the present invention is not limited thereto.

[0022] Please refer to Figure 1 , an embodiment of the present invention proposes a method for segmenting a color card image based on peak detection and DBSCAN clustering, and the method includes the following steps:

[0023] Step 1: Perform image enhancement on the layout color card image to obtain an enhanced layout color card image;

[0024] In Step 1, perform image enhancement on the layout color card image to obtain an enhanced layout color card image, and the specific steps are as follows:

[0025] Convert the paper layout color card style into a layout color card image through an image acquisition device;

[0026] Perform resolution normalization processing on the acquired layout color card image;

[0027] Furthermore, the constructed layout color card image has a 24-bit color depth, including but not limited to the image being in JPG format, including but not limited to a resolution of 3500*5000 pixels. The present invention automatically converts the acquired layout color card image into an image with a resolution of 3000*4500 pixels, and this standard ensures that the layout color card image can contain sufficient feature details.

[0028] Step 2: Perform smoothing processing on the enhanced layout color card image using the Gaussian blur method to obtain the image eigenvalue after Gaussian blur;

[0029] In Step 2, perform smoothing processing on the enhanced layout color card image using the Gaussian blur method to obtain the image eigenvalue after Gaussian blur. Among them, the weight of the Gaussian function is calculated using the position of the pixel points in the enhanced layout color card image, and the existing relational formula for the corresponding process is:

[0030] ;

[0031] Among them, represents the weight of the Gaussian function, Indicates the result of calculating through the natural exponential function, represents pi, represents the standard variance of the normal distribution, represents the horizontal position of the pixel point, represents the vertical position of the pixel point;

[0032] The enhanced layout color card image is smoothed by the Gaussian blur method to obtain the image eigenvalue after Gaussian blur. Among them, the image eigenvalue after Gaussian blur is calculated using the weight of the Gaussian function, and the corresponding relationship in the process is:

[0033] ;

[0034] Among them, represents the image eigenvalue after Gaussian blur, represents the image eigenvalue without processing, represents the three channels of the color image, represents the radius of the Gaussian kernel, represents the weight of the Gaussian kernel at the position of the layout color card image ; represents the horizontal offset, represents the vertical offset.

[0035] Furthermore, the present invention performs Gaussian blur smoothing processing on the enhanced layout color card image. Due to the complex information such as the color, pattern, size, and texture of the color card, in order to reduce its impact on boundary recognition, the present invention uses Gaussian blur to reduce noise.

[0036] Step 3: Along the vertical direction, in the form of a sliding window, perform convolution calculation on the image eigenvalue after Gaussian blur in the window to obtain the column eigenvalue of the image;

[0037] Based on the column eigenvalue of the image, obtain the maximum value of each local column feature and the two adjacent local minimum values of each local column feature;

[0038] Based on the maximum value of each local column feature and the two adjacent local minimum values of each local column feature, identify the boundary of the layout color card image column through significance discrimination, and perform column segmentation on the layout color card image.

[0039] In step 3, along the vertical direction, in the form of a sliding window, perform convolution calculation on the image eigenvalue after Gaussian blur in the window to obtain the column eigenvalue of the image, and the corresponding relationship in the process is:

[0040] ;

[0041] Among them, Represents the column eigenvalue of the image, Represents the width of the pooled layout color card image, Represents the length of the pooled layout color card image, Represents the weight of the sliding window;

[0042] Furthermore, use a 1*3 matrix: Perform convolution calculation with the enhanced layout color card image:

[0043] First, perform a sliding window operation on the three channels (red channel, green channel, and blue channel) of the enhanced layout color card image respectively. This operation slides step by step with a step size of 1 in the vertical direction (from top to bottom) and the horizontal direction (from left to right), and calculates the pixel values of each channel within the window according to the above formula.

[0044] Secondly, perform absolute value accumulation on the pixel values at the corresponding positions of the three calculated channels to obtain a two-dimensional array of size W*H, and the array elements are the accumulated eigenvalue at the corresponding position.

[0045] Thirdly, accumulate the column eigenvalues of the obtained two-dimensional array to generate a one-dimensional array of the column features of the layout color card image with a length of W. Finally, calculate respectively on the one-dimensional image column feature array: the local maximum value, denoted as , where L_peak is the column where the local maximum value is located, and the two local minimum values adjacent to the local maximum value, denoted as Lmax , the prominence of the eigenvalue:

[0046] .

[0047] If the column with a significance greater than the preset value is the segmentation boundary of the layout color card image column.

[0048] Step 4. Along the horizontal direction, adopt the method of sliding window to perform convolution calculation on the image eigenvalue after Gaussian blur in the window to obtain the row eigenvalue of the image;

[0049] Obtain the maximum value of each local row feature and the two adjacent local minimum values of each local row feature based on the row eigenvalue of the image;

[0050] Based on the maximum value of each local row feature and the two adjacent local minimum values of each local row feature, identify the boundary of the layout color card image row through significance discrimination, and perform row segmentation on the layout color card image;

[0051] In step 4, in the horizontal direction, a sliding window method is adopted to perform convolution calculation on the image eigenvalue after Gaussian blur in the window to obtain the row eigenvalue of the image. The relational expression existing in the corresponding process is:

[0052] ;

[0053] Among them, represents the width of the layout color card column image after column segmentation, represents the row feature of the image, represents the weight of the sliding window;

[0054] Furthermore, use a 2*1 matrix: to calculate with the original image, select the step size of the sliding window to be 1, and the padding to be 0.

[0055] First, perform sliding window operations on the three channels (red channel, green channel, and blue channel) of the enhanced layout color card image respectively. This operation slides step by step with a step size of 1 in the horizontal direction (from left to right) and the vertical direction (from top to bottom), and calculates the pixel values of each channel within the window according to the above formula.

[0056] Secondly, perform absolute value accumulation on the pixel values at the corresponding positions of the three calculated channels to obtain a two-dimensional array of size VW*H, and the array elements are the accumulated eigenvalues at the corresponding positions.

[0057] Thirdly, accumulate the eigenvalues of the obtained two-dimensional array by row to generate a one-dimensional array of the row features of the color card column image with a length of H. Finally, calculate on the one-dimensional image column feature array respectively: the local maximum value, denoted as , where L_peak is the row where the local maximum value is located, and the two local minimum values adjacent to the local maximum value, denoted as Lmix , the prominence of the eigenvalue:

[0058] .

[0059] If the significance is greater than the preset value, the column is the segmentation boundary of the row of the layout color card column image.

[0060] Step 5: Screen the color card small pieces obtained through column segmentation and row segmentation by using the density-based spatial clustering algorithm with noise to obtain all the correct color card blocks;

[0061] In step 5, screen the color card small pieces obtained through column segmentation and row segmentation by using the density-based spatial clustering algorithm with noise to obtain all the correct color card blocks. Among them, the density-based spatial clustering algorithm with noise includes two parameters: the neighborhood radius and the minimum number of points. The definition formula for the neighborhood radius is:

[0062] ;

[0063] Among them, represents the set of all color card blocks, and both represent small color card pieces, represents the absolute value of the area difference between two small color card pieces, represents the domain radius, represents the set of domain midpoints centered on ; represents 's area, represents 's area;

[0064] The defining formula for the minimum number of points is:

[0065] ;

[0066] Among them, represents the minimum number of points, represents the number of points contained within the domain centered on ;

[0067] Furthermore, in the present invention, takes the value of 1000, takes the value of 10, which means that as long as there are 10 other small color card pieces within the neighborhood and the pixel area difference is less than 1000, it can be treated as a core point.

[0068] It should be understood that each part of the present invention can be implemented by hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented by software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented by hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits having logic gate circuits for implementing logical functions on data signals, application specific integrated circuits having appropriate combinational logic gate circuits, programmable gate arrays (PGAs), field programmable gate arrays (FPGAs), etc.

[0069] In the description of this specification, the descriptions referring to terms such as "one embodiment", "some embodiments", "example", "specific example", or "some examples", etc., mean that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples.

[0070] The above-described embodiments merely represent several implementation manners of the present invention. The descriptions are relatively specific and detailed, but should not be construed as limiting the scope of the patent of the present invention. It should be noted that for those of ordinary skill in the art, without departing from the concept of the present invention, several modifications and improvements can still be made, and these all belong to the protection scope of the present invention. Therefore, the protection scope of the patent of the present invention shall be subject to the appended claims.

Claims

1. A segmentation method for color card images based on peak detection and DBSCAN clustering, characterized in that: The method comprises the following steps: Step 1, performing image enhancement on the layout color card image to obtain an enhanced layout color card image; Step 2: The enhanced layout color card image is smoothed by using a Gaussian blur method to obtain the image feature value after Gaussian blur; Step 3: along the vertical direction, a sliding window is used to perform convolution calculation on the image feature values ​​after Gaussian blur in the window to obtain the column feature values ​​of the image; Obtaining the maximum value of each local column feature and two adjacent local minimum values ​​of each local column feature based on the column feature value of the image; Based on the maximum value of each local column feature and two adjacent local minimum values ​​of each local column feature, the boundary of the layout color card image column is identified by saliency discrimination, and the layout color card image is segmented by column; Step 4: In the horizontal direction, a sliding window is used to perform convolution calculation on the image feature values ​​after Gaussian blur in the window to obtain the row feature values ​​of the image; Obtaining the maximum value of each local row feature and two adjacent local minimum values ​​of each local row feature based on the row feature value of the image; Based on the maximum value of each local row feature and two adjacent local minimum values ​​of each local row feature, the boundary of the layout color card image row is identified by saliency discrimination, and the layout color card image is segmented by row; Step 5: The color card blocks obtained by column segmentation and row segmentation are screened by a density-based spatial clustering algorithm with noise to obtain all correct color card blocks.

2. The segmentation method of color card image based on peak detection and DBSCAN clustering according to claim 1, characterized in that: In step 1, the layout color card image is enhanced to obtain an enhanced layout color card image. The specific steps are as follows: Convert the paper layout color card style into a layout color card image through an image acquisition device; Perform resolution normalization on the collected layout color card images.

3. The segmentation method of color card image based on peak detection and DBSCAN clustering according to claim 2 is characterized in that: In step 2, the enhanced layout color card image is smoothed by using a Gaussian blur method to obtain the image feature value after Gaussian blur, wherein the weight of the Gaussian function is calculated using the position of the pixel points in the enhanced layout color card image, and the corresponding process has the following relationship: ; in, represents the weight of the Gaussian function, It means that after the natural exponential function calculation, represents pi, represents the standard deviation of the normal distribution, Indicates the horizontal position of the pixel. Indicates the vertical position of the pixel.

4. The segmentation method of color card image based on peak detection and DBSCAN clustering according to claim 3 is characterized in that: In step 2, the enhanced layout color card image is smoothed by using a Gaussian blur method to obtain the image feature value after Gaussian blur, wherein the image feature value after Gaussian blur is calculated using the weight of the Gaussian function, and the corresponding process has the following relationship: ; in, represents the image feature value after Gaussian blur, represents the unprocessed image feature value, Represents the three channels of a color image, represents the radius of the Gaussian kernel, Indicates that the Gaussian kernel is located in the layout color card image The weight of Indicates the horizontal offset. Indicates the vertical offset.

5. The segmentation method of color card image based on peak detection and DBSCAN clustering according to claim 4 is characterized in that: In step 3, a sliding window is used in the vertical direction to perform convolution calculation on the image feature values ​​after Gaussian blur in the window to obtain the column feature values ​​of the image. The corresponding process has the following relationship: ; in, represents the column feature value of the image, Represents the width of the pooled layout color card image, Represents the length of the pooled layout color card image, Represents the weight of the sliding window.

6. The segmentation method of color card image based on peak detection and DBSCAN clustering according to claim 5 is characterized in that: In step 4, a sliding window is used in the horizontal direction to perform convolution calculation on the image feature values ​​after Gaussian blur in the window to obtain the row feature values ​​of the image. The relationship between the corresponding process is: ; in, Indicates the width of the layout color card column image after column division. Represents the row features of the image, Represents the weight of the sliding window.

7. The method for segmenting color card images based on peak detection and DBSCAN clustering according to claim 6, characterized in that: In step 5, the color card blocks obtained by column segmentation and row segmentation are screened by a density-based spatial clustering algorithm with noise to obtain all correct color card blocks, wherein the density-based spatial clustering algorithm with noise includes two parameters: domain radius and minimum number of points. The definition of the domain radius is: ; in, Represents the set of all color card blocks, and All represent small pieces of color cards. Indicates the absolute value of the area difference between the two color card blocks. Indicates the radius of the field, Indicates is the set of points in the area of ​​the cluster center, express The area of express area.

8. The method for segmenting color card images based on peak detection and DBSCAN clustering according to claim 7, characterized in that: In step 5, the color card blocks obtained by column segmentation and row segmentation are screened by a density-based spatial clustering algorithm with noise to obtain all correct color card blocks; wherein the density-based spatial clustering algorithm with noise includes two parameters: domain radius and minimum number of points. The definition of the minimum number of points is: ; in, Indicates the minimum number of points, Indicates is the number of points contained in the area of ​​the cluster center.

Citation Information

Patent Citations

  • Image segmentation method based on rapid density clustering algorithm

    CN106447676A

  • Image characteristic density peak searching-based image segmentation method, system and medium

    CN108629783A