A pearl oyster kernel image processing optimization method
Through improved geometric average optimization algorithm and white balance color correction technology, the problem of inaccurate nucleation caused by blurred images of pearl shell kernels is solved, and a clearer and more accurate image processing effect is achieved.
Patent Information
- Application Number
- CN202411638960.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-18
- Publication Date
- 2025-02-25
- Estimated Expiration
- 2044-11-18
AI Technical Summary
The kernel image of the pearl shell is blurred due to water droplets and light problems, which affects the accuracy of the nucleation operation.
The improved geometric average optimization algorithm is used to optimize the parameters α and β of the normalized non-complete Beta function, and combined with white balance color correction and Kapur threshold algorithm to improve image clarity and contrast.
It effectively improves the clarity and contrast of the kernel image of the pearl shell, ensures the accuracy of the nucleation operation, and improves the survival rate and quality of the pearl shell.
Smart Images

Figure CN119151844B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image processing, and in particular to a pearl shell kernel image processing optimization method. Background Art
[0002] Image processing of the pearl oyster kernel is a crucial step in the insertion of the nucleus in Pearl oysters. During the insertion of the nucleus in Pearl oysters using a nucleator, the position of the pearl oyster nucleus needs to be determined. Therefore, the clearer the image of the nucleus position inside the pearl oyster, the more precise the position and the more accurate the insertion, the higher the survival rate of the pearl oyster and the better the quality of the pearl. However, the internal environment of the pearl oyster is complex, the lighting conditions are often not ideal and there is a water layer on the surface of the flesh, which results in blurred images and insufficient details, affecting the accurate identification of the nucleus position.
[0003] Incomplete Beta Function Normalization (IBFN) is an image enhancement technique that is mainly used to adjust the contrast of an image to make the details of the image clearer. However, although this method has shown superiority in image enhancement applications, the effect of the IBFN depends largely on the selection of parameters α and β, which are often selected based on experience or trial and error, and require multiple adjustments to achieve the best effect.
[0004] The intelligent optimization algorithm is used to optimize the parameters of the image enhancement algorithm. By simulating natural processes or human intelligent behavior, the image enhancement parameters are automatically adjusted and optimized to achieve the best performance of the image enhancement algorithm, so as to improve the clarity and quality of underwater images. The geometric mean optimization algorithm (GMO) uses a single indicator to simultaneously evaluate the fitness and diversity of the search individuals in the search space, called the dual-fitness index (DFI). It simulates the unique properties of the geometric mean operator in mathematics; this operator can simultaneously evaluate the fitness and diversity of the search agents in the search space, and has good global search performance; however, the optimization accuracy of the geometric mean optimization algorithm in the local convergence stage is poor, which makes the global optimization balance of the geometric mean optimization algorithm poor, and there is also the problem of being easily trapped in the local optimum. Summary of the invention
[0005] In view of the defects existing in the above-mentioned prior art, the present invention provides a pearl oyster kernel image processing optimization method, which uses an improved geometric mean optimization algorithm to optimize the image enhancement parameters α and β of the normalized non-complete Beta function, and uses the normalized non-complete Beta function (WGMO-Beta) with the optimal enhancement parameters to enhance the pearl oyster kernel image, so as to solve the problem that the image blurring of the pearl oyster kernel image caused by water droplets and light problems affects the kernel insertion operation, and solves the problem of inaccurate kernel insertion position during automatic kernel insertion in Martensii pearl oysters.
[0006] To achieve the above-mentioned purpose, the technical solution adopted by the present invention is: a pearl oyster kernel image processing optimization method, the specific steps include:
[0007] S1, performing grayscale processing on the original image of the pearl oyster kernel to obtain a first grayscale image, and performing preprocessing and denoising on the first grayscale image to obtain a second grayscale image;
[0008] S2, segmenting the second grayscale image using the Kapur threshold algorithm to separate the pearl oyster meat and the pearl oyster core to obtain a third grayscale image;
[0009] S3. Using an improved geometric mean optimization algorithm to adjust the optimal parameters α and β of the normalized incomplete Beta function, enhancing the third grayscale image by using the optimized normalized incomplete Beta function, and outputting an enhanced pearl oyster kernel image. The improved geometric mean optimization algorithm has the following specific improvement steps:
[0010] Step 1: Construct an optimal direction alignment strategy, and use the geometric mean optimization algorithm to optimize the individual velocity vector and points to the global optimal individual position The alignment degree is used to monitor whether the geometric mean optimization algorithm falls into the local optimum during the optimization process, and the optimization mechanism of the geometric mean optimization algorithm is improved;
[0011] Step 2: By introducing differential variation perturbation factor and calibration factor Improve the geometric mean optimization algorithm control factor w, using the improved control factor Improved speed parameter of geometric mean optimization algorithm , through the speed parameter Improved mathematical model of position update of geometric mean optimization algorithm.
[0012] Specifically, the grayscale processing of the original image of the pearl oyster kernel is performed to obtain the first grayscale image. The specific method is: the weighted average of the three components of RGB is calculated to convert the original image of the pearl oyster kernel from the RGB color space to the grayscale space; RGB includes red (R), green (G) and blue (B), that is, each pixel of the pearl oyster kernel image is composed of three components of RGB, and the weights of the three components are set based on the sensitivity of the human eye to different colors. The mathematical model is:
[0013] (1);
[0014] In formula (1), is the gray value of the rth pixel in the pearl oyster kernel image.
[0015] Specifically, the first grayscale image is preprocessed and denoised to obtain the second grayscale image. The preprocessing adopts a white balance color correction method to adjust the pearl oyster kernel image. The white balance color correction can improve the color deviation of the image. Usually, the pearl oyster kernel image presents a blue-green hue due to the absorption and scattering characteristics of water. The white balance processing can make the color of the pearl oyster kernel image closer to the natural color. The average reflectivity of the water on the surface of the pearl oyster kernel is neutral gray, so ,in, , , are the average values of the red, green, and blue channels of the pearl oyster kernel image respectively; by calculating the ratio between each channel and its average value, and using this ratio to adjust the pearl oyster kernel image to achieve white balance color correction, the mathematical model is:
[0016] , , ;
[0017] in, , , are the values of the red, green, and blue channels of the adjusted pearl shell kernel image, is the average value of all pixels in the pearl oyster kernel image in all color channels (red, green, and blue).
[0018] Specifically, in the pearl oyster kernel image, due to the attenuation of light and the scattering effect of water on the internal surface, the pearl oyster kernel is often not easy to identify. The second grayscale image is segmented using the Kapur threshold algorithm to obtain a third grayscale image, the purpose of which is to effectively distinguish the kernel position in the pearl oyster kernel image, including separating the kernel from the flesh of the pearl oyster kernel image; the specific steps are:
[0019] S21, calculating the histogram of the second grayscale image, that is, the number of times the grayscale levels of 250 pixel values appear;
[0020] S22. Convert the histogram into a probability distribution, that is, the probability of each gray level appearing, probability p\left [ {l} \right ] The mathematical model is:
[0021] (2);
[0022] In formula (2), p\left [ {l} \right ] For the The probability of a gray level appearing, H\left [ {l} \right ] For the The number of gray levels that appear, is the total number of pixels in the pearl oyster kernel image;
[0023] S23, using cumulative probability and cumulative average grayscale entropy of the core and meat parts of the pearl oyster kernel image; the mathematical model is:
[0024] (3);
[0025] (4);
[0026] In formula (3) and formula (4), is the total number of gray levels, the value is 255, The core part of the pearl shell kernel image is at the threshold The cumulative probability and cumulative average gray level under The flesh part of the pearl oyster kernel image is at the threshold The cumulative probability and cumulative average gray level under is the entropy of the core part of the pearl shell kernel image, is the entropy of the flesh part of the pearl oyster kernel image;
[0027] S24. Calculate the total entropy at each threshold , select The maximum threshold is used as the optimal segmentation threshold, and the pearl oyster kernel image is segmented into a kernel and a meat portion using the optimal segmentation threshold to obtain a third grayscale image.
[0028] Specifically, the geometric mean optimization algorithm is improved, and an optimal direction alignment strategy is constructed. The alignment between the individual velocity vector and the global optimal individual position is used to monitor whether the algorithm falls into the local optimum during the optimization process, that is, the local optimal aggregation. The specific method is as follows:
[0029] S31. Design alignment function , calculate the alignment between the individual velocity vector and the global optimal individual position, and the mathematical model is:
[0030] (5);
[0031] In formula (5), is the velocity vector of the ith individual at the tth iteration, is the global optimal individual position, is the position of the i-th individual in the t-th iteration;
[0032] S32, calculate the average alignment value of the individuals in the current t-th iteration of the geometric mean optimization algorithm population (6) If the average alignment value avg is less than 0.2, it means that the geometric mean optimization algorithm falls into a local optimal solution;
[0033] In formula (6), is the maximum population size.
[0034] Specifically, by introducing the differential variation perturbation factor and calibration factor Improve the control factor w and introduce the differential variation perturbation factor and calibration factor It can make it easier for individuals in the geometric mean optimization algorithm to jump out of the local optimum, improve the accuracy of solving the optimal parameters α and β in the local optimum, stabilize the control factor step size through the sine function, and use the improved control factor Improved speed parameter of geometric mean optimization algorithm , so that the improved speed parameter In the process of optimizing the optimal parameters α and β of the normalized incomplete Beta function with the geometric mean optimization algorithm, the optimization speed is adjusted adaptively and nonlinearly to avoid the geometric mean optimization algorithm from falling into the local optimum due to too fast speed, which affects the accuracy of the parameters α and β, and thus affects the enhancement effect of the normalized incomplete Beta function on the pearl oyster kernel image; the improved control factor The mathematical model is:
[0035] (6);
[0036] In formula (6), is the current iteration number, is the maximum number of iterations, is the fitness value of the i-th individual in the t-th iteration, is the average fitness value of the population in the tth iteration, is the global maximum fitness value, the differential mutation perturbation factor The mathematical model is: , is the global optimal individual position of the tth iteration; calibration factor The mathematical model is: ; In the formula, is the maximum fitness value in the population at the tth iteration.
[0037] Specifically, using the improved control factor Improved speed parameter of geometric mean optimization algorithm , the mathematical model is:
[0038] (7);
[0039] In formula (7), is the improved speed parameter value of the i-th individual in the t+1th iteration, is the improved speed parameter value of the i-th individual in the t-th iteration, is the target position of the mutation, is the position of the i-th individual in the t-th iteration, is the scaling parameter, and the mathematical model is: ; Where rand is a random number between 0 and 1.
[0040] Specifically, the fitness function is an evaluation function that reflects the geometric mean optimization algorithm's performance in finding the optimal parameters α and β of the normalized non-complete Beta function. The fitness value determines the performance of finding the optimal parameters α and β of the normalized non-complete Beta function, that is, the accuracy of the optimal parameters α and β. The fitness function of the present invention is Added pixel difference As an independent component, the smaller the fitness value, the higher the accuracy of the optimal parameters α and β; the mathematical model of the fitness function is:
[0041] (8);
[0042] In formula (8), is the information entropy of the pearl shell kernel image, The image compactness of the pearl oyster core.
[0043] Specifically, in the fitness function, The mathematical model is:
[0044] (9);
[0045] In formula (9), is the pixel value of the pearl oyster kernel image pixel (x, y), is the total number of pixels in the pearl oyster kernel image, and the formula is: , and are the length and width of the pearl oyster core image respectively;
[0046] (10);
[0047] In formula (10), is the pixel value of the pearl oyster kernel image pixel (x+2, y).
[0048] Specifically, the specific steps of determining the optimal parameters α and β of the normalized incomplete Beta function using the improved geometric mean optimization algorithm are as follows:
[0049] S21, encoding the α and β parameters of the normalized incomplete Beta function for pearl oyster kernel image enhancement into a 2-dimensional vector, and establishing a mapping relationship between the α and β parameter vectors and the individual positions of the improved geometric mean optimization algorithm;
[0050] S22, randomly initialize N individual initial positions of the improved geometric mean optimization algorithm (WGMO); initialize the maximum number of iterations of the improved geometric mean optimization algorithm , problem dimension , the upper bounds of α and β parameters and lower bound And the improved control factor The initial value and maximum population size ;
[0051] S23, judging whether the current number of iterations t reaches the maximum number of iterations T, if t=T, then exit the optimization, and resolve the individual position corresponding to the global minimum fitness value into the α and β parameter values of the normalized incomplete Beta function, otherwise, execute step S24;
[0052] S24. Using fitness function Calculate the fitness value of each individual in the population at the current iteration of the improved geometric mean optimization algorithm, and arrange them in ascending order to retain the individual position corresponding to the minimum fitness value;
[0053] S25, Simulating the geometric mean operator and introducing the improved control factor Mathematical model: Establish the improved mathematical model of geometric mean optimization algorithm; Update individual positions, that is, update the parameters α and β of the normalized incomplete Beta function;
[0054] S26, using the optimal direction alignment strategy, calculate the alignment between the updated velocity vector of each individual and the position pointing to the global optimal individual, and check whether the improved geometric mean optimization algorithm falls into a local optimum in this iteration;
[0055] S27. If the iteratively improved geometric mean optimization algorithm falls into a local optimum, the population position is updated by performing Levy flight perturbation with the current best individual as the center using formula (11) to jump out of the local optimum;
[0056] (11);
[0057] In formula (11), is the position of the i-th individual after jumping out of the local optimum; is the global optimal individual position, is the Levy distribution function, is the position of a random individual A in the population, is the position of a random individual B in the population;
[0058] S28. Execute t+1 for the current iteration number t; return to S23.
[0059] Specifically, the geometric mean operator is simulated and the improved control factor is introduced Mathematical model The specific steps of establishing the mathematical model of the improved geometric mean optimization algorithm are:
[0060] S251. Referring to the concept of fuzzy logic, the similarity between several variables is simulated by multiplying the fuzzy membership function values belonging to these variables. The geometric mean of s memberships can be expressed by formula (12):
[0061] (12);
[0062] In formula (12), is the first membership value, is the second membership value, is the sth membership value;
[0063] S252, simulating and calculating the fuzzy membership function, and establishing a mathematical model according to formula (13);
[0064] (13);
[0065] In formula (13), is the fuzzy membership function value of the i-th individual in the t-th iteration, and are the mean and standard deviation of the objective function values of the best personal agent in all t-th iterations, The objective function value of the best agent in the population at the tth iteration;
[0066] S253, simulating and calculating the dual fitness index value, and establishing a mathematical model according to formula (14);
[0067] (14);
[0068] In formula (14), is the dual fitness index of the i-th individual at the t-th iteration;
[0069] S254, simulating and generating a global guiding agent, and establishing a mathematical model according to formula (15);
[0070] (15);
[0071] In formula (15), is the position of the i-th leader agent at the t-th iteration, is the best position at the tth iteration, It is a positive number, and its value is 0.01;
[0072] S255, simulating the mutation of the leader agent in the improved geometric mean optimization algorithm, selecting Gaussian mutation as the mutation scheme, and establishing a mathematical model according to formula (16);
[0073] (16);
[0074] In formula (16), is the target position of the mutation, is the position of the i-th leader agent at the t-th iteration, are random values generated from a standard normal distribution, is the maximum standard deviation of the best individual up to the tth iteration, is the standard deviation of the best individual up to the tth iteration; is the mutation step parameter, which decreases linearly from 0 to 1. The mathematical model is: ;
[0075] S256, using formula (7) to establish an individual speed update mathematical model, and using the speed mathematical model according to formula (17) to establish an individual position update mathematical model;
[0076] (17);
[0077] In formula (17), is the position of the i-th individual at the t+1th iteration, is the position of the i-th individual at the t-th iteration, is the improved speed parameter value of the i-th individual at the t+1-th iteration.
[0078] Compared with the prior art, the technical solution of the present invention has the following advantages and beneficial effects: the present invention uses the differential variation perturbation factor The introduction of the calibration factor improves the adjustment of the control factor, so that the algorithm can adaptively adjust the optimization speed nonlinearly during the optimization process, effectively avoiding the local optimal trap; at the same time, it can make it easier for the geometric mean optimization algorithm to jump out of the local optimal state, improve the accuracy of solving the optimal parameters α and β in the local optimal state, stabilize the control factor step size through the sine function, and use the improved control factor Improved speed parameter of geometric mean optimization algorithm , so that the improved speed parameter In the process of optimizing the optimal parameters α and β of the normalized incomplete Beta function using the geometric mean optimization algorithm, the optimization speed is adjusted adaptively and nonlinearly to avoid the geometric mean optimization algorithm falling into the local optimum due to too fast speed. The optimal direction alignment strategy is introduced to ensure the global search ability of the algorithm in the optimization process by monitoring whether the algorithm falls into the local optimum, avoid the local optimum problem, and improve the accuracy of the parameters α and β, thereby improving the enhancement effect of the normalized incomplete Beta function on the pearl oyster kernel image; the white balance color correction method is used to adjust the image color, so that the color of the pearl oyster kernel image is closer to the natural color, thereby improving the visual effect of the pearl oyster kernel image. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] Figure 1 This is a step diagram of the pearl oyster kernel image processing method;
[0080] Figure 2 is a second grayscale image of the pearl oyster kernel image;
[0081] Figure 3 is a histogram of the second grayscale image of the pearl oyster kernel image;
[0082] Figure 4 is the third grayscale image of the pearl oyster kernel image;
[0083] Figure 5 Flowchart for determining the optimal parameters α and β of the normalized incomplete Beta function for the improved geometric mean optimization algorithm;
[0084] Figure 6 A comparison chart of the fitness changes of the improved geometric mean optimization algorithm and the standard geometric mean optimization algorithm for optimizing the optimal parameters α and β of the normalized non-complete Beta function;
[0085] Figure 7 This is the original image of the nucleus and meat inside the pearl oyster of Martensii;
[0086] Figure 8 Images of the nucleus and flesh of the pearl oyster enhanced using the WGMO-Beta method. DETAILED DESCRIPTION
[0087] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them; based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0088] See also Figure 1-Figure 8 The present invention provides a technical solution: a pearl shell kernel image processing optimization method, the specific steps are as follows Figure 1 shown.
[0089] S1. grayscale processing is performed on an original image of a pearl oyster kernel to obtain a first grayscale image, and pre-processing and denoising is performed on the first grayscale image to obtain a second grayscale image.
[0090] Furthermore, the original image of the pearl oyster kernel is gray-scaled to obtain the first gray-scale image. The specific method is: the weighted average of the three components of RGB is calculated to convert the original image of the pearl oyster kernel from the RGB color space to the gray-scale space; the RGB includes red (R), green (G) and blue (B), that is, each pixel of the pearl oyster kernel image is composed of the three components of RGB, and the weights of the three components are set based on the sensitivity of the human eye to different colors. The mathematical model is:
[0091] (1);
[0092] In formula (1), is the gray value of the rth pixel in the pearl oyster kernel image.
[0093] Furthermore, the first grayscale image is preprocessed and denoised to obtain a second grayscale image, such as Figure 2 As shown in the figure, the pre-processing method uses white balance color correction to adjust the pearl shell kernel image. White balance color correction can improve the color deviation of the image. Usually, due to the absorption and scattering characteristics of water, the pearl shell kernel image presents a blue-green hue. White balance processing can make the color of the pearl shell kernel image closer to the natural color. The average reflectivity of the water on the surface of the pearl shell kernel is neutral gray, so ,in, , , are the average values of the red, green, and blue channels of the pearl oyster kernel image respectively; by calculating the ratio between each channel and its average value, and using this ratio to adjust the pearl oyster kernel image to achieve white balance color correction, the mathematical model is:
[0094] , , ;
[0095] in, , , are the values of the red, green, and blue channels of the adjusted pearl shell kernel image, is the average value of all pixels in the pearl oyster kernel image in all color channels (red, green, and blue).
[0096] S2. Use Kapur threshold algorithm to segment the second grayscale image to separate the pearl oyster meat and the pearl oyster core to obtain a third grayscale image.
[0097] Further, the third grayscale image is obtained by segmentation as Figure 4 As shown, the core position in the pearl oyster core image is effectively distinguished, including separating the core from the flesh of the pearl oyster core image; the specific steps are:
[0098] S21, calculate the histogram of the second grayscale image, such as Figure 3 As shown, that is, the number of times the gray level of 250 pixel values appears;
[0099] S22. Convert the histogram into a probability distribution, that is, the probability of each gray level appearing, probability p\left [ {l} \right ] The mathematical model is:
[0100] (2);
[0101] In formula (2), p\left [ {l} \right ] For the The probability of a gray level appearing, H\left [ {l} \right ] For the The number of gray levels that appear, is the total number of pixels in the pearl oyster kernel image;
[0102] S23, using cumulative probability and cumulative average grayscale entropy of the core and meat parts of the pearl oyster kernel image; the mathematical model is:
[0103] (3);
[0104] (4);
[0105] In formula (3) and formula (4), is the total number of gray levels, the value is 255, The core part of the pearl shell kernel image is at the threshold The cumulative probability and cumulative average gray level under The flesh part of the pearl oyster kernel image is at the threshold The cumulative probability and cumulative average gray level under is the entropy of the core part of the pearl shell kernel image, is the entropy of the flesh part of the pearl oyster kernel image;
[0106] S24. Calculate the total entropy at each threshold , select The maximum threshold is used as the optimal segmentation threshold, and the pearl oyster kernel image is segmented into a kernel and a meat portion using the optimal segmentation threshold to obtain a third grayscale image.
[0107] S3. Optimal parameters α and β of the normalized incomplete Beta function are adjusted using an improved geometric mean optimization algorithm, the third grayscale image is enhanced using the optimized normalized incomplete Beta function, and an enhanced pearl oyster kernel image is output.
[0108] Furthermore, an optimal direction alignment strategy is constructed to improve the optimization strategy of the geometric mean optimization algorithm. The alignment between the individual velocity vector and the global optimal individual position is used to monitor whether the algorithm falls into the local optimum during the optimization process, that is, the local optimum aggregation. The specific method is as follows:
[0109] S31. Design alignment function , calculate the alignment between the individual velocity vector and the global optimal individual position, and the mathematical model is:
[0110] (5);
[0111] In formula (5), is the velocity vector of the ith individual at the tth iteration, is the global optimal individual position, is the position of the i-th individual in the t-th iteration;
[0112] S32, calculate the average alignment value of the individuals in the current t-th iteration of the geometric mean optimization algorithm population (6) If the average alignment value avg is less than 0.2, it means that the geometric mean optimization algorithm falls into a local optimal solution;
[0113] In formula (6), is the maximum population size.
[0114] Furthermore, by introducing the differential variation perturbation factor and calibration factor Improve the control factor w and introduce the differential variation perturbation factor and calibration factor It can make it easier for individuals in the geometric mean optimization algorithm to jump out of the local optimum, improve the accuracy of solving the optimal parameters α and β in the local optimum, stabilize the control factor step size through the sine function, and use the improved control factor Improved speed parameter of geometric mean optimization algorithm , so that the improved speed parameter In the process of optimizing the optimal parameters α and β of the normalized incomplete Beta function with the geometric mean optimization algorithm, the optimization speed is adjusted adaptively and nonlinearly to avoid the geometric mean optimization algorithm from falling into the local optimum due to too fast speed, which affects the accuracy of the parameters α and β, and thus affects the enhancement effect of the normalized incomplete Beta function on the pearl oyster kernel image; the improved control factor The mathematical model is:
[0115] (6);
[0116] In formula (6), is the current iteration number, is the maximum number of iterations, is the fitness value of the i-th individual in the t-th iteration, is the average fitness value of the population in the tth iteration, is the global maximum fitness value, the differential mutation perturbation factor The mathematical model is: , is the global optimal individual position of the tth iteration; calibration factor The mathematical model is: ; In the formula, is the maximum fitness value in the population at the tth iteration.
[0117] Furthermore, using the improved control factor Improved speed parameter of geometric mean optimization algorithm , the mathematical model is:
[0118] (7);
[0119] In formula (7), is the improved speed parameter value of the i-th individual in the t+1th iteration, is the improved speed parameter value of the i-th individual in the t-th iteration, is the target position of the mutation, is the position of the i-th individual in the t-th iteration, is the scaling parameter, and the mathematical model is: ; Where rand is a random number between 0 and 1.
[0120] Furthermore, in the variance Added pixel difference As an independent component design fitness function, the smaller the fitness value, the higher the accuracy of the optimal parameters α and β; the mathematical model of the fitness function is:
[0121] (8);
[0122] In formula (8), is the information entropy of the pearl shell kernel image, The image compactness of the pearl oyster core.
[0123] Furthermore, in the fitness function, The mathematical model is:
[0124] (9);
[0125] In formula (9), is the pixel value of the pearl oyster kernel image pixel (x, y), is the total number of pixels in the pearl oyster kernel image, and the formula is: , and are the length and width of the pearl oyster core image respectively;
[0126] (10);
[0127] In formula (10), is the pixel value of the pearl oyster kernel image pixel (x+2, y).
[0128] More specifically, if Figure 5 As shown in Figure 2, the specific steps of using the improved geometric mean optimization algorithm to determine the optimal parameters α and β of the normalized incomplete Beta function are:
[0129] S21, encoding the α and β parameters of the normalized incomplete Beta function for pearl oyster kernel image enhancement into a 2-dimensional vector, and establishing a mapping relationship between the α and β parameter vectors and the individual positions of the improved geometric mean optimization algorithm;
[0130] S22, randomly initialize N individual initial positions of the improved geometric mean optimization algorithm (WGMO); initialize the maximum number of iterations of the improved geometric mean optimization algorithm , problem dimension , the upper bounds of α and β parameters and lower bound And the improved control factor The initial value and maximum population size ;
[0131] S23, judging whether the current number of iterations t reaches the maximum number of iterations T, if t=T, then exit the optimization, and resolve the individual position corresponding to the global minimum fitness value into the α and β parameter values of the normalized non-complete Beta function, otherwise, execute step S24;
[0132] S24. Using fitness function Calculate the fitness value of each individual in the population at the current iteration of the improved geometric mean optimization algorithm, and arrange them in ascending order to retain the individual position corresponding to the minimum fitness value;
[0133] S25, Simulating the geometric mean operator and introducing the improved control factor Mathematical model: Establish the improved mathematical model of geometric mean optimization algorithm; Update individual positions, that is, update the parameters α and β of the normalized incomplete Beta function;
[0134] S26, using the optimal direction alignment strategy, calculate the alignment between the updated velocity vector of each individual and the position pointing to the global optimal individual, and check whether the improved geometric mean optimization algorithm falls into a local optimum in this iteration;
[0135] S27. If the iteratively improved geometric mean optimization algorithm falls into a local optimum, the population position is updated by performing Levy flight perturbation with the current best individual as the center using formula (11) to jump out of the local optimum;
[0136] (11);
[0137] In formula (11), is the position of the i-th individual after jumping out of the local optimum; is the global optimal individual position, is the Levy distribution function, is the position of a random individual A in the population, is the position of a random individual B in the population;
[0138] S28. Execute t+1 for the current iteration number t; return to S23.
[0139] Furthermore, the simulated geometric mean operator introduces an improved control factor Mathematical model The specific steps of establishing the mathematical model of the improved geometric mean optimization algorithm are:
[0140] S251. Referring to the concept of fuzzy logic, the similarity between several variables is simulated by multiplying the fuzzy membership function values belonging to these variables. The geometric mean of s memberships can be expressed by formula (12):
[0141] (12);
[0142] In formula (12), is the first membership value, is the second membership value, is the sth membership value;
[0143] S252, simulating and calculating the fuzzy membership function, and establishing a mathematical model according to formula (13);
[0144] (13);
[0145] In formula (13), is the fuzzy membership function value of the i-th individual in the t-th iteration, and are the mean and standard deviation of the objective function values of the best personal agent in all t-th iterations, The objective function value of the best agent in the population at the tth iteration;
[0146] S253, simulating and calculating the dual fitness index value, and establishing a mathematical model according to formula (14);
[0147] (14);
[0148] In formula (14), is the dual fitness index of the i-th individual at the t-th iteration;
[0149] S254, simulation In order to make all the best agents of individuals so far contribute to generate a unique global guiding agent for each agent, a mathematical model is established according to formula (15);
[0150] (15);
[0151] In formula (15), is the position of the i-th leader agent at the t-th iteration, is the best position at the tth iteration, It is a positive number, and its value is 0.01;
[0152] S255, in order to It is more random in nature, thus helping to better preserve the diversity of the leading agent. The mutation of the leading agent in WGMO is simulated. The mutation scheme selects Gaussian mutation and the mathematical model is established according to formula (16);
[0153] (16);
[0154] In formula (16), is the target position of the mutation, is the position of the i-th leader agent at the t-th iteration, are random values generated from a standard normal distribution, is the maximum standard deviation of the best individual up to the tth iteration, is the standard deviation of the best individual up to the tth iteration; is the mutation step parameter, which decreases linearly from 0 to 1. The mathematical model is: ;
[0155] S256, using formula (7) to establish an individual speed update mathematical model, and using the speed mathematical model according to formula (17) to establish an individual position update mathematical model;
[0156] (17);
[0157] In formula (17), is the position of the i-th individual at the t+1th iteration, is the position of the i-th individual at the t-th iteration, is the improved speed parameter value of the i-th individual at the t+1-th iteration.
[0158] More specifically, according to Figure 5 The specific steps of the improved geometric mean optimization algorithm to determine the optimal parameters α and β of the normalized incomplete Beta function are as follows: the geometric mean optimization algorithm (GMO) and the improved geometric mean optimization algorithm (WGMO) are programmed in Matlab, and the maximum scale N=50, the problem dimension D=2, that is, the number of optimal parameters, and the maximum number of iterations T=50 are set; in the process of optimizing the parameters α and β of the normalized incomplete Beta function, the geometric mean optimization algorithm (GMO) and the improved geometric mean optimization algorithm (WGMO) are used to calculate the optimization fitness value, as shown in (8): Figure 6 As shown in the figure; the fitness value of the improved geometric mean optimization algorithm (WGMO) decreases faster than that of the geometric mean optimization algorithm (GMO), indicating that the improved geometric mean optimization algorithm (WGMO) is faster in optimizing the parameters α and β of the normalized non-complete Beta function; according to the principle that the smaller the fitness value, the higher the optimization accuracy of the algorithm, by comparing the two methods, it is obviously found that the fitness value of the improved geometric mean optimization algorithm (WGMO) is smaller after it reaches stability after 10 iterations, indicating that the improved geometric mean optimization algorithm (WGMO) has higher optimization accuracy for the parameters α and β of the normalized non-complete Beta function.
[0159] More specifically, the normalized incomplete Beta function optimized by the improved geometric mean optimization algorithm is used to enhance the inner core and flesh original image of the pearl oyster, that is, the inner core image of the pearl oyster, such as Figure 6 The enhanced image of the interior of the pearl oyster is shown in Figure 8 The original image of the nucleus and flesh of the pearl oyster is shown in Figure 7 As shown, it can be found that the enhanced internal image of the Martensii pearl oyster enhances the contrast and brightness, making the nuclear position more clearly visible.
Claims
1. A pearl oyster kernel image processing optimization method, which optimizes a normalized incomplete Beta function algorithm using an improved geometric mean optimization algorithm, and enhances the Martensii pearl oyster kernel image using the optimized normalized incomplete Beta function algorithm, characterized in that: The specific steps are: S1, performing grayscale processing on the original image of the pearl oyster kernel to obtain a first grayscale image, and performing preprocessing and denoising on the first grayscale image to obtain a second grayscale image; S2, segmenting the second grayscale image using the Kapur threshold algorithm to separate the pearl oyster meat and the pearl oyster core to obtain a third grayscale image; S3. Using an improved geometric mean optimization algorithm to adjust the optimal parameters α and β of the normalized incomplete Beta function, enhancing the third grayscale image by using the optimized normalized incomplete Beta function, and outputting an enhanced pearl oyster kernel image. The improved geometric mean optimization algorithm has the following specific improvement steps: Step 1: Construct an optimal direction alignment strategy, and use the geometric mean optimization algorithm to optimize the individual velocity vector and points to the global optimal individual position The alignment degree is used to monitor whether the geometric mean optimization algorithm falls into the local optimum during the optimization process, and the optimization mechanism of the geometric mean optimization algorithm is improved; Step 2: By introducing differential variation perturbation factor and calibration factor Improve the geometric mean optimization algorithm control factor w, using the improved control factor Improved speed parameter of geometric mean optimization algorithm , through the speed parameter Improve the mathematical model of position update of geometric mean optimization algorithm; An optimal direction alignment strategy is constructed, and the specific method is as follows: S31. Design alignment function , calculate the alignment between the velocity vector of the individual in the geometric mean optimization algorithm and the position of the individual pointing to the global optimal position, and the mathematical model is: (5); In formula (5), is the velocity vector of the ith individual at the tth iteration, is the global optimal individual position, is the position of the i-th individual in the t-th iteration; S32, calculate the average alignment value of the individuals in the current t-th iteration of the geometric mean optimization algorithm population (6) If the average alignment value avg is less than 0.2, it means that the geometric mean optimization algorithm falls into a local optimal solution; In formula (6), is the maximum population size.
2. According to claim 1, a pearl oyster kernel image processing optimization method is characterized in that: In S1, the first grayscale image is pre-processed and denoised to obtain a second grayscale image; the pre-processing is to adjust the pearl shell kernel image by a white balance color correction method; the average reflectivity of the water on the surface of the pearl shell kernel is a neutral gray, then ,in, , , are the average values of the red, green, and blue channels of the original image of the pearl shell kernel; by calculating The ratio between the average values of the red, green, and blue channels of the pearl shell kernel image is used to adjust the pearl shell kernel image. The mathematical model is: , , ; in, , , are the values of the red, green, and blue channels of the adjusted pearl shell kernel image, is the average value of all pixels in the pearl oyster kernel image over all color channels.
3. According to claim 1, a pearl oyster kernel image processing optimization method is characterized in that: The improved control factor in step 2 The mathematical model is: (6); In formula (6), is the current iteration number, is the maximum number of iterations, is the fitness value of the i-th individual in the t-th iteration, is the average fitness value of the population in the tth iteration, is the global maximum fitness value, the differential mutation perturbation factor The mathematical model is: ; is the global optimal individual position of the tth iteration, and the calibration factor The mathematical model is: ; In the formula, is the maximum fitness value in the population at the tth iteration.
4. According to claim 3, a pearl oyster kernel image processing optimization method is characterized in that: The improved control factor is used in step 2 Improved speed parameter of geometric mean optimization algorithm , the mathematical model is: (7); In formula (7), is the improved speed parameter value of the i-th individual in the t+1th iteration, is the improved speed parameter value of the i-th individual in the t-th iteration, is the target position of the mutation, is the position of the i-th individual in the t-th iteration, is the differential variation perturbation factor, is the maximum population size, is the scaling parameter, and the mathematical model is: ; Where rand is a random number between 0 and 1.
5. A pearl oyster kernel image processing optimization method according to claim 4, characterized in that: In S3, the optimal parameters α and β of the normalized incomplete Beta function are adjusted using an improved geometric mean optimization algorithm, and the specific steps are: S21, encoding the α and β parameters of the normalized incomplete Beta function for pearl oyster kernel image enhancement into a 2-dimensional vector, and establishing a mapping relationship between the α and β parameter vectors and the individual positions of the improved geometric mean optimization algorithm; S22, randomly initialize N individual initial positions of the improved geometric mean optimization algorithm; initialize the maximum number of iterations of the improved geometric mean optimization algorithm , problem dimension , the upper bounds of the α and β parameters and the lower bound And the improved control factor The initial value and maximum population size ; S23, judging whether the current number of iterations t reaches the maximum number of iterations T, if t=T, then exit the optimization, and resolve the individual position corresponding to the global minimum fitness value into the α and β parameter values of the normalized non-complete Beta function, otherwise, execute step S24; S24. Using fitness function Calculate the fitness value of each individual in the population at the current iteration of the improved geometric mean optimization algorithm, and arrange them in ascending order to retain the individual position corresponding to the minimum fitness value; S25, Simulating the geometric mean operator and introducing the improved control factor Mathematical model: Establish the improved mathematical model of geometric mean optimization algorithm; Update individual positions, that is, update the parameters α and β of the normalized incomplete Beta function; S26, using the optimal direction alignment strategy, calculate the alignment between the updated velocity vector of each individual and the position pointing to the global optimal individual, and check whether the improved geometric mean optimization algorithm falls into a local optimum in this iteration; S27. If the iteratively improved geometric mean optimization algorithm falls into a local optimum, the population position is updated by performing Levy flight perturbation with the current best individual as the center using formula (11) to jump out of the local optimum; (11); In formula (11), is the position of the i-th individual after jumping out of the local optimum; is the global optimal individual position, is the Levy distribution function, is the position of a random individual A in the population, is the position of a random individual B in the population; S28. Execute t+1 for the current iteration number t; return to S23.
6. A pearl oyster kernel image processing optimization method according to claim 5, characterized in that: The specific steps to establish the mathematical model of the improved geometric mean optimization algorithm are: S251. Referring to the concept of fuzzy logic, the similarity between several variables is simulated by multiplying the fuzzy membership function values belonging to these variables, and the geometric mean of s membership degrees is expressed by formula (12): (12); In formula (12), is the first membership value, is the second membership value, is the sth membership value; S252, simulating and calculating the fuzzy membership function, and establishing a mathematical model according to formula (13); (13); In formula (13), is the fuzzy membership function value of the i-th individual in the t-th iteration, and are the mean and standard deviation of the objective function values of the best personal agent in all t-th iterations, The objective function value of the best agent in the population at the tth iteration; S253, simulating and calculating the dual fitness index value, and establishing a mathematical model according to formula (14); (14); In formula (14), is the dual fitness index of the i-th individual at the t-th iteration; S254, simulating and generating a global guiding agent, and establishing a mathematical model according to formula (15); (15); In formula (15), is the position of the i-th leader agent at the t-th iteration, is the best position at the tth iteration, It is a positive number, and its value is 0.01; S255, simulating the mutation of the leader agent in the improved geometric mean optimization algorithm, selecting Gaussian mutation as the mutation scheme, and establishing a mathematical model according to formula (16); (16); In formula (16), is the target position of the mutation, is the position of the i-th leader agent at the t-th iteration, are random values generated from a standard normal distribution, is the maximum standard deviation of the best individual up to the tth iteration, is the standard deviation of the best individual up to the tth iteration; is the mutation step parameter, which decreases linearly from 0 to 1. The mathematical model is: ;in, is the current iteration number, is the maximum number of iterations; S256, using formula (7) to establish an individual speed update mathematical model, and using the speed mathematical model according to formula (17) to establish an individual position update mathematical model; (17); In formula (17), is the position of the i-th individual at the t+1th iteration, is the position of the i-th individual at the t-th iteration, The improved speed parameter value of the i-th individual at the t+1th iteration.
Citation Information
Patent Citations
Image enhancement method, image enhancement device and display device
WO2016000331A1
Method for optimizing support vector machine on basis of particle swarm optimization algorithm
WO2018072351A1