Poultry egg image reconstruction method and system based on iterative intelligent denoising
By combining Fourier transform and undersampling matrix with an iterative reconstruction method based on deep learning, the problems of insufficient image quality of inexpensive imaging equipment and high cost of expensive equipment are solved, achieving efficient poultry egg image reconstruction, which is suitable for large-scale poultry egg detection.
Patent Information
- Application Number
- CN202510791054.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-13
- Publication Date
- 2025-11-07
AI Technical Summary
In the existing technology, inexpensive imaging equipment has insufficient image quality and serious noise, while expensive equipment is costly. Furthermore, computer vision reconstruction methods have poor generalization ability and long reconstruction time in poultry egg detection, which cannot meet the needs of large-scale poultry egg screening.
The initial egg images are processed using Fourier transform and undersampling matrix, and then reconstructed iteratively using deep learning and compressed sensing theories to simulate the acquisition effect of low-cost equipment, thereby improving denoising performance and reconstruction efficiency.
It effectively improves the denoising performance of poultry egg images, reduces the dependence on large-scale training datasets, and improves image reconstruction efficiency, making it suitable for large-scale poultry egg detection.
Smart Images

Figure CN120912460A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the field of image reconstruction, in particular to an egg image reconstruction method and system based on iterative intelligent denoising. BACKGROUND
[0002] For poultry breeding enterprises, high-quality images are crucial in the process of egg screening, but the clarity and accuracy of images of imaging equipment may be affected in environments with high and low temperatures and humidity changes. The images captured by inexpensive imaging equipment often lack details and have serious noise, while expensive imaging equipment can provide clearer and more stable images, but the high cost will significantly increase the burden on enterprises. On the other hand, due to the huge scale of egg detection, it means that computer imaging technology must have extremely high processing speed when screening eggs.
[0003] With the rapid development of computer vision, many image reconstruction methods have been designed, but there are still limitations. Using computer vision and deep learning to realize the reconstruction of images realizes fast reconstruction but has poor generalization, and the training data largely determines the quality, which relies too much on the dataset. Based on the theory of compressed sensing, the quality of image reconstruction is improved, but the reconstruction time is too long and is not suitable for scenarios with a huge scale of image reconstruction. SUMMARY
[0004] The present application aims to solve the problems in the prior art and provides an egg image reconstruction method and system based on iterative intelligent denoising, which can simulate the acquisition effect of low-cost imaging equipment in real environments and effectively improve the denoising performance and image reconstruction efficiency.
[0005] An egg image reconstruction method based on iterative intelligent denoising, comprising:
[0006] obtaining an initial egg image;
[0007] using a Fourier transform matrix to perform Fourier transform on the initial egg image to obtain an egg Fourier space image;
[0008] generating an under-sampling matrix at a preset sampling rate;
[0009] element-wise multiplying the egg Fourier space image and the under-sampling matrix to obtain an under-sampling Fourier space;
[0010] performing inverse Fourier transform on the under-sampling Fourier space to obtain an under-sampling image;
[0011] after several iterations of reconstruction according to the Fourier transform matrix, the under-sampling image and the under-sampling matrix, an egg reconstruction image is obtained.
[0012] The application also provides an egg image reconstruction system based on iterative intelligent denoising, comprising:
[0013] An egg Fourier space image acquisition module: Fourier transform is performed on an initial egg image by using a Fourier transform matrix to obtain an egg Fourier space image;
[0014] An undersampling matrix acquisition module: configured to generate an undersampling matrix at a preset sampling rate;
[0015] An undersampling Fourier space acquisition module: configured to multiply the egg Fourier space image and the undersampling matrix element by element to obtain an undersampling Fourier space;
[0016] An undersampling image acquisition module: configured to perform inverse Fourier transform on the undersampling Fourier space to obtain an undersampling image;
[0017] An egg image reconstruction module: configured to obtain an egg reconstructed image after a plurality of iterations according to the Fourier transform matrix, the undersampling image and the undersampling matrix.
[0018] Compared with the prior art, the application generates a series of undersampling images with different information amounts and qualities by randomly sampling an initial egg image, simulates the acquisition effect of a low-cost imaging device in a real environment, and combines deep learning and compressed sensing theory to perform a plurality of iterations to effectively improve the denoising performance and reduce the dependence on a large-scale training data set, thereby greatly improving the image reconstruction efficiency.
[0019] In order to more clearly understand the application, the specific embodiments of the application will be described below in conjunction with the accompanying drawings. BRIEF DESCRIPTION OF DRAWINGS
[0020] Figure 1 A flowchart of an egg image reconstruction method based on iterative intelligent denoising of the application;
[0021] Figure 2 A method flowchart for generating an undersampling matrix of the egg image reconstruction method based on iterative intelligent denoising of the application;
[0022] Figure 3 A method flowchart for obtaining an egg reconstructed image of the egg image reconstruction method based on iterative intelligent denoising of the application;
[0023] Figure 4 A method flowchart for constructing an egg image denoiser of the egg image reconstruction method based on iterative intelligent denoising of the application;
[0024] Figure 5A method flowchart for evaluating the precision of a reconstructed egg image of an egg image reconstruction method based on iterative intelligent denoising according to the present application;
[0025] Figure 6 A schematic diagram of an egg image reconstruction system based on iterative intelligent denoising according to the present application. DETAILED DESCRIPTION
[0026] The technical solutions in the embodiments of the present application will be clearly and completely described in combination with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by a person skilled in the art without creative labor fall within the scope of protection of the present application.
[0027] It should be understood that the schematic drawings are not drawn to scale. The flowchart used in the present application shows the operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowchart can be implemented in no order, the steps without logical context relationship can be reversed in order or implemented simultaneously. In addition, a person skilled in the art can add one or more other operations to the flowchart or remove one or more operations from the flowchart under the guidance of the content of the present application.
[0028] Reference to "an embodiment" in this text means that a particular feature, structure, or characteristic described in connection with the embodiment can be included in at least one embodiment of the present application. The appearance of the phrase in various places in the specification does not necessarily all refer to the same embodiment, nor is it necessarily independent or alternative embodiments to other embodiments. A person skilled in the art explicitly and implicitly understands that the embodiments described herein can be combined with other embodiments.
[0029] Embodiment 1
[0030] Please refer to Figure 1 , Figure 1 A flowchart of an egg image reconstruction method based on iterative intelligent denoising according to the present application.
[0031] The present application provides an egg image reconstruction method based on iterative intelligent denoising, specifically comprising the following steps:
[0032] S1: obtaining an initial egg image;
[0033] S2: using a Fourier transform matrix to perform Fourier transform on the initial egg image to obtain an egg Fourier space image;
[0034] S3: generating an under-sampling matrix at a preset sampling rate;
[0035] S4: element-wise multiply the Fourier space image of the egg and the undersampling matrix to obtain an undersampled Fourier space;
[0036] S5: inverse Fourier transform the undersampled Fourier space to obtain an undersampled image;
[0037] S6: according to the Fourier transform matrix, the undersampled image and the undersampling matrix, after several iterations of reconstruction, an egg reconstructed image is obtained.
[0038] Compared with the prior art, the scheme generates a series of undersampled images with different information quantity and quality by randomly sampling the initial egg image, simulates the acquisition effect of low-cost imaging equipment in the real environment. After obtaining the undersampled image, combining deep learning and compressed sensing theory, multiple iterations of reconstruction can effectively improve the denoising performance and reduce the dependence on large-scale training data set, thereby greatly improving the image reconstruction efficiency.
[0039] For step S1, in the embodiment, the initial egg image is preferentially collected from commercial companies or suppliers specializing in egg production, processing or sales, and an egg image database is constructed, and then the initial egg image is obtained from the egg image database. Of course, the initial egg image can also be collected from public databases on the Internet, such as agricultural science databases or food science databases.
[0040] The preprocessing of the initial egg image also includes the following steps: sequentially performing contrast enhancement and image cropping on the initial egg image. Wherein, the contrast enhancement of the initial egg image improves the distinction between the egg region and the surrounding background, making it easier to identify the egg structure. Preferably, the gray histogram of the initial egg image is equalized by histogram equalization to improve the overall contrast, so that the egg region is more obvious. The adaptive histogram equalization can also be used to perform histogram equalization on different regions of the initial egg image respectively, to avoid noise problems caused by excessive enhancement.
[0041] The image cropping of the initial egg image removes unnecessary background information in the image and only retains the part related to the egg. Preferably, the edge information of the initial egg image is detected by the edge detection method to determine the boundary of the egg object and crop it. Of course, specific shapes in the initial egg image, such as the oval shape of the egg, can also be identified to obtain the corresponding shape parameters, so as to crop according to the shape parameters.
[0042] For steps S2-S5, the initial egg image is subjected to Fourier transform to obtain an egg Fourier space image by using a Fourier transform matrix. The egg Fourier space image is a representation of the initial egg image in the frequency domain. The Fourier transform matrix is a Vandermonde matrix, and its elements are composed of complex roots of unity. For an initial egg image with a size of N x N, the Fourier transform matrix is an N x N matrix, which is defined as:
[0043]
[0044] where m and n are the row index and column index of the matrix, respectively, 0 < m < N-1, 0 < n < N-1, q is the size of the Fourier transform matrix, q = N x N, i is the imaginary unit, i 2 = -1.
[0045] The undersampling matrix is a 0-1 matrix generated according to the sampling rate. The undersampled Fourier space represents the frequency domain image of the initial egg image after undersampling. In this embodiment, the initial egg image is preferentially subjected to Gaussian random sampling, and the sampling rate determines the degree of sampling of the initial egg image, i.e., the amount of information retained in the initial egg image. A higher sampling rate can increase the information retained in the initial egg image. The sampling rate is preferentially set to 30%, and the egg Fourier space image and the undersampling matrix are multiplied element by element to obtain an undersampled Fourier space. The inverse Fourier transform is performed on the undersampled Fourier space to obtain an undersampled image, which simulates the acquisition effect of a low-cost imaging device in a real environment. Of course, in other embodiments, the sampling rate can also be adaptively adjusted.
[0046] Please refer to Figure 2 , Figure 2 for the flowchart of the method for generating an undersampling matrix based on the iterative intelligent denoising egg image reconstruction method of the present application. The undersampling matrix is generated according to a preset sampling rate, and the method further includes the following steps:
[0047] S31: According to the preset image size, a binary mask image with all zero values is created;
[0048] According to the sampling rate and the image size, the number of sampling points is calculated according to the following formula:
[0049] N = size x size x rate
[0050] where N is the number of sampling points, and size is the image size;
[0051] S32: According to the image size, the center coordinates of the binary mask image are calculated;
[0052] S33: According to the center coordinates, the Euclidean distance of each pixel of the binary mask image to the center of the binary mask image is calculated to obtain a distance matrix, wherein the size of the distance matrix is the same as the size of the binary mask image.
[0053] S34: According to the distance matrix, the density value is adjusted by using an exponential decay function to obtain a density matrix and normalization, wherein the density matrix reflects the probability of different positions in the binary mask image being selected as sampling points, and the greater the Euclidean distance of each pixel of the binary mask image to the center of the binary mask image, the higher the probability of being selected as a sampling point.
[0054] S35: Using the density matrix as a probability distribution, a specified number of sampling points are randomly selected in the binary mask image and assigned a value of 1, and then used as the undersampling matrix, wherein the specified number is the number of sampling points.
[0055] For step S31, in the present embodiment, the image size is preferably 256, and the size of the binary mask image is 256x256. Of course, in other embodiments, the image size can be adjusted according to actual needs.
[0056] For step S32, according to the image size, the center coordinates of the binary mask image are calculated according to the following formula: center=size / 2, wherein center is the center coordinates and size is the image size.
[0057] For step S34, the expression of the exponential decay function is:
[0058] density=ε*distance / center
[0059] wherein density is the density value, ε is the control density decay rate, in the present embodiment, ε is preferably set to -7, distance is the Euclidean distance of each pixel of the binary mask image to the center of the binary mask image, and center is the center coordinates of the binary mask image. Of course, in other embodiments, the control density decay rate can be adjusted as needed.
[0060] Please refer to Figure 3 , Figure 3 is a method flowchart for obtaining an egg reconstruction image according to the present application of an egg image reconstruction method based on iterative intelligent denoising. For step S6, according to the Fourier transform matrix, the undersampling image and the undersampling matrix, after several times of iterative reconstruction, an egg reconstruction image is obtained, further comprising the following steps:
[0061] S61: adding noise to the undersampled image to obtain an undersampled noise-added image;
[0062] S62: denoising the undersampled noise-added image by using a preset egg denoising model to obtain an undersampled denoised image;
[0063] S63: performing Fourier space data fusion on the undersampled denoised image according to the Fourier transform matrix, the undersampled image and the undersampling matrix to obtain the egg reconstructed image.
[0064] For step S61, in the embodiment, Gaussian noise is preferentially added to the undersampled image, and the specific formula is as follows:
[0065] ω k+1 =x k +u k +σ k ξ k
[0066] In the formula, ω k+1 is an intermediate variable of the undersampled noise-added image obtained after the k+1th iteration, x k is an intermediate variable of the egg reconstructed image obtained after the kth iteration, σ k is a noise standard deviation obtained after the kth iteration, λ is a regularization parameter, ρ k is an adjustment parameter, ρ k =γρ k , γ is a constant for controlling the update step of the adjustment parameter, γ is a constant greater than 1, in the embodiment, γ is preferentially set to 1.15, ξ k is Gaussian noise of the kth iteration, ξ k obeys Gaussian distribution with a mean of 0 and a variance of 1, u k is a Lagrange multiplier obtained after the kth iteration. Of course, the constant for controlling the update step of the adjustment parameter can also be adaptively modified.
[0067] For step S62, in the embodiment, the egg denoising model is preferentially an intelligent denoiser based on TBSN (Technology-Based Semantic Network, Technology-Based Semantic Network), and the specific formula is as follows:
[0068]
[0069] In the formula, v k+1 is an intermediate variable of the undersampled denoised image obtained after the k+1th iteration, x kis an intermediate variable of the egg image reconstructed after the kth iteration, a is a first denoising constant, the first denoising constant is preferably set to 1, c is a second denoising constant, the second denoising constant is preferably set to 4, and σ k is the noise standard deviation after the kth iteration, is a preset egg image denoiser, clip is a clipping function, and u k is the Lagrange multiplier obtained after the kth iteration. Of course, in other embodiments, the egg denoising model can also be a BSN (Blind-Spot Network) based intelligent denoiser. Of course, the first denoising constant and the second denoising constant can also be adaptively modified.
[0070] Please refer to Figure 4 , Figure 4 is a method flowchart for constructing an egg image denoiser of an egg image reconstruction method based on iterative intelligent denoising according to the present application. The construction of the egg image denoiser further includes the following steps:
[0071] S621: Select a plurality of egg image data sets, and divide the egg image data sets into a training set, a validation set and a test set according to a ratio of 7:2:1, wherein the training set, the validation set and the test set each include a noisy egg image and a clean egg image corresponding to the noisy egg image;
[0072] S622: Take the noisy egg image of the training set as input data, and perform forward propagation based on a TBSN network to obtain an egg denoised image corresponding to the training set and the egg image denoiser to be trained;
[0073] S623: Calculate the error between the clean egg image corresponding to the noisy egg image of the training set and the egg denoised image of the training set as a training set loss value by using a loss function;
[0074] S624: Adjust the network parameters of the egg image denoiser to be trained according to the training set loss value through an optimization algorithm;
[0075] S625: Take the noisy egg image of the validation set as input data, and perform forward propagation based on the egg image denoiser to be trained to obtain an egg denoised image of the validation set;
[0076] S626: Calculate the error between the clean egg image corresponding to the noisy egg image of the validation set and the egg denoised image of the validation set as a validation set loss value by using a loss function;
[0077] S627: When the validation set loss value is less than a predetermined validation loss threshold, the egg image denoiser that has completed training is obtained.
[0078] S628: Using the noisy egg images of the test set as input data, perform forward propagation based on the trained egg image denoiser to obtain the reconstructed egg images of the test set.
[0079] S629: Based on the clean egg images corresponding to the noisy egg images in the test set and the denoised egg images in the test set, the accuracy of the egg image denoiser is evaluated to obtain the accuracy evaluation result of the egg image denoiser.
[0080] For step S623, in this embodiment, the loss function preferentially uses the mean squared error loss function, and the specific formula is as follows:
[0081]
[0082] In the formula, MSE is the training set loss value. For the denoised image of the poultry egg corresponding to the i-th training set, y i The clean egg images corresponding to the noisy egg images in the training set are denoted by n, where n is the number of images in the training set. In other embodiments, other functions, such as the root mean square error function, can be adaptively adjusted as the loss function.
[0083] For step S624, the network parameters of the egg image denoiser to be trained are updated preferentially using the Adam optimization algorithm. Of course, other optimization algorithms such as stochastic gradient descent can also be adaptively selected to update the network parameters of the egg image denoiser.
[0084] For step S626, in this embodiment, the loss function preferentially uses the mean squared error loss function, and the specific formula is as follows:
[0085]
[0086] In the formula, MSE2 is the loss value of the validation set. For the denoised image of the poultry egg corresponding to the i-th training set, y2 j Let m be the number of clean egg images corresponding to the noisy egg images in the validation set. In other embodiments, other functions such as the root mean square error function can be adaptively adjusted as the loss function.
[0087] For step S627, the verification loss threshold is set as 5e-3, the verification set loss value is compared with the verification loss threshold, when the verification set loss value is less than the verification loss threshold, the egg image denoiser is considered to be trained; when the verification set loss value is greater than the verification loss threshold, steps S622-S627 are executed. Of course, the verification loss threshold can be adaptively adjusted.
[0088] For step S629, the accuracy of the egg image denoiser is evaluated according to the clean egg image corresponding to the noise egg image in the test set and the egg denoising image in the test set, and the accuracy evaluation result of the egg image denoiser is obtained. The following steps are included:
[0089] The error between the clean egg image corresponding to the noise egg image in the test set and the egg denoising image in the test set is calculated as the test set loss value by using the loss function, and the test set loss value is compared with the preset test loss threshold, wherein the test loss threshold is set as 5e-3. When the test set loss value is less than the test loss threshold, it is considered that the denoising accuracy of the egg image denoiser is high; when the test set loss value is greater than the test loss threshold, it is considered that the denoising accuracy of the egg image denoiser is low, and steps S622-S629 need to be executed to retrain the egg image denoiser.
[0090] The loss function preferably uses a mean square error loss function, and the specific formula is:
[0091]
[0092] In the formula, MSE3 is the test set loss value, is the egg denoising image corresponding to the zth test set, y3 z is the clean egg image corresponding to the noise egg image in the test set, and g is the number of the test set.
[0093] In other embodiments, other functions such as a root mean square error function can also be used as the loss function, and the test loss threshold can also be adaptively adjusted, and the SSIM1 (Structural Similarity Index) and PSNR1 (Peak Signal-to-Noise Ratio) of the clean egg image corresponding to the noise egg image in the test set and the egg denoising image in the test set can also be calculated. When the SSIM1 is greater than or equal to 0.9 and the PSNR1 is greater than or equal to 40db, the denoising effect of the egg denoising image in the test set is excellent; when 0.8≤SSIM1<0.9 and 30dB≤PSNR1<40dB, the denoising effect of the egg denoising image in the test set is general; when SSIM1<0.8 and PSNR1<30dB, the denoising effect of the egg denoising image in the test set is poor, at which time steps S622-S629 need to be performed to retrain the egg image denoiser.
[0094] For step S63, the Fourier space data fusion is performed on the undersampled denoising image according to the Fourier transform matrix, the undersampled image, and the undersampling matrix to obtain the egg reconstruction image, and the method further comprises the following steps:
[0095] According to the Fourier transform matrix, the undersampled image, and the undersampling matrix, the Fourier space data fusion is performed on the undersampled denoising image according to the following formula to obtain an egg reconstruction image intermediate variable:
[0096]
[0097] In the formula, x is the egg reconstruction image, x k+1 is the egg reconstruction image intermediate variable obtained after the k+1th iteration, arg x min(·) is an x value that makes the objective function minimum in the current iteration, and the objective function is is a two-norm square operation, F S =S F, S is the undersampling matrix, F is the Fourier transform matrix, y is the undersampled image, p k is the adjustment parameter, x 0 is the undersampled image; v k+1 is the undersampled denoising image intermediate variable obtained after the k+1th iteration;
[0098] u k is the Lagrange multiplier obtained after the kth iteration, u k =u k-1 +x k -vk , u k-1 is the Lagrange multiplier obtained after the k-1th iteration, x k is the egg reconstruction image intermediate variable obtained after the kth iteration, v k is the undersampling denoising image intermediate variable obtained after the kth iteration, u 0 is a full 0 matrix with the same size as the undersampling image.
[0099] The present application includes the above-mentioned noise adding, denoising, Fourier space data fusion of the image based on the compressed sensing theory, and the Lagrange multiplier in each iteration process, and embeds the trained egg denoising model into the solution of the compressed sensing optimization problem, so as to obtain the egg reconstruction image, which not only reduces the dependence on large-scale training data set, but also greatly improves the calculation efficiency of the egg image reconstruction. At the same time, the present application trains the egg denoising model by using the TBSN network, so that the egg denoising model introduces spatial and channel self-attention mechanism, which can effectively capture the detail features in the undersampling noise-added image, thereby improving the denoising performance.
[0100] According to the egg reconstruction image intermediate variable, the undersampling denoising image intermediate variable and the undersampling noise-added image intermediate variable, the mean square error is obtained according to the following formula:
[0101]
[0102] In the formula, δ is the mean square error, v k+1 is the undersampling denoising image intermediate variable obtained after the k+1th iteration, v k is the undersampling denoising image intermediate variable obtained after the kth iteration, x k+1 is the egg reconstruction image intermediate variable obtained after the k+1th iteration, x k is the egg reconstruction image intermediate variable obtained after the k+1th iteration, u k is the Lagrange multiplier obtained after the kth iteration, u k+1 is the Lagrange multiplier obtained after the k+1th iteration, n is the size of the undersampling denoising image, the undersampling noise-added image and the egg reconstruction image, preferably 256, the size of the undersampling denoising image, the undersampling noise-added image and the egg reconstruction image is the same, N=n 2 .
[0103] When the mean square error is less than the preset iteration threshold, it indicates that the image reconstruction effect is best under the current iteration number, at this time, the egg reconstruction image intermediate variable under the current iteration number is the egg reconstruction image. Wherein, the preset iteration threshold is preferably 6e -9Of course, the iteration threshold can be adaptively modified in other embodiments.
[0104] Reference is made to Figure 5 , Figure 5 A method flowchart for evaluating the accuracy of an egg reconstruction image according to an egg image reconstruction method based on iterative intelligent denoising is provided. The method for evaluating the accuracy of the egg reconstruction image further comprises the following steps:
[0105] S6a: Selecting a plurality of egg image data sets as test data, the test data comprising an initial egg test image and a clean egg test image corresponding to the initial egg test image;
[0106] S6b: Fourier transforming the initial egg test image according to a preset Fourier transform matrix to obtain an egg Fourier space test image;
[0107] S6c: Element-wise multiplying the egg Fourier space test image and the undersampling matrix to obtain an undersampling Fourier test space;
[0108] S6d: Inverse Fourier transforming the undersampling Fourier test space to obtain an undersampling test image;
[0109] S6e: According to the Fourier transform matrix, the undersampling test image and the undersampling matrix, after a plurality of iterations, an egg reconstruction test image and a corresponding reconstruction time are obtained;
[0110] S6f: Calculating the structural similarity between the egg reconstruction test image and the clean egg test image, and the peak signal-to-noise ratio of the egg reconstruction test image;
[0111] S6g: According to the structural similarity and the peak signal-to-noise ratio, the reconstruction effect of the egg reconstruction test image is classified, and according to the reconstruction time, the reconstruction efficiency of the egg reconstruction test image is classified.
[0112] For steps S6e-S6g, SSIM (Structural Similarity Index) is an index for measuring the similarity between the egg reconstruction verification image and the clean egg verification image, which takes into account the brightness, contrast and structural information of the image. The value of SSIM ranges from 0 to 1, and the higher the value, the more similar the egg reconstruction verification image and the clean egg verification image. PSNR (Peak Signal-to-Noise Ratio) is the logarithm of the ratio of the maximum possible power of an image to the power of its destructive noise that affects the accuracy of representation. The higher the PSNR, the better the reconstruction effect of the egg reconstruction verification image. The lower the reconstruction time T, the higher the reconstruction efficiency of the egg reconstruction verification image.
[0113] In this embodiment, the mean and standard deviation of SSIM, PSNR and reconstruction time T can also be calculated respectively and visualized by histogram. When SSIM≥0.9 and PSNR≥40db, the reconstruction effect of the egg reconstruction verification image is excellent; when 0.8≤SSIM<0.9 and 30dB≤PSNR<40dB, the reconstruction effect of the egg reconstruction verification image is general; when SSIM<0.8 and PSNR<30dB, the reconstruction effect of the egg reconstruction verification image is poor.
[0114] When T≤2.5, it means that the reconstruction efficiency of the egg reconstruction verification image is fast; when 2.5<T≤5, it means that the reconstruction efficiency of the egg reconstruction verification image is medium; when T>5, it means that the reconstruction efficiency of the egg reconstruction verification image is slow.
[0115] Of course, in other embodiments, the variance of SSIM, PSNR and reconstruction time T can also be calculated respectively, and other ways such as scatter plot or box plot can also be used for visualization, and the classification threshold of SSIM, PSNR and reconstruction time T can be adjusted adaptively.
[0116] Embodiment 2
[0117] Please refer to Figure 6 , Figure 6 A schematic diagram of an egg image reconstruction system based on iterative intelligent denoising according to the present application.
[0118] The present application also provides an egg image reconstruction system based on iterative intelligent denoising, comprising:
[0119] Egg Fourier space image acquisition module: using Fourier transform matrix, Fourier transform is performed on the initial egg image to obtain the egg Fourier space image;
[0120] Under-sampling matrix acquisition module: used for generating an under-sampling matrix at a preset sampling rate;
[0121] undersampling Fourier space acquisition module: configured to multiply the egg Fourier space image and the undersampling matrix element by element to obtain an undersampling Fourier space;
[0122] undersampling image acquisition module: configured to perform inverse Fourier transform on the undersampling Fourier space to obtain an undersampling image;
[0123] egg image reconstruction module: configured to obtain an egg reconstructed image after a plurality of iterations according to the Fourier transform matrix, the undersampling image and the undersampling matrix.
[0124] It should be noted that the data obtained by the egg image reconstruction system based on iterative intelligent denoising provided in the present application when implementing the egg image reconstruction method based on iterative intelligent denoising are saved in the storage of the system in a one-to-one correspondence. When related calculations are needed, the data required for calculation can be directly obtained from the storage.
[0125] It should also be noted that the egg image reconstruction system based on iterative intelligent denoising provided in the above embodiments when implementing the egg image reconstruction method based on iterative intelligent denoising is only exemplified by the division of the above functional modules. In actual applications, the above functions can be completed by different functional modules according to needs, that is, the internal structure of the device is divided into different functional modules to complete all or part of the functions described above. In addition, the egg image reconstruction system based on iterative intelligent denoising provided in the above embodiments and the egg image reconstruction method based on iterative intelligent denoising of embodiment 1 belong to the same concept, and the implementation process is described in detail in the method embodiment. Here, it is not repeated.
[0126] Based on the same inventive concept, the present application also provides an electronic device, which can be a server, a desktop computing device or a mobile computing device (for example, a laptop computer, a handheld computing device, a tablet computer, a netbook, etc.) and the like terminal device. The device includes one or more processors and a memory, wherein the processor is configured to execute a program to implement the egg image reconstruction method based on iterative intelligent denoising; and the memory is configured to store a computer program executable by the processor.
[0127] Based on the same inventive concept, the present application also provides a computer readable storage medium, which corresponds to the above-mentioned egg image reconstruction method based on iterative intelligent denoising. The computer readable storage medium has a computer program stored thereon, and the program is executed by a processor to implement the steps of the egg image reconstruction method based on iterative intelligent denoising described in the above embodiments.
[0128] The application can take the form of a computer program product including a computer-readable storage medium having computer program code embodied thereon that can be executed by a computer. The computer-readable storage medium can include persistent and non-persistent, movable and non-movable media that can be implemented in any method or technology for information storage. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device.
[0129] The application is not limited to the embodiments described above. It is intended that various modifications and variations of the application are possible within the scope of the application, provided they correspond to the principles of the application and its central features as set forth in the appended claims, as well as in the category of equivalents thereof.
Claims
1. An egg image reconstruction method based on iterative intelligent denoising, characterized in that, The method comprises the following steps: obtaining an initial egg image; performing Fourier transform on the initial egg image by using a Fourier transform matrix to obtain an egg Fourier space image; generating an under-sampling matrix at a preset sampling rate; element-wise multiplying the egg Fourier space image and the under-sampling matrix to obtain an under-sampling Fourier space; performing inverse Fourier transform on the under-sampling Fourier space to obtain an under-sampling image; after several times of iterative reconstruction according to the Fourier transform matrix, the under-sampling image and the under-sampling matrix, obtaining an egg reconstructed image.
2. The method according to claim 1, wherein, The method of obtaining the egg reconstructed image after several times of iterative reconstruction according to the Fourier transform matrix, the under-sampling image and the under-sampling matrix further comprises the following steps: adding noise to the under-sampling image to obtain an under-sampling noise-added image; performing denoising on the under-sampling noise-added image by using a preset egg denoising model to obtain an under-sampling denoised image; performing Fourier space data fusion on the under-sampling denoised image according to the Fourier transform matrix, the under-sampling image and the under-sampling matrix to obtain the egg reconstructed image.
3. The method according to claim 2, wherein, The method of performing Fourier space data fusion on the under-sampling denoised image according to the Fourier transform matrix, the under-sampling image and the under-sampling matrix to obtain the egg reconstructed image further comprises the following steps: performing Fourier space data fusion on the under-sampling denoised image according to the Fourier transform matrix, the under-sampling image and the under-sampling matrix according to the following formula to obtain an egg reconstructed image intermediate variable: where x is the reconstructed image of the egg, x k+1 is the intermediate variable of the reconstructed image of the egg after the k+1 iteration, arg x min(·) is the x value that makes the objective function minimum in the current iteration, the objective function is is the square of the two-norm operation, F S = SF, S is the under-sampling matrix, F is the Fourier transform matrix, y is the under-sampled image, p k is the adjustment parameter, p k = y p k , y is the constant that controls the update step of the adjustment parameter, x 0 is the under-sampled image; v k+1 is an intermediate variable of the undersampled denoised image obtained after the k+1th iteration, x k is an intermediate variable of the egg reconstructed image obtained after the kth iteration, a is a first denoising constant, c is a second denoising constant, σ k is a noise standard deviation after the kth iteration, λ is a regularization parameter, ρ k is the adjustment parameter, is a preset egg image denoiser, and clip is a clipping function. ω k+1 is an intermediate variable of the undersampled and noisy image obtained after the (k+1)th iteration, ω k+1 = x k + u k + σ k ξ k , x k is the intermediate variable of the reconstructed image of the poultry egg obtained after the kth iteration, σ k is the standard deviation of the noise obtained after the kth iteration, ξ k is the Gaussian noise of the kth iteration, ξ k obeys a Gaussian distribution with a mean of 0 and a variance of 1; u k is the Lagrange multiplier obtained after the kth iteration, k = u k-1 + x k - v k , u k-1 is the Lagrange multiplier obtained after the k-1th iteration, k is the intermediate variable of the reconstructed image of the egg after the kth iteration, k is the intermediate variable of the undersampled denoised image after the kth iteration, 0 is a full 0 matrix of the same size as the undersampled image; calculating a mean square error according to the egg reconstructed image intermediate variable, an under-sampling denoised image intermediate variable and an under-sampling noise-added image intermediate variable according to the following formula: where δ is the mean square error, v k+1 is the intermediate variable of the undersampled denoised image after the k+1th iteration, v k is the intermediate variable of the undersampled denoised image after the kth iteration, x k+1 is the intermediate variable of the egg reconstructed image after the k+1th iteration, x k is the intermediate variable of the egg reconstructed image after the k+1th iteration, u k is the Lagrange multiplier after the kth iteration, u k+1 is the Lagrange multiplier after the k+1th iteration, n is the size of the undersampled denoised image, undersampled noised image and egg reconstructed image, N=n2; when the mean square error is less than a preset iteration threshold, the egg reconstructed image intermediate variable at the current iteration number is the egg reconstructed image.
4. The method according to claim 3, wherein, The method further comprises the following steps of constructing the egg image denoiser: selecting a plurality of egg image data sets, dividing the egg image data sets into a training set, a validation set and a test set according to a ratio of 7:2:1, the training set, the validation set and the test set each comprising a noise egg image and a clean egg image corresponding to the noise egg image; taking the noise egg image of the training set as input data, performing forward propagation based on a TBSN network to obtain an egg denoised image corresponding to the training set and a to-be-trained egg image denoiser; calculating an error between the clean egg image corresponding to the noise egg image of the training set and the egg denoised image of the training set as a training set loss value by using a loss function; adjusting network parameters of the to-be-trained egg image denoiser by an optimization algorithm according to the training set loss value; taking the noise egg image of the validation set as input data, performing forward propagation based on the to-be-trained egg image denoiser to obtain an egg denoised image of the validation set; calculating an error between the clean egg image corresponding to the noise egg image of the validation set and the egg denoised image of the validation set as a validation set loss value by using a loss function; calculating an error between the clean egg image corresponding to the noise egg image of the validation set and the egg denoised image of the validation set as a validation set loss value by using a loss function; When the validation set loss value is less than a predetermined validation loss threshold, the trained egg image denoiser is obtained; The noise egg image in the test set is inputted, and the trained egg image denoiser is used for forward propagation to obtain an egg reconstruction image in the test set; The accuracy of the egg image denoiser is evaluated according to the clean egg image corresponding to the noise egg image in the test set and the egg denoised image in the test set, and an accuracy evaluation result of the egg image denoiser is obtained.
5. The method according to claim 4, wherein, The accuracy of the egg image denoiser is evaluated according to the clean egg image corresponding to the noise egg image in the test set and the egg denoised image in the test set, and an accuracy evaluation result of the egg image denoiser is obtained. The error between the clean egg image corresponding to the noise egg image in the test set and the egg denoised image in the test set is calculated as a test set loss value by using a loss function, and the test set loss value is compared with a preset test loss threshold. When the test set loss value is less than the test loss threshold, it is considered that the denoising accuracy of the egg image denoiser is high.
6. The method according to claim 1, wherein, The undersampling matrix is generated at a preset sampling rate, and the method further includes the following steps: A binary mask image with all values being zero is created according to a preset image size; The number of sampling points is calculated according to the sampling rate and the image size according to the following formula: N = size × size × rate In the formula, N is the number of sampling points, and size is the image size; The center coordinates of the binary mask image are calculated according to the image size; The Euclidean distance of each pixel of the binary mask image to the center of the binary mask image is calculated according to the center coordinates to obtain a distance matrix, wherein the size of the distance matrix is the same as that of the binary mask image; The density value is adjusted by using an exponential decay function according to the distance matrix to obtain a density matrix and normalize the density matrix, wherein the density matrix reflects the probability of different positions in the binary mask image being selected as sampling points, and the greater the Euclidean distance of each pixel of the binary mask image to the center of the binary mask image, the higher the probability of being selected as a sampling point; The specified number of sampling points are randomly selected in the binary mask image by using the density matrix as a probability distribution and assigning a value of 1 to the sampling points, and the binary mask image is used as the undersampling matrix, wherein the specified number is the number of sampling points.
7. The method according to claim 1, wherein the method is characterized by, The accuracy of the egg reconstruction image is evaluated, including the following steps: A plurality of egg image data sets are selected as test data, and the test data includes initial egg test images and clean egg test images corresponding to the initial egg test images; The initial egg test images are subjected to Fourier transform according to a preset Fourier transform matrix to obtain egg Fourier space test images; The egg Fourier space test images and the undersampling matrix are multiplied element by element to obtain an undersampling Fourier test space; The undersampling Fourier test space is subjected to inverse Fourier transform to obtain an undersampling test image; According to the Fourier transform matrix, the undersampling test image and the undersampling matrix, after several iterations of reconstruction, an egg reconstruction test image and a corresponding reconstruction time are obtained; The structural similarity of the egg reconstruction test image and the clean egg test image is calculated, and the peak signal-to-noise ratio of the egg reconstruction test image is calculated; According to the structural similarity and the peak signal-to-noise ratio, the reconstruction effect of the egg reconstruction test image is classified, and according to the reconstruction time, the reconstruction efficiency of the egg reconstruction test image is classified.
8. An egg image reconstruction system based on iterative intelligent denoising, characterized in that, It comprises: An egg Fourier space image acquisition module: using a Fourier transform matrix to perform Fourier transform on an initial egg image to obtain an egg Fourier space image; An undersampling matrix acquisition module: configured to generate an undersampling matrix at a preset sampling rate; An undersampling Fourier space acquisition module: configured to multiply the egg Fourier space image and the undersampling matrix element by element to obtain an undersampling Fourier space; An undersampling image acquisition module: configured to perform inverse Fourier transform on the undersampling Fourier space to obtain an undersampling image; An egg image reconstruction module: configured to obtain an egg reconstruction image according to the Fourier transform matrix, the undersampling image and the undersampling matrix after several iterations of reconstruction.
9. An electronic device comprising: A memory, a processor and a computer program stored in the memory and executable on the processor, characterized in that the processor executes the computer program to implement an egg image reconstruction method based on iterative intelligent denoising according to any one of claims 1 to 7.
10. A computer-readable storage medium storing computer-executable instructions, the computer-executable instructions comprising: The computer executable instructions are used for the egg image reconstruction method based on iterative intelligent denoising according to any one of claims 1 to 7.