Intelligent monitoring system and method for pig farm breeding

Through the intelligent monitoring system, the pig body image is processed to determine the degree of dirtyness of the pig farm, which reduces unnecessary cleaning reminders, solves the problem of excessive frequent cleaning reminders in the existing technology, and achieves resource conservation and monitoring accuracy.

CN118038366BActive Publication Date: 2024-11-22QINGDAO FAMU MASCH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410189051.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-20
Publication Date
2024-11-22
Estimated Expiration
2044-02-20

AI Technical Summary

Technical Problem

The existing pig farm monitoring methods have led to excessive frequent cleaning reminders, resulting in waste of manpower and water resources.

Method used

Using the intelligent monitoring system for pig farm breeding, we can obtain the image information of the pig body, identify the color dividing lines, separate the images into dark and light colors, extract the image information, and obtain the image information again after spraying, according to the difference in the image information before and after Determine the degree of dirt and output cleaning feedback information to reduce unnecessary cleaning reminders.

Benefits of technology

It effectively reduces the frequency of pig farm cleaning reminders, saves manpower and water resources, and improves the accuracy and economicality of monitoring.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118038366B_ABST
    Figure CN118038366B_ABST
Patent Text Reader

Abstract

The embodiment of the present application relates to the field of monitoring technology, and discloses an intelligent monitoring system and method for pig farm breeding. The monitoring method of the present application indirectly feeds back the cleaning needs of the pig farm based on the dirtiness of the pig bodies, that is, by comparing the image information of the pig bodies before and after spraying, judging whether the pig farm is dirty based on the changes before and after the image information, and finally outputting the dirt feedback information that the pig farm needs to be cleaned to remind the pig farm staff to clean in time, which can effectively reduce the frequency of cleaning reminders in the pig farm and is conducive to saving labor costs and water resources.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of monitoring technology, and in particular to an intelligent monitoring system and method for pig farm breeding. Background Art

[0002] The growth rate of pigs is related to the comfort level of their sleep and rest, and the comfort level of their sleep and rest is related to the growth environment, such as the ambient temperature, humidity, and dirtiness of the ground environment of the pig farm. For example, when there is a lot of pig feces, food residues, etc. in the pig farm, and when the pigs lie down to rest, it will seriously affect the comfort level of the pigs' sleep and rest. Therefore, the pig farm staff needs to monitor the dirtiness of the pig farm in order to clean the internal space of the pig farm. The existing monitoring method mainly monitors the accumulation of feces and food residues on the ground of the pig farm, and reminds the staff to clean the pig farm when the accumulation of feces and food residues on the ground of the pig farm exceeds a certain level. However, the current monitoring method leads to frequent reminders for pig farm cleaning, resulting in a large waste of manpower and water resources. Summary of the invention

[0003] The main purpose of the present invention is to provide an intelligent monitoring system and method for pig farm breeding, aiming to solve the technical problem that the current monitoring method in the prior art leads to frequent pig farm cleaning reminders, resulting in a large waste of manpower and water resources.

[0004] To achieve the above objectives, in a first aspect, an embodiment of the present application provides a method for intelligent monitoring of pig farms, which is applied to an intelligent monitoring system. The method comprises:

[0005] Get instructions for monitoring pig farm dirtiness;

[0006] Acquire a first image of a target part of a target pig body based on the pig farm dirt monitoring instruction, wherein the target pig body is a spotted breed pig, and the target part is a spotted and spotted junction part;

[0007] identifying a color boundary line of the first image and dividing the first image into a dark image area and a light image area;

[0008] respectively extracting first image information of the dark image area and the light image area;

[0009] In response to the spraying device spraying the target pig body, acquiring a second image of the target part of the target pig body;

[0010] Respectively extracting second image information of the dark image area and the light image area of ​​the target part of the target pig body;

[0011] Pig farm dirtiness feedback information is outputted according to the first image information and the second image information of the dark image area, and / or the first image information and the second image information of the light image area.

[0012] Preferably, the first image information and the second image information include an average grayscale value of the image, and the outputting of the pig farm dirtiness feedback information according to the first image information and the second image information of the dark image area and / or the first image information and the second image information of the light image area includes:

[0013] Determine that the difference between the average grayscale value of the first image and the average grayscale value of the second image in the dark image area is greater than or equal to a first preset grayscale threshold, and the difference between the average grayscale value of the first image and the average grayscale value of the second image in the light image area is greater than or equal to the first preset grayscale threshold, and output the dirt feedback information that the pig farm needs to be cleaned.

[0014] Preferably, respectively extracting the first image information of the dark image area and the light image area includes:

[0015] Extracting the gray value gray of each pixel point of the first image in the dark image area and the light image area respectively;

[0016] The grayscale value of all pixels in the dark image area is calculated by averaging the grayscale values ​​of the dark image area.

[0017] The grayscale value of all pixels in the light-colored image area is calculated by averaging the grayscale values ​​of all pixels in the light-colored image area to obtain the average grayscale value of the light-colored image area.

[0018] Among them, the gray value gray of each pixel satisfies the following expression: gray=A1*R +A2*G+A3*B+g0, A1 is the contribution ratio of the red channel to the gray value, A2 is the contribution ratio of the green channel to the gray value, A3 is the contribution ratio of the blue channel to the gray value, g0 is the gray value compensation, g0 satisfies the following expression: , is the orientation coefficient of the camera device relative to the object when the image is acquired, .

[0019] Preferably, the first image information and the second image information include an average image brightness value, and the outputting of the pig farm dirtiness feedback information according to the first image information and the second image information of the dark image area and / or the first image information and the second image information of the light image area includes:

[0020] Determine that the difference between the brightness value of the first image in the dark image area and the average brightness value of the second image is greater than or equal to a first preset brightness threshold, and the difference between the average brightness value of the first image in the light image area and the average brightness value of the second image is greater than or equal to the first preset brightness threshold, and output the dirt feedback information that the pig farm needs to be cleaned.

[0021] Preferably, respectively extracting the first image information of the dark image area and the light image area includes:

[0022] Extracting brightness values ​​of each pixel point of the first image in the dark image area and the light image area respectively;

[0023] Performing arithmetic averaging of the brightness values ​​of all pixels in the dark image area to obtain an average brightness value of the dark image area;

[0024] The brightness values ​​of all pixels in the light-colored image area are arithmetic averaged to obtain the average brightness value of the image in the light-colored image area.

[0025] Preferably, the target part includes a side part of a pig body, and the step of acquiring a first image of the target part of a target pig body based on the pig farm dirt monitoring instruction includes:

[0026] Acquire a side image of a target pig body based on the pig farm dirt monitoring instruction;

[0027] A local area with two colors of approximately the same area in the side image of the target pig body is extracted to obtain the first image.

[0028] Preferably, extracting a local area with two colors having substantially the same area in the target pig's side image to obtain the first image includes:

[0029] When the number of local regions with roughly the same area of ​​two colors in the target pig's side image is greater than 1, comparing the total area size relationship of each local region;

[0030] The local region with the largest area is taken as the first image.

[0031] Preferably, in response to spraying the target pig body by a spraying device, acquiring a second image of a target part of the target pig body comprises:

[0032] In response to spraying the target pig body for the first time, obtaining a downward flow velocity of water on the target pig body;

[0033] When it is determined that the downstream speed is greater than or equal to a preset speed threshold, acquiring a second image of the target part of the target pig body;

[0034] When it is determined that the downstream speed is less than a preset speed threshold, in response to spraying the target pig body for the second time, a second image of the target part of the target pig body is acquired.

[0035] In a second aspect, an intelligent monitoring system for pig farm breeding is also provided in an embodiment of the present application, and the system comprises:

[0036] A camera device, comprising a rotating base and a camera disposed on the rotating base, for acquiring a first image and a second image of a target part of a target pig body;

[0037] Processor; and

[0038] A memory, wherein the memory is used to store program codes, and the processor is used to call the program codes to execute the method as described in the first aspect.

[0039] Preferably, the camera device includes at least two camera devices arranged on the left and right sides of the pig farm to simultaneously acquire images of the left and right sides of the target pig body.

[0040] Different from the prior art, the intelligent monitoring method for pig farm breeding provided in the embodiment of the present application first obtains a pig farm dirt monitoring instruction; then obtains a first image of a target part of a target pig body based on the pig farm dirt monitoring instruction; then identifies the color boundary line of the first image and separates the first image into a dark image area and a light image area; then extracts the first image information of the dark image area and the light image area respectively; then sprays the target pig body in response to a spraying device to obtain a second image of the target part of the target pig body; then extracts the second image information of the dark image area and the light image area of ​​the target part of the target pig body respectively; finally, outputs pig farm dirt feedback information based on the first image information and the second image information of the dark image area, and / or the first image information and the second image information of the light image area.

[0041] That is, the present application first obtains the images of the target pig before and after spraying, respectively, and then processes the before and after images to obtain image information, and then determines whether the pig farm is dirty based on the before and after changes in the image information, and finally outputs the dirt feedback information that the pig farm needs to be cleaned to remind the pig farm staff to clean it in time.

[0042] Compared with the existing method of monitoring the ground of the pig farm, the monitoring method of the present application indirectly feedbacks the cleaning needs of the pig farm by the dirtiness of the pig body. When the dirtiness of the pig farm reaches the cleaning standard, but due to the pig's movement and sleeping habits, it can avoid dirty areas and carry out activities or sleep. In this case, although the overall dirtiness of the pig farm is high, it does not affect the pig's sleep and rest. At this time, the system does not issue a cleaning reminder. When the pig body reaches the dirtiness standard, it is likely that the dirtiness of the pig farm also reaches the cleaning standard. At this time, the system issues a cleaning reminder. Based on this, the monitoring method of the present application indirectly feedbacks the cleaning needs of the pig farm by the dirtiness of the pig body, which can greatly reduce the frequency of cleaning of the pig farm by staff, which is conducive to saving labor costs and water resources. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] 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 the structures shown in these drawings without paying creative work.

[0044] Figure 1 This is a schematic diagram of a pig body image in some embodiments of the present application;

[0045] Figure 2 This is a flow chart of the intelligent monitoring method for pig farm breeding in some embodiments of the present application;

[0046] Figure 3 Module diagram of the intelligent monitoring system for pig farm breeding in some embodiments of the present application.

[0047] The realization of the purpose, functional features and advantages of the present invention will be further explained in conjunction with embodiments and with reference to the accompanying drawings. DETAILED DESCRIPTION

[0048] 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.

[0049] It should be noted that all directional indications (such as up, down, left, right, front, back, etc.) in the embodiments of the present invention are only used to explain the relative position relationship, movement status, etc. between the components under a certain specific posture (as shown in the accompanying drawings). If the specific posture changes, the directional indication will also change accordingly.

[0050] In addition, the descriptions of "first", "second", etc. in the present invention are only used for descriptive purposes and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the features defined as "first" and "second" may explicitly or implicitly include at least one of the features. In addition, "and / or" in the full text includes three solutions. Taking A and / or B as an example, it includes technical solution A, technical solution B, and technical solution that satisfies both A and B. In addition, the technical solutions between the various embodiments can be combined with each other, but it must be based on the ability of ordinary technicians in this field to implement. When the combination of technical solutions is contradictory or cannot be implemented, it should be deemed that such combination of technical solutions does not exist and is not within the scope of protection required by the present invention.

[0051] The growth rate of pigs is related to the comfort level of their sleep and rest, and the comfort level of their sleep and rest is related to the growth environment, such as the ambient temperature, humidity, and degree of dirtiness of the environment. For example, when there are a lot of pig feces, food residues, etc. in the pig farm, when the pigs lie down to rest, it will seriously affect the comfort level of their sleep and rest. Therefore, pig farm staff need to monitor the degree of dirtiness of the pig farm in order to clean the internal space of the pig farm. The existing monitoring method mainly monitors the accumulation of feces and food residues on the ground of the pig farm, and reminds the staff to clean the pig farm when the accumulation of feces and food residues on the ground of the pig farm exceeds a certain level. However, the current monitoring method leads to frequent reminders for pig farm cleaning, resulting in a large waste of manpower and water resources.

[0052] The pig farm described in this application is the living place of pigs, which can also be understood as a pigsty. It can be understood that the current monitoring method for monitoring the pig farm ground requires that when the dirtiness of the pig farm ground reaches the cleaning standard, the staff needs to be notified in time to clean it. However, when the pigs can effectively avoid dirty areas and move or sleep according to their own living, exercise, and sleeping habits, their activities and sleep will not be affected at this time. Therefore, in this case, there is no need to immediately remind the pig farm to clean, that is, the current monitoring method causes the pig farm cleaning reminder to be more frequent.

[0053] The following will mainly describe the specific steps of the intelligent monitoring method for pig farm breeding. It should be noted that although the logical order is shown in the flow chart, in some cases, the steps shown or described can be performed in a different order from here. Figure 1-2 The pig farm breeding intelligent monitoring method comprises the following steps:

[0054] S100, obtaining pig farm dirt monitoring instructions;

[0055] In one embodiment, the timing of triggering the pig farm dirtiness monitoring instruction may be when the pig farm cleaning has just been completed and the next cleaning monitoring is required. Therefore, obtaining the pig farm dirtiness monitoring instruction may be automatic, such as when the faucet for flushing the pig farm is closed and the monitoring instruction is automatically triggered; obtaining the pig farm dirtiness monitoring instruction may also be passive, such as when the staff presses the monitoring switch to trigger the monitoring instruction after flushing the pig farm.

[0056] S200, acquiring a first image of a target part of a target pig body based on the pig farm dirt monitoring instruction, wherein the target pig body is a spotted breed pig, and the target part is a spotted and spotted junction part;

[0057] It should be noted that the types of breeding pigs include solid-color breeding pigs, such as white pigs or black pigs, and breeding pigs also include spotted pigs, such as black and white breeding pigs.

[0058] It is understandable that the detection and judgment of the dirtiness of the body of a monochrome pig is relatively simple and is less affected by the external environment, while the dirtiness of a spotted pig is relatively complex and is more affected by the external environment because it includes multiple colors. Therefore, in the embodiment of the present application, the overall detection standard is improved by detecting the dirtiness of the body of a spotted pig to improve the accuracy of monitoring.

[0059] That is, in the embodiment of the present application, the spotted pigs are used as the target pigs, and the spotted boundary is used as the target detection part. Figure 1 As shown, in the figure, areas A and C are white areas, and other areas are black areas.

[0060] It is understandable that when the pigs are sleeping, they like to lie on their sides against the ground, so dirt is easily generated or formed on the sides of the pigs, and when spraying, the dirt in the side areas is also easier to fall off the pigs under the impact of the water flow; therefore, when the pigs are heavily dirty, the dirt level of the side areas changes greatly before and after spraying. Therefore, in one embodiment, the step S200: acquiring a first image of a target part of a target pig body based on the pig farm dirt monitoring instruction includes:

[0061] S210, acquiring a side image of a target pig based on the pig farm dirt monitoring instruction;

[0062] S220, extracting a local region in which two colors have approximately the same area in the target pig's side image to obtain the first image.

[0063] Specifically, a local area of ​​the pig's side with equal areas of two colors is extracted as the first image, such as Figure 1 As shown, Figure 1 The middle area A is white, the area B is black, and the area A and area B are equal in size. Based on this, selecting the image of the side area can make a large difference between the images before and after spraying, thereby improving the accuracy of monitoring and judging dirt. By selecting the area with the same area of ​​color (that is, the area with the same area of ​​black and white) as the first image, a single variable can be controlled (control the same area but change the color) to compare black and white horizontally to obtain the conclusion of which type of fur color is more resistant to dirt, thereby providing breeding users with breeding suggestions.

[0064] When there are multiple patterned areas on the side, the present application selects the local area with the largest total area as the first image. Because the area is large, the degree or probability of dirtiness is greater, the difference between the images before and after spraying is greater, and the final monitoring judgment of dirtiness is more accurate.

[0065] S300, identifying a color boundary line of the first image and dividing the first image into a dark image area and a light image area;

[0066] In one embodiment, the color boundary of the first image of the target detection part is used to separate the first image into a dark image area and a light image area, such as separating the first image of a black and white spotted pig into a white image area and a black image area. Figure 1 Area A is white and area B is black.

[0067] S400, extracting first image information of the dark image area and the light image area respectively;

[0068] In one embodiment, the first image information may be an average grayscale value of the image. It can be understood that when there is a lot of dirt such as feces on the pig's body, further, when there is a lot of dirt such as feces in the dark image area, since the color depth of the feces is less than the color depth of the dark image area, its average grayscale value will increase, and when the dirt in the dark image area is sprayed off, its average grayscale value will decrease; since the color depth of feces is greater than the color depth of the light image area, when there is a lot of dirt in the light image area, its average grayscale value will decrease, and when the dirt in the light image area is sprayed off, its average grayscale value will increase; based on this, the average grayscale value of the image can be used as an indicator for judging the degree of dirtiness of the pig body or the degree of dirtiness of the pig farm.

[0069] Furthermore, the step S400: extracting the first image information of the dark image area and the light image area respectively includes:

[0070] S410, respectively extracting the gray value gray of each pixel point of the first image in the dark image area and the light image area;

[0071] S420, performing arithmetic averaging on the grayscale values ​​of all pixels in the dark image area to obtain an average grayscale value of the dark image area;

[0072] S430, performing arithmetic averaging on the grayscale values ​​of all pixels in the light-colored image area to obtain an average grayscale value of the light-colored image area;

[0073] That is, firstly, the gray value gray of each pixel point of the first image in the dark image area and the light image area is extracted respectively; then, the gray values ​​of all the pixels in the dark image area are arithmetic averaged to obtain the image average gray value of the dark image area; and the gray values ​​of all the pixels in the light image area are arithmetic averaged to obtain the image average gray value of the light image area.

[0074] Among them, the gray value gray of each pixel satisfies the following expression: gray=A1*R +A2*G+A3*B+g0, A1 is the contribution ratio of the red channel to the gray value, A2 is the contribution ratio of the green channel to the gray value, A3 is the contribution ratio of the blue channel to the gray value, g0 is the gray value compensation, g0 satisfies the following expression: , is the orientation coefficient of the camera device relative to the object when the image is acquired, .

[0075] It can be understood that the grayscale value of an image is affected by many factors, such as (1) the geometric shape of the visible surface of the object, (2) the incident intensity and direction of the light source, (3) the orientation and distance of the observer relative to the object, and (4) the reflective characteristics of the object surface. This application ignores the influence of (1), (2), and (4), that is, does not consider the influence of (1), (2), and (4), and mainly considers the influence of the orientation of the camera device relative to the object on the grayscale value of the image. When calculating the grayscale value gray of each pixel point, the original calculated value is appropriately compensated according to the orientation angle. Since the orientation angle of the camera device relative to the object has a nonlinear effect on the grayscale value, but changes with the orientation angle, this application introduces the concept of orientation coefficient, which represents the degree of deviation of light when the camera shoots the pig body. The greater the degree of light deviation, the smaller the value of the orientation coefficient, and the value of the orientation coefficient is between 0 and 1. When the camera is directly facing the pig body, there is no deviation of light, and the orientation coefficient is 1. The grayscale value compensation at this time is , gray value compensation in other states You can refer to the formula for calculation, which will not be elaborated here.

[0076] In another embodiment, the first image information may also be the average brightness value of the image. It can be understood that since feces and the like are in a softened state and have the function of absorbing light, and the hair and skin on the pig body have the function of reflecting light, when there is more dirt in the dark image area, its average brightness value will become smaller, and when the dirt in the dark image area is sprayed off, its average brightness value will become larger; when there is more dirt in the light image area, its average brightness value will also become smaller, and when the dirt in the light image area is sprayed off, its average brightness value will also become larger. Based on this, the average brightness value of the image can be used as another indicator to judge the degree of dirtiness of the pig body or the degree of dirtiness of the pig farm.

[0077] Furthermore, the step S400: extracting the first image information of the dark image area and the light image area respectively includes:

[0078] S440, respectively extracting the brightness value of each pixel point of the first image in the dark image area and the light image area;

[0079] S450, performing arithmetic averaging on the brightness values ​​of all pixels in the dark image area to obtain an average brightness value of the dark image area;

[0080] S460, performing arithmetic averaging on the brightness values ​​of all pixels in the light-colored image area to obtain an average brightness value of the image in the light-colored image area.

[0081] That is, first, the brightness values ​​of each pixel of the first image in the dark image area and the light image area are extracted respectively, and then the brightness values ​​of all the pixels in the dark image area are arithmetic averaged to obtain the image average brightness value of the dark image area; the brightness values ​​of all the pixels in the light image area are arithmetic averaged to obtain the image average brightness value of the light image area.

[0082] S500, in response to a spraying device spraying the target pig body, acquiring a second image of a target part of the target pig body;

[0083] It can be understood that the first image is an image obtained after a preset time (such as 2 hours, 3 hours or 5 hours, when the pig farm is most likely to be dirty) after the pig farm is cleaned, that is, an image of a dirty pig body; and the second image is an image obtained after the target pig body is sprayed, that is, an image of a clean pig body. Therefore, the degree of dirtiness of the dirty pig body can be judged by comparing the first image and the second image. When a certain parameter (such as grayscale value or brightness value) of the first image and the second image differs greatly, it means that the spraying has washed away a lot of dirt on the pig body, further indicating that the pig body is highly dirty. When a certain parameter (such as grayscale value or brightness value) of the first image and the second image differs little, it means that the spraying has not washed away the dirt on the pig body, further indicating that there is not much dirt on the pig body.

[0084] It should be noted that the spraying described in the present application adopts a spraying system for cooling pigs. However, when the dirt on the pig body is stubborn and cannot be easily washed by spraying, it will affect the comparison of the two images before and after the spraying, that is, it will affect the accuracy of the dirt judgment. In one embodiment, the step S500: in response to the spraying device spraying the target pig body, obtaining the second image of the target part of the target pig body includes:

[0085] S510, in response to spraying the target pig body for the first time, obtaining a downstream velocity of water on the target pig body;

[0086] S520, when it is determined that the downstream speed is greater than or equal to a preset speed threshold, acquiring a second image of the target part of the target pig body;

[0087] S530: When it is determined that the downstream speed is less than a preset speed threshold, in response to spraying the target pig body for the second time, a second image of the target part of the target pig body is acquired.

[0088] Specifically, by detecting the downstream speed of the spraying water on the pig's body, it is determined whether a second spraying is needed (when the water flow is large, it indicates that the spraying force is large, and a single spray can wash away the dirt; when the water flow is small, it indicates that the spraying force is small, and a second or more spraying is needed) to wash away the dirt on the pig's body as much as possible, thereby making a large difference between the first image and the second image, further improving the accuracy of dirt judgment.

[0089] S600, extracting second image information of the dark image area and the light image area of ​​the target part of the target pig body respectively;

[0090] The second image information in the embodiment of the present application corresponds to the first image information, that is, when the first image information is the average grayscale value of the image, the second image information is also the average grayscale value of the image; when the first image information is the average brightness value of the image, the second image information is also the average brightness value of the image; when the first image information is a combination of the two, the second image information is also a combination of the two.

[0091] S700, outputting pig farm dirtiness feedback information according to the first image information and the second image information of the dark image area, and / or the first image information and the second image information of the light image area.

[0092] In one embodiment, the first image information and the second image information are average grayscale values ​​of the images, and the outputting of the pig farm dirtiness feedback information according to the first image information and the second image information of the dark image area and / or the first image information and the second image information of the light image area includes:

[0093] Determine that the difference between the average grayscale value of the first image and the average grayscale value of the second image in the dark image area is greater than or equal to a first preset grayscale threshold, and the difference between the average grayscale value of the first image and the average grayscale value of the second image in the light image area is greater than or equal to the first preset grayscale threshold, and output the dirt feedback information that the pig farm needs to be cleaned.

[0094] Specifically, when the difference in the average grayscale values ​​of the dark image area and the light image area before and after spraying is large and reaches the first preset grayscale threshold, it means that the dirt on the pig's body is sprayed off, which further indicates that there is a lot of dirt on the pig's body before spraying, thereby reminding the staff to clean the pig farm.

[0095] In another embodiment, the first image information and the second image information are average brightness values ​​of the images, and the outputting of the pig farm dirtiness feedback information according to the first image information and the second image information of the dark image area and / or the first image information and the second image information of the light image area includes:

[0096] Determine that the difference between the brightness value of the first image in the dark image area and the average brightness value of the second image is greater than or equal to a first preset brightness threshold, and the difference between the average brightness value of the first image in the light image area and the average brightness value of the second image is greater than or equal to the first preset brightness threshold, and output the dirt feedback information that the pig farm needs to be cleaned.

[0097] Specifically, when the difference in average brightness values ​​between the dark image area and the light image area before and after spraying is large and reaches the first preset grayscale threshold, it indicates that the dirt on the pig's body has been sprayed off, further indicating that there was more dirt on the pig's body before spraying, thereby reminding the staff that the pig farm needs to be cleaned.

[0098] Based on this, the monitoring method of the present application indirectly feedbacks the cleaning needs of the pig farm based on the degree of dirtiness of the pig body, that is, by comparing the image information of the pig body before and after spraying, it is judged whether the pig farm is dirty based on the changes in the image information before and after, and finally outputs the dirt feedback information that the pig farm needs to be cleaned to remind the pig farm staff to clean in time, which can effectively reduce the frequency of cleaning reminders in the pig farm and is conducive to saving labor costs and water resources.

[0099] The present application also provides a pig farm breeding intelligent monitoring system 100, see the attached Figure 3 , Figure 3 A schematic diagram of the hardware structure of the intelligent monitoring system for pig farms provided in an embodiment of the present application.

[0100] Among them, the camera device 103 is used to obtain the first image and the second image of the target part of the target pig body; the camera device 103 includes a rotating base and a camera arranged on the rotating base, and the camera can automatically adjust the shooting angle as needed to obtain the image of the target area of ​​the pig body more accurately.

[0101] The processor 101 is used to provide computing and control capabilities to control the monitoring system to perform corresponding tasks, for example, to control the monitoring system to perform the intelligent monitoring method for pig farm breeding in any of the above method embodiments, the method comprising: obtaining a pig farm dirt monitoring instruction; obtaining a first image of a target part of a target pig body based on the pig farm dirt monitoring instruction, wherein the target pig body is a spotted breed pig, and the target part is a spotted and spotted junction part; identifying a color boundary line of the first image and dividing the first image into a dark image area and a light image area; respectively extracting first image information of the dark image area and the light image area; in response to spraying the target pig body with a spraying device, obtaining a second image of the target part of the target pig body; respectively extracting second image information of the dark image area and the light image area of ​​the target part of the target pig body; outputting pig farm dirt feedback information according to the first image information and the second image information of the dark image area, and / or the first image information and the second image information of the light image area.

[0102] The processor 101 may be a general-purpose processor, including a central processing unit (CPU), a network processor (NP), a hardware chip or any combination thereof; it may also be a digital signal processor (DSP), an application specific integrated circuit (ASIC), a programmable logic device (PLD) or a combination thereof. The above-mentioned PLD may be a complex programmable logic device (CPLD), a field-programmable gate array (FPGA), a generic array logic (GAL) or any combination thereof.

[0103] The memory 102 is a non-transient computer-readable storage medium that can be used to store non-transient software programs, non-transient computer executable programs and modules, such as program instructions / modules corresponding to the pig farm farming intelligent monitoring method in the embodiment of the present application. The processor 101 can implement the pig farm farming intelligent monitoring method in any of the above method embodiments by running the non-transient software programs, instructions and modules stored in the memory 102.

[0104] Specifically, the memory 102 may include a volatile memory (VM), such as a random access memory (RAM); the memory 102 may also include a non-volatile memory (NVM), such as a read-only memory (ROM), a flash memory, a hard disk drive (HDD) or a solid-state drive (SSD) or other non-transitory solid-state storage device; the memory 102 may also include a combination of the above types of memory.

[0105] In some embodiments, the camera device includes at least two camera devices arranged on the left and right sides of the pig farm to simultaneously acquire images of the left and right sides of the target pig body.

[0106] To sum up, the intelligent monitoring system for pig farm breeding in the present application adopts the technical solution of any one of the above-mentioned intelligent monitoring method embodiments for pig farm breeding. Therefore, it has at least the beneficial effects brought by the technical solutions of the above-mentioned embodiments, which will not be elaborated one by one here.

[0107] The present application also provides a computer-readable storage medium, such as a memory including a program code, and the program code can be executed by a processor to complete the intelligent monitoring method for pig farm farming in the above embodiment. For example, the computer-readable storage medium can be a read-only memory (ROM), a random access memory (RAM), a compact disc read-only memory (CDROM), a magnetic tape, a floppy disk, and an optical data storage device.

[0108] The present application also provides a computer program product, which includes one or more program codes stored in a computer-readable storage medium. The processor of the electronic device reads the program code from the computer-readable storage medium, and the processor executes the program code to complete the steps of the pig farm breeding intelligent monitoring method provided in the above embodiment.

[0109] A person skilled in the art will appreciate that all or part of the steps for implementing the above embodiments may be accomplished by hardware or by hardware associated with a program code, and the program may be stored in a computer-readable storage medium, and the above-mentioned storage medium may be a read-only memory, a disk or an optical disk, etc.

[0110] It should be noted that the device embodiments described above are merely illustrative, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.

[0111] Through the description of the above embodiments, it can be clearly understood by those skilled in the art that each embodiment can be implemented by means of software plus a general hardware platform, or by hardware. It can be understood by those skilled in the art that all or part of the processes in the above embodiment methods can be completed by instructing the relevant hardware through a computer program, and the program can be stored in a computer-readable storage medium, and when the program is executed, it can include the processes of the embodiments of the above methods. Among them, the storage medium can be a disk, an optical disk, a read-only memory (ROM) or a random access memory (RAM), etc.

[0112] The above description is only a preferred embodiment of the present invention, and does not limit the patent scope of the present invention. All equivalent structural changes made by using the contents of the present invention specification and drawings under the inventive concept of the present invention, or directly / indirectly applied in other related technical fields are included in the patent protection scope of the present invention.

Claims

1. A pig farm breeding intelligent monitoring method, applied to an intelligent monitoring system, characterized in that: The method comprises: Get instructions for monitoring pig farm dirtiness; Acquire a first image of a target part of a target pig body based on the pig farm dirt monitoring instruction, wherein the target pig body is a spotted breed pig, and the target part is a spotted and spotted junction part; identifying a color boundary line of the first image and dividing the first image into a dark image area and a light image area; Extracting first image information of the dark image area and the light image area respectively, wherein the first image information includes an average grayscale value of the image; In response to the spraying device spraying the target pig body, acquiring a second image of the target part of the target pig body; Respectively extracting second image information of the dark image area and the light image area of ​​the target part of the target pig body, wherein the second image information includes an average gray value of the image; Determine that the difference between the average grayscale value of the first image and the average grayscale value of the second image in the dark image area is greater than or equal to a first preset grayscale threshold, and the difference between the average grayscale value of the first image and the average grayscale value of the second image in the light image area is greater than or equal to the first preset grayscale threshold, and output dirt feedback information that the pig farm needs to be cleaned; The target part includes a side part of a pig body, and the first image of the target part of a target pig body is obtained based on the pig farm dirt monitoring instruction, including: Acquire a side image of a target pig body based on the pig farm dirt monitoring instruction; Extracting a local area in the target pig's side image where two colors have approximately the same area to obtain the first image; The step of acquiring a second image of a target part of the target pig body in response to the spraying device spraying the target pig body comprises: In response to spraying the target pig body for the first time, obtaining a downward flow velocity of water on the target pig body; When it is determined that the downstream speed is greater than or equal to a preset speed threshold, acquiring a second image of the target part of the target pig body; When it is determined that the downstream speed is less than a preset speed threshold, in response to spraying the target pig body for the second time, a second image of the target part of the target pig body is acquired.

2. The intelligent monitoring method for pig farm breeding according to claim 1, characterized in that: The extracting first image information of the dark image area and the light image area respectively comprises: Extracting the gray value gray of each pixel point of the first image in the dark image area and the light image area respectively; The grayscale value of all pixels in the dark image area is calculated by averaging the grayscale values ​​of the dark image area. The grayscale value of all pixels in the light-colored image area is calculated by averaging the grayscale values ​​of all pixels in the light-colored image area to obtain the average grayscale value of the light-colored image area. Among them, the gray value gray of each pixel satisfies the following expression: gray=A1*R+A2*G+A3*B+g0, A1 is the contribution ratio of the red channel to the gray value, A2 is the contribution ratio of the green channel to the gray value, A3 is the contribution ratio of the blue channel to the gray value, g0 is the gray value compensation, g0 satisfies the following expression: α is the orientation coefficient of the camera device relative to the object when the image is acquired, α∈(0,1].

3. The intelligent monitoring method for pig farm breeding according to claim 1, characterized in that: The first image information and the second image information include an average image brightness value, and the outputting of pig farm dirtiness feedback information according to the first image information and the second image information of the dark image area and / or the first image information and the second image information of the light image area includes: Determine that the difference between the brightness value of the first image in the dark image area and the average brightness value of the second image is greater than or equal to a first preset brightness threshold, and the difference between the average brightness value of the first image in the light image area and the average brightness value of the second image is greater than or equal to the first preset brightness threshold, and output the dirt feedback information that the pig farm needs to be cleaned.

4. The intelligent monitoring method for pig farm breeding as claimed in claim 3, characterized in that: The extracting first image information of the dark image area and the light image area respectively comprises: Extracting brightness values ​​of each pixel point of the first image in the dark image area and the light image area respectively; Performing arithmetic averaging of the brightness values ​​of all pixels in the dark image area to obtain an average brightness value of the dark image area; The brightness values ​​of all pixels in the light-colored image area are arithmetic averaged to obtain the average brightness value of the image in the light-colored image area.

5. The intelligent monitoring method for pig farm breeding as claimed in claim 4, characterized in that: The step of extracting a local region in the target pig body side image where two colors have approximately the same area to obtain the first image includes: When the number of local regions with roughly the same area of ​​two colors in the target pig's side image is greater than 1, comparing the total area size relationship of each local region; The local region with the largest area is taken as the first image.

6. An intelligent monitoring system, characterized in that: include: A camera device, comprising a rotating base and a camera disposed on the rotating base, for acquiring a first image and a second image of a target part of a target pig body; processor; as well as A memory, wherein the memory is used to store program codes, and the processor is used to call the program codes to execute the method according to any one of claims 1 to 5.

7. The intelligent monitoring system according to claim 6, characterized in that: The camera device at least includes two camera devices arranged on the left and right sides of the pig farm to simultaneously acquire images of the left and right sides of the target pig body.