Underwater ranging method, device, equipment and storage medium
Through the methods of laser reflective image acquisition and three-dimensional coordinate conversion, the existing underwater distance measurement methods and equipment are expensive and unsatisfactory, and high accuracy and anti-interference ability of long-distance underwater distance measurement are achieved.
Patent Information
- Application Number
- CN202110018274.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-01-07
- Publication Date
- 2024-11-08
- Estimated Expiration
- 2041-01-07
AI Technical Summary
Existing methods for measuring distances of underwater objects such as acoustic radar ranging and mobile phone ranging have problems such as expensive equipment, limited application range and echo interference, especially in long-distance underwater ranging effects are not ideal.
Using laser reflection image acquisition, imaging coordinate determination, three-dimensional coordinate conversion and light path intersection calculation methods, the laser emitter and imaging module are fixedly installed to form a preset three-dimensional coordinate system, correct the laser light path, and determine the distance of the object to be measured. .
It realizes distance measurement of long-distance objects, with simple equipment, strong robustness, high anti-interference ability, fast calculation method and high measurement accuracy.
Smart Images

Figure CN112835062B_ABST
Abstract
Description
Technical Field
[0001] The embodiments of the present invention relate to the field of distance measurement technology, and in particular to an underwater distance measurement method, device, equipment and storage medium. Background Art
[0002] With the development of science and technology, people's exploration of the ocean has continued to deepen. When carrying out various tasks under the sea, it is usually necessary to measure the distance of related objects to determine the location of the related objects.
[0003] The existing method for measuring the distance of underwater objects is acoustic radar ranging, but this ranging method is usually suitable for measuring the distance of larger objects, and the professional equipment required is expensive, which increases the ranging cost, and there are also various problems such as echo interference. At present, there is also a method of using mobile phone devices for ranging. Mobile phone ranging uses 3D structured light and TOF (Time of Flight Measurement) ranging method. This ranging method is suitable for short-distance measurement, and the underwater ranging effect is not ideal. Summary of the invention
[0004] In view of this, embodiments of the present invention provide an underwater ranging method, apparatus, device and storage medium to provide an underwater long-distance object ranging method and improve the robustness of underwater object ranging.
[0005] In a first aspect, an embodiment of the present invention provides an underwater ranging method, comprising:
[0006] Acquire a laser reflection image of the object to be measured;
[0007] Determining the imaging coordinates of the laser imaging point on the laser reflection image;
[0008] Determine the imaging three-dimensional coordinates of the imaging coordinates in a preset three-dimensional coordinate system, wherein the preset three-dimensional coordinate system is a three-dimensional coordinate system consisting of a focus of the camera module as the origin, a principal optical axis of the camera module as the z-axis, a line parallel to the horizontal axis of the camera module coordinate system as the x-axis, and a line parallel to the vertical axis of the camera module coordinate system as the y-axis;
[0009] Determining the reflected light path of the object to be measured based on the imaging three-dimensional coordinates;
[0010] The distance of the object to be measured is determined based on the reflected light path and the preset laser light path.
[0011] Furthermore, before obtaining the laser reflection image of the object to be measured, the method further includes:
[0012] The laser transmitter and the camera module are fixedly installed to form a preset three-dimensional coordinate system;
[0013] The camera module is calibrated to determine a preset laser light path of the laser light emitted by the laser emitter in the preset three-dimensional coordinate system.
[0014] Further, calibrating the camera module to determine a preset laser light path of the laser light emitted by the laser emitter in the preset three-dimensional coordinate system includes:
[0015] The laser emitter emits a laser beam at a first preset distance from the sample, and the camera module acquires a first laser image of the sample based on the first preset distance;
[0016] The laser emitter emits a laser beam at a second preset distance from the sample, and the camera module acquires a second laser image of the sample based on the second preset distance;
[0017] Determine first image coordinates of a first laser imaging point in the first laser image and second image coordinates of a second laser imaging point in the second laser image;
[0018] Determine, according to the first image coordinates, first position coordinates of a first laser point corresponding to the first laser imaging point in the preset three-dimensional coordinate system, and determine, according to the second image coordinates, second position coordinates of a second laser point corresponding to the second laser imaging point in the preset three-dimensional coordinate system;
[0019] A preset laser light path is determined according to the first position coordinates and the second position coordinates.
[0020] Further, determining the first position coordinates of a first laser point corresponding to the first laser imaging point in the preset three-dimensional coordinate system according to the first image coordinates and determining the second position coordinates of a second laser point corresponding to the second laser imaging point in the preset three-dimensional coordinate system according to the second image coordinates includes:
[0021] Obtaining inherent parameters of the camera module;
[0022] Converting the first image coordinates into first position coordinates in the preset three-dimensional coordinate system according to the inherent parameters and the first preset distance;
[0023] The second image coordinates are converted into second position coordinates in the preset three-dimensional coordinate system according to the inherent parameters and the second preset distance.
[0024] Furthermore, determining the imaging three-dimensional coordinates of the imaging coordinates in a preset three-dimensional coordinate system includes:
[0025] The imaging coordinates are converted into imaging three-dimensional coordinates in a preset three-dimensional coordinate system according to the inherent parameters.
[0026] Furthermore, determining the reflected light path of the object to be measured based on the imaging three-dimensional coordinates includes:
[0027] The reflected light path of the object to be measured is determined according to the imaging three-dimensional coordinates and the coordinates of the focus.
[0028] Further, determining the distance of the object to be measured based on the reflected light path and the preset laser light path includes:
[0029] The coordinates of the intersection of the reflected light path and the preset laser light path are determined, and the z-axis value of the intersection coordinates is the distance of the object to be measured.
[0030] In a second aspect, an embodiment of the present invention provides an underwater ranging device, comprising:
[0031] An image acquisition module is used to acquire a laser reflection image of the object to be measured;
[0032] An imaging coordinate determination module, used to determine the imaging coordinates of the laser imaging point on the laser reflection image;
[0033] A coordinate conversion module, used to determine the imaging three-dimensional coordinates of the imaging coordinates in a preset three-dimensional coordinate system, wherein the preset three-dimensional coordinate system is a three-dimensional coordinate system consisting of a focus of the camera module as the origin, a principal optical axis of the camera module as the z-axis, a line parallel to the horizontal axis of the camera module coordinate system as the x-axis, and a line parallel to the vertical axis of the camera module coordinate system as the y-axis;
[0034] A reflected light path determination module, used to determine the reflected light path of the object to be measured based on the imaging three-dimensional coordinates;
[0035] The distance determination module is used to determine the distance of the object to be measured based on the reflected light path and the preset laser light path.
[0036] In a third aspect, an embodiment of the present invention provides an electronic device, including:
[0037] one or more processors;
[0038] a storage device for storing one or more programs,
[0039] When the one or at least one program is executed by the one or more processors, the one or more processors implement the underwater ranging method provided by any embodiment of the present invention.
[0040] In a fourth aspect, an embodiment of the present invention provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the underwater ranging method provided by any embodiment of the present invention.
[0041] The underwater ranging method provided by the embodiment of the present invention can achieve the ranging of long-distance objects, has simple test equipment, strong robustness, strong anti-interference ability underwater, simple and fast calculation method, and high measurement accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0042] Figure 1 A schematic diagram of a flow chart of an underwater ranging method provided in Embodiment 1 of the present invention;
[0043] Figure 2 A schematic diagram of a flow chart of an underwater ranging method provided in Embodiment 2 of the present invention;
[0044] Figure 3 A schematic diagram of a flow chart of a camera module calibration method provided in Embodiment 2 of the present invention;
[0045] Figure 4 A schematic diagram of the principle of an underwater ranging method provided in Embodiment 2 of the present invention;
[0046] Figure 5 A schematic diagram of the principle of a camera module calibration method provided in Embodiment 2 of the present invention;
[0047] Figure 6 A schematic diagram of the structure of an underwater distance measuring device provided in Embodiment 3 of the present invention;
[0048] Figure 7 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. DETAILED DESCRIPTION
[0049] 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.
[0050] 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.
[0051] In addition, the terms "first", "second", etc. may 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. The terms "first", "second", etc. should not 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" may explicitly or implicitly include one or more of the features. In the description of the present invention, the meaning of "multiple" and "batch" is at least two, such as two, three, etc., unless otherwise clearly and specifically defined.
[0052] Embodiment 1
[0053] Figure 1 The following is a flow chart of an underwater ranging method provided in the first embodiment of the present invention. Figure 1 As shown, the underwater ranging method provided by the first embodiment of the present invention includes:
[0054] S110, acquiring a laser reflection image of the object to be measured.
[0055] Specifically, the distance measuring device in this embodiment includes a camera module and a laser transmitter, the laser transmitter is used to emit laser light to the object to be measured, and the camera module is used to capture an image of the object to be measured. The laser reflection image of the object to be measured refers to the laser light emitted to the object to be measured by the laser transmitter, the laser light forms a laser point on the surface of the object to be measured, and then the image of the object to be measured is captured by the camera device to obtain a laser reflection image, and the laser reflection image has a laser point.
[0056] S120, determining the imaging coordinates of the laser imaging point on the laser reflection image.
[0057] Specifically, the imaging coordinates of the laser imaging point on the laser reflection image refer to the pixel position of the imaging point of the laser point in the camera module, which is expressed by pixel coordinates, which are the two-dimensional pixel coordinates of the laser imaging point in the image coordinate system of the camera module itself.
[0058] S130. Determine the imaging three-dimensional coordinates of the imaging coordinates in a preset three-dimensional coordinate system, wherein the preset three-dimensional coordinate system takes the focus of the camera module as the origin, the principal optical axis of the camera module as the z-axis, the line parallel to the horizontal axis of the camera module coordinate system as the x-axis, and the line parallel to the vertical axis of the camera module coordinate system as the y-axis.
[0059] In this embodiment, Figure 4As shown, the laser emitter 1 and the camera module 2 are fixedly installed, and the camera module 2 mainly includes an image sensor 3 (sensor) and a lens 4. The image sensor 3 can be a CCD camera or a CMOS camera. The preset three-dimensional coordinate system is a coordinate system shared by the laser emitter 1 and the camera module 2, and its origin is the focus O of the camera module 2; the line passing through the optical center of the image sensor 3 and the focus O is the main optical axis of the camera module, and the main optical axis is the z-axis of the preset three-dimensional coordinate system; the image sensor 3 itself has a two-dimensional coordinate system, that is, the coordinate system of the camera module 2, and the line passing through the focus O and parallel to the horizontal axis of the coordinate system of the camera module 2 is used as the x-axis of the preset three-dimensional coordinate system, and the line passing through the focus O and parallel to the vertical axis of the coordinate system of the camera module 2 is used as the y-axis of the preset three-dimensional coordinate system, thereby forming the preset three-dimensional coordinate system Oxyz.
[0060] The imaging coordinates of the laser imaging point are converted, that is, the pixel coordinates of the imaging point of the laser point on the camera module 2 are converted into the three-dimensional coordinates of the imaging point in a preset three-dimensional coordinate system, that is, the imaging three-dimensional coordinates. For example, Figure 4 As shown, the laser emitter 1 emits laser light to the object to be measured 5, and a laser point (also known as a laser reflection point) is formed at a surface point A of the object to be measured 5. The laser light passes through the laser reflection point to form a laser reflection light. The laser reflection light passes through the focus O, and the camera module 2 captures the laser reflection image of the object to be measured 5 to determine the laser imaging point B corresponding to the laser point A. For the distance measuring device composed of the laser emitter 1 and the camera module 2, the optical center, pixel width and focal length of the image sensor 3 (also known as the focus) are known. Assume that the optical center coordinates of the image sensor 3 are (X c , Y c )(unit is pixel), pixel width P (unit is micron, indicating the physical width represented by a single pixel), focal length F (unit is millimeter), the imaging coordinates of laser imaging point B of laser point A are (X0, Y0) (unit is pixel), and the three-dimensional coordinates of laser imaging point B in the preset three-dimensional coordinate system are (X B , Y B , Z B )(unit is micrometer), then:
[0061] X B =(X0-X c )*P
[0062] Y B =(Y0-Y c )*P
[0063] Z B =F*10 3
[0064] S140: Determine a reflected light path of the object to be measured based on the imaging three-dimensional coordinates.
[0065] Specifically, the reflected light path is the path of the laser reflected light formed after the object to be measured reflects the laser light, which passes through the focus O. At the same time, the laser point A and its corresponding laser imaging point B are both points on the reflected light path. Therefore, the line connecting the laser imaging point B and the focus O is the reflected light path, and then according to the imaging three-dimensional coordinates of the laser imaging point B and the three-dimensional coordinates of the focus O (the focus O is the origin of the preset three-dimensional coordinate system, and its three-dimensional coordinates are (0,0,0)), the expression of the reflected light path can be obtained.
[0066] S150: Determine the distance of the object to be measured based on the reflected light path and the preset laser light path.
[0067] Specifically, the preset laser light path is the path of the laser light emitted by the laser emitter 1. For a fixedly installed laser emitter 1 and camera module 2, the path of the laser light emitted by the laser emitter 1 in the preset three-dimensional coordinate system is fixed, which can be obtained through the calibration of the camera module 2 and stored in advance as a calculation parameter. Figure 4 As shown, laser point A is a point on the object 5 to be measured, so the distance H of the object 5 to be measured can be determined by obtaining the coordinates of laser point A. At the same time, laser point A is a point on the preset laser light path and the reflected light path, so the three-dimensional coordinates of laser point A can be determined by determining the intersection of the preset laser light path and the reflected light path. In this embodiment, the distance H of the object 5 to be measured refers to the distance from the object to be measured to the origin of the preset three-dimensional coordinate system, so the z coordinate value in the three-dimensional coordinates of laser point A is the distance H of the object 5 to be measured.
[0068] The underwater ranging method provided in the first embodiment of the present invention can achieve the ranging of long-distance objects, has simple test equipment, strong robustness, strong anti-interference ability underwater, simple and fast calculation method, and high measurement accuracy.
[0069] Embodiment 2
[0070] Figure 2 This is a flow chart of an underwater ranging method provided by Embodiment 2 of the present invention. This embodiment is a further refinement of the above embodiment. Figure 2 As shown, the underwater ranging method provided by the second embodiment of the present invention includes:
[0071] S210, fixing and installing the laser transmitter and the camera module to form a preset three-dimensional coordinate system.
[0072] Specifically, Figure 4As shown, the laser emitter 1 and the camera module 2 are fixedly installed, and the camera module 2 mainly includes an image sensor 3 (sensor) and a lens 4. The image sensor 3 can be a CCD camera or a CMOS camera. The preset three-dimensional coordinate system is a coordinate system shared by the laser emitter 1 and the camera module 2, and its origin is the focus O of the camera module 2; the line passing through the optical center of the image sensor 3 and the focus O is the main optical axis of the camera module, and the main optical axis is the z-axis of the preset three-dimensional coordinate system; the image sensor 3 itself has a two-dimensional coordinate system, that is, the coordinate system of the camera module 2, and the line passing through the focus O and parallel to the horizontal axis of the coordinate system of the camera module 2 is used as the x-axis of the preset three-dimensional coordinate system, and the line passing through the focus O and parallel to the vertical axis of the coordinate system of the camera module 2 is used as the y-axis of the preset three-dimensional coordinate system, thereby forming the preset three-dimensional coordinate system Oxyz.
[0073] S220, calibrating the camera module to determine a preset laser light path of the laser light emitted by the laser emitter in the preset three-dimensional coordinate system.
[0074] Specifically, the calibration is to obtain relevant calculation parameters of the test equipment, such as the preset laser light path. During calibration, a laser emitter is used to emit laser light to the sample, the distance between the sample and the origin of the preset three-dimensional coordinate system is changed, and several sets of laser reflection images with different distances are collected through the lens module. The actual expression of the laser light path in the preset three-dimensional coordinate system is calculated using the actual distance of the pixels of several different sets of laser points on the image.
[0075] Further, such as Figure 3 As shown, the calibration process is as follows:
[0076] S221. The laser emitter emits laser light at a first preset distance from the sample, and the camera module acquires a first laser image of the sample based on the first preset distance.
[0077] Specifically, Figure 5 As shown, the sample 6 is first placed at a first preset distance D1, and the laser emitter 1 emits laser light to the sample 6 to form a first laser point A1 (also known as the first laser reflection point A1) on the sample 6. Then, the first laser image of the sample 6 is acquired through the camera module 2, and the first laser image includes a first laser imaging point B1 corresponding to the first laser point A1.
[0078] S222. The laser emitter emits laser light at a second preset distance from the sample, and the camera module acquires a second laser image of the sample based on the second preset distance.
[0079] Specifically, Figure 5As shown, after acquiring the first laser image, the sample 6 is moved so that it is located at a second preset distance D2, and then laser light is emitted to the sample 6 by the laser emitter 1 to form a second laser point A2 (also known as the second laser reflection point A2) on the sample 6, and then the second laser image of the sample 6 is acquired by the camera module 2, and the second laser image includes a second laser imaging point B2 corresponding to the second laser point A2.
[0080] S223: Determine first image coordinates of a first laser imaging point in the first laser image and second image coordinates of a second laser imaging point in the second laser image.
[0081] Specifically, the first image coordinates of the first laser imaging point are the pixel coordinates of the first laser imaging point B1 corresponding to the first laser point A1 in the first laser image, recorded as (X1, Y1). The second image coordinates of the second laser imaging point are the pixel coordinates of the second laser imaging point B2 corresponding to the second laser point A2 in the second laser image, recorded as (X2, Y2).
[0082] S224. Determine the first position coordinates of the first laser point corresponding to the first laser imaging point in the preset three-dimensional coordinate system according to the first image coordinates, and determine the second position coordinates of the second laser point corresponding to the second laser imaging point in the preset three-dimensional coordinate system according to the second image coordinates.
[0083] Specifically, after the image coordinates of the laser imaging point are determined, the position coordinates of the corresponding laser point in a preset three-dimensional coordinate system are determined according to the image coordinates for subsequent calculation.
[0084] Furthermore, the step of calculating the coordinates of the laser point includes: obtaining the inherent parameters of the camera module; converting the first image coordinates into first position coordinates in the preset three-dimensional coordinate system according to the inherent parameters and the first preset distance; converting the second image coordinates into second position coordinates in the preset three-dimensional coordinate system according to the inherent parameters and the second preset distance.
[0085] Specifically, the inherent parameters of the camera module include focal length F, pixel width P and optical center coordinates (X c , Y c ). The focal length F is the distance from the center of the lens 4 to the focal point O, the pixel width P is the actual physical width represented by a single pixel, and the optical center coordinates (X c , Y c ) is the pixel coordinate of the optical center of the image sensor 3 in its own image coordinate system.
[0086] In the preset three-dimensional coordinate system, the triangle formed by the focus O, the optical center of the image sensor 3 and the laser imaging point, and the triangle formed by the focus O, the projection point of the principal optical axis (z axis) on the sample 6 (the projection point is represented as (0, 0, actual object distance) in the preset three-dimensional coordinate system) and the laser reflection point are similar triangles. Assuming the first position coordinates (x1, y1, z1) of the first laser point A1 corresponding to the first image coordinates (X1, Y1) of the first laser imaging point B1, and the second position coordinates (x2, y2, z2) of the second laser point A2 corresponding to the second image coordinates (X2, Y2) of the second laser imaging point B2, according to the characteristics of similar triangles:
[0087]
[0088] For example, the focal length F=3.8 mm, the pixel width P=3.1 μm, and the optical center coordinates are (960, 540). The first preset distance D1=85 cm, the first image coordinates are (1288, 409), the second preset distance D2=30 cm, and the second image coordinates are (1300, 332). According to the above formula, the first position coordinates are (227442, -90838, 850000) (in μm), and the second position coordinates are (83210, -10010, 300000) (in μm).
[0089] S225. Determine a preset laser light path according to the first position coordinates and the second position coordinates.
[0090] Specifically, the first laser point A1 corresponding to the first position coordinates (x1, y1, z1) and the second laser point A2 corresponding to the second position coordinates (x2, y2, z2) are both points on the laser light emitted by the laser emitter 1. Therefore, the preset laser light path can be obtained according to the first position coordinates (x1, y1, z1) and the second position coordinates (x2, y2, z2) and stored as calculation parameters.
[0091] S230: Acquire a laser reflection image of the object to be measured.
[0092] Specifically, when measuring the distance of the physical object to be measured, such as Figure 4 As shown, a laser light is emitted to the object 5 to be measured by a laser emitter 1, and a laser point A is formed on the object 5 to be measured. Then, a laser reflection image is acquired by a camera module 2, and the laser reflection image includes a laser imaging point B of the laser point A on the camera module 2.
[0093] S240: Determine the imaging coordinates of the laser imaging point on the laser reflection image.
[0094] Specifically, the imaging coordinates of the laser imaging point on the laser reflection image refer to the pixel position of the imaging point of the laser point in the camera module, which is represented by pixel coordinates, and the pixel coordinates are the two-dimensional pixel coordinates of the laser imaging point in the image coordinate system of the camera module itself. Exemplarily, the imaging coordinates of the laser imaging point are (1248, 386).
[0095] S250: Convert the imaging coordinates into imaging three-dimensional coordinates in a preset three-dimensional coordinate system according to the inherent parameters.
[0096] Specifically, the imaging three-dimensional coordinates (X B , Y B , Z B ) is the coordinate of the laser imaging point B in the three-dimensional coordinate system, which is calculated as follows:
[0097] X B =(X0-X c )*P
[0098] Y B =(Y0-Y c )*P
[0099] Z B =F*10 3
[0100] Exemplarily, the imaging three-dimensional coordinates (893, -477, 3800) are obtained based on the imaging coordinates (1248, 386).
[0101] S260: Determine the reflected light path of the object to be measured according to the imaging three-dimensional coordinates and the coordinates of the focus.
[0102] Specifically, the laser imaging point B and the focus are both points on the laser reflected light, and the path of the reflected light can be obtained by combining the imaging three-dimensional coordinates and the focus coordinates (ie, the origin coordinates).
[0103] S270, determining the coordinates of the intersection of the reflected light path and the preset laser light path, wherein the z-axis value of the intersection coordinates is the distance of the object to be measured.
[0104] Specifically, the laser point A is a point on both the preset laser light path and the reflected light path. By obtaining the coordinates of the intersection of the preset laser light path and the reflected light path, the three-dimensional coordinates of the laser point A can be determined, and the z-axis value of the intersection coordinates is the distance H of the object to be measured 5. Exemplarily, according to the reflected light path determined by the imaging three-dimensional coordinates (893, -477, 3800), the distance H of the object to be measured 5 is obtained to be 55 cm.
[0105] The underwater ranging method provided in the second embodiment of the present invention can achieve the ranging of long-distance objects, has simple test equipment, strong robustness, strong anti-interference ability underwater, simple and fast calculation method, and high measurement accuracy.
[0106] Embodiment 3
[0107] Figure 6 This is a schematic diagram of the structure of an underwater ranging device provided in Embodiment 3 of the present invention. The underwater ranging device provided in this embodiment can implement the underwater ranging method provided in any embodiment of the present invention, and has the corresponding functional structure and beneficial effects of the implementation method. For the contents not described in detail in this embodiment, reference can be made to the description of any method embodiment of the present invention.
[0108] like Figure 6 As shown, the underwater distance measuring device provided by the third embodiment of the present invention includes: an image acquisition module 310, an imaging coordinate determination module 320, a coordinate conversion module 330, a reflected light path determination module 340 and a distance determination module 350, wherein:
[0109] The image acquisition module 310 is used to acquire the laser reflection image of the object to be measured;
[0110] The imaging coordinate determination module 320 is used to determine the imaging coordinates of the laser imaging point on the laser reflection image;
[0111] The coordinate conversion module 330 is used to determine the imaging three-dimensional coordinates of the imaging coordinates in a preset three-dimensional coordinate system, wherein the preset three-dimensional coordinate system is a three-dimensional coordinate system consisting of a focus of the camera module as the origin, a principal optical axis of the camera module as the z-axis, a line parallel to the horizontal axis of the camera module coordinate system as the x-axis, and a line parallel to the vertical axis of the camera module coordinate system as the y-axis;
[0112] The reflected light path determination module 340 is used to determine the reflected light path of the object to be measured based on the imaging three-dimensional coordinates;
[0113] The distance determination module 350 is used to determine the distance of the object to be measured based on the reflected light path and the preset laser light path.
[0114] Furthermore, it also includes:
[0115] A preset three-dimensional coordinate system forming module is used to fix the laser emitter and the camera module to form a preset three-dimensional coordinate system;
[0116] The correction module is used to correct the camera module to determine the preset laser light path of the laser light emitted by the laser emitter in the preset three-dimensional coordinate system.
[0117] Furthermore, the correction module includes:
[0118] A first laser image acquisition unit, configured to emit a laser beam at a first preset distance from the sample through the laser emitter, and acquire a first laser image of the sample based on the first preset distance through the camera module;
[0119] A second laser image acquisition unit, configured to emit a laser beam at a second preset distance from the sample through the laser emitter, and acquire a second laser image of the sample based on the second preset distance through the camera module;
[0120] an image coordinate determining unit, configured to determine a first image coordinate of a first laser imaging point in the first laser image and a second image coordinate of a second laser imaging point in the second laser image;
[0121] a position coordinate determining unit, configured to determine a first position coordinate of a first laser point corresponding to the first laser imaging point in the preset three-dimensional coordinate system according to the first image coordinates, and to determine a second position coordinate of a second laser point corresponding to the second laser imaging point in the preset three-dimensional coordinate system according to the second image coordinates;
[0122] The laser light path determining unit is used to determine a preset laser light path according to the first position coordinates and the second position coordinates.
[0123] Furthermore, the position coordinate determination unit is specifically used for:
[0124] Obtaining inherent parameters of the camera module;
[0125] Converting the first image coordinates into first position coordinates in the preset three-dimensional coordinate system according to the inherent parameters and the first preset distance;
[0126] The second image coordinates are converted into second position coordinates in the preset three-dimensional coordinate system according to the inherent parameters and the second preset distance.
[0127] Furthermore, the coordinate conversion module 330 is specifically used for:
[0128] The imaging coordinates are converted into imaging three-dimensional coordinates in a preset three-dimensional coordinate system according to the inherent parameters.
[0129] Furthermore, the reflected light path determination module 340 is specifically used for:
[0130] The reflected light path of the object to be measured is determined according to the imaging three-dimensional coordinates and the coordinates of the focus.
[0131] Furthermore, the distance determination module 350 is specifically used for:
[0132] The coordinates of the intersection of the reflected light path and the preset laser light path are determined, and the z-axis value of the intersection coordinates is the distance of the object to be measured.
[0133] The underwater ranging device provided in the third embodiment of the present invention can realize the ranging of long-distance objects through the image acquisition module, the imaging coordinate determination module, the coordinate conversion module, the reflected light path determination module and the distance determination module. The test equipment is simple, the robustness is strong, the anti-interference ability is strong underwater, the calculation method is simple and fast, and the measurement accuracy is high.
[0134] Embodiment 4
[0135] Figure 7 A schematic diagram of the structure of an electronic device provided in Embodiment 4 of the present invention. Figure 7 A block diagram of an exemplary electronic device 412 (hereinafter referred to as device 412 ) suitable for implementing embodiments of the present invention is shown. Figure 7 The device 412 shown is only an example and should not bring any limitation to the functions and scope of use of the embodiments of the present invention.
[0136] like Figure 7 As shown, the device 412 is in the form of a general electronic device. The components of the device 412 may include, but are not limited to: one or more processors 416, a storage device 428, and a bus 418 connecting different device components (including the storage device 428 and the processor 416).
[0137] Bus 418 represents one or more of several types of bus structures, including a storage device bus or storage device controller, a peripheral bus, an accelerated graphics port, a processor or a local bus using any of a variety of bus architectures. For example, these architectures include but are not limited to Industry Subversive Alliance (ISA) bus, Micro Channel Architecture (MAC) bus, Enhanced ISA bus, Video Electronics Standards Association (VESA) local bus and Peripheral Component Interconnect (PCI) bus.
[0138] Device 412 typically includes a variety of computer device readable media. These media can be any available media that can be accessed by device 412, including volatile and non-volatile media, removable and non-removable media.
[0139] Storage device 428 may include computer device readable media in the form of volatile memory, such as random access memory (RAM) 430 and / or cache memory 432. Device 412 may further include other removable / non-removable, volatile / non-volatile computer device storage media. By way of example only, storage device 434 may be used to read and write non-removable, non-volatile magnetic media ( Figure 7 not shown, usually called a "hard drive"). Although Figure 7 Not shown in the figure, a disk drive for reading and writing a removable non-volatile disk (e.g., a "floppy disk"), and an optical disk drive for reading and writing a removable non-volatile optical disk, such as a read-only optical disk (Compact Disc Read-Only Memory, CD-ROM), a digital video disk (Digital Video Disc-Read Only Memory, DVD-ROM) or other optical media) may be provided. In these cases, each drive may be connected to the bus 418 via one or more data medium interfaces. The storage device 428 may include at least one program product having a set (e.g., at least one) of program modules that are configured to perform the functions of the various embodiments of the present invention.
[0140] A program / utility 440 having a set (at least one) of program modules 442 may be stored, for example, in storage device 428, such program modules 442 including, but not limited to, operating devices, one or more application programs, other program modules, and program data, each of which or some combination may include an implementation of a network environment. Program modules 442 generally perform the functions and / or methods of the embodiments described herein.
[0141] The device 412 may also communicate with one or more external devices 414 (e.g., a keyboard, a pointing terminal, a display 424, etc.), one or more terminals that enable a user to interact with the device 412, and / or any terminal that enables the device 412 to communicate with one or more other computing terminals (e.g., a network card, a modem, etc.). Such communication may be performed through an input / output (I / O) interface 422. Furthermore, the device 412 may also communicate with one or more networks (e.g., a local area network (LAN), a wide area network (WAN), and / or a public network, such as the Internet) through a network adapter 420. Figure 7As shown, the network adapter 420 communicates with other modules of the device 412 via the bus 418. It should be understood that, although not shown in the figure, other hardware and / or software modules can be used in conjunction with the device 412, including but not limited to: microcode, terminal drivers, redundant processors, external disk drive arrays, disk arrays (Redundant Arrays of Independent Disks, RAID) devices, tape drives, and data backup storage devices.
[0142] The processor 416 executes various functional applications and data processing by running the program stored in the storage device 428, for example, implementing the underwater ranging method provided by any embodiment of the present invention, which may include:
[0143] Acquire a laser reflection image of the object to be measured;
[0144] Determining the imaging coordinates of the laser imaging point on the laser reflection image;
[0145] Determine the imaging three-dimensional coordinates of the imaging coordinates in a preset three-dimensional coordinate system, wherein the preset three-dimensional coordinate system is a three-dimensional coordinate system consisting of a focus of the camera module as the origin, a principal optical axis of the camera module as the z-axis, a line parallel to the horizontal axis of the camera module coordinate system as the x-axis, and a line parallel to the vertical axis of the camera module coordinate system as the y-axis;
[0146] Determining the reflected light path of the object to be measured based on the imaging three-dimensional coordinates;
[0147] The distance of the object to be measured is determined based on the reflected light path and the preset laser light path.
[0148] Embodiment 5
[0149] Embodiment 5 of the present invention further provides a computer-readable storage medium on which a computer program is stored. When the program is executed by a processor, the underwater ranging method provided in any embodiment of the present invention is implemented. The method may include:
[0150] Acquire a laser reflection image of the object to be measured;
[0151] Determining the imaging coordinates of the laser imaging point on the laser reflection image;
[0152] Determine the imaging three-dimensional coordinates of the imaging coordinates in a preset three-dimensional coordinate system, wherein the preset three-dimensional coordinate system is a three-dimensional coordinate system consisting of a focus of the camera module as the origin, a principal optical axis of the camera module as the z-axis, a line parallel to the horizontal axis of the camera module coordinate system as the x-axis, and a line parallel to the vertical axis of the camera module coordinate system as the y-axis;
[0153] Determining the reflected light path of the object to be measured based on the imaging three-dimensional coordinates;
[0154] The distance of the object to be measured is determined based on the reflected light path and the preset laser light path.
[0155] The computer 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, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor equipment, devices or devices, 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 device, device or device or used in combination with it.
[0156] 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 device, apparatus, or device.
[0157] The program code embodied on the computer readable 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.
[0158] Computer program code for performing the operation of the present invention may be written in one or more programming languages or combinations thereof, including object-oriented programming languages (such as Java, Smalltalk, C++), and conventional procedural programming languages (such as "C" language or similar programming languages). The program code may be executed entirely on the user's computer, partially on the user's computer, as an independent software package, partially on the user's computer, 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 via 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., using an Internet service provider to connect via the Internet).
[0159] 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. An underwater ranging method, characterized in that: include: Acquire a laser reflection image of the object to be measured; wherein the laser reflection image includes an image taken after the laser light forms a laser point on the surface of the object to be measured; Determining the imaging coordinates of the laser imaging point on the laser reflection image; Determine the imaging three-dimensional coordinates of the imaging coordinates in a preset three-dimensional coordinate system, wherein the preset three-dimensional coordinate system is a three-dimensional coordinate system consisting of a focus of the camera module as the origin, a principal optical axis of the camera module as the z-axis, a line parallel to the horizontal axis of the camera module coordinate system as the x-axis, and a line parallel to the vertical axis of the camera module coordinate system as the y-axis; Determining the reflected light path of the object to be measured based on the imaging three-dimensional coordinates; Determining the distance of the object to be measured based on the reflected light path and the preset laser light path; Before obtaining the laser reflection image of the object to be measured, it also includes: The laser transmitter and the camera module are fixedly installed to form a preset three-dimensional coordinate system; Calibrate the camera module to determine a preset laser light path of the laser light emitted by the laser emitter in the preset three-dimensional coordinate system; The step of calibrating the camera module to determine a preset laser light path of the laser light emitted by the laser emitter in the preset three-dimensional coordinate system includes: The laser emitter emits a laser beam at a first preset distance from the sample, and the camera module acquires a first laser image of the sample based on the first preset distance; The laser emitter emits a laser beam at a second preset distance from the sample, and the camera module acquires a second laser image of the sample based on the second preset distance; Determine first image coordinates of a first laser imaging point in the first laser image and second image coordinates of a second laser imaging point in the second laser image; Determine, according to the first image coordinates, first position coordinates of a first laser point corresponding to the first laser imaging point in the preset three-dimensional coordinate system, and determine, according to the second image coordinates, second position coordinates of a second laser point corresponding to the second laser imaging point in the preset three-dimensional coordinate system; A preset laser light path is determined according to the first position coordinates and the second position coordinates.
2. The method according to claim 1, characterized in that Determining first position coordinates of a first laser point corresponding to the first laser imaging point in the preset three-dimensional coordinate system according to the first image coordinates and determining second position coordinates of a second laser point corresponding to the second laser imaging point in the preset three-dimensional coordinate system according to the second image coordinates includes: Obtaining inherent parameters of the camera module; Converting the first image coordinates into first position coordinates in the preset three-dimensional coordinate system according to the inherent parameters and the first preset distance; The second image coordinates are converted into second position coordinates in the preset three-dimensional coordinate system according to the inherent parameters and the second preset distance.
3. The method according to claim 2, characterized in that Determining the imaging three-dimensional coordinates of the imaging coordinates in a preset three-dimensional coordinate system includes: The imaging coordinates are converted into imaging three-dimensional coordinates in a preset three-dimensional coordinate system according to the inherent parameters.
4. The method according to claim 2, characterized in that Determining the reflected light path of the object to be measured based on the imaging three-dimensional coordinates includes: The reflected light path of the object to be measured is determined according to the imaging three-dimensional coordinates and the coordinates of the focus.
5. The method according to claim 1, characterized in that Determining the distance of the object to be measured based on the reflected light path and the preset laser light path includes: The coordinates of the intersection of the reflected light path and the preset laser light path are determined, and the z-axis value of the intersection coordinates is the distance of the object to be measured.
6. An underwater distance measuring device, characterized in that: include: An image acquisition module, used to acquire a laser reflection image of the object to be measured; wherein the laser reflection image includes an image taken after the laser light forms a laser point on the surface of the object to be measured; An imaging coordinate determination module, used to determine the imaging coordinates of the laser imaging point on the laser reflection image; A coordinate conversion module, used to determine the imaging three-dimensional coordinates of the imaging coordinates in a preset three-dimensional coordinate system, wherein the preset three-dimensional coordinate system is a three-dimensional coordinate system consisting of a focus of the camera module as the origin, a principal optical axis of the camera module as the z-axis, a line parallel to the horizontal axis of the camera module coordinate system as the x-axis, and a line parallel to the vertical axis of the camera module coordinate system as the y-axis; A reflected light path determination module, used to determine the reflected light path of the object to be measured based on the imaging three-dimensional coordinates; A distance determination module, used to determine the distance of the object to be measured based on the reflected light path and the preset laser light path; Also includes: A preset three-dimensional coordinate system forming module is used to fix the laser emitter and the camera module to form a preset three-dimensional coordinate system; A correction module, used to correct the camera module to determine a preset laser light path of the laser light emitted by the laser emitter in the preset three-dimensional coordinate system; The correction module comprises: A first laser image acquisition unit, configured to emit a laser beam at a first preset distance from the sample through the laser emitter, and acquire a first laser image of the sample based on the first preset distance through the camera module; A second laser image acquisition unit, configured to emit a laser beam at a second preset distance from the sample through the laser emitter, and acquire a second laser image of the sample based on the second preset distance through the camera module; an image coordinate determining unit, configured to determine a first image coordinate of a first laser imaging point in the first laser image and a second image coordinate of a second laser imaging point in the second laser image; a position coordinate determining unit, configured to determine a first position coordinate of a first laser point corresponding to the first laser imaging point in the preset three-dimensional coordinate system according to the first image coordinates, and to determine a second position coordinate of a second laser point corresponding to the second laser imaging point in the preset three-dimensional coordinate system according to the second image coordinates; The laser light path determining unit is used to determine a preset laser light path according to the first position coordinates and the second position coordinates.
7. An electronic device, characterized in that: include: one or more processors; a storage device for storing one or more programs, When the one or at least one program is executed by the one or more processors, the one or more processors implement the underwater ranging method as described in any one of claims 1-6.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the program is executed by a processor, the underwater ranging method as described in any one of claims 1 to 6 is implemented.
