Counting device for duck meat processing
By using customized computer vision algorithms and hardware adaptation design, combined with laser structured light and supplementary lighting, the problem of counting errors in hanging conveyor systems for duck meat processing was solved, enabling real-time and accurate counting of ducks. This approach adapts to industrial environments with high humidity and light reflection, improving counting accuracy and reliability.
Patent Information
- Application Number
- CN202610364730.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-03-24
- Publication Date
- 2026-06-23
AI Technical Summary
Existing technologies are not suitable for counting scenarios involving hanging conveyors in duck meat processing, resulting in counting errors, high omission rates, and inability to adapt to industrial environments with high humidity and light reflection.
By employing customized computer vision algorithms and hardware adaptation designs, combined with laser structured light and supplementary lighting, the system achieves 3D reconstruction and feature extraction of ducks. Kalman filtering and Hungarian algorithm are used for counting verification. Hardware and software are co-optimized to adapt to industrial environments.
It enables contactless, real-time, and accurate counting of suspended ducks, reduces the counting error rate, adapts to high-speed transportation requirements, and improves counting accuracy and reliability.
Smart Images

Figure CN122265990A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of image data recognition and processing technology, and in particular to a quantity counting device for duck meat processing. Background Technology
[0002] In the duck meat processing industry, overhead conveyor chains are the mainstream method for pre-processing, cutting, and processing ducks. Accurate counting of ducks is crucial for production measurement, cost accounting, and capacity statistics. Existing technologies for counting items on production lines mainly fall into two categories: photoelectric sensor counting and general computer vision counting. Neither is suitable for the counting scenario of hanging ducks in duck meat processing, exhibiting significant technical shortcomings. First, photoelectric sensor counting relies on the duck's occlusion of light to trigger counting, which cannot handle the swaying posture and limb extension of the hanging ducks. This can easily lead to situations where a single duck's movement during transport causes multiple occlusion triggers or insufficient occlusion prevents counting, resulting in counting errors. Second, while general computer vision counting optimizes multi-view acquisition and light... While technologies such as image compensation and background subtraction exist, they are all designed for regular items transported on a planar surface and do not consider the three-dimensional suspended characteristics of ducks. They are insufficient in their ability to separate ducks from conveyor chain components and restore the occlusion between ducks, resulting in a certain rate of missed counts. Thirdly, existing discrete item visual counting schemes are only applicable to single-layer discrete items at the end of the conveyor and cannot achieve real-time dynamic counting of continuously suspended ducks on the conveyor chain. Furthermore, they are not adapted to the industrial environment of duck meat processing workshops, which are characterized by high humidity, high moisture content, and light reflection. This results in significant image noise interference and makes it difficult to automatically adjust the camera's shooting angle.
[0003] To address the technical shortcomings of existing technologies, a visual counting device is proposed specifically for ducks suspended in a duck meat processing conveyor chain. This device is adaptable to different hanging scenarios, resistant to environmental interference, and can solve problems related to occlusion and posture, making it an accurate counting device. Summary of the Invention
[0004] This invention provides a quantity counting device for duck meat processing. Based on customized computer vision algorithms and hardware adaptation design, it realizes contactless, real-time, and accurate counting of ducks suspended on a conveyor chain, reduces the counting error rate, and completely solves the problems of missing, undercounting, and incorrect counting. It is adapted to the industrial environment of duck meat processing workshops and meets the counting requirements of high-speed conveying on the production line.
[0005] The present invention relates to a quantity counting device for duck meat processing, comprising a counter and a hardware acquisition module, an image preprocessing module, a core counting algorithm module, a data output module, and an environment adaptation module installed inside the counter. These modules work collaboratively to achieve accurate counting of hanging ducks. The overall architecture features wireless communication between the hardware acquisition end and the software processing end, with the software processing end embedding a customized logic algorithm. The specific structure is as follows: The hardware acquisition module includes an industrial high-speed camera, a laser structured light emitter, and a supplementary light. The industrial high-speed camera and laser structured light emitter are located inside the counter, and the supplementary light is installed beside the conveyor chain. Specifically, the industrial high-speed camera is symmetrically arranged at a 45-degree angle inside the counter, completely covering the three-dimensional space of the hanging ducks with no blind spots. The laser structured light emitter, located inside the counter, projects a feature dot matrix onto the hanging ducks, achieving three-dimensional reconstruction of the ducks' outlines. The supplementary light is anti-fog and waterproof, suitable for the high humidity environment of the workshop, eliminating light reflection from the ducks' skin and moisture.
[0006] More preferably, the image preprocessing module is connected to the hardware acquisition module to process the acquired color image and laser structured light dot matrix image synchronously. The image preprocessing steps are: noise filtering, image registration, background segmentation, and contour enhancement. Noise filtering uses a combination of median filtering and Gaussian filtering to eliminate noise interference from workshop moisture and dust. Image registration achieves pixel-level registration between the color image and the dot matrix image through homography matrix. Background segmentation is based on an improved Gaussian mixture background modeling method to segment the fixed background such as the conveyor chain and hanging parts from the duck foreground, improving segmentation accuracy. Contour enhancement enhances the duck contour through the Laplacian operator, providing clear target features for subsequent counting.
[0007] More preferably, the core counting algorithm module embeds hanging duck feature matching, occlusion restoration, and trajectory tracking counting logic algorithms. For hanging ducks moving at a constant speed on the conveyor chain, it achieves unique identification, continuous tracking, and accurate counting of each duck. The specific steps of the algorithm are as follows: Step 1: Duck Feature Extraction and Matching: Extract head feature points, torso bounding rectangle features, laser dot matrix 3D contour features, and skeletal joint feature points from the preprocessed image. Extract the relative position ratio of the joint points using laser structured light 3D data to establish a feature template library of 3D contours and joint ratios of hanging ducks. The template library contains feature parameters of different duck postures, such as swinging, stretching, and curling. Perform similarity matching between the real-time extracted target features and the template library. Dynamically adjust the similarity threshold S based on the conveyor chain speed V and workshop humidity H. When V is 1.5 m / s, the threshold S is set to 80% to improve the recognition speed. When H is 80%, the threshold is set to 90% and the weight of the 3D contour features is strengthened to offset the feature blurring caused by water vapor. When V < 1.5 m / s, a similarity threshold S of 85% is set to determine a valid duck target, eliminating interfering targets such as hanging parts and debris, thus realizing a design specifically for the hanging duck counting scenario. Step 2: Contour reconstruction of occluded ducks: For areas where multiple ducks occlude each other, the pixel depth values of the occluded areas are calculated using 3D dot matrix data from laser structured light. When the depth difference is greater than or equal to 2cm, it is determined to be the contour boundary of different ducks. For ducks with missing local features due to occlusion, a feature completion algorithm is used. Based on the duck features and 3D dot matrix contours of adjacent frames, a historical posture time series database is introduced: storing the complete posture change sequence of ducks from entering the line to exiting the line. When the head feature is missing in a certain frame, the missing head feature is restored by posture interpolation of the previous 3 frames and the next 3 frames, accurately restoring the missing feature, improving the restoration accuracy, and solving the problem of missing counts caused by occlusion. Step 3: Duck Trajectory Tracking and Counting: A motion trajectory model for each valid duck is established based on the Kalman filter algorithm. Simultaneously, the Hungarian algorithm is introduced to calculate the feature similarity matrix between the current frame target and historical trajectories, achieving accurate ID matching when multiple ducks are densely occluded. This solves the mismatch problem of traditional Kalman filtering when targets cross. Incoming and outgoing detection lines are set at the counting station of the conveyor chain. When the center of the bounding rectangle of a duck's torso crosses the incoming detection line, a unique tracking ID is assigned to that duck, and its motion trajectory is tracked in real time. When the center of the bounding rectangle of a duck's torso with the same tracking ID crosses the incoming detection line... When the duck completely crosses the exit detection line, the count is incremented by 1, and the characteristics and trajectory data of the duck are retained to avoid double counting. If the duck turns back within the counting station, such as when the conveyor chain reverses, the tracking ID is deleted and not included in the counting result to solve the problem of incorrect counting. The state transition matrix of the Kalman filter and the observation noise R are optimized based on the real-time speed V of the conveyor chain. When V=0.5m / s, R=0.05 is set to improve positioning accuracy. When V=2m / s, R=0.1 is set and an acceleration term is added to adapt to the situation where the swing amplitude of the duck increases and to avoid ID loss during high-speed transport. Step 4, Counting Result Verification: Set the conveyor speed V of the conveyor chain and the duck hanging distance L per unit time, and calculate the theoretical count N(theoretical) = V*T / L (T is the unit time). At the same time, set a consistency check for the characteristics of a single duck. First, the similarity of the characteristics of each valid duck at the entry and exit points must be greater than or equal to 90%. Otherwise, it is marked as abnormal and a single frame backtracking is triggered to avoid miscounting caused by sudden changes in characteristics. Second, compare the actual count N(actual) with N(theoretical). When the absolute value of N(actual) - N(theoretical) is less than or equal to 1, the counting result is determined to be valid. When the absolute value of N(actual) - N(theoretical) is greater than or equal to 2, an image backtracking check is triggered, and the duck characteristics in this time period are re-extracted and counted to ensure the accuracy of the result. Step 5, Hardware and Software Co-optimization: Utilizing the linkage control of laser structured light and supplementary lighting, when multiple ducks are detected densely blocking the light, the laser dot density is automatically increased to 80 points per square centimeter while the brightness of the supplementary lighting is reduced by 30%, minimizing the interference of light reflection on depth data. An FPGA chip is embedded in the industrial camera, shifting 50% of the computing power of core algorithms such as feature extraction and occlusion restoration to the front end, reducing processing latency from 30ms to 10ms, adapting to high-speed conveyor chains. Simultaneously, the counter is connected to the encoder data of the conveyor chain and the work order data of the duck feeding system. The encoder provides real-time feedback on the conveying distance, and the work order data provides the theoretical feeding quantity, forming a triple cross-verification of visual counting, encoder distance counting, and work order quantity. When the deviation of all three is greater than 2, the production line is automatically paused and an alarm is triggered. This enables a dedicated counting design for duck meat processing production lines, improving counting reliability. The achieved technical effect is superior to existing solutions that rely on backend servers.
[0008] More preferably, the data output module includes a data display screen, an industrial serial port, and a cloud data interface, which can display the instantaneous and cumulative counts of the hanging ducks in real time, and supports the connection with the MES system and ERP system of the duck meat processing production line to realize the storage, statistics and analysis of the counting data. The data update frequency is synchronized with the camera frame rate.
[0009] More preferably, the environment adaptation module is configured with a fog-proof and waterproof protective cover for the hardware acquisition module, and a workshop environment parameter adaptive adjustment module is set for the software processing end. It can adjust the brightness of the supplementary light and the exposure parameters of the camera in real time according to the humidity, temperature and light intensity of the workshop, so as to ensure that the image acquisition quality is not affected by environmental changes.
[0010] More preferably, a data display screen is embedded in the front panel of the counter, a locking device is installed on the front panel of the counter, a first support frame and a second support frame are installed at the bottom of the counter, the counter is installed on a guide rail next to the conveyor chain, a locking plate is coaxially fixed to the rear side of the locking device via a connecting rod, a locking block is provided on the front side of the locking plate, the locking block is engaged with the back of the front panel of the counter, and a spring is provided between the front panel of the counter and the back of the locking device. The spring pushes the locking device to always be in the foremost position. When the locking device is pushed backward, the spring is compressed, and the locking block is disengaged from the front panel of the counter. At this time, the locking device can rotate freely, so that the locking plate is in a vertical position. Once in the straight position, the front panel can be opened. Releasing the locking mechanism allows the spring to push it forward while the locking plate remains in place. To lock the front panel, push the locking mechanism backward to disengage the locking block. Rotating the locking mechanism brings the locking plate to a horizontal position, locking the front panel. The locking mechanism features an arc-shaped notch on the top rear side, conforming to an ergonomic angle, making it easy to insert fingers to move the locking mechanism. Unauthorized personnel will fail to open the front panel by pulling the locking mechanism or by rotating it due to the locking block's restriction. This design prevents the front panel from being opened by unauthorized personnel or accidental contact, providing enhanced protection.
[0011] More preferably, a slot is provided on the rear side of the first support frame, and the insert rod on the front side of the second support frame is inserted into the slot. Connecting plates are fixedly welded to the left sides of the first and second support frames respectively, and sleeves are welded to the right sides of the first and second support frames respectively. A rotating shaft is snapped into the sleeve, and the front and rear ends of the rotating shaft are limited by nuts to restrict the front and rear distance of the sleeve. Adjustable installation of the front and rear distance is achieved by the cooperation of the first and second support frames. A connecting ear plate is sleeved on the outside of the rotating shaft, and the connecting ear plate is located inside the two sleeves. The bottom plate of the connecting ear plate is fixedly connected to the guide rail. The bottom locking rods of the first and second support frames are snapped into the outside of the guide rail respectively. A through groove is opened inside the connecting plate, and an electrically controlled lifting rod is installed inside the through groove. Two baffles are rotatably connected to the periphery of the moving rod of the electrically controlled lifting rod through a shaft. Each baffle is snapped onto the upper and lower sides of the connecting plate. A laser rangefinder is installed on the top of the moving rod of the electrically controlled lifting sleeve. The laser rangefinder works in conjunction with the hardware acquisition module, and the electrically controlled lifting sleeve works in conjunction with the adaptive adjustment module. When the environment adaptation module needs to adjust the camera angle according to changes in the workshop environment or image acquisition angle, it calculates and adjusts the height of the electrically controlled lifting sleeve. The laser rangefinder ensures that the heights of the two electrically controlled lifting sleeves are consistent. The baffle drives the connecting plate to change height. The first and second support frames enable the counter to rotate around the pivot. During rotation, the locking rods at the bottom of the first and second support frames slide outside the guide rail to prevent them from disengaging from the guide rail. The rotation of the counter changes the internal camera's shooting angle, achieving automatic adjustment of the shooting angle and ensuring a suitable acquisition angle.
[0012] Beneficial effects This invention specifically addresses the counting challenges of ducks hanging on conveyor chains in duck meat processing. Through laser structured light 3D reconstruction and customized feature extraction, it achieves precise segmentation of ducks from the conveyor chain and effective restoration of obscured ducks, completely resolving issues of missed counts, undercounts, and incorrect counts, and significantly improving counting accuracy.
[0013] In addition, the core counting algorithm integrates five logics: feature matching, 3D contour reconstruction, Kalman trajectory tracking, counting verification, and hardware-software co-optimization. This breaks through the technical limitation that general computer vision counting is only applicable to planar transportation scenarios, and adapts vision technology to the dynamic counting of suspended three-dimensional objects.
[0014] In addition, both the hardware and software are adapted to the industrial environment of the duck meat processing workshop, and are fog-proof, waterproof, noise-resistant, and resistant to changes in light. They can work continuously without human intervention and are suitable for the high-speed conveying needs of the production line.
[0015] In addition, the counting data can be seamlessly integrated with the production line management system to achieve digital and intelligent management of duck meat processing production data. Compared with traditional manual counting and photoelectric counting, this improves efficiency and reduces the manual verification rate.
[0016] In addition, when the environment adaptation module needs to adjust the camera angle according to changes in the workshop environment or image acquisition angle, it calculates and adjusts the height of the electrically controlled lifting sleeve. It uses a laser rangefinder to make the heights of the two electrically controlled lifting sleeves consistent. The baffle drives the connecting plate to change its height. Through the first support frame and the second support frame, the counter rotates around the pivot. The rotation of the counter changes the shooting angle of the internal camera, realizing automatic adjustment of the shooting angle and ensuring that the acquisition angle is appropriate. Attached Figure Description
[0017] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings of the embodiments will be briefly described below.
[0018] The accompanying drawings described below are only related to some embodiments of the invention and are not intended to limit the invention.
[0019] In the attached diagram: Figure 1 This is a system framework diagram of the present invention.
[0020] Figure 2 This is a schematic diagram of the counter of the present invention mounted on a guide rail.
[0021] Figure 3 This is the present invention. Figure 2 A schematic diagram of the structure from the left rear view.
[0022] Figure 4This is a schematic diagram of the structure of the locking component of the present invention.
[0023] Figure 5 This is a schematic diagram of the structure of the electrically controlled lifting sleeve of the present invention.
[0024] List of reference numerals 1. Hardware acquisition module; 2. Image preprocessing module; 3. Core counting algorithm module; 4. Data output module; 5. Environment adaptation module; 6. Counter; 61. Locking component; 6101. Locking plate; 6102. Locking block; 601. Connecting plate; 62. First support frame; 63. Second support frame; 64. Electrically controlled lifting sleeve; 6401. Baffle; 6402. Laser rangefinder sensor. Detailed Implementation
[0025] To make the objectives, solutions, and advantages of the present invention clearer, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Unless otherwise stated, the terms used herein have their ordinary meanings in the art. The same reference numerals in the drawings represent the same parts.
[0026] Example: Please refer to Figures 1 to 5 As shown: This invention provides a quantity counting device for duck meat processing, comprising: a counter 6 and a hardware acquisition module 1, an image preprocessing module 2, a core counting algorithm module 3, a data output module 4, and an environment adaptation module 5 installed inside the counter 6. These modules work collaboratively to achieve accurate counting of hanging ducks. The overall architecture features wireless communication between the hardware acquisition end and the software processing end, with the software processing end embedding a customized logic algorithm. The specific structure is as follows: The hardware acquisition module 1 is located on the guide rail of the counting station on the duck meat processing conveyor chain and includes an industrial high-speed camera, a laser structured light emitter, and a supplementary light. The industrial high-speed camera is symmetrically arranged at a 45° angle inside the counter 6, with a field of view completely covering the three-dimensional space of the hanging ducks, eliminating blind spots. The laser structured light emitter is located inside the counter 6, projecting a feature dot matrix onto the hanging ducks to achieve three-dimensional reconstruction of the ducks' contours. The supplementary light is anti-fog and waterproof, suitable for the high humidity environment of the workshop, eliminating light reflection from the ducks' skin and moisture.
[0027] The image preprocessing module 2 is connected to the hardware acquisition module 1 to process the acquired color images and laser structured light dot matrix images synchronously. The image preprocessing steps are: noise filtering, image registration, background segmentation, and contour enhancement. Noise filtering uses a combination of median filtering and Gaussian filtering to eliminate noise interference from workshop moisture and dust. Image registration achieves pixel-level registration between the color image and the dot matrix image through homography matrix. Background segmentation is based on an improved Gaussian mixture background modeling method to separate the fixed background such as the conveyor chain and hanging parts from the duck foreground, improving the segmentation accuracy. Contour enhancement enhances the duck contours using the Laplacian operator, providing clear target features for subsequent counting.
[0028] Among them, the environment adaptation module 5 is equipped with a fog-proof and waterproof protective cover for the hardware acquisition module 1, and sets up an adaptive adjustment module for workshop environment parameters for the software processing end. It can adjust the brightness of the supplementary light and the exposure parameters of the camera in real time according to the humidity, temperature and light intensity of the workshop, so as to ensure that the image acquisition quality is not affected by environmental changes.
[0029] The data output module 4 includes a data display screen, an industrial serial port, and a cloud data interface. It can display the instantaneous and cumulative counts of the hanging ducks in real time, and supports the connection with the MES system and ERP system of the duck meat processing production line to realize the storage, statistics and analysis of the counting data. The data update frequency is synchronized with the camera frame rate.
[0030] The counter 6 has a data display screen embedded in its front panel, a locking element 61 mounted on the front panel, a first support frame 62 and a second support frame 63 mounted on its bottom, and is mounted on a guide rail beside the conveyor chain. A locking plate 6101 is coaxially and fixedly connected to the rear side of the locking element 61 via a connecting rod. A locking block 6102 is provided on the front side of the locking plate 6101, engaging with the back of the front panel of the counter 6. A spring is provided between the front panel of the counter 6 and the back of the locking element 61. The spring pushes the locking element 61 to always remain in the foremost position. When the locking element 61 is pushed backward, the spring is compressed, simultaneously disengaging the locking block 6102 from the front panel of the counter 6. At this point, the locking element 61 can rotate freely, allowing the locking plate 6102 to move freely. Once 101 is in a vertical position, the front panel can be opened. At this point, releasing the locking element 61 allows the spring to push it forward, while the locking plate 6101 remains in place. To lock the front panel, push the locking element 61 backward to disengage the locking block 6102 from the front panel. Rotating the locking element 61 brings the locking plate 6101 to a horizontal position, completing the locking of the front panel. The locking element 61 has an arc-shaped notch on its top rear side, conforming to an ergonomic angle, making it easy to insert a finger into the notch to move the locking element 61. Unauthorized personnel will fail to open the front panel by pulling the locking element 61, and the locking block 6102 will also prevent rotation of the locking element 61. This design prevents the front panel from being opened by unauthorized personnel or accidental contact, providing enhanced protection. The first support frame 62 has a slot on its rear side, into which the insert rod of the second support frame 63 is inserted. Connecting plates 601 are fixedly welded to the left sides of both the first and second support frames 62 and 63, respectively. Sleeves are welded to the right sides of both the first and second support frames 62 and 63, respectively. A rotating shaft is fitted inside the sleeve, and the distance between the front and rear ends of the rotating shaft and the sleeve is limited by nuts. Adjustable installation is achieved by the cooperation of the first and second support frames 62 and 63. Connecting ear plates are fitted onto the outside of the rotating shaft, located inside the two sleeves. The bottom plate of the connecting ear plate is fixedly connected to the guide rail. The bottom locking rods of the first and second support frames 62 and 63 are respectively engaged with the outside of the guide rail. A through groove is formed inside the connecting plate 601. The device internally houses an electrically controlled lifting rod 64. Two baffles 6401 are rotatably connected to the outer periphery of the moving rod of the electrically controlled lifting rod 64 via a shaft. The two baffles 6401 are respectively engaged with the upper and lower sides of the connecting plate 601. A laser rangefinder 6402 is installed at the top of the moving rod of the electrically controlled lifting rod 64. The laser rangefinder 6402 works in conjunction with the hardware acquisition module 1, and the electrically controlled lifting rod 64 works in conjunction with the adaptive adjustment module. When the environment adaptation module 5 needs to adjust the camera angle based on changes in the workshop environment or image acquisition angle, it calculates and adjusts the height of the electrically controlled lifting rod 64. The laser rangefinder 6402 ensures that the heights of the two electrically controlled lifting rods 64 are consistent, causing the baffles 6401 to move the connecting plate 601 at different heights.The counter 6 rotates around its pivot point via the first support frame 62 and the second support frame 63. During rotation, the locking rods at the bottom of the first support frame 62 and the second support frame 63 slide outside the guide rail to prevent it from disengaging. The rotation of the counter 6 changes the shooting angle of the internal camera, automatically adjusting the shooting angle to ensure a suitable acquisition angle.
[0031] The core counting algorithm module 3 incorporates features matching, occlusion restoration, and trajectory tracking counting logic algorithms for hanging ducks. For hanging ducks moving at a constant speed on the conveyor chain, it achieves unique identification, continuous tracking, and accurate counting of each duck. The specific steps of the algorithm are as follows: Step 1: Duck Feature Extraction and Matching: Extract head feature points, torso bounding rectangle features, laser dot matrix 3D contour features, and skeletal joint feature points from the preprocessed image. Extract the relative position ratio of the joint points using laser structured light 3D data to establish a feature template library of 3D contours and joint ratios of hanging ducks. The template library contains feature parameters of different duck postures, such as swinging, stretching, and curling. Perform similarity matching between the real-time extracted target features and the template library. Dynamically adjust the similarity threshold S based on the conveyor chain speed V and workshop humidity H. When V is 1.5 m / s, the threshold S is set to 80% to improve the recognition speed. When H is 80%, the threshold is set to 90% and the weight of the 3D contour features is strengthened to offset the feature blurring caused by water vapor. When V < 1.5 m / s, a similarity threshold S of 85% is set to determine a valid duck target, excluding interfering targets such as hanging parts and debris, thus realizing a design specifically for hanging duck counting scenarios. Step 2: Contour reconstruction of occluded ducks: For areas where multiple ducks occlude each other, the pixel depth values of the occluded areas are calculated using 3D dot matrix data from laser structured light. When the depth difference is greater than or equal to 2cm, it is determined to be the contour boundary of different ducks. For ducks with missing local features due to occlusion, a feature completion algorithm is used. Based on the duck features and 3D dot matrix contours of adjacent frames, a historical posture time series database is introduced: storing the complete posture change sequence of ducks from entering the line to exiting the line. When the head feature is missing in a certain frame, the missing head feature is restored by posture interpolation of the previous 3 frames and the next 3 frames, accurately restoring the missing feature, improving the restoration accuracy, and solving the problem of missing counts caused by occlusion. Step 3: Duck Trajectory Tracking and Counting: A motion trajectory model for each valid duck is established based on the Kalman filter algorithm. Simultaneously, the Hungarian algorithm is introduced to calculate the feature similarity matrix between the current frame target and historical trajectories, achieving accurate ID matching when multiple ducks are densely occluded. This solves the mismatch problem of traditional Kalman filtering when targets cross. Incoming and outgoing detection lines are set at the counting station of the conveyor chain. When the center of the bounding rectangle of a duck's torso crosses the incoming detection line, a unique tracking ID is assigned to that duck, and its motion trajectory is tracked in real time. When the center of the bounding rectangle of a duck's torso with the same tracking ID crosses the incoming detection line... When the duck completely crosses the exit detection line, the count is incremented by 1, and the characteristics and trajectory data of the duck are retained to avoid double counting. If the duck turns back within the counting station, such as when the conveyor chain reverses, the tracking ID is deleted and not included in the counting result to solve the problem of incorrect counting. The state transition matrix of the Kalman filter and the observation noise R are optimized based on the real-time speed V of the conveyor chain. When V=0.5m / s, R=0.05 is set to improve positioning accuracy. When V=2m / s, R=0.1 is set and an acceleration term is added to adapt to the situation where the swing amplitude of the duck increases and to avoid ID loss during high-speed transport. Step 4, Counting Result Verification: Set the conveyor speed V of the conveyor chain and the duck hanging distance L per unit time, and calculate the theoretical count N(theoretical) = V*T / L (T is the unit time). At the same time, set a consistency check for the characteristics of a single duck. First, the similarity of the characteristics of each valid duck at the entry and exit points must be greater than or equal to 90%. Otherwise, it is marked as abnormal and a single frame backtracking is triggered to avoid miscounting caused by sudden changes in characteristics. Second, compare the actual count N(actual) with N(theoretical). When the absolute value of N(actual) - N(theoretical) is less than or equal to 1, the counting result is determined to be valid. When the absolute value of N(actual) - N(theoretical) is greater than or equal to 2, an image backtracking check is triggered, and the duck characteristics in this time period are re-extracted and counted to ensure the accuracy of the result. Step 5, Hardware and Software Co-optimization: Utilizing the linkage control of laser structured light and supplementary lighting, when multiple ducks are detected densely blocking the light, the laser dot density is automatically increased to 80 points per square centimeter, while the brightness of the supplementary lighting is reduced by 30% to minimize interference from light reflection on depth data. An FPGA chip is embedded in the industrial camera, offloading 50% of the computing power of core algorithms such as feature extraction and occlusion restoration to the front end, reducing processing latency from 30ms to 10ms, adapting to high-speed conveyor chains. Simultaneously, counter 6 is connected to the encoder data of the conveyor chain and the work order data of the duck feeding system. The encoder provides real-time feedback on the conveying distance, and the work order data provides the theoretical feeding quantity, forming a triple cross-verification of visual counting, encoder distance counting, and work order quantity. When the deviation of all three is greater than 2, the production line is automatically paused and an alarm is triggered. This enables a dedicated counting design for duck meat processing production lines, improving counting reliability. The achieved technical effect is superior to existing solutions that rely on backend servers.
[0032] Industrial high-speed camera: Hikvision MV-CA020-10GM, laser structured light emitter: Keyence LV-H62, ring diffuser: Dahua DH-LED100-R, industrial switch: Huawei S1730S-L8T4S-A, but not limited to the above models. The various modules are electrically connected through circuit design and basic control components. Based on the described embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.
Claims
1. A quantity counting device for duck meat processing, characterized in that, include: The counter (6) and the hardware acquisition module (1), image preprocessing module (2), core counting algorithm module (3), data output module (4) and environment adaptation module (5) installed inside the counter (6); the image preprocessing module (2) is connected to the hardware acquisition module (1) for data communication, and the image preprocessing module (2), core counting algorithm module (3) and data output module (4) are electrically connected in sequence. The image preprocessing module (2) performs synchronous processing on the acquired color image and laser structured light dot matrix image. The steps of image preprocessing module (2) are: noise filtering, image registration, background segmentation and contour enhancement; the core counting algorithm module (3) embeds the logic algorithm of hanging duck feature matching, contour restoration, trajectory tracking counting and counting result verification; the front panel of the counter (6) is embedded with a data display screen, the front panel of the counter (6) is equipped with a locking piece (61), the bottom of the counter (6) is equipped with a first support frame (62) and a second support frame (63), and the counter (6) is installed on the guide rail next to the conveyor chain.
2. The quantity counting device for duck meat processing as described in claim 1, characterized in that: The hardware acquisition module (1) includes an industrial high-speed camera and a laser structured light emitter installed inside the counter (6) and a supplementary light installed on the side of the conveyor chain. The industrial high-speed camera is arranged at an angle of 45 degrees, and the laser structured light emitter projects a feature dot matrix onto the hanging ducks.
3. The quantity counting device for duck meat processing as described in claim 1, characterized in that: The noise removal employs a combination of median filtering and Gaussian filtering to eliminate noise interference; image registration uses homography matrix to register the color image and the bitmap image; background segmentation is based on Gaussian mixture background modeling to segment the fixed background and the duck foreground; contour enhancement uses the Laplacian operator to enhance the duck contour, providing target features for subsequent counting.
4. The algorithm of the core counting algorithm module as described in claim 1, characterized in that, The specific steps are as follows: Step 1: Duck Feature Extraction and Matching: Extract head feature points, torso bounding rectangle features, laser dot matrix 3D contour features, and skeletal joint feature points from the preprocessed image. Extract the relative position ratio of joint points using laser structured light 3D data. Establish a feature template library of 3D contours and joint ratios of hanging ducks. Perform similarity matching between the real-time extracted target features and the template library. Dynamically adjust the similarity threshold S based on the conveyor chain speed V and workshop humidity H. When V is 1.5 m / s, the threshold S is set to 80%. When H is 80%, the threshold is set to 90% and the weight of 3D contour features is strengthened. When V < 1.5 m / s, a similarity threshold S of 85% is set and the duck is considered a valid target. Step 2: Contour reconstruction of occluded ducks: For areas where multiple ducks occlude each other, the pixel depth values of the occluded areas are calculated using 3D dot matrix data from laser structured light. When the depth difference is greater than or equal to 2cm, it is determined to be the contour boundary of different ducks. For ducks with missing local features due to occlusion, a feature completion algorithm is used. Based on the duck features and 3D dot matrix contours of adjacent frames, a historical posture time series database is introduced: storing the complete posture change sequence of ducks from entering the line to exiting the line. When the head feature is missing in a certain frame, the missing head feature is reconstructed by posture interpolation of the previous 3 frames and the next 3 frames. Step 3: Duck Trajectory Tracking and Counting: A motion trajectory model for each valid duck is established based on the Kalman filter algorithm. The Hungarian algorithm is also introduced to calculate the feature similarity matrix between the current frame target and historical trajectories. Incoming and outgoing detection lines are set at the counting station of the conveyor chain. When the center of the circumscribed rectangle of a duck's torso crosses the incoming detection line, a unique tracking ID is assigned to that duck. When the center of the circumscribed rectangle of a duck with the same tracking ID completely crosses the outgoing detection line, the count is incremented by 1, while retaining the duck's features and trajectory data. If a duck turns back within the counting station, the tracking ID is deleted and not included in the counting result. The state transition matrix of the Kalman filter and the observation noise R are optimized based on the real-time speed V of the conveyor chain. When V = 0.5 m / s, R = 0.05 is set; when V = 2 m / s, R = 0.1 is set, and an acceleration term is added. Step 4, Counting Result Verification: Set the conveyor speed V of the conveyor chain and the duck hanging distance L per unit time, and calculate the theoretical count Ntheoretical = V*T / L (T is the unit time). At the same time, set a consistency check for the features of a single duck. The similarity of the features of each valid duck at the entry and exit points is greater than or equal to 90%. Otherwise, it is marked as abnormal and a single frame backtracking is triggered. The actual count N(actual) is compared with N(theoretical). When the absolute value of N(actual)-N(theoretical) is less than or equal to 1, the counting result is determined to be valid. When the absolute value of N(actual)-N(theoretical) is greater than or equal to 2, the image backtracking verification is triggered, and the duck features in this time period are re-extracted and counted. Step 5, Hardware and software collaborative optimization: Using the linkage control of laser structured light and supplementary light, when multiple ducks are detected to be densely blocking, the laser dot density is automatically increased to 80 points per square centimeter while the supplementary light brightness is reduced by 30%. An FPGA chip is embedded at the industrial camera end, and 50% of the computing power of core algorithms such as feature extraction and occlusion restoration is moved to the front end, reducing the processing delay from 30ms to 10ms. At the same time, the counter (6) is connected to the encoder data of the conveyor chain and the work order data of the duck feeding system. The encoder provides real-time feedback of the conveying distance, and the work order data provides the theoretical feeding quantity. The visual count, encoder distance count and work order quantity are triple cross-checked. When the deviation of the three is greater than 2, the production line is automatically paused and an alarm is triggered.
5. The quantity counting device for duck meat processing as described in claim 1, characterized in that: The data output module (4) includes a data display screen, which displays the instantaneous count and cumulative count of the hanging ducks in real time.
6. The quantity counting device for duck meat processing as described in claim 1, characterized in that: The environment adaptation module (5) is configured with a fog-proof and waterproof cover for the hardware acquisition module (1) and a workshop environment parameter adaptive adjustment module is set for the software processing end.
7. The quantity counting device for duck meat processing as described in claim 1, characterized in that: The rear side of the locking component (61) is coaxially fixedly connected to the locking plate (6101) via a connecting rod. The front side of the locking plate (6101) is provided with a locking block (6102). The locking block (6102) is locked onto the back of the front panel of the counter (6), and a spring is provided between the front panel of the counter (6) and the back of the locking component (61).
8. The quantity counting device for duck meat processing as described in claim 7, characterized in that: The first support frame (62) has a slot on its rear side, into which the insert rod of the second support frame (63) is inserted. A connecting plate (601) is fixedly welded to the left side of the first support frame (62) and the second support frame (63). A sleeve is welded to the right side of the first support frame (62) and the second support frame (63), with a rotating shaft clamped inside the sleeve. Nuts are installed at both ends of the rotating shaft. The bottom clamps of the first support frame (62) and the second support frame (63) are clamped to the outside of the guide rail. The connecting plate (601)... An internal through slot is provided, and an electrically controlled lifting rod (64) is installed inside the through slot. The moving rod of the electrically controlled lifting rod (64) is rotatably connected to two baffles (6401) via a shaft. The two baffles (6401) are respectively snapped into the upper and lower sides of the connecting plate (601). A laser range sensor (6402) is installed on the top of the moving rod of the electrically controlled lifting rod (64). The laser range sensor (6402) works in conjunction with the hardware acquisition module (1), and the electrically controlled lifting rod (64) works in conjunction with the adaptive adjustment module.
