Livestock and poultry manure treatment effect dynamic monitoring method and system based on monitoring image
By segmenting and analyzing the feces in the fermentation tank based on the monitoring image, calculating the regional diffusion characteristics of the fermentation area and the original grayscale of the white foam area, the problem of low monitoring accuracy of the fermentation tank in the prior art is solved, and a higher monitoring accuracy of the fermentation degree is achieved.
Patent Information
- Application Number
- CN202411899991.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-08
AI Technical Summary
The existing fermentation tank fermentation monitoring methods have low accuracy and it is difficult to monitor the overall fermentation of the fermentation tank, and the monitoring results are quite different from the actual situation.
Using a method based on monitoring images, the initial image of the feces in the fermentation pond is obtained, and the fermentation area and the white foam area are segmented. The layer diffusion parameters of the pixel points of each layer are calculated, the regional diffusion characteristics of the fermentation area are obtained, and the original grayscale of each pixel point in the white foam area is determined, and the fermentation degree is finally calculated.
The impact of white foam floating on the surface of the fermentation tank on the judgment of fermentation effect is effectively solved, and the accuracy of monitoring the fermentation degree of fermentation tank through image recognition technology is improved, and it is of high practicality.
Smart Images

Figure CN119785290A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of image recognition, and in particular to a method and system for dynamically monitoring livestock and poultry manure treatment effects based on monitoring images. Background Art
[0002] The livestock and poultry manure storage and fermentation technology is to collect the mixture of livestock and poultry manure, urine, leaked drinking water, flushing water, and a small amount of scattered feed produced by livestock and poultry farms, and then ferment the manure liquid under open or semi-open conditions through solid-liquid separation to achieve the effect of manure stabilization and harmlessness, and realize the recycling of manure liquid. Figure 1 This is a common livestock and poultry manure treatment process architecture diagram.
[0003] Figure 1 In the process, after starting the dry-wet separator, the livestock and poultry manure and sewage collected by flushing are separated into dry and wet parts, and semi-dry livestock and poultry manure and manure liquid are separated. The water content of the manure residue after separation is about 45%. The manure liquid is then passed through the turnover tank and input into the fermentation tank in batches. The existing method for monitoring the fermentation status of the fermentation tank is usually to monitor the fermentation degree of the manure liquid fermentation tank through relevant sensors, etc. However, the sensor can only monitor the fermentation status of the corresponding monitoring point, and it is difficult to monitor the overall fermentation status of the fermentation tank. The monitoring results have a large deviation from the actual situation. Summary of the invention
[0004] In order to solve the technical problem of low accuracy of the existing fermentation status monitoring method of the fermentation tank, the purpose of the present invention is to provide a method and system for dynamically monitoring the treatment effect of livestock and poultry manure based on monitoring images. The technical scheme adopted is as follows: In a first aspect of the present invention, a method for dynamically monitoring the treatment effect of livestock and poultry manure based on monitoring images is provided, comprising: Step 1: Obtain the initial image of the manure liquid in the fermentation tank and segment it into the fermentation area and the white foam area; Step 2: according to the pixel difference between the central pixel of the fermentation area and the pixel points of each layer in the periphery, the layer diffusion parameter of each layer of the pixel points is obtained, and the layer diffusion parameter is used to characterize the diffusion situation from the central pixel point to the periphery of the corresponding layer; Step 3: based on the layer diffusion parameters of the pixels of each layer, obtaining the regional diffusion characteristics of the fermentation area; Step 4: Based on the regional diffusion characteristics of each fermentation area, determine the original grayscale of each pixel in the white foam area, where the original grayscale is the grayscale of the pixel corresponding to the manure liquid blocked by the white foam area; Step 5: Obtain the fermentation degree according to the grayscale of each pixel in the fermentation area and the original grayscale of each pixel in the white foam area.
[0005] In the second aspect of the present invention, a system for dynamic monitoring of livestock and poultry manure treatment effects based on monitoring images is provided, comprising: a memory and a processor; the memory is connected to the processor; the memory is used to store program instructions; the processor is used to implement the above-mentioned method for dynamic monitoring of livestock and poultry manure treatment effects based on monitoring images when the program instructions are executed.
[0006] The present invention has the following beneficial effects: the present invention obtains an initial image of the manure liquid in the fermentation tank, and divides it into a fermentation area and a white foam area. Since the white foam area blocks part of the manure liquid area, and there is a correlation between the fermentation area and the white foam area, first, according to the pixel point difference between the central pixel point of the fermentation area and the pixel points of each layer of the periphery, the layer diffusion parameters of each layer of pixels are obtained, and then the regional diffusion characteristics of the fermentation area are obtained. Then, according to the regional diffusion characteristics of each fermentation area, the original grayscale of each pixel point in the white foam area is determined, that is, the grayscale of the pixel point corresponding to the manure liquid blocked by the white foam area. Finally, according to the grayscale of each pixel point in the fermentation area and the original grayscale of each pixel point in the white foam area, the fermentation degree of each pixel point can be obtained, which can effectively solve the influence of the white foam floating on the surface of the fermentation tank on the judgment of the fermentation effect, realize the dynamic monitoring of the treatment effect of the livestock and poultry manure liquid fermentation tank, and improve the accuracy of monitoring the fermentation degree of the fermentation tank by image recognition technology, and has high practicality. BRIEF DESCRIPTION OF THE DRAWINGS
[0007] Figure 1 This is a common flow chart for livestock and poultry manure treatment; Figure 2 A flowchart of a method for dynamically monitoring livestock and poultry manure treatment effects based on monitoring images provided by an embodiment of the present invention; Figure 3 The figure is a simplified schematic diagram of the division of each layer of pixels in one embodiment of the present invention. DETAILED DESCRIPTION
[0008] In order to further explain the technical means and effects adopted by the present invention to achieve the predetermined invention purpose, the specific implementation methods, structures, features and effects of the present invention are described in detail below in conjunction with the accompanying drawings and preferred embodiments. In the following description, different "one embodiment" or "another embodiment" does not necessarily refer to the same embodiment. In addition, specific features, structures or characteristics in one or more embodiments may be combined in any suitable form.
[0009] Unless defined otherwise, all technical and scientific terms used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this invention belongs.
[0010] This embodiment provides a method for dynamically monitoring the treatment effect of livestock and poultry manure based on monitoring images, and dynamically monitors the treatment effect of livestock and poultry manure through image recognition technology. Figure 2 As shown, the following steps are included: Step 1: Obtain the initial image of the manure liquid in the fermentation tank and segment it into the fermentation area and the white foam area.
[0011] A surveillance camera is installed at an appropriate height above the fermentation tank. The surveillance camera is directed toward the fermentation tank to obtain the initial image of the fecal liquid in the fermentation tank in real time and dynamically (the initial image of the fecal liquid is a rectangular image). The setting height of the surveillance camera is based on the ability to capture images of the entire area of the fermentation tank.
[0012] During the process of microbial fermentation of manure liquid in the fermentation tank, due to the presence of protein surfactants in the manure liquid, under ventilation conditions, white foam will form on the surface of the fermentation tank due to the decomposition of organic matter by microorganisms, thereby forming a white foam area on the surface of the fermentation tank. White foam is a colloidal system in which gas is decomposed in a small amount of liquid system. The gas and liquid are separated by a layer of liquid film and are not connected to each other. In the initial image of the manure liquid, the white foam will obscure the original manure liquid, thereby affecting the acquisition of the manure liquid characteristics under the white foam, resulting in errors in judging the overall degree of fermentation.
[0013] Moreover, the main reason for the generation of white foam areas is that the surface fluidity of the manure liquid is low, so it gathers; while other manure liquid areas without white foam have high surface fluidity and high internal fermentation degree, and it is believed that the fermentation degree gradually decreases evenly from the core position of the fermentation area to the surrounding areas. That is, the manure liquid at the location where white foam is generated usually has slow fluidity, and the surrounding manure liquid has high fluidity, and the manure liquid with high fluidity around it usually has a higher temperature, and the higher the temperature, the higher the fermentation degree.
[0014] In order to improve the monitoring accuracy, the initial image of the feces and sewage liquid is segmented to obtain the fermentation area and the white foam area. Then, the fluidity of the feces and sewage liquid in the fermentation area is higher, while the fluidity of the feces and sewage liquid in the white foam area is lower. It should be understood that the number of fermentation areas obtained by segmentation can be only one or more, and the number of white foam areas can be only one or more.
[0015] The implementer can select the image segmentation algorithm to be adopted according to actual needs. In an exemplary embodiment, an artificial intelligence recognition network is designed, and its basic architecture is a CNN (Convolutional Neural Network) architecture, and the training set is the manually labeled white foam area and fermentation area, where the pixels in the white foam area can be marked as 1, and the pixels in the fermentation area can be marked as 0. Then the artificial intelligence recognition network is trained according to the training set to obtain an image segmentation model. The obtained initial image of the fecal sewage liquid is input into the image segmentation model for image segmentation, and then the fermentation area and the white foam area are obtained by using the seed filling method, the connected domain recognition algorithm, and the like.
[0016] In an exemplary embodiment, if there are too few white foam areas, it is possible that the reflection is mistakenly identified as white foam. If there are too few white foam areas, the impact on subsequent calculations is small, and there is no need to execute subsequent steps 2-4. The fermentation degree can be directly judged. In a special embodiment, if there is no white foam area, the fermentation degree is directly judged, or the method for dynamic monitoring of livestock and poultry manure treatment effects based on monitoring images provided in this embodiment is not executed; if there are too many white foam areas, it means that the surface of the fermentation tank is covered with a large amount of white foam. Even if it is identified through subsequent steps 2-4, it may affect the accuracy of the final fermentation degree. Therefore, in this case, the method for dynamic monitoring of livestock and poultry manure treatment effects based on monitoring images provided in this embodiment may not be executed, but it may be analyzed and determined through manual or other monitoring forms (such as direct detection by plug-in sensors). Therefore, after obtaining the fermentation area and the white foam area, the method for dynamic monitoring of livestock and poultry manure treatment effects also includes the following process: Obtain the area ratio of the white foam area to the total area of the initial image of the fecal liquid, and obtain the grayscale value variance of the pixels in the white foam area. The area ratio can be obtained by taking the number of pixels in the white foam area as the area of the white foam area, taking the total number of pixels in the initial image of the fecal liquid as the total area of the initial image of the fecal liquid, and then taking the ratio of the number of pixels in the white foam area to the total number of pixels in the initial image of the fecal liquid as the area ratio. The grayscale value variance can be obtained by obtaining the grayscale of each pixel in the white foam area (the grayscale mentioned in this embodiment refers to the grayscale value), and then calculating the grayscale value variance. The grayscale value variance is calculated because the grayscale difference of the reflective pixels is large, and the grayscale fluctuation of the white foam pixels under normal circumstances is small.
[0017] The recognition confidence of the white foam area is obtained based on the area ratio and grayscale value variance. The smaller the area ratio, the fewer white foam pixels there are. It may be that some reflective pixels are recognized as white foam pixels, and the recognition confidence is lower. The larger the grayscale value variance, the greater the grayscale fluctuation of the pixel point, and the lower the recognition confidence. Therefore, the recognition confidence is proportional to the area ratio and inversely proportional to the grayscale value variance.
[0018] In an exemplary embodiment, a calculation formula for recognition confidence is given as follows: ; in, represents the recognition confidence; N represents the total number of pixels in the initial image of the fecal liquid; The number of pixels representing the white foam area; represents the gray value variance of the white foam area; exp represents the exponential function with the natural constant e as the base; Express Perform negative correlation normalization processing.
[0019] The larger the proportion of pixels in the white foam area and the smaller the grayscale variance, the higher the recognition confidence of the white foam area, which also means that the image segmentation is more accurate.
[0020] A recognition confidence interval is preset. If the calculated recognition confidence is too low or too high, the recognition confidence is not within the preset recognition confidence interval. If the calculated recognition confidence is too low, it means that the number of pixels in the segmented white foam area is small, which may be caused by errors and has little impact on subsequent calculations; if the calculated recognition confidence is too high, it means that the surface of the fermentation tank is covered with a large amount of white foam, which may affect the accuracy of the final fermentation degree. The lower and upper limits of the preset recognition confidence interval are set by the implementer according to actual needs, such as the lower limit is 0.1 and the upper limit is 0.7.
[0021] If the recognition confidence is within the preset recognition confidence interval, that is, the recognition confidence is greater than or equal to 0.1 and less than or equal to 0.7, execute step 2.
[0022] Step 2: According to the pixel difference between the central pixel of the fermentation area and the pixel points of each layer in the periphery, the layer diffusion parameters of each layer of pixels are obtained. The layer diffusion parameters are used to characterize the diffusion from the central pixel to the periphery of the corresponding layer.
[0023] It is generally believed that the core area of manure fermentation is similar to a circle, so the fermentation degree of the manure liquid surface is evenly spread along the core fermentation area to the surrounding areas. Therefore, the grayscale of the pixel points in the manure liquid area below the white foam can be inferred based on each fermentation area.
[0024] In an exemplary embodiment, the i-th fermentation area is set to be any fermentation area, and the central pixel point of the i-th fermentation area can be the pixel point at the centroid position of the i-th fermentation area, or it can be obtained in the following way: construct a two-dimensional coordinate system according to the length and width of the initial image of the fecal liquid, and each pixel point of the initial image of the fecal liquid constitutes a corresponding coordinate point, obtain the horizontal coordinate of each pixel point in the i-th fermentation area, and calculate the mean of the horizontal coordinates of all the pixels in the i-th fermentation area, and use the mean of the horizontal coordinates as the horizontal coordinate of the central pixel point of the i-th fermentation area, obtain the vertical coordinate of each pixel point in the i-th fermentation area, and calculate the mean of the vertical coordinates of all the pixels in the i-th fermentation area, and use the mean of the vertical coordinates as the vertical coordinate of the central pixel point of the i-th fermentation area, thereby obtaining the central pixel point of the i-th fermentation area.
[0025] The first layer of pixels of the ith fermentation area is the central pixel of the ith fermentation area. The number of layers gradually increases along the direction from the central pixel to the outside. That is, if the mth layer of pixels is set as any layer of pixels, then the m-1th layer of pixels is the adjacent inner layer of pixels of the mth layer. The process of acquiring pixels of each layer is as follows: acquiring pixels adjacent to the central pixel of the ith fermentation area as the second layer of pixels; acquiring pixels adjacent to the second layer of pixels among the pixels other than the first layer of pixels as the third layer of pixels; acquiring pixels adjacent to the third layer of pixels among the pixels other than the second layer of pixels as the fourth layer of pixels; acquiring pixels adjacent to the fourth layer of pixels among the pixels other than the third layer of pixels as the fifth layer of pixels; and so on, finally obtaining the last layer of pixels of the ith fermentation area. It should be understood that since the shape of the ith fermentation area may be irregular, there may be some layers of pixels that do not constitute a closed shape connected end to end. Figure 3 This is a simple schematic diagram of the division of pixels in each layer. Figure 3 In the figure, the crossed pixels represent the central pixels of the fermentation area, which are the pixels of the first layer, the pixels marked with the number 2 represent the pixels of the second layer, the pixels marked with the number 3 represent the pixels of the third layer, and the pixels marked with the number 4 represent the pixels of the fourth layer. The pixels without numbers represent the white foam area.
[0026] In the fermentation area, the fermentation degree at the central pixel is the highest and gradually decreases towards the surrounding areas. Since the organic matter in the manure liquid is darker in color, that is, the grayscale is smaller, and the organic matter in the manure liquid is gradually decomposed under the action of the fermentation agent, the color gradually becomes lighter. Therefore, the grayscale of the central pixel of the fermentation area is the largest and gradually decreases towards the surrounding areas. The fermentation degree is proportional to the grayscale of the pixel.
[0027] Calculate the layer diffusion parameter corresponding to each layer of pixel points in the fermentation area. In an exemplary embodiment, the process of obtaining the layer diffusion parameter of the mth layer of pixel points in the ith fermentation area includes: ; in, represents the layer diffusion parameter of the mth layer pixel point in the i-th fermentation area; represents the number of pixels contained in the m-th layer of pixels in the i-th fermentation area; j represents the j-th pixel in the m-th layer of pixels in the i-th fermentation area; max represents the maximum value function; represents the grayscale of the jth pixel in the mth layer of pixels in the i-th fermentation area; Represents the grayscale mean of the m-1th layer pixel of the i-th fermentation area; the m-1th layer pixel is the adjacent inner layer pixel of the m-th layer pixel; the 1st layer pixel of the i-th fermentation area is the central pixel of the i-th fermentation area. Among them, m=2, 3..., M, M is the number of pixel layers of the i-th fermentation area. When m is equal to 1, it represents the central pixel of the i-th fermentation area, and the grayscale mean of the 1st layer pixel of the i-th fermentation area is the grayscale value of the central pixel; the layer diffusion parameter of the 1st layer pixel is the grayscale value of the central pixel.
[0028] Under normal circumstances, the grayscale of the pixels in the m-1th layer is higher than the grayscale of the pixels in the mth layer, that is, the grayscale mean of the pixels in the m-1th layer is higher than the grayscale of each pixel in the mth layer, then the difference between the grayscale mean of the pixels in the m-1th layer and the grayscale of each pixel in the mth layer is greater than 0. However, in the above-mentioned use of the max maximum function, if the difference between the grayscale mean of the pixels in the m-1th layer and the grayscale of each pixel in the mth layer is a negative value, the result is taken as 0, which can further avoid the situation where the grayscale difference is a negative value and avoid the negative value from being involved in the sum calculation.
[0029] By using the above process, the layer diffusion parameters of each layer of pixels in the i-th fermentation area are obtained.
[0030] Step 3: Based on the layer diffusion parameters of the pixels in each layer, the regional diffusion characteristics of the fermentation area are obtained.
[0031] The average value of the layer diffusion parameters of all layer pixels of the i-th fermentation area is calculated, and the average value of the layer diffusion parameters of all layer pixels of the i-th fermentation area is used as the regional diffusion feature of the i-th fermentation area. Thus, the regional diffusion features of each fermentation area are obtained.
[0032] Step 4: Based on the regional diffusion characteristics of each fermentation area, the original grayscale of each pixel in the white foam area is determined. The original grayscale is the grayscale of the pixel corresponding to the manure liquid blocked by the white foam area.
[0033] In an exemplary embodiment, the distance between each pixel in the white foam area and each fermentation area is obtained, and the grayscale adjustment coefficient is obtained according to the distance. Wherein, the x-th white foam area is set to represent any white foam area, and the w-th pixel in the x-th white foam area is set to represent any pixel in the x-th white foam area. The distance between the w-th pixel in the x-th white foam area and each fermentation area is obtained, and the distance is specifically the distance between the pixel and the central pixel of the fermentation area, and is the distance between the pixel in the two-dimensional coordinate system. When the distance between the w-th pixel in the x-th white foam area and the central pixel of a fermentation area is closer, it means that the grayscale of the w-th pixel in the x-th white foam area is closer to the grayscale of the central pixel of the fermentation area, and vice versa, when the distance between the w-th pixel in the x-th white foam area and the central pixel of a fermentation area is farther, it means that the grayscale of the w-th pixel in the x-th white foam area is less close to the grayscale of the central pixel of the fermentation area.
[0034] According to the distance between the w-th pixel in the x-th white foam area and the central pixel of the ith fermentation area, the grayscale adjustment coefficient of the w-th pixel in the x-th white foam area corresponding to the ith fermentation area is obtained. As a specific implementation, the distance is normalized to obtain the grayscale adjustment coefficient. In an exemplary embodiment, the normalization method here can be: obtain the number of pixels on the diagonal of the initial image of the fecal liquid. Since the docking line is the longest straight line in the initial image of the fecal liquid, the number of pixels on the diagonal is used as the maximum distance on the straight line, and then the ratio of the distance between the w-th pixel in the x-th white foam area and the central pixel of the ith fermentation area to the maximum distance is used as the grayscale adjustment coefficient of the w-th pixel in the x-th white foam area corresponding to the ith fermentation area.
[0035] Then, according to the regional diffusion characteristics of each fermentation area and the grayscale adjustment coefficient, the original grayscale of each pixel in the white foam area is obtained. Specifically, the original grayscale influence component of each pixel in the white foam area relative to each fermentation area is obtained using the following calculation formula: ; in, is the original grayscale influence component of the w-th pixel in the x-th white foam area relative to the i-th fermentation area, is the grayscale of the central pixel of the i-th fermentation area, is the regional diffusion characteristic of the i-th fermentation area, is the grayscale adjustment coefficient obtained by the distance between the wth pixel point in the xth white foam area and the central pixel point of the ith fermentation area, that is, the grayscale adjustment coefficient of the wth pixel point in the xth white foam area corresponding to the ith fermentation area.
[0036] Using the above process, the original grayscale influence component of the w-th pixel in the x-th white foam area relative to each fermentation area is obtained. Finally, the average value of the original grayscale influence component of the w-th pixel in the x-th white foam area relative to all fermentation areas is calculated, and the average value is used as the original grayscale of the w-th pixel in the x-th white foam area. The calculation formula is as follows: ; in, is the original grayscale of the wth pixel in the xth white foam area, and I is the number of fermentation areas.
[0037] By adopting the above process, the original grayscale of each pixel in the xth white foam area is obtained, thereby obtaining the original grayscale of each pixel in each white foam area. The original grayscale is the grayscale of the pixel corresponding to the fecal sewage blocked by the white foam area.
[0038] After obtaining the original grayscale of each pixel in each white foam area, it is equivalent to removing the white foam area and restoring the grayscale of each pixel in the fecal liquid area where the white foam area is located, thereby obtaining a fecal liquid image without the white foam area.
[0039] Step 5: Obtain the fermentation degree according to the grayscale of each pixel in the fermentation area and the original grayscale of each pixel in the white foam area.
[0040] The lighter the color, the higher the degree of fermentation, that is, the greater the grayscale, the higher the degree of fermentation, and the grayscale is proportional to the degree of fermentation. Set the target pixel to be any pixel in each fermentation area and each white foam area. Then, the normalized result of the grayscale of the target pixel is used as the fermentation degree of the target pixel. It should be understood that when the target pixel is any pixel in the white foam area, the grayscale of the target pixel is the original grayscale of the target pixel. The normalization method here can be: take the ratio of the grayscale to 255 as the normalization result.
[0041] Since manure fermentation usually occurs in patches, some pixels are affected by light, thus affecting the accuracy of the fermentation degree. Therefore, in an exemplary embodiment, the method for dynamically monitoring the effect of livestock and poultry manure treatment also includes: Pixels within a preset neighborhood range around the target pixel are obtained. The preset neighborhood range is determined by actual conditions. In this embodiment, the preset neighborhood range is the pixel points adjacent to the target pixel. For example, if the target pixel has an 8-neighborhood, the preset neighborhood range is the 8-neighborhood range. If the target pixel is an image edge pixel, there is no 8-neighborhood, so each pixel point adjacent to the target pixel is obtained.
[0042] Obtain the fermentation degree of the target pixel and its adjacent pixels, and calculate the fermentation degree variance of the fermentation degree set corresponding to the target pixel as the fermentation degree variance corresponding to the target pixel. The fermentation degree set includes: the fermentation degree of the target pixel and the fermentation degree of each adjacent pixel of the target pixel. Then, the degree of fluctuation of the fermentation degree of the target pixel is obtained according to the variance of the fermentation degree corresponding to the target pixel. Among them, the larger the variance of the fermentation degree, that is, the larger the degree of fluctuation of the fermentation degree, the greater the difference in the degree of fermentation between the target pixel and its adjacent pixels, which means that the target pixel is more likely to be affected by light; conversely, the smaller the variance of the fermentation degree, that is, the smaller the degree of fluctuation of the fermentation degree, the less likely the target pixel is to be affected by light. Specifically: normalize the variance of the fermentation degree corresponding to the target pixel, and use the normalized result as the degree of fluctuation of the fermentation degree of the target pixel. The normalization method here can be: , Indicates the fermentation degree variance corresponding to the target pixel.
[0043] Finally, the fermentation degree of the target pixel is corrected based on the fluctuation degree of the target pixel to obtain the corrected fermentation degree. The greater the fluctuation degree of the target pixel, the greater the possibility that the target pixel is affected by light, and the greater the reduction in the fermentation degree of the target pixel. In an exemplary embodiment, the calculation formula for the corrected fermentation degree of the target pixel is given as follows: ; in, is the corrected fermentation degree of the target pixel, d is the fermentation degree of the target pixel, that is, the fermentation degree before correction, and P is the fluctuation degree of the fermentation degree of the target pixel.
[0044] By adopting the above process, the corrected fermentation degree of each pixel is obtained.
[0045] It should be understood that, without considering the effect of light on the fermentation degree, the above-mentioned fermentation degree correction process may not be set.
[0046] In an exemplary embodiment, the method for dynamically monitoring the effect of livestock and poultry manure treatment further includes: A fermentation degree threshold is preset to determine which pixels have reached the fermentation degree requirement. The specific value of the preset fermentation degree threshold can be flexibly set by the implementer according to actual needs or experience, such as 0.78.
[0047] The fermentation degree of each pixel is compared with the preset fermentation degree threshold to determine the number of pixels with a fermentation degree greater than or equal to the preset fermentation degree threshold. When greater than or equal to the preset fermentation degree threshold, it means that the feces and sewage at the corresponding pixel has met the fermentation standard of the fermentation tank.
[0048] The ratio of the number of pixels of the fermentation degree greater than or equal to the preset fermentation degree threshold to the total number of pixels in the initial image of the feces and sewage liquid is calculated, and the ratio is the overall fermentation degree of the fermentation tank.
[0049] According to the overall fermentation degree of the fermentation tank, it is judged whether the fermentation tank has reached the fermentation standard. In an exemplary embodiment, a threshold value of the overall fermentation degree of the fermentation tank is set, and the threshold value of the overall fermentation degree can be reasonably selected according to the actual operation needs. Since the application scenario of this embodiment is to use fecal sewage for dry fermentation beds and directly for family farms, etc., the threshold value of the overall fermentation degree can be set lower, such as 0.6.
[0050] If the overall fermentation degree of the fermentation tank is greater than the set overall fermentation degree threshold, the manure liquid meets the fermentation standard.
[0051] This embodiment also provides a system for dynamically monitoring the treatment effect of livestock and poultry manure based on monitoring images, including: a memory and a processor; the memory is connected to the processor, and the memory is used to store program instructions; the processor is used to implement the steps in the above-mentioned embodiment of the method for dynamically monitoring the treatment effect of livestock and poultry manure based on monitoring images when the program instructions are executed.
[0052] In an exemplary embodiment, the present embodiment further provides a computer-readable storage medium storing a computer program, which, when executed by a processor, implements the steps in the above-mentioned embodiment of the method for dynamically monitoring the treatment effect of livestock and poultry manure based on monitoring images.
[0053] It should be noted that the sequence of the above embodiments of the present invention is only for description and does not represent the advantages and disadvantages of the embodiments. The processes depicted in the accompanying drawings do not necessarily require the specific order or continuous order shown to achieve the desired results. In some embodiments, multitasking and parallel processing are also possible or may be advantageous.
[0054] The various embodiments in this specification are described in a progressive manner, and the same or similar parts between the various embodiments can be referenced to each other, and each embodiment focuses on the differences from other embodiments.
Claims
1. A method for dynamically monitoring the treatment effect of livestock and poultry manure based on monitoring images, characterized in that: include: Step 1: Obtain the initial image of the manure liquid in the fermentation tank and segment it into the fermentation area and the white foam area; Step 2: according to the pixel difference between the central pixel of the fermentation area and the pixel points of each layer in the periphery, the layer diffusion parameter of each layer of the pixel points is obtained, and the layer diffusion parameter is used to characterize the diffusion situation from the central pixel point to the periphery of the corresponding layer; Step 3: based on the layer diffusion parameters of the pixels of each layer, obtaining the regional diffusion characteristics of the fermentation area; Step 4: Based on the regional diffusion characteristics of each fermentation area, determine the original grayscale of each pixel in the white foam area, where the original grayscale is the grayscale of the pixel corresponding to the manure liquid blocked by the white foam area; Step 5: Obtain the fermentation degree according to the grayscale of each pixel in the fermentation area and the original grayscale of each pixel in the white foam area.
2. The method for dynamically monitoring the treatment effect of livestock and poultry manure based on monitoring images according to claim 1 is characterized in that: Step 2 includes: The calculation formula of the layer diffusion parameter of the mth layer pixel point in the i-th fermentation area is as follows: ; in, represents the layer diffusion parameter of the mth layer pixel point in the i-th fermentation area; represents the number of pixels contained in the m-th layer of pixels in the i-th fermentation area; j represents the j-th pixel in the m-th layer of pixels in the i-th fermentation area; max represents the maximum value function; represents the grayscale of the jth pixel in the mth layer of pixels in the i-th fermentation area; Represents the grayscale mean of the m-1th layer pixel points of the i-th fermentation area; the m-1th layer pixel points are the adjacent inner layer pixel points of the m-th layer pixel points; the 1st layer pixel point of the i-th fermentation area is the central pixel point of the i-th fermentation area.
3. The method for dynamically monitoring the treatment effect of livestock and poultry manure based on monitoring images as claimed in claim 2 is characterized in that: Step 3 includes: taking the average value of the layer diffusion parameters of all layer pixels of the i-th fermentation area as the regional diffusion feature of the i-th fermentation area.
4. The method for dynamically monitoring the treatment effect of livestock and poultry manure based on monitoring images according to claim 2 or 3, characterized in that the steps 4 Includes: Obtain the distance between each pixel point in the white foam area and each fermentation area, and obtain the grayscale adjustment coefficient according to the distance; According to the regional diffusion characteristics of each fermentation area and the grayscale adjustment coefficient, the original grayscale of each pixel in the white foam area is obtained.
5. The method for dynamically monitoring the treatment effect of livestock and poultry manure based on monitoring images as claimed in claim 4 is characterized in that: According to the regional diffusion characteristics of each fermentation area and the grayscale adjustment coefficient, the original grayscale of each pixel in the white foam area is obtained, including: The following calculation formula is used to obtain the original grayscale influence component of each pixel in the white foam area relative to each fermentation area: ; in, is the original grayscale influence component of the w-th pixel in the x-th white foam area relative to the i-th fermentation area, is the grayscale of the central pixel of the i-th fermentation area, is the regional diffusion characteristic of the i-th fermentation area, is the grayscale adjustment coefficient obtained by the distance between the w-th pixel in the x-th white foam area and the central pixel in the ith fermentation area; The average value of the original grayscale influence components of the w-th pixel point in the x-th white foam region relative to all fermentation regions is taken as the original grayscale of the w-th pixel point in the x-th white foam region.
6. The method for dynamically monitoring the treatment effect of livestock and poultry manure based on monitoring images as claimed in claim 1, characterized in that: Step 5 includes: taking the normalized result of the grayscale of the target pixel as the fermentation degree of the target pixel; the target pixel is any pixel in each fermentation area and each white foam area.
7. The method for dynamically monitoring the treatment effect of livestock and poultry manure based on monitoring images as claimed in claim 1, characterized in that: The method for dynamically monitoring the effect of livestock and poultry manure treatment also includes: Obtain the fermentation degree of the target pixel and its adjacent pixel points, and calculate the fermentation degree variance of the target pixel and the adjacent pixel points; the target pixel point is any pixel point in each fermentation area and each white foam area; the adjacent pixel points are the pixel points in a preset neighborhood around the target pixel point; Obtaining the fluctuation degree of the fermentation degree of the target pixel point according to the fermentation degree variance; The fermentation degree of the target pixel point is corrected based on the fluctuation degree of the target pixel point to obtain a corrected fermentation degree.
8. The method for dynamically monitoring the treatment effect of livestock and poultry manure based on monitoring images as claimed in claim 1, characterized in that: The method for dynamically monitoring the effect of livestock and poultry manure treatment also includes: Based on a preset fermentation degree threshold, determining the number of pixel points of a fermentation degree greater than or equal to the preset fermentation degree threshold; Whether the fermentation tank meets the fermentation standard is determined based on the ratio of the number of pixel points to the total number of pixel points in the initial image of the fecal sewage.
9. The method for dynamically monitoring the treatment effect of livestock and poultry manure based on monitoring images as claimed in claim 1, characterized in that: After step 1, the method for dynamically monitoring the effect of livestock and poultry manure treatment further includes: Obtain the ratio of the area of the white foam region to the total area of the initial image of the fecal sewage, and obtain the variance of the grayscale values of the pixels in the white foam region; Obtaining recognition confidence of the white foam area according to the area proportion and the gray value variance, wherein the recognition confidence is proportional to the area proportion and inversely proportional to the gray value variance; If the recognition confidence is within the preset recognition confidence interval, execute step 2.
10. A dynamic monitoring system for livestock and poultry manure treatment effect based on monitoring images, characterized in that it includes: Memory and processor; The memory is connected to the processor; The memory is used to store program instructions; The processor is used to implement the method for dynamically monitoring livestock and poultry manure treatment effects based on monitoring images as described in any one of claims 1 to 9 when the program instructions are executed.