Termite recognition method based on deep learning
By calculating the termite distribution feature entropy and termite dark area enrichment index in low-light environments, performing brightness correction, and generating termite environment correction images as neural network input, the problem of poor termite recognition accuracy in the existing technology is solved and higher recognition accuracy is achieved.
Patent Information
- Application Number
- CN202311266719.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-26
- Publication Date
- 2025-05-06
- Estimated Expiration
- 2043-09-26
AI Technical Summary
The prior art is difficult to accurately identify termite individuals in low-light environments, resulting in poor termite recognition accuracy.
By obtaining the HSV image of the termite environment, calculating the binary mask of the environmental brightness distribution and the dark area image of the termite environment, calculating the characteristic entropy of the termite distribution and the enrichment index of the termite dark area, performing brightness correction, and generating the termite environment correction image as neural network input to realize termite recognition.
It improves termite recognition accuracy in low-light environments, and avoids the problem of poor recognition accuracy caused by insignificant termite characteristics under dark light conditions.
Smart Images

Figure CN117173746B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular to a termite recognition method based on deep learning. Background Art
[0002] Termites are a kind of social insects with a wide range of living, hidden activities and strong reproductive capacity. Since termites mainly feed on wood fibers, they damage the original building structure of houses and the stability of reservoir dams, causing extremely serious harm to the normal construction and development of human society. Since termites live in a low-light environment for a long time, they are usually not easy to accurately identify and observe in dark scenes.
[0003] In the existing scheme, due to the low brightness of the image of the termite living environment, the details of the individual termites cannot be accurately reflected in the image, resulting in the inability of the neural network to accurately identify individual termites, resulting in poor accuracy in the termite identification process. Summary of the invention
[0004] The present invention provides a termite identification method based on deep learning to solve the above problems. The technical solutions adopted are as follows:
[0005] An embodiment of the present invention provides a method for identifying termites based on deep learning, the method comprising the following steps:
[0006] Obtain termite environment images and termite environment HSV images;
[0007] According to the HSV image of the termite environment, a binary mask of the environment brightness distribution is obtained and a dark area image of the termite environment is obtained; according to each dark area image of the termite environment, a color characteristic frequency of each dark area image of the termite environment is calculated; according to each dark area image of the termite environment, a geometric center of each dark area image of the termite environment is calculated; according to the color characteristic frequency of each dark area image of the termite environment, a termite distribution characteristic entropy of each dark area image of the termite environment is calculated; according to the geometric center of each dark area image of the termite environment, a distribution distance of each dark area image of the termite environment is calculated; according to the distribution distance of each dark area image of the termite environment and the termite distribution characteristic entropy, a termite dark area enrichment index of each dark area image of the termite environment is calculated;
[0008] The brightness correction value of each pixel is calculated according to the termite dark area enrichment index of each termite environment dark area image, and the termite environment corrected image is obtained based on the brightness correction value. The termite environment corrected image is input into the neural network to obtain the termite recognition result.
[0009] Preferably, the method for obtaining a binary mask of the environment brightness distribution and obtaining a dark area image of the termite environment according to the HSV image of the termite environment is:
[0010] The brightness V channel value of each pixel in the HSV image of the termite environment is obtained, and the environment brightness distribution image is constructed based on the brightness V channel value of each pixel. The environment brightness distribution image is used as the input of the Otsu method to obtain the environment brightness distribution binary mask. The result of multiplying the environment brightness distribution binary mask and the termite environment image is recorded as the termite environment dark area image.
[0011] Preferably, the method for calculating the color characteristic frequency of each dark area image of the termite environment according to each dark area image of the termite environment is:
[0012] The color H channel value of each pixel in the termite environment HSV is obtained, and a window area of a preset size can be obtained with each pixel in the dark area image of each termite environment as the center, and the second-order color moment of the color H channel of the pixel in each window area is calculated. The difference between the maximum and minimum values of the second-order color moment of each pixel in the dark area image of the termite environment is calculated and recorded as the first difference, and the result of rounding up the ratio of the first difference to the preset empirical value is recorded as the interval length. Based on the interval length, the second-order color moment value of each pixel is divided into different intervals, and the ratio of the number of pixels in different intervals to the total number of pixels in the dark area image of the termite environment is calculated as the color feature frequency.
[0013] Preferably, the method for calculating the geometric center of each dark area image of the termite environment according to each dark area image of the termite environment is:
[0014] The horizontal and vertical coordinates of all pixel points in the boundary of each termite environment dark area image are obtained, and the line between the two pixel points with the longest Euclidean distance in the numerical direction is recorded as the first characteristic straight line, and the line between the two pixel points with the longest Euclidean distance in the direction of a preset angle is recorded as the second characteristic straight line. The line is rotated clockwise for multiple times until the angle becomes vertical again, and the coordinates of the point where all the characteristic lines intersect the most are recorded as the geometric center of the termite environment dark area image.
[0015] Preferably, the specific method for calculating the termite distribution characteristic entropy of each dark area image of the termite environment according to the color characteristic frequency of each dark area image of the termite environment is:
[0016]
[0017] In the above formula, gm i represents the numerical value of the grayscale mean of all pixels in the i-th termite environment dark area image, G represents the grayscale of the pixel in the termite environment image, n i represents the total number of all pixels in the dark area image of the i-th termite environment, p j represents the color characteristic frequency of pixel j, log2() represents the logarithmic function with the number 2 as the base, EFn iIt represents the termite distribution characteristic entropy of the i-th termite environment dark area image.
[0018] Preferably, the method for calculating the distribution distance of each dark area image of the termite environment according to the geometric center of each dark area image of the termite environment is:
[0019] The sum of the Euclidean distance of the geometric center coordinates and the Euclidean distance of the centroid coordinates of two different termite environment dark area images is recorded as the distribution distance between the two termite environment dark area images.
[0020] Preferably, the specific method for calculating the termite dark area enrichment index of each termite environment dark area image according to the distribution distance of each termite environment dark area image and the termite distribution characteristic entropy is:
[0021]
[0022] In the above formula, Dist() represents the Euclidean distance between two different coordinates, Dc i represents the geometric center coordinates of the dark area image of the i-th termite environment, Mc i represents the centroid coordinates of the dark area image of the i-th termite environment, exp() represents the exponential function with natural constant as the base, Nr i represents the adjacent dark area adjustment constant, EFn i represents the termite distribution characteristic entropy in the dark area image of the i-th termite environment, EFn i,k It represents the termite distribution characteristic entropy of the kth adjacent dark area image in the i-th termite environment dark area image, Tx i It represents the LBP texture mean of all pixels in the dark area of the i-th termite environment image, Tx i,k represents the LBP texture mean of all pixels in the kth adjacent dark area image in the i-th termite environment dark area image, pif i It represents the termite dark area enrichment index of the i-th termite environment dark area image.
[0023] Preferably, the method for calculating the brightness correction value of each pixel point according to the termite dark area enrichment index of each termite environment dark area image is:
[0024]
[0025] In the above formula, v i represents the dynamic brightness transformation coefficient of the dark area image of the i-th termite environment, MV i represents the mean value of the brightness V channel of all pixels in the dark area image of the i-th termite environment, log vi () represents a logarithmic function based on the dynamic brightness transformation coefficient, Kv i,xrepresents the Peel growth brightness of the x-th pixel in the dark area image of the i-th termite environment, V i,x It represents the value of the brightness V channel of the x-th pixel in the dark area image of the i-th termite environment, Pl i,x It represents the brightness correction value of the x-th pixel in the i-th termite environment dark area image.
[0026] Preferably, the calculation method of the dynamic brightness transformation coefficient of the dark area image of the termite environment is:
[0027] The sum of the reciprocal of the termite dark area enrichment index of each termite environment dark area image and the natural constant is recorded as the dynamic brightness transformation coefficient of each termite environment dark area image.
[0028] Preferably, the method of inputting the corrected termite environment image into the neural network to obtain the termite recognition result is:
[0029] The neural network input is adjusted to the size of the termite environment corrected image. When the neural network output result is a first preset value, it is considered that termites exist in the current environment. When the neural network output result is a second preset value, it is considered that termites do not exist in the current environment.
[0030] The beneficial effects of the present invention are as follows: the present invention obtains a dark area image of a termite environment by calculating pixel point values of different brightness areas in a termite environment image, and calculates termite distribution characteristic entropy according to the dark area image of the termite environment, and calculates and characterizes the termite distribution characteristics in the dark area image of the termite environment through the termite distribution characteristic entropy. At the same time, the present invention obtains a dark area image of an adjacent termite environment by calculating the distribution distance between different dark area images of the termite environment, and calculates a termite dark area enrichment index according to the dark area image of the adjacent termite environment combined with the geometric center coordinate change characteristics, which more accurately represents the distribution of termite pixel points compared to traditional grayscale images. Furthermore, the present invention obtains a brightness correction value in combination with the termite dark area enrichment index, and adjusts and corrects the original low-brightness dark area image of the termite environment to obtain a termite environment correction image, which is used as the input of a termite neural network, thereby avoiding the disadvantage of poor recognition accuracy of the termite neural network caused by unclear termite characteristics under dim light conditions. BRIEF DESCRIPTION OF THE DRAWINGS
[0031] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0032] Figure 1 A schematic diagram of a process for identifying termites based on deep learning provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0033] 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 the embodiments. 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.
[0034] See also Figure 1 , which shows a flow chart of a termite identification method based on deep learning provided by an embodiment of the present invention, the method comprising the following steps:
[0035] Step S001, obtaining a termite environment image and a termite environment HSV image.
[0036] Termites mainly use woody plant fibers and mineral materials as food sources, and more woody fibers and mineral materials are usually used in the construction of houses and buildings. Therefore, a visual image sensor is set in the important protection area of the house and building to obtain the original termite environment image. Since the CCD camera imaging technology is relatively mature, the present invention uses a CCD camera as a visual image sensor.
[0037] Since the original termite environment image obtained by the CCD camera has three different channels of RGB, in order to avoid the influence of high interference of abnormal noise in the acquisition working environment on the accuracy of the subsequent termite identification process, the present invention first performs Gaussian filtering on the three different channels of RGB in the original termite environment image by Gaussian filtering method, and reduces or even eliminates the interference caused by random environmental noise in the shooting and acquisition process on the subsequent termite identification process as much as possible, and records the processed image as the termite environment image in the RGB color space. At the same time, in order to avoid repeated calculation of the three different channels of RGB in the termite environment image, the grayscale image is obtained by using the weighted average method for the processed image, and the grayscale image is recorded as the termite environment image.
[0038] It should be noted that termites are usually photophobic organisms, and the brightness of their living environment is relatively dark. Therefore, the brightness of the acquired termite environment image is relatively low. There are certain differences in the brightness distribution of different pixel areas in the termite environment image. In order to better obtain the brightness distribution characteristics of different areas in the monitoring environment, the termite environment image in the RGB color space is converted into the HSV color space, wherein the process of converting the RGB color space into the HSV color space is a well-known technology and will not be repeated here.
[0039] Step S002, obtaining a binary mask of the environment brightness distribution and obtaining a dark area image of the termite environment according to the HSV image of the termite environment, calculating the color characteristic frequency of each dark area image of the termite environment according to each dark area image of the termite environment, and calculating the termite distribution characteristic entropy of each dark area image of the termite environment according to the color characteristic frequency of each dark area image of the termite environment.
[0040] It should be noted that there may be large differences in the brightness values of different pixels in the termite environment image. Due to the low light brightness, different dark areas will appear in the image. These dark areas cannot show the individual characteristics of the termite surface well due to the low light brightness. Therefore, it is necessary to obtain the distribution of dark areas in the termite environment image.
[0041] Specifically, the brightness V channel value of each pixel in the termite environment image under the HSV color space is obtained to form an environment brightness distribution image. In the environment brightness distribution image, the higher the pixel value, the higher the brightness of the pixel. Conversely, the smaller the pixel value, the smaller the brightness of the pixel. Therefore, the environment brightness distribution image is used as the input and the Otsu method is used for segmentation to obtain two types of different brightness distribution areas in the obtained environment brightness distribution image. The area with a smaller value in the brightness distribution area is recorded as the environment brightness distribution dark area, and the area with a larger value in the brightness distribution area is recorded as the environment brightness distribution bright area. The pixel value of the environment brightness distribution dark area is marked as 0, and the pixel value of the environment brightness distribution bright area is marked as 1, and the environment brightness distribution binary mask is generated. The environment brightness distribution binary mask is multiplied with the termite environment image to obtain the termite environment dark area image.
[0042] It should be noted that since the surface of individual termites is mostly milky white in color, in the dark area image of the termite environment, if there are termites, the color values of the pixels on the surface of the individual termites should be significantly different from the pixel values of the surrounding environment. Therefore, the distribution coefficient of the termite pixels in the dark area is calculated based on the dark area image of the termite environment.
[0043] Specifically, a preset window area of size W×W can be obtained with the jth pixel point of the i-th termite environment dark area image as the center, and W is taken as 5 in the present invention. The second-order color moment of the H channel of all pixels in the preset window area is calculated and recorded as σc i,j , the second-order color moment σc calculated in the window area of preset size centered at the jth pixel i,j The larger the value is, the wider the distribution range of the color values of different pixel points in the preset window is.
[0044]
[0045] In the above formula, gm irepresents the numerical value of the grayscale mean of all pixels in the i-th termite environment dark area image, G represents the grayscale of the pixel in the termite environment image, n i represents the total number of all pixels in the dark area image of the i-th termite environment, p j represents the color characteristic frequency of pixel j, log2() represents the logarithmic function with the number 2 as the base, EFn i It represents the termite distribution characteristic entropy of the i-th termite environment dark area image.
[0046] Specifically, the color characteristic frequency p of pixel j is j The specific calculation method of is as follows: for all pixels at different positions in the dark area image of the i-th termite environment, a window area of a preset size can be formed and the second-order color moment values of the pixels in the window area of the preset size are calculated. The maximum second-order color moment value of all pixels in the window area of the preset size is calculated and recorded as maxσ i , the minimum second-order color moment value is recorded as minσ i , let the interval length Where [] represents the rounding function, and the empirical value of t is 8. The values of the second-order color moments of all pixels in the dark area image of the i-th termite environment are divided into different value intervals with s as the interval length. Assume that the number of pixels in the value interval where the j-th pixel is located is m j ,but
[0047] In the i-th dark area image of the termite environment, if termites exist, the grayscale value of the pixel at the termite area is larger than the grayscale values of other pixels due to the fact that the surface of termites is mostly milky white, resulting in a higher grayscale mean value of the pixels in the dark area image of the termite environment. At the same time, if the distribution range of the color moment values of different pixel points calculated at this time is wider, the distribution difference of the pixels in different value intervals is greater, and the value of the termite distribution characteristic entropy calculated at this time is greater, indicating that the possibility of the existence of termites in the i-th dark area image of the termite environment is higher.
[0048] Step S003, calculating the geometric center of each termite environment dark area image according to each termite environment dark area image, calculating the distribution distance of each termite environment dark area image according to the geometric center of each termite environment dark area image, calculating the termite dark area enrichment index of each termite environment dark area image according to the distribution distance of each termite environment dark area image and the termite distribution characteristic entropy, and calculating the brightness correction value of each pixel point according to the termite dark area enrichment index of each termite environment dark area image.
[0049] It should be noted that in the dark area image of the termite environment, there may be interference noise factors such as wood chips and gravel that are similar to the appearance of termites. These highly similar interference factors will cause great interference to the accuracy of termite feature recognition in the dark area image of the termite environment. Therefore, it is necessary to further calculate the termite features of different dark area images of the termite environment. Generally, termites are distributed in clusters. Therefore, if there are termites in a dark area image of a termite environment, termites will also appear in the surrounding image area of the dark area image of the termite environment.
[0050] Specifically, first obtain the horizontal and vertical coordinates of all pixel points on the boundary of the dark area image of the i-th termite environment, record the line connecting the two pixel points with the longest Euclidean distance in the vertical direction as l1, and set the preset interval angle α to take the empirical value The line connecting the two pixels with the farthest Euclidean distance in the direction of the preset interval angle is recorded as l2, and the lines connecting different pixel points are obtained in turn by rotating clockwise at the preset interval angle. The focal coordinates passing through the most lines are marked as the geometric center coordinates of the i-th termite environment dark area image, recorded as Dc i At the same time, the centroid coordinates of the i-th termite environment dark area image are calculated according to the distribution of the grayscale values of different pixels in the i-th termite environment dark area image, denoted as Mc i .
[0051] Td i,k = Dist(Dc i ,Dc k )+Dist(Mc i ,Mc k )
[0052] In the above formula, Dist() represents the Euclidean distance between two different coordinates, Dc i represents the geometric center coordinates of the dark area image of the i-th termite environment, Dc k Mc represents the geometric center coordinates of the kth dark area image of the termite environment, i represents the geometric center coordinates of the dark area image of the i-th termite environment, Mc k represents the geometric center coordinates of the kth dark area image of the termite environment, Td i,k It represents the distribution distance between the i-th termite environment dark area image and the k-th termite environment dark area image.
[0053] Sort the dark area images of different termite environments according to their distribution distance from small to large to obtain the minimum Nb i termite environment dark area images are taken as the neighboring termite environment dark area images of the i-th termite environment dark area image, Nr i It represents the adjacent dark area adjustment constant, and the empirical value of the present invention is 8.
[0054]
[0055] In the above formula, Dist() represents the Euclidean distance between two different coordinates, Dc i represents the geometric center coordinates of the dark area image of the i-th termite environment, Mc i represents the centroid coordinates of the dark area image of the i-th termite environment, exp() represents the exponential function with natural constant as the base, Nr i represents the adjacent dark area adjustment constant, EFn i represents the termite distribution characteristic entropy in the dark area image of the i-th termite environment, EFn i,k It represents the termite distribution characteristic entropy of the kth adjacent dark area image in the i-th termite environment dark area image, Tx i It represents the LBP texture mean of all pixels in the dark area of the i-th termite environment image, Tx i,k represents the LBP texture mean of all pixels in the kth adjacent dark area image in the i-th termite environment dark area image, pif i It represents the termite dark area enrichment index of the i-th termite environment dark area image.
[0056] Assuming that there are termites in the i-th termite environment dark area image, since the grayscale value of the termite pixel is different from the grayscale value of other pixels, the geometric center in the i-th termite environment dark area image will be greatly offset from the centroid position, and the Euclidean distance between the two different coordinates will be relatively large. The smaller the difference in termite distribution characteristic entropy between the i-th termite environment dark area image and its nearest k termite environment dark area images, the higher the similarity between the i-th termite environment dark area image and the surrounding adjacent termite environment dark area images. At the same time, if the LBP mean values of the pixels in the two termite environment dark area images are closer, it means that the possibility that the i-th termite environment dark area image and the surrounding adjacent termite environment dark area images are both termites is higher, and the larger the calculated termite dark area enrichment index is, the higher the possibility of the existence of termites in the termite environment dark area image is.
[0057] It should be noted that in the termite environment image, in different termite environment dark area images, if the calculated termite dark area enrichment index is larger, it means that there are termite pixel features in the current termite environment dark area image, but due to the low ambient brightness, the termite pixel features are not obvious, resulting in poor accuracy in the subsequent termite recognition process in the image. Therefore, it is necessary to combine the numerical characteristics of termite pixels in different dark area images for relevant calculation and analysis.
[0058]
[0059] In the formula, e represents the natural constant, pif irepresents the termite dark area enrichment index of the i-th termite environment dark area image, v i It represents the dynamic brightness transformation coefficient of the dark area image of the i-th termite environment.
[0060]
[0061] In the above formula, v i represents the dynamic brightness transformation coefficient of the dark area image of the i-th termite environment, MV i It represents the mean value of the brightness V channel of all pixels in the dark area image of the i-th termite environment. represents a logarithmic function based on the dynamic brightness transformation coefficient, Kv i,x represents the Peel growth brightness of the x-th pixel in the dark area image of the i-th termite environment, V i,x It represents the value of the brightness V channel of the x-th pixel in the dark area image of the i-th termite environment, Pl i,x It represents the brightness correction value of the x-th pixel in the i-th termite environment dark area image.
[0062] When there is more termite information in the i-th termite environment dark area image, the calculated termite dark area enrichment index will be relatively large. At this time, the dynamic brightness transformation coefficient is small, so the base in the logarithmic function is small, and the range of logarithmic function values is wider, which enriches the brightness characteristics of termite pixels in the termite environment dark area image. At the same time, in order to meet the brightness numerical characteristics of termite pixels in the termite environment dark area image, the V channel values of all pixels in the preset window of size W×W centered on the x-th pixel point are clockwise formed into a brightness numerical sequence of pixel point x, and the brightness numerical sequence of pixel point x is used as input, and the Peel growth curve is used to obtain the brightness Peel growth brightness value at pixel point x, wherein the specific calculation method of the Peel growth curve is a well-known technology and will not be repeated here. Through the above steps, the value of the termite pixel in the termite environment dark area image is optimized and corrected by expanding the brightness correction range, the brightness value of the termite pixel in the dark area environment image is improved, and the brightness of the termite pixel in the dark area image is more obvious.
[0063] Step S004, obtaining a termite environment correction image based on the brightness correction value, and inputting the termite environment correction image into a neural network to obtain a termite recognition result.
[0064] The pixel brightness values of all dark area images of the termite environment in the termite environment image are optimized and corrected to obtain the termite environment image after pixel brightness correction, which is recorded as the termite environment corrected image. The termite environment corrected image is used as the input of the deep network model to identify termites in the image.
[0065] Specifically, we first construct termite recognition labels in termite environment images through labelme. To facilitate subsequent calculations, we use the one-hot method to encode the labels and obtain a termite recognition image dataset. At the same time, we adjust the input size in the AlexNet network model to keep consistent with the image size in the termite recognition image dataset, adjust the number of neurons in the output layer to 2, use the cross entropy function as the loss function, and use Momentum as the optimizer to train the adjusted AlexNet network.
[0066] The corrected termite environment image is used as input and processed using the adjusted and trained AlexNet. If the output result is 1, it is considered that there are termites in the current building area, and the stability of the building structure needs to be tested to eliminate termite damage; if the output result is 0, it is considered that there are no termites in the current building area.
[0067] The embodiments described above are only used to illustrate the technical solutions of the present application, rather than to limit them. Although the present application has been described in detail with reference to the aforementioned embodiments, a person skilled in the art should understand that the technical solutions described in the aforementioned embodiments may still be modified, or some of the technical features may be replaced by equivalents. Such modifications or replacements do not deviate the essence of the corresponding technical solutions from the scope of the technical solutions of the embodiments of the present application, and should all be included in the protection scope of the present application.
Claims
1. A termite identification method based on deep learning, characterized in that: The method comprises the following steps: Obtain termite environment images and termite environment HSV images; According to the HSV image of the termite environment, a binary mask of the environment brightness distribution is obtained and a dark area image of the termite environment is obtained; according to each dark area image of the termite environment, a color characteristic frequency of each dark area image of the termite environment is calculated; according to each dark area image of the termite environment, a geometric center of each dark area image of the termite environment is calculated; according to the color characteristic frequency of each dark area image of the termite environment, a termite distribution characteristic entropy of each dark area image of the termite environment is calculated; according to the geometric center of each dark area image of the termite environment, a distribution distance of each dark area image of the termite environment is calculated; according to the distribution distance of each dark area image of the termite environment and the termite distribution characteristic entropy, a termite dark area enrichment index of each dark area image of the termite environment is calculated; Calculate the brightness correction value of each pixel point according to the termite dark area enrichment index of each termite environment dark area image, obtain the termite environment correction image based on the brightness correction value, and input the termite environment correction image into the neural network to obtain the termite recognition result; The expression of the termite dark area enrichment index is: ; In the formula, represents the Euclidean distance between two different coordinates, It indicates the The geometric center coordinates of the dark area image of the termite environment, It indicates the The centroid coordinates of the dark area images of the termite environment, represents an exponential function with a natural constant as base, represents the adjacent dark area adjustment constant, It indicates the The termite distribution characteristic entropy in the dark area image of the termite environment is It indicates the In the dark area image of the termite environment The termite distribution characteristic entropy of the adjacent dark area images is: It indicates the The LBP texture mean of all pixels in the dark area of the termite environment image, It indicates the In the dark area image of the termite environment The LBP texture mean of all pixels in the adjacent dark area image, It indicates the Termite dark area enrichment index of dark area images of termite environment; The expression of the brightness correction value is: ; In the formula, It indicates the The dynamic brightness transformation coefficient of the dark area image of the termite environment, It indicates the The mean value of the brightness channel V of all pixels in the dark area image of the termite environment, represents a logarithmic function based on the dynamic brightness transformation coefficient, It indicates the In the dark area image of the termite environment The Peel growth brightness of each pixel, It indicates the In the dark area image of the termite environment The value of the brightness V channel of each pixel, The indicated In the dark area image of the termite environment The brightness correction value of each pixel.
2. The termite identification method based on deep learning according to claim 1, characterized in that: The method for obtaining a binary mask of the environment brightness distribution and obtaining a dark area image of the termite environment according to the HSV image of the termite environment is: The brightness V channel value of each pixel in the HSV image of the termite environment is obtained, and the environment brightness distribution image is constructed based on the brightness V channel value of each pixel. The environment brightness distribution image is used as the input of the Otsu method to obtain the environment brightness distribution binary mask. The result of multiplying the environment brightness distribution binary mask and the termite environment image is recorded as the termite environment dark area image.
3. The termite identification method based on deep learning according to claim 2, characterized in that: The method for calculating the color characteristic frequency of each dark area image of the termite environment according to each dark area image of the termite environment is: The color H channel value of each pixel in the termite environment HSV is obtained, and a window area of a preset size can be obtained with each pixel in the dark area image of each termite environment as the center, and the second-order color moment of the color H channel of the pixel in each window area is calculated. The difference between the maximum and minimum values of the second-order color moment of each pixel in the dark area image of the termite environment is calculated and recorded as the first difference, and the result of rounding up the ratio of the first difference to the preset empirical value is recorded as the interval length. Based on the interval length, the second-order color moment value of each pixel is divided into different intervals, and the ratio of the number of pixels in different intervals to the total number of pixels in the dark area image of the termite environment is calculated as the color feature frequency.
4. The termite identification method based on deep learning according to claim 2, characterized in that: The method for calculating the geometric center of each dark area image of the termite environment according to each dark area image of the termite environment is: The horizontal and vertical coordinates of all pixel points in the boundary of each termite environment dark area image are obtained, and the line between the two pixel points with the longest Euclidean distance in the numerical direction is recorded as the first characteristic straight line, and the line between the two pixel points with the longest Euclidean distance in the direction of a preset angle is recorded as the second characteristic straight line. The line is rotated clockwise for multiple times until the angle becomes vertical again, and the coordinates of the point where all the characteristic lines intersect the most are recorded as the geometric center of the termite environment dark area image.
5. The termite identification method based on deep learning according to claim 3, characterized in that: The specific method for calculating the termite distribution characteristic entropy of each dark area image of the termite environment according to the color characteristic frequency of each dark area image of the termite environment is: ; In the formula, It indicates the The numerical value of the grayscale mean of all pixels in the dark area image of the termite environment is Represents the gray level of pixels in the termite environment image. It indicates the The total number of all pixels in the dark area image of the termite environment, Represents the pixel The color characteristic frequency, represents the logarithmic function with the number 2 as the base, It indicates the The termite distribution characteristic entropy of the dark area image of the termite environment.
6. The termite identification method based on deep learning according to claim 4, characterized in that: The method for calculating the distribution distance of each dark area image of the termite environment according to the geometric center of each dark area image of the termite environment is: The sum of the Euclidean distance of the geometric center coordinates and the Euclidean distance of the centroid coordinates of two different termite environment dark area images is recorded as the distribution distance between the two termite environment dark area images.
7. The termite identification method based on deep learning according to claim 1, characterized in that: The calculation method of the dynamic brightness transformation coefficient of the dark area image of the termite environment is: The sum of the reciprocal of the termite dark area enrichment index of each termite environment dark area image and the natural constant is recorded as the dynamic brightness transformation coefficient of each termite environment dark area image.
8. The termite identification method based on deep learning according to claim 1, characterized in that: The method of inputting the termite environment correction image into the neural network to obtain the termite recognition result is: The neural network input is adjusted to the size of the termite environment corrected image. When the neural network output result is a first preset value, it is considered that termites exist in the current environment. When the neural network output result is a second preset value, it is considered that termites do not exist in the current environment.
Citation Information
Patent Citations
Method for quickly identifying mildewing of murcott
CN115266736A
Spraying image processing method for spraying machine quality inspection
CN115439494A