Method, device, equipment and storage medium for measuring distance and area of underwater objects
Measuring the distance and area of underwater objects through cameras and laser arrays solves the problem of inability to identify multi-beam sonar in the existing technology and achieves low-cost and efficient measurement of underwater objects.
Patent Information
- Application Number
- CN202110652434.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-06-11
- Publication Date
- 2024-10-22
- Estimated Expiration
- 2041-06-11
AI Technical Summary
Existing technology requires the use of expensive multi-beam sonar when measuring the distance and area of underwater objects. If the object to be measured reflects consistent with the background, the sonar cannot identify it, resulting in failure to measure.
Acquire multiple laser points through the camera, calculate the distance from the object to the camera based on the ratio of the laser points, and use the laser array to calculate the area of the object to achieve distance and area measurement of underwater objects.
It achieves low-cost and high-efficiency distance and area measurement of underwater objects, and solves the problem of multi-beam sonar being unable to identify.
Smart Images

Figure CN113391320B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to underwater measurement technology, and in particular to a method, device, equipment and storage medium for measuring the distance and area of underwater objects. Background Art
[0002] In underwater target detection, the reflected signal of the underwater target is the only effective carrier of the target characteristics, carrying the target information, including the geometric shape and scale of the underwater target. The underwater target is regarded as a linear time-invariant system, and the reflected sound wave is the response of the incident sound wave to the system. The system impulse response of the underwater target describes the scattering characteristics of the underwater target. The duration of its impulse response pulse is the time difference between the fastest reflected sound wave reflected by the underwater target and the latest reflected sound wave reflected by the underwater target. Its pulse amplitude is the magnitude of the reflection intensity of the underwater target to the incident sound wave.
[0003] At present, there are two main methods for underwater target detection: optical detection and acoustic detection. Optical detection mainly uses imaging methods to detect underwater targets. However, underwater, the propagation attenuation of light waves is very large, and the propagation and measurement distance is limited. In contrast, sound waves have better propagation performance in water. After encountering underwater targets, the reflection coefficient of sound waves is large, which is conducive to obtaining object information. Existing technologies require expensive multi-beam sonar to measure the distance and area of underwater objects. If the object to be measured is consistent with the background reflection, the sonar cannot be recognized, resulting in no measurement. Summary of the invention
[0004] The present invention provides a method, device, equipment and storage medium for measuring the distance and area of an underwater object, so as to achieve the effect of low cost and high efficiency.
[0005] In a first aspect, an embodiment of the present invention provides a method for measuring the distance and area of an underwater object, comprising:
[0006] Acquire multiple laser points through the camera;
[0007] Calculating a first distance from the object to the camera according to a ratio of the multiple laser points in the camera image;
[0008] Calculate the area of the laser array by using the laser array and the first distance;
[0009] A first area of the object to be measured is acquired according to the area of the laser array.
[0010] Optionally, acquiring multiple laser points through a camera includes:
[0011] Emit multiple point-shaped parallel lasers to hit the underwater object to be tested;
[0012] The multiple laser points formed by the parallel lasers are captured by a camera.
[0013] Optionally, acquiring multiple laser points through a camera includes:
[0014] Emit two point-shaped parallel lasers to hit the underwater object to be tested;
[0015] Two parallel laser points are captured by a camera.
[0016] Optionally, calculating the area of the laser array by shooting the laser array and the first distance includes:
[0017] Shoot out grid lasers according to the laser array;
[0018] The area of the grid laser is calculated according to the grid laser and the first distance.
[0019] Optionally, the grid laser has a first angle, and the grid size corresponds to the first distance.
[0020] Optionally, calculating the area of the grid laser according to the grid laser and the first distance includes:
[0021] The area of the grid laser is calculated according to the grid laser, the first distance and the corresponding relationship.
[0022] Optionally, acquiring the first area of the object to be measured according to the area of the laser array includes:
[0023] The first area of the object to be measured is calculated according to the number of filled grids in the laser array.
[0024] In a second aspect, an embodiment of the present invention further provides a device for measuring the distance and area of an underwater object, the device comprising:
[0025] A laser acquisition module, used to acquire multiple laser points through a camera;
[0026] A distance calculation module, used for calculating a first distance from the object to the camera according to a ratio of the plurality of laser points in the camera image;
[0027] A laser array module, used to calculate the area of the laser array by projecting the laser array and the first distance;
[0028] The area calculation module is used to obtain the first area of the object to be measured according to the area of the laser array.
[0029] In a third aspect, an embodiment of the present invention further provides an electronic device, the electronic device comprising:
[0030] one or more processors;
[0031] a storage device for storing one or more programs,
[0032] When the one or more programs are executed by the one or more processors, the one or more processors implement any of the methods for measuring the distance and area of underwater objects as described above.
[0033] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium on which a computer program is stored, wherein the computer program includes program instructions, and is characterized in that when the program instructions are executed by a processor, a method for measuring the distance and area of an underwater object as described in any of the above is implemented.
[0034] The embodiment of the present invention discloses a method, device, electronic device and storage medium for measuring the distance and area of underwater objects. The method comprises: acquiring multiple laser points through a camera; calculating a first distance from the object to the camera according to the ratio of the multiple laser points in the camera image; calculating the area of the laser array by projecting a laser array and the first distance; and acquiring a first area of the object to be measured according to the area of the laser array. The method for measuring the distance and area of underwater objects provided by the embodiment of the present invention can measure the distance and area of any underwater object by using a camera and a laser, solving the problem that the prior art requires expensive multi-beam sonar to measure the distance and area of underwater objects. If the object to be measured is consistent with the background reflection, the sonar cannot be recognized, resulting in the inability to measure, thereby achieving the effect of low cost and high efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0035] Figure 1 A method flow chart of a method for measuring the distance and area of an underwater object provided in Embodiment 1 of the present invention;
[0036] Figure 2 A method flow chart of a method for measuring the distance and area of an underwater object provided in Embodiment 2 of the present invention;
[0037] Figure 3 A schematic diagram of the structure of a device for measuring the distance and area of an underwater object provided in Embodiment 3 of the present invention;
[0038] Figure 4 A schematic diagram of the structure of a device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0039] The present invention will be further described in detail below in conjunction with the accompanying drawings and embodiments. It is to be understood that the specific embodiments described herein are only used to explain the present invention, rather than to limit the present invention. It should also be noted that, for ease of description, only parts related to the present invention, rather than all structures, are shown in the accompanying drawings.
[0040] It should be mentioned before discussing the exemplary embodiments in more detail that some exemplary embodiments are described as processes or methods depicted as flow charts. Although the flow charts describe the steps as sequential processes, many of the steps therein can be implemented in parallel, concurrently or simultaneously. In addition, the order of the steps can be rearranged. The process can be terminated when its operation is completed, but can also have additional steps not included in the accompanying drawings. The process can correspond to a method, function, procedure, subroutine, subprogram, etc.
[0041] In addition, the terms "first", "second", etc. can be used in this article to describe various directions, actions, steps or elements, but these directions, actions, steps or elements are not limited by these terms. These terms are only used to distinguish a first direction, action, step or element from another direction, action, step or element. For example, without departing from the scope of the present application, the first module can be the second module, and similarly, the second module can be referred to as the first module. Both the first module and the second module are modules, but they are not the same module. The terms "first", "second", etc. cannot be understood as indicating or implying relative importance or implicitly indicating the number of indicated technical features. Thus, the features defined as "first" and "second" can expressly or implicitly include one or more of the features. In the description of the present invention, the meaning of "multiple" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0042] Embodiment 1
[0043] Figure 1 This is a method flow chart of a method for measuring the distance and area of an underwater object provided in Embodiment 1 of the present invention. The method for measuring the distance and area of an underwater object provided in Embodiment 1 of the present invention is applicable to the case where a user performs underwater measurement. Specifically, the method for measuring the distance and area of an underwater object provided in Embodiment 1 of the present invention includes:
[0044] Step 100: Acquire multiple laser points through a camera.
[0045] In this embodiment, the area of underwater objects is generally measured by an underwater robot, which is also called an unmanned remote-controlled submersible. It is an extreme operation robot that works underwater. Due to the harsh and dangerous underwater environment and the limited diving depth of humans, underwater robots have become an important tool for developing the ocean. In addition, in the process of filming marine documentaries, underwater filming robots are also widely used. The underwater robot transmits data with the control end through a communication connection. In this embodiment, the control end can be a smart device such as a mobile phone, a tablet computer, a computer, etc. The control end obtains the shooting video of the underwater robot in real time, wherein the shooting video includes a variety of underwater objects and scenes, such as fish, corals, sunken ships, etc. In this embodiment, firstly, the camera on the underwater robot is used to obtain the multiple laser point images of the underwater robot hitting the object to be measured, and the position and size of the multiple laser points in the image are obtained through the image.
[0046] Step 110: Calculate a first distance from the object to the camera according to the ratio of the multiple laser points in the camera image.
[0047] In this embodiment, multiple laser points are accurately identified through the captured image, and the first distance from the object to the camera is calculated through the multiple laser points. In this embodiment, the object to be measured can be a stone, a fish, a coral, etc. The distance between the multiple parallel laser points is m, and the horizontal pixel distance of m in the camera image is X, where X decreases as the distance L increases, and the horizontal pixel of the camera is K, K is a fixed value, and the first distance L can be obtained according to the ratio of X / K.
[0048] Step 120: Calculate the area of the laser array by using the laser array and the first distance.
[0049] In this embodiment, the underwater robot emits a laser array, which is an array of high-power lasers composed of multiple laser diodes. It can form a grid laser when it hits an object. The area of the laser array is calculated by the grid laser and the first distance.
[0050] In this embodiment, step 120 includes: firing a grid laser according to the laser array; calculating the area of the grid laser according to the grid laser and the first distance. The laser array fires on the object to be measured to form a grid laser, the grid laser has a first angle, and the grid size has a corresponding relationship with the first distance. Specifically, the area of the grid laser is calculated according to the grid laser, the first distance and the corresponding relationship. The distance width between the grids is W, the distance between the laser and the object to be measured is L, W = L*tanα1, where α1, α2, α3, α4 are fixed angles of the laser beam.
[0051] Step 130: Acquire a first area of the object to be measured according to the area of the laser array.
[0052] In this embodiment, the area of each grid of the laser array can be calculated, and the area S of the object to be measured can be known based on the known number of grids. The user can accurately identify the number of filled grids through manual identification to achieve the effect of automatic calculation. Specifically, the grid data in the captured video is identified through the pattern matching method, and the filled grids are regarded as occupied, and the unfilled grids are regarded as unoccupied. The occupied area can be calculated to accurately calculate the first area of the object to be measured, thereby obtaining the area of the object to be measured and the distance from the camera.
[0053] The embodiment of the present invention discloses a method for measuring the distance and area of underwater objects, the method comprising: acquiring multiple laser points through a camera; calculating a first distance from the object to the camera according to the ratio of the multiple laser points in the camera image; calculating the area of the laser array by projecting a laser array and the first distance; and acquiring a first area of the object to be measured according to the area of the laser array. The method for measuring the distance and area of underwater objects provided by the embodiment of the present invention can measure the distance and area of any underwater object by using a camera and a laser, solving the problem in the prior art that expensive multi-beam sonar is needed to measure the distance and area of underwater objects, and if the object to be measured is consistent with the background reflection, the sonar cannot be recognized, resulting in the inability to measure, thereby achieving the effect of low cost and high efficiency.
[0054] Embodiment 2
[0055] Figure 2 This is a method flow chart of a method for measuring the distance and area of an underwater object provided in Embodiment 1 of the present invention. The method for measuring the distance and area of an underwater object provided in Embodiment 1 of the present invention is applicable to the case where a user performs underwater measurement. Specifically, the method for measuring the distance and area of an underwater object provided in Embodiment 1 of the present invention includes:
[0056] Step 200: emit multiple point-shaped parallel lasers to hit the underwater object to be measured.
[0057] In this embodiment, the area of underwater objects is generally measured by an underwater robot, which is also called an unmanned remote-controlled submersible. It is an extreme operation robot that works underwater. Due to the harsh and dangerous underwater environment and the limited diving depth of humans, underwater robots have become an important tool for developing the ocean. In addition, in the process of filming marine documentaries, underwater filming robots are also widely used. The underwater robot transmits data with the control end through a communication connection. In this embodiment, the control end can be a smart device such as a mobile phone, a tablet computer, a computer, etc. The control end obtains the shooting video of the underwater robot in real time, wherein the shooting video includes a variety of underwater objects and scenes, such as fish, corals, sunken ships, etc. In this embodiment, firstly, the camera on the underwater robot is used to obtain the multiple laser point images of the underwater robot hitting the object to be measured, and the position and size of the multiple laser points in the image are obtained through the image.
[0058] Step 210: Capture a plurality of laser points formed by the parallel lasers through a camera.
[0059] In this embodiment, two point-shaped parallel lasers are emitted to hit the underwater object to be measured; the two parallel laser points are captured by the camera. By emitting two parallel laser beams through the point-shaped parallel laser and hitting the object to be measured, the camera will capture two parallel laser points, and by identifying the ratio of the two parallel laser points in the picture, the distance L from the object to be measured to the camera can be calculated.
[0060] Step 220: Calculate a first distance from the object to the camera according to a ratio of the multiple laser points in the camera image.
[0061] In this embodiment, multiple laser points are accurately identified through the captured image, and the first distance from the object to the camera is calculated through the multiple laser points. In this embodiment, the object to be measured can be a stone, a fish, a coral, etc. The distance between the multiple parallel laser points is m, and the horizontal pixel distance of m in the camera image is X, where X decreases as the distance L increases, and the horizontal pixel of the camera is K, K is a fixed value, and the first distance L can be obtained according to the ratio of X / K.
[0062] Step 230: Calculate the area of the laser array by using the laser array and the first distance.
[0063] In this embodiment, the underwater robot emits a laser array, which is an array of high-power lasers composed of multiple laser diodes. It can form a grid laser when it hits an object. The area of the laser array is calculated by the grid laser and the first distance.
[0064] In this embodiment, it includes: shooting out a grid laser according to the laser array; calculating the area of the grid laser according to the grid laser and the first distance. The laser array is shot on the object to be measured to form a grid laser, the grid laser has a first angle, and the grid size has a corresponding relationship with the first distance. Specifically, the area of the grid laser is calculated according to the grid laser, the first distance and the corresponding relationship. The distance width between the grids is W, the distance between the laser and the object to be measured is L, W = L*tanα1, where α1, α2, α3, α4 are fixed angles of the laser beam.
[0065] Step 240: Calculate the first area of the object to be measured according to the number of filled grids in the laser array.
[0066] In this embodiment, the area of each grid can be calculated from the area of the laser array, and the area S of the object to be measured can be obtained based on the known number of grids. Specifically, the first area of the object to be measured is calculated based on the number of filled grids in the laser array. Among them, the user can accurately identify the number of filled grids through manual recognition to achieve the effect of automatic calculation. Specifically, the grid data in the captured video is identified through the pattern matching method, and the filled grids are regarded as occupied, and the unfilled grids are regarded as unoccupied. The occupied area can be calculated to accurately calculate the first area of the object to be measured, thereby obtaining the area of the object to be measured and the distance from the camera.
[0067] The embodiment of the present invention discloses a method for measuring the distance and area of underwater objects, the method comprising: emitting multiple point-shaped parallel lasers to hit the underwater object to be measured; capturing multiple laser points formed by the parallel lasers through a camera; calculating a first distance from the object to the camera according to the ratio of the multiple laser points in the camera image; calculating the area of the laser array by shooting a laser array and the first distance; and obtaining the first area of the object to be measured according to the area of the laser array. The method for measuring the distance and area of underwater objects provided by the embodiment of the present invention can measure the distance and area of any underwater object by using a camera and a laser, solving the problem that in the prior art, expensive multi-beam sonar is needed to measure the distance and area of underwater objects, and if the object to be measured is consistent with the background reflection, the sonar cannot be recognized, resulting in the inability to measure, thereby achieving the effect of low cost and high efficiency.
[0068] Embodiment 3
[0069] The underwater object distance and area measuring device of the embodiment of the present invention can implement the underwater object distance and area measuring method provided by any embodiment of the present invention, and has the corresponding functional modules and beneficial effects of the execution method. Figure 3FIG. 3 is a schematic diagram of a device 300 for measuring the distance and area of an underwater object in an embodiment of the present invention. Figure 3 The underwater object distance and area measuring device 300 provided in the embodiment of the present invention may specifically include:
[0070] A laser acquisition module 310 is used to acquire multiple laser points through a camera;
[0071] A distance calculation module 320, configured to calculate a first distance from the object to the camera according to a ratio of the plurality of laser points in the camera image;
[0072] The laser array module 330 is used to calculate the area of the laser array by shooting the laser array and the first distance;
[0073] The area calculation module 340 is used to obtain a first area of the object to be measured according to the area of the laser array.
[0074] Furthermore, the acquiring of multiple laser points through a camera includes:
[0075] Emit multiple point-shaped parallel lasers to hit the underwater object to be tested;
[0076] The multiple laser points formed by the parallel lasers are captured by a camera.
[0077] Furthermore, the acquiring of multiple laser points through a camera includes:
[0078] Emit two point-shaped parallel lasers to hit the underwater object to be tested;
[0079] Two parallel laser points are captured by a camera.
[0080] Further, calculating the area of the laser array by shooting the laser array and the first distance includes:
[0081] Shoot out grid lasers according to the laser array;
[0082] The area of the grid laser is calculated according to the grid laser and the first distance.
[0083] Furthermore, the grid laser has a first angle, and the grid size has a corresponding relationship with the first distance.
[0084] Further, calculating the area of the grid laser according to the grid laser and the first distance includes:
[0085] The area of the grid laser is calculated according to the grid laser, the first distance and the corresponding relationship.
[0086] Further, acquiring the first area of the object to be measured according to the area of the laser array includes:
[0087] The first area of the object to be measured is calculated according to the number of filled grids in the laser array.
[0088] The embodiment of the present invention discloses a device for measuring the distance and area of underwater objects, the device comprising: a laser acquisition module for acquiring multiple laser points through a camera; a distance calculation module for calculating a first distance from the object to the camera according to the ratio of the multiple laser points in the camera image; a laser array module for calculating the area of the laser array by projecting the laser array and the first distance; an area calculation module for obtaining a first area of the object to be measured according to the area of the laser array. The method for measuring the distance and area of underwater objects provided by the embodiment of the present invention can measure the distance and area of any underwater object by using a camera and a laser, solving the problem that the prior art requires expensive multi-beam sonar to be used to measure the distance and area of underwater objects, and if the object to be measured has the same reflection as the background, the sonar cannot recognize it, resulting in the inability to measure, thereby achieving the effect of low cost and high efficiency.
[0089] Embodiment 4
[0090] Figure 4 A schematic diagram of the structure of an electronic device provided by an embodiment of the present invention is shown in FIG. Figure 4 As shown, the device includes a memory 410 and a processor 420. The number of processors 420 in the device may be one or more. Figure 4 A processor 420 is taken as an example; the memory 410 and the processor 420 in the server can be connected via a bus or other means. Figure 4 The example of connecting through bus is taken in the following.
[0091] The memory 410, as a computer-readable storage medium, can be used to store software programs, computer executable programs and modules, such as program instructions / modules corresponding to the underwater object distance and area measurement method in the embodiment of the present invention (for example, the laser acquisition module 310, the distance calculation module 320, the laser array module 330, and the area calculation module 340 in the underwater object distance and area measurement device 300). The processor 420 executes various functional applications and data processing of the server / terminal / server by running the software programs, instructions and modules stored in the memory 410, that is, realizes the above-mentioned underwater object distance and area measurement method.
[0092] The processor 420 is used to run the computer program stored in the memory 410 to implement the following steps:
[0093] Acquire multiple laser points through the camera;
[0094] Calculating a first distance from the object to the camera according to a ratio of the multiple laser points in the camera image;
[0095] Calculate the area of the laser array by using the laser array and the first distance;
[0096] A first area of the object to be measured is acquired according to the area of the laser array.
[0097] In one embodiment, an electronic device provided by an embodiment of the present invention, whose computer program is not limited to the above method operations, can also execute related operations in the method for measuring the distance and area of underwater objects provided by any embodiment of the present invention.
[0098] The memory 410 may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system and at least one application required for a function; the data storage area may store data created according to the use of the terminal, etc. In addition, the memory 410 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory device, or other non-volatile solid-state storage device. In some instances, the memory 410 may further include a memory remotely arranged relative to the processor 420, and these remote memories may be connected to the server / terminal / server via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0099] The embodiment of the present invention discloses an electronic device for measuring the distance and area of underwater objects, which is used to perform the following method: obtain multiple laser points through a camera; calculate the first distance from the object to the camera according to the ratio of the multiple laser points in the camera image; calculate the area of the laser array by shooting a laser array and the first distance; obtain the first area of the object to be measured according to the area of the laser array. The method for measuring the distance and area of underwater objects provided by the embodiment of the present invention can measure the distance and area of any underwater object by using a camera and a laser, which solves the problem that the prior art requires expensive multi-beam sonar to measure the distance and area of underwater objects. If the object to be measured is consistent with the background reflection, the sonar cannot be recognized, resulting in the inability to measure, thereby achieving the effect of low cost and high efficiency.
[0100] Embodiment 5
[0101] Embodiment 5 of the present invention further provides a storage medium containing computer executable instructions, wherein the computer executable instructions are used to execute a method for measuring the distance and area of an underwater object when executed by a computer processor, the method comprising:
[0102] Acquire multiple laser points through the camera;
[0103] Calculating a first distance from the object to the camera according to a ratio of the multiple laser points in the camera image;
[0104] Calculate the area of the laser array by using the laser array and the first distance;
[0105] A first area of the object to be measured is acquired according to the area of the laser array.
[0106] Of course, the storage medium containing computer executable instructions provided by an embodiment of the present invention is not limited to the method operations described above, and can also execute related operations in a method for measuring the distance and area of an underwater object provided by any embodiment of the present invention.
[0107] The computer-readable storage medium of the embodiment of the present invention can adopt any combination of one or more computer-readable media. The computer-readable medium can be a computer-readable signal medium or a computer-readable storage medium. The computer-readable storage medium can be, for example, but not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, device or device, or any combination of the above. More specific examples (non-exhaustive list) of computer-readable storage media include: an electrical connection with one or more wires, a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disk read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the above. In this document, a computer-readable storage medium can be any tangible medium containing or storing a program, which can be used by an instruction execution system, device or device or used in combination with it.
[0108] Computer-readable signal media may include data signals propagated in baseband or as part of a carrier wave, which carry computer-readable program code. Such propagated data signals may take a variety of forms, including but not limited to electromagnetic signals, optical signals, or any suitable combination of the above. Computer-readable signal media may also be any computer-readable medium other than a computer-readable storage medium, which may send, propagate, or transmit a program for use by or in conjunction with an instruction execution system, apparatus, or device.
[0109] The program code contained on the storage medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
[0110] Computer program code for performing the operations of the present invention may be written in one or more programming languages or a combination thereof, including object-oriented programming languages such as Java, Smalltalk, C++, and conventional procedural programming languages such as "C" or similar programming languages. The program code may be executed entirely on the user's computer, partially on the user's computer, as a separate software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or terminal. In the case of a remote computer, the remote computer may be connected to the user's computer through any type of network, including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., through the Internet using an Internet service provider).
[0111] The embodiment of the present invention discloses a storage medium for measuring the distance and area of underwater objects, which is used to execute the following method: obtaining multiple laser points through a camera; calculating a first distance from the object to the camera according to the ratio of the multiple laser points in the camera screen; calculating the area of the laser array by shooting a laser array and the first distance; obtaining a first area of the object to be measured according to the area of the laser array. The method for measuring the distance and area of underwater objects provided by the embodiment of the present invention can measure the distance and area of any underwater object by using a camera and a laser, which solves the problem that the prior art requires expensive multi-beam sonar to measure the distance and area of underwater objects. If the object to be measured is consistent with the background reflection, the sonar cannot be recognized, resulting in the inability to measure, thereby achieving the effect of low cost and high efficiency.
[0112] Note that the above are only preferred embodiments of the present invention and the technical principles used. Those skilled in the art will understand that the present invention is not limited to the specific embodiments described herein, and that various obvious changes, readjustments and substitutions can be made by those skilled in the art without departing from the scope of protection of the present invention. Therefore, although the present invention has been described in more detail through the above embodiments, the present invention is not limited to the above embodiments, and may include more other equivalent embodiments without departing from the concept of the present invention, and the scope of the present invention is determined by the scope of the appended claims.
Claims
1. A method for measuring the distance and area of an underwater object, characterized in that: include: Acquire multiple laser points through the camera; Calculate the first distance from the object to the camera according to the ratio of the multiple laser points in the camera image, m is the distance between the multiple parallel laser points, X is the horizontal pixel distance of m in the camera image, L is the first distance, K is the horizontal pixel of the camera, K is a fixed value, X decreases as L increases, and the first distance L is determined according to the ratio of X / K; Calculate the area of the laser array by using the laser array and the first distance; Acquire a first area of the object to be measured according to the area of the laser array; The step of calculating the area of the laser array by using the laser array and the first distance comprises: Shoot out grid lasers according to the laser array; Calculating the area of the grid laser according to the grid laser and the first distance; The grid laser has a first angle, the grid size corresponds to the first distance, W is the distance width between the grids, L is the distance between the laser and the object to be measured, W=L*tanα1, wherein α1 is a fixed angle of the laser beam; Wherein, acquiring the first area of the object to be measured according to the area of the laser array includes: The area of each grid is calculated from the area of the laser array; The first area of the object to be measured is calculated according to the number of filled grids in the laser array, wherein the number of filled grids is identified by manual identification.
2. The method for measuring the distance and area of underwater objects according to claim 1, characterized in that: The obtaining of multiple laser points by using a camera comprises: Emit multiple point-shaped parallel lasers to hit the underwater object to be tested; The multiple laser points formed by the parallel lasers are captured by a camera.
3. The method for measuring the distance and area of underwater objects according to claim 2, characterized in that: The obtaining of multiple laser points by using a camera comprises: Emit two point-shaped parallel lasers to hit the underwater object to be tested; Two parallel laser points are captured by a camera.
4. A device for measuring the distance and area of underwater objects, characterized in that: include: A laser acquisition module, used to acquire multiple laser points through a camera; A distance calculation module is used to calculate the first distance from the object to the camera according to the ratio of the multiple laser points in the camera picture, m is the distance between the multiple parallel laser points, X is the horizontal pixel distance of m in the camera picture, L is the first distance, K is the horizontal pixel of the camera, K is a fixed value, X decreases as L increases, and the first distance L is determined according to the ratio of X / K; A laser array module, used to calculate the area of the laser array by projecting the laser array and the first distance; An area calculation module, used for obtaining a first area of the object to be measured according to the area of the laser array; The laser array module is specifically used for: Shoot out grid lasers according to the laser array; Calculating the area of the grid laser according to the grid laser and the first distance; The grid laser has a first angle, the grid size has a corresponding relationship with the first distance, W is the distance width between the grids, L is the distance between the laser and the object to be measured, W=L*tanα1, where α1 is a fixed angle of the laser beam; Wherein, the area calculation module is specifically used for: The area of each grid is calculated from the area of the laser array; The first area of the object to be measured is calculated according to the number of filled grids in the laser array, wherein the number of filled grids is identified by manual identification.
5. An electronic device, characterized in that: The electronic device comprises: one or more processors; a storage device for storing one or more programs, When the one or more programs are executed by the one or more processors, the one or more processors implement the method for measuring the distance and area of underwater objects as described in any one of claims 1-3.
6. A computer-readable storage medium having a computer program stored thereon, the computer program comprising program instructions, characterized in that: When the program instructions are executed by a processor, the method for measuring the distance and area of an underwater object as described in any one of claims 1-3 is implemented.
