A method, apparatus, device, and readable storage medium for measuring the heart rate of aquatic animals.

By using image processing and signal analysis techniques, heart rate signals of aquatic animals are obtained, solving the problems of low efficiency, intrusiveness, low throughput, and low accuracy of existing methods, and realizing efficient and non-destructive heart rate measurement of multiple aquatic animals.

CN117796340BActive Publication Date: 2026-04-03XIAMEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-01-02
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing methods for measuring the heart rate of aquatic animals are inefficient, invasive, have low throughput and low accuracy, and cannot efficiently and non-destructively monitor the heart rate of multiple aquatic animals.

Method used

Video frames of the heart region (ROI) of aquatic animals are acquired using an image acquisition device, preprocessed and spatially filtered, and then the resulting image sequence is subjected to dimensionality reduction and bandpass filtering. Finally, combined with ensemble empirical mode decomposition and fast Fourier transform, the true heart rate signal is selected.

Benefits of technology

It enables efficient and non-destructive monitoring of the heart rate of multiple aquatic animals, improving measurement efficiency and accuracy, and is suitable for high-throughput heart rate measurement in aquaculture.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN117796340B_ABST
    Figure CN117796340B_ABST
Patent Text Reader

Abstract

This invention provides a method, apparatus, device, and readable storage medium for measuring the heart rate of aquatic animals. It acquires video frames containing the heart region of multiple aquatic animals captured by an image acquisition device, and selects the heart region of interest (ROI) of all aquatic animals within the video frames. Each heart ROI is preprocessed and then spatially filtered to generate an image sequence of the heart ROI region. Each image in the heart ROI region image sequence is dimensionality-reduced in chronological order, and multiple signal values ​​are combined to generate a heart rate signal. The heart rate signal is bandpass filtered within a fixed frequency band, and then subjected to ensemble empirical mode decomposition to generate individual intrinsic mode functions (IMFs), followed by fast Fourier transform to generate a transform spectrum. The spectrum of the IMFs and the transform spectrum are compared to select the IMF containing the heart rate signal. This invention solves the problems of low efficiency, intrusiveness, low throughput, and low accuracy in existing aquatic animal heart rate measurement methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of heart rate measurement in aquatic animals, and particularly to a method, apparatus, device, and readable storage medium for measuring the heart rate of aquatic animals. Background Technology

[0002] In recent years, the demand for aquaculture products in my country has been increasing. However, due to problems such as pests and diseases and poor environmental resistance of seedlings, aquaculture faces uncontrollable cost losses. Although intelligent aquaculture systems have made some progress, they mainly rely on indirect monitoring to maintain the balance of the entire system, and cannot directly monitor the physiological status of aquatic animals. Furthermore, in the process of breeding resilient aquatic animals, it is necessary to monitor the physiological status of the aquatic animals and use this as an indicator to determine whether the aquatic animals have strong environmental resistance after conducting environmental comparison experiments.

[0003] Heart rate, as one of the most important vital signs in aquatic animals, is not only a common physiological characteristic of most aquatic animals but also the most suitable monitoring indicator. Heart rate can reflect the stress response or physiological changes of aquatic animals to environmental factors and pests. However, existing methods for obtaining aquatic animal heart rates have several drawbacks: manual counting is extremely inefficient and costly; electrode methods may harm aquatic animals, even leading to their death; photoplethysmography is a contact-based measurement method that can only measure one aquatic animal at a time, resulting in low efficiency. In summary, existing methods for measuring aquatic animal heart rates suffer from low efficiency, invasiveness, low throughput, and low accuracy.

[0004] In view of the above, this application is hereby submitted. Summary of the Invention

[0005] This invention discloses a method, apparatus, device, and readable storage medium for measuring the heart rate of aquatic animals, aiming to solve the problems of low efficiency, invasiveness, low throughput, and low accuracy in existing methods for measuring the heart rate of aquatic animals.

[0006] The first embodiment of the present invention provides a method for measuring the heart rate of aquatic animals, comprising:

[0007] Acquire video frames containing the heart region of multiple aquatic animals captured by the image acquisition device, and select the heart ROI region of all aquatic animals in the video frames.

[0008] Each of the said cardiac ROI regions is preprocessed, and spatial filtering is performed on each of the preprocessed cardiac ROI regions to generate an image sequence of cardiac ROI regions.

[0009] The image sequence of the heart ROI region is dimensionality reduced in chronological order to generate multiple signal values, and the multiple signal values ​​are combined to generate a heart rate signal.

[0010] The heart rate signal is bandpass filtered within a fixed frequency band. The bandpass filtered heart rate signal is then subjected to ensemble empirical mode decomposition to generate individual intrinsic mode functions (IMFs). Finally, fast Fourier transform is performed on each IMF and the bandpass filtered heart rate signal to generate IMF spectrum and transform spectrum, respectively.

[0011] The intrinsic mode function (IMF) is compared with the transformed spectrum to select an IMF containing a heart rate signal, wherein the IMF is the actual heart rate signal.

[0012] Preferably, the preprocessing of each cardiac ROI region specifically includes:

[0013] Gaussian blurring and grayscale conversion are performed sequentially on each of the cardiac ROI regions, wherein the grayscale conversion is one or more of the following methods: average value method, weighted average value method, maximum value method, and minimum value method.

[0014] Preferably, the step of performing spatial filtering on each of the preprocessed cardiac ROI regions to generate an image sequence of the cardiac ROI regions specifically involves:

[0015] For each preprocessed cardiac ROI region, nonlinear histogram equalization, two-level Gaussian downsampling, two-level Gaussian upsampling, and nonlinear histogram equalization are performed sequentially to generate an image sequence of the cardiac ROI region.

[0016] The nonlinear mapping function for the nonlinear histogram equalization is as follows:

[0017]

[0018] Where J(i,j) is the pixel value in the i-th row and j-th column of the ROI region before transformation, J ′ (i,j) represents the pixel value in the i-th row and j-th column of the transformed ROI region, m represents the average pixel value of the current ROI region, and E ranges from 1 to 100.

[0019] The two-level Gaussian downsampling is to perform two Gaussian downsampling operations sequentially. The Gaussian downsampling operation first performs Gaussian filtering on each pixel of the image, and then reduces the width and height of the image according to the downsampling factor to generate the downsampled image.

[0020] The two-level Gaussian upsampling involves performing two Gaussian upsampling operations sequentially. The Gaussian upsampling operation first applies Gaussian filtering to each pixel of the image to recover some image details, and then enlarges the width and height of the image according to the upsampling factor to generate the upsampled image.

[0021] Preferably, the step of dimensionality reduction of each image in the image sequence of the cardiac ROI region in time sequence to generate multiple signal values, and combining the multiple signal values ​​to generate a heart rate signal, specifically involves:

[0022] The average pixel value is generated by summing all pixel values ​​in each image of the image sequence of the cardiac ROI region and dividing by the number of pixels. Multiple average pixel values ​​are then combined in chronological order to obtain the heart rate signal.

[0023] The maximum or minimum pixel value is extracted from each image in the image sequence of the heart ROI region to generate an extraction signal. Multiple extraction signals are combined in time sequence to obtain a heart rate signal.

[0024] Preferably, the bandpass filter is one or more of ideal bandpass filtering, Chebyshev filtering, and Butterworth filtering.

[0025] Preferably, the step of performing ensemble empirical mode decomposition on the bandpass-filtered heart rate signal to generate individual intrinsic mode functions specifically involves:

[0026] S1041, Randomly generate a set of noise signals, and add the set of noise signals to the bandpass filtered heart rate signal to generate an added signal;

[0027] S1042, Perform an empirical mode decomposition on the added signal to obtain a set of intrinsic mode functions;

[0028] Repeat steps S1041 and S1042 a preset number of times to obtain multiple sets of intrinsic mode functions. Add up the corresponding intrinsic mode functions in all intrinsic mode function sets and take the average to obtain the final intrinsic mode function set, which contains multiple intrinsic mode functions.

[0029] Preferably, the step of comparing the intrinsic mode function spectrum and the transformed spectrum to select the intrinsic mode function containing the heart rate signal specifically involves:

[0030] Peak values ​​are extracted from the spectrum after the Fast Fourier Transform to obtain the peak frequency f in the frequency domain;

[0031] A window size is determined, with the peak frequency at the center of the window. The power spectral energy within the frequency band is calculated based on the spectrum of all intrinsic mode functions within the window, wherein the selected intrinsic mode function is the intrinsic mode function with the largest power spectral energy within the window.

[0032] The second embodiment of the present invention provides a device for measuring the heart rate of aquatic animals, comprising:

[0033] The selection unit is used to acquire video frames containing the heart region of multiple aquatic animals acquired by the image acquisition device, and to select the heart ROI region of all aquatic animals in the video frames.

[0034] A preprocessing unit is used to preprocess each of the cardiac ROI regions and perform spatial filtering on each of the preprocessed cardiac ROI regions to generate an image sequence of the cardiac ROI regions.

[0035] The dimension reduction unit is used to reduce the dimension of each image in the image sequence of the cardiac ROI region in time sequence to generate multiple signal values, and to combine the multiple signal values ​​to generate a heart rate signal.

[0036] The filtering unit is used to perform bandpass filtering on the heart rate signal within a fixed frequency band, perform ensemble empirical mode decomposition on the bandpass-filtered heart rate signal to generate various intrinsic mode functions, and perform fast Fourier transform on each intrinsic mode function and the bandpass-filtered heart rate signal to generate intrinsic mode function spectrum and transform spectrum, respectively.

[0037] The comparison unit compares the spectrum of the intrinsic mode function with the transformed spectrum to select the intrinsic mode function containing the heart rate signal, wherein the intrinsic mode function is the actual heart rate signal.

[0038] The third embodiment of the present invention provides an aquatic animal heart rate measuring device, including a memory and a processor. The memory stores a computer program, which can be executed by the processor to implement an aquatic animal heart rate measuring method as described in any of the above embodiments.

[0039] The fourth embodiment of the present invention provides a computer-readable storage medium storing a computer program, which can be executed by a processor of the device in which the computer-readable storage medium is located, to implement the aquatic animal heart rate measurement method as described in any of the above embodiments.

[0040] Based on the present invention, a method, apparatus, device, and readable storage medium for measuring the heart rate of aquatic animals are provided. First, video frames containing the heart region of multiple aquatic animals are acquired by the image acquisition device, and the heart region of interest (ROI) of all aquatic animals in the video frames is selected. Next, each heart ROI is preprocessed, and spatial filtering is performed on each preprocessed heart ROI to generate an image sequence of the heart ROI. Then, each image in the heart ROI image sequence is dimensionality-reduced in chronological order to generate multiple signal values, and these multiple signal values ​​are combined to generate a heart rate signal. Next, the heart rate signal is bandpass filtered within a fixed frequency band, and ensemble empirical mode decomposition is performed on the bandpass-filtered heart rate signal to generate individual intrinsic mode functions (IMFs). Fast Fourier transforms are performed on each IMF and the bandpass-filtered heart rate signal to generate IMF spectra and transform spectra, respectively. Finally, the spectra of the IMFs and the transform spectra are compared to select the IMFs containing the heart rate signal, wherein the IMFs are the actual heart rate signals. This method solves the problems of low efficiency, invasiveness, low throughput, and low accuracy in existing methods for measuring heart rate in aquatic animals. Attached Figure Description

[0041] Figure 1 This is a flowchart illustrating a method for measuring the heart rate of aquatic animals according to the first embodiment of the present invention;

[0042] Figure 2 This is a schematic diagram of the cardiac ROI region selection provided by the present invention;

[0043] Figure 3 This is a schematic diagram comparing the spatiotemporal sequences of ROI image processing before and after the present invention.

[0044] Figure 4 This is a schematic diagram comparing heart rate signals and spectra before and after bandpass filtering provided by the present invention;

[0045] Figure 5 This is a schematic diagram of the ensemble empirical mode decomposition and intrinsic mode function spectrum comparison and selection provided by the present invention.

[0046] Figure 6 This is a schematic diagram of the actual heart rate signal peak detection provided by the present invention;

[0047] Figure 7 This is a visualization of the linear correlation between the measurement results and the manual counting measurement results provided by this invention.

[0048] Figure 8 This is a schematic diagram of a module for measuring the heart rate of an aquatic animal, provided in the second embodiment of the present invention. Detailed Implementation

[0049] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the 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.

[0050] To better understand the technical solution of the present invention, the embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0051] It should be understood that the described embodiments are merely some, not all, of the embodiments of the present invention. All other embodiments obtained by those skilled in the art based on the embodiments of the present invention without inventive effort are within the scope of protection of the present invention.

[0052] The terminology used in the embodiments of this invention is for the purpose of describing particular embodiments only and is not intended to limit the invention. The singular forms “a,” “the,” and “the” as used in the embodiments of this invention and the appended claims are also intended to include the plural forms unless the context clearly indicates otherwise.

[0053] It should be understood that the term "and / or" used in this article is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Additionally, the character " / " in this article generally indicates that the preceding and following related objects have an "or" relationship.

[0054] Depending on the context, the word "if" as used here can be interpreted as "when," "when," "in response to determination," or "in response to detection." Similarly, depending on the context, the phrase "if determination" or "if detection (of the stated condition or event)" can be interpreted as "when determination," "in response to determination," "when detection (of the stated condition or event)," or "in response to detection (of the stated condition or event)."

[0055] The terms "first" and "second" used in the embodiments are merely to distinguish similar objects and do not represent a specific ordering of objects. It is understood that "first" and "second" can be interchanged in a specific order or sequence where permissible. It should be understood that the objects distinguished by "first" and "second" can be interchanged where appropriate so that the embodiments described herein can be implemented in orders other than those illustrated or described herein.

[0056] The specific embodiments of the present invention will be described in detail below with reference to the accompanying drawings.

[0057] This invention discloses a method, apparatus, device, and readable storage medium for measuring the heart rate of aquatic animals, aiming to solve the problems of low efficiency, invasiveness, low throughput, and low accuracy in existing methods for measuring the heart rate of aquatic animals.

[0058] Please see Figure 1 The first embodiment of the present invention provides a method for measuring the heart rate of aquatic animals, which can be executed by an aquatic animal heart rate measuring device (hereinafter referred to as the measuring device), and in particular, by one or more processors within the measuring device, to at least implement the following steps:

[0059] S101, acquire video frames of multiple aquatic animals containing the heart region acquired by the image acquisition device, and select the heart ROI region of all aquatic animals in the video frames.

[0060] In this embodiment, the measuring device can be a terminal with processing capabilities, such as a server, workstation, or laptop computer, which can communicate wirelessly or wiredly with the image acquisition device. The measuring device can be equipped with a corresponding operating system and application software, and the functions required in this embodiment can be realized through the combination of the operating system and application software.

[0061] It should be noted that the image acquisition module requires a light source to illuminate the aquatic animals, while simultaneously using a visible light camera to capture images of them. The light source can be, but is not limited to, red, green, blue, natural light, or any other color. The visible light camera can be, but is not limited to, a monochrome camera, a color camera, a high-resolution camera, a high-frame-rate camera, or any other type of camera. The ROI selection module acquires a frame from the video and selects the heart ROI region within that frame. The selected heart ROI region must cover the heart regions of all aquatic animals whose heart rate needs to be measured within the video frame. The shape of the heart ROI region includes, but is not limited to, rectangles, circles, irregular polygons, or any other shape.

[0062] Taking blue light irradiation of the Japanese tiger prawn (Litopenaeus vannamei) as an example, the activity area of ​​the prawn was captured using a visible light color camera. The acquired video was divided into multiple 30-second video frame sequences, and each video frame sequence was processed to obtain a real-time heart rate value. Please refer to [link / reference]. Figure 2 The heart region of the Japanese prawn is located near the posterior edge of the cephalothorax when viewed from the back. The heart ROI region was selected using a red rectangle to obtain video frame images of the heart ROI region of six Japanese prawns.

[0063] S102, preprocess each of the heart ROI regions, and perform spatial filtering on each of the preprocessed heart ROI regions to generate an image sequence of the heart ROI regions.

[0064] In this embodiment, the preprocessing process may include sequentially performing Gaussian blur and grayscale operations on each of the cardiac ROI regions. The grayscale operation can be one or more of the following: averaging, weighted averaging, maximum value, and minimum value methods. Gaussian blurring for ROI region image preprocessing can reduce noise and smooth image details, which is helpful for subsequent heart rate signal extraction.

[0065] Furthermore, the Gaussian blurred ROI region can be grayscaled. In this embodiment, the grayscale method used is the weighted average method, and the grayscale formula is:

[0066] Gray = 0.5 * B + 0.25 * R + 0.25 * G

[0067] In this formula, Gray represents the pixel value after grayscale conversion, and B, R, and G represent the blue, red, and green channel pixel values ​​of the original image, respectively. Compared to the conventional weighted average method, this formula increases the weight of the blue channel. This is because using blue light to illuminate the shrimp results in blue channel pixels containing more heart rate signals. By performing grayscale conversion on the ROI region, the ROI image is transformed from a three-channel signal to a single-channel signal. This preserves the heart rate signal while reducing the computation time of subsequent operations, providing a foundation for real-time implementation.

[0068] Furthermore, in this embodiment, each of the preprocessed cardiac ROI regions is sequentially subjected to nonlinear histogram equalization, two-level Gaussian downsampling, two-level Gaussian upsampling, and nonlinear histogram equalization to generate an image sequence of the cardiac ROI region.

[0069] The nonlinear mapping function for the nonlinear histogram equalization is as follows:

[0070]

[0071] Where J(i,j) is the pixel value in the i-th row and j-th column of the ROI region before transformation, J ′ (i,j) represents the pixel value in the i-th row and j-th column of the transformed ROI region, m represents the average pixel value of the current ROI region, and E ranges from 1 to 100.

[0072] The two-level Gaussian downsampling is to perform two Gaussian downsampling operations sequentially. The Gaussian downsampling operation first performs Gaussian filtering on each pixel of the image, and then reduces the width and height of the image according to the downsampling factor to generate the downsampled image.

[0073] The two-level Gaussian upsampling involves performing two Gaussian upsampling operations sequentially. The Gaussian upsampling operation first applies Gaussian filtering to each pixel of the image to recover some image details, and then enlarges the width and height of the image according to the upsampling factor to generate the upsampled image.

[0074] It's important to note that the purpose of spatial filtering is to improve image quality, reduce noise, enhance details, and provide a better visual effect. Specifically, the first nonlinear histogram equalization uses a nonlinear mapping function to enhance details while preserving the image's naturalness and brightness distribution. Gaussian downsampling is a blurring operation that reduces image resolution by averaging pixel values. The main function of two-stage Gaussian downsampling is to reduce image noise and detail, thus mitigating the impact of noise. This helps improve image quality, especially in low-light or noisy conditions. Gaussian upsampling is an interpolation operation that increases image resolution by increasing pixel values. The purpose of two-stage Gaussian upsampling is to restore image details and recover a blurred image to a higher resolution, reducing noise while preserving the heart rate signal. The second nonlinear histogram equalization aims to further improve image contrast, brightness distribution, and details by applying a nonlinear mapping function again to further enhance the image.

[0075] In this embodiment, the downsampling factor S = 2 for Gaussian downsampling and the upsampling factor U = 2 for Gaussian upsampling. Each Gaussian downsampling reduces the image size to half its original size, and each Gaussian upsampling enlarges the image size to twice its original size. Please refer to [link / reference]. Figure 3 Before and after processing with nonlinear histogram equalization, two-level Gaussian downsampling, two-level Gaussian upsampling, and nonlinear histogram equalization, the spatiotemporal sequence maps of the ROI region showed significant differences. Before processing, the signal-to-noise ratio was low, and the heart rate fluctuation signal was not obvious. After processing, the signal-to-noise ratio increased, and the fluctuation of the heart rate signal could be clearly seen, which facilitated subsequent heart rate extraction.

[0076] S103, dimensionality reduction is performed on each image in the image sequence of the heart ROI region in time sequence to generate multiple signal values, and the multiple signal values ​​are combined to generate a heart rate signal;

[0077] Specifically, in this embodiment, the average pixel value is generated by summing all pixel values ​​in each image of the image sequence of the heart ROI region and dividing by the number of pixels. The average pixel values ​​are then combined in time sequence to obtain the heart rate signal. That is, the average pixel value is extracted from the ROI region after the above image signal processing. The average pixel values ​​of the ROI region of each frame of the Japanese six-tailed shrimp are arranged in time sequence to obtain the heart rate signal of the Japanese six-tailed shrimp.

[0078] Another possible implementation is to extract the maximum or minimum pixel value from each image in the image sequence of the heart ROI region to generate an extraction signal, and combine multiple extraction signals in time sequence to obtain a heart rate signal. Of course, in other embodiments, other methods can be used to obtain the heart rate signal, which are not specifically limited here, but these solutions are all within the protection scope of this invention.

[0079] S104, bandpass filtering is performed on the heart rate signal within a fixed frequency band, ensemble empirical mode decomposition is performed on the bandpass filtered heart rate signal to generate each intrinsic mode function, and fast Fourier transform is performed on each intrinsic mode function and the bandpass filtered heart rate signal to generate the intrinsic mode function spectrum and the transform spectrum, respectively.

[0080] It should be noted that in this embodiment, the heart rate signal first needs to be ideally bandpass filtered. The bandpass filter is one or more of ideal bandpass filtering, Chebyshev filtering, and Butterworth filtering. Of course, in other embodiments, other methods can be used for bandpass filtering. No specific limitation is made here, but these schemes are all within the protection scope of this invention.

[0081] In this embodiment, the bandpass-filtered heart rate signal is subjected to ensemble empirical mode decomposition to generate individual intrinsic mode functions. The specific process can be as follows:

[0082] S1041, Randomly generate a set of noise signals, and add the set of noise signals to the bandpass filtered heart rate signal to generate an added signal;

[0083] S1042, Perform an empirical mode decomposition on the added signal to obtain a set of intrinsic mode functions;

[0084] Repeat steps S1041 and S1042 a preset number of times to obtain multiple sets of intrinsic mode functions. Add up the corresponding intrinsic mode functions in all intrinsic mode function sets and take the average to obtain the final intrinsic mode function set, which contains multiple intrinsic mode functions.

[0085] It should be noted that the heart rate range of the Japanese tiger prawn is 20–400 beats / min, and the cutoff frequency is set to 0.33–6.67 Hz based on this heart rate range. Please refer to [link / reference]. Figure 4 As a preprocessing part of the heart rate signal, an ideal bandpass filter can filter out DC and some high-frequency noise. Figure 4The data in the sample comes from 30 seconds of data from the ROI region of one Japanese tiger prawn. For the ideal bandpass filtered heart rate signal, ensemble empirical mode decomposition (EMD) is required. Specifically, the ideal bandpass filtered heart rate signal is decomposed into 7 intrinsic mode functions (IMFs) and 1 residual function. Fast Fourier Transform (FFT) is then performed on the 7 IMFs and the ideal bandpass filtered heart rate signal to obtain their spectra. Please refer to [link / reference]. Figure 5 The left side shows the time-domain signal, and the right side shows the frequency-domain spectrum obtained after the Fast Fourier Transform. The first row of signals is the heart rate signal after ideal bandpass filtering, the second to eighth rows of signals are the seven intrinsic mode functions after ensemble empirical mode decomposition, and the last row of signals is the residual term function.

[0086] S105, compare the spectrum of the intrinsic mode function with the transformed spectrum to select an intrinsic mode function containing a heart rate signal, wherein the intrinsic mode function is the actual heart rate signal.

[0087] Specifically, in this embodiment, a peak value extraction operation is performed on the spectrum after the fast Fourier transform to obtain the peak frequency f in the frequency domain;

[0088] A window size is determined, with the peak frequency f at the center of the window. The power spectral energy within the frequency band is calculated based on the spectrum of all intrinsic mode functions within the window, wherein the selected intrinsic mode function is the intrinsic mode function with the largest power spectral energy within the window.

[0089] It should be noted that the peak spectral density of the ideal bandpass filtered heart rate signal is approximately f ≈ 1.32 Hz. In this embodiment, the window size is determined to be w = 1 Hz. The power spectral energy within the frequency band fw / 2 to f+w / 2 Hz of all intrinsic mode functions is calculated, and the intrinsic mode function with the largest spectral energy is selected as the true heart rate signal.

[0090] The peak detection module performs peak detection on the actual heart rate signal. The peak detection method can use the `find_peaks` method from the SciPy library. (See also...) Figure 6 The system detected 38 local peaks, representing 38 heartbeats within 30 seconds. The heart rate calculation module calculated the heart rate by dividing the number of heartbeats by the duration of the captured video, resulting in a heart rate of 76 beats / min. Simultaneously, the heart rate observed and manually counted by the human eye also reached 76 beats / min.

[0091] It should be noted that the heart rate count can be obtained by peak detection of the real heart rate signal using peak finding algorithms, spike detection algorithms, or gradient-based detection algorithms. Specifically, it can include, but is not limited to, the following two calculation methods: one is to divide the heart rate count obtained by the peak detection module by the length of the video being collected to obtain the heart rate value; the other is to use the reciprocal of the time interval between adjacent peaks as the instantaneous heart rate value, and calculate the average or median of all instantaneous heart rate values ​​within the length of the video being collected to obtain the heart rate value.

[0092] To verify the robustness of the algorithm, 150 ROI region samples were randomly selected for 30 seconds each, and measurements according to this invention and manual counting were performed. Please refer to [link / reference]. Figure 7 The manual counting results and the measurement results of this embodiment are combined and mapped to the XY coordinate system. The linearly fitted line for all sample points is y = 1.0391x ± 3.2718. Furthermore, Pearson correlation coefficient analysis can measure the correlation between the manual counting results and the measurement results of this embodiment. The formula for Pearson correlation coefficient analysis is:

[0093]

[0094] Among them, HR c This is the result obtained from the present invention, HR p This is a result obtained manually. M c This is the average value of the data obtained in this invention. M p The heart rate is the average of manually calculated data. The calculated Pearson correlation coefficient is 0.9975, indicating a high positive correlation between the heart rate measured in this invention and the manually counted heart rate data.

[0095] The above results show that this embodiment has good reliability and accuracy, and can completely replace the manual heart rate measurement method, effectively improving the efficiency of heart rate measurement in aquatic animals. While heart rate is an important vital sign, traditional manual heart rate measurement methods cannot achieve high-throughput measurement, making experiments impossible. Although the electrode method provides accurate heart rate measurement, it causes significant damage to the Japanese tiger prawn, hindering breeding experiments. This embodiment allows for efficient advancement of shrimp breeding, enabling high-throughput heart rate measurement of Japanese tiger prawns without causing any harm.

[0096] Please see Figure 8 The second embodiment of the present invention provides a heart rate measuring device for aquatic animals, comprising:

[0097] The selection unit 201 is used to acquire video frames containing the heart region of multiple aquatic animals acquired by the image acquisition device, and to select the heart ROI region of all aquatic animals in the video frames.

[0098] The preprocessing unit 202 is used to preprocess each of the heart ROI regions and perform spatial filtering on each of the preprocessed heart ROI regions to generate an image sequence of the heart ROI regions.

[0099] The dimension reduction unit 203 is used to reduce the dimension of each image in the image sequence of the heart ROI region in time sequence to generate multiple signal values, and to combine the multiple signal values ​​to generate a heart rate signal.

[0100] The filtering unit 204 is used to perform bandpass filtering on the heart rate signal within a fixed frequency band, perform ensemble empirical mode decomposition on the bandpass-filtered heart rate signal to generate various intrinsic mode functions, and perform fast Fourier transform on each intrinsic mode function and the bandpass-filtered heart rate signal to generate intrinsic mode function spectrum and transform spectrum, respectively.

[0101] The comparison unit 205 compares the spectrum of the intrinsic mode function with the transformed spectrum to select an intrinsic mode function containing a heart rate signal, wherein the intrinsic mode function is the actual heart rate signal.

[0102] The third embodiment of the present invention provides an aquatic animal heart rate measuring device, including a memory and a processor. The memory stores a computer program, which can be executed by the processor to implement an aquatic animal heart rate measuring method as described in any of the above embodiments.

[0103] The fourth embodiment of the present invention provides a computer-readable storage medium storing a computer program, which can be executed by a processor of the device in which the computer-readable storage medium is located, to implement the aquatic animal heart rate measurement method as described in any of the above embodiments.

[0104] Based on the present invention, a method, apparatus, device, and readable storage medium for measuring the heart rate of aquatic animals are provided. First, video frames containing the heart region of multiple aquatic animals are acquired by the image acquisition device, and the heart region of interest (ROI) of all aquatic animals in the video frames is selected. Next, each heart ROI is preprocessed, and spatial filtering is performed on each preprocessed heart ROI to generate an image sequence of the heart ROI. Then, each image in the heart ROI image sequence is dimensionality-reduced in chronological order to generate multiple signal values, and these multiple signal values ​​are combined to generate a heart rate signal. Next, the heart rate signal is bandpass filtered within a fixed frequency band, and ensemble empirical mode decomposition is performed on the bandpass-filtered heart rate signal to generate individual intrinsic mode functions (IMFs). Fast Fourier transforms are performed on each IMF and the bandpass-filtered heart rate signal to generate IMF spectra and transform spectra, respectively. Finally, the spectra of the IMFs and the transform spectra are compared to select the IMFs containing the heart rate signal, wherein the IMFs are the actual heart rate signals. This method solves the problems of low efficiency, invasiveness, low throughput, and low accuracy in existing methods for measuring heart rate in aquatic animals.

[0105] Exemplary examples show that the computer program described in the third and fourth embodiments of the present invention can be divided into one or more modules, which are stored in the memory and executed by the processor to complete the present invention. The one or more modules can be a series of computer program instruction segments capable of performing specific functions, which describe the execution process of the computer program in implementing an aquatic animal heart rate measuring device. For example, the apparatus described in the second embodiment of the present invention.

[0106] The processor referred to can be a Central Processing Unit (CPU), or other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor can be a microprocessor or any conventional processor. The processor is the control center of the aquatic animal heart rate measurement method, connecting various parts of the method via various interfaces and lines.

[0107] The memory can be used to store the computer program and / or modules. The processor, by running or executing the computer program and / or modules stored in the memory, and by calling the data stored in the memory, implements various functions of a method for measuring the heart rate of aquatic animals. The memory may mainly include a program storage area and a data storage area. The program storage area may store the operating system, at least one application program required for a function (such as sound playback function, text conversion function, etc.), etc.; the data storage area may store data created based on the use of the mobile phone (such as audio data, text message data, etc.). In addition, the memory may include high-speed random access memory, and may also include non-volatile memory, such as hard disk, memory, plug-in hard disk, smart media card (SMC), secure digital card (SD) card, flash card, at least one disk storage device, flash memory device, or other volatile solid-state storage device.

[0108] If the implemented module is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the above embodiments of the present invention can also be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording media, USB flash drives, portable hard drives, magnetic disks, optical disks, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signals, telecommunication signals, and software distribution media, etc. It should be noted that the content included in the computer-readable medium can be appropriately added or removed according to the requirements of legislation and patent practice in the jurisdiction. For example, in some jurisdictions, according to legislation and patent practice, computer-readable media do not include electrical carrier signals and telecommunication signals.

[0109] It should be noted that the device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Furthermore, in the accompanying drawings of the device embodiments provided by this invention, the connection relationships between modules indicate that they have communication connections, which can be specifically implemented as one or more communication buses or signal lines. Those skilled in the art can understand and implement this without any creative effort.

[0110] The above description is merely a preferred embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the technical scope disclosed in the present invention should be included within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. A method for measuring the heart rate of aquatic animals, characterized in that, include: Acquire video frames containing the heart region of multiple aquatic animals captured by an image acquisition device, and select the heart ROI region of all aquatic animals in the video frames. Preprocessing is performed on each of the aforementioned cardiac ROI regions, specifically: Gaussian blurring and grayscale conversion are sequentially applied to each of the aforementioned cardiac ROI regions, wherein the grayscale conversion operation is one or more of the following: average method, weighted average method, maximum method, and minimum method. Spatial filtering is then performed on each of the preprocessed cardiac ROI regions to generate an image sequence of the cardiac ROI regions, specifically: nonlinear histogram equalization, two-level Gaussian downsampling, two-level Gaussian upsampling, and nonlinear histogram equalization are sequentially applied to each of the preprocessed cardiac ROI regions to generate an image sequence of the cardiac ROI regions; wherein the nonlinear mapping function of the nonlinear histogram equalization is as follows: Where J(i,j) is the pixel value in the i-th row and j-th column of the ROI region before transformation, J ′ (i,j) represents the pixel value in the i-th row and j-th column of the transformed ROI region, m represents the average pixel value of the current ROI region, and E ranges from 1 to 100. The two-level Gaussian downsampling involves performing two Gaussian downsampling operations sequentially. The Gaussian downsampling operation first applies a Gaussian filter to each pixel of the image, then reduces the width and height of the image according to the downsampling factor to generate the downsampled image. The two-level Gaussian upsampling involves performing two Gaussian upsampling operations sequentially. The Gaussian upsampling operation first applies a Gaussian filter to each pixel of the image to recover some image details, then enlarges the width and height of the image according to the upsampling factor to generate the upsampled image. The image sequence of the heart ROI region is dimensionality reduced in chronological order to generate multiple signal values, and the multiple signal values ​​are combined to generate a heart rate signal. The heart rate signal is bandpass filtered within a fixed frequency band. The bandpass filtered heart rate signal is then subjected to ensemble empirical mode decomposition to generate individual intrinsic mode functions (IMFs). Finally, fast Fourier transform is performed on each IMF and the bandpass filtered heart rate signal to generate IMF spectrum and transform spectrum, respectively. The intrinsic mode function (IMF) is compared with the transformed spectrum to select an IMF containing a heart rate signal, wherein the IMF is the actual heart rate signal.

2. The method for measuring the heart rate of an aquatic animal according to claim 1, characterized in that, The step of dimensionality reduction of each image in the image sequence of the cardiac ROI region in chronological order to generate multiple signal values, and combining the multiple signal values ​​to generate a heart rate signal, specifically involves: The average pixel value is generated by summing all pixel values ​​in each image of the image sequence of the cardiac ROI region and dividing by the number of pixels. Multiple average pixel values ​​are then combined in chronological order to obtain the heart rate signal. The maximum or minimum pixel value is extracted from each image in the image sequence of the heart ROI region to generate an extraction signal. Multiple extraction signals are combined in time sequence to obtain a heart rate signal.

3. The method for measuring the heart rate of an aquatic animal according to claim 1, characterized in that, The bandpass filter is one or more of the following: ideal bandpass filter, Chebyshev filter, and Butterworth filter.

4. The method for measuring the heart rate of an aquatic animal according to claim 1, characterized in that, The process of performing ensemble empirical mode decomposition on the bandpass-filtered heart rate signal to generate individual intrinsic mode functions is as follows: S1041, Randomly generate a set of noise signals, and add the set of noise signals to the bandpass filtered heart rate signal to generate an added signal; S1042, Perform an empirical mode decomposition on the added signal to obtain a set of intrinsic mode functions; Repeat steps S1041 and S1042 a preset number of times to obtain multiple sets of intrinsic mode functions. Add up the corresponding intrinsic mode functions in all intrinsic mode function sets and take the average to obtain the final intrinsic mode function set, which contains multiple intrinsic mode functions.

5. The method for measuring the heart rate of an aquatic animal according to claim 1, characterized in that, The comparison of the intrinsic mode function spectrum and the transformed spectrum to select the intrinsic mode function containing the heart rate signal specifically involves: Peak values ​​are extracted from the spectrum after the Fast Fourier Transform to obtain the peak frequency f in the frequency domain; A window size is determined, with the peak frequency at the center of the window. The power spectral energy within the frequency band is calculated based on the spectrum of all intrinsic mode functions within the window, wherein the selected intrinsic mode function is the intrinsic mode function with the largest power spectral energy within the window.

6. A device for measuring the heart rate of aquatic animals, characterized in that, include: The selection unit is used to acquire video frames containing the heart region of multiple aquatic animals captured by the image acquisition device, and to select the heart ROI region of all aquatic animals in the video frames. The preprocessing unit is used to preprocess each of the said cardiac ROI regions, specifically by performing Gaussian blurring and grayscale operations on each of the said cardiac ROI regions sequentially, wherein the grayscale operation is one or more of the average method, weighted average method, maximum method, and minimum method, and performing spatial filtering on each of the preprocessed cardiac ROI regions to generate an image sequence of the cardiac ROI regions, specifically by performing nonlinear histogram equalization, two-level Gaussian downsampling, two-level Gaussian upsampling, and nonlinear histogram equalization on each of the preprocessed cardiac ROI regions sequentially to generate an image sequence of the cardiac ROI regions; wherein the nonlinear mapping function of the nonlinear histogram equalization is as follows: Where J(i,j) is the pixel value in the i-th row and j-th column of the ROI region before transformation, J ′ (i,j) represents the pixel value in the i-th row and j-th column of the transformed ROI region, m represents the average pixel value of the current ROI region, and E ranges from 1 to 100. The two-level Gaussian downsampling involves performing two Gaussian downsampling operations sequentially. The Gaussian downsampling operation first applies a Gaussian filter to each pixel of the image, then reduces the width and height of the image according to the downsampling factor to generate the downsampled image. The two-level Gaussian upsampling involves performing two Gaussian upsampling operations sequentially. The Gaussian upsampling operation first applies a Gaussian filter to each pixel of the image to recover some image details, then enlarges the width and height of the image according to the upsampling factor to generate the upsampled image. The dimension reduction unit is used to reduce the dimension of each image in the image sequence of the cardiac ROI region in time sequence to generate multiple signal values, and to combine the multiple signal values ​​to generate a heart rate signal. The filtering unit is used to perform bandpass filtering on the heart rate signal within a fixed frequency band, perform ensemble empirical mode decomposition on the bandpass-filtered heart rate signal to generate various intrinsic mode functions, and perform fast Fourier transform on each intrinsic mode function and the bandpass-filtered heart rate signal to generate intrinsic mode function spectrum and transform spectrum, respectively. The comparison unit compares the spectrum of the intrinsic mode function with the transformed spectrum to select the intrinsic mode function containing the heart rate signal, wherein the intrinsic mode function is the actual heart rate signal.

7. A device for measuring the heart rate of aquatic animals, characterized in that, The device includes a memory and a processor, wherein the memory stores a computer program that can be executed by the processor to implement a method for measuring the heart rate of an aquatic animal as described in any one of claims 1 to 5.

8. A computer-readable storage medium, characterized in that, The device contains a computer program that can be executed by a processor of the device in which the computer-readable storage medium is located, to implement a method for measuring the heart rate of an aquatic animal as described in any one of claims 1 to 5.

Citation Information

Patent Citations

  • Live pig monitoring terminal and system based on image recognition

    CN110402840A

  • Heart rate detection method and device based on BVP signal, electronic equipment and storage medium

    CN115429246A