A multi-objective image segmentation method for fruit and vegetable sorting equipment
By analyzing the distance and color difference between pixels in fruit and vegetable images and the target cluster center, a multi-target image segmentation objective function is constructed, and the fuzzy C-means clustering algorithm and LAB color model are used to solve the problem of fuzzy image segmentation in fruit and vegetable sorting, and improve Segmentation accuracy and precision.
Patent Information
- Application Number
- CN202310473033.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-04-28
- Publication Date
- 2024-10-29
- Estimated Expiration
- 2043-04-28
AI Technical Summary
During the fruit and vegetable sorting process, due to the influence of external factors, the image is susceptible to interference and contamination, resulting in blurred images, making it difficult to accurately segment the target area and background area, and it is difficult to effectively process noisy images with existing technology.
By analyzing the distance and color difference between the pixels in the spherical fruit image and the target cluster center, we construct a multi-target image segmentation objective function for fruit and vegetable sorting, and use the fuzzy C-means clustering algorithm and LAB color model to achieve multi-target segmentation of the image.
It effectively solves the difficulty of segmentation caused by image blur, improves the accuracy and precision of image segmentation, can tolerate the inherent fuzziness of images to a certain extent, and improves the image processing capabilities of fruit and vegetable sorting equipment.
Smart Images

Figure CN116563326B_ABST
Abstract
Description
Technical Field
[0001] The invention belongs to the technical field of post-harvest sorting of fruits and vegetables, and particularly relates to completing multi-target image segmentation of images in a fruit and vegetable sorting device by analyzing the degree of membership about position and color based on the distance and color difference between pixel points of a spherical fruit image and a target cluster center in the fruit and vegetable sorting device. Background Art
[0002] At present, the role of image processing in fruit and vegetable sorting equipment is becoming increasingly obvious, and many important subsequent tasks in image processing, such as feature extraction, image analysis, pattern recognition, image understanding, etc., are based on image segmentation technology. It can be seen that image segmentation technology, as an important intermediate step in the image processing process, has an important impact on the image processing and recognition results. In the process of fruit and vegetable sorting after harvest, due to the influence of various external factors, the image will be blurred due to interference or pollution, making it difficult to accurately divide the image area. How to correctly segment the target area and the background area has become a major problem in image segmentation technology. For this reason, fuzzy theory can be introduced to overcome this problem. When considering the regional properties in a fuzzy way, it can better cope with the segmentation of different noise images, allowing the image to have some inherent fuzziness to a certain extent. The fuzzy C-means clustering algorithm is mainly based on fuzzy set theory and statistical principles, and integrates clustering ideas. It can achieve the optimal solution through repeated iterations and is a typical representative of fuzzy algorithms.
[0003] The LAB color model is the color space with the widest color gamut at present. It can describe human visual perception in a digital way and is widely used in computer vision. The L component in the Lab color model is used to represent the brightness of the pixel, and its value range is [0,100], representing from pure black to pure white; the A component represents the range from red to green, and its color ranges from dark green (low brightness value) to gray (medium brightness value) to bright pink (high brightness value), and its value range is [127,-128]; the B component represents the range from yellow to blue, and its color ranges from bright blue (low brightness value) to gray (medium brightness value) to yellow (high brightness value), and its value range is [127,-128]. Summary of the invention
[0004] The purpose of the present invention is to construct a multi-target image segmentation objective function for fruit and vegetable sorting by analyzing the color difference and distance between the pixel points in the non-background area and the target cluster center points in the spherical fruit image, so as to give the membership value of the position or color of a certain pixel point belonging to a certain target cluster and the position values of the center points of different target clusters when the multi-target image segmentation objective function for fruit and vegetable sorting has a minimum value, thereby realizing multi-target image segmentation of images in fruit and vegetable sorting equipment.
[0005] According to the present inventionFigure 1 The design scheme provided in the paper is a multi-objective image segmentation method for fruit and vegetable sorting equipment, which includes the following steps:
[0006] Step 1, in an image to be segmented for multiple targets in a fruit and vegetable sorting device, a multi-target image segmentation objective function for fruit and vegetable sorting is constructed by calculating the weighted square of the distance between a certain pixel point and a target cluster center point of a target cluster under the condition that the pixel point is in a non-background area and within the limited area radius of a target cluster center, and the weighted square of the color difference between the pixel point and the target cluster center point of the target cluster under the condition that the pixel point is in a non-background area and outside the limited area radius of a target cluster center, from different target clusters to different pixels, wherein the weighted coefficients are respectively the membership of the position of a certain pixel point to a certain target cluster and the membership of the color of a certain pixel point to a certain target cluster, and the sum of the difference between the square of the distance between the pixel point and the target cluster center point of the target cluster under the condition that the surrounding neighboring pixels are located in the non-background area and the square of the limited area radius of the target cluster at different pixels;
[0007] Step 2, giving the membership value of the position of a certain pixel belonging to a certain target cluster when the membership of the position of a certain pixel belongs to a certain target cluster in the fruit and vegetable sorting multi-target image segmentation objective function has a minimum value, and giving the membership value of the color of a certain pixel belonging to a certain target cluster when the membership of the color of a certain pixel belongs to a certain target cluster in the fruit and vegetable sorting multi-target image segmentation objective function has a minimum value;
[0008] Step 3, giving the position value of the target cluster center point when the fruit and vegetable sorting multi-target image segmentation objective function has a minimum value for the position of a target cluster center point;
[0009] Step 4, introducing the membership values of different pixel positions belonging to different target clusters at different loop iteration times in step 2, the membership values of different pixel colors belonging to different target clusters, and the position values of different target cluster center points in step 3 into the fruit and vegetable sorting multi-target image segmentation loop iteration process, and ending if the loop iteration error value is less than or equal to the loop iteration error threshold;
[0010] Step 5, for a certain pixel point in the non-background area of the image, the set of corresponding target clusters is determined by taking the maximum value of the sum of the membership values of the position of the pixel point belonging to different target clusters and the membership values of the color of the pixel point belonging to different target clusters at the end of the fruit and vegetable sorting multi-target image segmentation loop iteration process described in step 4, so as to segment the image according to the set of different target clusters;
[0011] Preferably, step 1 specifically includes:
[0012] When clustering K fruit and vegetable targets in an image that needs to be segmented for multiple targets in a fruit and vegetable sorting device, suppose that for the pixel point at position (i, j) in the image, the color of the LAB color model can be given as (l i,j ,a i,j ,b i,j ), let the position of the target cluster center point of the kth target cluster in the image be (m k ,n k ) and the color of the target cluster center point for the LAB color model is (l k ,a k ,b k ), and 1≤k≤K, let μ k,i,j is the membership of the pixel point (i, j) to the kth target cluster, and satisfies the normalization condition in the target cluster Assume ω k,i,j The color of the pixel at position (i, j) belongs to the kth target cluster and satisfies the normalization condition in the target cluster. Where H is the judgment function, if the condition in the H function is met, it is 1, if the condition in the H function is not met, it is 0, Φ is the color set of the background area in the image, R k is the radius of the limited area of the kth target cluster, is an existence symbol, (i - ,j - ) is the position of the neighboring pixels of the pixel at position (i, j), ξ,ζ are both Lagrange multipliers, I,J are the maximum horizontal coordinate value and the maximum vertical coordinate value of the pixel in the image, and 1≤i≤I and 1≤j≤J, then the pixel at position (i, j) is in and The weighted square sum of the distances between the target cluster center point of the kth target cluster and the color of the pixel at position (i, j) under the condition (l i,j ,a i,j ,b i,j )exist and The color of the target cluster center point (l k ,a k ,b k ) between the weighted square of the color difference between the K targets clustered into I×J pixels, and the pixel at position (i, j) in (l i,j ,a i,j ,b i,j )∈Φ and there exists Under the condition of , the difference between the square of the distance to the center point of the target cluster of the kth target cluster and the square of the radius of the limited area of the target cluster is the sum of I×J pixels to construct the multi-target image segmentation objective function G for fruit and vegetable sorting. The specific form is as follows:
[0013]
[0014] Preferably, in step 2, the specific method for calculating the membership value of the position of a certain pixel point belonging to a certain target cluster when the membership of the fruit and vegetable sorting multi-target image segmentation objective function for the position of a certain pixel point belonging to the target cluster has a minimum value is:
[0015] 1) Given the membership μ of the multi-target image segmentation objective function G for the position of the pixel point (i, j) belonging to the kth target cluster, k,i,j The first partial derivative of The specific form is as follows:
[0016]
[0017] 2) Give the membership degree μ of the position of the pixel point (i, j) belonging to the kth target cluster as the objective function G of the fruit and vegetable sorting multi-target image segmentation k,i,j The second-order partial derivative of The specific form is as follows:
[0018]
[0019] 3) When When it is zero, the dependent variable μ can be given with the Lagrange multiplier ξ as the independent variable. k,i,j The specific forms are as follows:
[0020]
[0021] 4) When there is When , the Lagrange multiplier ξ at this time can be given, the specific form is as follows:
[0022]
[0023] 5) In Greater than zero and When it is zero, we can give G to μ k,i,j When μ takes the minimum value k,i,j The value of is as follows:
[0024]
[0025] Preferably, in step 2, the specific method for calculating the membership value of the color of a pixel point belonging to a target cluster when the membership of the color of a pixel point belonging to a target cluster has a minimum value is:
[0026] 1) Given the multi-objective image segmentation objective function G for fruit and vegetable sorting, the color (l i,j ,a i,j ,b i,j ) belongs to the kth target cluster ω k,i,j The first partial derivative of The specific form is as follows:
[0027]
[0028] 2) Given the fruit and vegetable sorting multi-objective image segmentation objective function G for the color (l i,j ,a i,j ,b i,j ) belongs to the kth target cluster ω k,i,j The second-order partial derivative of The specific form is as follows:
[0029]
[0030] 3) When When it is zero, the dependent variable ω can be given with the Lagrange multiplier ζ as the independent variable k,i,j The specific forms are as follows:
[0031]
[0032] 4) When there is When , the Lagrange multiplier ξ at this time can be given, the specific form is as follows:
[0033]
[0034] 5) In Greater than zero and When it is zero, we can give G to ω k,i,j When ω takes the minimum value k,i,j The value of is as follows:
[0035]
[0036] Preferably, in step 3, the specific method for calculating the position value of the target cluster center point when the fruit and vegetable sorting multi-target image segmentation objective function has a minimum value for the position of a certain target cluster center point is:
[0037] 1) Give the position of the kth target cluster center point (m k ,n k ) and Considering that H is a judgment function and is used as a restriction condition for the pixels involved in the calculation in the image, it is not necessary to k ,n k Perform a derivative operation, the specific form is as follows:
[0038]
[0039]
[0040] 2) Give the position of the kth target cluster center point (m k ,n k ) and The specific form is as follows:
[0041]
[0042]
[0043] 3) In and Greater than zero and and When it is zero, we can give the relationship between G and m. k and n k When m reaches its minimum value k and n k The value of is as follows:
[0044]
[0045]
[0046] Preferably, the fruit and vegetable sorting multi-objective image segmentation iterative process in step 4 specifically includes the following three steps:
[0047] 1) Initialization process: set the number of loop iterations t to zero, set the color set Φ of the background area in the image, set K to the number of rings in the non-background area of the image, and set the kth target cluster center point position (m k (t=0),n k (t=0)) is the position of the center pixel of the ring and the color of the center point of the target cluster is (l k (t=0),a k (t=0),bk (t=0)), set the position of the pixel point (i, j) when the number of loop iterations t is zero to the membership degree μ of the kth target cluster k,i,j The membership degree ω of the color of the pixel at (t=0) and position (i,j) belongs to the kth target cluster k,i,j (t=0) are all set to 1 / K, where 1≤k≤K, 1≤i≤I and 1≤j≤J;
[0048] 2) Increase the number of loop iterations t by 1, and calculate the value of μ from G in step 2. k,i,j When μ takes the minimum value k,i,j The specific form of the value of μ is calculated k,i,j (t), from G to ω in step 2 k,i,j When ω takes the minimum value k,i,j The specific form of the value of ω is calculated k,i,j (t), in setting m in the H function k ,n k m k (t-1),n k (t-1) k,i,j (t) and ω k,i,j (t) Substitute G into m in step 3 k and n k When m reaches its minimum value k and n k The specific form of the value of m is calculated k (t) and n k (t);
[0049] 3) Calculate the loop iteration error value If ε(t) is less than or equal to the loop iteration error threshold ε T End, otherwise go to 2);
[0050] Preferably, step 5 specifically includes:
[0051] 1) At the end of the iterative process of the fruit and vegetable sorting multi-objective image segmentation loop described in step 4, the number of objects in the image that meet the requirements is counted. Under the condition, the pixel (i, j) has different μ for different k. k,i,j (t) and ω k,i,j (t);
[0052] 2) For satisfaction The pixel point (i, j) under the condition, let the target cluster number χ(i, j) to which the pixel point (i, j) belongs be The corresponding k value is added to the set Θ k | k=χ(i,j) , where 1≤k≤K, 1≤i≤I and 1≤j≤J
[0053] 3) According to different k's Θ k Segment the image, where 1≤k≤K. BRIEF DESCRIPTION OF THE DRAWINGS
[0054] Figure 1 :Multi-objective image segmentation steps for fruit and vegetable sorting equipment;
[0055] Figure 2 : The status diagram of loop iteration error value under different numbers of loop iterations. DETAILED DESCRIPTION
[0056] The technical solution provided by the present invention is described in detail below by using a specific embodiment of multi-target image segmentation of a sweet orange image in a sorting process output by a fruit and vegetable sorting device, which specifically includes the following contents:
[0057] Step 1 specifically includes:
[0058] Suppose that a certain orange image that needs to be segmented for multiple targets in a fruit and vegetable sorting device contains K orange targets. When performing target clustering on the orange image, suppose that for the pixel point at position (i, j) in the image, the color of the LAB color model can be (l i,j ,a i,j ,b i,j ), let the position of the target cluster center point of the kth target cluster in the image be (m k ,n k ) and the color of the target cluster center point for the LAB color model is (l k ,a k ,b k ), and 1≤k≤K, let μ k,i,j is the membership of the pixel point (i, j) to the kth target cluster, and satisfies the normalization condition in the target cluster Assume ω k,i,j The color of the pixel at position (i, j) belongs to the kth target cluster and satisfies the normalization condition in the target cluster. Where H is the judgment function, if the condition in the H function is met, it is 1, if the condition in the H function is not met, it is 0, Φ is the color set of the background area in the image, R k is the radius of the limited area of the kth target cluster, is an existence symbol, (i - ,j -) is the position of the neighboring pixels around the pixel at position (i, j), ξ,ζ are both Lagrange multipliers, I,J are the maximum horizontal coordinate value and the maximum vertical coordinate value of the pixel in the image, respectively, and 1≤i≤I and 1≤j≤J, then the multi-target image segmentation objective function G for fruit and vegetable sorting can be constructed, and the specific form is as follows:
[0059]
[0060] Step 2:
[0061] exist Greater than zero and When it is zero, we can give G to μ k,i,j When μ takes the minimum value k,i,j The value of is as follows:
[0062]
[0063] exist Greater than zero and When it is zero, we can give G to ω k,i,j When ω takes the minimum value k,i,j The value of is as follows:
[0064]
[0065] Step 3:
[0066] exist and Greater than zero and and When it is zero, we can give the relationship between G and m. k and n k When m reaches its minimum value k and n k The value of is as follows:
[0067]
[0068]
[0069] Step 4:
[0070] 1) Initialization process, set the number of loop iterations t to zero, set the resolution of the orange image to 1200x840, set the color set Φ of the white color added to the background area when the fruit and vegetable sorting equipment is idle, set the total number of complete or partial circles K in the non-background area of orange to orange-red in the image to 9, set the kth target cluster center point position (m k (t=0),n k(t=0)) is the position of the center pixel of the ring and the color of the center point of the target cluster is (l k (t=0),a k (t=0),b k (t=0)), the LAB value can be given by comparing with the PANTONE international color card, and the position of the pixel point (i, j) when the number of loop iterations t is set to zero belongs to the membership degree μ of the kth target cluster k,i,j The membership degree ω of the color of the pixel at (t=0) and position (i,j) belongs to the kth target cluster k,i,j (t=0) are all set to 1 / K, where I=1200, J=840;
[0071] 2) Increase the number of loop iterations t by 1, and calculate the value of μ from G in step 2. k,i,j When μ takes the minimum value k,i,j The specific form of the value of μ is calculated k,i,j (t), from G to ω in step 2 k,i,j When ω takes the minimum value k,i,j The specific form of the value of ω is calculated k,i,j (t), in setting m in the H function k ,n k m k (t-1),n k (t-1) k,i,j (t) and ω k,i,j (t) Substitute G into m in step 3 k and n k When m reaches its minimum value k and n k The specific form of the value of m is calculated k (t) and n k (t);
[0072] 3) Calculate the loop iteration error value If ε(t) is less than or equal to the loop iteration error threshold ε T Then it ends. Considering that the image resolution is 1200x840, the average fluctuation of the position of each target cluster center point is calculated according to the pixel status in the image. Then the ε T Setting it to 5 can basically meet the loop iteration convergence situation, otherwise go to 2);
[0073] Set from Figure 2 The loop iteration error values at different loop iteration times for the sweet orange image using the fruit and vegetable sorting multi-objective image segmentation loop iteration process are given in FIG. Figure 2 It can be found that the loop iteration error values are 4.77, 4.3 and 4.88 respectively when the number of iterations is 22, 23 and 25, which are all lower than the εT , at this time, an error platform has been reached. It can be seen that the constraint condition can be met when the number of iterations is 22. Figure 2 In step 4, the positions of the center points of different target clusters are made clearer and more focused through continuous iteration. At the same time, the membership of each pixel point to a target cluster and the membership of each pixel point to a target cluster are continuously differentiated, so that the sum of the membership of a certain pixel point to a target cluster and the membership of the pixel point to the target cluster is continuously improved, so as to clarify which target cluster the pixel point should belong to.
[0074] Step 5:
[0075] 1) At the end of the iterative process of the fruit and vegetable sorting multi-objective image segmentation loop described in step 4, the number of objects in the image that meet the requirements is counted. Under the condition, the pixel (i, j) has different μ for different k. k,i,j (t) and ω k,i,j (t);
[0076] 2) For satisfaction The pixel point (i, j) under the condition, let the target cluster number χ(i, j) to which the pixel point (i, j) belongs be The corresponding k value is added to the set Θ k | k=χ(i,j) , where 1≤k≤K, 1≤i≤I and 1≤j≤J;
[0077] 3) According to different k's Θ k Segment the image, where 1≤k≤K, if a Θ k If there are fewer elements in the set Θ k The corresponding orange should be blocked by the neighboring orange. It can be seen that the overlapping edges can be distinguished more finely in image segmentation to improve the segmentation accuracy. If there is another Θ k If there are very few or no elements in the set Θ k There should be no corresponding sweet orange and this set can be deleted k , thereby completing the multi-target image segmentation of the sweet orange image output by the fruit and vegetable sorting equipment during the sorting process.
[0078] Any part not specified in this embodiment can be implemented using existing technologies.
[0079] For those skilled in the art, according to the teachings of the present invention, without departing from the principles and spirit of the present invention, changes, modifications, substitutions and variations made to the implementation methods are still within the protection scope of the present invention.
Claims
1. A multi-objective image segmentation method for fruit and vegetable sorting equipment, characterized in that: The following steps are involved: Step 1, in an image to be segmented for multiple targets in a fruit and vegetable sorting device, a multi-target image segmentation objective function for fruit and vegetable sorting is constructed by calculating the weighted square of the distance between a certain pixel point and a target cluster center point of a target cluster under the condition that the pixel point is in a non-background area and within the limited area radius of a target cluster center, and the weighted square of the color difference between the pixel point and the target cluster center point of the target cluster under the condition that the pixel point is in a non-background area and outside the limited area radius of a target cluster center, from different target clusters to different pixels, wherein the weighted coefficients are respectively the membership of the position of a certain pixel point to a certain target cluster and the membership of the color of a certain pixel point to a certain target cluster, and the sum of the difference between the square of the distance between the pixel point and the target cluster center point of the target cluster under the condition that the surrounding neighboring pixels are located in the non-background area and the square of the limited area radius of the target cluster at different pixels; Step 2, giving the membership value of the position of a certain pixel belonging to a certain target cluster when the membership of the position of a certain pixel belongs to a certain target cluster in the fruit and vegetable sorting multi-target image segmentation objective function has a minimum value, and giving the membership value of the color of a certain pixel belonging to a certain target cluster when the membership of the color of a certain pixel belongs to a certain target cluster in the fruit and vegetable sorting multi-target image segmentation objective function has a minimum value; Step 3, giving the position value of the target cluster center point when the fruit and vegetable sorting multi-target image segmentation objective function has a minimum value for the position of a target cluster center point; Step 4, introducing the membership values of different pixel positions belonging to different target clusters at different loop iteration times in step 2, the membership values of different pixel colors belonging to different target clusters, and the position values of different target cluster center points in step 3 into the fruit and vegetable sorting multi-target image segmentation loop iteration process, and ending if the loop iteration error value is less than or equal to the loop iteration error threshold; Step 5, for a pixel point in the non-background area of the image, the set of corresponding target clusters is determined by taking the maximum value of the sum of the membership values of the position of the pixel point belonging to different target clusters and the membership values of the color of the pixel point belonging to different target clusters at the end of the fruit and vegetable sorting multi-target image segmentation loop iteration process described in step 4, so as to segment the image according to the set of different target clusters.
2. The multi-objective image segmentation method for fruit and vegetable sorting equipment according to claim 1, characterized in that: The step 1 specifically includes: When clustering K fruit and vegetable targets in an image that needs to be segmented for multiple targets in a fruit and vegetable sorting device, suppose that for the pixel point at position (i, j) in the image, the color of the LAB color model can be given as (l i,j ,a i,j ,b i,j ), let the position of the target cluster center point of the kth target cluster in the image be (m k ,n k ) and the color of the target cluster center point for the LAB color model is (l k ,a k ,b k ), and 1≤k≤K, let μ k,i,j is the membership of the pixel point (i, j) to the kth target cluster, and satisfies the normalization condition in the target cluster Assume ω k,i,j The color of the pixel at position (i, j) belongs to the kth target cluster and satisfies the normalization condition in the target cluster. Where H is the judgment function, if the condition in the H function is met, it is 1, if the condition in the H function is not met, it is 0, Φ is the color set of the background area in the image, R k is the radius of the limited area of the kth target cluster, is an existence symbol, (i - ,j - ) is the position of the neighboring pixels of the pixel at position (i, j), ξ,ζ are both Lagrange multipliers, I,J are the maximum horizontal coordinate value and the maximum vertical coordinate value of the pixel in the image, and 1≤i≤I and 1≤j≤J, then the pixel at position (i, j) is in and The weighted square sum of the distances between the target cluster center point of the kth target cluster and the color of the pixel at position (i, j) under the condition (l i,j ,a i,j ,b i,j )exist and The color of the target cluster center point (l k ,a k ,b k ) between the weighted square of the color difference between the K targets clustered into I×J pixels, and the pixel at position (i, j) in (l i,j ,a i,j ,b i,j )∈Φ and there exists Under the condition of , the difference between the square of the distance to the center point of the target cluster of the kth target cluster and the square of the radius of the limited area of the target cluster is the sum of I×J pixels to construct the multi-target image segmentation objective function G for fruit and vegetable sorting. The specific form is as follows:
3. The multi-objective image segmentation method for fruit and vegetable sorting equipment according to claim 2, characterized in that: In step 2, the specific method for calculating the membership value of the position of a certain pixel to a certain target cluster when the membership of the fruit and vegetable sorting multi-target image segmentation objective function for the position of a certain pixel to a certain target cluster has a minimum value is: 1) Given the membership μ of the multi-target image segmentation objective function G for the position of the pixel point (i, j) belonging to the kth target cluster, k,i,j The first partial derivative of The specific form is as follows: 2) Give the membership degree μ of the position of the pixel point (i, j) belonging to the kth target cluster as the objective function G of the fruit and vegetable sorting multi-target image segmentation k,i,j The second-order partial derivative of The specific form is as follows: 3) When When it is zero, the dependent variable μ can be given with the Lagrange multiplier ξ as the independent variable. k,i,j The specific forms are as follows: 4) When there is When , the Lagrange multiplier ξ at this time can be given, the specific form is as follows: 5) In Greater than zero and When it is zero, we can give G to μ k,i,j When μ takes the minimum value k,i,j The value of is as follows:
4. The multi-objective image segmentation method for fruit and vegetable sorting equipment according to claim 3 is characterized in that: In step 2, the specific method for calculating the membership value of the color of a pixel point belonging to a target cluster when the membership of the fruit and vegetable sorting multi-target image segmentation objective function for the color of a pixel point belonging to a target cluster has a minimum value is: 1) Given the multi-objective image segmentation objective function G for fruit and vegetable sorting, the color (l i,j ,a i,j ,b i,j ) belongs to the kth target cluster ω k,i,j The first partial derivative of The specific form is as follows: 2) Given the fruit and vegetable sorting multi-objective image segmentation objective function G for the color (l i,j ,a i,j ,b i,j ) belongs to the kth target cluster ω k,i,j The second-order partial derivative of The specific form is as follows: 3) When When it is zero, the dependent variable ω can be given with the Lagrange multiplier ζ as the independent variable k,i,j The specific forms are as follows: 4) When there is When , the Lagrange multiplier ξ at this time can be given, the specific form is as follows: 5) In Greater than zero and When it is zero, we can give G to ω k,i,j When ω takes the minimum value k,i,j The value of is as follows:
5. The multi-objective image segmentation method for fruit and vegetable sorting equipment according to claim 4, characterized in that: The specific method for calculating the position value of the target cluster center point when the fruit and vegetable sorting multi-target image segmentation objective function has a minimum value for the position of a target cluster center point in step 3 is: 1) Give the position of the kth target cluster center point (m k ,n k ) and Considering that H is a judgment function and is used as a restriction condition for the pixels involved in the calculation in the image, it is not necessary to k ,n k Perform a derivative operation, the specific form is as follows: 2) Give the position of the kth target cluster center point (m k ,n k ) and The specific form is as follows: 3) In and Greater than zero and and When it is zero, we can give the relationship between G and m. k and n k When m reaches its minimum value k and n k The value of is as follows:
6. The multi-objective image segmentation method for fruit and vegetable sorting equipment according to claim 5, characterized in that: The multi-objective image segmentation iterative process for fruit and vegetable sorting described in step 4 specifically includes the following three steps: 1) Initialization process: set the number of loop iterations t to zero, set the color set Φ of the background area in the image, set K to the number of rings in the non-background area of the image, and set the kth target cluster center point position (m k (t=0),n k (t=0)) is the position of the center pixel of the ring and the color of the center point of the target cluster is (l k (t=0),a k (t=0),b k (t=0)), set the position of the pixel point (i, j) when the number of loop iterations t is zero to the membership degree μ of the kth target cluster k,i,j The membership degree ω of the color of the pixel at (t=0) and position (i,j) belongs to the kth target cluster k,i,j (t=0) are all set to 1 / K, where 1≤k≤K, 1≤i≤I and 1≤j≤J; 2) Increase the number of loop iterations t by 1, and use the above G to μ k,i,j When μ takes the minimum value k,i,j The specific form of the value of μ is calculated k,i,j (t), by the G to ω k,i,j When ω takes the minimum value k,i,j The specific form of the value of ω is calculated k,i,j (t), in setting m in the H function k ,n k m k (t-1),n k (t-1) k,i,j (t) and ω k,i,j (t) Substitute the G into m k and n k When m reaches its minimum value k and n k The specific form of the value of m is calculated k (t) and n k (t); 3) Calculate the loop iteration error value If ε(t) is less than or equal to the loop iteration error threshold ε T Then it ends, otherwise go to 2).
7. The multi-objective image segmentation method for fruit and vegetable sorting equipment according to claim 6, characterized in that: Step 5 specifically includes: 1) Count the number of objects in the image that meet the requirements at the end of the fruit and vegetable sorting multi-objective image segmentation loop iteration process Under the condition, the pixel (i, j) has different μ for different k. k,i,j (t) and ω k,i,j (t); 2) For satisfaction The pixel point (i, j) under the condition, let the target cluster number χ(i, j) to which the pixel point (i, j) belongs be The corresponding k value is added to the set Θ k | k=χ(i,j) , where 1≤k≤K, 1≤i≤I and 1≤j≤J; 3) According to different k's Θ k Segment the image, where 1≤k≤K.
Citation Information
Patent Citations
Intelligent fruit and vegetable selection method
CN108734710A
Image segmentation method and device, storage medium and terminal equipment
CN110264471A
