A method for monitoring heart rate using millimeter wave radar
By setting signs on the surface of breeding animals and combining cameras and millimeter wave radar technology, the difficulty in measuring heart rate caused by unfixed activity positions and group interference in breeding animals is solved, and accurate and fast measurement of the heart rate of breeding animals in Musaceae is achieved.
Patent Information
- Application Number
- CN202411896219.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-23
- Publication Date
- 2025-04-18
- Estimated Expiration
- 2044-12-23
AI Technical Summary
Due to the unfixed activity position of farmed animals and the interference of other individuals in the population, it is difficult for the prior art to achieve accurate and quick measurement of the heart rate of Musk-farmed animals.
By setting a rectangular sign with a specific proportion on the body surface of the breeding animals, and combining the use of cameras and millimeter wave radar, identifying the serial number on the sign, calculating the offset angle, and controlling the emission angle of the millimeter wave radar to achieve heart rate measurement of the target breeding animals.
Accurate and quick measurement of the heart rate of animals raised in Musaceae family is achieved, avoiding measurement difficulties caused by unfixed animal activities and population interference.
Smart Images

Figure CN119344700B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of animal medicine, and in particular to a method for monitoring heart rate by using millimeter wave radar. Background Art
[0002] With the development of science and technology, the animal husbandry industry is also constantly introducing new technologies and methods to improve production efficiency and animal welfare. In the breeding process of musk deer, monitoring the physiological state of animals, especially heart rate, is of great significance for ensuring animal health, improving reproductive efficiency and timely detection of diseases. Traditional heart rate monitoring methods often require contact with animals, which may not only cause stress reactions in animals and affect the accuracy of measurement results, but also be very difficult to implement in some cases.
[0003] As a non-contact measurement technology, millimeter wave radar has the advantages of strong penetration and is not restricted by light and weather conditions, making it an ideal choice for monitoring animal physiological parameters.
[0004] However, when millimeter-wave radar is used to monitor the heart rate of farmed animals of the Musk Family, due to the unstable activity positions of the farmed animals and the interference of other individuals in the group, it is necessary to first determine the position of a certain farmed animal and then measure it. Driving the farmed animals one by one into the measurement range of the millimeter-wave radar is time-consuming and laborious. Based on this, the present invention proposes a method for monitoring heart rate using millimeter-wave radar to ensure accurate and fast measurement of the heart rate of target farmed animals. Summary of the invention
[0005] The purpose of the present invention is to provide a method for monitoring heart rate using millimeter wave radar to solve the following technical problems:
[0006] Since the activity locations of farmed animals are not fixed and there is interference from other individuals in the group, it is necessary to first determine the location of a farmed animal before taking measurements.
[0007] The purpose of the present invention can be achieved through the following technical solutions:
[0008] A method for monitoring heart rate using millimeter wave radar, applied to musk deer breeding animals, comprises the following steps:
[0009] S1: A rectangular signboard with a specific proportion is set on the body surface of the farmed animal. A serial number is marked on the surface of each signboard. Each farmed animal has a unique serial number.
[0010] S2: Setting measurement points, which include cameras and millimeter-wave radars. When the heart rate of a target farmed animal needs to be measured, an initial image of the farmed animal group is captured by the camera, all signboards are identified from the initial image, and the pixel size of each signboard is obtained, and the pixel size is compared with a set threshold value;
[0011] S3: For a signboard with a pixel size greater than or equal to a set threshold, directly identify the serial number on the surface of the signboard, and determine whether it is a target farmed animal based on the serial number;
[0012] S4: For a signboard whose pixel size is smaller than a set threshold, calculate the ratio k of the pixel length A of the short side in the set threshold to the pixel length a of the short side of the signboard, set the focal length of the camera after zooming according to the ratio k, so that the imaging size of the signboard after zooming is greater than or equal to the set threshold, and obtain the position of the pixel point in the signboard that is farthest from the center point of the initial photo, and judge whether the signboard is within the camera viewing angle after zooming according to the position of the pixel point, if so, the camera shooting angle remains unchanged, if not, calculate the offset angle of the camera, and then identify the serial number of the signboard surface according to the image taken by the camera after zooming, and judge whether it is the target farmed animal according to the serial number;
[0013] S5: Select the sign corresponding to the target farmed animal and obtain the position of the sign in the initial image, determine the offset angle between the target farmed animal and the measurement point according to the position, control the millimeter wave radar to transmit the millimeter wave signal to the angle, and analyze and calculate the heart rate of the target farmed animal according to the received echo signal.
[0014] As a further solution of the present invention: in S2, the process of setting the measurement point is:
[0015] The distance range of the heart of the farmed animal from the ground is obtained, and the installation height of the measuring point is set to the midpoint of the distance range.
[0016] As a further solution of the present invention: In S4, the specific process of setting the focal length of the camera after zooming according to the ratio k is:
[0017] The focal length of the camera when capturing the initial image is marked as f, and the value of kf is calculated and rounded up to obtain the focal length after zooming.
[0018] As a further solution of the present invention: In S4, the position of the pixel point in the sign that is farthest from the center point of the photo is obtained, and the specific process of judging whether the sign is within the camera's viewing angle after zooming according to the position of the pixel point is as follows:
[0019] A rectangular coordinate system is established with the center point of the initial photo as the origin. The unit of the coordinate system is pixel length. The pixel point in the sign that is farthest from the center point of the photo is marked as the key point. The pixel distance l between the key point coordinates and the vertical axis is calculated, and the pixel length L in the horizontal direction of the initial photo is obtained. The value of 2l / L is calculated and compared with 1 / k. If 2l / L is less than or equal to 1 / k, it is determined that the sign is within the camera's field of view after zooming. If 2l / L is greater than 1 / k, it is determined that the sign is not within the camera's field of view after zooming.
[0020] As a further solution of the present invention: in S4 or S5, the specific calculation process of the offset angle is:
[0021] Based on the calibration tool provided by OpenCV, the initial image is subjected to distortion correction processing, the resolution and physical size of the initial image are obtained, the actual physical size p of each pixel in the camera sensor is calculated, the imaging physical size w=pa of the short side is calculated according to the pixel length a of the short side of the sign, and the actual physical size W of the short side of the sign and the focal length f of the initial image are obtained. The calculation formula of the front-to-back distance d between the sign and the camera is:
[0022] ;
[0023] Based on the actual physical size W of the short side of the sign and the pixel length a, the simulated physical size P of each pixel point at distance d is calculated, and the offset distance l'=Pl between the key point of the sign and the front of the camera is calculated based on the pixel distance l. Based on the obtained front-to-back distance d and the offset distance l', the offset angle between the key point of the sign and the front of the camera is obtained through the tangent function.
[0024] As a further solution of the present invention: the signboard is arranged just above the heart position of the farmed animal, and the offset angle between the target farmed animal and the measuring point is equal to the offset angle.
[0025] As a further solution of the present invention: In S5, the specific process of analyzing and calculating the heart rate of the target farmed animal according to the received echo signal is as follows:
[0026] The echo signal is preprocessed to filter out noise in the echo signal, the phase signal in the echo signal is analyzed by a phase unwrapping algorithm, the respiratory signal and the heartbeat signal in the phase signal are separated by a filter, the heartbeat signal is Fourier transformed, and the heartbeat frequency is calculated.
[0027] As a further solution of the present invention: in S2, there are multiple measuring points, and the multiple measuring points are circumferentially arranged around the farmed animal, and the heart rate of the target farmed animal is measured only through the measuring points that are not blocked.
[0028] Beneficial effects of the present invention:
[0029] The present invention sets a sign on the body surface of the farmed animals to distinguish the farmed animals. In order to prevent the activities of the farmed animals from being affected, the sign is set relatively small. Since the activity position of the farmed animals is not fixed, they sometimes wander to a position far away from the measurement point, making them difficult to identify. Therefore, the present invention first screens rectangular sign with a specific proportion to determine the position of the farmed animals, and then judges whether the serial number on the surface of the sign can be normally identified according to the pixel size of the sign in the image. Only when the pixel size of the sign is greater than a set threshold, the serial number will be identified, and for the sign smaller than the set size, zoom magnification processing is performed to ensure that there is no misjudgment of the identity of the target farmed animals, and by calculating the offset angle between the sign and the measurement point in the imaging, the emission angle of the millimeter wave radar is controlled to ensure that it is aligned with the target farmed animal to be measured, thereby achieving accurate heart rate measurement. BRIEF DESCRIPTION OF THE DRAWINGS
[0030] The present invention will be further described below in conjunction with the accompanying drawings.
[0031] Figure 1 It is a schematic diagram of the process of the present invention. DETAILED DESCRIPTION
[0032] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0033] See also Figure 1 As shown, a method for monitoring heart rate using millimeter wave radar is applied to musk deer breeding animals, comprising the following steps:
[0034] S1: A rectangular signboard with a specific proportion is set on the body surface of the farmed animal. Each signboard is marked with a serial number, and each farmed animal has a unique serial number. This step is the basis of the entire heart rate monitoring method, ensuring that each farmed animal can be accurately identified and located in the subsequent steps.
[0035] Specifically, first, it is necessary to design rectangular signs of appropriate size according to the size and characteristics of the farmed animals. These signs should have sufficient contrast and visibility so that they can be clearly identified in the images captured by the camera. At the same time, the signs need to be marked with serial numbers, which are unique and correspond to each farmed animal. In this way, in the subsequent image processing process, the corresponding farmed animal can be determined by identifying the serial number on the sign;
[0036] S2: Setting the measurement point is one of the core links of the entire monitoring system, which directly affects the accuracy and effectiveness of data collection. First, we need to obtain the distance range of the heart of the farmed animals from the ground. This can be achieved through actual measurement or reference to existing data. Once this distance range is determined, we can set the installation height of the measurement point to the midpoint of the distance range. The purpose of this is to ensure that the millimeter wave radar can accurately capture the heartbeat signal of the farmed animals, thereby improving the accuracy of heart rate monitoring.
[0037] The measuring points include two devices: cameras and millimeter-wave radars. Since the present invention does not involve the detection and identification of complex target objects, but only includes the identification of graphics and numbers, based on this, the pixel resolution of the camera uses a 2-megapixel sensor to reduce the load on the overall data calculation, and based on the smaller-format sensor, a higher zoom ratio can also be achieved. In order to achieve all-round monitoring, we need to set up multiple measuring points around the farmed animals. These measuring points should be evenly distributed to ensure that no matter where the target farmed animals are, there is at least one measuring point that can effectively monitor them. At the same time, in order to avoid data loss due to occlusion, we also need to ensure that each measuring point can cover a certain area and will not be interfered with by other objects.
[0038] When we need to measure the heart rate of a target farm animal, we first use a camera to capture an initial image of the farm animal group. This image will serve as the basic data for subsequent processing. From the initial image, we can identify all the signboards and obtain the pixel size of each signboard. Then, we compare these pixel sizes with the preset threshold of 60*40 to determine which signboards are clearly visible and which may be blurred due to being too far away or at a bad angle.
[0039] S3: For a signboard with a pixel size greater than or equal to a set threshold, directly identify the serial number on the surface of the signboard, and determine whether it is a target farmed animal based on the serial number;
[0040] For those signs whose pixel size is greater than or equal to the set threshold, we can assume that they are clearly visible, so we can directly identify the serial number on their surface. This serial number is unique and corresponds to each farmed animal. By comparing this serial number, we can determine whether the target farmed animal currently being monitored is the one we want to measure. If so, we can continue with subsequent data processing and analysis;
[0041] S4: For signboards whose pixel size is smaller than the set threshold, a series of measures need to be taken to ensure that they are clearly visible. First, calculate the ratio k of the pixel length 40 of the short side of the set threshold 60*40 to the pixel length a of the short side of the signboard. This ratio reflects the gap between the current size of the signboard and the ideal size. Next, mark the focal length of the camera when it takes the initial image as f, then calculate the value of kf and round it up to get the focal length after zooming. For example, if the initial focal length of the camera lens is 24mm, when k is 2.2, then kf=52.8mm, round up, and use 53mm as the focal length after zooming. The purpose of doing this is to adjust the focal length so that the imaging size of the signboard after zooming is greater than or equal to the set threshold, thereby improving the clarity of the signboard and thus improving its visibility.
[0042] To make this process more accurate, we need to establish a rectangular coordinate system with the center point of the initial photo as the origin, and the unit of the coordinate system is pixel length. In this coordinate system, we can accurately describe the position and shape of the sign. Next, we mark the pixel point in the sign that is farthest from the center point of the photo as a key point. The selection of this key point helps us determine the position and angle of the sign in the image.
[0043] Then, we calculate the pixel distance l between the key point coordinates and the vertical axis, and obtain the pixel length L in the horizontal direction of the initial photo. These two parameters are crucial for determining whether the sign is within the camera's field of view after zooming. By calculating the value of 2l / L and comparing it with 1 / k, we can draw a conclusion: if 2l / L is less than or equal to 1 / k, the sign is determined to be within the camera's field of view after zooming; otherwise, it is not. If the sign is within the camera's field of view after zooming, then we can continue to use the current camera shooting angle for subsequent monitoring;
[0044] If 2l / L is greater than the ratio k, it is determined that the sign is not within the camera's field of view after zooming, and the camera's offset angle is calculated. We need to consider adjusting the camera's angle or position to ensure that the sign can be clearly captured, and then identify the serial number on the sign's surface based on the image taken by the camera after zooming, and determine whether it is the target farmed animal based on the serial number. The specific calculation process of the offset angle is:
[0045] Due to the optical characteristics of the lens, the image often suffers from distortion during shooting. This distortion is mainly manifested as stretching or compression of the edge of the picture, which makes the straight line curved, affecting the authenticity and aesthetics of the image. In order to correct the distortion caused by the wide-angle lens, the initial image is subjected to distortion correction processing based on the calibration tool provided by OpenCV, the intrinsic parameters and distortion parameters are obtained by calibrating the camera, and then the input image is subjected to distortion correction.
[0046] Get the resolution of the initial image and the physical size of the sensor frame. For each pixel in the photo, there are two corresponding sizes. One is the actual physical size of the pixel on the sensor, which is obtained by dividing the actual physical size of any side of the sensor by the pixel length. The other is the part of an object corresponding to the pixel in the image, that is, the size of the imaging scene represented by the pixel, which is the simulated physical size.
[0047] When calculating the actual physical size p of each pixel in a camera sensor, we need to consider the resolution and size of the sensor. Resolution refers to the number of pixels on the sensor, while size refers to the actual physical size of the sensor. With these two parameters, we can calculate the actual physical size p of each pixel.
[0048] Once we have the actual physical size p of each pixel, we can calculate the imaged physical size w of the short side based on the pixel length a of the short side of the sign. This calculation is very simple, just multiply the pixel length a by the physical size p of each pixel to get the imaged physical size w of the short side.
[0049] Next, we need to obtain the actual physical size W of the short side of the sign in space, and the focal length f of the initial image. These two parameters are crucial for calculating the front-to-back distance d between the sign and the camera. With these parameters, we can use trigonometric functions to calculate the front-to-back distance d:
[0050] ;
[0051] Specifically, we can use the tangent function to obtain the offset angle between the key point of the sign and the front of the camera. First, we need to calculate the simulated physical size P of each pixel at a distance d based on the actual physical size W of the short side of the sign and the pixel length a. Then, we can calculate the offset distance l'=Pl between the key point of the sign and the front of the camera based on the pixel distance l. Finally, through the tangent function, we can get the angle between the front-to-back distance d and the offset distance l', which is the offset angle between the key point of the sign and the front of the camera. Since the sign is set directly above the heart of the farmed animal, the offset angle between the target farmed animal and the measuring point is equal to the offset angle of the camera.
[0052] S5: Based on the location information of the signboard and the same method as above, determine the offset angle between the target farmed animal and the measurement point. This angle reflects the direction and distance of the target farmed animal relative to the measurement point. The working principle of millimeter wave radar is based on transmitting millimeter wave signals and receiving signals reflected from the target object. If the angle between the radar and the target animal is inaccurate, it may cause the signal reflection to deviate from the optimal receiving path, thereby weakening the signal strength. The weakening of signal strength will directly affect the quality of signal processing, increase the possibility of noise interference, and thus affect the accuracy of heart rate calculation. In order to achieve accurate monitoring, we need to control the millimeter wave radar to transmit millimeter wave signals to this specific angle.
[0053] When the millimeter wave signal emitted by the millimeter wave radar encounters the target farmed animals, an echo signal is generated. These echo signals contain rich information, but they may also contain a lot of noise. Therefore, we need to pre-process the echo signal to filter out the noise and other interference factors.
[0054] The preprocessed echo signal needs to be further analyzed to extract useful information. We can analyze the phase signal in the echo signal through the phase unwrapping algorithm. Phase unwrapping is a mathematical method that can convert complex phase signals into a form that is easier to understand and process. By analyzing the phase signal, we can obtain information about the heartbeat and breathing of the target farmed animals.
[0055] However, it is not enough to just get the phase signal, we also need to separate it from the breathing signal and heartbeat signal. This can be achieved by using a filter. A filter is an electronic device or software tool that selectively passes or blocks signals based on a specific frequency range. By setting appropriate filter parameters, we can separate the breathing signal and heartbeat signal from the phase signal.
[0056] The last step is to perform Fourier transform on the heartbeat signal. Fourier transform is a mathematical method that can convert a signal in the time domain into a signal in the frequency domain. Through Fourier transform, we can calculate the frequency of the heartbeat signal, that is, the number of heartbeats per minute (BPM). This data is crucial for assessing the health status of farmed animals.
[0057] The above formulas are all dimensionless and numerical calculations. The formula is a formula for the most recent real situation obtained by collecting a large amount of data and performing software simulation. The preset parameters and thresholds in the formula are set by technicians in this field according to actual conditions.
[0058] The above is only a specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any person skilled in the art who is familiar with the present technical field can easily think of changes or substitutions within the technical scope disclosed in the present application, which should be included in the protection scope of the present application. Therefore, the protection scope of the present application should be based on the protection scope of the claims.
[0059] The above is a detailed description of an embodiment of the present invention, but the content is only a preferred embodiment of the present invention and cannot be considered to limit the scope of implementation of the present invention. All equivalent changes and improvements made within the scope of the present invention should still fall within the scope of the patent coverage of the present invention.
Claims
1. A method for monitoring heart rate using millimeter wave radar, applied to musk farmed animals, characterized in that: The following steps are involved: S1: A rectangular signboard with a specific proportion is set on the body surface of the farmed animal. A serial number is marked on the surface of each signboard. Each farmed animal has a unique serial number. S2: Setting measurement points, which include cameras and millimeter-wave radars. When the heart rate of a target farmed animal needs to be measured, an initial image of the farmed animal group is captured by the camera, all signboards are identified from the initial image, and the pixel size of each signboard is obtained, and the pixel size is compared with a set threshold value; S3: For a signboard with a pixel size greater than or equal to a set threshold, directly identify the serial number on the surface of the signboard, and determine whether it is a target farmed animal based on the serial number; S4: For a signboard whose pixel size is smaller than a set threshold, calculate the ratio k of the pixel length A of the short side in the set threshold to the pixel length a of the short side of the signboard, set the focal length of the camera after zooming according to the ratio k, so that the imaging size of the signboard after zooming is greater than or equal to the set threshold, and obtain the position of the pixel point in the signboard that is farthest from the center point of the initial photo, and judge whether the signboard is within the camera viewing angle after zooming according to the position of the pixel point, if so, the camera shooting angle remains unchanged, if not, calculate the offset angle of the camera, and then identify the serial number of the signboard surface according to the image taken by the camera after zooming, and judge whether it is the target farmed animal according to the serial number; S5: Select the sign corresponding to the target farmed animal and obtain the position of the sign in the initial image, determine the offset angle between the target farmed animal and the measurement point according to the position, control the millimeter wave radar to transmit the millimeter wave signal to the angle, and analyze and calculate the heart rate of the target farmed animal according to the received echo signal.
2. The method for monitoring heart rate using millimeter wave radar according to claim 1, characterized in that: In S2, the process of setting the measurement point is: The distance range of the heart of the farmed animal from the ground is obtained, and the installation height of the measuring point is set to the midpoint of the distance range.
3. The method for monitoring heart rate using millimeter wave radar according to claim 2, characterized in that: In S4, the specific process of setting the focal length of the camera after zooming according to the ratio k is as follows: The focal length of the camera when capturing the initial image is marked as f, and the value of kf is calculated and rounded up to obtain the focal length after zooming.
4. The method for monitoring heart rate using millimeter wave radar according to claim 3, characterized in that: In S4, the specific process of obtaining the position of the pixel point in the sign that is farthest from the center point of the photo and judging whether the sign is within the camera's viewing angle after zooming according to the position of the pixel point is as follows: A rectangular coordinate system is established with the center point of the initial photo as the origin. The unit of the coordinate system is pixel length. The pixel point in the sign that is farthest from the center point of the photo is marked as the key point. The pixel distance l between the key point coordinates and the vertical axis is calculated, and the pixel length L in the horizontal direction of the initial photo is obtained. The value of 2l / L is calculated and compared with 1 / k. If 2l / L is less than or equal to 1 / k, it is determined that the sign is within the camera's field of view after zooming. If 2l / L is greater than 1 / k, it is determined that the sign is not within the camera's field of view after zooming.
5. The method for monitoring heart rate using millimeter wave radar according to claim 4, characterized in that: In S4 or S5, the specific calculation process of the offset angle is: Based on the calibration tool provided by OpenCV, the initial image is subjected to distortion correction processing, the resolution and physical size of the initial image are obtained, the actual physical size p of each pixel in the camera sensor is calculated, the imaging physical size w=pa of the short side is calculated according to the pixel length a of the short side of the sign, and the actual physical size W of the short side of the sign and the focal length f of the initial image are obtained. The calculation formula of the front-to-back distance d between the sign and the camera is: ; Based on the actual physical size W of the short side of the sign and the pixel length a, the simulated physical size P of each pixel point at distance d is calculated, and the offset distance l'=Pl between the key point of the sign and the front of the camera is calculated based on the pixel distance l. Based on the obtained front-to-back distance d and the offset distance l', the offset angle between the key point of the sign and the front of the camera is obtained through the tangent function.
6. The method for monitoring heart rate using millimeter wave radar according to claim 5, characterized in that: The sign is arranged just above the heart of the farmed animal, and the offset angle between the target farmed animal and the measuring point is equal to the offset angle of the camera.
7. The method for monitoring heart rate using millimeter wave radar according to claim 1, characterized in that: In S5, the specific process of analyzing and calculating the heart rate of the target farmed animal according to the received echo signal is as follows: The echo signal is preprocessed to filter out noise in the echo signal, the phase signal in the echo signal is analyzed by a phase unwrapping algorithm, the respiratory signal and the heartbeat signal in the phase signal are separated by a filter, the heartbeat signal is Fourier transformed, and the heartbeat frequency is calculated.
8. The method for monitoring heart rate using millimeter wave radar according to claim 1, characterized in that: In S2, a plurality of measuring points are provided, and the plurality of measuring points are circumferentially arranged around the farmed animal, and the heart rate of the target farmed animal is measured only through the measuring points that are not blocked.
Citation Information
Patent Citations
Pig body state monitoring method based on animal behaviors
CN113632749A
Tracking method, device and tracking system of moving target object
CN113645397A