Abnormal behavior detection method and detection system for caged poultry based on machine vision

By installing a depth camera and processor on the mobile car of a cage poultry farm, using machine vision technology to position the feeding tank and identify poultry posture, the problems of insufficient light and large number of cage chickens are solved, and the disease warning is achieved Accuracy and timeliness protect economic benefits and human health.

CN111767794BActive Publication Date: 2024-11-19SOUTH CHINA AGRICULTURAL UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202010466976.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-05-28
Publication Date
2024-11-19
Estimated Expiration
2040-05-28

AI Technical Summary

Technical Problem

In cage poultry farms, due to insufficient light and large number of cage chickens, the disease is not discovered in time, causing large-scale infections, affecting economic benefits and human health.

Method used

Using machine vision-based detection method for abnormal behavior of cage-raising poultry, disease warning is achieved by installing a depth camera and processor on the mobile vehicle, and using depth images and color images to position the feeding tank and identify poultry postures.

Benefits of technology

It improves the accuracy and timeliness of disease warnings, reduces economic losses, and ensures human health and safety.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111767794B_ABST
    Figure CN111767794B_ABST
Patent Text Reader

Abstract

The present invention discloses a method and system for detecting abnormal behavior of caged poultry based on machine vision, the method comprising the steps of: obtaining a color image and a depth image of an area of ​​interest by a depth camera on a mobile vehicle that can be used for inspection in a livestock and poultry house, wherein the area of ​​interest includes a trough and an area to be detected; locating the position of the trough in the depth image, locating the area to be detected by using the distance between the trough and the area to be detected in the depth image; identifying the standing or lying posture of the poultry in the area to be detected, and determining whether it is a suspected sick poultry. The present invention indirectly realizes accurate positioning of the area to be detected based on the prominent features of the trough in the image and the ability to accurately locate it in the image, thereby facilitating the identification and positioning of the poultry, thereby achieving the purpose of disease early warning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of intelligent livestock and poultry breeding, and more specifically, to a method and system for detecting abnormal behavior of caged poultry in livestock and poultry farms based on machine vision. Background Art

[0002] Taking chickens as an example, caged chickens have higher economic benefits than free-range chickens because they can make full use of building space and reduce breeding costs, thus solving the problem of tight land resources. For large farms, it is difficult to inspect the health of caged chickens due to the large number of caged chickens and the small number of staff. Failure to discover the disease in time may lead to large-scale chicken infection, causing serious economic losses and even threatening human health. Similarly, the breeding of other poultry such as ducks and pigs also has the above defects.

[0003] Therefore, early warning of poultry diseases has become a key issue of concern in breeding farms. Summary of the invention

[0004] The main purpose of the present invention is to overcome the shortcomings and deficiencies of the prior art and provide a method for detecting abnormal behavior of caged poultry based on machine vision. The method can solve the problem of insufficient light without changing the environment, thereby monitoring the behavior of caged poultry and achieving the purpose of disease early warning.

[0005] Another object of the present invention is to provide a detection system for realizing the above-mentioned abnormal behavior detection method of caged poultry based on machine vision, the system includes a mobile vehicle that can be used for inspection in livestock and poultry houses, the mobile vehicle is provided with a depth camera and a processor, the software module in the processor is used to realize the abnormal behavior detection method of caged poultry, the processor is connected to the remote control terminal through a network, and a positioning device is provided on the mobile vehicle. The mobile vehicle can be used for inspection in the livestock and poultry house, and images are captured at a relatively close distance by the depth camera during the inspection process, and the images are processed by the abnormal behavior detection method of caged poultry to realize accurate detection of abnormal behavior of caged poultry.

[0006] The purpose of the present invention is achieved through the following technical solutions: A method for detecting abnormal behavior of caged poultry based on machine vision, comprising:

[0007] Acquire a color image and a depth image of the region of interest through a depth camera, wherein the region of interest includes the feeding trough and the area to be detected;

[0008] The position of the food trough is located in the depth image, and the distance between the food trough and the area to be detected in the depth image is used to locate the area to be detected;

[0009] Identify the standing or lying posture of poultry in the detection area to determine whether they are suspected sick poultry.

[0010] The present invention is based on the structure of a "feeding trough" in caged poultry farming. The trough has prominent features in the image and can be accurately positioned in the image, so as to indirectly achieve accurate positioning of the area to be detected, thereby facilitating the identification and positioning of the posture of poultry in the area to be detected, thereby achieving the purpose of disease early warning.

[0011] Preferably, the position of the feeding trough is located in the image according to the characteristics of the feeding trough, and the method is:

[0012] Get SURF feature points in the depth image;

[0013] Mark the row with feature points in the depth image and the two rows above and below it;

[0014] Use Hough transform to find all straight line segments in the depth image;

[0015] Find the longest straight line segment to determine the location of the feeding trough.

[0016] Preferably, after the trough is located in the depth image, the trough is corrected to a horizontal state by a correction algorithm to facilitate subsequent feature extraction of the area to be detected. The correction algorithm is:

[0017] Convert color images into grayscale images and perform edge detection and filtering;

[0018] Then Hough transform is used to extract the straight line segment of the trough;

[0019] The rotation matrix is ​​calculated using the inclination angle of the straight segment of the trough;

[0020] The image is rectified using an affine transformation via a rotation matrix.

[0021] Furthermore, the Sobel operator is used for edge detection and the median filter is used for filtering.

[0022] Preferably, the standing or lying posture of the poultry in the detection area is identified by:

[0023] (1) Find the horizontal line in the middle of the trough and use the depth image information to obtain the true distance d of each point on the horizontal line c , c represents the number of columns of horizontal lines in the depth image;

[0024] (2) Set the points in each column of the image that satisfy the following formula to white and the rest to black:

[0025] d c +k1<d′ c <d c +k2

[0026] Here k1 and k2 are constants, d′ c is the actual distance from the point in column c to the camera;

[0027] (3) Use morphological methods to filter out noise points;

[0028] (4) Merge the contours of points whose distance is less than a certain threshold;

[0029] (5) Find the contours of all white areas in the image, delete contours that are too small, and find the circumscribed rectangles of the remaining contours;

[0030] (6) The circumscribed rectangle of the outline is used to determine whether the poultry is in a standing position or a lying position. If the poultry is in a lying position, it is determined to be a suspected sick poultry.

[0031] Furthermore, in the step (6), the aspect ratio of the circumscribed rectangle of the outline is used to determine whether the poultry is in a standing or lying posture, and the method is:

[0032]

[0033] Here W rect H is the width of the circumscribed rectangle of the outline, rect is the height of the circumscribed rectangle of the outline; k3 is a fixed constant. When the aspect ratio is greater than k3, that is, when the above formula holds, the poultry is considered to be in a lying posture. When the above formula does not hold, the poultry is considered to be in a standing posture.

[0034] Compared with the prior art, the present invention has the following advantages and beneficial effects:

[0035] 1. In traditional livestock and poultry farms, cameras are installed in fixed positions, which will affect the effect of the pictures taken when the light is insufficient. The present invention proposes to set the depth camera and the processor on a mobile vehicle that can be used for inspection in the livestock and poultry house, so as to improve the quality of the initial pictures taken and improve the accuracy of subsequent behavior detection.

[0036] 2. The present invention utilizes the characteristic of the "feeding trough" structure in caged poultry farming, and accurately locates the area to be detected by the distance between the feeding trough and the area to be detected in the depth image, thereby improving the accuracy of recognition, monitoring the posture of caged poultry, and achieving the purpose of disease early warning. BRIEF DESCRIPTION OF THE DRAWINGS

[0037] Figure 1 Flow chart of the abnormal behavior detection method for caged poultry in this embodiment. DETAILED DESCRIPTION

[0038] The present invention is further described in detail below in conjunction with embodiments and drawings, but the embodiments of the present invention are not limited thereto.

[0039] Example 1

[0040] The present embodiment is a caged poultry abnormal behavior detection system based on machine vision, including a mobile vehicle for inspection in the livestock and poultry house, the mobile vehicle is provided with a depth camera and a processor, the depth camera is used to obtain a color image and a depth image including a feeding trough and an area to be detected, and the image is transmitted to the processor. The processor is loaded with a software module for implementing a caged poultry abnormal behavior detection method, and after the software module processes the image, it can be obtained whether there are suspected sick poultry in the image taken at the current position. After obtaining the identification information, the information can be sent to the remote control end through the network, and the control end manager will conduct subsequent viewing and processing. Of course, after the suspected sick poultry is found, the mobile vehicle can send a reminder message to the outside in real time, or record it in advance. After the mobile vehicle completes the inspection, the on-site staff will export the data uniformly for analysis and judgment.

[0041] This embodiment takes chicken as an example of poultry. Figure 1 , the abnormal behavior detection method of caged poultry based on machine vision in this embodiment is described in detail, including the following steps:

[0042] S1: Acquire a color image and a depth image of the region of interest through a depth camera, where the region of interest includes the feeding trough and the area to be detected;

[0043] S2: Locate the position of the food trough in the depth image, and locate the area to be detected using the distance between the food trough and the area to be detected in the depth image;

[0044] S3: Identify the standing and lying postures of the poultry in the detection area to determine whether they are suspected sick poultry.

[0045] In step S1, when acquiring images through the depth camera, the moving speed of the inspection vehicle is controlled to be uniformly 0.1 m / s. The shooting distance of the depth camera on the inspection vehicle is uniformly 0.7 m.

[0046] The color image and depth image of the area of ​​interest are obtained through the depth camera, and the color image and depth image information are preprocessed separately. For the obtained color image information, the color image needs to be preprocessed first and uniformly processed into 16-bit 640*480 resolution RGB three-channel color livestock and poultry image information. For the obtained depth image information, the depth image needs to be preprocessed first and uniformly processed into 16-bit single-channel livestock and poultry depth image information. The preprocessed color image information and depth image information are combined to generate a 16-bit 4-channel PNG format image.

[0047] Since the movement of the mobile vehicle during the inspection process makes the feeding trough in the captured image not completely horizontal, the feeding trough in the image needs to be corrected. The correction is completed using the color image information obtained by the depth camera. The steps are as follows:

[0048] Convert the color image into a grayscale image and use the Sobel operator for edge detection;

[0049] Filter out the noise in the image through median filtering;

[0050] Use Hough to extract the straight line segment of the trough;

[0051] The rotation matrix is ​​calculated using the inclination angle of the straight segment of the trough;

[0052] The image is rectified using an affine transformation via a rotation matrix.

[0053] After the trough is calibrated, the trough is located in the image, and the distance between the trough and the area to be detected in the depth image is used to locate the area to be detected. The steps are as follows:

[0054] S2.1, obtain SURF feature points in the depth image;

[0055] S2.2, mark the row with the feature point and the two rows above and below it;

[0056] S2.3, using Hough transform to find all straight line segments in the depth image;

[0057] S2.4. Find the longest straight line segment to determine the feeding trough position;

[0058] S2.5. Use the distance in the depth image to find the area to be detected. The area to be detected is below the trough, where the height of the area to be detected and the height of the trough satisfy:

[0059] H 食槽 =k4H 待检测区域 ,W 待检测区域 =k5

[0060] Among them, H 食槽 is the height of the trough, H 待检测区域 is the height of the area to be detected, W 待检测区域 is the width of the area to be detected, where k4 and k5 are fixed constants.

[0061] After calibrating the feeding trough and locating the area to be detected, the present embodiment identifies the suspected sick chickens in the area to be detected, and the steps are:

[0062] S3.1. Find the horizontal line in the middle of the trough and use the depth image information to obtain the true distance d of each point on the horizontal line c ;

[0063] S3.2. Set the points in each column of the image that satisfy the following formula to white, and the rest to black:

[0064] d c +k1<d′ c <d c +k2

[0065] Here k1 and k2 are constants, d′ c is the actual distance from the point in column c to the camera;

[0066] S3.3, filter out noise points using morphological methods;

[0067] S3.4, merging the contours of points whose distance is less than a certain threshold (20 pixels);

[0068] S3.5, find the outlines of all white areas in the image, delete the outlines that are too small, and find the circumscribed rectangles of the remaining outlines;

[0069] S3.6. Use the outline circumscribed rectangle to determine whether the chicken is suspected to be sick.

[0070] The width-to-height ratio of the circumscribed rectangle of the outline is used to determine whether the poultry is in a standing or lying position.

[0071]

[0072] Here W rect H is the width of the circumscribed rectangle of the outline, rect is the height of the circumscribed rectangle of the outline; k3 is a fixed constant. When the aspect ratio is greater than k3, that is, when the above formula holds, the chicken is considered to be in a lying posture. If the above formula does not hold, the chicken is considered to be in a standing posture.

[0073] The above is only a specific embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can easily think of various equivalent modifications or replacements within the technical scope disclosed by the present invention, and these modifications or replacements should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention shall be based on the protection scope of the claims.

Claims

1. A method for detecting abnormal behavior of caged poultry based on machine vision, characterized in that: include: Acquire a color image and a depth image of the region of interest through a depth camera, wherein the region of interest includes the feeding trough and the area to be detected; The position of the food trough is located in the depth image, and the distance between the food trough and the area to be detected in the depth image is used to locate the area to be detected; The feeding trough is located in the image according to the feeding trough features. The method is: Get SURF feature points in the depth image; Mark the row with feature points in the depth image and the two rows above and below it; Use Hough transform to find all straight line segments in the depth image; Find the longest straight line segment to determine the feeding trough position; After the trough is located in the depth image, the trough is corrected to a horizontal state through a correction algorithm. The correction algorithm is: Convert color images into grayscale images and perform edge detection and filtering; Then Hough transform is used to extract the straight line segment of the trough; The rotation matrix is ​​calculated using the inclination angle of the straight segment of the trough; Rectify the image using affine transformation via rotation matrix; The Sobel operator is used for edge detection and the median filter is used for filtering; Identify the standing or lying posture of poultry in the detection area to determine whether they are suspected sick poultry.

2. A detection system for implementing the abnormal behavior detection method for caged poultry according to claim 1, characterized in that: The system includes a mobile vehicle that can be used for inspections in livestock and poultry houses. The mobile vehicle is equipped with a depth camera and a processor. The software module in the processor is used to implement a method for detecting abnormal behaviors of caged poultry. The processor is connected to a remote control terminal via a network, and a positioning device is provided on the mobile vehicle.