A chicken breeding image monitoring method and system based on cloud computing
By deploying inspection robots within the farm and utilizing a cloud computing platform for egg image processing and trajectory completion, the problems of low monitoring efficiency and blind spots in existing technologies have been solved, achieving high-precision, full-coverage, and low-cost monitoring of chicken farming.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-06
- Publication Date
- 2026-04-17
AI Technical Summary
In existing technologies, manual inspection is inefficient and costly, while fixed monitoring has blind spots and insufficient data processing, making it difficult to meet the needs of large-scale chicken farms for high-precision, full-coverage, and low-cost monitoring.
Inspection robots are deployed in the farm to collect images of eggs and upload them to a cloud computing platform. The cloud computing platform extracts local feature parameters of the eggshell stain trajectory, compares them with historical data, and completes the trajectory to generate a complete trajectory to identify abnormal eggs.
It has enabled automated image acquisition and efficient monitoring of eggs, reduced labor costs, improved monitoring efficiency and coverage, ensured the reliability of monitoring results, and provided an accurate data foundation for disease early warning and management decisions in the breeding process.
Smart Images

Figure CN121354026B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of computer-aided control, and specifically relates to a cloud computing-based image monitoring method and system for chicken farming. Background Technology
[0002] With the development of intensive poultry farming, stacked chicken cages are widely used in large-scale poultry farms. This method can accommodate a large number of chickens in a limited space, thereby improving production efficiency per unit area. However, the large number of chickens, with tens of thousands often being raised in a single farm, leads to heavy daily management tasks, especially monitoring the health of the chickens and the quality of eggs, which has become a crucial link in improving farming efficiency and ensuring food safety.
[0003] In existing technologies, common monitoring methods mainly include manual inspection and fixed camera monitoring. Manual inspection relies on staff checking each cage inside the farm, recording the number of eggs, their appearance, and the degree of contamination. If there are stains on the eggshells (chicken droppings, blood, etc.), it can be determined that the eggs were contaminated during laying. Since the chicken's droppings and egg-laying passages are the same, the stains extend along the eggshell surface in a certain direction, forming a pattern that can be used to judge the health status of the chickens in the corresponding cage. However, manual methods are labor-intensive, inefficient, and prone to subjective biases leading to misjudgments. Fixed camera monitoring can continuously photograph eggs in specific areas and analyze surface contamination through image processing. However, its monitoring range is limited, making it difficult to cover all cages, and blind spots exist in image acquisition from different angles, resulting in incomplete data. Furthermore, existing systems are mostly deployed locally, with limited data processing capabilities, making it impossible to achieve real-time, efficient monitoring of all cages in large-scale farming scenarios.
[0004] The drawbacks of existing technologies are that manual methods are inefficient and costly, while fixed monitoring methods have problems such as blind spots and insufficient data processing, making it difficult to meet the actual needs of large-scale chicken farms for high-precision, full-coverage, and low-cost monitoring. Summary of the Invention
[0005] To address the problems in the existing technology, this invention provides a cloud computing-based image monitoring method for chicken flock farming, comprising the following steps:
[0006] S1, deploy at least one inspection robot in the breeding site. The inspection robot collects images of eggs in the chicken cages and attaches the collection time and corresponding chicken cage number to each egg image.
[0007] S2, the egg image is uploaded to a cloud computing platform, which is deployed remotely or in at least one inspection robot. The cloud computing platform processes the egg image and extracts the current local feature parameters of the eggshell stain trajectory. The stain includes, but is not limited to, chicken feces, chicken feathers, chicken blood, and feed dust, etc., which are attached to the eggshell. The stain trajectory is a stain pattern formed on the eggshell surface and extending in a certain direction. The local feature parameters include the starting point position, extension angle, curvature, and local continuity of the stain trajectory.
[0008] S3, within a preset time window, the cloud computing platform retrieves the historical local feature parameters corresponding to the marked egg image material samples and the current chicken coop number, and compares the historical local feature parameters with the current local feature parameters;
[0009] S4. Based on the comparison results, the cloud computing platform completes the trajectory of the current local features and generates the corresponding complete trajectory.
[0010] S5, the cloud computing platform determines whether the egg is an abnormal egg based on the complete trajectory, and outputs the corresponding chicken cage number as an abnormal cage position identifier when it is determined to be abnormal.
[0011] Furthermore, the starting point is determined by finding the first pixel that meets the grayscale change threshold or color change condition from the point where the eggshell outline intersects with the stain at the edge of the stain area. The coordinates of this pixel are defined as the starting point, and these coordinates are used to identify the area where the stain trajectory occurs.
[0012] Furthermore, the comparison method for the starting point is as follows: extract the coordinates of the starting point of the smudge trajectory in the current image, and perform a difference calculation with the starting point coordinates recorded in the historical data. When the difference is less than the preset spatial threshold, it is determined that the starting point position is consistent.
[0013] The comparison method for the extension angle is as follows: obtain the main direction vector of the current stain trajectory and find the angle between it and the vertical axis of the egg as the current extension angle. Then, calculate the difference between this angle and the extension angle in the historical features. When the difference is within the preset angle range, it is determined that the directions are similar.
[0014] The curvature is compared as follows: if the difference between the current curvature and the historical curvature is less than a preset threshold, they are considered to have similar degrees of curvature.
[0015] The method for comparing local continuity is as follows: perform connectivity analysis on the current stain trajectory, count the number of breakpoints in the trajectory, and then compare it with the number of breakpoints recorded in historical data. When the difference is less than a preset threshold, it is determined to be continuous.
[0016] Furthermore, the cloud computing platform employs a weighted matching algorithm during the comparison process, setting different weight values for different local feature parameters.
[0017] Furthermore, the process of trajectory completion includes:
[0018] The edge points of the current local features are fitted to obtain direction vectors and curvature values. The direction vectors are used to represent the extension direction of the trajectory, and the curvature values are used to reflect the curvature of the trajectory. Based on the similarity of historical features, the closest trajectory template is determined from the historical trajectory samples within the time window. The current trajectory segment is matched with the trajectory template, and the missing segments of the trajectory are filled in using the optimal path fitting algorithm.
[0019] This invention also provides a cloud computing-based image monitoring system for chicken farming, comprising the following modules:
[0020] The data acquisition module is used to deploy at least one inspection robot in the breeding site. The inspection robot acquires images of eggs in the chicken cages and includes the acquisition time and the corresponding chicken cage number in each egg image.
[0021] The upload and processing module is used to upload the egg image to the cloud computing platform and process the egg image in the cloud computing platform to extract the current local feature parameters of the eggshell stain trajectory. The stain includes, but is not limited to, chicken feces, chicken feathers, chicken blood, and feed dust, etc., which are attached to the eggshell. The stain trajectory is a stain pattern formed on the eggshell surface and extending in a certain direction. The local feature parameters include the starting point position, extension angle, curvature, and local continuity of the stain trajectory.
[0022] The comparison module is used to retrieve historical local feature parameters corresponding to the current chicken coop number from the sample of the labeled egg image material library within a preset time window of the cloud computing platform, and compare the historical local feature parameters with the current local feature parameters.
[0023] The trajectory completion module is used to complete the trajectory of the current local features based on the comparison results, and generate the corresponding complete trajectory.
[0024] The determination module is used to determine whether an egg is an abnormal egg based on the complete trajectory, and when it is determined to be abnormal, it outputs the corresponding chicken cage number as an abnormal cage location identifier.
[0025] Furthermore, the processing module includes a starting point determination unit, which is used to find the first pixel that meets the grayscale change threshold or color change condition from the position where the eggshell outline intersects with the stain edge point set, and define the coordinates of the pixel as the starting point, which is used to identify the area where the stain trajectory occurs.
[0026] Furthermore, the comparison module includes:
[0027] The starting point comparison unit is used to extract the starting point coordinates of the smudge trajectory in the current image and perform a difference calculation with the starting point coordinates recorded in the historical data. When the difference is less than the preset spatial threshold, it is determined that the starting point positions are consistent.
[0028] Angle comparison unit is used to obtain the main direction vector of the current stain trajectory and calculate the angle between it and the vertical axis of the egg as the current extension angle. Then, the difference between this angle and the extension angle in the historical features is calculated. When the difference is within the preset angle range, it is determined that the directions are similar.
[0029] The curvature comparison unit is used to calculate the difference between the current curvature and the historical curvature. When the difference is less than a preset threshold, it is determined that the curvature is similar.
[0030] The continuity comparison unit is used to perform connectivity analysis on the current stain trajectory, count the number of breakpoints in the trajectory, and then compare it with the number of breakpoints recorded in historical data. When the difference is less than a preset threshold, it is determined to be continuous and consistent.
[0031] Furthermore, the comparison module further includes a weighted matching unit, which is used to set different weight values for different local feature parameters during the comparison process.
[0032] Furthermore, the trajectory completion module includes:
[0033] The edge fitting unit is used to fit the edge points of the current local features to obtain the direction vector and curvature value. The direction vector is used to represent the extension direction of the trajectory, and the curvature value is used to reflect the degree of curvature of the trajectory.
[0034] The template determination unit is used to determine the closest trajectory template from historical trajectory samples within a time window based on the similarity of historical features.
[0035] The matching and fitting unit is used to match the current trajectory segment with the trajectory template and fill in the missing segments of the trajectory using the optimal path fitting algorithm.
[0036] This invention achieves automated image acquisition of eggs in different cages by deploying inspection robots in breeding sites. Combined with the centralized processing capabilities of cloud computing platforms, it can effectively avoid omissions and misjudgments that occur during manual inspections, significantly reduce labor costs, and improve monitoring efficiency and coverage.
[0037] This invention extracts, compares, and completes the local features of eggshell stain trajectories, enabling the inference of complete stain trajectories from incomplete images. This allows for accurate identification of abnormal eggs even when unilateral image acquisition is limited. This mechanism ensures the reliability of monitoring results and provides a more accurate data foundation for disease early warning and management decisions in the aquaculture process. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is a schematic diagram of a stacked chicken coop;
[0040] Figure 2 This is a schematic diagram of an inspection robot;
[0041] Figure 3 This is a schematic diagram of egg image detection;
[0042] Figure 4 This is a schematic diagram of the main structure of the present invention. Detailed Implementation
[0043] The invention will now be described in preferred form with reference to the accompanying drawings and specific embodiments.
[0044] like Figure 1 As shown, in modern poultry farms, stacked cage structures are commonly used to accommodate more chickens within a limited space. These stacked cages consist of multiple independent cages stacked on top of each other. Each cage has an egg collection trough at its front end, and the cage bottom has a forward or downward tilt angle. After the chickens finish laying eggs, the eggs roll down the tilted cage bottom under gravity to the egg collection trough at the front, thus preventing the eggs from remaining in the cage for extended periods and reducing the risk of them being trampled or contaminated by chicken feces. This structural design effectively improves the automation of egg collection and is a common equipment configuration in large-scale poultry farming.
[0045] As poultry farming expands, each facility often houses tens of thousands of chickens distributed across hundreds or even thousands of cages. Traditional methods of manual inspection and sorting not only require a large labor force but also suffer from low efficiency, instability, and susceptibility to human experience. Under the demands of long-term, high-frequency inspections, manual methods are prone to missed or incorrect checks, resulting in abnormal eggs not being processed promptly. This, in turn, increases disease transmission, raises feeding costs, and poses food safety risks.
[0046] To address the problems of high labor costs and insufficient efficiency, such as Figure 2 As shown, inspection robots are being gradually introduced into the poultry farm. As the inspection robot moves along a pre-defined path in front of the chicken cages, it uses a camera to photograph the eggs in the egg collection troughs and uploads the collected image data wirelessly to a remote server for storage and processing. Figure 3 As shown, this method can be used to automatically identify the number, appearance, and some surface conditions of eggs, reducing manual intervention and improving inspection coverage.
[0047] However, in practical applications, inspection robots can only image eggs from a single angle, typically acquiring only one side of the egg. Since the eggs are placed upright in the egg collection trough, the tracks of dirt on the eggshell are often only partially visible. This results in incomplete track information, making it difficult to directly determine the source and nature of the contamination. For example, if only a localized longitudinal stain on one side of the eggshell can be observed, it's impossible to determine whether the stain is surface contamination caused by fecal spillage or strip contamination formed by abnormal excretion from the egg passage. Furthermore, since different cages generate a large number of egg images at different laying cycles, making judgments based on a single image easily leads to misjudgments and omissions, thus limiting the accurate analysis and management of the flock's health status.
[0048] To address the problem that the aforementioned inspection robot can only acquire images of one side of the egg and that the eggshell stain trajectory is incomplete, making accurate analysis difficult, this embodiment provides a cloud computing-based image monitoring method for chicken flocks, specifically including the following steps:
[0049] S1, deploy at least one inspection robot in the breeding site. The inspection robot collects images of eggs in the chicken cages and attaches the collection time and corresponding chicken cage number to each egg image.
[0050] S2, the egg image is uploaded to a cloud computing platform, which is deployed remotely or in at least one inspection robot. The cloud computing platform processes the egg image and extracts the current local feature parameters of the eggshell stain trajectory. The local feature parameters include the starting point position, extension angle, curvature and local continuity of the stain trajectory.
[0051] S3, within a preset time window, the cloud computing platform retrieves the historical local feature parameters corresponding to the marked egg image material samples and the current chicken coop number, and compares the historical local feature parameters with the current local feature parameters;
[0052] S4. Based on the comparison results, the cloud computing platform completes the trajectory of the current local features and generates the corresponding complete trajectory.
[0053] S5, the cloud computing platform determines whether the egg is an abnormal egg based on the complete trajectory, and outputs the corresponding chicken cage number as an abnormal cage position identifier when it is determined to be abnormal.
[0054] Through the above steps, this embodiment can analyze and complete local features with the help of a cloud computing platform when the inspection robot can only take pictures of one side of the egg, thereby generating a complete trajectory and realizing anomaly detection.
[0055] To facilitate understanding of the present invention, the steps of the above method are further described, and several preferred embodiments are given. Unless otherwise expressly defined, the order in which the steps are described does not constitute a limitation on the execution order. The order of the steps can be adjusted or they can be combined without contradicting each other, and the technical features can be selected and combined according to specific application scenarios.
[0056] In this embodiment, in order to accurately record the location and time of each egg's production, it is necessary to deploy inspection robots in the breeding site to collect images of the eggs in the chicken cages and simultaneously mark the collection time of the egg and the corresponding chicken cage number in the collected images.
[0057] In large-scale poultry farms, the number of eggs is enormous and densely distributed. Relying solely on images without accompanying time and cage location information makes subsequent traceability and health status assessment difficult. By incorporating the acquisition time and cage number into the image data, it is possible to quickly locate the source and production batch of a specific egg during cloud computing platform processing. To this end, at least one inspection robot is deployed within the poultry farm. This robot acquires images of the eggs in the cages, attaching the acquisition time and corresponding cage number to each egg image.
[0058] In this invention, the inspection robot refers to an automated device that runs along the chicken cage passage. It is typically equipped with a camera module, a walking drive module, and a wireless communication module, and is used to automatically complete movement, shooting, and data transmission in the breeding environment.
[0059] The chicken cage number is a unique identifier assigned to each chicken cage. It can be implemented using a QR code, barcode, electronic tag, or preset location coordinates to ensure a one-to-one correspondence between eggs and specific cage locations.
[0060] The data collection time refers to the timestamp information when the inspection robot takes pictures, which is generated by the robot's internal clock module.
[0061] In practice, the inspection robot runs along a preset path along the direction of the chicken cages. When it detects an egg rolling into the egg collection trough, it activates the camera component to take a picture of the egg. After the picture is taken, the robot writes the acquisition time and chicken cage number into the metadata of the image file. The chicken cage number can be obtained by the robot reading the QR code information corresponding to the chicken cage location on the inspection path, or by matching the cage position coordinates pre-stored in the system with the current position signal.
[0062] In a preferred implementation, the inspection robot uses a high-definition camera with an image resolution of 1920×1080 pixels to ensure that details of dirt on the eggshell surface can be clearly captured.
[0063] In another preferred implementation, the inspection robot detects egg rolling events using infrared sensors and triggers a photograph upon detection to reduce unnecessary photographs and storage overhead.
[0064] Preferably, the chicken coop number is identified by a QR code. During its movement, the robot reads the QR code content using a visual recognition module and writes it into the file attributes corresponding to the egg image, thus avoiding manual labeling. This optimized implementation further improves the automation level of image acquisition and traceability labeling, reducing manual intervention.
[0065] In summary, by including the acquisition time and chicken cage number in the egg images, accurate traceability of eggs in large-scale farming scenarios can be ensured. This allows subsequent trajectory analysis and health status determination to be based on a clear data source, guaranteeing the reliability and consistency of monitoring.
[0066] In one specific implementation, a poultry farm deployed three inspection robots, each responsible for inspecting chicken cages in different aisles. When one robot was running along the first aisle and detected an egg falling into the egg collection trough, it immediately captured an image and wrote "Time: March 1, 2025, 08:30:25, Cage Number: A101" into the image metadata. This image was then transmitted to a cloud computing platform and stored along with egg images collected at other times and in other cages for subsequent trajectory analysis and health assessment.
[0067] In large-scale farming environments, inspection robots collect a massive number of egg images on-site. Processing these images locally would strain computing resources and reduce inspection efficiency. Furthermore, the tracks of dirt on eggshells are often only visible in certain areas. Without parameterized extraction and unified storage, subsequent track completion and anomaly detection become difficult. Therefore, it is necessary to upload the collected egg images to a cloud computing platform for centralized processing and extraction of local feature parameters of the dirt tracks. This ensures a consistent data structure and comparable feature sets across data collected at different times and by different robots. To this end, the egg images are uploaded to the cloud computing platform, which processes them to extract the current local feature parameters of the eggshell dirt tracks. These local feature parameters include the starting point, extension angle, curvature, and local continuity of the dirt tracks.
[0068] In this invention, the stain trajectory refers to the stain pattern formed on the eggshell surface and extending in a certain direction, which can be caused by the deposition of feces, bloodstains or other secretions.
[0069] The starting point refers to the location where the stain first appears on the eggshell surface, usually in the pointed end, blunt end, or middle area of the egg.
[0070] The extension angle refers to the angle relative to the longitudinal axis of the egg as the stain extends outward from its starting point.
[0071] Curvature refers to the degree of bending of the edge of a stain, and is usually expressed as the bending radius or the rate of change of angle in curve fitting.
[0072] Local continuity refers to whether a stain forms a continuous band or has interruptions and cracks within a local area.
[0073] In this invention, the cloud computing platform can be deployed remotely or within at least one inspection robot. "Remotely" refers to the cloud computing platform being deployed outside the breeding site, such as in a centralized data center or a third-party cloud service platform. In this mode, the egg images and related annotation information collected by the inspection robot are transmitted wirelessly or via wired network to the remote cloud for storage and processing. Remote deployment can fully utilize large-scale distributed computing and storage resources, thereby achieving high-concurrency data processing and in-depth comparison of historical data. However, in scenarios with poor network signal coverage or high communication latency, relying solely on remote deployment may lead to unstable data uploads or insufficient real-time performance. Therefore, this invention also proposes another optional approach: deploying the cloud computing platform locally within the inspection robot, i.e., integrating edge computing nodes within the robot. This allows the robot to complete image processing and trajectory analysis tasks locally, even when the signal is poor or temporarily unable to connect to the remote server.
[0074] In the specific implementation process, after the inspection robot collects images of the eggs, it transmits the image data to the cloud computing platform via its configured wireless communication module. This wireless communication module can be a Wi-Fi module, a cellular module, or other short-range or wide-area network communication module to ensure stable and efficient data transmission even in the complex environment of the breeding farm. Upon receiving the image data, the cloud computing platform stores the images in a cloud database and, under the control of the task scheduling unit, calls the image processing module to process the images.
[0075] In the preprocessing stage, brightness normalization is performed first. Brightness normalization refers to adjusting the overall brightness distribution of images captured under different shooting conditions to a uniform range through methods such as linear stretching or histogram equalization, so that images captured under different lighting conditions such as morning, daytime, or nighttime have similar brightness levels. This avoids the impact of lighting differences on subsequent stain identification.
[0076] Next, background interference removal is performed. Since images captured by the inspection robot may contain chicken coop structures, egg collection trough edges, or other stray objects, this information can interfere with the analysis of the eggshell region. Background removal can be achieved through color model-based segmentation, edge gradient-based detection, or deep learning-based semantic segmentation models. In this embodiment, a color threshold-based segmentation method is used to remove pixels outside the egg's color distribution range, thereby obtaining an image containing only the eggshell region.
[0077] Next, a contour detection operation is performed. Contour detection is used to identify the overall boundary of the egg, in order to define the analysis area and avoid misidentifying noise outside the eggshell as dirt. Contour detection can be achieved by using edge detection operators, such as the Canny operator, in combination with a contour tracking algorithm, ultimately outputting the set of coordinate points of the egg's outer contour.
[0078] After preprocessing, stain edge recognition is performed on the eggshell region. Stain edge recognition can be based on color component abrupt changes, grayscale gradient changes, or binarized connected region detection. In a preferred implementation, the image is first converted to a grayscale image, and then gradient information is extracted using the Sobel operator to identify regions with drastic grayscale changes, which are then used as candidate stain regions. The candidate regions are further processed using morphological closing operations to remove small holes and breaks, thus obtaining continuous stain edges.
[0079] After identifying the edge of the stain, calculate the current local feature parameters, including the starting point position, extension angle, curvature, and local continuity.
[0080] The starting point is determined as follows: Within the set of edge points of the smudge area, starting from the point where the eggshell outline intersects with the smudge, find the first pixel that meets the grayscale change threshold or color abrupt change condition, and define the coordinates of this pixel as the starting point. These coordinates are used to identify the area where the smudge trajectory occurs.
[0081] The extension angle is determined as follows: The point set of the stain's edge is input into a fitting algorithm to obtain the principal direction vector of the stain. This principal direction vector can be obtained through least-squares linear fitting or extracted using principal component analysis. Subsequently, the angle between the principal direction vector of the stain and the vertical axis vector of the egg is calculated; the resulting angle is the extension angle.
[0082] The curvature is determined as follows: a continuous sequence of pixels is selected on the edge of the smudge, and an arc is fitted for every three adjacent pixels, with the radius calculated. The reciprocal of this arc is taken as the local curvature. The overall curvature is then obtained by averaging the local curvatures of all segments. The curvature value reflects the degree of curvature of the smudge edge; the larger the value, the more curved the smudge.
[0083] The method for determining local continuity is as follows: perform connectivity analysis on the set of pixels in the smudge region, and count the number of connected regions and the gap length. When the number of connected regions is 1 and the gap length is less than a preset threshold, the smudge trajectory is considered to have high continuity; when the number of connected regions is greater than 1 or the gap length exceeds the preset threshold, it is considered to have low continuity.
[0084] Through the steps described above, the cloud computing platform can generate structured local feature data for each egg image, including the starting point location, extension angle, curvature, and local continuity. This feature data is stored in a database and associated with the corresponding chicken coop number and acquisition time to facilitate subsequent trajectory completion and anomaly detection.
[0085] In a preferred implementation, the cloud computing platform employs a distributed image processing architecture, dividing egg images uploaded by different robots into multiple task units and distributing them to different computing nodes for parallel processing. This distributed architecture can be implemented based on a task queue scheduling mechanism, where each computing node independently performs image preprocessing, stain recognition, and feature extraction. Finally, a result aggregation module stores the feature parameters output by each node in a unified database. In this way, even if hundreds of egg images are uploaded simultaneously within a single time period, a relatively short processing latency can be maintained, thus avoiding a decrease in real-time performance due to data accumulation.
[0086] In another preferred implementation, the extension angle is obtained based on a line detection method using the Hough transform. Specifically, the smudge region is binarized and input into the Hough transform algorithm. Possible line segments are detected through a voting mechanism in the parameter space, and the line with the highest number of votes is selected as the principal direction vector of the smudge. Compared to traditional edge-point fitting methods, this approach maintains high stability in direction detection even when there are breaks or noise interference at the smudge edges, avoiding inaccurate direction fitting due to local missing points.
[0087] In another preferred implementation, the curvature parameter is extracted using a multi-scale edge fitting method. Specifically, firstly, the overall edge of the stain is fitted at a coarse scale to obtain the general direction and curvature trend of the stain; then, a fine-scale fitting is performed on local areas to capture subtle curvatures within a small range. By weighted and fused curvature results from different scales, a more accurate curvature model of the stain trajectory can be obtained, reflecting both the overall shape over long distances and preserving local details. This method allows for the effective modeling of stain trajectories of varying thicknesses, avoiding the oversmoothing or oversensitivity problems that may occur with single-scale fitting.
[0088] Through the above optimization, the efficiency and robustness of feature extraction can be guaranteed in the case of large-scale concurrent data processing, so that the starting point position, extension angle, curvature and local continuity of the stain can maintain consistent extraction accuracy under different acquisition conditions.
[0089] In the farm scenario described in the previous embodiment, after the inspection robot collects an image of an egg from cage A101 in the first channel and uploads it to the cloud computing platform, the platform allocates the image to a specific computing node for processing via a distributed scheduling mechanism. This node first performs brightness normalization and background removal, and then detects the edges of stains on the eggshell. A distinct downward-extending stain is detected in the blunt-end region. The direction vector of the line obtained through Hough transform has an angle of 15 degrees with the vertical axis of the egg. The curvature parameter, after multi-scale fitting, has an average value of 0.12, indicating a single-strip structure with its starting point located at the blunt-end edge. These parameters are uniformly written into the cloud database by the aggregation module and stored in association with the cage number A101 and the collection time. This feature record is then used to compare with the egg images collected in the next cycle, providing a reliable basis for trajectory completion and anomaly detection.
[0090] In practical applications at poultry farms, inspection robots can only acquire images of one side of the eggs, resulting in incomplete tracks for some stains. Relying solely on local features at a single moment can easily lead to misjudgments. To improve the reliability of these judgments, it is necessary to introduce a historical comparison mechanism on the cloud computing platform. By retrieving historical feature parameters for the same cage number within a preset time window and comparing them with the local feature parameters of the current egg, the continuity and correlation between images from multiple time periods can be utilized to complete the tracks and identify abnormal patterns. To this end, the cloud computing platform retrieves historical local feature parameters corresponding to the current cage number from a sample of labeled egg image materials within a preset time window and compares these historical local feature parameters with the current local feature parameters.
[0091] The preset time window refers to the time range set for comparison. It can be 24 hours, 48 hours, or other durations set by the farm according to its management needs, and is used to limit the time span for calling historical data.
[0092] Historical local feature parameters refer to parameters such as starting point position, extension angle, curvature, and local continuity that have been extracted and stored from the labeled egg image material samples in the aforementioned steps.
[0093] The labeled egg image database refers to a collection of egg images labeled manually or automatically. Each image is associated with a corresponding chicken coop number, acquisition time, location of the stained area, and trajectory feature parameter labels. This database serves as benchmark data for feature comparison and model training on cloud computing platforms, ensuring consistency in feature extraction and trajectory completion processes for images acquired at different times. Labeling methods may include: manually labeling the stained outline and starting point, automatically segmenting the stained area using a deep learning model, or extracting stained feature points using a preset threshold algorithm. This database can be dynamically updated throughout the breeding cycle to reflect changes in the flock's condition and continuously optimize trajectory recognition accuracy.
[0094] In the specific implementation process, after receiving the local feature parameters of the current egg, the cloud computing platform first filters historical feature data corresponding to the chicken coop number within a preset time window from the cloud database, based on the chicken coop number information attached to the current image. The historical feature data includes parameters such as starting point position, extension angle, curvature, and local continuity, which have been extracted and stored in the preceding steps. By limiting the time window, it can be ensured that the data retrieved only reflects the state of the chicken coop within adjacent egg-laying cycles, thereby guaranteeing the relevance and timeliness of the comparison results.
[0095] After completing the data filtering, the cloud computing platform compares the historical feature parameters with the current feature parameters item by item. The comparison process is carried out sequentially according to the feature type.
[0096] The comparison of starting point positions is achieved by calculating the position difference. Specifically, the coordinates of the starting point of the smudge trajectory in the current image are extracted and compared with the starting point coordinates recorded in historical data. When the difference is less than a preset spatial threshold, the starting point positions are considered to be consistent. The threshold can be preset according to the image resolution or pixel density to ensure the accuracy of the judgment result.
[0097] The comparison of extension angles is achieved by calculating the angle difference. First, the main direction vector of the current stain trajectory is obtained, and the angle between it and the vertical axis of the egg is calculated as the current extension angle. Then, the difference between this value and the extension angle in the historical features is calculated. When the difference is within a preset angle range, the direction is considered similar. The angle range can be determined based on the statistical laws of the breeding site, and is generally set within a tolerance range of several degrees.
[0098] The curvature is compared by calculating the difference between two curvature values. The curvature value reflects the degree of curvature of the stain trajectory. If the difference between the current curvature and the historical curvature is less than a preset threshold, they are considered to be of similar curvature. This threshold can be calibrated based on experimental data to ensure that curvature changes within the normal fluctuation range are not misjudged as abnormal.
[0099] The method for comparing local continuity is to statistically analyze the difference in the number of breakpoints. First, a connectivity analysis is performed on the current stain trajectory to count the number of breakpoints in the trajectory, and then this number is compared with the number of breakpoints recorded in historical data. When the difference is less than a preset threshold, it is considered to be continuous. This threshold can be reasonably selected based on the characteristics of common minor stain interruptions on the egg surface.
[0100] Through the above comparison process, the cloud computing platform can identify the changing trends of current local features and historical features over time. If the comparison results show that the features remain stable or fluctuate within a small range, it indicates that the trajectory is basically consistent with the historical trajectory; if the comparison results show that the features are significantly different, it indicates that the trajectory has undergone abnormal changes over time.
[0101] In a preferred implementation, the cloud computing platform employs a weighted matching algorithm during the comparison process, assigning different weight values to different local feature parameters. This algorithm weights and sums the differences of each parameter when calculating the overall similarity, thus giving greater influence to important features in the comprehensive comparison. For example, the extension angle and curvature directly reflect the direction and degree of curvature of the stain trajectory and are more closely related to the identification of abnormal trajectories, therefore they are given higher weights in the calculation; the starting point position and local continuity have a relatively weaker impact on the overall trajectory, therefore they are given lower weights. This weighted matching method avoids deviations in the overall judgment result due to slight fluctuations in a single feature parameter. Its beneficial effect is that it makes the trajectory comparison results more consistent with reality, thereby improving the overall reliability of anomaly identification.
[0102] In another preferred implementation, the cloud computing platform employs a sliding time window approach for data management when accessing historical features. Specifically, each time a new image is uploaded, the system automatically updates the time window range, removing data older than the window's start time and adding the most recently acquired feature data. This ensures that the historical dataset remains within a dynamically updated range, allowing the comparison results to reflect the latest status of the chickens in the cage in real time. Its advantage lies in avoiding the data staleness problem within a static time window, making the system's comparison results more timely and dynamic.
[0103] In the example of the A101 chicken coop mentioned above, after the cloud computing platform receives the local feature parameters of the current egg, the system automatically retrieves the feature data of five historical eggs within a preset time window of 48 hours and performs a weighted comparison. During the comparison process, the weights for extension angle and curvature are set to 0.4 and 0.3, respectively, while the weights for starting point position and local continuity are set to 0.2 and 0.1, respectively. The calculation results show that the starting point position of the current egg is consistent with the historical data, both located at the blunt edge; the extension angle is 15 degrees, which differs from the historical average of 14.8 degrees by 0.2 degrees; the curvature is 0.12, which differs from the historical value of 0.13 by 0.01; and the local continuity is a complete strip in all cases. Through weighted calculation, the final similarity score is 0.94, which is higher than the system's set threshold of 0.9, thus determining that the current trajectory is highly consistent with the historical trajectory. This comparison result is recorded in the database and used as input for subsequent trajectory completion.
[0104] In practical applications at farms, inspection robots can only acquire images of one side of the egg, resulting in incomplete tracks of dirt on the shell. Relying solely on local feature parameters extracted from the current image makes it difficult to accurately determine the overall shape of the dirt track, thus affecting the reliability of anomaly detection. By comparing historical feature data on a cloud computing platform, the trajectory's extension trend and stable pattern over time can be obtained. Based on this, the current local features are completed, allowing the incomplete track to be inferred and reconstructed, forming a more complete trajectory model and providing a basis for subsequent anomaly detection. Therefore, based on the comparison results, the cloud computing platform completes the current local features to generate the corresponding complete trajectory.
[0105] In this invention, trajectory completion refers to using the comparison results of current local feature parameters and historical feature parameters to infer and fill in missing trajectory segments, thereby forming a continuous and complete trajectory.
[0106] A complete trajectory refers to the overall trajectory shape that covers the starting point, extension angle, curvature, and continuity characteristics, rather than being limited to partial local segments.
[0107] In the specific implementation process, after receiving the current local feature parameters and comparing them with historical feature parameters, the cloud computing platform first fits the edge point data of the current local features to establish a local trajectory trend model. This fitting process arranges the local smudge edge points in spatial coordinate order and uses least squares linear fitting or polynomial curve fitting methods to obtain the trajectory direction vector and local curvature. The trend model is used to characterize the basic extension trend of the current trajectory segment, providing an initial reference for subsequent trajectory completion.
[0108] Subsequently, the cloud computing platform aligns the current trajectory segment with historical trajectories in the time dimension based on the historical extension angle and curvature parameters obtained from the comparison results. Specifically, the system retrieves multiple historical trajectory samples corresponding to the current chicken coop number within the time window and statistically analyzes the direction vectors and curvature values of these samples to obtain representative parameters. The direction vector and curvature of the current local trajectory are then corrected against these representative parameters to eliminate deviations caused by single-shot acquisition errors. Based on this, the extension direction and curvature of the missing portion of the trajectory are inferred, thus providing boundary conditions for the trajectory completion process.
[0109] The trajectory completion process includes the following steps: First, the edge points of the current local features are fitted to obtain direction vectors and curvature values. The direction vector represents the extension direction of the trajectory, and the curvature value reflects the degree of curvature of the trajectory. Second, based on the similarity of historical features, the closest trajectory template is determined from historical trajectory samples within the time window. Similarity determination can be completed through similarity scoring or weighted matching algorithms, prioritizing trajectory templates that are close to the current features in terms of extension angle and curvature. Third, the current trajectory segment is matched with the trajectory template, and the missing segments of the trajectory are filled in using an optimal path fitting algorithm. The optimal path fitting algorithm is achieved by minimizing the differences in direction vectors and curvature values between the trajectory segment and the template trajectory, thereby generating a coherent and complete trajectory.
[0110] Through the above steps, the cloud computing platform can reasonably complete the missing parts of the trajectory by combining historical trajectory data when the local feature information is incomplete. The generated complete trajectory not only covers parameters such as the starting point, extension angle and curvature, but also maintains a high degree of consistency with the real stain trajectory in terms of overall shape, thus providing a reliable basis for subsequent anomaly judgment.
[0111] In a preferred implementation, the cloud computing platform employs a Bézier curve fitting method during trajectory completion. Specifically, firstly, the edge points of the current local smudge are sampled and arranged in spatial order to form an edge point set. Then, the Bézier curve interpolation method is used to interpolate the edge point set to generate a smooth fitting curve. Based on this, the fitting curve is corrected by adjusting the positions of control points, combining the direction and curvature parameters of historical trajectories, so that the generated curve maintains consistency with the overall trend of historical trajectories. Through this method, the completed trajectory more closely approximates the real smudge trajectory in terms of continuity and curvature, avoiding abrupt changes caused by missing data from a single sampling. It can smoothly connect the current trajectory with historical trajectories, thereby improving the realism and stability of the trajectory model.
[0112] In another preferred implementation, the trajectory completion process employs a dynamic time warping algorithm. Specifically, the current trajectory segment and the historical trajectory template are represented as discrete point sequences, and these two sequences are expanded on a time axis. The dynamic time warping algorithm calculates the minimum matching distance between the two sequences at different sampling points, and an alignment path is constructed based on this minimum distance. Using the alignment path, trajectory segments of different lengths can be aligned and stitched together, thereby completing missing segments. This method can handle situations where trajectory lengths differ at different acquisition times, ensuring consistency in the overall shape of the trajectory stitching result. Even if there are differences in temporal resolution during data acquisition, the system can still complete accurate completion, avoiding errors caused by data imbalance.
[0113] In another preferred implementation, the cloud computing platform introduces a confidence calculation mechanism during the trajectory completion process. Specifically, for each completed segment, the system calculates a confidence score based on the degree of matching between the current trajectory segment and historical trajectory templates in terms of direction, curvature, and continuity. If the score is lower than a preset threshold, the completed segment is marked as a low-confidence trajectory and stored separately in a low-confidence database, without directly participating in anomaly detection. This approach avoids distortion of anomaly detection results due to erroneous completion, enhances the system's fault tolerance under uncertain data conditions, and improves the overall reliability of trajectory completion.
[0114] Through the above optimization, the cloud computing platform can effectively complete the trajectory when the image information on one side is insufficient, ensuring that the completed trajectory has integrity, continuity and consistency in shape, thereby providing more accurate input data for subsequent abnormal egg identification.
[0115] In the example of chicken coop A101 mentioned above, when the cloud computing platform determines that the current trajectory is highly consistent with the historical trajectory in the comparison, the system performs boundary fitting on the trajectory based on the starting point coordinates and extension angle extracted from the current image. Since the current trajectory only covers the blunt end region, the system calls the trajectory templates of five eggs in the historical data and calculates their direction and curvature parameters. The results show that three of the trajectories are closest to the current trajectory in terms of extension angle and curvature. Based on this, the platform uses the Bézier curve interpolation method to smoothly extend the current trajectory to the middle region of the eggshell, and corrects the parameters between 0.12 and 0.13 curvature values. Finally, a continuous and complete vertical strip-shaped trajectory is generated, which reflects the actual situation of the currently collected data and maintains consistency with the historical trajectory. The completion result is stored in the database and associated with the A101 chicken coop number and the corresponding collection time information, and used as the basis data for subsequent anomaly detection.
[0116] The cloaca of a chicken serves as a common passage for feces and the reproductive tract. In a healthy state, the egg-laying reflex causes a brief contraction of the cloaca to clear secretions. The contact time between the egg and secretions is short, and the stains are mostly small, non-directional, scattered dots. When intestinal or cloacal secretions increase, viscosity changes, or the contraction rhythm becomes disordered, the secretions, under the combined influence of gravity and the rolling direction of the egg, form a trajectory with a clear direction and varying thickness, such as strips along the longitudinal axis, continuous trails, overlapping layers, or unilaterally offset arc-shaped trajectories. The starting point, extension angle, curvature, and continuity of the trajectory collectively reflect the secretion flow pattern and contact time, establishing a stable correspondence with the physiological state of the flock. Therefore, after obtaining the complete trajectory, a judgment can be made based on the trajectory type and parameter range, and abnormal results can be traced back to the corresponding cage location. To this end, the cloud computing platform determines whether an egg is abnormal based on the complete trajectory, and when an abnormality is determined, outputs the corresponding cage number as an abnormal cage location identifier.
[0117] Stains include, but are not limited to, chicken droppings, chicken feathers, chicken blood, and feed dust, as well as other eggshell residue. Common stain patterns are as follows:
[0118] The longitudinal trailing pattern is a long, thin band extending along the longitudinal axis of the egg, usually starting at the blunt or pointed end, with an angle close to the longitudinal direction of the egg.
[0119] Strip-shaped trajectories are continuous strips of contamination with relatively uniform width and relatively straight edges.
[0120] Point-like scattered trajectories are discrete distributions of small spots without a clear direction. Circular spillover trajectories refer to near-circular or arc-shaped diffusion along a certain circumferential direction.
[0121] Lateral stripe-shaped tracks are those that are mainly distributed on one side of the egg, while the other side is basically uncontaminated.
[0122] Layered and overlapping tracks are characterized by multiple depositional traces visible on the same strip, with obvious variations in thickness.
[0123] A ray-branching trajectory is characterized by a strip that branches out radially in multiple directions from its starting point. An arc-shaped coiling trajectory refers to a strip that bends and coils back at the end of its extension.
[0124] The above names are used for classification and identification, and do not limit the specific implementation method.
[0125] In the specific implementation process, after obtaining the complete trajectory, the cloud computing platform first performs parameterization processing on the trajectory within the eggshell coordinate system. The eggshell coordinate system establishes a spherical or ellipsoidal coordinate system with the vertical axis of the egg as the reference axis. The trajectory is projected onto the surface area of this coordinate system, facilitating the extraction of geometric features in different directions and positions. Within this coordinate system, the platform sequentially calculates the trajectory's extension angle range, average curvature, edge continuity index, and coverage distribution ratio. The extension angle range describes the trajectory's deviation in the longitudinal direction and its overall span; the average curvature reflects the trajectory's bending degree; the edge continuity index quantifies the trajectory's integrity and breakage; and the coverage distribution ratio measures the relative area occupied by the trajectory on the eggshell surface.
[0126] After completing the parameter calculation, the system executes the trajectory type identification process. Specifically, the system stores a set of preset trajectory templates in the database. This set is formed by statistically analyzing and clustering a large amount of historical data, covering common trajectory types, including longitudinal trailing, strip, dotted, ring-shaped overflow, lateral strip, overlapping, ray bifurcation, and arc-shaped rewind.
[0127] Each trajectory template corresponds to a typical set of parameter ranges and geometric feature distributions. For example, longitudinal trailing types typically have small extension angle deviations and low curvature values, strip types have uniform coverage ratios and high continuity indices, while point-like scattered types exhibit low coverage ratios and poor continuity. The system automatically identifies trajectory types by comparing the parameter features of the current trajectory with the template set and selecting the closest template category based on a similarity scoring method.
[0128] After trajectory type identification is completed, the system sets judgment rules based on different types of trajectories and determines whether the current trajectory has entered an abnormal zone. This judgment process combines parameter threshold judgment with rule matching methods. Specifically, it includes the following aspects: First, setting an allowable deviation range for the extension angle range; when the trajectory extension angle exceeds this range, it is considered abnormal. Second, setting upper and lower limits for the curvature value; when the trajectory curvature deviates significantly from the normal range, it is judged as abnormal. Third, setting a break count threshold for the edge continuity index; when the number of break points exceeds the set value, it is judged as abnormal. Fourth, setting a minimum effective contaminated area for the coverage distribution ratio; when the trajectory coverage ratio is lower than this threshold or an skewed distribution occurs, it can also be judged as abnormal.
[0129] In the above process, the system not only generates binarized normal or abnormal results, but also further generates a judgment label and a confidence score for each egg. The judgment label includes a trajectory category label and an anomaly type label. The confidence score is calculated by comprehensively considering the similarity score and the degree of parameter deviation, and the value ranges between 0 and 1, reflecting the reliability of the judgment result. If the judgment result is an abnormal egg, the system will call the chicken coop number information attached during the image acquisition process and directly output the number as the abnormal coop location identifier, while storing the result in the database for subsequent traceability and intervention.
[0130] Optional implementation schemes include setting threshold ranges for angle and curvature according to different trajectory types to ensure the specificity of classification; setting a threshold for uneven distribution between left and right sides according to the degree of lateral deviation to identify unilateral contamination; setting an upper limit for break count according to the continuity index to determine whether the stain is excessively broken; and setting a minimum effective contamination area according to the coverage ratio to exclude minor and occasional stain interference. By combining different threshold conditions, the system can implement refined anomaly judgment logic for various trajectory types.
[0131] Continuing with the example of chicken coop A101, after completion, the system obtains a strip extending from the blunt end towards the middle. The extension angle is close to the longitudinal direction, the average curvature is in the small curvature range, the continuity index is high, and the coverage ratio exceeds the preset minimum area. The trajectory template matching result is a longitudinal trailing type with low lateral deviation and no obvious rewinding or forking. Based on the parameter threshold of the longitudinal trailing type, the system determines that the extension angle exceeds the historical allowable upper limit for this coop location, and the curvature is slightly higher than the upper limit of the historical average. The overall score enters the abnormal range, so the egg is marked as an abnormal egg, and A101 is output as the abnormal coop location identifier. At the same time, time and trajectory type labels are written for verification.
[0132] This embodiment provides a cloud computing-based image monitoring system for chicken farming, which consists of the following functional modules:
[0133] The data acquisition module is used to deploy at least one inspection robot in the breeding site. The inspection robot acquires images of eggs in the chicken cages and includes the acquisition time and the corresponding chicken cage number in each egg image.
[0134] The upload and processing module is used to upload the egg image to a cloud computing platform, which is deployed remotely or in at least one inspection robot. The cloud computing platform processes the egg image and extracts the current local feature parameters of the eggshell stain trajectory. The local feature parameters include the starting point position, extension angle, curvature and local continuity of the stain trajectory.
[0135] The comparison module is used to retrieve historical local feature parameters corresponding to the current chicken coop number from the sample of the labeled egg image material library within a preset time window of the cloud computing platform, and compare the historical local feature parameters with the current local feature parameters.
[0136] The trajectory completion module is used to complete the trajectory of the current local features based on the comparison results, and generate the corresponding complete trajectory.
[0137] The determination module is used to determine whether an egg is an abnormal egg based on the complete trajectory, and when it is determined to be abnormal, it outputs the corresponding chicken cage number as an abnormal cage location identifier.
[0138] In a further implementation, the processing module includes a starting point determination unit, which is used to find the first pixel that meets the grayscale change threshold or color change condition from the position where the eggshell outline intersects with the stain in the edge point set of the stain area, and define the coordinates of the pixel as the starting point, which is used to identify the area where the stain trajectory occurs.
[0139] In a further implementation, the comparison module includes:
[0140] The starting point comparison unit is used to extract the starting point coordinates of the smudge trajectory in the current image and perform a difference calculation with the starting point coordinates recorded in the historical data. When the difference is less than the preset spatial threshold, it is determined that the starting point positions are consistent.
[0141] Angle comparison unit is used to obtain the main direction vector of the current stain trajectory and calculate the angle between it and the vertical axis of the egg as the current extension angle. Then, the difference between this angle and the extension angle in the historical features is calculated. When the difference is within the preset angle range, it is determined that the directions are similar.
[0142] The curvature comparison unit is used to calculate the difference between the current curvature and the historical curvature. When the difference is less than a preset threshold, it is determined that the curvature is similar.
[0143] The continuity comparison unit is used to perform connectivity analysis on the current stain trajectory, count the number of breakpoints in the trajectory, and then compare it with the number of breakpoints recorded in historical data. When the difference is less than a preset threshold, it is determined to be continuous and consistent.
[0144] In a further implementation, the comparison module further includes a weighted matching unit, which is used to set different weight values for different local feature parameters during the comparison process.
[0145] In a further implementation, the trajectory completion module includes:
[0146] The edge fitting unit is used to fit the edge points of the current local features to obtain the direction vector and curvature value. The direction vector is used to represent the extension direction of the trajectory, and the curvature value is used to reflect the degree of curvature of the trajectory.
[0147] The template determination unit is used to determine the closest trajectory template from historical trajectory samples within a time window based on the similarity of historical features.
[0148] The matching and fitting unit is used to match the current trajectory segment with the trajectory template and fill in the missing segments of the trajectory using the optimal path fitting algorithm.
[0149] It should be noted that the explanation of the aforementioned embodiment of the cloud computing-based image monitoring method for chicken farming also applies to the apparatus of this application embodiment, and will not be repeated here.
[0150] Those skilled in the art will recognize that the units and algorithm steps described in the embodiments disclosed herein can be implemented using electronic hardware, computer software, or a combination of electronic hardware and software. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.
[0151] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working processes of the systems, devices, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here.
[0152] In the several embodiments provided in this application, any function, if implemented as a software functional unit and sold or used as an independent product, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of this application, in essence, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this application. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0153] The above description is merely a specific embodiment of this application. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in this application should be included within the protection scope of this application. For some module structures not specifically defined in this invention, the content described in the prior art shall prevail. The prior art mentioned in the foregoing background and specific embodiments sections can be considered as part of this invention and used to understand the meaning of some technical features or parameters.
Claims
1. A cloud computing-based chicken flock breeding image monitoring method, characterized in that, Includes the following steps: S1, deploy at least one inspection robot in the breeding site. The inspection robot collects images of eggs in the chicken cages and attaches the collection time and corresponding chicken cage number to each egg image. S2, the egg image is uploaded to a cloud computing platform, which is deployed remotely or in at least one inspection robot. The cloud computing platform processes the egg image and extracts the current local feature parameters of the eggshell stain trajectory. The stain trajectory is a stain pattern formed on the eggshell surface and extending in a certain direction. The local feature parameters include the starting point position, extension angle, curvature and local continuity of the stain trajectory. S3, within a preset time window, the cloud computing platform retrieves the historical local feature parameters corresponding to the marked egg image material samples and the current chicken coop number, and compares the historical local feature parameters with the current local feature parameters; S4. Based on the comparison results, the cloud computing platform completes the trajectory of the current local features and generates the corresponding complete trajectory. S5, the cloud computing platform determines whether the egg is an abnormal egg based on the complete trajectory, and outputs the corresponding chicken cage number as an abnormal cage position identifier when it is determined to be abnormal.
2. The image monitoring method for chicken flock farming based on cloud computing according to claim 1, characterized in that: The starting point is determined by finding the first pixel that meets the grayscale change threshold or color change condition from the point where the eggshell outline intersects with the stain at the edge of the smudge area. The coordinates of this pixel are defined as the starting point, and these coordinates are used to identify the area where the smudge trajectory occurs.
3. The image monitoring method for chicken flock farming based on cloud computing according to claim 1, characterized in that: The comparison method for the starting point is as follows: extract the coordinates of the starting point of the smudge trajectory in the current image, and perform a difference calculation with the starting point coordinates recorded in the historical data. When the difference is less than the preset spatial threshold, it is determined that the starting point position is consistent. The comparison method for the extension angle is as follows: obtain the main direction vector of the current stain trajectory and find the angle between it and the vertical axis of the egg as the current extension angle. Then, calculate the difference between this angle and the extension angle in the historical features. When the difference is within the preset angle range, it is determined that the directions are similar. The curvature is compared as follows: if the difference between the current curvature and the historical curvature is less than a preset threshold, they are considered to have similar degrees of curvature. The method for comparing local continuity is as follows: perform connectivity analysis on the current stain trajectory, count the number of breakpoints in the trajectory, and then compare it with the number of breakpoints recorded in historical data. When the difference is less than a preset threshold, it is determined to be continuous.
4. The image monitoring method for chicken flock farming based on cloud computing according to claim 1, characterized in that: The cloud computing platform uses a weighted matching algorithm during the comparison process, setting different weight values for different local feature parameters.
5. The image monitoring method for chicken flock farming based on cloud computing according to claim 1, characterized in that: The process of trajectory completion includes: The edge points of the current local features are fitted to obtain direction vectors and curvature values. The direction vectors are used to represent the extension direction of the trajectory, and the curvature values are used to reflect the curvature of the trajectory. Based on the similarity of historical features, the closest trajectory template is determined from the historical trajectory samples within the time window. The current trajectory segment is matched with the trajectory template, and the missing segments of the trajectory are filled in using the optimal path fitting algorithm.
6. A cloud computing-based chicken farming image monitoring system, characterized by, The system includes: The data acquisition module is used to deploy at least one inspection robot in the breeding site. The inspection robot acquires images of eggs in the chicken cages and includes the acquisition time and the corresponding chicken cage number in each egg image. The upload and processing module is used to upload the egg image to a cloud computing platform, which is deployed remotely or in at least one inspection robot. The cloud computing platform processes the egg image and extracts the current local feature parameters of the eggshell stain trajectory. The stain includes, but is not limited to, chicken feces, chicken feathers, chicken blood, and feed dust, etc., which are attached to the eggshell. The stain trajectory is a stain pattern formed on the eggshell surface and extending in a certain direction. The local feature parameters include the starting point position, extension angle, curvature, and local continuity of the stain trajectory. The comparison module is used to retrieve historical local feature parameters corresponding to the current chicken coop number from the sample of the labeled egg image material library within a preset time window of the cloud computing platform, and compare the historical local feature parameters with the current local feature parameters. The trajectory completion module is used to complete the trajectory of the current local features based on the comparison results, and generate the corresponding complete trajectory. The determination module is used to determine whether an egg is an abnormal egg based on the complete trajectory, and when it is determined to be abnormal, it outputs the corresponding chicken cage number as an abnormal cage location identifier.
7. The cloud computing-based image monitoring system for chicken farming according to claim 6, characterized in that: The processing module includes a starting point determination unit, which is used to find the first pixel that meets the grayscale change threshold or color change condition from the position where the eggshell outline intersects with the stain edge point set, and defines the coordinates of the pixel as the starting point. The coordinates are used to identify the area where the stain trajectory occurs. 8.The cloud-computing-based chicken farm image monitoring system according to claim 6, characterized in that: The comparison module includes: The starting point comparison unit is used to extract the starting point coordinates of the smudge trajectory in the current image and perform a difference calculation with the starting point coordinates recorded in the historical data. When the difference is less than the preset spatial threshold, it is determined that the starting point positions are consistent. Angle comparison unit is used to obtain the main direction vector of the current stain trajectory and calculate the angle between it and the vertical axis of the egg as the current extension angle. Then, the difference between this angle and the extension angle in the historical features is calculated. When the difference is within the preset angle range, it is determined that the directions are similar. The curvature comparison unit is used to calculate the difference between the current curvature and the historical curvature. When the difference is less than a preset threshold, it is determined that the curvature is similar. The continuity comparison unit is used to perform connectivity analysis on the current stain trajectory, count the number of breakpoints in the trajectory, and then compare it with the number of breakpoints recorded in historical data. When the difference is less than a preset threshold, it is determined to be continuous and consistent. 9.The cloud-computing-based chicken farm image monitoring system according to claim 6, characterized in that: The comparison module further includes a weighted matching unit, which is used to set different weight values for different local feature parameters during the comparison process. 10.The cloud-computing-based chicken population breeding image monitoring system according to claim 6, characterized in that: The trajectory completion module includes: The edge fitting unit is used to fit the edge points of the current local features to obtain the direction vector and curvature value. The direction vector is used to represent the extension direction of the trajectory, and the curvature value is used to reflect the degree of curvature of the trajectory. The template determination unit is used to determine the closest trajectory template from historical trajectory samples within a time window based on the similarity of historical features. The matching and fitting unit is used to match the current trajectory segment with the trajectory template and fill in the missing segments of the trajectory using the optimal path fitting algorithm.
Citation Information
Patent Citations
Method and system for monitoring egg laying of stacked caged laying hen zone based on computer vision
CN117351430A
Chicken flock state inspection monitoring system and method
CN119989281A