Binocular recognition system and method for farms invading animals at night
The binocular camera system processes video data of animals on the farm in real time, calculates depth information and features, and identifies invasive animal species. This solves the problem of low nighttime recognition accuracy in the existing technology and improves farm safety.
Patent Information
- Application Number
- CN202410804666.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-21
- Publication Date
- 2024-10-22
AI Technical Summary
Existing farm monitoring systems cannot accurately identify species and individuals of invasive animals at low brightness at night, resulting in low identification accuracy and efficiency, and increasing the risk of farm animals and plants being harmed by invasive alien animals.
Using a binocular camera system, through video acquisition, image splitting, pre-processing, image processing, similarity analysis and comprehensive calculation modules, the video data of animals are acquired and processed in real time, and the depth information, appearance characteristics, color characteristics and organ characteristics of the animals are calculated. , use similarity matching to identify invasive animal species, and issue alarms based on hazard levels.
It significantly improves the recognition accuracy and efficiency of invasive animals at night, can quickly distinguish external animals, improves recognition accuracy, and ensures the accuracy of recognition results through a comprehensive similarity index while reducing the amount of calculations.
Smart Images

Figure CN118823631A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of target recognition, and in particular to a binocular recognition system and method for animals invading a farm at night. Background Art
[0002] A binocular camera is a device with two independent cameras, usually mounted on the same device, to simulate the human binocular vision system. This camera system can provide more accurate and depth-aware image data because they can capture scene information at different positions, allowing the device to better understand depth and three-dimensional information. In the field of computer vision and robotics, binocular cameras are often used in applications such as range finding, depth perception, and stereo vision. By comparing the images captured by the two cameras, stereo vision matching can be performed to calculate information such as the distance and shape of the object.
[0003] At present, the monitoring system of a farm generally has only a single camera. In low-light night scenes, it is unable to accurately identify the species and individuals of invasive alien animals. Human monitoring is required to identify and distinguish the species and individuals of invasive alien animals. This method has low recognition accuracy and efficiency, and is unable to accurately identify invasive alien species entering the farm in a timely manner, resulting in a high risk of the original animals and plants on the farm being harmed by invasive alien animals. Summary of the invention
[0004] In view of the deficiencies in the prior art, the object of the present invention is to provide a binocular recognition system and method for invading animals on farms at night, so as to improve the recognition accuracy and efficiency of invading animals on farms at night.
[0005] To achieve the above object, the present invention provides the following technical solution: a binocular recognition system for intruding animals at night on farms, comprising:
[0006] A video acquisition module, used for acquiring first video data and second video data of animals to be identified in a farm in real time at night using a binocular camera;
[0007] an image splitting module, connected to the video acquisition module, and used to split the first video data and the second video data into a plurality of first video frames and a plurality of second video frames respectively;
[0008] A preprocessing module, connected to the image splitting module, for preprocessing each of the first video frames and each of the second video frames to obtain a plurality of first preprocessed images and a plurality of second preprocessed images;
[0009] a first processing module, connected to the preprocessing module, for performing image processing on the first preprocessing image and the second preprocessing image at the same time point to obtain depth information, overall contour features, overall color features and several significant organ features of the animal to be identified;
[0010] A second processing module, connected to the first processing module, is used to process the depth information and the overall contour feature to obtain the overall appearance feature of the animal to be identified;
[0011] A storage module, used to store a number of internal animal characteristic data of animals inside the farm, and a number of external animal characteristic data of common animals in the area where the farm is located, each external animal characteristic data is adapted to a corresponding invasive animal species, the internal animal characteristic data includes internal animal appearance characteristics, and the external animal characteristic data includes external animal appearance characteristics, external animal color characteristics, and external animal organ characteristics;
[0012] A similarity analysis module, connected to the second processing module and the storage module, respectively, for calculating a first similarity between the overall appearance feature and each of the internal animal appearance features, and when the first similarities are not greater than a preset first similarity threshold, calculating a second similarity between the overall appearance feature and each of the external animal appearance features;
[0013] a comprehensive calculation module, connected to the similarity analysis module, for respectively calculating a third similarity between the overall color feature and the external animal color feature, and calculating a fourth similarity between the significant organ feature and the external animal organ feature, when the second similarity is greater than a preset second similarity threshold, and then inputting the second similarity, the third similarity and the fourth similarity into a preset comprehensive calculation formula to calculate a comprehensive similarity index;
[0014] The matching module is respectively connected to the comprehensive calculation module and the storage module, and is used to output the corresponding invading animal species matched in the storage module according to the external animal feature data when the comprehensive similarity index is greater than a preset comprehensive similarity threshold.
[0015] Furthermore, the storage module also stores the association between each invading animal species and the corresponding hazard level. The farm night-time invading animal binocular identification system also includes an alarm module, which is respectively connected to the storage module and the matching module. The alarm module issues warnings of different alarm levels according to the hazard level corresponding to the invading animal species.
[0016] Furthermore, the first processing module includes:
[0017] A first processing unit, configured to obtain a plurality of first pixel point coordinates and a plurality of second pixel point coordinates of an identification area in the first video frame and the second video frame;
[0018] a first calculation unit, connected to the first processing unit, and configured to input the first pixel point coordinates and the second pixel point coordinates at the same position in the recognition area into a preset depth calculation formula to calculate the depth information;
[0019] a fusion unit, connected to the first processing unit, and configured to perform image fusion on the first video frame and the second video frame using a preset image fusion algorithm to obtain a fused image frame;
[0020] The second processing unit is connected to the fusion unit and is used to identify the fused image frame according to a preset image processing algorithm to obtain the overall contour feature, the overall color feature and several of the significant organ features.
[0021] Furthermore, the depth calculation formula is configured as:
[0022]
[0023] Wherein, D is used to represent the depth information, n is used to represent the number of the first pixel coordinates and the second pixel coordinates, and x n The horizontal coordinate x' is used to represent the coordinate of the nth pixel point. n is used to represent the horizontal coordinate of the nth second pixel point coordinate, f1 is used to represent the focal length of one of the binocular cameras, f2 is used to represent the focal length of the other binocular camera, P a Used to represent the disparity between the first video frame and the second video frame.
[0024] Furthermore, the second processing module includes:
[0025] An image generation unit, used for inputting the depth information and the overall contour feature into a preset machine vision algorithm to obtain a three-dimensional shape image;
[0026] The recognition unit is connected to the image generation unit and is used to perform shape feature recognition on the three-dimensional shape image to obtain the overall shape feature.
[0027] Furthermore, the preprocessing module includes:
[0028] A first preprocessing unit, configured to perform filtering and smoothing processing on each of the first video frames and each of the second video frames according to a Laplace algorithm to obtain a plurality of first filtered images and second filtered images;
[0029] The second preprocessing unit is connected to the first preprocessing unit and is used to detect each of the first filtered images and each of the second filtered images according to the Sobel algorithm to perform edge detection processing to obtain each of the first preprocessed images and each of the second preprocessed images.
[0030] Furthermore, the comprehensive calculation formula is configured as:
[0031]
[0032] Among them, C hs Used to represent the comprehensive similarity index, S lc2 Used to represent the second similarity, S lc3 is used to represent the third similarity, S lc4 is used to represent the fourth similarity, ω2 is used to represent the preset second conversion coefficient, ω3 is used to represent the preset third conversion coefficient, and ω4 is used to represent the preset fourth conversion coefficient.
[0033] Furthermore, it also includes a video analysis module and an audio analysis module;
[0034] The video analysis module is connected to the video acquisition module and the similarity analysis module respectively, and is used to acquire environmental brightness data, and perform brightness correction on the first video data and the second video data according to the environmental brightness data to obtain a first corrected video and a second corrected video, and then analyze the behavior of the animal to be identified in the first corrected video and the second corrected video according to a preset behavior analysis algorithm to obtain overall behavior characteristics;
[0035] The audio analysis module is connected to the video acquisition module and the similarity analysis module respectively, and is used to extract the audio data in the first video data and the second video data, and analyze the audio data according to a preset audio analysis algorithm to obtain overall audio features;
[0036] The external animal feature data also includes external animal behavior features and external animal audio features. The similarity analysis module is also used to calculate the fifth similarity between the overall behavior features and the external animal behavior features, and to calculate the sixth similarity between the overall audio features and the external animal audio features, and to use the fifth similarity and the sixth similarity to correct the comprehensive calculation formula to obtain the corrected comprehensive similarity index.
[0037] Furthermore, the corrected comprehensive calculation formula is configured as follows:
[0038]
[0039] Among them, C hs' is used to represent the comprehensive similarity index after correction, S lc5 Used to represent the fifth similarity, S lc6 is used to represent the sixth similarity, ω5 is used to represent the preset fifth conversion coefficient, and ω6 is used to represent the preset sixth conversion coefficient.
[0040] A binocular recognition method for intruding animals at night in a farm, applied to the above-mentioned binocular recognition system for intruding animals at night in a farm, comprises:
[0041] Step S1, the video acquisition module uses a binocular camera to acquire first video data and second video data of the animal to be identified in the farm in real time at night;
[0042] Step S2, the image splitting module splits the first video data and the second video data into a plurality of first video frames and a plurality of second video frames respectively; the preprocessing module preprocesses each of the first video frames and each of the second video frames to obtain a plurality of first preprocessed images and a plurality of second preprocessed images;
[0043] Step S3, the first processing module performs image processing on the first pre-processed image and the second pre-processed image at the same time point to obtain depth information, overall contour features, overall color features and several significant organ features of the animal to be identified; the second processing module processes the depth information and the overall contour features to obtain the overall appearance features of the animal to be identified;
[0044] Step S4, the storage module saves a number of internal animal feature data of the animals inside the farm, and a number of external animal feature data of the common animals in the area where the farm is located, each external animal feature data is adapted to the corresponding invading animal species, the internal animal feature data includes the internal animal appearance feature, and the external animal feature data includes the external animal appearance feature, the external animal color feature, and the external animal organ feature; the similarity analysis module calculates the first similarity between the overall appearance feature and each of the internal animal appearance features, and when the first similarities are not greater than the preset first similarity threshold, calculates the second similarity between the overall appearance feature and each of the external animal appearance features;
[0045] Step S5, when the second similarity is greater than a preset second similarity threshold, the comprehensive calculation module calculates the third similarity between the overall color feature and the external animal color feature, and calculates the fourth similarity between the significant organ feature and the external animal organ feature, and then inputs the second similarity, the third similarity and the fourth similarity into a preset comprehensive calculation formula to calculate a comprehensive similarity index; when the comprehensive similarity index is greater than a preset comprehensive similarity threshold, the matching module outputs the external animal feature data corresponding to the invading animal species.
[0046] Beneficial effects of the present invention:
[0047] The present invention firstly uses a binocular camera to obtain first video data and second video data of animals to be identified in a farm in real time at night, then performs data frame splitting and preprocessing on the first video data and the second video data in turn to obtain a first preprocessed image and a second preprocessed image, then processes and analyzes the first preprocessed image and the second preprocessed image to obtain the overall appearance characteristics, overall color characteristics and several significant organ characteristics of the animals to be identified, then calculates a first similarity between the overall appearance characteristics and the appearance characteristics of internal animals, uses the first similarity to quickly distinguish whether it is an external animal, improves the recognition efficiency, and then calculates the comprehensive similarity after the first similarity is greater than a first similarity threshold. The comprehensive similarity simultaneously includes the similarity between the appearance characteristics, the color characteristics and the significant organ characteristics, so the recognition accuracy is high, and the amount of calculation is not large, which significantly improves the recognition accuracy and efficiency of farms for invading animals at night. BRIEF DESCRIPTION OF THE DRAWINGS
[0048] Figure 1 It is a schematic diagram of the structure of the binocular recognition system for intruding animals at night in a farm in the present invention;
[0049] Figure 2 Schematic diagram of the internal structure of the binocular camera used in the present invention;
[0050] Figure 3 is a structural schematic diagram of the first processing module in the present invention;
[0051] Figure 4 is a structural schematic diagram of the second processing module in the present invention;
[0052] Figure 5 It is a structural schematic diagram of the preprocessing module in the present invention;
[0053] Figure 6 It is a schematic diagram of the structure of the video analysis module and the audio analysis module in the present invention;
[0054] Figure 7 It is a flow chart of the steps of the binocular identification method for invading animals at night in a farm in the present invention.
[0055] Figure numerals: 1. Video acquisition module; 2. Image segmentation module; 3. Preprocessing module; 31. First preprocessing unit; 32. Second preprocessing unit; 4. First processing module; 41. First processing unit; 42. First calculation unit; 43. Fusion unit; 44. Second processing unit; 5. Second processing module; 51. Image generation unit; 52. Recognition unit; 6. Storage module; 7. Similarity analysis module; 8. Comprehensive calculation module; 9. Matching module; 10. Video analysis module; 11. Audio analysis module. DETAILED DESCRIPTION
[0056] The present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. The same parts are represented by the same reference numerals. It should be noted that the words "front", "rear", "left", "right", "upper" and "lower" used in the following description refer to directions in the accompanying drawings, and the words "bottom surface" and "top surface", "inner" and "outer" refer to directions toward or away from the geometric center of a specific component, respectively.
[0057] Example 1, reference Figure 1 , which is the first embodiment of the present invention, provides a binocular recognition system for intrusive animals at night in a farm, which can improve the accuracy and efficiency of identifying intrusive animals at night in a farm, including:
[0058] The video acquisition module 1 is used to acquire first video data and second video data of animals to be identified in the farm in real time at night using a binocular camera;
[0059] The image splitting module 2 is connected to the video acquisition module 1 and is used to split the first video data and the second video data into a plurality of first video frames and a plurality of second video frames respectively;
[0060] A preprocessing module 3, connected to the image splitting module 2, is used to preprocess each first video frame and each second video frame to obtain a plurality of first preprocessed images and a plurality of second preprocessed images;
[0061] The first processing module 4 is connected to the preprocessing module 3 and is used to perform image processing on the first preprocessing image and the second preprocessing image at the same time point to obtain depth information, overall contour features, overall color features and several significant organ features of the animal to be identified;
[0062] The second processing module 5 is connected to the first processing module 4 and is used to obtain the overall appearance characteristics of the animal to be identified according to the depth information and the overall contour characteristics;
[0063] Storage module 6, used to store a number of internal animal characteristic data of animals inside the farm, and a number of external animal characteristic data of common animals in the area where the farm is located, each external animal characteristic data is adapted to a corresponding invasive animal species, the internal animal characteristic data includes internal animal appearance characteristics, and the external animal characteristic data includes external animal appearance characteristics, external animal color characteristics, and external animal organ characteristics;
[0064] The similarity analysis module 7 is connected to the second processing module 5 and the storage module 6, respectively, and is used to calculate the first similarity between the overall appearance feature and each internal animal appearance feature, and when the first similarity is not greater than a preset first similarity threshold, calculate the second similarity between the overall appearance feature and each external animal appearance feature;
[0065] The comprehensive calculation module 8 is connected to the similarity analysis module 7 and is used to calculate the third similarity between the overall color feature and the external animal color feature, and calculate the fourth similarity between the significant organ feature and the external animal organ feature, respectively, when the second similarity is greater than a preset second similarity threshold, and then input the second similarity, the third similarity and the fourth similarity into a preset comprehensive calculation formula to calculate a comprehensive similarity index;
[0066] The matching module 9 is connected to the comprehensive calculation module 8 and the storage module 6 respectively, and is used to output the corresponding invasive animal species matched in the storage module 6 according to the external animal feature data when the comprehensive similarity index is greater than the preset comprehensive similarity threshold.
[0067] Working principle of embodiment 1:
[0068] An intelligent processing terminal is provided in the farm, and a plurality of binocular cameras are distributed in the farm, for obtaining first video data and second video data of animals to be identified in the farm in real time at night. The video acquisition module 1 can be a video acquisition software installed on the intelligent processing terminal, and the video acquisition software is connected to the binocular camera to obtain the first video data and the second video data. The internal structure of the binocular camera is as follows: Figure 2As shown, the image splitting module 2 may be a video frame splitting software installed on the intelligent processing terminal, which is used to split the first video data and the second video data into a plurality of first video frames and a plurality of second video frames at a speed of 30 video frames per second. The preprocessing module 3 may be an image preprocessing program pre-installed on the intelligent processing terminal, which is used to preprocess each first video frame and each second video frame to obtain a plurality of first preprocessed images and a plurality of second preprocessed images. The first processing module 4 and the second processing module 5 are both image feature recognition programs pre-installed on the intelligent processing terminal, which are used for the depth information, overall contour features, overall color features and a plurality of significant organ features of the animal to be identified, and then the overall appearance features of the animal to be identified are obtained according to the depth information and the overall contour features. The storage module 6 may be a non-volatile memory in the intelligent processing terminal, which is used to store a plurality of internal animal feature data of the animals inside the farm, and a plurality of external animal feature data of the common animals in the area where the farm is located. The similarity analysis module 7 can be a similarity recognition program pre-installed on the intelligent processing terminal, which is used to calculate the first similarity between the overall appearance characteristics and the internal animal appearance characteristics. When the first similarity is greater than the first similarity threshold (85%), it indicates that the animal to be identified has a high similarity with the internal animals of the farm, indicating that the animal to be identified is an internal animal of the farm. When the first similarity is not greater than the first similarity threshold, it indicates that the similarity between the animal to be identified and the internal animals of the park is insufficient, and it can be determined as an external animal. The first similarity is used to quickly distinguish whether it is an external animal, thereby improving the recognition efficiency. At this time, the second similarity between the overall appearance characteristics and the appearance characteristics of each external animal is calculated. When the second similarity is greater than the second similarity threshold (80%), it indicates that the animal to be identified has a high similarity with the appearance characteristics of a certain external animal in the database. In order to further determine the specific invading animal, it is necessary to perform similarity recognition based on organ characteristics and color characteristics. The comprehensive calculation module 8 can be a comprehensive calculation program installed on the intelligent processing terminal. It uses the external animal color features and external animal organ features corresponding to the external animal appearance features whose second similarity with the overall appearance features is greater than the second similarity threshold to calculate the third similarity and the fourth similarity. Finally, a comprehensive calculation is performed to obtain the comprehensive similarity. The comprehensive similarity also includes the similarity between the appearance features, color features and significant organ features. Therefore, the recognition accuracy is high and the amount of calculation is not large, which significantly improves the farm's recognition accuracy and efficiency for invading animals at night.
[0069] Preferably, Figure 3 As shown, the first processing module 4 includes:
[0070] The first processing unit 41 is used to obtain a plurality of first pixel point coordinates and a plurality of second pixel point coordinates of the identification area in the first video frame and the second video frame;
[0071] A first calculation unit 42, connected to the first processing unit 41, is used to input the coordinates of the first pixel point and the second pixel point at the same position in the recognition area into a preset depth calculation formula to calculate and obtain depth information;
[0072] A fusion unit 43, connected to the first processing unit 41, is used to perform image fusion on the first video frame and the second video frame using a preset image fusion algorithm to obtain a fused image frame;
[0073] The second processing unit 44 is connected to the fusion unit 43 and is used to identify the fused image frame according to a preset image processing algorithm to obtain overall contour features, overall color features and several significant organ features.
[0074] Specifically, in this embodiment, the first processing unit 41 uses the checkerboard calibration plate through the Zhang Zhengyou calibration method. After obtaining an image of the calibration plate, the pixel coordinates of each corner point can be obtained by using the corresponding image detection algorithm to obtain a number of first pixel point coordinates and a number of second pixel point coordinates of the identification area in the first video frame and the second video frame. The second calculation unit uses the depth ranging formula to calculate the depth information, and then the fusion unit 43 uses the wavelet transform algorithm to perform pixel-level fusion to obtain a fused image frame. The second processing unit 44 uses the image recognition algorithm based on OpenCV to respectively identify the overall contour features, overall color features, and significant organ features in the fused image.
[0075] Preferably, the depth calculation formula is configured as:
[0076]
[0077] Where D is used to represent the depth information, n is used to represent the number of the first pixel coordinates and the second pixel coordinates, and x n Used to represent the horizontal coordinate of the nth first pixel point, x' n The horizontal coordinate used to represent the coordinates of the nth second pixel point, f1 is used to represent the focal length of one of the binocular cameras, and f2 is used to represent the focal length of the other binocular camera. a Used to represent the disparity between the first video frame and the second video frame.
[0078] Preferably, Figure 4 As shown, the second processing module 5 includes:
[0079] An image generation unit 51 is used to input the depth information and the overall contour features into a preset machine vision algorithm to obtain a three-dimensional shape image;
[0080] The recognition unit 52 is connected to the image generation unit 51 and is used to perform shape feature recognition on the three-dimensional shape image to obtain the overall shape feature.
[0081] Specifically, in this embodiment, the image generation unit 51 inputs the depth information and the overall contour features into the configured Halcon, and the Halcon processes the depth information and the overall contour features to obtain a three-dimensional shape image.
[0082] Preferably, Figure 5 As shown, the preprocessing module 3 includes:
[0083] A first preprocessing unit 31 is used to perform filtering and smoothing processing on each first video frame and each second video frame according to a Laplace algorithm to obtain a plurality of first filtered images and second filtered images;
[0084] The second preprocessing unit 32 is connected to the first preprocessing unit 31 and is used to detect each first filtered image and each second filtered image according to the Sobel algorithm to perform edge detection processing to obtain each first preprocessed image and each second preprocessed image.
[0085] Embodiment 2 is the second embodiment of the present invention. Different from the previous embodiment, this embodiment provides an alarm module, which can realize different degrees of alarm reminders according to the type of invading animals, thereby improving farm safety. The storage module 6 also stores the association between each invading animal type and the corresponding hazard level. The alarm module is connected to the storage module 6 and the matching module 9 respectively. The alarm module warns different alarm levels according to the hazard level corresponding to the invading animal type.
[0086] Working principle of embodiment 2:
[0087] The hazard level is divided into four levels, including no hazard, slight hazard, normal hazard and severe hazard. It is associated with the invading species. For example, small herbivorous rabbits are no hazard, large herbivorous deer are slight hazard, small carnivorous weasels are normal hazard, and large carnivorous wolves are severe hazard. The alarm module will give different degrees of warning according to the hazard level of different types of invading animals: no warning for no hazard, slight warning for slight hazard, normal warning for normal hazard, severe warning for severe hazard, and alarm and flashing lights for severe warning to scare and drive away large carnivores. By designing the match between the hazard level and the type of invading animal, it is possible to call the warning module for warning reminders according to different hazard levels after predicting the type of invading animal, thereby improving farm safety.
[0088] Embodiment 3 is the second embodiment of the present invention. Different from the previous embodiment, this embodiment provides a video analysis module 10 and an audio analysis module 11, which can introduce the behavioral characteristics and audio characteristics of animals into the comprehensive calculation method to improve the calculation accuracy of the comprehensive similarity index.
[0089] Preferably, the comprehensive calculation formula is configured as:
[0090]
[0091] Among them, C hs Used to represent the comprehensive similarity index, S lc2 Used to represent the second similarity, S lc3 Used to represent the third similarity, S lc4 is used to represent the fourth similarity, ω2 is used to represent the preset second conversion coefficient, ω3 is used to represent the preset third conversion coefficient, and ω4 is used to represent the preset fourth conversion coefficient.
[0092] Specifically, in this embodiment, the product of the second conversion coefficient and the square of the second similarity is converted into the weight of the second similarity, the third conversion coefficient converts the product of the square of the third similarity into the weight of the third similarity, and the fourth conversion coefficient converts the product of the square of the fourth similarity into the weight of the fourth similarity. Finally, the weight of the second similarity, the weight of the third similarity, and the weight of the fourth similarity are added together and the square root is taken, and then divided by the average of the second conversion coefficient, the third conversion coefficient, and the fourth conversion coefficient to obtain a comprehensively calculated comprehensive similarity index.
[0093] Preferably, Figure 6 As shown, it also includes a video analysis module 10 and an audio analysis module 11;
[0094] The video analysis module 10 is connected to the video acquisition module 1 and the similarity analysis module 7 respectively, and is used to acquire the environmental brightness data, and perform brightness correction on the first video data and the second video data according to the environmental brightness data to obtain the first corrected video and the second corrected video, and then analyze the behaviors of the animals to be identified in the first corrected video and the second corrected video according to the preset behavior analysis algorithm to obtain the overall behavior characteristics;
[0095] The audio analysis module 11 is connected to the video acquisition module 1 and the similarity analysis module 7 respectively, and is used to extract the audio data in the first video data and the second video data, and analyze the audio data according to a preset audio analysis algorithm to obtain the overall audio features;
[0096] The external animal feature data also includes external animal behavior features and external animal audio features. The similarity analysis module 7 is also used to calculate the fifth similarity between the overall behavior features and the external animal behavior features, and to calculate the sixth similarity between the overall audio features and the external animal audio features, and to use the fifth similarity and the sixth similarity to correct the comprehensive calculation formula.
[0097] Working principle of embodiment 3:
[0098] The video analysis module 10 may be a video analysis software installed on the intelligent processing terminal, and is used to perform brightness correction on the first video data and the second video data according to the ambient brightness data detected by the external ambient light brightness sensor, and obtain the first corrected video and the second corrected video. The interference of low-brightness scenes on video data is reduced, and the recognition accuracy is improved. Then, the 3D convolution behavior recognition algorithm based on deep learning is used to identify the animal behavior to be identified in the first corrected video and the second corrected video to obtain the overall behavior characteristics. The audio analysis module 11 may be an audio analysis software installed on the intelligent processing terminal, and is used to divide the audio data into several small segments using short-time Fourier transform, and perform Fourier transform on each small segment to obtain spectrum information as the overall audio feature. The comprehensive calculation formula is corrected using the fifth similarity and the sixth similarity to obtain the corrected comprehensive similarity index. Since the comprehensive calculation formula after correction incorporates the similarity of the overall audio feature and the overall behavior feature, the calculation is more scientific and the calculation accuracy of the comprehensive similarity index is higher.
[0099] Preferably, the corrected comprehensive calculation formula is configured as:
[0100]
[0101] Among them, C hs ' is used to represent the comprehensive similarity index after correction, S lc5 Used to indicate the fifth similarity, S lc6 is used to represent the sixth similarity, ω5 is used to represent the preset fifth conversion coefficient, and ω6 is used to represent the preset sixth conversion coefficient.
[0102] Specifically, in this embodiment, the product of the fifth conversion coefficient and the square of the fifth similarity is converted into the weight of the fifth similarity, and the sixth conversion coefficient converts the product of the square of the sixth similarity into the weight of the sixth similarity. Finally, the weight of the second similarity, the weight of the third similarity, the weight of the fourth similarity, the weight of the fifth similarity and the weight of the sixth similarity are added together and the square root is taken, and then divided by the average of the second conversion coefficient, the third conversion coefficient, the fourth conversion coefficient, the fifth conversion coefficient and the sixth conversion coefficient to obtain a comprehensively calculated comprehensive similarity index.
[0103] A binocular recognition method for intruding animals at night in a farm is applied to the binocular recognition system for intruding animals at night in the farm, such as Figure 7 As shown, including:
[0104] Step S1, the video acquisition module 1 uses a binocular camera to acquire first video data and second video data of an animal to be identified in a farm in real time at night;
[0105] Step S2, the image splitting module 2 splits the first video data and the second video data into a plurality of first video frames and a plurality of second video frames respectively; the preprocessing module 3 preprocesses each of the first video frames and each of the second video frames to obtain a plurality of first preprocessed images and a plurality of second preprocessed images;
[0106] Step S3, the first processing module 4 performs image processing on the first preprocessed image and the second preprocessed image at the same time point to obtain depth information, overall contour features, overall color features and several significant organ features of the animal to be identified; the second processing module 5 obtains the overall appearance features of the animal to be identified based on the depth information and the overall contour features;
[0107] Step S4, the storage module 6 saves a number of internal animal feature data of the animals inside the farm, and a number of external animal feature data of the common animals in the area where the farm is located, each external animal feature data is adapted to the corresponding invading animal species, the internal animal feature data includes the internal animal appearance feature, and the external animal feature data includes the external animal appearance feature, the external animal color feature, and the external animal organ feature; the similarity analysis module 7 calculates a first similarity between the overall appearance feature and each internal animal appearance feature, and when the first similarity is not greater than a preset first similarity threshold, calculates a second similarity between the overall appearance feature and each external animal appearance feature;
[0108] Step S5, when the second similarity is greater than a preset second similarity threshold, the comprehensive calculation module 8 calculates the third similarity between the overall color feature and the external animal color feature, and calculates the fourth similarity between the significant organ feature and the external animal organ feature, and then inputs the second similarity, the third similarity and the fourth similarity into a preset comprehensive calculation formula to calculate a comprehensive similarity index; when the comprehensive similarity index is greater than a preset comprehensive similarity threshold, the matching module 9 outputs the external animal feature data corresponding to the invading animal species.
[0109] The above are only preferred embodiments of the present invention. The protection scope of the present invention is not limited to the above embodiments. All technical solutions under the concept of the present invention belong to the protection scope of the present invention. It should be pointed out that for ordinary technicians in this technical field, some improvements and modifications without departing from the principle of the present invention should also be regarded as the protection scope of the present invention.
Claims
1. A binocular recognition system for animals invading a farm at night, characterized in that: include: A video acquisition module (1) is used to acquire first video data and second video data of an animal to be identified in a farm in real time at night using a binocular camera; An image splitting module (2), connected to the video acquisition module (1), and used to split the first video data and the second video data into a plurality of first video frames and a plurality of second video frames respectively; A preprocessing module (3), connected to the image splitting module (2), for preprocessing each of the first video frames and each of the second video frames to obtain a plurality of first preprocessed images and a plurality of second preprocessed images; A first processing module (4), connected to the preprocessing module (3), is used to perform image processing on the first preprocessing image and the second preprocessing image at the same time point to obtain depth information, overall contour features, overall color features and several significant organ features of the animal to be identified; A second processing module (5), connected to the first processing module (4), is used to obtain the overall appearance features of the animal to be identified according to the depth information and the overall contour features; A storage module (6) is used to store a number of internal animal feature data of animals in the farm and a number of external animal feature data of common animals in the area where the farm is located, each external animal feature data is adapted to a corresponding invasive animal species, the internal animal feature data includes internal animal appearance features, and the external animal feature data includes external animal appearance features, external animal color features, and external animal organ features; A similarity analysis module (7) is connected to the second processing module (5) and the storage module (6) respectively, and is used to calculate a first similarity between the overall appearance feature and each of the internal animal appearance features, and when the first similarities are not greater than a preset first similarity threshold, calculate a second similarity between the overall appearance feature and each of the external animal appearance features; A comprehensive calculation module (8) is connected to the similarity analysis module (7) and is used to calculate the third similarity between the overall color feature and the external animal color feature, and calculate the fourth similarity between the significant organ feature and the external animal organ feature, respectively, when the second similarity is greater than a preset second similarity threshold, and then input the second similarity, the third similarity and the fourth similarity into a preset comprehensive calculation formula to calculate a comprehensive similarity index; A matching module (9) is respectively connected to the comprehensive calculation module (8) and the storage module (6) and is used to output the corresponding invading animal species obtained by matching the external animal feature data in the storage module (6) when the comprehensive similarity index is greater than a preset comprehensive similarity threshold.
2. The binocular recognition system for intruding animals at night in a farm according to claim 1, characterized in that: The storage module (6) also stores the association between each invading animal species and the corresponding hazard level. The farm nighttime invading animal binocular recognition system also includes an alarm module, which is respectively connected to the storage module (6) and the matching module (9). The alarm module issues warnings of different alarm levels according to the hazard level corresponding to the invading animal species.
3. The binocular recognition system for intruding animals at night in a farm according to claim 1, characterized in that: The first processing module (4) comprises: A first processing unit (41) is used for obtaining a plurality of first pixel point coordinates and a plurality of second pixel point coordinates of an identification area in the first video frame and the second video frame; A first calculation unit (42), connected to the first processing unit (41), used for inputting the first pixel point coordinates and the second pixel point coordinates at the same position in the identification area into a preset depth calculation formula to calculate and obtain the depth information; A fusion unit (43), connected to the first processing unit (41), configured to perform image fusion on the first video frame and the second video frame using a preset image fusion algorithm to obtain a fused image frame; The second processing unit (44) is connected to the fusion unit (43) and is used to identify the fused image frame according to a preset image processing algorithm to obtain the overall contour feature, the overall color feature and a plurality of the significant organ features.
4. The binocular recognition system for intruding animals at night in a farm according to claim 3, characterized in that: The depth calculation formula is configured as: Wherein, D is used to represent the depth information, n is used to represent the number of the first pixel coordinates and the second pixel coordinates, and x n The horizontal coordinate x' is used to represent the coordinate of the nth pixel point. n is used to represent the horizontal coordinate of the nth second pixel point coordinate, f1 is used to represent the focal length of one of the binocular cameras, f2 is used to represent the focal length of the other binocular camera, P a Used to represent the disparity between the first video frame and the second video frame.
5. The binocular recognition system for intruding animals at night in a farm according to claim 1, characterized in that: The second processing module (5) comprises: An image generating unit (51) is used to input the depth information and the overall contour feature into a preset machine vision algorithm to obtain a three-dimensional shape image; The recognition unit (52) is connected to the image generation unit (51) and is used to perform shape feature recognition on the three-dimensional shape image to obtain the overall shape feature.
6. The binocular recognition system for farm night-time intrusion animals according to claim 1, characterized in that: The pre-processing module (3) comprises: A first preprocessing unit (31) is used to perform filtering and smoothing processing on each of the first video frames and each of the second video frames according to a Laplace algorithm to obtain a plurality of first filtered images and second filtered images; The second preprocessing unit (32) is connected to the first preprocessing unit (31) and is used to detect each of the first filtered images and each of the second filtered images according to the Sobel algorithm to perform edge detection processing to obtain each of the first preprocessing images and each of the second preprocessing images.
7. The binocular recognition system for intruding animals at night in a farm according to claim 1, characterized in that: The comprehensive calculation formula is configured as follows: Among them, C hs Used to represent the comprehensive similarity index, S lc2 Used to represent the second similarity, S lc3 is used to represent the third similarity, S lc4 is used to represent the fourth similarity, ω2 is used to represent the preset second conversion coefficient, ω3 is used to represent the preset third conversion coefficient, and ω4 is used to represent the preset fourth conversion coefficient.
8. The binocular recognition system for farm night-time intrusion animals according to claim 7, characterized in that: It also includes a video analysis module (10) and an audio analysis module (11); The video analysis module (10) is connected to the video acquisition module (1) and the similarity analysis module (7) respectively, and is used to acquire environmental brightness data, and perform brightness correction on the first video data and the second video data according to the environmental brightness data to obtain a first corrected video and a second corrected video, and then analyze the behavior of the animal to be identified in the first corrected video and the second corrected video according to a preset behavior analysis algorithm to obtain overall behavior characteristics; The audio analysis module (11) is connected to the video acquisition module (1) and the similarity analysis module (7) respectively, and is used to extract audio data from the first video data and the second video data, and analyze the audio data according to a preset audio analysis algorithm to obtain overall audio features; The external animal feature data also includes external animal behavior features and external animal audio features. The similarity analysis module (7) is also used to calculate the fifth similarity between the overall behavior features and the external animal behavior features, and to calculate the sixth similarity between the overall audio features and the external animal audio features, and to use the fifth similarity and the sixth similarity to correct the comprehensive calculation formula.
9. The binocular recognition system for intruding animals at night in a farm according to claim 8, characterized in that: The comprehensive calculation formula after correction is configured as follows: Among them, C hs ' is used to represent the comprehensive similarity index after correction, S lc5 Used to represent the fifth similarity, S lc6 is used to represent the sixth similarity, ω5 is used to represent the preset fifth conversion coefficient, and ω6 is used to represent the preset sixth conversion coefficient.
10. A binocular recognition method for intruding animals at night on a farm, applied to a binocular recognition system for intruding animals at night on a farm according to any one of claims 1 to 9, characterized in that: include: Step S1, the video acquisition module (1) uses a binocular camera to acquire first video data and second video data of an animal to be identified in a farm in real time at night; Step S2, the image splitting module (2) splits the first video data and the second video data into a plurality of first video frames and a plurality of second video frames respectively; the preprocessing module (3) preprocesses each of the first video frames and each of the second video frames to obtain a plurality of first preprocessed images and a plurality of second preprocessed images; Step S3, the first processing module (4) performs image processing on the first pre-processed image and the second pre-processed image at the same time point to obtain depth information, overall contour features, overall color features and several significant organ features of the animal to be identified; The second processing module (5) obtains the overall appearance feature of the animal to be identified according to the depth information and the overall contour feature; Step S4, the storage module (6) stores a number of internal animal feature data of the animals inside the farm, and a number of external animal feature data of the common animals in the area where the farm is located, each external animal feature data is adapted to a corresponding invading animal species, the internal animal feature data includes internal animal appearance features, and the external animal feature data includes external animal appearance features, external animal color features, and external animal organ features; The similarity analysis module (7) calculates a first similarity between the overall appearance feature and the internal animal appearance feature, and when the first similarities are not greater than a preset first similarity threshold, calculates a second similarity between the overall appearance feature and each of the external animal appearance features; Step S5, when the second similarity is greater than a preset second similarity threshold, the comprehensive calculation module (8) respectively calculates the third similarity between the overall color feature and the external animal color feature, and calculates the fourth similarity between the significant organ feature and the external animal organ feature, and then inputs the second similarity, the third similarity and the fourth similarity into a preset comprehensive calculation formula to calculate a comprehensive similarity index; when the comprehensive similarity index is greater than a preset comprehensive similarity threshold, the matching module (9) outputs the invading animal species corresponding to the external animal feature data.
Citation Information
Cited By
Measurable infrared camera monitoring system based on stereo distance measurement
CN119803397A
