Cow fly knot unhairing detection device and detection method
By using a multimodal data fusion method in the cattle hock hair removal detection device and combining image and pressure data for comprehensive judgment, the problem of insufficient detection accuracy in the prior art is solved, and high accuracy detection and evaluation of the cattle hock hair removal status is achieved.
Patent Information
- Application Number
- CN202510480720.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-04-17
- Publication Date
- 2025-05-13
- Estimated Expiration
- 2045-04-17
AI Technical Summary
The prior art is difficult to accurately detect the hair removal status of cattle hocks, resulting in incomplete information, errors in judgment, and weak data collection capabilities in complex farm environments.
By designing a cattle hock hair removal detection device, using a multimodal data fusion method, combining an image acquisition unit and an array pressure sensing unit, multi-dimensional image data acquisition and hoof pressure data acquisition are performed, and texture feature extraction and hair removal rate calculation are used for data using an analysis reasoning unit, and comprehensive judgment is made based on pressure data.
It improves the accuracy of determining the status of Hock hair removal, reduces the rate of misjudgment, and is especially more sensitive to early hair removal or local mild symptoms. It is suitable for large-scale breeding farms and reduces labor costs.
Smart Images

Figure CN119969974A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of smart breeding and intelligent equipment, and relates to but is not limited to a device and method for detecting hair loss at a bovine hock. Background Art
[0002] Hair loss is often an early sign of health problems in cattle, which may be caused by skin diseases, parasitic infections, malnutrition or environmental stress. By timely detecting hair loss, ranchers can detect and intervene in these potential problems as early as possible, thereby protecting the health of cattle and improving their production performance and reproductive efficiency.
[0003] The hock is a key part that directly contacts the ground when the cattle lie down. It is subjected to friction and pressure for up to 12-14 hours a day, and is therefore extremely susceptible to physical wear. If the bedding material is too hard or the environment is not hygienic, the risk of hock hair loss will increase significantly. Compared with other parts, hock hair loss can more intuitively reflect the quality of the bedding, environmental hygiene, and feeding management level. Because of its clear position and easy observation, it is an ideal indicator for monitoring and quantifying hair loss conditions. The detection of cattle hock hair loss plays an irreplaceable role in maintaining productivity, reducing medical costs, protecting individual value, optimizing the feeding environment, and improving management level.
[0004] However, the temperature measurement camera based on thermal imaging can only provide temperature data and cannot fully reflect other key features of the target object. In the application scenario of cattle hock hair loss detection, relying solely on temperature characteristics may lead to incomplete information and affect the accuracy of the overall judgment. Secondly, in the presence of water, dirt or suppuration in the hock area, the thermal imaging of the temperature sensor may not accurately reflect the actual temperature. Finally, the farm environment is complex, and the livestock activity area is often in an outdoor environment. The complex and changeable environmental interference sources will significantly reduce the data collection capabilities of the temperature measurement camera, resulting in serious distortion of the collected data. These external factors will interfere with the measurement results of the sensor, resulting in distorted temperature readings, which in turn lead to misjudgment.
[0005] Therefore, there is an urgent need to provide a detection device and a detection method that can accurately detect the hair loss status of cattle hocks. Summary of the invention
[0006] In view of this, an embodiment of the present invention provides a cattle hock hair loss detection device and detection method, aiming to improve the accuracy of determining the hock hair loss status by using a multimodal data fusion method to address the deficiencies in the prior art.
[0007] The technical solutions of the embodiments of the present invention are as follows: In the first aspect, an embodiment of the present invention provides a bovine hock hair removal detection device, comprising: a device body in a groove structure; two groups of vertical adjustment units, an image acquisition unit and a light source group respectively arranged at relative positions on both sides of the groove; a synchronization control unit and an analysis and reasoning unit arranged on either side of the groove; and an array pressure sensing unit arranged at the bottom of the groove; wherein: A vertical adjustment unit, used to adjust the acquisition position of the image acquisition unit by sliding up and down; An image acquisition unit is deployed in the central area of the vertical adjustment unit and is used to collect multi-dimensional image data of the hock area of the cattle leg passing through the detection device in real time in combination with the light source group; A light source group, including four time-sharing excitation light sources, which are respectively arranged around the vertical adjustment unit and used to supplement the light source when the image acquisition unit captures the picture; An array pressure sensing unit is used to collect pressure data of four cow hooves in real time while the image acquisition unit is acquiring images, and transmit the data to the analysis and reasoning unit; A synchronization control unit, used to control the exposure timing of the image acquisition unit, and synchronously control the opening or closing of the four time-sharing excitation light sources during image acquisition; The analysis and reasoning unit is used to extract texture features from the preprocessed multi-dimensional image data, calculate the hock shedding rate, and determine the degree of hock shedding in combination with the result of hoof pressure abnormality measurement based on the pressure data.
[0008] In some embodiments, the imaging image is processed by the built-in deep vision algorithm in the image acquisition unit to automatically identify the cow hock region; when it is identified that the cow hock region is located in the horizontal center of the imaging image, the synchronization control unit is awakened.
[0009] In some embodiments, the synchronization control unit is a hardware-level synchronization controller based on FPGA to achieve multi-sensor clock domain synchronization; and a double-buffered DMA architecture is used to ensure phase locking between image acquisition and light source pulses.
[0010] In some embodiments, the device body also integrates a network unit for uploading the collected image data, pressure data and hair loss detection analysis to a cloud database in real time; at the same time, the device body is also externally connected to an RFID antenna for identifying the individual identity of the cattle while detecting hair loss at the hock.
[0011] In a second aspect, an embodiment of the present invention provides a method for detecting hair loss at the hock of a cow. The device for detecting hair loss at the hock of a cow described in the first aspect is deployed in a passage that the cow must pass through, and detection is performed by the following steps: After the image acquisition unit captures the image of the cow's legs, the synchronization control unit is awakened when the deep vision algorithm is used to identify that the cow's hock area is located in the horizontal center of the imaging image; the synchronization control unit controls the exposure timing of the image acquisition unit, and synchronously controls the opening or closing of four time-sharing excitation light sources to collect multi-dimensional image data; the multi-dimensional image data is pre-processed and then transmitted to the analysis and reasoning unit; while the image acquisition unit is collecting images, the array-type pressure sensing unit collects the pressure data corresponding to the four cow hooves in real time and transmits it to the analysis and reasoning unit; the analysis and reasoning unit extracts texture features from the pre-processed multi-dimensional image data, calculates the hock hair loss rate, and determines the degree of hock hair loss based on the result of hoof pressure abnormality measurement based on the pressure data.
[0012] In some embodiments, the four time-sharing excitation light sources are light source 1, light source 2, light source 3, and light source 4, which are distributed around the image acquisition unit and are used to supplement the light source from four angles; the acquisition process of the multi-dimensional image data is specifically as follows: When the hock area of the cattle is located in the horizontal center position of the imaging image, the synchronous control unit controls all four time-sharing excitation light sources to turn on, triggering the image acquisition unit to collect the full light source image; the synchronous control unit turns off light source No. 2, light source No. 3, and light source No. 4, waits for the afterglow to be eliminated, and triggers the image acquisition unit to collect the first single light source image; the synchronous control unit turns off light source No. 1, turns on light source No. 2, waits for the afterglow to be eliminated, and triggers the image acquisition unit to collect the second single light source image; the synchronous control unit turns off light source No. 2, turns on light source No. 3, waits for the afterglow to be eliminated, and triggers the image acquisition unit to collect the third single light source image; the synchronous control unit turns off light source No. 3, turns on light source No. 4, waits for the afterglow to be eliminated, triggers the image acquisition unit to collect the fourth single light source image, and turns off light source No. 4.
[0013] In some embodiments, the preprocessed multidimensional image includes a grayscale full-light source image and four single-light source images; the analysis and reasoning unit extracts texture features from the preprocessed multidimensional image data, calculates the hock hair removal rate, and determines the degree of hock hair removal in combination with the pressure data collected by the array pressure sensing unit, including: using local binary patterns to calculate texture features for all pixels in the full-light source image and each of the single-light source images; based on the texture features, respectively calculating the global image difference matrix C of the full-light source image and the image difference matrix C between any two single-light source images. ij , i, j range from 1 to 4; for the global image difference matrix C and all image difference matrices C ijPerform element-by-element summation, record the element points with a sum value greater than or equal to 4 as 1 to represent the hair, and record the element points with a sum value less than 4 as 0 to represent the skin, to obtain a fusion matrix Z; calculate the proportion of element points representing the skin in the fusion matrix Z and use it as the hock hair loss rate; determine the pressure difference between the pressure value of the hoof close to the camera and the pressure average of the other three hoofs based on the collected pressure data; perform weighted summation of the hock hair loss rate and the pressure difference to obtain a comprehensive score; based on the comprehensive score and a specific coefficient range threshold, determine the degree of hock hair loss according to a preset judgment rule.
[0014] In some embodiments, based on the texture features, the global image difference matrix C of the full light source image and the image difference matrix C between any two single light source images are calculated respectively. ij , including: for the full light source image and each single light source image, calculating the local binary pattern LBP value of each pixel; binarizing the LBP value of each pixel in the full light source image based on a set threshold value to generate a global image difference matrix C of the full light source image; comparing the four single light source images in pairs, calculating the comprehensive difference of the same pixel in any two single light source images, and obtaining a corresponding difference image; wherein the difference image reflects the intensity of the shadow change under the two light sources; the comprehensive difference is determined by weighted summing the LBP texture difference and grayscale difference of the same pixel in the two single light source images; for each difference image, binarizing the image by a set threshold value to generate an image difference matrix C ij .
[0015] In some embodiments, for each single light source image, the LBP value of each pixel is calculated by the following formula: ; in, ( ) is a sign function, It's pixels The gray value of It's pixels The gray value of the kth pixel in the 3×3 neighborhood of ; For the full light source image, the LBP value of each pixel is calculated by the following formula: ; in, is the pixel in the full light source image The gray value of yes The grayscale value of the pth pixel in the 3×3 neighborhood of .
[0016] The beneficial effects brought about by the technical solution provided by the embodiment of the present invention include at least: The present invention discloses a device and method for detecting hair loss at the hock of cattle. The device and method can quickly determine whether the hock is hair lost by using multiple image information and the pressure distribution of the cattle hoof. Compared with similar technologies, the present invention has the following advantages: (1) Non-invasive design to reduce animal stress: The device can be placed in the cowshed passage or milking parlor to complete the detection when the cows are walking or standing naturally, without the need for additional driving or stopping, which meets the animal welfare requirements; (2) Strong ability to adapt to the environment: It only needs to collect multiple images of cattle hocks through the camera, which is less affected by environmental factors. It is equipped with cattle hoof pressure distribution detection, which has good detection effect; (3) Image + pressure dual-dimensional analysis: Image analysis is combined with hoof pressure distribution monitoring to form a cross-validation, which significantly reduces the misjudgment rate and is especially sensitive to early hair loss or local mild symptoms. (4) Efficient and automated processing, saving labor costs: Using deep learning models (such as convolutional neural networks) to analyze image features in real time, eliminating the need for manual inspection of each animal, which is suitable for large-scale farms; (5) Low cost, easy deployment, and strong compatibility: It uses standardized camera and pressure sensor components to support the renovation and upgrading of existing cattle shed facilities without the need to modify the breeding environment. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the drawings required for describing the embodiments. 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 work, among which: Figure 1 A front view of the hardware structure of a cattle hock hair removal detection device provided by an embodiment of the present invention; Figure 2 A right view of the hardware structure of the cattle hock hair removal detection device provided by the embodiment of the present invention; Figure 3 A top view of the hardware structure of a cattle hock hair removal detection device provided by an embodiment of the present invention; Figure 4 Schematic diagram of the process of detecting hair loss in the hock of cattle provided by the embodiment of the present invention
[0018] Description of reference numerals: 1- Equipment body; 2- Image acquisition unit; 3- Array pressure sensing unit; 4- Light source group; 5- Synchronous control unit; 6- Analysis and reasoning unit; 7- Vertical adjustment unit. DETAILED DESCRIPTION
[0019] In order to make the purpose, technical scheme and advantages of the embodiments of the present invention clearer, the technical scheme in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, rather than all the embodiments. The following embodiments are used to illustrate the present invention, but are not used to limit the scope of the present invention. Based on the embodiments in the present invention, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of the present invention.
[0020] In the following description, reference is made to “some embodiments”, which describe a subset of all possible embodiments, but it will be understood that “some embodiments” may be the same subset or different subsets of all possible embodiments and may be combined with each other without conflict.
[0021] It should be pointed out that the terms "first\second\third" involved in the embodiments of the present invention are only used to distinguish similar objects and do not represent a specific ordering of the objects. It can be understood that "first\second\third" can be interchanged in a specific order or sequence where permitted, so that the embodiments of the present invention described here can be implemented in an order other than that illustrated or described here.
[0022] Those skilled in the art will appreciate that, unless otherwise defined, all terms (including technical and scientific terms) used herein have the same meaning as those generally understood by those skilled in the art in the field to which the embodiments of the present invention belong. It should also be understood that terms such as those defined in general dictionaries should be understood to have meanings consistent with those in the context of the prior art, and will not be interpreted with idealized or overly formal meanings unless specifically defined as here.
[0023] Hair loss in the hock of cattle is usually related to local inflammation or skin lesions, which may cause the cattle to adjust their standing posture due to pain or discomfort to reduce the weight on the affected limb. This compensatory behavior will be directly reflected in the pressure distribution of the cattle's hooves, which is manifested as the pressure data of the affected hoof contacting the ground is significantly lower than that of the healthy hoof. The present invention aims to establish a correlation model between physiological abnormalities and behavioral compensation by synchronously analyzing the visual characteristics of the hock hair loss area and the corresponding hoof pressure data, thereby breaking through the limitations of single visual detection. This multimodal data fusion method can not only improve the accuracy of determining the hock hair loss status, but also provide a quantitative basis for early pain identification, which is of great value to improving animal welfare monitoring technology.
[0024] Figure 1 A schematic diagram of the structure of a cattle hock hair removal detection device provided by an embodiment of the present invention is shown in FIG. Figure 1As shown, the detection device comprises: a device body 1 in a groove structure; two groups of vertical adjustment units 7, an image acquisition unit 2 and a light source group 4 respectively arranged at opposite positions on both sides of the groove; a synchronization control unit 5 and an analysis and reasoning unit 6 arranged on either side of the groove; and an array pressure sensing unit 3 arranged at the bottom of the groove; wherein: A vertical adjustment unit 7, used to adjust the acquisition position of the image acquisition unit by sliding up and down; The image acquisition unit 2 is deployed in the central area of the vertical adjustment unit 7 and is used to collect multi-dimensional image data of the hock area of the cattle leg passing through the detection device in real time in combination with the light source group 4; The light source group 4 includes four time-sharing excitation light sources, which are respectively arranged around the vertical adjustment unit 7 and are used to supplement the light source when the image acquisition unit 2 captures the picture; The array pressure sensing unit 3 is used to collect the pressure data of four cow hooves in real time while the image acquisition unit 2 is acquiring images and transmit the data to the analysis and reasoning unit 6; A synchronization control unit 5, used to control the exposure timing of the image acquisition unit 2, and synchronously control the opening or closing of the four time-sharing excitation light sources during image acquisition; The analysis and reasoning unit 6 is used to extract texture features from the pre-processed multi-dimensional image data, calculate the hock shedding rate, and determine the degree of hock shedding based on the result of hoof pressure abnormality measurement based on the pressure data.
[0025] In implementation, the detection device can be placed in a passage that the cow must pass through, and the image acquisition unit 2 is equipped with a visible light camera. The image acquisition unit 2 and the light source group 4 are installed on the vertical adjustment unit 7, and the light source group 4 is installed around the visible light camera to illuminate the acquisition area from four angles. The vertical adjustment unit 7 is installed on the side of the groove of the device body 1, and can slide up and down to adjust the acquisition position of the image acquisition unit 2. When the cow passes through the passage, the image acquisition unit 2 and the light source group 4 are controlled by the synchronization control unit 5 to collect image data of multiple angles of the hock area in real time, that is, multi-dimensional image data, and transmit the processed image to the analysis and reasoning unit 6 for analysis and reasoning. The array pressure sensing unit 3 has a built-in array pressure sensing device and can send pressure information to the analysis and reasoning unit 6 in real time. The four time-sharing excitation light sources in the light source group 4 are controlled by the synchronization control unit 5 to turn on or off in sequence, provide light source to the visible light camera, and supplement the light source when capturing the picture. The synchronization control unit 5 controls the appropriate amount of time-sharing excitation light sources to synchronize data acquisition with the image acquisition unit 2, ensuring that the light source irradiation and image acquisition are synchronized while ensuring that the dual light source image has no crosstalk.
[0026] Preferably, the equipment body 1 can be adjusted according to the channel width. The main body adopts a steel structure and the surface is sprayed with an anti-corrosion and anti-rust coating. It can withstand a weight of 2000kg without deformation. A rubber shock-absorbing support is configured at the bottom to effectively reduce the friction between the equipment body and the ground, reduce the wear of the equipment caused by the vibration generated by the passing of cattle, and reduce the shaking of the equipment caused by the cattle.
[0027] Preferably, the image acquisition unit 2 uses a high-speed CMOS image sensor (1920×1080) equipped with an adaptive exposure algorithm to achieve dynamic image capture in the visible light band. It adopts an IP68 waterproof design, integrates a real-time image processing digital signal processing (DSP) chip, and transmits image data streams to the analysis and reasoning unit 6 through an Ethernet interface.
[0028] Preferably, the array pressure sensing unit 3 uses a high-precision pressure sensor, which can achieve low-latency acquisition of pressure sensing information and transmit the pressure information to the analysis and reasoning unit 6 via Ethernet. Furthermore, the array pressure sensing unit 3 uses a composite material to effectively control friction and wear resistance, can be disassembled for cleaning, and the pressure sensing unit can be adjusted in size.
[0029] Preferably, the light source group 4 is configured with four groups of high-brightness LED high-density light source arrays (color temperature 5600K±200K, adjustable illumination range 100-5000lux), with a service life of more than 35,000 hours at room temperature. A protective shell is provided around the light source array, which can be removed and cleaned. PWM dimming technology is used to achieve a response speed of 0.1ms (milliseconds). The LED high-density light source array integrates an optical diffuser and a polarizing filter, supports a pulse synchronization trigger mode (maintains microsecond synchronization accuracy with the image sensor), and effectively suppresses mirror reflection interference.
[0030] Preferably, the synchronization control unit 5 is a hardware-level synchronization controller based on a field programmable gate array (FPGA) to achieve multi-sensor clock domain synchronization. A double-buffered direct memory access (DMA) architecture is used to ensure phase locking between image acquisition and light source pulses. The synchronization control unit 5 uses RS485 communication and standard Modbus-RTU communication protocol to control the exposure timing of four time-sharing excitation light sources and the image acquisition unit 2. The exposure delay is less than 2ms, and the trigger accuracy is ±500μs (microseconds).
[0031] Preferably, the analysis and reasoning unit 6 integrates high-performance computing hardware and can deploy a multimodal data fusion algorithm stack to provide computing power for visual recognition, shadow calculation, pressure calculation, etc. Further, the analysis and reasoning unit 6 can deploy and run a visual recognition model and integrate a cattle hock hair removal calculation program to achieve rapid hock hair removal determination.
[0032] In some embodiments, the imaging image is processed by the built-in deep vision algorithm in the image acquisition unit to automatically identify the cow hock region; when it is identified that the cow hock region is located in the horizontal center of the imaging image, the synchronization control unit is awakened.
[0033] Here, the synchronization control unit can realize the trigger function through the pulse width modulation (PWM) control signal, and the microcontroller such as FPGA can be used to design a flexible trigger mechanism.
[0034] In some embodiments, the device body 1 also integrates a network unit for uploading the collected image data, pressure data and hair loss detection analysis to a cloud database in real time; at the same time, the device body 1 is also externally connected to a radio frequency identification (RFID) antenna for identifying the individual identity of the cattle while detecting hair loss at the hock.
[0035] The embodiment of the present invention also provides a method for detecting hair loss at the hock of a cow. The above-mentioned hair loss detection device for the hock of a cow is deployed in a passage that the cow must pass through. Figure 4 As shown, the detection is carried out through the following steps: Step S110, after the image acquisition unit captures the image of the cow's legs, the synchronization control unit is awakened when the depth vision algorithm identifies that the cow's hock area is located in the horizontal center of the imaging image.
[0036] Here, deep learning object detection models such as YOLO and SSD have a wide range of applications in object detection, including people detection, animal monitoring, etc. These models can be used to train an algorithm to identify the hock region of a cow.
[0037] It should be noted that the hock of cattle is located in the hind limbs, with the tarsal joint as the anatomical basis, and the angle is moderate, about 140°-150°. In image processing, whether the image is horizontally centered can be determined by reference lines, alignment tools, or smart reference lines. These methods can be implemented in the algorithm to determine whether the hock area is located in the center of the image. This ensures that the algorithm can accurately identify the hock area of cattle.
[0038] In step S120, the synchronous control unit controls the exposure timing of the image acquisition unit and synchronously controls the opening or closing of the four time-sharing excitation light sources to acquire multi-dimensional image data.
[0039] Here, four time-sharing excitation light sources are arranged around the image acquisition unit to illuminate the acquisition area from four angles. By controlling the exposure timing and the number of light sources, a full light source image and four single light source images can be obtained.
[0040] Step S130, pre-processing the multi-dimensional image data and transmitting it to the analysis and reasoning unit.
[0041] Here, image preprocessing includes but is not limited to denoising, contrast enhancement, grayscale, normalization, image registration, etc. In the embodiment of the present invention, the image acquisition unit collects five pieces of image information, namely T0, T1, T2, T3, and T4, and converts the collected images into grayscale images. , , , , .
[0042] Step S140, while the image acquisition unit is acquiring images, the array pressure sensing unit is collecting pressure data corresponding to the four hooves in real time and transmitting the pressure data to the analysis and reasoning unit; Step S150, extracting texture features from the preprocessed multi-dimensional image data through an analysis and reasoning unit, calculating the hock shedding rate, and determining the degree of hock shedding in combination with the result of hoof pressure abnormality measurement based on the pressure data.
[0043] Here, this multi-dimensional analysis method combines image processing and pressure sensing technology to provide objective and accurate analysis and detection results, which helps to promptly detect and deal with cattle health problems.
[0044] The method for detecting hair loss at the hock of cattle provided by the present invention realizes the quantitative detection of hair loss at the hock of cattle through the steps of multi-dimensional image acquisition, image preprocessing, image difference matrix calculation and hock hair loss rate calculation. Through the above steps, the hair area and skin area can be accurately identified, and the hock hair loss rate can be calculated. Thereby, accurate detection and evaluation of hair loss at the hock of cattle can be realized. This detection method has the advantages of being non-invasive, having strong adaptability to the environment, image + pressure dual-dimensional analysis, efficient automated processing, and low-cost and easy deployment. It is suitable for large-scale farms, and can timely discover and intervene in potential health problems, protect the health of cattle, and improve their production performance and reproductive efficiency.
[0045] In some embodiments, the four time-sharing excitation light sources are light source No. 1, light source No. 2, light source No. 3, and light source No. 4, respectively, which are distributed around the image acquisition unit and are used to supplement the light sources from four angles; the acquisition process of the multi-dimensional image data is specifically as follows: when the cow hock area is located in the horizontal center position of the imaging image, the synchronous control unit controls all four time-sharing excitation light sources to turn on, triggering the image acquisition unit to acquire the full light source image; the synchronous control unit turns off light source No. 2, light source No. 3, and light source No. 4, waits for the afterglow to be eliminated, and triggers the image acquisition unit to acquire the first single light source image; the synchronous control unit turns off light source No. 1, turns on light source No. 2, waits for the afterglow to be eliminated, and triggers the image acquisition unit to acquire the second single light source image; the synchronous control unit turns off light source No. 2, turns on light source No. 3, waits for the afterglow to be eliminated, and triggers the image acquisition unit to acquire the third single light source image; the synchronous control unit turns off light source No. 3, turns on light source No. 4, waits for the afterglow to be eliminated, triggers the image acquisition unit to acquire the fourth single light source image, and turns off light source No. 4.
[0046] Here, the key points of the acquisition process include the following aspects: Synchronous control: Ensure that the opening and closing of the light source is precisely synchronized with the operation of the image acquisition unit to avoid interference between light sources. Waiting to eliminate afterglow: When switching the light source, wait for a period of time to ensure that the afterglow of the previous light source disappears completely, thereby ensuring the accuracy of image acquisition. Multi-angle illumination: Through four light sources at different angles, the texture and shadow changes of the hock area under different lighting conditions are captured, providing rich information for subsequent image analysis.
[0047] This multi-dimensional image data acquisition method can effectively capture the detailed features of the hock area and provide high-quality image data for hair removal detection, thereby improving the accuracy and reliability of detection.
[0048] In some embodiments, the preprocessed multi-dimensional image includes a grayscale full-light source image and four single-light source images; the analysis and reasoning unit extracts texture features from the preprocessed multi-dimensional image data, calculates the hock hair removal rate, and determines the degree of hock hair removal in combination with the pressure data collected by the array pressure sensing unit, including: S121, calculating texture features of all pixels in the full light source image and each of the single light source images using local binary patterns.
[0049] Here, LBP is able to effectively capture local texture changes in the image, which is very important for identifying hair removal areas.
[0050] S122, based on the texture features, respectively calculating the global image difference matrix C of the full light source image and the image difference matrix C between any two single light source images ij , the value range of i and j is 1 to 4.
[0051] Here, these difference matrices reflect the texture changes of images under different lighting conditions.
[0052] S123, the global image difference matrix C and all image difference matrices C ij Perform element-by-element summation, record the element points with a sum value greater than or equal to 4 as 1 to represent the hair, and record the element points with a sum value less than 4 as 0 to represent the skin, and obtain the fusion matrix Z.
[0053] Here, the 7 image difference matrices obtained above , , , , , , Perform element-by-element summation, record the element points with a sum value greater than or equal to 4 as 1 (representing hair), and the element points with a sum value less than 4 as 0 (representing skin), thereby obtaining the fusion matrix Z. This fusion matrix integrates the texture information under multi-light source conditions, which helps to more accurately identify the hair removal area.
[0054] S124, calculating the proportion of the element points representing the skin in the fusion matrix Z and using it as the fetlock hair loss rate.
[0055] Here, this hair loss rate reflects the severity of hair loss in the hock area.
[0056] S125, determining the pressure difference between the pressure value of the cow's hoof close to the camera and the average pressure of the other three cow's hoofs based on the collected pressure data.
[0057] Here, this pressure difference can provide additional information about the force applied to the cow's hoof and help to comprehensively assess the degree of hair loss.
[0058] ; in, Indicates the pressure difference, is the maximum pressure value of the cow's hoof close to the camera. It is the maximum pressure value of each of the other three cow hooves.
[0059] S126, performing weighted summation on the hock hair removal rate and the pressure difference to obtain a comprehensive score.
[0060] Here, this comprehensive score combines image texture features and pressure data to provide a more comprehensive hair removal assessment. Combining the hair removal rate and pressure difference of the hock, the following judgment formula can be designed: ; Where: S is the comprehensive score of hock hair loss; and is the weight coefficient, which is used to adjust and influence the final score (needs to be adjusted according to actual data, usually =1); R is the shedding rate at the hock (range: 0 to 1); F is the pressure difference.
[0061] It is worth noting that and The value of is obtained based on the experience of 30 cows in the actual production environment. The impact of hair removal recognition in the image is greater, so the proportion is higher than the hoof pressure measurement. The specific value is: =0.7, =0.3. After actual testing of 145 cows, the detection accuracy of this device reached 93.2%, and the detection time for a single cow was less than 3 seconds.
[0062] S127, based on the comprehensive score and the specific coefficient range threshold, determine the degree of hock hair loss according to a preset judgment rule.
[0063] Here, assuming the comprehensive score S, the following judgment rules are set: exist In the case of , it is determined that the degree of hock hair loss has no effect; exist In this case, the degree of hock hair loss was determined to be mildly affected; exist In the case of , the degree of hock hair loss was determined to be moderately affected; exist In this case, the degree of hair loss at the hock is determined to be severely affected.
[0064] in, is the judgment threshold, which is set through actual measurement and aquaculture disease experience. , , This judgment rule can help breeders quickly understand the health status of cattle hocks and take corresponding measures.
[0065] In some embodiments, based on the texture features, the global image difference matrix C of the full light source image and the image difference matrix C between any two single light source images are calculated respectively. ij ,include: S221 : Calculate the LBP value of each pixel for the full light source image and each single light source image.
[0066] Here, the LBP value reflects the texture change between a pixel and its neighboring pixels.
[0067] For each single light source image, the LBP value of each pixel is calculated by the following formula: ; in, ( ) is a sign function, It's pixels The gray value of It's pixels The gray value of the kth pixel in the 3×3 neighborhood of ; For the full light source image, the LBP value of each pixel is calculated by the following formula: ; in, is the pixel in the full light source image The gray value of yes The grayscale value of the pth pixel in the 3×3 neighborhood of .
[0068] S221 , binarizing the LBP value of each pixel in the full light source image based on a set threshold value to generate a global image difference matrix C of the full light source image.
[0069] Here, the grayscale image corresponding to the image T0 collected with all light sources turned on is 0, through texture feature calculation and binarization processing: if the LBP value of a pixel is greater than the threshold T, the pixel is considered to belong to the hair area and is recorded as 1; otherwise, it is considered to belong to the skin area and is recorded as 0, generating the global image difference matrix C of the full light source image: ; in, is the pixel in the global image difference matrix C The value of It's pixels LBP value.
[0070] S221, compare the four single-light-source images in pairs, calculate the comprehensive difference of the same pixel in any two single-light-source images, and obtain a corresponding difference image.
[0071] Here, the difference image reflects the intensity of shadow changes under the two light sources; the comprehensive difference is determined by weighted summing of the LBP texture difference and grayscale difference of the same pixel in the two single light source images. Specifically, the comprehensive difference of the same pixel in any two single light source images is calculated by the following formula: ; ; ; in, Is an element The grayscale difference between single light source image i and single light source image j, Is an element The LBP texture difference between single light source image i and single light source image j, and is the weight coefficient, satisfying .
[0072] S223, for each difference image, binarization is performed using a set threshold to generate an image difference matrix C ij .
[0073] Here, based on the actual measurement, the difference image is obtained The corresponding threshold . Perform binarization processing. If the difference value of a certain pixel position , then the shadow change at that position is considered to be significant and it is a hair area, recorded as 1; otherwise, it is considered to be a skin area, recorded as 0.
[0074] Image difference matrix C ij It can be expressed as: ; in, is the image difference matrix C ij Medium Pixels The value of It's pixels The combined difference of .
[0075] Through the above steps, the global image difference matrix C of the full light source image and the image difference matrix C between any two single light source images can be calculated respectively. ij These matrices provide important texture feature information for the subsequent calculation of the hock hair loss rate and the determination of the degree of hair loss. This multi-dimensional analysis method combines image processing and pressure sensing technology to provide objective and accurate detection and analysis results, which helps to timely detect and deal with cattle health problems.
[0076] The device and method for detecting hair loss at the hock of cattle provided in the embodiment of the present invention realize accurate detection of hair loss at the hock of cattle through multiple sensors and advanced control units. It not only uses image data for intuitive analysis, but also combines pressure data for comprehensive judgment, and can provide breeders with scientific health monitoring methods. In the future, with the further development of technology, the device can also be optimized in terms of intelligence, automation and environmental adaptability to better serve the health management of animal husbandry.
[0077] The above shows and describes the basic principles and main features of the present invention and the advantages of the present invention. It should be understood by those skilled in the art that the present invention is not limited to the above embodiments. The above embodiments and descriptions are only for explaining the principles of the present invention. Without departing from the spirit and scope of the present invention, the present invention may have various changes and improvements, which fall within the scope of the present invention to be protected. The scope of protection of the present invention is defined by the attached claims and their equivalents.
[0078] It should be understood that "one embodiment" or "an embodiment" mentioned throughout the specification means that specific features, structures or characteristics related to the embodiment are included in at least one embodiment of the present invention. Therefore, "in one embodiment" or "in an embodiment" appearing throughout the specification does not necessarily refer to the same embodiment. In addition, these specific features, structures or characteristics can be combined in one or more embodiments in any suitable manner. It should be understood that in various embodiments of the present invention, the size of the serial number of the above-mentioned processes does not mean the order of execution. The execution order of each process should be determined by its function and internal logic, and should not constitute any limitation on the implementation process of the embodiment of the present invention. The serial numbers of the above-mentioned embodiments of the present invention are only for description and do not represent the advantages and disadvantages of the embodiments.
[0079] It should be noted that, in this article, the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, article or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, article or device. In the absence of further restrictions, an element defined by the sentence "comprises a ..." does not exclude the existence of other identical elements in the process, method, article or device including the element.
[0080] In the several embodiments provided by the present invention, it should be understood that the disclosed methods can be implemented in other ways. The methods disclosed in the several method embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments. The features disclosed in the several method embodiments provided by the present invention can be arbitrarily combined without conflict to obtain new method embodiments.
[0081] The above is only an embodiment of the present invention, but the protection scope of the present invention is not limited thereto. Any person skilled in the art can easily think of changes or substitutions within the technical scope disclosed by the present invention, which should be included in the protection scope of the present invention. Therefore, the protection scope of the present invention should be based on the protection scope of the claims.
Claims
1. A cattle hock hair loss detection device, characterized in that: include: The device body has a groove structure; two groups of vertical adjustment units, image acquisition units and light source groups are respectively arranged at opposite positions on both sides of the groove; a synchronization control unit and an analysis and reasoning unit are arranged on either side of the groove; and an array pressure sensing unit is arranged at the bottom of the groove; wherein: A vertical adjustment unit, used to adjust the acquisition position of the image acquisition unit by sliding up and down; An image acquisition unit is deployed in the central area of the vertical adjustment unit and is used to collect multi-dimensional image data of the hock area of the cattle leg passing through the detection device in real time in combination with the light source group; A light source group, including four time-sharing excitation light sources, which are respectively arranged around the vertical adjustment unit and used to supplement the light source when the image acquisition unit captures the picture; An array pressure sensing unit is used to collect pressure data of four cow hooves in real time while the image acquisition unit is acquiring images, and transmit the data to the analysis and reasoning unit; A synchronization control unit, used to control the exposure timing of the image acquisition unit, and synchronously control the opening or closing of the four time-sharing excitation light sources during image acquisition; The analysis and reasoning unit is used to extract texture features from the preprocessed multi-dimensional image data, calculate the hock shedding rate, and determine the degree of hock shedding in combination with the result of hoof pressure abnormality measurement based on the pressure data.
2. The cattle hock hair loss detection device according to claim 1, characterized in that: The imaging image is processed by the built-in deep vision algorithm in the image acquisition unit to automatically identify the hock region of the cow; when it is identified that the hock region of the cow is located in the horizontal center position of the imaging image, the synchronization control unit is aroused.
3. The cattle hock hair loss detection device according to claim 1, characterized in that: The synchronization control unit is based on a hardware-level synchronization controller of a field programmable gate array FPGA to achieve multi-sensor clock domain synchronization; and a double-buffered direct memory access DMA architecture is used to ensure phase locking between image acquisition and light source pulses.
4. The cattle hock hair loss detection device according to any one of claims 1 to 3, characterized in that: The device body is also integrated with a network unit for uploading the collected image data, pressure data and hair removal detection and analysis results to a cloud database in real time; At the same time, the device body is also externally connected to a radio frequency identification RFID antenna for identifying the individual identity of the cattle while detecting the hair loss at the hock.
5. A method for detecting hair loss in cattle hocks, characterized in that: The cattle hock hair loss detection device as claimed in any one of claims 1 to 4 is deployed in a passage that cattle must pass through, and detection is performed by the following steps: After the image acquisition unit captures the image of the cow's legs, the synchronization control unit is awakened when the deep vision algorithm identifies that the cow's hock area is located in the horizontal center of the imaging image; The synchronous control unit controls the exposure timing of the image acquisition unit and synchronously controls the opening or closing of the four time-sharing excitation light sources to acquire multi-dimensional image data; Preprocessing the multi-dimensional image data and transmitting it to the analysis and reasoning unit; While the image acquisition unit is acquiring images, the array pressure sensing unit is collecting pressure data corresponding to the four hooves in real time and transmitting it to the analysis and reasoning unit; The texture features of the pre-processed multi-dimensional image data are extracted by the analysis and reasoning unit, the hock shedding rate is calculated, and the degree of hock shedding is determined by combining the result of hoof pressure abnormality measurement based on the pressure data.
6. The method for detecting hair loss in cattle hocks according to claim 5, characterized in that: The four time-sharing excitation light sources are light source 1, light source 2, light source 3, and light source 4, which are distributed around the image acquisition unit and are used to supplement light sources from four angles; the acquisition process of the multi-dimensional image data is specifically as follows: When the hock region of the cow is located at the horizontal center position of the imaging image, the synchronization control unit controls all four time-sharing excitation light sources to turn on, triggering the image acquisition unit to acquire a full-light source image; The synchronous control unit turns off light source No. 2, light source No. 3, and light source No. 4, waits for the afterglow to be eliminated, and triggers the image acquisition unit to acquire the first single light source image; The synchronization control unit turns off light source No. 1, turns on light source No. 2, waits for the afterglow to disappear, and triggers the image acquisition unit to acquire a second single light source image; The synchronization control unit turns off light source No. 2, turns on light source No. 3, waits for the afterglow to disappear, and triggers the image acquisition unit to acquire the third single light source image; The synchronization control unit turns off light source No. 3, turns on light source No. 4, waits for the afterglow to be eliminated, triggers the image acquisition unit to acquire the fourth single light source image, and turns off light source No.
4.
7. The method for detecting hair loss in cattle hocks according to claim 5 or 6, characterized in that: The pre-processed multi-dimensional image includes a grayscale full-light source image and four single-light source images; The method extracts texture features from the pre-processed multi-dimensional image data through the analysis and reasoning unit, calculates the hock hair removal rate, and determines the degree of hock hair removal by combining the pressure data collected by the array pressure sensing unit, including: Calculate texture features using local binary patterns for all pixels in the full light source image and each of the single light source images; Based on the texture features, the global image difference matrix C of the full light source image and the image difference matrix C between any two single light source images are calculated respectively. ij , the value range of i and j is from 1 to 4; For the global image difference matrix C and all image difference matrices C ij Perform element-by-element summation, record the element points with a sum value greater than or equal to 4 as 1 to represent hair, and record the element points with a sum value less than 4 as 0 to represent skin, and obtain the fusion matrix Z; Calculate the proportion of the element points representing the skin in the fusion matrix Z and use it as the hock hair removal rate; Based on the collected pressure data, determine the pressure difference between the pressure value of the cow hoof close to the camera and the average pressure of the other three cow hooves; A comprehensive score is obtained by weighted summing the hock hair removal rate and the pressure difference; Based on the comprehensive score and the specific coefficient range threshold, the degree of hock hair loss is determined according to preset judgment rules.
8. The method for detecting hair loss in cattle hocks according to claim 7, characterized in that: Based on the texture features, the global image difference matrix C of the full light source image and the image difference matrix C between any two single light source images are calculated respectively. ij ,include: For the full light source image and each single light source image, calculating the local binary pattern LBP value of each pixel; Binarizing the LBP value of each pixel in the full light source image based on a set threshold value to generate a global image difference matrix C of the full light source image; The four single-light source images are compared in pairs, and the comprehensive difference of the same pixel in any two single-light source images is calculated to obtain the corresponding difference image; wherein the difference image reflects the intensity of the shadow change under the two light sources; the comprehensive difference is determined by weighted summation of the LBP texture difference and the grayscale difference of the same pixel in the two single-light source images; For each difference image, binarization is performed using a set threshold to generate an image difference matrix C ij .
9. The method for detecting hair loss in cattle hocks according to claim 8, characterized in that: For each single light source image, the LBP value of each pixel is calculated by the following formula: ; in, ( ) is a sign function, It's pixels The gray value of It's pixels The gray value of the kth pixel in the 3×3 neighborhood of ; For the full light source image, the LBP value of each pixel is calculated by the following formula: ; in, is the pixel in the full light source image The gray value of yes The grayscale value of the pth pixel in the 3×3 neighborhood of .
Citation Information
Patent Citations
Biological body checking apparatus and biological body checking method
CN103815871A
Image processing method and device, electronic equipment and storage medium
CN112330570A
Cattle hoof disease monitoring device and monitoring system
CN112890804A
Animal feeding method and device and equipment
CN113468921A
Image-based beef cattle pathological unhairing tracking method and system in livestock breeding
CN117274265A