Underwater biometric method and device, metering equipment and computer storage medium
Through omnidirectional image sonar equipment, the accuracy and cost of underwater biometric quantity monitoring in the prior art are solved, and efficient and accurate underwater biometric measurement is achieved.
Patent Information
- Application Number
- CN202411842132.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-12-13
- Publication Date
- 2025-05-02
AI Technical Summary
When monitoring the underwater biological number, it is difficult to accurately identify the underwater biological number in open environments, especially in poor light conditions and complex environments, traditional equipment is costly and difficult to achieve full coverage.
The omnidirectional image sonar device is used for monitoring. By obtaining the acoustic image collection, the pixel area, stroke perimeter and position coordinates of the target underwater organism are determined, and whether similar underwater organisms are present are determined. The actual number of underwater organisms is calculated through a comprehensive similarity evaluation mechanism.
It realizes low-cost large-scale coverage detection, which can effectively distinguish static objects from mobile organisms, reduces the impact of target overlapping occlusion on detection results, and improves detection accuracy and counting accuracy.
Smart Images

Figure CN119919786A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of image processing technology, and in particular to an underwater biometric method, device, metering equipment and computer storage medium. Background Art
[0002] As people pay more and more attention to the marine environment and pursue sustainable development, it is becoming increasingly important to accurately monitor and count the number of underwater organisms. In order to avoid the blockage of the circulating water intake of nuclear power plants, which may lead to a reduction in power or even shutdown of the power plant, a plastic buoy structure is usually set up at the river channel of the nuclear power plant water intake, and fishing nets are mounted to intercept small fish, seaweed and other organisms that affect the smooth flow of circulating cooling water. However, during the outbreak of underwater organisms, fishing nets are easily blocked, affecting the normal operation of nuclear power plants. Therefore, it is necessary to set up detection and early warning equipment in front of the fishing nets so that the detection and early warning equipment can promptly remind managers to clean up the interception nets after the underwater biomass reaches the threshold to avoid blockage.
[0003] With the development of science and technology, in order to study the dynamic changes of underwater biological populations, assist in the formulation of reasonable fishing policies, ensure the sustainable use of fishery resources, monitor at river water intakes, and assess the siltation and blockage of marine organisms, non-contact monitoring methods, especially sonar technology and image processing technology, are used to monitor the underwater environment in real time. However, the underwater environment is complex and changeable, and the light conditions are poor. Traditional optical monitoring methods are difficult to accurately capture the information of underwater organisms. For example, acoustic equipment usually presents a clear acoustic image underwater through sound wave detection based on forward-looking image sonar, but its viewing angle is narrow, and multiple devices are required to cover the river mouth, which increases the cost and difficulty of post-processing. At present, the optical equipment has a short detection distance, the forward-looking sonar has a narrow coverage range, and omnidirectional sonar is rarely used for detection. Omnidirectional image sonar equipment can provide 360° all-round underwater image information, which helps to achieve comprehensive monitoring of underwater organisms, but it is currently mostly used in closed environments such as pipelines. Secondly, neural network algorithms such as YOLO are currently used to effectively identify single targets in images. However, underwater creatures usually appear in clusters. When there is overlapping occlusion, large targets will be recognized as one target or not recognized at all, resulting in counting errors. At this time, algorithms such as YOLO are difficult to apply to identify the number of underwater creatures in clusters. In addition, the currently popular artificial intelligence and neural network models require a lot of graphics card computing power for recognition and cannot run on devices with weak performance.
[0004] Therefore, in the existing field of target detection and counting, the effective distinction between static objects and mobile organisms and the problem of target overlap and occlusion require the design of an algorithm that comprehensively considers the similarity of position, area and perimeter to determine whether the same underwater organism appears between adjacent frames, thereby avoiding repeated calculations, and it is necessary to consider the differences between different types of underwater organisms, resulting in low measurement accuracy. This application uses omnidirectional image sonar to achieve low-cost large-scale coverage detection, and through the design of a similarity evaluation mechanism, it can efficiently distinguish static objects from mobile organisms, and maintain stable detection performance even in complex and changing scenes. At the same time, in response to the problem of target overlap and occlusion, an efficient algorithm and optimization strategy are adopted, the entire processing flow is faster, the equipment performance requirements are low, and it is suitable for large-scale real-time monitoring tasks, which effectively reduces the impact of occlusion on the detection results and improves the overall detection accuracy. In terms of counting, the number of targets is estimated by calculating the ratio of the overall target area to the median pixel area. This method does not need to identify each target separately, and can obtain a roughly accurate number estimate. Even in the case of partial overlap and occlusion of multiple targets, it can maintain good counting accuracy, thereby further improving the practicality and application scope of this application. Summary of the invention
[0005] In order to overcome the deficiencies of the prior art, the present invention provides an underwater biometric method, device, metering equipment and computer storage medium to effectively identify the number of underwater organisms in an open environment.
[0006] A first aspect of the present application provides an underwater biometric method, the method comprising: Acquire an acoustic image of a target river channel area to obtain an acoustic image set; Determining a target underwater organism in the target acoustic image, wherein the target acoustic image is any acoustic image in the acoustic image set; Determine the pixel area, stroke perimeter and position coordinates of the target underwater organism; Determining whether there is a similar underwater organism to the target underwater organism in an adjacent acoustic image according to the pixel area, the perimeter of the stroke and the position coordinates; When it is determined that the similar underwater organisms exist in the target underwater organisms, the target organism quantity of the actual underwater organisms in the target river channel area is determined based on the target underwater organisms and the similar underwater organisms.
[0007] In an optional embodiment, determining the target organism quantity of actual underwater organisms in the target river channel area according to the target underwater organisms and the similar underwater organisms includes: The number of target organisms is determined by the following formula: ; in, is the number of target organisms, m is the number of acoustic images in the acoustic image set, is the initial number of the actual underwater organisms in each of the acoustic images; The initial number of organisms is determined by the following formula: ; in, is the initial number of organisms, n is the number of actual underwater organisms in each acoustic image, For the q The weighted area of actual underwater life, M is the median of the pixel area of each acoustic image in the acoustic image set; The weighted area is determined by the following formula: ; in, A is the pixel area of the actual underwater organisms described in each acoustic image, S is the signal strength of the target underwater organism in each acoustic image, is the adjustment coefficient, which is used to control the influence of signal intensity on pixel area.
[0008] In an optional implementation, judging whether the target underwater organism is a similar underwater organism in adjacent acoustic images according to the pixel area, the stroke perimeter and the position coordinates includes: Determining, according to the pixel areas, the area similarity of the first underwater creature and the second underwater creature in the adjacent acoustic images, wherein the first underwater creature and the second underwater creature are any two underwater creatures among the target underwater creatures; Determine, according to the position coordinates, the similarity of the positions of the first underwater creature and the second underwater creature in the adjacent acoustic images; Determining the similarity of the perimeters of the first underwater creature and the second underwater creature in the adjacent acoustic images according to the stroke perimeters; Determine the comprehensive similarity between the first underwater organism and the second underwater organism according to the area similarity, the position similarity and the perimeter similarity; It is determined whether the first underwater creature and the second underwater creature are the similar underwater creatures according to the comprehensive similarity.
[0009] In an optional implementation, the determining the comprehensive similarity between the first underwater organism and the second underwater organism according to the area similarity, the position similarity and the perimeter similarity comprises: Determining a first weight coefficient corresponding to the area similarity, and obtaining a first similarity based on the area similarity and the first weight coefficient; Determining a second weight coefficient corresponding to the position similarity, and obtaining a second similarity based on the position similarity and the second weight coefficient; Determining a third weight coefficient corresponding to the perimeter similarity, and obtaining a third similarity based on the perimeter similarity and the third weight coefficient; The comprehensive similarity is determined based on the first similarity, the second similarity and the third similarity.
[0010] In an optional implementation, determining the area similarity of the first underwater creature and the second underwater creature in the adjacent acoustic images according to the pixel areas includes: The area similarity is determined by the following formula: ; in, is the area similarity, is the pixel area of the first underwater organism, is the pixel area of the second underwater organism.
[0011] In an optional implementation, determining the position similarity of the first underwater creature and the second underwater creature in the adjacent acoustic images according to the position coordinates includes: The position similarity is determined by the following formula: ; in, is the position similarity, is the Euclidean distance between the position coordinates of the first underwater creature and the second underwater creature, D is the diagonal length of any acoustic image in the adjacent acoustic images, ,in w is the width of the adjacent acoustic images, h is the height of the adjacent acoustic image.
[0012] In an optional implementation, the determining, based on the stroke perimeter, the perimeter similarity of the first underwater creature and the second underwater creature in the adjacent acoustic images comprises: The perimeter similarity is determined by the following formula: ; in, is the perimeter similarity, is the stroke perimeter of the first underwater creature, Set the perimeter of the stroke for the second underwater creature.
[0013] A second aspect of the present application provides an underwater biometric device, the device comprising: An acquisition module is used to acquire an acoustic image of a target river channel area to obtain an acoustic image set; A first determination module is used to determine the target underwater organism in the target acoustic image, wherein the target acoustic image is any acoustic image in the acoustic image set; A second determination module is used to determine the pixel area, stroke perimeter and position coordinates of the target underwater organism; A judging module, configured to judge whether the target underwater creature has a similar underwater creature in an adjacent acoustic image according to the pixel area, the perimeter of the stroke and the position coordinates; The metering module is used to determine the target organism quantity of the actual underwater organisms in the target river channel area according to the target underwater organisms and the similar underwater organisms when it is determined that the similar underwater organisms exist in the target underwater organisms.
[0014] A third aspect of the present application provides a metering device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the underwater biometering method when executing the computer program.
[0015] A fourth aspect of the present application provides a computer-readable storage medium having a computer program stored thereon, which implements the steps of the above-mentioned underwater biometrics method when executed by a processor.
[0016] In summary, the underwater organism measurement method, device, measurement equipment and computer storage medium provided by the present application monitor the target river area by using omnidirectional image sonar equipment to obtain a series of acoustic images to form an acoustic image set. In the acoustic image set, the target underwater organisms in each acoustic image are determined, and the pixel area, stroke perimeter and position coordinates of each target underwater organism are extracted. Based on the pixel area, stroke perimeter and position coordinates, it is judged whether there are similar underwater organisms in the target underwater organisms in adjacent acoustic images. After determining that there are similar underwater organisms, the similar underwater organisms are eliminated from the target underwater organisms identified in each acoustic image to obtain the actual underwater organisms, and the number of target organisms of the actual underwater organisms is further calculated, which effectively identifies the number of underwater organisms in an open environment while improving the recognition efficiency and recognition accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] Figure 1 is a schematic diagram of the structure of an underwater biometric system shown in an embodiment of the present application; Figure 2 is a schematic diagram of the layout of an omnidirectional imaging sonar shown in an embodiment of the present application; Figure 3 is a flow chart of an underwater biometrics method shown in an embodiment of the present application; Figure 4 1 is a schematic diagram of the effect of a target underwater organism in three consecutive acoustic images shown in an example of the present application, wherein (A) is a schematic diagram of an original acoustic image, and (B) is a schematic diagram of an acoustic image after processing; Figure 5 is a schematic diagram of text results of target underwater organisms in three consecutive acoustic images shown in an embodiment of the present application; Figure 6 is a functional module diagram of an underwater biometric device shown in an embodiment of the present application; Figure 7 It is a structural schematic diagram of a metering device shown in an embodiment of the present application. DETAILED DESCRIPTION
[0018] The present invention is further described below in conjunction with the accompanying drawings and embodiments.
[0019] The following will clearly and completely describe the concept, specific structure and technical effects of the present invention in combination with the embodiments and drawings, so as to fully understand the purpose, characteristics and effects of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. Based on the embodiments of the present invention, other embodiments obtained by technicians in this field without creative work are all within the scope of protection of the present invention. In addition, all the connection / connection relationships involved in the patent do not refer to the direct connection of components, but refer to the formation of a better connection structure by adding or reducing connection accessories according to the specific implementation situation. The various technical features in the invention can be combined interchangeably without conflicting with each other.
[0020] Reference Figure 1 As shown, a schematic diagram of the structure of an underwater biometric system shown in an embodiment of the present application.
[0021] The underwater biometric system 1 includes a collection device 10 and a metering device 20, wherein the collection device 10 is communicatively connected to the metering device 20. In some embodiments, the collection device 10 can establish a communication connection with the metering device 20 via a network cable, and the network cable can be a high-speed, low-latency network cable (such as Cat6 or Cat6a).
[0022] The acquisition device 10 can be an omnidirectional image sonar. First, the omnidirectional image sonar is fixedly installed on a column on one side of the fishing net in the river. The omnidirectional image sonar is laid horizontally below the water surface. Its detection radius is set to the distance from the omnidirectional image sonar to the bottom of the column on the other side of the fishing net, so that the sound wave completely covers the cross section of the entire river within a 90° detection range. Figure 2 shown.
[0023] In some embodiments, in order to increase the thickness of the detectable cross-section and improve the detection rate of underwater organisms, the omnidirectional imaging sonar can be replaced with a transducer with a larger opening angle so that the sound waves can cover a wider area of water, thereby detecting underwater organisms in a larger range at one time.
[0024] Next, the omnidirectional image sonar is connected to a 24V DC power supply and connected to the metering device 20 on the shore through an RJ-45 network cable interface. The metering device 20 is a device that can automatically perform numerical calculations and / or information processing according to pre-set or stored instructions, and its hardware includes but is not limited to microprocessors, application-specific integrated circuits, programmable gate arrays, digital processors, and embedded devices. The metering device 20 may also include user equipment, which includes but is not limited to any electronic product that can interact with the user through a keyboard, mouse, remote control, touchpad, or voice control device, such as a personal computer, tablet computer, smart phone, digital camera, etc. When it is necessary to use the omnidirectional image sonar to collect images of underwater organisms in the river channel, the host computer software set in the metering device 20 controls the omnidirectional image sonar to capture an acoustic image every time a scan is completed. Specifically, the metering device 20 is configured with a host computer software for sonar control and real-time data display, and a scanning instruction is sent to the omnidirectional image sonar through the host computer software, so as to control the omnidirectional image sonar to start collecting acoustic images of the river area according to the scanning parameters indicated by the scanning instruction, wherein the scanning parameters may include, but are not limited to: scanning range, scanning speed, scanning direction, etc., to ensure that the omnidirectional image sonar can fully cover the target area.
[0025] Every time the omnidirectional image sonar completes a scan, the host computer software determines whether the scan is complete based on the received acoustic image data. When new acoustic image data is detected, it is immediately captured and saved. That is, the host computer software controls how the omnidirectional image sonar captures the data each time it completes a scan. Figure 1 The omnidirectional imaging sonar captures an acoustic image of the river area to ensure that the detection content of each acoustic image is not repeated. In addition, to avoid image content duplication, a time interval or a trigger mechanism based on image content changes can be set. In addition, the omnidirectional imaging sonar captures an acoustic image every time it completes a scan. Underwater organisms that normally swim along the water flow will only be recorded once when they pass through the detection section, and the detection content of each image will not be repeated.
[0026] The metering device 20 includes an underwater biometering device 30 for executing an underwater biometering method.
[0027] Traditional hydroacoustic monitoring methods usually use forward-looking image sonars, which have high resolution but narrow horizontal viewing angles. Multiple devices need to be deployed to fully cover the river channel, increasing the difficulty of deployment and debugging and the cost of capital. In addition, traditional omnidirectional image sonars use a motor-driven bracket to carry the transducer and rotate a full circle to achieve omnidirectional scanning. Compared with the prior art, this application uses omnidirectional image sonars instead of forward-looking image sonars, which are easy to install and can fully cover the cross-section of the river channel with only one forward-looking image sonar. Secondly, the software and hardware of the omnidirectional image sonar are improved for special application environments, so that the omnidirectional image sonar can only scan a quarter of a circle. The rotating mechanism carries the transducer to scan back and forth within 90°, which is 4 times faster than the traditional full-circle detection method.
[0028] Reference Figure 3 As shown, it is a flow chart of an underwater biometric method shown in an embodiment of the present application, and the underwater biometric method includes the following steps.
[0029] S31, acquiring an acoustic image of the target river channel area to obtain an acoustic image set.
[0030] The target river area refers to the river area where acoustic images including underwater organisms need to be collected and underwater organism measurement needs to be performed based on the acoustic images.
[0031] In some embodiments, before collecting acoustic images of the target river area including underwater organisms through omnidirectional image sonar, it is necessary to first fix the omnidirectional image sonar on a column on one side of the fishing net in the target river area, and lay the omnidirectional image sonar horizontally below the water surface, and set the detection radius of the omnidirectional image sonar to the distance from the bottom of the column on the other side of the fishing net, so that the sound waves can completely cover the cross-section of the entire target river within a 90° detection range, and then connect the omnidirectional image sonar to the metering equipment through a network cable, so that the acoustic image collected by the omnidirectional sonar device can be transmitted to the metering equipment through the network cable for processing. Among them, the metering equipment is installed with a host computer software, which can control the omnidirectional image sonar to intercept an acoustic image every time a scan is completed, ensuring that the detection content of each acoustic image is not repeated, thereby obtaining an acoustic image set.
[0032] S32, determining a target underwater organism in the target acoustic image, wherein the target acoustic image is any acoustic image in the acoustic image set.
[0033] When the acoustic image set is acquired, the metering device can pre-process each acoustic image in the acoustic image set to determine which underwater organisms (i.e., target underwater organisms) exist in each acoustic image. In an embodiment of the present application, the electronic device uses the MWORKS platform to process the acoustic image set, and the programming language is Julia. By using the drawing API launched by the MWORKS platform, such as TyPlot, image processing and image recognition of each acoustic image in the acoustic image set can be achieved. Among them, the target underwater organisms may include, but are not limited to: fish, jellyfish, shrimp and other underwater organisms.
[0034] Specifically, in the HSV color space, color is defined by hue, saturation, and brightness. Different colors occupy different ranges in the HSV space, making HSV a very practical color space for color segmentation and recognition in image processing. Therefore, the metering device can first convert the acoustic image img from the RGB color space to the HSV color space imgHSV (for example, TyPlot.rgb2hsv), and then adjust the image HSV parameters to determine the optimal value range to achieve the best color recognition effect, and separate the acoustic target (that is, the target underwater organism) within the set color range from the black background, refer to Figure 4 (A) in.
[0035] Through the above optional implementation, by converting the acoustic image from the RGB color space to the HSV color space and using the characteristics of the HSV color space for color segmentation and recognition, the target underwater organisms (such as fish, jellyfish, shrimp, etc.) in the acoustic image are effectively determined, the accuracy of color recognition is improved, and the recognition effect of the target underwater organisms is optimized.
[0036] S33, determining the pixel area, stroke perimeter and position coordinates of the target underwater organism.
[0037] In some embodiments, after the measuring device obtains a set of acoustic images collected by the omnidirectional image sonar, it is necessary to obtain the pixel area, position coordinates, and stroke length of each underwater organism in each acoustic image in the acoustic image set.
[0038] Specifically, after separating the target underwater organisms and the black background within the set color range, the measuring device can further perform color detection, that is, check each pixel in the acoustic image imgHSV. If the pixel value is within the specified range, the pixel at the corresponding position in the mask image mask is set to white, otherwise it is set to black, thereby realizing the counting of the pixel area of each target underwater organism.
[0039] Since only the color angle is considered when calculating the pixel area of the target underwater organism, each pixel of each acoustic image is processed, it is impossible to further determine the perimeter of each target underwater organism (i.e., the length of a circle around the underwater organism, refer to Figure 4 (The orange stroke or red stroke in (B)), so the metering device needs to perform edge detection and connection analysis on the obtained mask image mask. Specifically, the metering device first binarizes the mask image mask to obtain a binary image, and then performs edge detection on the outline of the target underwater organism in the binary image, that is, the metering device first designs an operator to calculate the gradient of each pixel in the binary image, wherein the operator can be an edge detection operator based on a first-order derivative, which is used to estimate the gradient of each pixel in the binary image, and is composed of two 3×3 convolution kernels, which are used to estimate the gradient in the horizontal direction and the vertical direction, respectively. The operator includes a horizontal gradient operator and a vertical gradient operator, which can be represented by the following two 3×3 convolution kernels: , ; in, is the horizontal gradient operator, is the vertical gradient operator.
[0040] Next, the metering device can perform a convolution operation on each pixel of the binary image based on the operator. Suppose the binary image is , then the horizontal gradient and the vertical gradient It can be calculated by the following formula: ; ; Among them, * represents the convolution operation.
[0041] The measuring equipment can calculate the gradient amplitude by the following formula: : ; Among them, the gradient amplitude It represents the gradient size of each pixel in the acoustic image, which is the Euclidean norm of the horizontal and vertical gradients.
[0042] In addition, the gradient amplitude reflects the strength of the edge, and a larger gradient amplitude means a more obvious edge. The measurement equipment can calculate the gradient direction by the following formula: : ; Among them, the gradient direction is also the direction of the edge.
[0043] Non-maximum suppression can ensure that each edge point is the maximum value of its intensity in the neighborhood, thus obtaining clear and thin edge lines. , the metering equipment can perform the following steps: Will Quantize to the nearest angle category, for example, if the angle categories are 0°, 45°, 90°, and 135°, then: 1) If 45°> ≥0° or 225°> ≥180°, the gradient direction is 0°.
[0044] 2) If 90°> ≥45° or 270°> ≥225°, the gradient direction is 45°.
[0045] 3) If 135°> ≥90° or 315°> ≥270°, the gradient direction is 90°.
[0046] 4) If ≥135° or <45°, the gradient direction is 135°.
[0047] According to the direction category, the corresponding neighbor pixels are selected for comparison.
[0048] 1) For the 0° gradient direction, compare and and The gradient magnitude.
[0049] 2) For the 45° gradient direction, compare and and The gradient magnitude.
[0050] 3) For the 90° gradient direction, compare and and The gradient magnitude.
[0051] 4) For the 135° gradient direction, compare and and The gradient magnitude.
[0052] if The gradient magnitude is not greater than the gradient magnitude of its two neighboring pixels in the direction, then Set to 0 to indicate that the point is not part of the edge.
[0053] Through the above steps, repeated or non-strongest responses can be removed to ensure that each detected feature is represented only once and has the highest local intensity, thereby obtaining a line edge with a single pixel width. The gradient amplitude of the above edge point is compared with the high threshold and the low threshold respectively. When the gradient amplitude is greater than the high threshold, the corresponding edge point is determined as a strong edge point. When the gradient amplitude is less than the high threshold but greater than the low threshold, the corresponding edge point is determined as a weak edge point. Then, the metering equipment can connect the weak edge point to the strong edge point to form a continuous line, or determine the edge point adjacent to the strong edge point as a true edge. Among them, the strong edge point is directly marked as an edge, and the weak edge point is also marked as an edge if it is connected to the strong edge point, otherwise it is suppressed.
[0054] Finally, the metrology device integrates the determined strong edge points and weak edge points and outputs a set of edge points, which represents the locations with the most significant intensity changes in the acoustic image and forms continuous edge lines based on the strong edge points and weak edge points.
[0055] It should be noted that the metering device can pre-set two thresholds, namely a high threshold and a low threshold. The high threshold and the low threshold are usually set and adjusted based on the overall brightness and contrast of the image, as well as the desired edge detection accuracy. A higher high threshold will result in fewer edge points being detected, but the detected edges are usually more accurate and clear; a lower low threshold may introduce a lot of noise or false edges.
[0056] Furthermore, the metering device can perform contour search and contour connection, combining the edge points in the edge point set into contours to identify the contours of the target underwater organisms in the acoustic image. Specifically, the metering device can arbitrarily select an edge point from the edge point set as the starting point. Similarly, an edge point with fewer edge points in its neighborhood can be selected as the starting point to reduce the possibility of a loop. Starting from the starting point, move along the edge point by tracking the connectivity and gradient direction of the edge point until returning to the starting point or finding a closed loop; during the traversal process, the metering device can collect all the edge points that constitute the contour and arrange the edge points in order to reflect the actual shape of the contour; for multiple target underwater organisms that may exist in the same acoustic image, the above steps need to be repeated until all edge points are assigned to a certain contour. Then, the metering device performs contour connection on the edge points found, connecting the contour points into a continuous, closed path. Based on contour search and contour connection, the measuring equipment can clearly represent the boundary of the target underwater organism in the acoustic image, and each pixel point that makes up the boundary, that is, each pixel length, can be determined based on the pixel length. The number of contour pixels of the target underwater organism can determine its corresponding stroke perimeter, where the unit of the stroke perimeter is pixel.
[0057] In some embodiments, during the contour connection process, contour points may be disconnected due to noise or limitations of edge detection, so the metrology device can connect the contour points using straight lines or curves to form a continuous path; ensure that the contour is closed, that is, connected from end to end, and also use a contour simplification algorithm to reduce the number of contour points while maintaining the overall shape of the contour to improve calculation speed and efficiency.
[0058] Furthermore, the measuring device can calculate the center of mass of each target underwater creature as the position coordinate of the target underwater creature. Specifically, the upper left corner of the acoustic image is used as the origin, and the position coordinate corresponding to the target underwater creature can be determined based on the origin.
[0059] Through the above optional implementation, through color detection, edge detection, non-maximum suppression, dual threshold processing, contour search and contour connection, etc., the pixel area, stroke perimeter and position coordinates of the target underwater organism in the acoustic image are accurately determined, which not only improves the accuracy and clarity of edge detection, but also optimizes the calculation speed and efficiency through the contour simplification algorithm. Ultimately, the boundary of the target underwater organism can be clearly indicated, and its pixel area, stroke perimeter and position coordinates can be accurately calculated, providing reliable data support for the subsequent determination of the number of target underwater organisms. In addition, by setting high and low thresholds to suppress noise, the low threshold identifies potential weak edge points, and verifies their authenticity by connecting with strong edge points, effectively reducing the situation where noise is misjudged as an edge.
[0060] In some embodiments, the metering device can also calculate the length of the straight line between the position coordinates of each target underwater creature and the origin as the distance between the captured image and the target underwater creature. It should be noted that the upper left corner of the acoustic image, i.e., the location of the origin, corresponds to the location where the acquisition device is installed. By calculating the distance, it can be clearly determined how far away from the acquisition device there are target underwater creatures.
[0061] In other embodiments, when performing edge detection on a target underwater organism in an acoustic image, the metering device may also convert the acoustic image img into a binary image by threshold processing or a global / local binarization method, thereby removing noise and simplifying the image so that it only contains the distinction between the target and the background.
[0062] In some embodiments, due to the complexity of the underwater environment corresponding to the target river channel area, there may be various types of noise, such as bubbles, waterweed fragments, sediment particles, etc., which may all be misdetected as underwater organisms. Therefore, the metering equipment can pre-set the minimum area threshold to avoid identifying too small objects as underwater organisms, thereby improving the accuracy of detection. By filtering out unnecessary small targets, the amount of data for subsequent processing can be reduced and the efficiency of the algorithm can be improved. Among them, the minimum area threshold is adjusted according to the specific acoustic image situation. If the minimum area threshold is set low, more noise may be misjudged as underwater organisms. If the minimum area threshold is set high, some underwater organisms may be missed. Therefore, the embodiment of the present application sets the minimum area threshold to 1000 according to the acoustic image situation. That is, targets with a pixel area less than 1000 pixels are ignored and will not be counted in the subsequent biological counting process. In addition, the minimum area threshold can be adjusted according to the characteristics of different water environments, the sonar detection range of the collected image, and the specific conditions of the aquatic organism morphology.
[0063] S34, judging whether there is a similar underwater creature to the target underwater creature in an adjacent acoustic image according to the pixel area, the perimeter of the stroke and the position coordinates.
[0064] Under normal circumstances, underwater organisms swim along the river current and will only appear once in the omnidirectional image sonar detection screen. Targets that are detected multiple times can be identified as floating obstacles in the water, fixed stone piers and other objects. Multiple inclusions will cause the aquatic organism count to be too high. Or when underwater organisms do not swim along the river current, the same underwater organisms will be captured repeatedly in adjacent acoustic images.
[0065] In some embodiments, the electronic device may calculate multiple similarity indicators corresponding to target underwater organisms on different acoustic images, including position similarity, area similarity, and perimeter similarity, to determine whether similar underwater organisms exist in adjacent acoustic images.
[0066] The area similarity is used to evaluate the similarity between the pixel areas of two target underwater organisms in each two adjacent acoustic images. Specifically, the measuring device can calculate the absolute difference between the pixel areas of the two target underwater organisms, and determine the area similarity by the ratio between the absolute difference and the maximum pixel area.
[0067] The area similarity of two target underwater organisms in adjacent acoustic images is determined by the following formula: : ; in, Target underwater organisms i (also known as the first underwater creature) pixel area, Target underwater organisms j (also known as the second underwater creature) pixel area.
[0068] The position similarity is used to measure the position difference between two target underwater organisms in each two adjacent acoustic images. Specifically, the measuring device can determine the center point of the target underwater organism, calculate the distance between the center points, and normalize the distance to the length of the image diagonal to obtain the position similarity.
[0069] The position similarity of two target underwater organisms in adjacent acoustic images is determined by the following formula: : ; in, Target underwater organisms i and target underwater life j The Euclidean distance between the center points, D is the length of the diagonal of the acoustic image, that is , w is the width of any acoustic image in adjacent acoustic images, h is the height of the acoustic image. It should be noted that the width and height of any acoustic image in adjacent acoustic images are consistent, that is, the width and height of each acoustic image in the acoustic image set are consistent.
[0070] The perimeter similarity is used to measure the similarity between the perimeters of two target underwater creatures in adjacent acoustic images. Specifically, the measuring device can calculate the absolute difference between the perimeters of the two target underwater creatures, and determine the perimeter similarity by the ratio between the absolute difference and the maximum perimeter of the stroke. ; ; in, Target underwater organisms i The stroke perimeter of Target underwater organisms j The stroke perimeter.
[0071] After determining the position similarity, area similarity and perimeter similarity of any two underwater organisms in any two adjacent acoustic images, the measuring device can obtain a comprehensive similarity by assigning weight coefficients corresponding to the position similarity, area similarity and perimeter similarity to more comprehensively evaluate whether the two target underwater organisms are similar.
[0072] The comprehensive similarity is determined by the following formula: : ; in, is the weight coefficient corresponding to the position similarity (also called the first weight coefficient), is the first similarity, is the weight coefficient corresponding to the area similarity (also called the second weight coefficient), is the second similarity, is the weight coefficient corresponding to the perimeter similarity (also called the third weight coefficient), is the third similarity, and .
[0073] In the embodiment of the present application, since position similarity is more important in judging similar underwater creatures, area similarity will not change much on continuous acoustic images, while perimeter similarity may fluctuate to a certain extent due to changes in the posture angle of the target underwater creature. , , .
[0074] Finally, the metering device can pre-set the similarity threshold T , used to determine whether two target underwater organisms are similar enough. If the comprehensive similarity Greater than the similarity threshold T , then the target underwater organisms are considered i and target underwater life j are similar, that is, there are similar underwater organisms in the target underwater organisms between adjacent acoustic images.
[0075] In some implementations, if an accurate count of the number of underwater organisms is required, a lower similarity threshold may be set. T , in order to reduce the missed detection rate (misjudging interference objects as underwater creatures). T The value of can find a balance point between the missed detection rate and the error rate (misjudging underwater organisms as interference objects), and determine this balance point as the final similarity threshold T If the target is underwater i Target underwater organisms at the same location in three consecutive acoustic images j and target underwater life k The comprehensive similarity is greater than the similarity threshold T , then the target underwater organisms are considered i It is an interference, which means that the target underwater organism can be identified i It is a similar underwater creature. Mark and exclude all target underwater creatures that are judged to be similar underwater creatures, and adjust the stroke color of similar underwater creatures to red. Figure 4 (B) and give the corresponding text result prompt, refer to Figure 5 , to remind the user.
[0076] Reference Figure 5 ,for Figure 4 The text results corresponding to the detection results of three consecutive acoustic images are shown in Figure 1. Each line is the detection data of each target underwater organism. Three consecutive target underwater organisms are judged as interference duplicate targets, that is, similar underwater organisms, and similar underwater organisms are excluded. In the three consecutive acoustic images, the number of organisms detected by the measuring equipment is 6, 5, and 4, which is basically consistent with human eye observation.
[0077] Through the above optional implementation, by calculating the position similarity, area similarity and perimeter similarity of the target underwater organisms in adjacent acoustic images and assigning corresponding weight coefficients, a comprehensive similarity is obtained to determine whether there are similar underwater organisms. This can effectively distinguish between floating obstacles, fixed stone piers and other objects in the water and normal swimming underwater organisms, and avoid excessive underwater organism measurement. At the same time, by adjusting the similarity threshold, a balance can be found between the missed detection rate and the error rate to improve measurement accuracy. In addition, marking and prompting similar underwater organisms can help users more intuitively identify and eliminate interferences, thereby improving the reliability and efficiency of underwater organism measurement.
[0078] S35, when it is determined that the similar underwater organisms exist in the target underwater organisms, determine the target organism quantity of the actual underwater organisms in the target river channel area according to the target underwater organisms and the similar underwater organisms.
[0079] When the target underwater organisms are determined to be similar underwater organisms, the measuring equipment can eliminate the similar underwater organisms from the target underwater organisms identified in each acoustic image to obtain the actual underwater organisms and determine the number of the actual underwater organisms, which is called the target organism number.
[0080] In addition, since underwater organisms monitored by omnidirectional image sonar may pass through in groups, the metering device cannot simply use the target water volume of the identified target underwater organisms as the actual number of underwater organisms. In some embodiments, after analyzing the acoustic images detected by the omnidirectional image sonar, it is found that most of the underwater organisms in a single acoustic image are swimming alone, but there are also some underwater organisms that are clearly superimposed. For this reason, the metering device can select the median pixel area of the actual underwater organisms in a single acoustic image. M As a reference area for a single underwater organism in this acoustic image.
[0081] Considering the differences in acoustic characteristics of different underwater organisms, signal strength can be used for weighted adjustment. The strength information of the detected underwater organisms is rendered in different colors in the acoustic image, from green to purple from weak to strong. Suppose the signal strength range is [0, 1], where 0 represents the weakest signal (green) and 1 represents the strongest signal (purple). Figure 4 (A).
[0082] For each actual underwater organism in each acoustic image, the metrology device can define its weighted area for: ; in, A is the pixel area of the actual underwater organisms, S is the actual signal strength of underwater organisms, is the adjustment coefficient, which is used to control the influence of signal intensity on pixel area.
[0083] For each acoustic image, count the number of actual underwater organisms in it for: ; in, n is the number of actual underwater organisms in each acoustic image, For the q The weighted area of actual underwater life.
[0084] For the entire acoustic image collection, calculate the number of target organisms that are actually underwater organisms for: ; in, m is the image number of the acoustic image in the acoustic image set.
[0085] Through the above optional implementation, similar underwater organisms are effectively identified and eliminated to ensure that the calculated number of target organisms is closer to the actual number. Secondly, considering the possible clustering phenomenon and superposition of underwater organisms, the median pixel area is used as the reference area, and the signal strength is used for weighted adjustment, thereby improving the accuracy of underwater organism measurement.
[0086] In some embodiments, in order to calculate the number of underwater organisms passing through the target river area within a period of time, the actual number of underwater organisms in the acoustic image detected by the omnidirectional image sonar in the last minute can be added to obtain the biological flux of the target river area in the last minute.
[0087] Reference Figure 6 , which is a functional module diagram of an underwater biometric device shown in an embodiment of the present application.
[0088] In some embodiments, the underwater biometric device 30 may include a plurality of functional modules composed of computer program segments. The computer programs of the various program segments of the underwater biometric device 30 may be stored in a memory of a metering device and executed by at least one processor to perform (see Figure 3 Description) Function of underwater biometrics.
[0089] In this embodiment, the underwater biometric device 30 can be divided into multiple functional modules according to the functions it performs. The functional modules may include: an acquisition module 301, a first determination module 302, a second determination module 303, a judgment module 304 and a measurement module 305. The module referred to in this application refers to a series of computer program segments that can be executed by at least one processor and can complete fixed functions, which are stored in a memory. In this embodiment, the functions of each module will be described in detail in subsequent embodiments.
[0090] The acquisition module 301 is used to acquire an acoustic image of a target river channel area to obtain an acoustic image set.
[0091] The first determination module 302 is used to determine the target underwater organism in the target acoustic image, wherein the target acoustic image is any acoustic image in the acoustic image set.
[0092] The second determination module 303 is used to determine the pixel area, stroke perimeter and position coordinates of the target underwater organism.
[0093] The judgment module 304 is used to judge whether there is a similar underwater organism to the target underwater organism in the adjacent acoustic image according to the pixel area, the stroke perimeter and the position coordinates.
[0094] The metering module 305 is used to determine the target organism quantity of the actual underwater organisms in the target river area according to the target underwater organisms and the similar underwater organisms when it is determined that the similar underwater organisms exist in the target underwater organisms.
[0095] The metering module 305 is also specifically used for: The number of target organisms is determined by the following formula: ; in, is the number of target organisms, m is the number of acoustic images in the acoustic image set, is the initial number of the actual underwater organisms in each of the acoustic images; The initial number of organisms is determined by the following formula: ; in, is the initial number of organisms, n is the number of actual underwater organisms in each acoustic image, For the q The weighted area of actual underwater life, M is the median of the pixel area of each acoustic image in the acoustic image set; The weighted area is determined by the following formula: ; in, A is the pixel area of the actual underwater organisms described in each acoustic image, S is the signal strength of the target underwater organism in each acoustic image, It is the adjustment coefficient, which is used to control the influence of signal intensity on pixel area.
[0096] The determination module 304 is further specifically configured to: Determining, according to the pixel areas, the area similarity of the first underwater creature and the second underwater creature in the adjacent acoustic images, wherein the first underwater creature and the second underwater creature are any two underwater creatures among the target underwater creatures; Determine, according to the position coordinates, the similarity of the positions of the first underwater creature and the second underwater creature in the adjacent acoustic images; Determining the similarity of the perimeters of the first underwater creature and the second underwater creature in the adjacent acoustic images according to the stroke perimeters; Determine the comprehensive similarity between the first underwater organism and the second underwater organism according to the area similarity, the position similarity and the perimeter similarity; It is determined whether the first underwater creature and the second underwater creature are the similar underwater creatures according to the comprehensive similarity.
[0097] The determination module 304 is further specifically configured to: Determining a first weight coefficient corresponding to the area similarity, and obtaining a first similarity based on the area similarity and the first weight coefficient; Determining a second weight coefficient corresponding to the position similarity, and obtaining a second similarity based on the position similarity and the second weight coefficient; Determining a third weight coefficient corresponding to the perimeter similarity, and obtaining a third similarity based on the perimeter similarity and the third weight coefficient; The comprehensive similarity is determined based on the first similarity, the second similarity, and the third similarity.
[0098] The determination module 304 is further specifically configured to: The area similarity is determined by the following formula: ; in, is the area similarity, is the pixel area of the first underwater organism, is the pixel area of the second underwater organism.
[0099] The determination module 304 is further specifically configured to: The position similarity is determined by the following formula: ; in, is the position similarity, is the Euclidean distance between the position coordinates of the first underwater creature and the second underwater creature, D is the diagonal length of any acoustic image in the adjacent acoustic images, ,in w is the width of the adjacent acoustic images, h is the height of the adjacent acoustic image.
[0100] The determination module 304 is further specifically configured to: The perimeter similarity is determined by the following formula: ; in, is the perimeter similarity, is the stroke perimeter of the first underwater creature, Set the perimeter of the stroke for the second underwater creature.
[0101] It should be understood that the various variations and specific embodiments of the underwater biometric method provided in the above embodiments are also applicable to the underwater biometric device of the present embodiment. Through the above detailed description of the underwater biometric method, those skilled in the art can clearly know the implementation method of the underwater biometric device of the present embodiment. For the sake of brevity of the specification, it will not be described in detail here.
[0102] See also Figure 7 , which is a schematic diagram of the structure of a metering device according to an embodiment of the present application. In a preferred embodiment of the present application, the metering device 20 includes a memory 201 , at least one processor 202 and at least one communication bus 203 .
[0103] Those skilled in the art should understand that Figure 7 The structure of the metering device 20 shown does not constitute a limitation of the embodiments of the present application, and can be either a bus structure or a star structure. The metering device 20 can also include more or less other hardware or software than shown in the figure, or a different component arrangement.
[0104] In the above embodiments provided in the present application, it should be understood that the disclosed methods, devices, computer-readable storage media, and metering equipment can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the modules is only a logical function division. There may be other division methods in actual implementation, such as multiple components or modules can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be an indirect coupling or communication connection through some interfaces, devices or components or modules, which can be electrical, mechanical or other forms.
[0105] The components described as separate components may or may not be physically separated, and the components shown as components may or may not be physical modules, that is, they may be located in one place or distributed on multiple network modules. Some or all of the components may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0106] In addition, each functional module in each embodiment of the present invention may be integrated into one processing module, or each component may exist physically separately, or two or more modules may be integrated into one module. The above integrated modules may be implemented in the form of hardware or in the form of software functional modules.
[0107] If the integrated module is implemented in the form of a software function module and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product. The computer software product is stored in a storage medium, including several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the method described in each embodiment of the present invention. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), disk or optical disk, etc. Various media that can store program codes.
[0108] It should be noted that, for the convenience of description, the aforementioned method embodiments are all described as a series of action combinations, but those skilled in the art should be aware that the present invention is not limited by the described action sequence, because according to the present invention, certain steps can be performed in other sequences or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in the specification are all preferred embodiments, and the actions and modules involved are not necessarily required by the present invention.
[0109] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.
[0110] The above is a specific description of the preferred implementation of the present invention, but the invention is not limited to the embodiments. Those skilled in the art can make various equivalent modifications or substitutions without violating the spirit of the present invention. These equivalent modifications or substitutions are all included in the scope defined by the claims of this application.
Claims
1. An underwater biometric method, characterized in that: The method comprises: Acquire an acoustic image of a target river channel area to obtain an acoustic image set; Determining a target underwater organism in the target acoustic image, wherein the target acoustic image is any acoustic image in the acoustic image set; Determine the pixel area, stroke perimeter and position coordinates of the target underwater organism; Determining whether there is a similar underwater organism to the target underwater organism in an adjacent acoustic image according to the pixel area, the perimeter of the stroke and the position coordinates; When it is determined that the similar underwater organisms exist in the target underwater organisms, the target organism quantity of the actual underwater organisms in the target river channel area is determined based on the target underwater organisms and the similar underwater organisms.
2. The underwater biometric method according to claim 1, characterized in that: The step of determining the target organism quantity of actual underwater organisms in the target river channel area according to the target underwater organisms and the similar underwater organisms comprises: The number of target organisms is determined by the following formula: ; in, is the number of target organisms, m is the number of acoustic images in the acoustic image set, is the initial number of the actual underwater organisms in each of the acoustic images; The initial number of organisms is determined by the following formula: ; in, is the initial number of organisms, n is the number of actual underwater organisms in each acoustic image, For the q The weighted area of actual underwater life, M is the median of the pixel area of each acoustic image in the acoustic image set; The weighted area is determined by the following formula: ; in, A is the pixel area of the actual underwater organisms described in each acoustic image, S is the signal strength of the target underwater organism in each acoustic image, is the adjustment coefficient, which is used to control the influence of signal intensity on pixel area.
3. The underwater biometric method according to claim 1, characterized in that: The step of judging whether the target underwater creature is a similar underwater creature in adjacent acoustic images according to the pixel area, the perimeter of the stroke and the position coordinates comprises: Determining, according to the pixel areas, the area similarity of the first underwater creature and the second underwater creature in the adjacent acoustic images, wherein the first underwater creature and the second underwater creature are any two underwater creatures among the target underwater creatures; Determine, according to the position coordinates, the similarity of the positions of the first underwater creature and the second underwater creature in the adjacent acoustic images; Determining the similarity of the perimeters of the first underwater creature and the second underwater creature in the adjacent acoustic images according to the stroke perimeters; Determine the comprehensive similarity between the first underwater organism and the second underwater organism according to the area similarity, the position similarity and the perimeter similarity; It is determined whether the first underwater creature and the second underwater creature are the similar underwater creatures according to the comprehensive similarity.
4. The underwater biometric method according to claim 3, characterized in that: The determining of the comprehensive similarity between the first underwater organism and the second underwater organism according to the area similarity, the position similarity and the perimeter similarity comprises: Determining a first weight coefficient corresponding to the area similarity, and obtaining a first similarity based on the area similarity and the first weight coefficient; Determining a second weight coefficient corresponding to the position similarity, and obtaining a second similarity based on the position similarity and the second weight coefficient; Determining a third weight coefficient corresponding to the perimeter similarity, and obtaining a third similarity based on the perimeter similarity and the third weight coefficient; The comprehensive similarity is determined based on the first similarity, the second similarity, and the third similarity.
5. The underwater biometric method according to claim 3, characterized in that: Determining the area similarity of the first underwater creature and the second underwater creature in the adjacent acoustic images according to the pixel area includes: The area similarity is determined by the following formula: ; in, is the area similarity, is the pixel area of the first underwater organism, is the pixel area of the second underwater organism.
6. The underwater biometric method according to claim 3, characterized in that: Determining the position similarity of the first underwater creature and the second underwater creature in the adjacent acoustic images according to the position coordinates includes: The position similarity is determined by the following formula: ; in, is the position similarity, is the Euclidean distance between the position coordinates of the first underwater creature and the second underwater creature, D is the diagonal length of any acoustic image in the adjacent acoustic images, ,in w is the width of the adjacent acoustic images, h is the height of the adjacent acoustic image.
7. The underwater biometric method according to claim 3, characterized in that: The determining, according to the stroke perimeter, the perimeter similarity of the first underwater creature and the second underwater creature in the adjacent acoustic images comprises: The perimeter similarity is determined by the following formula: ; in, is the perimeter similarity, is the stroke perimeter of the first underwater creature, Set the perimeter of the stroke for the second underwater creature.
8. An underwater biometric device, characterized in that: The device comprises: An acquisition module is used to acquire an acoustic image of a target river channel area to obtain an acoustic image set; A first determination module is used to determine the target underwater organism in the target acoustic image, wherein the target acoustic image is any acoustic image in the acoustic image set; A second determination module is used to determine the pixel area, stroke perimeter and position coordinates of the target underwater organism; A judging module, configured to judge whether the target underwater creature has a similar underwater creature in an adjacent acoustic image according to the pixel area, the perimeter of the stroke and the position coordinates; The metering module is used to determine the target organism quantity of the actual underwater organisms in the target river channel area according to the target underwater organisms and the similar underwater organisms when it is determined that the similar underwater organisms exist in the target underwater organisms.
9. A measuring device, characterized in that: The method comprises a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the steps of the underwater biometric method according to any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the underwater biometrics method according to any one of claims 1 to 7 are implemented.