Laying hen breeding illumination hierarchical control system and method based on image recognition

Automatically adjusting the lighting of laying hens through image recognition technology, solving the problems of repeated inspections and parameter settings of breeders in traditional light control systems, achieving efficient and accurate lighting management, and improving work efficiency and adaptability.

CN120412015APending Publication Date: 2025-08-01重庆市合川区畜牧站

Patent Information

Application Number
CN202510475877.4
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-04-16
Publication Date
2025-08-01

AI Technical Summary

Technical Problem

In laying hen breeding, traditional light control systems require keepers to repeatedly check and set parameters, resulting in inefficiency.

Method used

The light grading control system based on image recognition is adopted to collect the image information of the laying hen through the camera, identify its outline, color and behavioral characteristics, automatically match the appropriate lighting intensity and time, and dynamically adjust the lighting strategy based on the data.

Benefits of technology

It improves the accuracy and automation of light control, reduces manual intervention, reduces labor intensity and error rate, improves the work efficiency of breeders, and can adapt to the lighting needs of different varieties and environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120412015A_ABST
    Figure CN120412015A_ABST
Patent Text Reader

Abstract

The invention belongs to the technical field of laying hen breeding illumination, and particularly relates to a laying hen breeding illumination hierarchical control system and method based on image recognition. The laying hen breeding illumination hierarchical control method based on image recognition comprises the following steps that S10, cameras are arranged in a plurality of breeding areas, breeding types and breeding stages are stored in the breeding areas in an associated mode, color features are stored in the breeding types in an associated mode, and size features and behavior features are stored in the breeding stages in an associated mode; the camera is used for collecting image information of laying hens in a breeding area; s20, identifying and extracting the contour feature of the laying hen in the image information as a first feature, and identifying and extracting the contour feature of the coop in the image information as a second feature; a dimensional ratio between the first feature and the second feature is obtained. According to the scheme, through the image recognition technology and automatic control, the problem that a breeder needs to repeat a large amount of inspection and parameter setting work in the actual breeding process is solved, and the working efficiency and the breeding management level are remarkably improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This solution belongs to the technical field of lighting technology for laying hen farming, and specifically relates to a lighting grading control system and method for laying hen farming based on image recognition. Background Art

[0002] Lighting is one of the key factors affecting the growth and production performance of laying hens. Appropriate lighting can promote the skeletal development, sexual maturity, and egg-laying performance of laying hens. For example, during the brooding period of laying hens, sufficient lighting helps chicks eat and drink, thus promoting their growth; during the egg-laying period, reasonable lighting can stimulate the development of the reproductive system of laying hens, thereby increasing the egg-laying rate. However, in traditional laying hen farming, only daily lighting is usually adopted, and this simple lighting mode cannot meet the different lighting requirements of different breeds of laying hens at different growth stages and egg-laying stages.

[0003] In this regard, Chinese Patent CN102843833A discloses an intelligent lighting system for laying hen farming. By inputting the laying hen breed parameters and the laying hen growth and egg-laying stage parameters into the control system, each module in the system can be triggered to work, providing lighting suitable for the breed and meeting the growth stage or egg-laying stage of the laying hens in the chicken coop. Compared with the practice of providing unified daily lighting for all laying hens at each growth and egg-laying stage in traditional laying hen farming technology, this intelligent lighting system can better meet the growth and egg-laying needs of laying hens.

[0004] However, in the actual farming process, the breeder needs to take care of a large number of laying hens at different growth stages or egg-laying stages at the same time. When using this intelligent lighting system, the breeder needs to repeatedly check the individual conditions of the laying hens and input different parameters. This repeated checking and setting operation increases the breeder's work content and working hours, resulting in a significant decrease in the breeder's work efficiency. Summary of the Invention

[0005] The purpose of this solution is to provide a lighting grading control system and method for laying hen farming based on image recognition, so as to solve the problem that in the actual farming process, the breeder needs to repeatedly perform a large number of inspections and parameter setting operations, resulting in low work efficiency.

[0006] To achieve the above purpose, this solution provides a lighting grading control method for laying hen farming based on image recognition, including the following steps:

[0007] S10: Set cameras in several breeding areas. The breeding areas are associated with and store the breeding types and breeding stages. The breeding types are associated with and store color characteristics. The breeding stages are associated with and store size characteristics and behavior characteristics; the cameras are used to collect image information of the laying hens in the breeding areas;

[0008] S20: Identify and extract the contour features of the laying hens in the image information as the first feature, and identify and extract the contour features of the chicken cages in the image information as the second feature; obtain the size ratio between the first feature and the second feature, calculate the size of the laying hens in combination with the preset size of the chicken cages, and calculate the size corresponding to the first feature as the first size feature; identify and extract the color feature corresponding to the first feature in the image information as the first color feature;

[0009] S30: Take the acquisition time of the image information as the first time, take the positional relationship between the first feature and the second feature as the first relationship, process the change of the first relationship at the first time into behavior information, and obtain the behavior characteristics of the laying hens as the first behavior characteristics according to the behavior information;

[0010] S40: Compare the first size feature, the first color feature, and the first behavior feature corresponding to the first contour feature with the breeding types and breeding stages associated and stored in the breeding area where the laying hens are located. According to the comparison results, match a breeding area for the laying hens as the transfer area, and generate transfer information based on the transfer area, the breeding area where the laying hens are located, the position of the laying hens in the first image, and the first color feature, and send it to the management terminal; set the light intensity and light time in the breeding area according to the breeding types and breeding stages associated and stored in the breeding area.

[0011] And, an image recognition-based laying hen breeding light grading control system using the image recognition-based laying hen breeding light grading control method.

[0012] The principle of this solution is as follows: This solution collects the image information of laying hens by setting cameras in the breeding area. Using image recognition technology, it extracts the contour features of the laying hens (the first feature) and the contour features of the chicken cages (the second feature), calculates the size ratio between the laying hens and the chicken cages, so as to obtain the size of the laying hens (the first size feature); at the same time, it extracts the color features of the laying hens in the image (the first color feature); by analyzing the positional relationship between the laying hens and the chicken cages in the image information and its change over time, it is processed into the behavior information of the laying hens, and then the behavior characteristics of the laying hens (the first behavior characteristics) are obtained. According to the extracted first size feature, first color feature, and first behavior feature, the laying hens are matched to the corresponding breeding area. Each breeding area is pre-associated and stored with breeding types and breeding stages, and these information are further associated with the color features, size features, and behavior features of the laying hens. Based on the breeding types and breeding stages associated with the matched breeding area, the light intensity and light time in this area are set. Different breeding types and stages have different lighting requirements, thus realizing the grading control of lighting.

[0013] The technical effects of this solution are as follows: (1) Through image recognition technology, this solution can accurately identify the size, color, and behavioral characteristics of laying hens, thereby accurately judging the growth stage and egg-laying status of laying hens. This accurate identification enables the lighting control to be adjusted hierarchically according to the actual needs of laying hens, providing the most suitable lighting conditions for laying hens at different stages. Compared with the traditional methods of manual inspection and manual setting of lighting parameters, this method greatly improves the accuracy and automation of lighting control, reduces manual intervention, and lowers the labor intensity and error rate.

[0014] (2) There are also differences in the growth rates of laying hens in the same area. This solution can timely detect laying hens that do not match the breeding conditions of the breeding area by monitoring the growth stage and egg-laying status of laying hens. At the same time, it matches suitable breeding areas for laying hens according to their growth stage and egg-laying status, and sends the matching results and generated transfer information to the management terminal (the terminal used by the breeder). The breeder can quickly find the laying hens that need to be transferred through the transfer information and quickly transfer the laying hens according to the transfer information. Compared with the traditional method of manually checking each laying hen one by one to find a suitable breeding area, it greatly reduces the operation process and operation time of the breeder, and further improves the work efficiency of the breeder.

[0015] (3) When adjusting the lighting time and lighting intensity in this solution, it can quickly change the breeding stage stored in association with the breeding area according to the overall changes of laying hens in the breeding area, so as to quickly adjust the lighting time and lighting intensity in the breeding area. The breeder can observe the situation of laying hens through the image information, adjust the breeding stage in the breeding area, and thus adjust the breeding conditions in the breeding area. This method not only reduces the time for the breeder to run around in the breeding area to transfer laying hens, but also reduces the time for the breeder to modify breeding parameters such as the lighting intensity and lighting time for each breeding one by one, further improving the work efficiency of the breeder.

[0016] (4) During the implementation of this solution, a large amount of image data of laying hens and corresponding lighting control parameters have been accumulated. Through the analysis and mining of these data, the lighting control strategy can be continuously optimized, further improving the performance and control effect of this solution. Moreover, with the continuous accumulation of data and the continuous optimization of the model, this solution can better adapt to the lighting requirements of different breeds of laying hens, different breeding environments, and different breeding conditions, and has stronger adaptability and universality.

[0017] In summary, this solution uses image recognition technology and automatic control to solve the problem that breeders need to repeat a large amount of inspection and parameter setting work in the actual breeding process, and significantly improves the work efficiency and breeding management level.

[0018] Further, when calculating the first size feature, first perform Hough transform detection on the second feature, and extract the parallel line spacing of the chicken coop railing as the reference size; the straight line equations of the parallel lines of the chicken coop railing obtained by Hough transform detection in the image information are shown in the following formula (1). Calculate the parallel line spacing of the chicken coop railing according to the pixel unit, and the calculation formula of the parallel line spacing is shown in the following formula (2):

[0019]

[0020] Among them, a1, b1, c1 are the equation coefficients of the first chicken coop railing straight line in the image coordinate system obtained by Hough transform detection, a2, b2, c2 are the equation coefficients of the second parallel railing, x, y are the image pixel coordinates, and d pixel is the pixel distance between the two parallel railings in the image; then calculate the ratio of the axial maximum length of the first feature to the chicken coop railing spacing, and combine the preset chicken coop size conversion to obtain the actual body length of the laying hen; then according to the preset comparison table of laying hen breeds, body length and weight, map the actual body length to the equivalent weight, and use the equivalent weight and actual body length as the first size feature.

[0021] Hough transform is a classic image processing technology that can effectively detect straight lines in images. By detecting the parallel line spacing of the chicken coop railing, a stable reference size can be obtained. Using this reference size and combining the pixel unit in the image, the actual body length of the laying hen can be calculated more accurately. Compared with directly measuring the size of the laying hen in the image, this solution can reduce errors caused by factors such as image distortion and shooting angle, thereby improving the accuracy of size measurement. Moreover, this method of this solution realizes the automation and standardization of size measurement, reduces the cumbersome operations and subjective errors of manual measurement, and improves work efficiency. At the same time, this solution reduces the workload of the breeder in terms of size measurement and parameter setting. The breeder can remotely obtain a large amount of accurate size information of the laying hens, reducing the labor intensity and error rate, and further improving the work efficiency of the breeder.

[0022] Further, after obtaining the first size feature, determine whether the laying hen is mature according to the first size feature, which specifically includes the following steps: Calculate the number of contours N of the effective first feature by background difference method. When N ≤ N th perform convex hull detection on the head contour of the laying hen according to the first feature and the body structure of the laying hen, extract the pixel region that satisfies H ∈ [0, 30] in the HSV color space as the chicken comb ROI, and calculate the proportion R comb of the chicken comb area, the average saturation S avg of the chicken comb, and the average brightness V avg of the chicken comb. When the following conditions shown in formula (7) are simultaneously satisfied, mark the laying hen corresponding to the first feature as a sexually mature individual, and according to the sexual maturity ratio P of the first feature in the second featuremature Extra activate the 630nm red light supplementary lighting; formula (7) is as follows:

[0023] R comb > 15% ∧ S avg > 60 ∧ V avg > 70 (7).

[0024] This solution determines whether laying hens are mature through background difference method, convex hull detection and HSV color space analysis, and activates specific red light supplementary lighting according to the results, which can achieve accurate and automatic determination of the maturity of laying hens, reduce manual intervention and improve work efficiency. This method combines multiple image processing technologies to accurately identify the maturity of laying hens, with higher accuracy than a single method. At the same time, activating red light supplementary lighting for mature laying hens can stimulate the development of the reproductive system, improve the egg production rate, and achieve the dual goals of energy conservation and efficiency improvement. In addition, this method of this solution has a certain robustness to environmental changes, can adapt to different breeding conditions, and its adaptability and universality are continuously enhanced with data accumulation and model optimization, providing data support for breeding management.

[0025] Furthermore, the camera continuously collects image information at preset intervals, and then calculates the standard deviation σ of the centroid coordinates of the contour of the first feature. When σ is less than the preset standard deviation threshold, the light intensity is increased. The calculation formula of σ is as shown in formula (12) below:

[0026]

[0027] where x i , y i is the centroid coordinate of the i-th chick, is the average centroid position of the chicken flock,

[0028] At the same time, the pixel change amount ΔA of the first feature within a preset unit time is statistically calculated, and the lighting time is adjusted according to the pixel change amount ΔA of the first feature. The calculation formula of ΔA is as shown in formula (13) below:

[0029]

[0030] where A t is the total pixel area of the contour in the t-th frame image.

[0031] Furthermore, the breeding stages of laying hens include brooding period, rearing period and laying period. The first size feature is classified in combination with the size ranges corresponding to different stages, and laying hens in different breeding stages are monitored differently according to their aggregation behavior and activity level; when the laying hens are in the brooding period, the light distribution is adjusted according to σ; the lighting time is adjusted according to ΔA; when the laying hens are in the rearing period, if σ is less than the preset minimum standard deviation and ΔA is greater than the preset maximum movement change, a temporary monitoring window of the preset time is opened, and the head movement trajectory corresponding to the first feature is detected by YOLOv5, and the number of times the head movement speed is greater than the preset maximum head movement speed is counted as the first number. If the first number is greater than the preset maximum number, the light intensity is increased, and the temporary monitoring window of the preset time is opened again to count the number of head movements as is the second number. If the second number is less than the first number, the temporary monitoring window of the preset time is opened again to count the number of head movements. If the second number is not less than the first number or the number of times the temporary monitoring window is opened reaches the preset maximum number, the first feature that the head movement speed is greater than the preset maximum head movement speed is marked in the image information, and a pecking prompt is generated according to the image information and the acquisition position of the camera and sent to the management terminal; when the laying hen is in the breeding period, if ΔA is less than the preset minimum movement change, the acquisition time of the image information is used as the first start time, the time when ΔA is not less than the preset minimum movement change after the first start time is used as the first end time, and the difference between the first start time and the first end time is used as the kenneling time, and the lighting time or intensity is adjusted according to the kenneling time and the kenneling frequency.

[0032] During the brooding period, by calculating the standard deviation and pixel variation of the laying hen's centroid coordinates, the lighting distribution and timing are dynamically adjusted. This provides a more uniform and appropriate lighting environment for laying hens, promoting their feeding and drinking, and reducing clumping caused by uneven lighting, thereby improving their growth rate and health. During the rearing period, when abnormal activity levels are detected (standard deviation less than a threshold and pixel variation is excessive), this solution uses YOLOv5 to detect head movement trajectories and accurately identify pecking behavior. If multiple consecutive rapid movements in the same direction are detected, the lighting intensity is automatically increased to reduce the occurrence of pecking behavior. A pecking alert is generated and sent to the management terminal, enabling timely intervention by the breeder, reducing harm between laying hens, reducing mortality due to stress reactions, and improving the welfare and survival rate of laying hens. During the laying period, by monitoring the laying hens' roosting time and frequency of entering and leaving the laying house, the lighting duration or intensity is dynamically adjusted to better meet the physiological needs of laying hens during the egg-laying period, promote normal egg-laying behavior, improve egg production rate and egg quality, and thus increase farming profits.

[0033] This solution continuously collects image information through a camera and automatically calculates relevant parameters, enabling real-time monitoring of the behavior and status of laying hens. It can automatically adjust the lighting according to preset conditions, reducing errors caused by manual intervention and subjective judgment, lowering the work intensity and labor costs of breeders, while improving the scientific nature and accuracy of breeding management, and helping to enhance the overall breeding efficiency. On the premise of ensuring the growth and production performance of laying hens, through precise regulation of light intensity and time, unnecessary light waste is avoided, achieving an energy-saving effect and reducing breeding costs. Moreover, this solution combines the characteristics and behavior patterns of laying hens at different breeding stages. By flexibly setting parameters and dynamically adjusting strategies, it can adapt to different breeds of laying hens, different breeding environments, and management requirements, with strong adaptability and universality. With the accumulation of data and the optimization of the model, this solution can better handle various complex situations and continuously improve its performance.

[0034] Furthermore, it also includes the steps of cross-regional light influence analysis and zoning adjustment:

[0035] S51: Establish a three-dimensional spatial topology model based on the positional relationships of each breeding area;

[0036] S52: Calculate the light influence intensity and light influence depth of each breeding area on adjacent breeding areas according to the light intensity of each breeding area;

[0037] S53: Divide a transition zone outside the breeding area according to the light influence depth;

[0038] S54: Obtain the light time of the breeding area adjacent to the transition zone, calculate the composite light intensity of different light times in the transition zone, and adjust the breeding type or breeding stage of the transition zone according to the calculation results.

[0039] By constructing a three-dimensional spatial topology model, the positional relationships and spatial layouts between each breeding area can be described more accurately. Combining the light intensity to calculate the light influence intensity and depth can comprehensively evaluate the light influence of each area on adjacent areas, thus realizing more refined light management and avoiding uneven breeding environments caused by light interference between areas. Moreover, dividing a transition zone outside the breeding area according to the light influence depth and calculating the composite light intensity of different light times in the transition zone can provide more suitable light conditions for the transition zone. By adjusting the breeding type or breeding stage of the transition zone, the impact of light differences on the growth and production performance of laying hens can be reduced, and the breeding efficiency of the transition zone can be improved. At the same time, through reasonable zoning adjustment and transition zone setting, the breeding space can be better utilized, and unreasonable breeding area division caused by light problems can be avoided. This helps to improve the overall utilization efficiency of the breeding space, increase the breeding density, and thus enhance the breeding efficiency.

[0040] Further, adjust the priority weights according to different breeding stages, and determine the new breeding stage of the transition zone according to formula (18), where formula (18) is as follows:

[0041]

[0042] Among them, q is different breeding stages, f(q) is an evaluation function related to breeding stage q, and P q is the preset weight for breeding stage q.

[0043] Further, when calculating the new breeding stage, if there are multiple breeding stages such that the value of P q ·f(q) is the same, give priority to adjusting the brooding period, followed by the growing period, and finally the laying period.

[0044] By adjusting the priority weights according to different breeding stages, it is possible to more scientifically evaluate and select the most suitable breeding stage. This method comprehensively considers the evaluation function and preset weight of the breeding stage, avoids the limitations of single-index decision-making, and improves the accuracy and reliability of decision-making. When calculating the new breeding stage, give priority to adjusting the brooding period, followed by the growing period, and finally the laying period. This priority strategy can better adapt to the special environmental requirements of the transition zone and ensure that the breeding environment in the transition zone is more stable and suitable. For example, laying hens in the brooding period are more sensitive to environmental changes, and giving priority to adjusting the brooding period can reduce the impact of environmental changes on the growth of young chickens. BRIEF DESCRIPTION OF THE DRAWINGS

[0045] Figure 1 It is a flowchart of the method for grading and controlling the lighting of laying hen breeding based on image recognition in an embodiment of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0046] The following will clearly and completely describe the concept and technical effects generated by the present invention in combination with embodiments, so as to fully understand the purpose, features and effects of the present invention. Obviously, the described embodiments are only a part of the embodiments of the present invention, rather than all embodiments. Other embodiments obtained by those skilled in the art based on the embodiments of the present invention without creative efforts shall fall within the scope of protection of the present invention:

[0047] As Figure 1 shown, the method for grading and controlling the lighting of laying hen breeding based on image recognition includes the following steps:

[0048] S10: Set cameras in several breeding areas. The breeding areas are associated with the storage of breeding types and breeding stages. The breeding types are associated with the storage of color characteristics. The breeding stages are associated with the storage of size characteristics and behavior characteristics. The cameras are used to collect image information of laying hens in the breeding areas;

[0049] S20: Identify and extract the contour features of the laying hens in the image information as the first feature, and identify and extract the contour features of the chicken cage in the image information as the second feature; obtain the size ratio between the first feature and the second feature, calculate the size of the laying hens in combination with the preset size of the chicken cage, and calculate the size corresponding to the first feature as the first size feature; identify and extract the color feature corresponding to the first feature in the image information as the first color feature;

[0050] S30: Take the acquisition time of the image information as the first time, take the positional relationship between the first feature and the second feature as the first relationship, process the change of the first relationship at the first time as behavior information, and obtain the behavior feature of the laying hens as the first behavior feature according to the behavior information;

[0051] S40: Compare the first size feature, the first color feature, and the first behavior feature corresponding to the first contour feature with the breeding types and breeding stages stored in association with the breeding area where the laying hens are located. According to the comparison results, match a breeding area for the laying hens as the transfer area, and generate transfer information based on the transfer area, the breeding area where the laying hens are located, the position of the laying hens in the first image, and the first color feature, and send it to the management terminal; set the light intensity and light time in the breeding area according to the breeding types and breeding stages stored in association with the breeding area.

[0052] Among them, step S20 further includes the following steps:

[0053] S21: Perform Hough transform detection on the second feature, and extract the parallel line spacing of the chicken cage railings as the reference size. The straight line equations of the parallel lines of the chicken cage railings in the image information after Hough transform detection are shown in the following formula (1). Calculate the parallel line spacing of the chicken cage railings according to the pixel unit. The calculation formula for the parallel line spacing is shown in the following formula (2). The conversion formula for the reference size is shown in the following formula (3):

[0054]

[0055] L real = k·d pixel ·cosθ (3);

[0056] Among them, a1, b1, c1 are the equation coefficients of the first chicken cage railing straight line in the image coordinate system obtained by Hough transform detection, a2, b2, c2 are the equation coefficients of the second parallel railing, x, y are the image pixel coordinates, d pixel is the pixel distance between the two parallel railings in the image, k is the calibration coefficient of the camera (mm / pixel), which is measured by a calibration plate with a known physical size, and θ is the angle between the optical axis of the camera and the chicken cage plane (obtained through the IMU sensor).

[0057] S22: Perform principal component analysis (PCA) on the binary contour of the laying hen. Let the eigenvalues corresponding to the eigenvectors be λ1 ≥ λ2, then the axial length l of the laying hen contour in the image pixel (unit: pixel) is calculated as shown in formula (4) below, and the actual body length l of the laying hen is obtained by converting with the preset chicken coop size real , l real is calculated as shown in formula (5) below:

[0058]

[0059] where λ1 is the maximum eigenvalue of the covariance matrix of the binary contour of the laying hen (unit: pixel 2 ), reflecting the degree of dispersion of the contour in the main axis direction.

[0060] S23: Then map the actual body length to the equivalent body weight according to the power-law relationship between the body length and body weight of the preset laying hen breed, and use the equivalent body weight and actual body length as the first size feature. The power-law relationship between body length and body weight is shown in formula (6) below:

[0061]

[0062] where α and β are preset breed constants, and W is the body weight.

[0063] S24: Calculate the number of contours N of the effective first feature by the background difference method. When N ≤ N th , perform convex hull detection on the head contour of the laying hen according to the first feature and the body structure of the laying hen, extract the pixel area that satisfies H ∈ [0, 30] in the HSV color space as the comb ROI, and calculate the comb area ratio R comb , the average saturation S of the comb avg and the average brightness V of the comb avg . When the following conditions shown in formula (7) are simultaneously satisfied, mark the laying hen corresponding to the first feature as a sexually mature individual, and additionally activate 630nm red light supplementary lighting according to the sexual maturity ratio P of the first feature in the second feature mature ; formula (7) is as follows:

[0064] R comb > 15% ∧ S avg > 60 ∧ V avg > 70 (7).

[0065] Specifically, the calculation formula of the comb area ratio R comb is as shown in formula (8) below:

[0066]

[0067] where A combis the pixel area of the chicken comb region, in square pixels, and is obtained by calculating the HSV red region mask; A total is the pixel area of the whole body contour of the laying hen, in square pixels, and is obtained by binary contour filling.

[0068] Average saturation S of the chicken comb avg The calculation formula of is shown in the following formula (9), and the average lightness V of the chicken comb avg is shown in the following formula (10):

[0069]

[0070] where S i is the saturation value of the i-th pixel in the chicken comb ROI, and V i is the lightness value of the i-th pixel in the chicken comb ROI.

[0071] Specifically, the proportion of sexual maturity where M is the number of sexually mature individuals, and K is the number of the first features corresponding to the second feature, that is, the number of laying hens in the chicken coop. According to P mature Adjust the daily light time T light , T light The calculation formula of is shown in the following formula (11):

[0072]

[0073] When P mature ≥50%, activate the 630nm red light supplementary lighting additionally.

[0074] Among them, step S30 also includes the following steps:

[0075] S31: The camera continuously collects image information according to the preset interval time, and then calculates the standard deviation σ of the centroid coordinates of the contour of the first feature. When σ is less than the preset standard deviation threshold, the light intensity is increased to 30 - 50 Lux. The calculation formula of σ is shown in the following formula (12):

[0076]

[0077] where x i , y i is the centroid coordinate of the i-th chick, is the average centroid position of the chicken flock,

[0078] At the same time, count the pixel change amount ΔA of the first feature within the preset unit time, and adjust the light time according to the pixel change amount ΔA of the first feature. The calculation formula of ΔA is shown in the following formula (13):

[0079]

[0080] Among them, A t is the total pixel area of the contour in the t-th frame image.

[0081] Among them, the breeding stages of laying hens include the brooding period, the growing period, and the laying period. Combining the corresponding size ranges of different stages, the first size feature is classified, and for laying hens in different breeding stages, different monitoring is carried out according to the aggregation behavior and activity level.

[0082] Specifically, brooding period (0 - 6 weeks old): The body length of the first size feature < 100mm, with a focus on aggregation behavior and basic activity level;

[0083] Growing period (7 - 18 weeks old): 100mm ≤ the body length of the first size feature < 180mm, monitoring pecking behavior and exercise intensity.

[0084] Laying period (after 19 weeks old): The body length of the first size feature ≥ 180mm, analyzing the time of perching and the willingness to lay eggs.

[0085] Calculate the standard deviation σ of the centroid distribution of the chicken flock. If σ < the preset minimum standard deviation (50 pixels), it is determined as aggregation.

[0086] When the laying hens are in the brooding period, adjust the light distribution according to σ; adjust the light time according to ΔA. Specifically, increase the light intensity corresponding to the aggregation area (strong light disperses chicks). If the activity level ΔA < 5% / minute, extend the light by 1 - 2 hours / day.

[0087] When the laying hens are in the growing period, if σ is less than the preset minimum standard deviation and ΔA is greater than the preset maximum movement change, open a temporary monitoring window for a preset time, detect the head movement trajectory corresponding to the first feature through YOLOv5, count the number of times the head movement speed is greater than the preset maximum head movement speed as the first number. If the first number is greater than the preset maximum number, increase the light intensity, and open the temporary monitoring window for a preset time again to count the number of head movements as the second number. If the second number is less than the first number, open the temporary monitoring window for a preset time again to count the number of head movements. If the second number is not less than the first number or the number of times the temporary monitoring window is opened reaches the preset maximum number, mark the first feature with a head movement speed greater than the preset maximum head movement speed in the image information, and generate a pecking prompt according to the image information and the acquisition position of the camera and send it to the management terminal.

[0088] When the laying hens are in the breeding period, if ΔA is less than the preset minimum movement change, the acquisition time of the image information is taken as the first start time, the time when ΔA is not less than the preset minimum movement change after the first start time is taken as the first end time, the difference between the first start time and the first end time is taken as the perching time, and the lighting time or intensity is adjusted according to the perching time and perching frequency. Specifically, when the perching time < 1 hour, the current lighting is maintained; when the perching time ≥ 1 hour, the intensity is increased (to stimulate activity); when the perching frequency > 3 times / hour, the lighting is extended by 0.5 hour / day (to promote egg production).

[0089] It also includes the steps of cross-regional lighting impact analysis and zoning adjustment:

[0090] S51: Establish a three-dimensional space topological model according to the positional relationship of each breeding area;

[0091] Specifically, according to the three-dimensional coordinate set V={(x i , y i , z i )} (where z i represents the floor height), a three-dimensional model is established, and then the adjacent area determination condition Adj(i, j) is defined. The calculation formula of Adj(i, j) is shown in the following formula (14):

[0092]

[0093] where D max is the maximum influence distance (default 5m), i and j are breeding area identifiers, and formula (14) is used to determine whether areas i and j are adjacent.

[0094] S52: Calculate the lighting influence intensity and lighting influence depth of each breeding area on adjacent breeding areas according to the lighting intensity of each breeding area.

[0095] Specifically, the calculation formula of the lighting intensity influence intensity I impact is shown in the following formula (15):

[0096]

[0097] where γ is the lighting attenuation coefficient; n is the number of adjacent areas of area i; p j is the medium light transmittance coefficient of area j; I j is the lighting intensity of area j; A j is the lighting area of area j; l ij is the distance between area i and area j; θ ij is the incident angle of light from area j to area i;

[0098] The lighting influence depth D infuluenceThe calculation formula is as shown in formula (16):

[0099]

[0100] Among them, D wall is the physical barrier distance, and I source is the initial light intensity of the light source; I threshold is the effective influence threshold (the specific value needs to be given by the administrator).

[0101] S53: Divide a transition zone outside the aquaculture area according to the light influence depth.

[0102] Specifically, set the width W buffer ,

[0103] S54: Obtain the light exposure time of the aquaculture areas adjacent to the transition zone, calculate the combined light intensity of different light exposure times in the transition zone, and adjust the aquaculture species or aquaculture stage according to the calculation results.

[0104] Specifically, calculate the combined light exposure time in the transition zone according to formula (17), and formula (17) is as follows:[[]]END]]

[0105]

[0106] Among them, s is the number of types of light exposure times participating in the synthesis (that is, different light exposure times in different adjacent areas); w m is the weight of the m-th type of light exposure time (which needs to be set by the administrator), and T m is the m-th type of light exposure time.

[0107] Specifically, adjust the priority weight according to different aquaculture stages, and determine the new aquaculture stage of the transition zone according to formula (18), and formula (18) is as follows:[[]]END]]

[0108]

[0109] Among them, q is different aquaculture stages, f(q) is an evaluation function related to aquaculture stage q, and P q is the preset weight of aquaculture stage q. f(q) is constructed based on the growth rate, health status, and egg production performance indicators of laying hens at aquaculture stage q. The calculation formula of f(q) is as shown in formula (19):

[0110] f(q) = ω1 × growth rate q + ω2 × health index q + ω3 × egg production performance indicator q (19),

[0111] Wherein, ω1 + ω2 + ω3 = 1, and for the brooding period, ω1 = 0.6, ω2 = 0.3, ω3 = 0.1; for the growing period, ω1 = 0.4, ω2 = 0.3, ω3 = 0.3; for the laying period, ω1 = 0.1, ω2 = 0.2, ω3 = 0.7.

[0112] If there are multiple breeding stages such that P q ·f(q) has the same value, the brooding period is preferentially selected for adjustment, followed by the growing period, and finally the laying period.

[0113] This embodiment further includes an image recognition-based light intensity grading control system for laying hen breeding that uses the image recognition-based light intensity grading control method for laying hen breeding.

[0114] During specific implementation, a farm uses an image recognition-based light intensity grading control system for laying hen breeding that uses the image recognition-based light intensity grading control method for laying hen breeding to manage the chicken farm. The multiple breeding areas of the farm are arranged neatly, and cameras are installed above each area. At the same time, the mobile phone used by the breeder is used as the management terminal. A batch of newly hatched chicks is placed in one of the breeding areas. After the chicks enter the breeding area, the cameras start to work and continuously collect image information.

[0115] The image information collected by the cameras is processed to identify the contour features of the chicks (the first feature) and the contour features of the chicken coops (the second feature). The Hough transform is used to detect the chicken coop rails, and the distance between parallel lines is obtained as the reference size. Then, the axial length of the chick contour in the image is calculated through principal component analysis (PCA), and the actual body length of the chicks is calculated by combining the chicken coop size. At the same time, the number of chicks is determined by the background difference method, and the convex hull detection is performed on the head contour of the chicks to analyze the relevant features of the chicken combs to determine whether there are sexually mature individuals. After calculation, the first size feature body length of this batch of chicks is all less than 100 mm, which conforms to the characteristics of the brooding period.

[0116] The cameras continuously collect images at preset intervals, and calculate the standard deviation of the centroid coordinates of the chick contours and the pixel change amount per unit time. If it is found that the standard deviation of the chick centroid coordinates is less than the preset standard deviation threshold, the system automatically increases the light intensity of this breeding area to 30 - 50 Lux to disperse the gathered chicks; if it is statistically found that the activity amount of the chicks per unit time is less than 5% / minute, the system will extend the light time by 1 - 2 hours / day to promote the activities and feeding of the chicks.

[0117] As the chicks grow and enter the growing period (7 - 18 weeks old), some growing chickens are transferred to a dedicated growing breeding area. In this area, the cameras also collect images in real time. Through the analysis of the image information, it is determined that the first size feature body length of the growing chickens is between 100 mm and 180 mm, which conforms to the growing period standard.

[0118] During the rearing period, pecking behavior and exercise intensity are mainly monitored. The system continuously calculates the standard deviation of the centroid distribution of the chicken flock and the change in chicken movement. If it is found that the standard deviation of the centroid distribution is less than the preset minimum standard deviation (50 pixels), and the change in chicken movement is greater than the preset maximum movement change, the system immediately opens a temporary monitoring window for a preset time (usually half a minute, which can be specifically set by the breeder through the management terminal), and uses YOLOv5 to detect the head movement trajectory of the rearing chickens. The number of times the head movement speed is greater than the preset maximum movement speed (the first number) is counted. If the first number is greater than the preset maximum number, the system increases the light intensity and opens the temporary monitoring window again to count the number of head movements (the second number). If the second number is less than the first number, the temporary monitoring window is continuously opened for counting; if the second number is not less than the first number or the number of times the temporary monitoring window is opened reaches the preset maximum number (default is 3 times, which can be specifically set by the breeder through the management terminal), the system marks the rearing chickens with abnormal head movement speed in the image information, generates a pecking prompt based on the image information and the camera acquisition position, and sends it to the management terminal, so that the breeder can intervene in time to reduce mutual harm among chickens.

[0119] When the laying hens grow to 19 weeks old, they enter the laying period and are placed in the laying breeding area. The camera continuously collects images and analyzes the size characteristics, behavior characteristics, etc. of the laying hens. If it is detected that the change in the movement of the laying hens is less than the preset minimum movement change, the system records the image information acquisition time as the first start time. When the time when the movement change is not less than the preset minimum movement change appears, it is recorded as the first end time, and the difference between the two is the perching time.

[0120] Adjust the light according to the perching time and perching frequency. If the perching time is less than 1 hour, maintain the current light; if the perching time is greater than or equal to 1 hour, increase the light intensity to stimulate the activities of the laying hens; if the perching frequency is greater than 3 times / hour, extend the light time by 0.5 hours / day to promote egg production of the laying hens. For example, one day the system detects that the perching frequency of the laying hens in a certain breeding area reaches 4 times / hour, and immediately automatically extends the light time of this area by 0.5 hours / day to increase the egg production rate.

[0121] Different breeding areas in the farm are distributed in different positions, and there is a situation of cross-regional light influence. The system first establishes a three-dimensional space topology model based on the three-dimensional coordinates (including floor height information) of each breeding area, and judges the adjacent area relationship through formula (14).

[0122] Then calculate the light influence intensity and light influence depth of each area. For example, if a brooding area and a rearing area are adjacent, and the light in the rearing area is stronger. The system calculates the light influence intensity of the rearing area on the brooding area through formula (15), and calculates the light influence depth through formula (16). If it is found that the light influence depth is relatively large and has an adverse impact on the edge of the brooding area, the system divides a transition zone outside the brooding area according to the light influence depth.

[0123] After setting the width of the transition zone, obtain the lighting time of the adjacent areas (brooding area and growing area) of the transition zone, and calculate the combined lighting time of the transition zone through formula (17). Then adjust the priority weights according to different breeding stages, and use formulas (18) and (19) to determine the new breeding stage of the transition zone. For example, it is found through calculation that the weight of the brooding stage is relatively high, and the system gives priority to adjusting the breeding stage of the transition zone to the brooding stage to ensure that the laying hens grow in a suitable environment, while improving the lighting utilization efficiency and breeding benefits.

[0124] The above are only embodiments of the present invention, and common knowledge such as the specific structures and characteristics known in the solutions is not described in detail here. It should be pointed out that for those skilled in the art, without departing from the structure of the present invention, several deformations and improvements can be made, which should also be regarded as the protection scope of the present invention, and these will not affect the implementation effect of the present invention and the practicability of the patent. The protection scope required by this application shall be subject to the content of its claims, and the specific implementation manners described in the specification can be used to interpret the content of the claims.

Claims

1. A method for hierarchical control of lighting in laying hen breeding based on image recognition, characterized in that, Including the following steps: S10: Cameras are set in several breeding areas. The breeding areas are associated with the stored breeding species and breeding stages. The breeding species are associated with the stored color features. The breeding stages are associated with the stored size features and behavior features; The cameras are used to collect image information of laying hens in the breeding areas; S20: Identify and extract the contour feature of the laying hen in the image information as the first feature, and identify and extract the contour feature of the chicken coop in the image information as the second feature; Obtain the size ratio between the first feature and the second feature, and calculate the size of the laying hen in combination with the preset chicken coop size. Calculate the size corresponding to the first feature as the first size feature; Identify and extract the color feature corresponding to the first feature in the image information as the first color feature; S30: Take the acquisition time of the image information as the first time, take the positional relationship between the first feature and the second feature as the first relationship, process the change of the first relationship at the first time as behavior information, and obtain the behavior feature of the laying hen as the first behavior feature according to the behavior information; S40: Compare the first size feature, the first color feature, and the first behavior feature corresponding to the first contour feature with the breeding species and breeding stages associated with the breeding area where the laying hen is located. According to the comparison result, match a breeding area for the laying hen as the transfer area. Generate transfer information according to the transfer area, the breeding area where the laying hen is located, the position of the laying hen in the first image, and the first color feature, and send it to the management terminal; Set the light intensity and light time in the breeding area according to the breeding species and breeding stages associated with the breeding area.

2. The method for grading control of lighting in laying hen breeding based on image recognition according to claim 1, wherein: When calculating the first size feature, first perform a Hough transform detection on the second feature, and extract the parallel line spacing of the chicken coop railings as the reference size; The straight line equation obtained after the parallel lines of the chicken coop railings in the image information are detected by the Hough transform is shown in the following formula (1). Calculate the parallel line spacing of the chicken coop railings according to the pixel unit. The calculation formula of the parallel line spacing is shown in the following formula (2): Among them, a1, b1, c1 are the equation coefficients of the first chicken coop railing straight line in the image coordinate system detected by the Hough transform, a2, b2, c2 are the equation coefficients of the second parallel railing, x, y are the image pixel coordinates, and d pixel is the pixel distance between the two parallel railings in the image; Then calculate the ratio of the axial maximum length of the first feature to the chicken coop railing spacing, and convert it to the actual body length of the laying hen in combination with the preset chicken coop size; Then, according to the comparison table of the preset laying hen breed, body length, and weight, map the actual body length to the equivalent weight, and use the equivalent weight and the actual body length as the first size feature.

3. The method for grading and controlling the lighting in layer chicken breeding based on image recognition according to claim 2, wherein: After obtaining the first size feature, determine whether the laying hens are mature according to the first size feature, which specifically includes the following steps: calculate the contour number N of the effective first feature through the background difference method. When N ≤ N th perform convex hull detection on the head contour of the laying hen according to the first feature and the body structure of the laying hen, extract the pixel region satisfying H ∈ [0, 30] in the HSV color space as the comb ROI, and calculate the comb area ratio R comb , the average saturation S of the comb aυg and the average brightness V of the comb aυg . When the conditions shown in the following formula (7) are simultaneously satisfied, mark the laying hen corresponding to the first feature as a sexually mature individual, and additionally activate 630 nm red light supplementary lighting according to the sexual maturity ratio P of the first feature in the second feature mature . The formula (7) is as follows: R comb > 15% ∧ S aυg > 60 ∧ V aυg > 70 (7).

4. The method for grading control of lighting in laying hen breeding based on image recognition according to claim 3, wherein: The camera continuously collects image information at preset intervals, and then calculates the standard deviation σ of the contour centroid coordinates of the first feature. When σ is less than the preset standard deviation threshold, increase the light intensity. The calculation formula of σ is shown in the following formula (12): where x i , y i are the centroid coordinates of the i-th chick, is the average centroid position of the chicken flock, At the same time, count the pixel change amount ΔA of the first feature within the preset unit time, and adjust the light time according to the pixel change amount ΔA of the first feature. The calculation formula of ΔA is shown in the following formula (13): Among them, A t is the total pixel area of the contour in the t-th frame image.

5. The method for hierarchical control of lighting in laying hen breeding based on image recognition according to claim 4, wherein: The breeding stages of the laying hens include the brooding period, the growing period, and the laying period. Combine the corresponding size ranges of different stages to classify the first size feature, and perform different monitoring on the laying hens in different breeding stages according to the aggregation behavior and activity level; When the laying hens are in the brooding period, adjust the light distribution according to σ; Adjust the light time according to ΔA; When the laying hens are in the growing period, if σ is less than the preset minimum standard deviation and ΔA is greater than the preset maximum movement change, a temporary monitoring window is opened for a preset time. The head movement trajectory corresponding to the first feature is detected by YOLOv5, and the number of times the head movement speed is greater than the preset maximum head movement speed is counted as the first number. If the first number is greater than the preset maximum number, the light intensity is increased, and the temporary monitoring window is opened again for a preset time to count the number of head movements as the second number. If the second number is less than the first number, the temporary monitoring window is opened again to count the number of head movements. If the second number is not less than the first number or the number of times the temporary monitoring window is opened reaches the preset maximum number, the first feature with a head movement speed greater than the preset maximum head movement speed is marked in the image information, and an inter-pecking prompt is generated based on the image information and the acquisition position of the camera and sent to the management terminal; When the laying hens are in the laying period, if ΔA is less than the preset minimum movement change, the acquisition time of the image information is used as the first start time, the time when ΔA is not less than the preset minimum movement change after the first start time is used as the first end time, and the difference between the first start time and the first end time is used as the perching time. The light time or intensity is adjusted according to the perching time and perching frequency.

6. The method for hierarchical control of lighting in laying hen breeding based on image recognition according to claim 5, wherein: It also includes a cross-regional light influence analysis and zoning adjustment step: S51: Establish a three-dimensional space topology model according to the positional relationship of each breeding area; S52: Calculate the light influence intensity and light influence depth of the breeding area on the adjacent breeding area according to the light intensity of each breeding area; S53: Divide a transition zone outside the breeding area according to the light influence depth; S54: Obtain the light time of the breeding area adjacent to the transition zone, calculate the composite light intensity of different light times in the transition zone, and adjust the breeding type or breeding stage of the transition zone according to the calculation result.

7. The method for hierarchical control of lighting in laying hen breeding based on image recognition according to claim 6, wherein: Adjust the priority weight according to different breeding stages, and determine the new breeding stage of the transition zone according to formula (18). Formula (18) is as follows: Among them, q represents different breeding stages, f(q) represents an evaluation function related to the breeding stage q, and P q is the preset weight for the breeding stage q.

8. The method for hierarchical control of lighting in laying hen breeding based on image recognition according to claim 7, characterized in that: When calculating the new breeding stage, if there are multiple breeding stages such that P q ·f(q) has the same value, the brooding period is preferentially selected for adjustment, followed by the growing period, and finally the laying period.

9. A lighting grading control system for laying hen breeding based on image recognition, characterized in that, The light grading control method for laying hen breeding based on image recognition according to any one of claims 1-8 is used.

Citation Information

Patent Citations

  • Intelligent illumination system for layer culturing and illumination control method

    CN102843833A

Cited By

  • Laying hen feeding scheme adjusting method and system based on moulting image recognition

    CN120853826A

  • Egg-laying hen feeding scheme adjustment method and system based on feather replacement image recognition

    CN120853826B