A mixed background modeling method for appearance quality characteristics of fruits and vegetables
By calculating the parameter setting error ratio of the gamma distribution function and constructing a cumulative function, the real-time update problem of the background model in the detection of fruit and vegetable appearance quality features is solved, and accurate moving target detection under changes in lighting or environment is achieved.
Patent Information
- Application Number
- CN202311161023.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-08
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2043-09-08
AI Technical Summary
In the detection of appearance quality features of fruits and vegetables, existing technologies find it difficult to establish a real-time and effective background model to cope with changes in lighting or environment, which affects the accuracy of moving target detection.
By calculating whether the error ratio of parameter setting of the gamma distribution function is less than or equal to the error ratio threshold, combined with the observation data of the fruit and vegetable appearance quality feature dataset, a cumulative function is constructed to determine the weighting coefficient, thereby realizing mixed background modeling of fruit and vegetable appearance quality characteristics.
It achieves accurate detection of moving fruit and vegetable targets under changing lighting or environment, and improves the real-time and accuracy of background modeling.
Smart Images

Figure CN117115812B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of fruit and vegetable sorting, and specifically relates to a method for outputting parameters of a gamma distribution function in mixed background modeling of fruit and vegetable appearance quality characteristics, wherein a parameter combination of a corresponding gamma distribution function is calculated by calculating whether a parameter setting error ratio of the gamma distribution function at the current number of cycles is less than or equal to a parameter setting error ratio threshold of the gamma distribution function. Furthermore, a cumulative function of the fruit and vegetable appearance quality characteristic data set is constructed based on observation data and corresponding probabilities of pixel points of fruit and vegetable images in a fruit and vegetable appearance quality characteristic data set, and weighted coefficients of different gamma distribution functions are obtained when the cumulative function reaches a minimum value. Therefore, in the process of detecting the fruit and vegetable appearance quality characteristics, a probability distribution density function can be obtained by using a weighted average of several gamma distribution functions for the observation data of a pixel point of the fruit and vegetable image to implement mixed background modeling of the fruit and vegetable appearance quality characteristics. Background Art
[0002] Video analysis technology has become a crucial research area within artificial intelligence pattern recognition. Background initialization, moving object detection, and background updating are prerequisites and foundations for video analysis, making it a crucial research topic within video and image processing. Moving object detection involves extracting moving object regions from video sequences. Commonly used moving object detection methods include optical flow, frame difference, statistical model-based methods, and background difference. Background difference is one of the most commonly used moving object detection algorithms in complex scenes. Because background difference is relatively fast and can extract relatively complete moving objects in complex scenes, it has been widely researched and developed in the field of moving object detection. The basic principle of background difference is to first obtain the current frame from the video. A background image is generated and updated using background modeling methods. Next, a difference operation is performed between the current frame of the video sequence and the latest background image. A threshold value is again selected based on experience or experimentation. Finally, each pixel in the difference image is processed and binarized by comparing the pixel value at that point with the threshold. Since the binary image is affected by external noise, part of the background image is also used as the foreground target. At the same time, there are holes and small-scale noise in the foreground target. Finally, the binary image is processed using mathematical morphology to remove the small-scale noise and fill the holes inside the moving target, eliminating external interference and obtaining a more ideal moving target image. The background in the video sequence under complex scenes will continue to change over time due to external factors such as lighting. Therefore, in order for the background image to reflect the background of the current frame, it is necessary to establish a suitable background model to reflect the background changes in a timely manner. One of the factors that has the greatest impact on the background difference result is the selection of the background model. The quality of the background model selection is directly related to the accuracy of the moving target detection result.
[0003] Since the high-speed background of the sorting line is constantly changing during the inspection of the appearance quality characteristics of fruits and vegetables, how to obtain a real-time and effective background is the key to realizing mixed background modeling, thereby realizing the detection of moving fruit and vegetable targets, and treating the pixel area with larger differences as the target area to be detected, and the pixel area with smaller differences as the background area, and updating the parameters of the relevant background model in real time as the lighting or environment changes. Summary of the Invention
[0004] The present invention aims to analyze and obtain a parameter combination of a gamma distribution function by calculating whether a parameter setting error ratio of a gamma distribution function at the current number of cycles is less than or equal to a parameter setting error ratio threshold of the gamma distribution function during a loop process for outputting parameters of a gamma distribution function in mixed background modeling of fruit and vegetable appearance quality characteristics, and to construct a cumulative function of the fruit and vegetable appearance quality characteristic dataset using observation data and corresponding probabilities of pixel points of fruit and vegetable images as a function of the square of the error between the probability and the observation data modeling value to provide weighted coefficients of different gamma distribution functions when the cumulative function is minimized, thereby providing mixed background modeling for fruit and vegetable appearance quality characteristics.
[0005] To achieve the above purpose, the technical solutions proposed by the present invention are as follows:
[0006] A mixed background modeling method for fruit and vegetable appearance quality characteristics comprises the following steps:
[0007] Step 1: If, during the detection of fruit and vegetable appearance quality features, the observation data of a certain pixel point in the fruit and vegetable image can be given a probability distribution density function using the weighted average of several gamma distribution functions to achieve mixed background modeling of the fruit and vegetable appearance quality features, then for a certain gamma distribution function in the mixed background modeling of the fruit and vegetable appearance quality features, the mathematical expectation estimate of the observation data variable can be expressed as the observation data variable of the pixel point in the image in the fruit and vegetable appearance quality feature dataset multiplied by the integral of the gamma distribution function between the recommended lower limit value and the recommended upper limit value divided by the number of observation data for integration, and the variance estimate of the square of the observation data variable can be expressed as the square of the observation data variable of the pixel point in the image in the fruit and vegetable appearance quality feature dataset multiplied by the integral of the gamma distribution function between the recommended lower limit value and the recommended upper limit value divided by the number of observation data for integration minus the square of the mathematical expectation estimate of the observation data variable;
[0008] Step 2: In the loop process for outputting the parameters of a gamma distribution function in the mixed background modeling of the appearance quality characteristics of fruits and vegetables, by calculating whether the parameter setting error ratio of the gamma distribution function at the current loop number is less than or equal to the parameter setting error ratio threshold of the gamma distribution function, if so, the loop process can be ended; if not, the loop number is increased by one and the range is expanded on both sides according to the parameter combination corresponding to the minimum parameter setting error ratio threshold of the gamma distribution function at the previous loop number, and at the same time, the value interval of one of the parameters is contracted according to the value reduction ratio until the parameter combination of the gamma distribution function corresponding to the parameter setting error ratio of the gamma distribution function is calculated to be less than or equal to the parameter setting error ratio threshold of the gamma distribution function;
[0009] Step 3: A cumulative function of the square of the error between the probability and the modeled value of the observed data for the fruit and vegetable appearance quality feature dataset can be constructed using the observed data and the corresponding probabilities of the pixel points of the fruit and vegetable images in the fruit and vegetable appearance quality feature dataset; a second-order derivative of the cumulative function with respect to a weighted coefficient of a gamma distribution function can be determined to be greater than zero, and when a first-order derivative of the cumulative function with respect to the weighted coefficient of the gamma distribution function is zero, the weighted coefficients of different gamma distribution functions that can minimize the cumulative function are given;
[0010] Step 4: A gamma distribution function whose variance estimate of the square of the observed data variable is greater than or equal to the variance threshold of the mixed background model of the fruit and vegetable appearance quality characteristics and whose weighting coefficient is greater than or equal to the weight threshold of the mixed background model of the fruit and vegetable appearance quality characteristics can be added to the gamma distribution function set corresponding to the background model in the mixed background modeling of the fruit and vegetable appearance quality characteristics.
[0011] Furthermore, step 1 specifically includes: assuming that the observation data x of the pixel k of the fruit and vegetable image in the process of detecting the appearance quality characteristics of the fruit and vegetable is k The weighted average of R gamma distribution functions can be used to model the mixed background of the appearance quality characteristics of fruits and vegetables. For the pixel point k of the fruit and vegetable image, the probability distribution density function p(x k ) can be expressed as:
[0012]
[0013] Among them, w r is the weighting coefficient of the rth gamma distribution function, α r and β r are the parameters of the rth gamma distribution function, and set α r is a positive integer greater than 1, Γ(x) is the gamma function, x k is the observation data variable of pixel k;
[0014] For the rth gamma distribution function in the mixed background modeling of fruit and vegetable appearance quality characteristics, let the mathematical expectation estimate of the observed data variable be It can be expressed as:
[0015]
[0016] Among them, H r The observation data of the pixel points in the image in the fruit and vegetable appearance quality feature dataset Θ belongs to the interval The number of and are the recommended lower limit and upper limit of the rth gamma distribution function, l and c are the operation variables, and x is the observation data variable of the pixel point in the fruit and vegetable appearance quality feature dataset Θ;
[0017] For the rth gamma distribution function in the mixed background modeling of fruit and vegetable appearance quality characteristics, let the mathematical expectation estimate of the square of the observed data variable be It can be expressed as:
[0018]
[0019] For the rth gamma distribution function in the mixed background modeling of fruit and vegetable appearance quality characteristics, let the variance estimate of the square of the observed data variable be It can be expressed as:
[0020]
[0021] Furthermore, step 2 specifically includes:
[0022] Step 2.1: Set the number of cycles λ to 0, and for the rth gamma distribution function in the mixed background modeling of fruit and vegetable appearance quality characteristics, set α r The value range of (λ=0) is [M λ=0 ,N λ=0 ], where M λ and N λ When the number of cycles λ and α are r The lower and upper limits of the value, β r The value interval of (λ=0) is (P λ=0 ,Q λ=0 ) and the value interval is set to ρ λ=0 , where P λ and Q λ When the number of cycles λ and β are r The lower and upper limits of the value, ρ λ When β is the number of cycles λ r The value interval of ξ and ζ are set as parameters α r and parameter β r The expansion range, τ is β r The value reduction ratio of
[0023] Step 2.2: For the number of cycles λ, α r (λ) and β r The value interval of (λ) is obtained by combining (α r (λ),β r (λ)))Calculation where δ r,λ Set the error ratio for the parameter of the rth gamma distribution function at the number of cycles λ. If there is δ r,λ The parameter setting error ratio threshold Δ is less than or equal to the rth gamma distribution function r Go to step 2.4, otherwise record δ r,λMinimum corresponding combination Go to step 2.3;
[0024] Step 2.3: Add 1 to λ and set M λ and N λ They are and Where ∨ is the maximum operation, set P λ and Q λ They are and When setting the number of cycles λ, β r The value interval is ρ λ=0 ·τ λ , go to step 2.2;
[0025] Step 2.4: Output satisfies δ r,λ ≤Δ r combination of is the parameter (α) of the rth gamma distribution function in the mixed background modeling of fruit and vegetable appearance quality characteristics r ,β r );
[0026] Furthermore, step 3 specifically includes:
[0027] Step 3.1: For the fruit and vegetable appearance quality feature dataset Ξ, the observation data x(h,i,j) of the pixel point (i,j) in the fruit and vegetable image h and the corresponding probability y(h,i,j) are used to construct the cumulative function G(w) of the error square of the probability and the observation data modeling value for the fruit and vegetable appearance quality feature dataset. r ):
[0028]
[0029] Step 3.2: By the G(w r ) for the w r Taking the first and second order derivatives we get:
[0030]
[0031]
[0032] Step 3.3: By It is known that When there is G(w r ) is the minimum value, at this time We can get:
[0033]
[0034] set up Finally, considering that different r exist It can be rewritten as different r exist The corresponding system of equations:
[0035]
[0036] Step 3.4: Set After that, different r can exist The corresponding system of equations is changed to exist for different r The corresponding matrix form is:
[0037]
[0038] Considering that there is A for different r m,n >0, we know that the matrix [A m,n ] R×R The rank of is R, then the matrix is full rank, then we can give different r The corresponding matrix expression of the solution of the system of equations is:
[0039]
[0040] In which, let P be
[0041] Furthermore, step 4 specifically includes:
[0042] Considering that background pixels generally have small variance and large weight, the set of gamma distribution functions corresponding to the background model in the mixed background modeling of fruit and vegetable appearance quality features can be expressed as follows:
[0043]
[0044] Among them, θ D and θ ω They are the variance threshold of the mixed background model of fruit and vegetable appearance quality features and the weight threshold of the mixed background model of fruit and vegetable appearance quality features respectively. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 A diagram showing the steps of mixed background modeling for appearance quality characteristics of fruits and vegetables;
[0046] Figure 2 A diagram of a cyclic process for obtaining parameter combinations of the gamma distribution function;
[0047] Figure 3 is the observation data variable of the pixel point in the fruit and vegetable appearance quality feature dataset Θ with respect to the rth gamma distribution function;
[0048] Figure 4 for Constantly adjusting for fixation Comparison chart of normalized gamma distribution functions;
[0049] Figure 5 for Constantly adjusting for fixation Comparison chart of normalized gamma distribution functions;
[0050] Figure 6 A diagram showing steps for determining weighting coefficients of different gamma distribution functions that can minimize the cumulative function;
[0051] Figure 7 The figure shows the weight coefficients of different gamma distribution functions when R=5. DETAILED DESCRIPTION
[0052] In order to make the purpose, technical solutions and advantages of the present invention more clear, the technical solutions of the present invention are further described below.
[0053] Reference Figure 1 A mixed background modeling method for fruit and vegetable appearance quality characteristics includes the following steps:
[0054] Step 1: Assume that the observation data x for pixel k of the fruit and vegetable image in the process of fruit and vegetable appearance quality feature detection is k The weighted average of R gamma distribution functions can be used to model the mixed background of the appearance quality characteristics of fruits and vegetables. For the pixel point k of the fruit and vegetable image, the probability distribution density function p(x k ) can be expressed as:
[0055]
[0056] Among them, w r is the weighting coefficient of the rth gamma distribution function, α r and β r are the parameters of the rth gamma distribution function, and α r is a positive integer greater than 1, Γ(x) is the gamma function, and x is the observed data variable;
[0057] For the rth gamma distribution function in the mixed background modeling of fruit and vegetable appearance quality characteristics, let the mathematical expectation estimate of the observed data variable be It can be expressed as:
[0058]
[0059] Among them, H r The observation data of the pixel points in the image in the fruit and vegetable appearance quality feature dataset Θ belongs to the interval The number of and are the recommended lower limit and upper limit of the rth gamma distribution function, respectively, l and c are the operation variables;
[0060] For the rth gamma distribution function in the mixed background modeling of fruit and vegetable appearance quality characteristics, let the mathematical expectation estimate of the square of the observed data variable be It can be expressed as:
[0061]
[0062] For the rth gamma distribution function in the mixed background modeling of fruit and vegetable appearance quality characteristics, let the variance estimate of the square of the observed data variable be It can be expressed as:
[0063]
[0064] Reference Figure 2 , step 2 includes the following 4 steps:
[0065] Step 2.1: Assume that the observation data of the pixel points in the image in the fruit and vegetable appearance quality feature dataset Θ belongs to the interval The number of H r =100, where the recommended lower limit of the rth gamma distribution function is and the recommended upper limit and are 5 and 35 respectively. The observation data variables of the pixel points in the fruit and vegetable appearance quality feature dataset Θ with respect to the rth gamma distribution function are as follows: Figure 3 As shown; set the number of cycles λ to 0, for the rth gamma distribution function in the mixed background modeling of fruit and vegetable appearance quality characteristics, set α r The value range of (λ=0) is [M λ=0 ,N λ=0 ], where M λ and N λ When the number of cycles λ and α are r The lower and upper limits of the value, β r The value interval of (λ=0) is (P λ=0 ,Q λ=0 ) and the value interval is set to ρ λ=0 , where P λ and Q λ When the number of cycles λ and β are r The lower and upper limits of the value, ρ λ When β is the number of cycles λ r The value interval of ξ and ζ are set as parameters α r and parameter β r The expansion range, τ is β r The value reduction ratio of
[0066] Step 2.2: For the number of cycles λ, α r (λ) and β r The value interval of (λ) is obtained by combining (α r (λ),β r (λ) calculation where δ r,λ Set the error ratio for the parameter of the rth gamma distribution function at the number of cycles λ. If there is δ r,λ The parameter setting error ratio threshold Δ is less than or equal to the rth gamma distribution function r Go to step 2.4, otherwise record δ r,λ Minimum corresponding combination Go to step 2.3;
[0067] Step 2.3: Add 1 to λ and set M λ and N λ They are and Where ∨ is the maximum operation, set P λ and Q λ They are and When setting the number of cycles λ, β r The value interval is ρ λ=0 ·τ λ , go to step 2.2;
[0068] Step 2.4: Output satisfies δ r,λ ≤Δ r combination of is the parameter (α) of the rth gamma distribution function in the mixed background modeling of fruit and vegetable appearance quality characteristics r ,β r );
[0069] In step 2, according to Figure 3 The following combinations of observation data can be set: like Figure 4 and Figure 5 As shown, in Figure 4 middle To fix, constantly adjust In 5 To fix, constantly adjust By comparing in step 2, the combination can be determined Take (3,4.25) for Figure 4 Observational data shown;
[0070] Reference Figure 6 , step 3 includes the following 4 steps:
[0071] Step 3.1: For the fruit and vegetable appearance quality feature dataset Ξ, the observation data x(h,i,j) of the pixel point (i,j) in the fruit and vegetable image h and the corresponding probability y(h,i,j) are used to construct the cumulative function G(w) of the error square of the probability and the observation data modeling value for the fruit and vegetable appearance quality feature dataset. r ):
[0072]
[0073] Step 3.2: By the G(w r ) for the w r Taking the first and second order derivatives we get:
[0074]
[0075]
[0076] Step 3.3: By It is known that When there is G(w r ) is the minimum value, at this time We can get:
[0077]
[0078] set up Finally, considering that different r exist It can be rewritten as different r exist The corresponding system of equations:
[0079]
[0080] Step 3.4: Set After that, different r can exist The corresponding system of equations is changed to exist for different r The corresponding matrix form is:
[0081]
[0082] Considering that there is A for different r m,n >0, we know that the matrix [A m,n ] R×R The rank of is R, then the matrix is full rank, then we can give different r The corresponding matrix expression of the solution of the system of equations is:
[0083]
[0084] In which, let P be
[0085] Located in Figure 7 The figure shows the weighted coefficients of different gamma distribution functions obtained from the fruit and vegetable appearance quality feature dataset Θ through step 3 when R is set to 5.
[0086] Step 4: Considering that background pixels generally have small variance and large weights, the set of gamma distribution functions corresponding to the background model in the mixed background modeling of fruit and vegetable appearance quality features can be expressed as follows:
[0087]
[0088] Among them, θ D and θ ω They are the variance threshold of the mixed background model of fruit and vegetable appearance quality features and the weight threshold of the mixed background model of fruit and vegetable appearance quality features respectively.
[0089] If for the combination correspond Figure 7 w when r=5 r is 0.393, where θ D and θ ω If they are set to 0.15 and 0.3 respectively, the fifth gamma distribution function can be recommended as the background model in the mixed background modeling of fruit and vegetable appearance quality characteristics.
[0090] Any parts not specified in this embodiment can be implemented using existing technologies.
[0091] The above is merely a description of an embodiment of the present invention, but the protection scope of the present invention should not be considered as limited to the specific forms described in the embodiment. The protection scope of the present invention also extends to equivalent technical means that can be conceived by those skilled in the art based on the concept of the present invention.
Claims
1. A mixed background modeling method for fruit and vegetable appearance quality characteristics, characterized by: The method comprises the following steps: Step 1: If, during the detection of fruit and vegetable appearance quality features, the observation data of a certain pixel point in the fruit and vegetable image can be given a probability distribution density function using the weighted average of several gamma distribution functions to achieve mixed background modeling of the fruit and vegetable appearance quality features, then for a certain gamma distribution function in the mixed background modeling of the fruit and vegetable appearance quality features, the mathematical expectation estimate of the observation data variable can be expressed as the observation data variable of the pixel point in the image in the fruit and vegetable appearance quality feature dataset multiplied by the integral of the gamma distribution function between the recommended lower limit value and the recommended upper limit value divided by the number of observation data for integration, and the variance estimate of the square of the observation data variable can be expressed as the square of the observation data variable of the pixel point in the image in the fruit and vegetable appearance quality feature dataset multiplied by the integral of the gamma distribution function between the recommended lower limit value and the recommended upper limit value divided by the number of observation data for integration minus the square of the mathematical expectation estimate of the observation data variable; Step 2: In a loop process for outputting parameters of a gamma distribution function in mixed background modeling of fruit and vegetable appearance quality characteristics, by calculating whether the parameter setting error ratio of the gamma distribution function at the current loop number is less than or equal to the parameter setting error ratio threshold of the gamma distribution function, if so, the loop process can be ended; if not, the loop number is increased by one, and the parameter combination corresponding to the minimum parameter error ratio threshold of the gamma distribution function at the previous loop number is determined, and the value range of the parameter combination is expanded. At the same time, the value interval of one parameter is contracted according to the value reduction ratio until a parameter combination of the gamma distribution function corresponding to the parameter setting error ratio of the gamma distribution function is calculated to satisfy whether the parameter setting error ratio of the gamma distribution function is less than or equal to the parameter setting error ratio threshold of the gamma distribution function; Step 3: A cumulative function for the fruit and vegetable appearance quality feature dataset can be constructed using the observed data and corresponding probabilities of the pixel points of the fruit and vegetable images in the fruit and vegetable appearance quality feature dataset. The cumulative function is the square of the error between the probability and the modeled value of the observed data. A second-order derivative of the cumulative function with respect to a weighted coefficient of a gamma distribution function can be determined to be greater than zero. When a first-order derivative of the cumulative function with respect to the weighted coefficient of the gamma distribution function is zero, the weighted coefficients of different gamma distribution functions that can minimize the cumulative function are given. Step 4: Add the gamma distribution function whose variance estimate of the square of the observed data variable is greater than or equal to the variance threshold of the mixed background model of the fruit and vegetable appearance quality characteristics to the gamma distribution function set corresponding to the background model in the mixed background modeling of the fruit and vegetable appearance quality characteristics, and add the gamma distribution function whose weighting coefficient is greater than or equal to the weight threshold of the mixed background model of the fruit and vegetable appearance quality characteristics to the gamma distribution function set corresponding to the background model in the mixed background modeling of the fruit and vegetable appearance quality characteristics. Take the intersection of the above two gamma distribution function sets to obtain the final gamma distribution function set.
2. A mixed background modeling method for fruit and vegetable appearance quality characteristics according to claim 1, characterized in that: The specific method of step 1 is: Assume that in the process of detecting the appearance quality features of fruits and vegetables, the pixel points of the fruit and vegetable images are Observational data Can be used The weighted average of the gamma distribution functions is used to model the mixed background of the appearance quality characteristics of fruits and vegetables. Then, for the pixel points of the fruit and vegetable image, In terms of the probability distribution density function of mixed background modeling of fruit and vegetable appearance quality characteristics It can be expressed as: ; in, For the The weighting coefficients of the gamma distribution function, and Respectively The parameters of the gamma distribution function, Pixel Observation data variables; For the mixed background modeling of fruit and vegetable appearance quality characteristics Gamma distribution function, let the mathematical expectation estimate of the observed data variable be It can be expressed as: ; in, Fruit and vegetable appearance quality feature dataset The observed data of the pixel points in the image belong to the interval The number of and Respectively The recommended lower and upper limits of the gamma distribution function, and is the operation variable, Fruit and vegetable appearance quality feature dataset The observed data variable of the pixel point; For the mixed background modeling of fruit and vegetable appearance quality characteristics Gamma distribution function, let the variance estimate of the square of the observed data variable be It can be expressed as: 。 3. The mixed background modeling method for fruit and vegetable appearance quality characteristics according to claim 1, characterized in that: The specific method of step 2 is: Step 2.1: Set the number of loops is 0, for the mixed background modeling of fruit and vegetable appearance quality characteristics Gamma distribution function, set The value range of ,in and The number of cycles hour The lower and upper limits of the value of The value range of And the value interval is set to ,in and The number of cycles hour The lower and upper limits of the value of Is the number of cycles hour The value interval of and The parameters are and parameters The expansion range, for The value reduction ratio of Step 2.2: For the number of cycles hour and The value range is determined by combining calculate ,in Is the number of cycles Time The error ratio of the parameter setting of the gamma distribution function, if any Less than or equal to The parameter setting error ratio threshold of the gamma distribution function Go to step 2.4, otherwise record this time Minimum corresponding combination , go to step 2.3; Step 2.3: Add 1, set and They are and ,in To take the largest operation, set and They are and , set the number of loops hour The value interval is , go to step 2.2; Step 2.4: Output satisfies combination of The first step in mixed background modeling of fruit and vegetable appearance quality characteristics Parameters of the gamma distribution function .
4. The mixed background modeling method for fruit and vegetable appearance quality characteristics according to claim 1, characterized in that: The specific method of step 3 is: Step 3.1: For the fruit and vegetable appearance quality feature dataset , through pictures of fruits and vegetables Medium pixel Observational data and the corresponding probability Constructing a cumulative function of the squared error between the probability and the observed data model for the fruit and vegetable appearance quality characteristic dataset : ; Step 3.2: As described Regarding the Taking the first and second order derivatives we get: ; ; Step 3.3: By It is known that Time Existence is the minimum value, at this time We can get: ; set up Afterwards, considering the different All exist , can be rewritten as different All exist The corresponding system of equations: ; Step 3.4: Set , Afterwards, different All exist The corresponding system of equations is changed to different All exist The corresponding matrix form: ; Taking into account the different All exist , we know that the matrix The rank of , then the matrix is full rank, then different All exist The corresponding matrix expression of the solution of the system of equations is: ; Among them, for .
5. The mixed background modeling method for fruit and vegetable appearance quality characteristics according to claim 1, characterized in that: The specific method of step 4 is: The set of gamma distribution functions corresponding to the background model in the mixed background modeling of fruit and vegetable appearance quality features can be expressed as follows: ; in, and They are the variance threshold of the mixed background model of fruit and vegetable appearance quality features and the weight threshold of the mixed background model of fruit and vegetable appearance quality features respectively.
Citation Information
Patent Citations
Emendation method and apparatus for gamma characteristic of video communication
CN101132538A
Quick detecting method for synthetic aperture radar image of ship target
CN106170819A