A multi-scale fusion data enhancement method for a honeybee pollination sample
By employing a multi-scale fusion data augmentation method, the problems of slow accumulation speed and insufficient quantity of bee pollination sample datasets in existing technologies are solved, improving the detection accuracy and generalization ability of the model, realizing the simulation of image tone uniformity and blurred scenes, and enhancing the realism of the dataset.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- DALIAN UNIV
- Filing Date
- 2022-05-12
- Publication Date
- 2026-06-16
AI Technical Summary
In existing technologies, the accumulation rate of bee pollination sample datasets is slow and the number of samples is insufficient. Traditional data augmentation methods cannot effectively expand the sample size, resulting in poor training performance of neural network models and a tendency to overfit.
A multi-scale fusion data augmentation method is adopted, which uses color transfer, Gaussian blur, motion blur and improved Poisson fusion techniques to solve the problem of image tone unification between the target bee image and the blueberry flower image. Combined with the improved Poisson fusion algorithm, a multi-scale fusion dataset is generated.
It improves the generalization ability of the dataset, enhances the detection accuracy and generalization ability of the model, solves the problem of insufficient sample quantity in existing technologies, and improves the detection accuracy and generalization ability of the model.
Smart Images

Figure CN114897730B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of smart agriculture technology, specifically to a multi-scale fusion data enhancement method for bee pollination samples. Background Technology
[0002] In recent years, with the rapid development of computer technology, signal processing theory, and artificial intelligence, computer vision technology has been widely applied, playing a vital role in both scientific research and practical production. Computer vision is a comprehensive technology involving artificial intelligence, optics, mechanics, computer graphics, and neurobiology, and has been widely applied in agriculture, military, meteorology, and natural disaster prediction, bringing about transformative changes to people's lives and work. Simultaneously, computer vision technology is constantly evolving, developing from single-dimensional to multi-dimensional approaches, and its applications are expanding. In agriculture, its main applications include crop selection, crop growth monitoring, pest and disease monitoring, weed identification, and crop harvesting.
[0003] Blueberry pollination is a crucial step in blueberry cultivation and production. Blueberries are a crop that heavily relies on bee pollination. Using bees for pollination is not only uniform and efficient, but also greatly saves labor costs. It also helps improve the fruit set rate and fruit quality of blueberries, solving the pollination problem of greenhouse blueberries under relatively isolated conditions.
[0004] Bees have their own biological habits, and their attendance rate decreases on rainy or cold days. By capturing and recording bee visits to each flower using cameras, it is possible to count the number of pollinations during the blueberry flowering window, providing farmers with a practical basis for dynamically adjusting the temperature and humidity in greenhouses and the number of bees deployed. However, fixed shooting equipment struggles to acquire a sufficient number of images of bee visits, online sample collection is limited in dimensionality and slow in accumulation, resulting in insufficient samples for training the network model for bee identification. Consequently, it is impossible to obtain a good neural network model. Traditional data augmentation methods such as rotation, scaling, transformation, and copy-paste, while expanding the number of samples, are all based on the same training set without external image input. The contextual information does not change much when extracting features, which can easily lead to overfitting. Summary of the Invention
[0005] The purpose of this invention is to provide a multi-scale fusion data augmentation method for bee pollination samples, which expands the number of samples by fusing bee template datasets and blueberry flower template datasets in a multi-angle and multi-scale manner.
[0006] To achieve the above objectives, this application proposes a multi-scale fusion data augmentation method for bee pollination samples, comprising:
[0007] Perform color transfer processing on the target bee image;
[0008] Gaussian blur or motion blur is applied to the color-transferred bee images to generate different bee images to be fused.
[0009] An improved Poisson fusion algorithm was used to integrate different bee images into a blueberry flower image.
[0010] Furthermore, the color transfer processing of the target bee image specifically involves:
[0011] Convert the image formats of the bee image and the blueberry flower image from RGB to LAB to obtain the mean value sl of each channel of the blueberry flower image. c sa c sb c With variance hl c , ha c hb c Then, the mean value sl of each channel of the bee image is obtained. p sa p sb p With variance hl p , ha p hb p ;
[0012] The average value of the corresponding LAB channel is subtracted from all pixel values of the blueberry flower image's LAB channel:
[0013] L1 = L c -sl c
[0014] A1=A c -sa c
[0015] B1 = B c -sb c
[0016] Where L c A c B c These represent the pixel values of the L, A, and B channels of the blueberry flower image, respectively.
[0017] After obtaining the differences L1, A1, and B1, the images are scaled proportionally. The scaling factor is the ratio of the standard deviations of the two images, i.e., scaling factor = standard deviation of the bee image / standard deviation of the blueberry flower image.
[0018] L2=(hl p / hl c )×L1
[0019] A2=(ha p / ha c)×A1
[0020] B2=(hb p / hb c )×B1
[0021] After scaling, the pixel value of each channel is added to the mean value of each channel of the bee image to obtain the color-transferred image of each channel of the bee:
[0022] L=L2+sl p
[0023] A = A² + sa p
[0024] B = B² + sb p
[0025] The bee image was converted from LAB format back to RGB format to complete the color migration process.
[0026] Furthermore, the Gaussian blurring process specifically includes:
[0027] The pixel value of any RGB channel in a bee image is set to f(x,y). A two-dimensional Gaussian function is applied to the values surrounding the pixel, and this processed value is then used as the pixel value for that point, thus achieving a Gaussian blur effect. The two-dimensional Gaussian function is expressed as:
[0028]
[0029] Where G(x,y) is a two-dimensional Gaussian function, δ is the standard deviation, and x and y are the relative coordinates of the pixel point f(x,y).
[0030] Furthermore, the Gaussian blurring process is implemented as follows:
[0031] Let the coordinates of pixel f(x,y) be (0,0). Construct a weight matrix K of size r×r, where r is any odd number. Then the coordinates of the top-left corner are:
[0032]
[0033] If the position of an element is set to the i-th row and j-th column of matrix K, then the coordinates of the other elements are:
[0034]
[0035] Substitute the coordinates of each element into G(x,y), set δ to 2, and obtain the weight value of each point. Then normalize the weight matrix K, that is, divide each element of the weight matrix K by the sum of all elements in the matrix to obtain the updated weight matrix K1, so that the sum of the elements in the weight matrix K1 is 1.
[0036] Let W be a pixel matrix of size r×r, where r is any odd number, and let the center of W be the pixel f(x,y). Then we have:
[0037] W1 r×r =W r×r ·k1 r×r
[0038] Where W1 is the matrix resulting from the dot product of the two matrices; W r×r It is a pixel matrix of size r×r for a bee image; k1 r×r It is a weight matrix K1 of size r×r;
[0039] The final pixel value g(x,y) is obtained by weighted summation of the elements in matrix W1. The summation formula is as follows:
[0040]
[0041] Among them, W1 ij W1 is a matrix with pixel coordinates (i,j);
[0042] Assuming the bee image f(x,y) undergoes planar motion, where x(t0) and y(t0) are quantities that change with time in the x and y directions, respectively; then the total exposure at any point on the medium is obtained by integrating the instantaneous exposure within the time interval, and bee images captured by a camera often produce a motion blur effect.
[0043] Furthermore, the motion blur processing specifically includes:
[0044] Construct the matrix Z of the motion blur kernel, setting the motion blur to be from top left to bottom right. Then the matrix Z has the following form:
[0045]
[0046] Where a1, a2, ..., an are decimals greater than 0 and less than 1, and Z is an n-order matrix;
[0047] Let the size of the bee image to be convolved be w×h, the convolution kernel be Z with size n×n, the convolution stride be s, and the padding be p. Perform a convolution operation on the bee image using matrix Z to generate a motion-blurred bee image with size w1×h1. Then:
[0048] w1=(w-n+2×p) / s+1
[0049] h1=(h-n+2×p) / s+1.
[0050] Furthermore, an improved Poisson fusion algorithm is used to integrate different bee images into blueberry flower images, specifically:
[0051] The gradient field of each pixel in the bee image and the blueberry flower image was obtained by using the difference method:
[0052] dx(i,j) = f(i+1,j) - f(i,j)
[0053] dy(i,j)=f(i,j+1)-f(i,j)
[0054] Where f is the value of an image pixel, and (i,j) are the coordinates of the image pixel:
[0055] An improved mask operation is performed on the gradient field of bee images: First, the bee images are labeled using LabelMe software to obtain their mask images. Then, a closing operation is performed on the bee mask images, i.e., the mask images are first dilated and then eroded. The definitions of erosion and dilation are as follows:
[0056] corrosion:
[0057] Expansion:
[0058] The result of eroding the bee image E with the structuring element B(y) is the set of all points contained in E after translating B; the result of dilating the bee image E with the structuring element B(x) is the set of non-empty points that intersect with E after translating element B.
[0059] By performing a closing operation, the bee mask image is transformed into a Trimap image. The Trimap image divides the given image into white ROI regions, black unrelated regions, and gray unknown regions to be determined.
[0060] Furthermore, by using an improved Poisson fusion algorithm to integrate different bee images into blueberry flower images, the following methods are also included:
[0061] The Laplacian matrix is constructed using the k-nearest neighbor algorithm. The eigenvector of a given pixel i is defined as follows:
[0062] X(i)=(cos(h),sin(h),s,v,x,y)
[0063] Where h, s, and v are the coordinate values in the HSV color space, and (x, y) are the spatial coordinates of pixel i.
[0064] The kernel function is defined as follows:
[0065]
[0066] Where λ is the weight adjustment coefficient, ensuring that k(i,j)∈[0,1], and ||·|| is the 1 norm, which is the sum of the absolute values of the elements after the difference between the two vectors;
[0067] The Laplace matrix L is: L = DA; where:
[0068] The alpha value of each pixel in the Trimap image is obtained using the following formula to obtain the final alpha image:
[0069]
[0070] Where λ is the weight adjustment coefficient, D is the diagonal matrix, ai is the pixel value, m is the vector of the marked pixel, white ROI region and black irrelevant region are 1, and gray unknown region is 0.
[0071] A mask operation is performed on the gradient field of the bee image to extract the gradient field of the region to be fused.
[0072] Furthermore, the improved Poisson fusion algorithm is used to integrate different bee images into blueberry flower images, which also includes:
[0073] The gradient field of the region to be fused in the bee image is fused with the gradient field of the blueberry flower image to obtain the composite image:
[0074] dx f =dx s +dx h
[0075] dy f =dy s +dy h
[0076] Where dx s dy s It is the gradient field of the region to be fused by the bees, dx h ,dy h It is the gradient field of the blueberry flower image;
[0077] Taking the partial derivative of the synthesized image further yields the divergence value of the synthesized image:
[0078]
[0079] Construct a sparse matrix A, where each row of matrix A has 5 non-zero elements in the form (..1..1..-4..1..1..), where each element corresponds to the four neighboring pixels and the pixel itself in that row of matrix w; the solution formula is:
[0080] x = A -1 *w
[0081] After obtaining x, replace each pixel in x with the corresponding position in the blueberry flower image to obtain the final fused image.
[0082] Compared with existing technologies, the above technical solutions adopted in this invention have the following advantages: color transfer processing achieves the unification of color tones between bee images and blueberry flower images; Gaussian blur and motion blur processing are applied to bee images respectively to simulate focus blur and motion blur scenes generated when the camera captures images, thereby improving the generalization ability of the dataset; the improved Poisson fusion algorithm solves the problem of boundary disappearance and loss of some feature information in the fused image during the fusion process. This method improves the detection accuracy of the model while also enhancing the model's generalization ability. Attached Figure Description
[0083] Figure 1 Flowchart of a multi-scale fusion data augmentation method for bee pollination samples;
[0084] Figure 2 The final fused sample image obtained using this method;
[0085] Figure 3 A before-and-after comparison of color migration in bee images;
[0086] Figure 4 A graph showing the network model evaluation metrics for the initial dataset;
[0087] Figure 5 A graph showing the network model evaluation metrics for the data-augmented dataset;
[0088] Figure 6 A before-and-after comparison of Gaussian blur processing on bee images;
[0089] Figure 7 Before and after motion blur processing of bee images;
[0090] Figure 8 A mask image generated to label bees;
[0091] Figure 9 Trimap diagram generated by performing a closing operation on a bee mask diagram;
[0092] Figure 10 This is the alpha image obtained after processing with the knn algorithm. Detailed Implementation
[0093] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative of this application and are not intended to limit the application; that is, the described embodiments are only a part of the embodiments of this application, and not all of them.
[0094] Example 1
[0095] like Figure 1 As shown, this application provides a multi-scale fusion data augmentation method for bee pollination samples, specifically including:
[0096] Step 1: Perform color transfer processing on the target bee image, specifically as follows:
[0097] S11. Convert the image formats of the bee image and the blueberry flower image from RGB to LAB to obtain the mean value sl of each channel of the blueberry flower image. c sa c sb c With variance hl c , ha c hb c Then, the mean value sl of each channel of the bee image is obtained. p sa p sb p With variance hl p , ha p hb p ;
[0098] S12. Subtract the mean value of the corresponding LAB channel from all pixel values of the blueberry flower image's LAB channel:
[0099] L1 = L c -sl c
[0100] A1=A c -sa c
[0101] B1 = B c -sb c
[0102] Where L c A c B c These represent the pixel values of the L, A, and B channels of the blueberry flower image, respectively.
[0103] S13. After obtaining the differences L1, A1, and B1, scale them proportionally. The scaling factor is the ratio of the standard deviations of the two images, i.e., scaling factor = standard deviation of the bee image / standard deviation of the blueberry flower image:
[0104] L2=(hl p / hl c )×L1
[0105] A2=(ha p / ha c )×A1
[0106] B2=(hb p / hb c )×B1
[0107] S14. After scaling, the pixel value of each channel is added to the mean value of each channel of the bee image to obtain the color-transferred bee image for each channel:
[0108] L=L2+sl p
[0109] A = A² + sa p
[0110] B = B² + sb p
[0111] S15. Convert the bee image from LAB format back to RGB format to complete the color migration process. This method solves the problem of color tone deviation between the bee image and the blueberry flower image, and achieves color tone unification between the bee image and the blueberry flower image.
[0112] Step 2: Apply Gaussian blur or motion blur to the color-transferred bee images to generate different bee images to be fused;
[0113] The Gaussian blur processing method is as follows:
[0114] Let f(x,y) be the pixel value of any RGB channel in a bee image. After digitization, the pixel value is g(x,y). The principle of Gaussian filtering is to process the values around the pixel using a two-dimensional Gaussian function, and then use the processed value as the pixel value of that point, thereby achieving the effect of Gaussian blur. The two-dimensional Gaussian function is represented as:
[0115]
[0116] Where G(x,y) is a two-dimensional Gaussian function, δ is the standard deviation, and x and y are the relative coordinates of pixel point f(x,y); the specific implementation is as follows:
[0117] S211. Set the coordinates of pixel f(x,y) to (0,0), construct a weight matrix K, where K is r×r and r is any odd number. Then the coordinates of the top left corner are:
[0118]
[0119] If the position of an element is set to the i-th row and j-th column of matrix K, then the coordinates of the other elements are:
[0120]
[0121] Substitute the coordinates of each element into G(x,y), set δ to 2, and obtain the weight value of each point. Then, normalize the weight matrix K by dividing each element of the weight matrix K by the sum of all elements in the matrix to obtain the updated weight matrix K1, so that the sum of the elements in the weight matrix K1 is 1.
[0122] S212. Let W be a pixel matrix of size r×r, where r is any odd number, and let the center of W be the pixel f(x,y). Then we have:
[0123] W1 r×r =W r×r ·k1 r×r
[0124] Where W1 is the matrix resulting from the dot product of the two matrices.
[0125] S213. Sum the elements in matrix W1 using a weighted summation method to obtain the final pixel value g(x,y). The summation formula is:
[0126]
[0127] Assuming an image f(x,y) undergoes planar motion, where x(t0) and y(t0) are the quantities that change with time in the x and y directions, respectively, the total exposure at any point on the medium is obtained by integrating the instantaneous exposure over the time interval. However, images of bees captured by a camera often exhibit motion blur.
[0128] The motion blur processing method is as follows:
[0129] S221. Construct the matrix Z of the motion blur kernel. Assume the motion blur is from top left to bottom right. Then the matrix Z has the following form:
[0130]
[0131] Where a1, a2, ..., an are decimals greater than 0 and less than 1, and Z is an n-order matrix;
[0132] S222. Set the size of the bee image to be convolved to w×h, the convolution kernel to be Z, the size to be n×n, the convolution stride to be s, and the padding quantity to be p. Perform a convolution operation on the bee image using matrix Z to generate a motion-blurred bee image with a size set to w1×h1. Then:
[0133] w1=(w-n+2×p) / s+1
[0134] h1=(h-n+2×p) / s+1
[0135] This method applies Gaussian blur and motion blur to bee images to simulate focus blur and motion blur scenes generated during camera capture, thereby improving the generalization ability of the dataset.
[0136] Step 3: Image fusion based on the improved Poisson fusion algorithm, including:
[0137] S31. Obtain the gradient field of each pixel in the bee image and the blueberry flower image using the difference method:
[0138] dx(i,j) = f(i+1,j) - f(i,j)
[0139] dy(i,j)=f(i,j+1)-f(i,j)
[0140] Where f is the value of an image pixel, and (i,j) are the coordinates of the image pixel:
[0141] S32. Improved mask operation on the gradient field of bee images: First, the bee image is labeled using LabelMe software to obtain its mask image. Then, a closing operation is performed on the bee mask image, i.e., the mask image is first dilated and then eroded. The definitions of erosion and dilation are as follows:
[0142] corrosion:
[0143] Expansion:
[0144] The result of eroding the bee image E with the structuring element B(y) is the set of all points contained in E after translating B; the result of dilating the bee image E with the structuring element B(x) is the set of non-empty points that intersect with E after translating element B.
[0145] By performing a closing operation, the mask image is transformed into a Trimap image, which divides the given image into white ROI regions, black unrelated regions, and gray unknown regions to be determined.
[0146] S33. Construct the Laplacian matrix using the k-nearest neighbor algorithm. Given the feature vector of pixel i, the following is defined:
[0147] X(i)=(cos(h),sin(h),s,v,x,y)
[0148] Where h, s, and v are the coordinate values in the HSV color space, and (x, y) are the spatial coordinates of pixel i.
[0149] The kernel function is defined as follows:
[0150]
[0151] Where λ is the weight adjustment coefficient, ensuring that k(i,j)∈[0,1], and ||·|| is the 1 norm, which is the sum of the absolute values of the elements after the difference between the two vectors;
[0152] The Laplace matrix L is: L = DA; where:
[0153] S34. Obtain the alpha value of each pixel in the Trimap image using the following formula to obtain the final alpha image:
[0154]
[0155] Where m is the vector of the marked pixels, 1 is the white ROI region and the black irrelevant region, and 0 is the gray unknown region to be determined;
[0156] A mask operation is performed on the gradient field of the bee image to extract the gradient field of the region to be fused. The mask image is the alpha image.
[0157] S35. Fuse the gradient field of the region to be fused in the bee image with the gradient field of the blueberry flower image to obtain a composite image:
[0158] dx f =dx s +dx h
[0159] dy f =dy s +dy h
[0160] S36. Further calculate the partial derivative of the synthesized image to obtain the divergence value of the synthesized image:
[0161]
[0162] S37. Construct a sparse matrix A, where each row of matrix A has 5 non-zero elements in the form of (..1..1..-4..1..1..), where each element corresponds to the four neighboring pixels and the pixel itself in that row of the matrix w; the solution formula is:
[0163] x = A -1 *W
[0164] After obtaining x, replace each pixel in x with the corresponding position in the blueberry flower image to obtain the final merged image.
[0165] This invention achieves fully automated operation, reducing workload when dealing with large datasets. Compared to traditional copy-and-paste data augmentation methods, it provides greater realism, ensuring the fidelity of the generated data. After addressing the sample size issue using this method, under the same validation set testing, using the YOLOv5 detection model, the evaluation metrics mAP@0.5 improved from 85.1% to 93.7%, recall from 79.9% to 87.5%, and mAP0.5:0.95 from 50.6% to 64%, demonstrating a significant improvement in detection accuracy.
[0166] The foregoing description of specific exemplary embodiments of the invention is for illustrative and explanatory purposes. These descriptions are not intended to limit the invention to the precise forms disclosed, and it will be apparent that many changes and variations can be made in accordance with the foregoing teachings. The exemplary embodiments were chosen and described in order to explain the specific principles of the invention and its practical application, thereby enabling those skilled in the art to implement and utilize various different exemplary embodiments of the invention, as well as various different choices and variations. The scope of the invention is intended to be defined by the claims and their equivalents.
Claims
1. A multi-scale fusion data augmentation method for bee pollination samples, characterized in that, include: Perform color transfer processing on the target bee image; Gaussian blur or motion blur is applied to the color-transferred bee images to generate different bee images to be fused. An improved Poisson fusion algorithm was used to integrate different bee images into blueberry flower images; The color transfer processing of the target bee image specifically involves: Convert the image formats of the bee image and the blueberry flower image from RGB to LAB to obtain the mean value sl of each channel of the blueberry flower image. c sa c sb c With variance hl c , ha c hb c Then, the mean value sl of each channel of the bee image is obtained. p sa p sb p With variance hl p , ha p hb p ; The average value of the corresponding LAB channel is subtracted from all pixel values of the blueberry flower image's LAB channel: Where L c A c B c These represent the pixel values of the L, A, and B channels of the blueberry flower image, respectively. Get the difference , , Then, the images are scaled up proportionally. The scaling factor is the ratio of the standard deviations of the two images, i.e., scaling factor = standard deviation of the bee image / standard deviation of the blueberry flower image. After scaling, the pixel value of each channel is added to the mean value of each channel of the bee image to obtain the color-transferred image of each channel of the bee: Convert the bee image from LAB format back to RGB format to complete the color transfer process; The motion blur processing specifically includes: Construct the matrix Z of the motion blur kernel, setting the motion blur to be from top left to bottom right. Then the matrix Z has the following form: Where a1, a2, ..., an are decimals greater than 0 and less than 1, and Z is an n-order matrix; Let the size of the bee image to be convolved be w×h, the convolution kernel be Z with size n×n, the convolution stride be s, and the padding be p. Perform a convolution operation on the bee image using matrix Z to generate a motion-blurred bee image with size w1×h1. Then: An improved Poisson fusion algorithm was used to integrate different bee images into blueberry flower images. Specifically: The gradient field of each pixel in the bee image and the blueberry flower image was obtained by using the difference method: Where f is the value of an image pixel, and (i,j) are the coordinates of the image pixel: An improved mask operation is performed on the gradient field of bee images: First, the bee images are labeled using LabelMe software to obtain their mask images. Then, a closing operation is performed on the bee mask images, i.e., the mask images are first dilated and then eroded. The definitions of erosion and dilation are as follows: corrosion: Expansion: The result of eroding the bee image E with the structuring element B(y) is the set of all points contained in E after translating B; the result of dilating the bee image E with the structuring element B(x) is the set of non-empty points that intersect with E after translating element B. The bee mask image is transformed into a Trimap image by closing the operation. The Trimap image divides the given image into white ROI regions, black irrelevant regions, and gray unknown regions to be determined. This involves integrating different bee images into blueberry flower images using an improved Poisson fusion algorithm, and also includes: The Laplacian matrix is constructed using the k-nearest neighbor algorithm. The eigenvector of a given pixel i is defined as follows: Where h, s, and v are the coordinate values in the HSV color space, and (x, y) are the spatial coordinates of pixel i. The kernel function is defined as follows: in It is the weight adjustment coefficient, which ensures that k(i,j)∈[0,1], and ||·|| is the 1 norm, which is the sum of the absolute values of each element after the difference between the two vectors; The Laplace matrix L is: ;in: ; The alpha value of each pixel in the Trimap image is obtained using the following formula to obtain the final alpha image: in is the weight adjustment coefficient, D is the diagonal matrix, ai is the pixel value, m is the vector of the marked pixel, white ROI region and black irrelevant region are 1, gray unknown region is 0; Perform a mask operation on the gradient field of the bee image to extract the gradient field of the region to be fused. The Gaussian blurring process is specifically as follows: The pixel value of any RGB channel in a bee image is set to f(x,y). A two-dimensional Gaussian function is applied to the values surrounding the pixel, and this processed value is then used as the pixel value for that point, thus achieving a Gaussian blur effect. The two-dimensional Gaussian function is expressed as: Where G(x,y) is a two-dimensional Gaussian function. Let x and y be the standard deviation, and let f(x,y) be the relative coordinates of the pixel. The Gaussian blurring process is implemented as follows: Let the coordinates of pixel f(x,y) be (0,0). Construct a weight matrix K of size r×r, where r is any odd number. Then the coordinates of the top-left corner are: If the position of an element is set to the i-th row and j-th column of matrix K, then the coordinates of the other elements are: Substitute the coordinates of each element into G(x,y) and set... The weight is set to 2, and the weight value of each point is obtained. Then, the weight matrix K is normalized, that is, each element of the weight matrix K is divided by the sum of all elements in the matrix to obtain the updated weight matrix K1, so that the sum of the elements in the weight matrix K1 is 1. Let W be a pixel matrix of size r×r, where r is any odd number, and let the center of W be the pixel f(x,y). Then we have: Where W1 is the matrix resulting from the dot product of the two matrices; It is a pixel matrix of size r×r for a bee image; It is a weight matrix K1 of size r×r; The final pixel value g(x,y) is obtained by weighted summation of the elements in matrix W1. The summation formula is as follows: in, W1 is a matrix with pixel coordinates (i,j).
2. The multi-scale fusion data augmentation method for bee pollination samples according to claim 1, characterized in that, This involves integrating different bee images into blueberry flower images using an improved Poisson fusion algorithm, and also includes: The gradient field of the region to be fused in the bee image is fused with the gradient field of the blueberry flower image to obtain the composite image: Where dx s dy s It is the gradient field of the region to be fused by the bees, dx h ,dy h It is the gradient field of the blueberry flower image; Taking the partial derivative of the synthesized image further yields the divergence value of the synthesized image: Construct a sparse matrix A, where each row of matrix A has 5 non-zero elements, in the form of (..1..1..-4..1..1..), where each element corresponds to... The formula for calculating the value of a pixel in a given row is: (The formula is missing from the provided text.) After obtaining x, replace each pixel in x with the corresponding position in the blueberry flower image to obtain the final fused image.