Image segmentation method, system, image segmentation device and readable storage medium based on chrominance component

By acquiring the chrominance components of the image and obtaining the dynamic segmentation threshold based on the peaks and troughs, the problem of misjudgment and misjudgment in the prior art is solved, and a more accurate image segmentation effect is achieved.

CN114119623BActive Publication Date: 2025-05-13SUZHOU CLEVA PRECISION MACHINERY & TECH CO LTD +1
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202010894184.6
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-08-31
Publication Date
2025-05-13
Estimated Expiration
2040-08-31

AI Technical Summary

Technical Problem

Existing color image segmentation methods are prone to misjudgment and misjudgment, especially segmentation methods based on lawn color range or fixed threshold.

Method used

By acquiring the chrominance components of the image, a chrominance component histogram is generated, a peak and trough are determined according to the preset chrominance interval and peak-to-valley setting conditions, a dynamic segmentation threshold is obtained, and the image is divided into multiple regions with different chrominances.

Benefits of technology

It effectively reduces missegment, and the segmentation threshold is dynamically adjusted according to the image, reducing the misjudgment caused by the fixed segmentation threshold, and improving the speed of identifying peaks and troughs.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114119623B_ABST
    Figure CN114119623B_ABST
Patent Text Reader

Abstract

The present invention discloses an image segmentation method based on chromaticity components; the method comprises the following steps: obtaining the chromaticity components of an image; generating a chromaticity component histogram according to the chromaticity components; determining the peaks and valleys in the chromaticity component histogram according to a preset chromaticity interval and a preset peak-valley setting condition; obtaining a segmentation threshold according to the peaks and valleys; and dividing the image into a plurality of regions of different chromaticity according to the segmentation threshold. The present invention obtains the segmentation threshold according to the peaks and valleys, and the segmentation threshold is dynamically adjusted according to different images, and a fixed segmentation threshold is no longer used, thereby effectively reducing mis-segmentation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a chrominance component-based image segmentation method, system, image segmentation device and readable storage medium, and in particular to a chrominance component-based image segmentation method, system, image segmentation device and readable storage medium that effectively reduce mis-segmentation. Background Art

[0002] Image segmentation plays an extremely important role in image processing and computer vision, and is also one of the classic problems in image processing. It is an important part of image analysis and computer vision systems, and determines the quality of digital image analysis and the quality of visual information processing results. Since color images provide richer information than grayscale images, the segmentation of color images has received increasing attention. At present, the commonly used color digital image segmentation methods include: histogram threshold method, region-based method, edge-based method, feature space clustering method, neural network method, etc.

[0003] However, direct segmentation based on the lawn color range or fixed threshold may result in missed or misjudgment. Summary of the invention

[0004] The present invention provides a chrominance component-based image segmentation method, system, image segmentation device and readable storage medium that can effectively reduce mis-segmentation.

[0005] The present invention provides an image segmentation method based on chrominance components; the method comprises the following steps:

[0006] Get the chrominance component of the image;

[0007] Generating a chrominance component histogram according to the chrominance component;

[0008] Determining peaks and valleys in the chroma component histogram according to a preset chroma interval and a preset peak-valley setting condition;

[0009] Obtain segmentation thresholds based on peaks and troughs;

[0010] The image is divided into multiple regions of different chromaticity according to the segmentation threshold.

[0011] Optionally, acquiring the chrominance component of the image includes:

[0012] Get HSV image;

[0013] The HSV image is separated and processed to obtain an H channel image and a chromaticity component.

[0014] Optionally, acquiring the chrominance component of the image includes:

[0015] Acquire an original image, where the original image includes a first color space;

[0016] Convert the original image from the first color space to the HSV color space and obtain the chrominance component.

[0017] Optionally, generating a chrominance component histogram according to the chrominance component comprises:

[0018] Generating a first chrominance component histogram according to the chrominance component;

[0019] The first chrominance component histogram is subjected to filtering and smoothing processing to obtain a second chrominance component histogram.

[0020] Optionally, the chromaticity component histogram counts the frequencies corresponding to different chromaticity values, and the preset peak and valley setting conditions include: peak frequency>k*valley frequency; the distance between adjacent peaks meets the preset peak distance; peak frequency>frequency threshold; where k is a constant, including a positive integer, a fraction or a decimal, etc.

[0021] Optionally, obtaining a segmentation threshold according to peaks and troughs includes:

[0022] Counting the number of the peaks;

[0023] Determine whether the number of peaks is not less than 2; if the number of peaks is not less than 2, obtain the segmentation threshold through the peak-valley segmentation method; if the number of peaks is less than 2, obtain the segmentation threshold through the Otsu threshold method.

[0024] Optionally, obtaining the segmentation threshold by using the peak-valley segmentation method includes:

[0025] Find a group of peaks and valleys with the largest peak-to-valley ratio from the peaks and valleys as target peaks and valleys, and obtain the position of the valley in the target peak and valley as the first position;

[0026] Find the second position where the maximum peak valley on the left side is located on the left side of the first position, find the third position where the maximum peak valley on the right side is located on the right side of the first position, and obtain the chromaticity value corresponding to the second position as the second wave peak chromaticity value, and obtain the chromaticity value corresponding to the third position as the third wave peak chromaticity value;

[0027] Find the chromaticity value corresponding to the minimum frequency value between the second position and the third position as the split chromaticity value;

[0028] The segmentation thresholds corresponding to regions of different chromaticities are obtained according to the second peak chromaticity value, the third peak chromaticity value and the segmentation chromaticity value.

[0029] The present invention also provides an image segmentation system based on chrominance components, the system comprising:

[0030] A chrominance component acquisition module, which is used to acquire the chrominance component of the image;

[0031] A statistical module, used for generating a chrominance component histogram according to the chrominance component;

[0032] A peak-valley identification module, which is used to determine the peaks and valleys in the chroma component histogram according to a preset chroma interval and a preset peak-valley setting condition;

[0033] A threshold processing module, which is used to obtain a segmentation threshold according to peaks and troughs;

[0034] The image segmentation module is used to divide the image into multiple regions of different chromaticity according to a segmentation threshold.

[0035] The present invention also provides an image processing device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the image segmentation method based on chrominance components when executing the computer program.

[0036] The present invention also provides a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the image segmentation method based on chrominance components are implemented.

[0037] Compared with the prior art, the present invention obtains the segmentation threshold according to the peaks and valleys, and the segmentation threshold is dynamically adjusted according to different images, and no longer uses a fixed segmentation threshold, thereby effectively reducing mis-segmentation. The present invention performs filtering and smoothing on the chroma component histogram to reduce the interference signal in the chroma component histogram, and further reduce mis-segmentation. The present invention determines the peaks and valleys in the chroma component histogram according to the preset chroma interval and the preset peak and valley setting conditions, thereby improving the speed of identifying the peaks and valleys. BRIEF DESCRIPTION OF THE DRAWINGS

[0038] Figure 1 is a flow chart of a first embodiment of the image segmentation method based on chrominance components of the present invention;

[0039] Figure 2 is a flow chart of a second embodiment of the image segmentation method based on chrominance components of the present invention;

[0040] Figure 3 is a flow chart of a third embodiment of the image segmentation method based on chrominance components of the present invention;

[0041] Figure 4 for Figure 1 Flow chart of step S40;

[0042] Figure 5 for Figure 4 Flow chart of step S403;

[0043] Figure 6 is the result of the first image being processed by the image segmentation method based on chrominance components of the present invention;

[0044] Figure 7 is the result of the second image being processed by the image segmentation method based on chrominance components of the present invention;

[0045] Figure 8 is the result of the third image being processed by the image segmentation method based on chrominance components of the present invention;

[0046] Fig. 9 is the result of the fourth image being processed by the image segmentation method based on chrominance components of the present invention;

[0047] Fig.10 It is a principle block diagram of the image segmentation system based on chrominance component of the present invention. DETAILED DESCRIPTION

[0048] In order to enable those skilled in the art to better understand the technical solutions in the present invention, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work should fall within the scope of protection of the present invention.

[0049] See also Figure 1 As shown, the present invention provides an image segmentation method based on chrominance components; the method comprises the following steps:

[0050] Step S10: obtaining the chrominance component of the image;

[0051] Step S20: generating a chrominance component histogram according to the chrominance component;

[0052] Step S30: determining the peaks and valleys in the chroma component histogram according to a preset chroma interval and a preset peak-valley setting condition;

[0053] Step S40: Obtaining a segmentation threshold according to the peaks and valleys;

[0054] Step S50: Divide the image into a plurality of regions of different chromaticity according to the segmentation threshold.

[0055] The chromaticity components in step S10 can be obtained directly or indirectly. The chromaticity components in the HSV image can be obtained by direct separation, and the chromaticity components of images such as RGB can be obtained by color space conversion and other processing.

[0056] See also Figure 2 As shown, in another embodiment of the present invention, the step S10 includes:

[0057] Step S101: Obtain HSV image orgMat;

[0058] Step S102: Separate the HSV image and obtain the H channel image outsMat and the chromaticity component.

[0059] The acquired chromaticity component comes from the HSV image, and the HSV image includes a chromaticity component, a brightness component, and a saturation component.

[0060] See also Figure 3 As shown, in another embodiment of the present invention, the step S10 includes:

[0061] Step S110: Acquire an original image, where the original image includes a first color space;

[0062] Step S120: converting the original image from the first color space to the HSV color space, and obtaining the chrominance component.

[0063] Among them, the original images have different sources and different formats. The conversion processing is performed according to the format of the original image to obtain the chromaticity component. For example, the first color space can be an RGB color space, and then the original image is converted from the RGB color space to the HSV color space.

[0064] In another embodiment of the present invention, step S20 includes:

[0065] Generate a first chrominance component histogram orgLabelsMat according to the chrominance component;

[0066] The first chrominance component histogram orgLabelsMat is filtered and smoothed to obtain a second chrominance component histogram labelsMat.

[0067] In another embodiment of the present invention, the preset chromaticity interval in step S30 can be determined according to needs, and different preset chromaticity intervals are set for different usage scenarios. For example, after the image is segmented by the image segmentation method based on chromaticity components of the present invention for lawn recognition, the preset chromaticity interval can be set to 15-95.

[0068] In another embodiment of the present invention, the preset peak and valley setting conditions in step S30 include:

[0069] Preset peak and valley setting condition 1: Peak frequency > k*trough frequency, where k is a constant, including a positive integer, fraction or decimal;

[0070] Preset peak and valley setting condition 2: The distance between adjacent peaks meets the preset peak distance,

[0071] Preset peak and valley setting condition 3: peak frequency > frequency threshold.

[0072] The peaks and valleys in the chrominance component histogram are determined only when the preset peak and valley setting conditions 1, the preset peak and valley setting conditions 2 and the preset peak and valley setting conditions 3 are met at the same time. If the preset peak and valley setting conditions 1 and the preset peak and valley setting conditions 3 are met, but the preset peak and valley setting condition 2 is not met, the peak with the largest peak frequency is selected as the peak in the chrominance component histogram, and the remaining peaks are not regarded as peaks in the chrominance component histogram.

[0073] See also Figure 4 As shown, in another embodiment of the present invention, the step S40 includes:

[0074] Step S401: Count the number j of the peaks;

[0075] Step S402: determine whether the number of peaks j is not less than 2; if the number of peaks j is not less than 2, execute step S403; if the number of peaks j is less than 2, execute step S404;

[0076] Step S403: obtaining a segmentation threshold by using a peak-valley segmentation method;

[0077] Step S404: Obtain the segmentation threshold by using the Otsu threshold method.

[0078] See also Figure 5 As shown, in another embodiment of the present invention, step S403 includes:

[0079] Step S4031: Find a group of peaks and valleys with the largest peak-to-valley ratio from the peaks and valleys as target peaks and valleys, and obtain the position of the valley in the target peaks and valleys as the first position;

[0080] Step S4032: Find the second position where the maximum peak valley on the left side is located on the left side of the first position, find the third position where the maximum peak valley on the right side is located on the right side of the first position, and obtain the chromaticity value corresponding to the second position as the second wave peak chromaticity value h1i, and obtain the chromaticity value corresponding to the third position as the third wave peak chromaticity value h2i;

[0081] Step S4033: Find the chromaticity value corresponding to the minimum frequency value between the second position and the third position as the split chromaticity value li;

[0082] Step S4034: Obtain the segmentation threshold [lowValue, highValue] corresponding to the regions with different chromaticities according to the second peak chromaticity value h1i, the third peak chromaticity value h2i and the segmentation chromaticity value li. Compare the second peak chromaticity value h1i with the preset second peak threshold, and the third peak chromaticity value h2i with the preset third peak threshold to obtain a peak chromaticity value comparison result, and obtain the segmentation threshold corresponding to the regions with different chromaticities according to the peak chromaticity value comparison result.

[0083] When the peak chromaticity value comparison result satisfies "the second peak chromaticity value h1i>the preset second peak threshold, and the third peak chromaticity value h2i>the preset third peak threshold", the minimum value of the preset chromaticity interval (or other numerical values ​​of the preset chromaticity interval) is set as the minimum value lowValue of the segmentation threshold, and the segmentation chromaticity value li is set to the maximum value highValue of the segmentation threshold.

[0084] When the peak chromaticity value comparison result does not satisfy "the second peak chromaticity value h1i>the preset second peak threshold, and the third peak chromaticity value h2i>the preset third peak threshold", the segmentation chromaticity value li is set to the minimum value lowValue of the segmentation threshold, and the maximum value of the preset chromaticity interval (it can also be other values ​​of the preset chromaticity interval) is set to the maximum value highValue of the segmentation threshold.

[0085] For example, the preset chromaticity interval is [15, 95], the preset second peak threshold is 30, the preset third peak threshold is 75, if h1i>30 and h2i>75 (the large peak is blue), then lowValue=15, highValue=li; otherwise, lowValue=li, highValue=95.

[0086] In another embodiment of the present invention, if the number of peaks j is less than 2, the Otsu threshold method (OTSU) is used to obtain the segmentation chromaticity value li, and the segmentation threshold [lowValue, highValue] corresponding to the area of ​​different chromaticity is obtained according to the number of peaks.

[0087] In order to accurately segment the area of ​​specific chromaticity in the preset chromaticity interval in the image, the lowest dividing point is found starting from the minimum value of the preset chromaticity interval. If the lowest dividing point exists, the second peak chromaticity value and the third peak chromaticity value are preset according to the first preset rule; if the lowest dividing point does not exist, the second peak chromaticity value and the third peak chromaticity value are preset according to the second preset rule. Among them, the chromaticity value of the lowest dividing point is mi, and the frequency corresponding to mi is greater than the frequency corresponding to mi+1 and mi+2. Taking the segmentation of grassland image as an example, the chromaticity value of some grass in the grassland is in the yellow-red chromaticity range (specific chromaticity). By finding the lowest dividing point, it is possible to avoid segmenting the yellow-red grass into non-grass areas after segmentation.

[0088] If there is a minimum demarcation point, the second peak chromaticity value and the third peak chromaticity value are preset according to the first preset rule based on the number of peaks. When the number of peaks is 0, the second peak chromaticity value h1i is set as the minimum demarcation point chromaticity value mi, and the third peak chromaticity value h2i is set as the maximum value of the preset chromaticity interval (it can also be other values ​​of the preset chromaticity interval). When the number of peaks is 1, the chromaticity value of the peak is h1, the second peak chromaticity value h1i is set as the minimum demarcation point chromaticity value, and the third peak chromaticity value is set to h1.

[0089] If there is no lowest dividing point, the second peak chromaticity value h1i and the third peak chromaticity value h2i are preset according to the number of peaks according to the second preset rule. When the number of peaks is 0, the second peak chromaticity value h1i is set to the minimum value of the preset chromaticity interval (it can also be other values ​​of the preset chromaticity interval), and the third peak chromaticity value h2i is set to the maximum value of the preset chromaticity interval (it can also be other values ​​of the preset chromaticity interval). When the number of peaks is 1, the chromaticity value of the peak is h1, the second peak chromaticity value h1i is set to h1, and the third peak chromaticity value is set to h1.

[0090] When the number of peaks is 0, the segmentation chromaticity value li, the second peak chromaticity value h1i and the third peak chromaticity value h2i are compared to obtain a peak chromaticity value comparison result, and the segmentation threshold corresponding to the area of ​​different chromaticity is obtained according to the peak chromaticity value comparison result.

[0091] When the number of peaks is 0, the comparison results include:

[0092] 1-1 When the peak chromaticity value comparison result satisfies "segmentation chromaticity value li>third peak chromaticity value h2i", the segmentation chromaticity value li is set to the minimum value lowValue of the segmentation threshold, and the maximum value of the preset chromaticity interval (it can also be other numerical values ​​of the preset chromaticity interval) is set to the maximum value highValue of the segmentation threshold.

[0093] 1-2 When the peak chromaticity value comparison result satisfies "segmentation chromaticity value li<second peak chromaticity value h1i", the minimum value of the preset chromaticity interval (or other numerical values ​​of the preset chromaticity interval) is set as the minimum value lowValue of the segmentation threshold, and the segmentation chromaticity value li is set to the maximum value highValue of the segmentation threshold.

[0094] 1-3 When the peak chromaticity value comparison result satisfies "the second peak chromaticity value h1i≤segmentation chromaticity value li≤third peak chromaticity value h2i", the second peak chromaticity value h1i is set to the minimum value lowValue of the segmentation threshold, and the third peak chromaticity value h2i is set to the maximum value highValue of the segmentation threshold.

[0095] When the number of peaks is 1, the second peak chromaticity value h1i is compared with the preset second peak threshold, and the third peak chromaticity value h2i is compared with the preset third peak threshold to obtain a peak chromaticity value comparison result, and the segmentation threshold corresponding to the area of ​​different chromaticity is obtained according to the peak chromaticity value comparison result. The comparison process when the number of peaks is 1 is the same as the comparison process when the number of peaks j is not less than 2, please refer to the specific process of step S4034.

[0096] See also Figure 6-Figure 9 As shown, after the image orgMat in step S10 is separated to obtain the H channel image otusMat, a first chromaticity component histogram orgLabelsMat and a second chromaticity component histogram labelsMat are generated through step S20; and the peaks and troughs are identified through step S30, and then the segmentation result dstMat is obtained after steps S40 and S50, and dstMat shows that the image has been divided into two areas.

[0097] Referring to FIG. 10 , the present invention further provides an image segmentation system 10 based on chrominance components, the system comprising:

[0098] A chrominance component acquisition module 11, which is used to acquire the chrominance component of the image;

[0099] A statistical module 12, which is used to generate a chrominance component histogram according to the chrominance component;

[0100] A peak-valley identification module 13, which is used to determine the peaks and valleys in the chroma component histogram according to a preset chroma interval and a preset peak-valley setting condition;

[0101] A threshold processing module 14, which is used to obtain a segmentation threshold according to the peaks and valleys;

[0102] The image segmentation module 15 is used to divide the image into a plurality of regions of different chromaticity according to a segmentation threshold.

[0103] The present invention also provides an image processing device, comprising a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps of the image segmentation method based on chrominance components when executing the computer program.

[0104] The present invention also provides a readable storage medium on which a computer program is stored. When the computer program is executed by a processor, the steps of the image segmentation method based on chrominance components are implemented.

[0105] In summary, the present invention obtains the segmentation threshold according to the peaks and valleys, and the segmentation threshold is dynamically adjusted according to different images, and a fixed segmentation threshold is no longer used, thereby effectively reducing mis-segmentation. The present invention performs filtering and smoothing on the chroma component histogram to reduce the interference signal in the chroma component histogram, and further reduce mis-segmentation. The present invention determines the peaks and valleys in the chroma component histogram according to the preset chroma interval and the preset peak and valley setting conditions, thereby improving the speed of identifying the peaks and valleys.

[0106] In addition, it should be understood that although the present specification is described according to implementation modes, not every implementation mode contains only one independent technical solution. This narrative method of the specification is only for the sake of clarity. Those skilled in the art should regard the specification as a whole. The technical solutions in each implementation mode may also be appropriately combined to form other implementation modes that can be understood by those skilled in the art.

[0107] The series of detailed descriptions listed above are only specific descriptions of feasible implementation methods of the present invention and are not intended to limit the scope of protection of the present invention. All equivalent implementation methods or changes that do not deviate from the technical spirit of the present invention should be included in the scope of protection of the present invention.

Claims

1. A chrominance component-based image segmentation method; characterized in that: The method comprises the following steps: Get the chrominance component of the image; Generating a chrominance component histogram according to the chrominance component; Determining peaks and troughs in the chrominance component histogram according to preset peak and trough setting conditions; Obtain segmentation thresholds based on peaks, troughs, and preset chromaticity intervals; Divide the image into multiple regions of different chromaticity according to the segmentation threshold; The obtaining of the segmentation threshold according to the peak, the trough and the preset chromaticity interval comprises: Counting the number of the peaks; Determine whether the number of peaks is not less than 2; if the number of peaks is not less than 2, obtain the segmentation threshold by the peak-valley segmentation method; if the number of peaks is less than 2, obtain the segmentation threshold by the Otsu threshold method; The obtaining of the segmentation threshold by the peak-valley segmentation method comprises: Find a group of adjacent peaks and valleys with the largest peak-to-valley ratio from the peaks and valleys as the target peaks and valleys, and obtain the position of the valley in the target peaks and valleys as the first position; Find the second position where the maximum peak on the left side is located on the left side of the first position, find the third position where the maximum peak on the right side is located on the right side of the first position, and obtain the chromaticity value corresponding to the second position as the second peak chromaticity value, and obtain the chromaticity value corresponding to the third position as the third peak chromaticity value; Find the chromaticity value corresponding to the minimum frequency value between the second position and the third position as the split chromaticity value; Obtaining a segmentation threshold corresponding to regions of different chromaticities according to the second wave peak chromaticity value, the third wave peak chromaticity value, and the segmentation chromaticity value, wherein the segmentation threshold is a range value having a minimum value and a maximum value; If the second peak chromaticity value is greater than the preset second peak threshold, and the third peak chromaticity value is greater than the preset third peak threshold, the minimum value of the preset chromaticity interval is set as the minimum value of the segmentation threshold, and the segmentation chromaticity value is set as the maximum value of the segmentation threshold; If the second peak chromaticity value is not greater than the preset second peak threshold, and / or the third peak chromaticity value is not greater than the preset third peak threshold, the segmentation chromaticity value is set to the minimum value of the segmentation threshold, and the maximum value of the preset chromaticity interval is set to the maximum value of the segmentation threshold.

2. The image segmentation method based on chrominance components according to claim 1, characterized in that: The chrominance component of the acquired image includes: Get HSV image; The HSV image is separated and processed to obtain an H channel image and a chromaticity component.

3. The image segmentation method based on chrominance components according to claim 1, characterized in that: The chrominance component of the acquired image includes: Acquire an original image, where the original image includes a first color space; Convert the original image from the first color space to the HSV color space and obtain the chrominance component.

4. The image segmentation method based on chrominance components according to claim 1, characterized in that: Generating a chrominance component histogram according to the chrominance component comprises: Generating a first chrominance component histogram according to the chrominance component; The first chrominance component histogram is subjected to filtering and smoothing processing to obtain a second chrominance component histogram.

5. The image segmentation method based on chrominance components according to claim 1, characterized in that: The chromaticity component histogram counts the frequencies corresponding to different chromaticity values, and the preset peak and valley setting conditions include: peak frequency>k*valley frequency; the spacing between adjacent peaks meets the preset peak spacing, where k is a constant, including a positive integer, a fraction or a decimal.

6. A chrominance component-based image segmentation system, characterized in that: The system comprises: A chrominance component acquisition module, which is used to acquire the chrominance component of the image; A statistical module, used for generating a chrominance component histogram according to the chrominance component; A peak-valley identification module, which is used to determine the peaks and valleys in the chrominance component histogram according to preset peak-valley setting conditions; A threshold processing module, which is used to obtain a segmentation threshold according to the peaks, troughs and preset chromaticity intervals; Counting the number of the peaks; Determine whether the number of peaks is not less than 2; if the number of peaks is not less than 2, obtain the segmentation threshold by the peak-valley segmentation method; if the number of peaks is less than 2, obtain the segmentation threshold by the Otsu threshold method; The obtaining of the segmentation threshold by the peak-valley segmentation method comprises: Find a group of adjacent peaks and valleys with the largest peak-to-valley ratio from the peaks and valleys as the target peaks and valleys, and obtain the position of the valley in the target peaks and valleys as the first position; Find the second position where the maximum peak on the left side is located on the left side of the first position, find the third position where the maximum peak on the right side is located on the right side of the first position, and obtain the chromaticity value corresponding to the second position as the second peak chromaticity value, and obtain the chromaticity value corresponding to the third position as the third peak chromaticity value; Find the chromaticity value corresponding to the minimum frequency value between the second position and the third position as the split chromaticity value; Obtaining a segmentation threshold corresponding to regions of different chromaticities according to the second wave peak chromaticity value, the third wave peak chromaticity value, and the segmentation chromaticity value, wherein the segmentation threshold is a range value having a minimum value and a maximum value; If the second peak chromaticity value is greater than the preset second peak threshold, and the third peak chromaticity value is greater than the preset third peak threshold, the minimum value of the preset chromaticity interval is set as the minimum value of the segmentation threshold, and the segmentation chromaticity value is set as the maximum value of the segmentation threshold; If the second peak chromaticity value is not greater than the preset second peak threshold, and / or the third peak chromaticity value is not greater than the preset third peak threshold, the segmentation chromaticity value is set to the minimum value of the segmentation threshold, and the maximum value of the preset chromaticity interval is set to the maximum value of the segmentation threshold; The image segmentation module is used to divide the image into multiple regions of different chromaticity according to a segmentation threshold.

7. An image processing device, comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the chrominance component-based image segmentation method described in any one of claims 1 to 5 are implemented.

8. A readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the chrominance component-based image segmentation method according to any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Dynamic self-adaption skin color segmentation method and device

    CN103106386A

  • Color image segmentation algorithm based on histograms

    CN104134219A

  • Self-adaptive image segmentation method based on fuzzy threshold value

    CN105654501A