WO2022267028A1 - Image-based distance-measuring method and apparatus, and storage medium - Google Patents

Image-based distance-measuring method and apparatus, and storage medium Download PDF

Info

Publication number
WO2022267028A1
WO2022267028A1 PCT/CN2021/102454 CN2021102454W WO2022267028A1 WO 2022267028 A1 WO2022267028 A1 WO 2022267028A1 CN 2021102454 W CN2021102454 W CN 2021102454W WO 2022267028 A1 WO2022267028 A1 WO 2022267028A1
Authority
WO
WIPO (PCT)
Prior art keywords
point
image
distance
object point
projection
Prior art date
Application number
PCT/CN2021/102454
Other languages
French (fr)
Chinese (zh)
Inventor
刘海军
Original Assignee
闻泰科技(深圳)有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 闻泰科技(深圳)有限公司 filed Critical 闻泰科技(深圳)有限公司
Priority to CN202180001908.2A priority Critical patent/CN113597535B/en
Priority to PCT/CN2021/102454 priority patent/WO2022267028A1/en
Publication of WO2022267028A1 publication Critical patent/WO2022267028A1/en

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01CMEASURING DISTANCES, LEVELS OR BEARINGS; SURVEYING; NAVIGATION; GYROSCOPIC INSTRUMENTS; PHOTOGRAMMETRY OR VIDEOGRAMMETRY
    • G01C11/00Photogrammetry or videogrammetry, e.g. stereogrammetry; Photographic surveying
    • G01C11/04Interpretation of pictures
    • G01C11/30Interpretation of pictures by triangulation

Definitions

  • Embodiments of the present disclosure relate to an image-based ranging method, device and storage medium.
  • Distance measurement refers to the measurement of the length of a line connecting two points on a plane. It is one of the most basic tasks in various measurement tasks, especially in triangulation measurement, traverse measurement, topographic measurement and engineering measurement. widely. Commonly used methods for distance measurement include measuring ruler distance, line-of-sight measurement, parallax method distance measurement and electromagnetic wave distance measurement.
  • line-of-sight measurement also includes image-based measurement, which mainly uses the fixed ratio of image pixels to the size of the actual plane to calculate the distance between any two points on the actual plane parallel to the imaging plane.
  • image-based measurement methods have relatively large application limitations and many conditions, which are not easy to implement in actual application scenarios, and are not applicable to the intersection of the imaging plane and the actual plane, and the measurement accuracy is relatively low.
  • the existing image-based ranging methods are not suitable for the situation where the imaging plane intersects the actual plane, and the measurement accuracy is relatively low.
  • an image-based ranging method, device and storage medium are provided.
  • An image-based ranging method comprising:
  • the target image collected by the camera and including four positioning marks, wherein the four positioning marks are located on the marking plane in the object space, and are arranged at equal intervals and in a circle;
  • the first image point is the first object point on the identification plane
  • the second image point is an image point that marks the second object point on the plane
  • the distance between the first object point and the second object point is determined.
  • An image-based ranging device comprising:
  • the image acquisition module is configured to acquire the target image collected by the camera and includes four positioning marks, wherein the four positioning marks are located on the marking plane in the object space, and are arranged at equal intervals and around them;
  • the first position determination module is configured to determine the first positions of the four positioning marks in the target image
  • the second position determination module is configured to acquire the first image point and the second image point in the target image, and determine the second position of the first image point and the third position of the second image point, wherein the first image point is The image point of the first object point on the identification plane, and the second image point is the image point of the second object point on the identification plane;
  • the distance determination module is configured to determine the distance between the first object point and the second object point according to the first position, the second position and the third position.
  • An electronic device includes a memory and one or more processors, the memory stores computer-readable instructions, and when the one or more processors execute the computer-readable instructions, an image-based measurement provided by any embodiment of the present disclosure is implemented. steps from the method.
  • One or more non-volatile computer-readable storage media storing computer-readable instructions, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by one or more processors, implement any embodiment of the present disclosure
  • the steps of an image-based ranging method are provided.
  • Fig. 1 is a schematic diagram of positioning marks in one or more embodiments
  • Fig. 2 is a schematic diagram of an identification plane in one or more embodiments
  • Fig. 3 is a schematic diagram of an application scenario in one or more embodiments
  • Fig. 4 is a schematic flowchart of an image-based ranging method in one or more embodiments
  • Fig. 5 is a schematic flowchart of an image-based ranging method in one or more embodiments
  • Fig. 6 is a schematic diagram of a positional relationship in one or more embodiments.
  • Fig. 7 is a schematic flowchart of an image-based ranging method in one or more embodiments.
  • Fig. 8 is a schematic diagram of distance measurement in one or more embodiments.
  • Fig. 9 is a schematic flowchart of an image-based ranging method in one or more embodiments.
  • Fig. 10 is a structural block diagram of an image-based ranging device in one or more embodiments.
  • Figure 11 is a diagram of the internal structure of an electronic device in one or more embodiments.
  • the positioning mark can be a graphic with high contrast and spatial symmetry, which can have high anti-interference in image recognition.
  • the positioning mark can be a figure as shown in Figure 1, such as the positioning mark 110, the positioning mark 120, the positioning mark 130 and the positioning mark 140, the specific graphic structure of the positioning mark is not limited.
  • four positioning marks can be placed on a fixed spatial position relative to the shooting target to obtain a marking plane.
  • a schematic diagram of a marking plane shown in FIG. 2 uses 120 in FIG.
  • the positioning marks 120 are placed in the object space at equal intervals in sequence to obtain a marking plane, and the distance between any two adjacent marks is the same, wherein the graphics of the four positioning marks in the marking plane may be the same.
  • the image-based ranging method can be performed by a terminal or a server.
  • the terminal or server can measure the distance between any two object points in the corresponding identification plane through the target image.
  • the server 32 measures the distance between any two object points in the actual space through the target image, and the terminal 31 directly receives information about the distance between the two object points from the server 32.
  • Measurement results wherein, the target image may be captured by the terminal 31 and sent to the server 32 .
  • the target image is acquired by the terminal 31 from other devices.
  • the target image is an image obtained after the terminal 31 performs image processing on a preset image, and the preset image may be obtained by shooting by the terminal 31, or the preset image may be obtained by the terminal 31 from other devices.
  • other devices are not specifically limited.
  • the terminal 31 measures the distance between any two object points in the actual space through the target image, and sends the measured distance result to the server 32, wherein the target image can be obtained by the server 32 And send it to the terminal 31.
  • the way the server 32 acquires the target image can be similar to the way the terminal 31 acquires the target image above, and will not be repeated here.
  • the terminal 31 captures the target image, and further, the terminal 31 measures the distance between any two object points in the actual space through the target image.
  • an image-based ranging method is provided.
  • the method is applied to a terminal 31 for illustration.
  • the terminal 31 can be, but not limited to, various personal computers, Laptops, smartphones, tablets and portable wearables. Including the following steps as shown in Figure 4:
  • the four positioning marks are located on the mark plane in the object space, and are equally spaced and arranged in a circle.
  • the target image is generated by collecting information including four positioning marks and the shooting target through the camera.
  • S420 Determine the first positions of the four positioning markers in the target image.
  • the image processing algorithm may be used to calculate the first positions of the four positioning markers in the target image, where the first position includes specific position information of the four positioning markers in the target image.
  • S430 Acquire a first image point and a second image point in the target image, and determine a second position of the first image point and a third position of the second image point.
  • the first image point is an image point that identifies the first object point on the plane
  • the second image point is an image point that identifies the second object point on the plane.
  • any two image points in the target image are obtained, which are recorded as the first image point and the second image point, and according to the position of the pixel point occupied by the image point in the target image, Determining the second position of the first image point and the third position of the second image point, wherein the first image point in the target image is the image point of the first object point on the identification plane, and the second image point is the image point of the first object point on the identification plane.
  • the image points of two object points that is to say, the first image point in the target image corresponds to the first object point on the identification plane in the actual space, and the second image point in the target image corresponds to the second object point on the identification plane in the actual space. object point.
  • S440 Determine the distance between the first object point and the second object point according to the first position, the second position and the third position.
  • the first position on the mark plane in the actual space is determined. The distance between the object point and the second object point.
  • An image-based ranging method obtained by an embodiment of the present disclosure obtains a target image including four positioning marks captured by a camera, determines the first positions of the four positioning marks included in the target image, and obtains the first position of the four positioning marks in the target image.
  • One image point and the second image point and determine the second position and the third position of the first image point and the second image point in the target image, wherein, the first image point and the second image point respectively correspond to the identification in the object space
  • the disclosed technical solution can determine the distance between any two object points in the marked plane in the object space by acquiring the target image including the positioning mark, and does not need to determine the fixed ratio between the image pixel and the size on the actual plane in advance, and can be applied in imaging When the surface intersects with the actual plane, the application limitation is small, it is suitable for a variety of application scenarios, and it is easy to implement.
  • an image-based ranging method is provided.
  • the first object point and the second object point are determined according to the first position, the second position, and the third position.
  • the distance between including the following steps as shown in Figure 5:
  • S510 Determine the positional relationship between the image plane of the camera and the identification plane according to the first position.
  • the positional relationship includes that the image plane is parallel to or intersects with the identification plane.
  • the positional relationship between the image plane of the camera and the mark plane is determined, where the image plane refers to the plane where the target image captured by the camera is located.
  • the image plane is parallel to the marking plane; when the length of the first group of opposite sides determined by the marking position and the second When the lengths of any one of the two sets of opposite sides are not equal, the image plane intersects the logo plane.
  • the four positioning marks sequentially include the first positioning mark, the second positioning mark, the third positioning mark and the fourth positioning mark in the arrangement direction.
  • the distance between two points algorithm can be used to determine the first imaging distance between the first positioning mark and the second positioning mark, the second imaging distance between the second positioning mark and the third positioning mark, A third imaging distance between the third positioning mark and the fourth positioning mark, and a fourth imaging distance between the fourth positioning mark and the first positioning mark.
  • the sides corresponding to the first imaging distance and the third imaging distance are the first group of opposite sides
  • the sides corresponding to the second imaging distance and the fourth imaging distance are the second group of opposite sides.
  • the image plane is parallel to the logo plane; when the first imaging distance is not equal to the third imaging distance, or When the second imaging distance is not equal to the fourth imaging distance, the image plane intersects the logo plane. .
  • the first imaging distance between the adjacent first positioning mark and the second positioning mark in the arrangement direction is determined, and the second imaging distance between the adjacent second positioning mark and the third positioning mark in the arrangement direction is sequentially determined.
  • 610 indicates that the image plane 612 is parallel to the marking plane 611, that is, the camera 613 is placed directly in front of the marking plane 611, and the camera 613 is positioned on the marking plane 611 on the diagonal line of the four positioning marks. Directly in front of the focus, that is, the dotted line in the figure is perpendicular to the logo plane 611.
  • the plane collected by the camera 613 can be regarded as the image plane 612, and the target image is generated according to the image plane 612.
  • the image plane 612 includes the same content as the target image. At this time, The imaging distances determined between the four positioning marks are equal, and the generated target image can be regarded as a reduced image of the mark plane.
  • the lens of the camera 613 has an oblique angle to the logo plane 611, that is, the main optical axis of the camera 613 is not perpendicular to the logo plane 611, and four of the image planes 621 corresponding to the camera 613
  • the positions of the positioning marks are also inclined relative to the marking plane 611. At this time, the positions of the four positioning marks in the target image are inclined compared with the positions of the four positioning marks in the marking plane, and cannot be accurately measured according to a fixed ratio The distance between object points in real space.
  • S520 Determine the distance between the first object point and the second object point according to the positional relationship, the first location, the second location, and the third location.
  • the first positions of the four positioning markers in the target image, the second position of the first image point in the target image, and the second image The third position of the point determines the distance between the first object point and the second object point in the actual space, that is to say, different positional relationships correspond to different ways of measuring distance.
  • the distance between the first object point and the second object point is determined, which is applied to the case where the image plane is parallel to the logo plane, and the parallel positional relationship
  • the positional relationship the first position, the second position and the third position, the distance between the first object point and the second object point is determined, which is applied to the case where the image plane is parallel to the logo plane, and the parallel positional relationship
  • S521 When the image plane is parallel to the marking plane, determine the imaging distance between any two positioning marks among the four positioning marks according to the first position.
  • the imaging distance between any two positioning markers in the target image is calculated according to the first positions of the four markers in the target image.
  • P 1 ′, P 2 ′, and P 1 can be determined ' and P 4 ' or the imaging distance between P 1 ' and P 3 ', and the imaging distance between P 2 ' and the other three positioning marks can also be determined respectively, P 3 ' and P 4 ' and P 1 ' Or P 2 ' calculates the imaging distance similarly.
  • S522 Determine the distance between the first image point and the second image point according to the second position and the third position.
  • the distance between the first pixel and the second pixel is determined according to the second position of the first pixel and the third position of the second pixel in the target image.
  • S523 Determine the distance between the first object point and the second object point according to the imaging distance between any two positioning marks and the distance between the first image point and the second image point, and in combination with the imaging principle.
  • the relational expression satisfied by the distance between the first object point and the second object point includes: the ratio of the actual distance between any two positioning marks and the imaging distance between any two positioning marks, and the first image The product of the distance between the point and the second image point.
  • the imaging principle mainly applies the principle of pinhole imaging, and the specific imaging formula is shown in formula (1).
  • H is the object height
  • D is the object distance, that is, the distance between the camera and the shooting target
  • f is the focal length of the lens
  • h is the image height.
  • the distance can be calculated using pixels, that is Calculate the product of the number of pixels occupied by the straight line connecting the first pixel and the second pixel and the side length of the pixel; if the straight line connecting the first pixel and the second pixel is not parallel to any side of the target image, Then directly measure the length of the straight line connecting the first image point and the second image point in the target image.
  • the ratio of the distance between the first object point and the second object point in the actual space to the distance between the first image point and the second image point in the target image is equal to The ratio of the actual distance between any two positioning marks in the actual space and the imaging distance between any two positioning marks in the target image.
  • the distance between the first image point M' and the second image point N' in the target image is denoted as M'N'
  • the distance between the first object point M and the second object point N in the actual space Denoted as MN
  • the actual distance between the two positioning marks P 1 and P 2 in the actual space is denoted as W
  • the imaging distance between the two positioning marks P 1 ' and P 2 ' in the target image is denoted as W'
  • the first The distance MN between the object point M and the second object point N can be calculated using formula (2).
  • the image-based ranging method provided by the embodiments of the present disclosure can accurately determine the positional relationship between the image plane where the target image is located and the representation image in the actual space, and use different measurement methods to determine the distance between objects according to different positional relationships.
  • the distance between points can be applied to a variety of application scenarios, and the distance between object points can be accurately calculated, and it is easy to implement.
  • an image-based ranging method is provided.
  • the first position, the second position and the third position, the first object point and the second The distance between two object points is applied to the situation where the image plane intersects with the logo plane, and the intersecting positional relationship is specifically referred to at 620 in Fig. 6, which specifically includes the following steps:
  • the four positioning marks sequentially include a first positioning mark, a second positioning mark, a third positioning mark and a fourth positioning mark in the arrangement direction.
  • the first position includes the first sub-position corresponding to the first positioning mark, the second sub-position corresponding to the second positioning mark, the third sub-position corresponding to the third positioning mark, and the fourth sub-position corresponding to the fourth positioning mark. Location.
  • the first positioning mark, the second positioning mark, the third positioning mark and the fourth positioning mark can be marked as P 1 ′, P 2 ′, P 3 ′, and P 4 ′, respectively.
  • the intersecting angle can be decomposed into two cases of independent calculation, according to the first positions of the four positioning marks in the target image , respectively determine the first projection angle and the second projection angle, that is, after the transformation of the first projection angle and the second projection angle, the image plane is parallel to the logo plane, wherein the first projection angle and the second projection angle can be acute angle.
  • the logo plane is rotated around the first preset straight line by the second projection angle, and after being rotated around the second preset straight line by the first projection angle, parallel to the image plane, the first preset straight line passes through the first position in the object space mark and the third position mark, the second preset straight line passes through the second position mark and the fourth position mark in the object space.
  • Fig. 8 is a schematic diagram of distance measurement
  • the logo plane 611 rotates around the first preset straight line P 1 P 3 by the second projection angle ⁇
  • the logo plane is parallel to the image plane.
  • the cross-sectional view 710 shown in FIG. 8 is obtained by rotating the logo plane 611 around the first preset straight line P 1 P 3 by the second projection angle ⁇ , wherein OP is the center of the logo plane
  • the straight line at point C is perpendicular to the straight line passing through center point C and lens center L, and ⁇ is the first projection angle.
  • determining the first projection angle and the second projection angle according to the first position includes: determining the first positioning mark, the second positioning mark, the third positioning mark and the fourth positioning mark in the target image according to the first position Mark the first distance, the second distance, the third distance and the fourth distance from the mark imaging center respectively; according to the second distance and the fourth distance, determine the first projection angle; according to the first distance and the third distance, determine the second projection angle.
  • the first projection angle and the second projection angle are calculated by the following formulas (3)-(16), which are described with symbols marked in FIG. 8 .
  • point O is the intersection of the straight line LP 2 connecting the camera L with the second positioning mark P 2 and the straight line passing through the midline point C and perpendicular to the straight line CL
  • P is the extension of the straight line connecting the camera and the fourth positioning mark P 4
  • D is the distance between the center point C and the camera center L
  • C' is the connection line between P 1 ' and P 3 ' in the target image and P 2 '
  • the intersection point of the line connecting P 4 ', A' 2 is the distance between C' and P2'
  • f is the focal length of the camera.
  • A' 4 is the distance between C' and P 4 '.
  • A is the distance between the second positioning mark P2 and the center point C in the mark plane.
  • the distance from any positioning mark to the center point C in the mark plane is equal to A.
  • P 2 M is perpendicular to MC, and the angle between P 2 M and P 2 C is the first projection intersection ⁇ .
  • P 4 N is perpendicular to CL, and the angle between P 4 N and P 4 C is the first projection intersection ⁇ .
  • the calculation formula of the first projection angle ⁇ can be obtained as the following formula (15).
  • represents the first projection angle
  • A'2 represents the distance from the second positioning mark to the mark imaging center in the target image
  • A'4 represents the distance from the fourth position mark to the mark imaging center in the target image
  • f represents the camera The focal length of , mark the imaging center as the intersection of the diagonal lines connecting the four positioning marks in the target image.
  • the calculation method of the second projection angle ⁇ is the same as that of the first projection angle ⁇ , which is not repeated here.
  • the calculation formula of the second projection angle ⁇ is as follows: formula (16).
  • represents the second projection angle
  • A'1 represents the distance from the first positioning mark to the mark imaging center in the target image
  • A'3 represents the distance from the third position mark to the mark imaging center in the target image.
  • S720 Determine the object distance according to the first position and the first projection angle; or determine the object distance according to the first position and the second projection angle.
  • the object distance is determined according to the first position in the target image and the first projection angle of the image plane projected onto the identification plane, wherein the object distance refers to the center of the lens of the camera to the identification plane
  • the distance between the centers of the four positioning marks, the center is the intersection point of the diagonal lines connecting the four positioning marks.
  • the length of the dotted line in 610 is the intersection point of the diagonal line connecting the four positioning marks on the marking plane from the lens center of the camera 613 to the lens center of the camera on the marking plane and the four positioning markings on the marking plane. distance.
  • the object distance is determined according to the second distance, the fourth distance and a cosine value including the first projection angle.
  • the object distance is determined according to the first position and the first projection angle, and the calculation formula of the object distance is as the following formula (17).
  • D represents the object distance
  • A represents the distance from the positioning mark to the mark center in the object space
  • A'2 represents the distance from the second positioning mark to the mark imaging center in the target image
  • A'4 represents the fourth position mark in the target image
  • the distance from the positioning mark to the mark imaging center f represents the focal length of the camera
  • represents the first projection angle
  • the mark center is the intersection point of the diagonal lines connecting the four positioning marks in the object space
  • the mark imaging center is the four points in the target image
  • Positioning identifies the intersection of diagonal lines.
  • A′ 1 , A′ 2 , A′ 3 and A′ 4 are obtained, and according to formula (15 ) to obtain the first projection angle ⁇ obtained by calculating the distance D between the camera and the central point of the logo plane in the actual space.
  • the object distance is determined according to the first distance, the third distance and a cosine value including the second projection angle.
  • the object distance is determined according to the first position and the second projection angle, and the calculation formula of the object distance is as the following formula (18).
  • D represents the object distance
  • A represents the distance from the positioning mark to the mark center in the object space
  • A'1 represents the distance from the first positioning mark to the mark imaging center in the target image
  • A'3 represents the third position mark in the target image
  • the distance between the positioning mark and the mark imaging center f represents the focal length of the camera
  • represents the second projection angle
  • the mark center is the intersection point of the diagonal lines connecting the four positioning marks in the object space
  • the mark imaging center is the four points in the target image
  • Positioning identifies the intersection of diagonal lines.
  • the distance between the camera and the central point of the logo plane in the actual space can be obtained according to the first projection angle or the second projection angle.
  • S730 Determine the position of the first object point and the position of the second object point according to the first position, the second position, the third position, the first projection angle, the second projection angle, and the object distance.
  • the second position of the first pixel point, the third position of the second pixel point, the first projection angle and the second projection angle corresponding to the image plane and the mark plane The angle and the object distance from the lens center of the camera to the center in the marked plane are calculated to obtain the position of the first object point and the position of the second object point in the actual space.
  • S740 Determine the distance between the first object point and the second object point according to the position of the first object point and the position of the second object point.
  • is the distance between the first object point and the second object point in the actual space, and the positions of the first object point and the second object point in the actual space are (x m , y m ) and (x n ,y n ).
  • An image-based ranging method determines two projection angles according to the first positions of the four positioning marks in the target image, which is convenient for handling the intersection of the image plane and the marking plane, and can be used without measurement.
  • the projection angle determines the object distance, that is, the distance from the center of the camera to the center of the mark, and the method is simple and easy to implement.
  • an image-based ranging method is provided.
  • the first position, the second position, the third position, the first projection angle, the second projection angle and The object distance is to determine the position of the first object point and the position of the second object point, including the following steps as shown in Figure 9:
  • S910 According to the first position, the second position and the third position, determine a first pixel projection length group of the first pixel and a second pixel projection length group of the second pixel.
  • the first image point projection length group and the second image point projection length group both include the distances from the corresponding image point to the first virtual straight line and the second virtual straight line respectively, and the first virtual straight line passes through the first positioning mark in the target image and the third positioning mark, the second virtual straight line passes through the second positioning mark and the fourth positioning mark in the target image.
  • the first pixel projection length group of the first pixel is determined, and according to the first position and the third position, the second pixel projection length group of the second pixel is determined.
  • Image point projection length group is determined.
  • the first image point projection length group includes the first image point projection length and the image point second projection length
  • the image point first projection length is the vertical projection of the first image point on the first virtual straight line to the identified imaging center
  • the second projection length of the image point is the distance from the vertical projection of the first image point on the second virtual straight line to the center of the marked imaging.
  • the second image point projection length group includes the third projection length of the image point and the fourth projection length of the image point length, the third projected length of the image point is the distance from the vertical projection of the second image point on the first virtual straight line to the center of the logo imaging, and the fourth projected length of the image point is the vertical projection of the second image point on the second virtual straight line to Identify the distance of the imaging center, the first virtual straight line passes through the first positioning mark and the third positioning mark in the target image, and the second virtual straight line passes through the second positioning mark and the fourth positioning mark in the target image.
  • the object point T is randomly determined on the identification plane in the actual space
  • T' is an image point in the image plane corresponding to the object point
  • the object point T is not adjacent to the identification plane in the identification plane.
  • the projections on P 3 and P 2 P 4 are denoted as T 1 and T 2
  • the projections of the image point T' corresponding to the object point T in the image plane are denoted as T′ 1 and T′ 2 , where T′T′ 1 Parallel to C'P' 4 and T'T' 2 parallel to C'P' 3 , if the first image point or the second image point is the image point T', the first projection length or the third projection length is C'T 1 ', the first virtual straight line is P 1 'P 3 ', the second projected length or the fourth projected length is C'T 2 ', and the second virtual straight line is P 2 'P 4 '.
  • the first position determine the position of the marked imaging center; according to the second position and the third position, respectively determine the vertical projection of the corresponding image point to the first virtual straight line and the second virtual straight line; according to the vertical projection to the marked
  • the distance of the imaging center determines the first image point projection length group and the second image point projection length group. Determining the first image point projection length group or the second image point projection length group specifically includes the following steps:
  • S911 Determine the position of the marked imaging center according to the first position.
  • the position of the marking imaging center obtained by the intersection of straight lines connecting non-adjacent positioning marks is determined.
  • a Cartesian coordinate system is established with the position of the marked imaging center C' as the origin, with the horizontal direction as the X axis and the longitudinal direction passing through C' as the Y axis.
  • S913 According to the first position, determine the first marker coordinates of the first positioning marker, the second marker coordinates of the second marker, the third marker coordinates of the third marker, and the fourth marker coordinates of the fourth marker in the Cartesian coordinate system. Identify the coordinates, and determine the first image point coordinates of the first image point according to the second position, and determine the second image point coordinates of the second image point according to the third position.
  • the first positions of the four positioning marks in the target image are re-determined, and the positions of the four positioning marks are respectively the first identification coordinates of the first positioning marks,
  • the second identification coordinates of the second positioning identification, the third identification coordinates of the third positioning identification and the fourth identification coordinates of the fourth positioning identification at the same time, re-determine the first image point coordinates of the first image point and the second image point
  • the coordinates of the second image point, wherein the randomly selected image point T' can be the first image point or the second image point.
  • S914 Determine a first straight line equation of the first virtual straight line according to the first identified coordinates or the third identified coordinates, and determine a second straight line equation of the second virtual straight line according to the second identified coordinates or the fourth identified coordinates.
  • the first line equation of the first virtual straight line is determined according to any one of the first marked coordinates or the third marked coordinates and the marked imaging center, wherein the first virtual straight line passes through the first marked coordinates, the third marked coordinates, Coordinates and mark the imaging center, the calculation formula of the first straight line equation of the first virtual straight line is shown in the following formula (20).
  • the first virtual straight line is a straight line passing through C′P′ 3 P′ 1
  • the corresponding coordinate points of P′ 1 , P′ 2 , P′ 3 , and P′ 4 in the target image can be written as (x′ 1 , y′ 1 ),(x′ 2 ,y′ 2 ),(x′ 3 ,y′ 3 ),(x′ 4 ,y′ 4 ), the image coordinates of T′ are (x′ t ,y′ t ) .
  • the second line equation of the second virtual straight line is determined according to any one of the second logo coordinates or the fourth logo coordinates and the logo imaging center, wherein the second virtual straight line passes through the second logo coordinates, the fourth logo coordinates and identify the imaging center, the calculation formula of the second line equation of the second virtual line is shown in the following formula (21).
  • the second virtual straight line is a straight line passing through C′P′ 4 P′ 2 .
  • S915 According to the coordinates of the first image point, determine the third line equation passing through the first image point and parallel to the first virtual straight line, and the fourth line equation passing through the first image point and parallel to the second virtual straight line, and according to the first image point The coordinates of the two image points determine the fifth line equation passing through the second image point and parallel to the first virtual straight line, and the sixth line equation passing through the second image point and parallel to the second virtual straight line.
  • the third line equation is a line passing through T' and T'2 and parallel to C'P'3, and the calculation formula of the third line equation is shown in the following formula (22).
  • the fourth straight line equation is a straight line passing through T' and T'1 and parallel to C'P'4, and the calculation formula of the fourth straight line equation is shown in the following formula (23).
  • S916 According to the first straight-line equation and the fourth straight-line equation, determine the first projection coordinates of the image point vertically projected onto the first virtual straight line, and determine the first image according to the second straight-line equation and the third straight-line equation The second projection coordinates of the image point vertically projected onto the second virtual straight line, and according to the first straight line equation and the sixth straight line equation, determine the third projection coordinates of the second image point vertically projected onto the first virtual straight line , according to the second straight line equation and the fifth straight line equation, determine the fourth projection coordinates of the second pixel vertically projected onto the second virtual straight line.
  • intersection of the first straight line equation and the fourth straight line equation is the first projection coordinate of the first image point vertically projected onto the first virtual straight line
  • intersection of the second straight line equation and the third straight line equation is is the second projection coordinate of the first image point vertically projected onto the second virtual straight line
  • the intersection point of the first straight line equation and the sixth straight line equation is the second image point vertically projected onto the first virtual straight line
  • the third projected coordinates, the intersection of the second straight line equation and the fifth straight line equation are the fourth projected coordinates of the image point vertically projected onto the second virtual straight line by the second image point.
  • the first projected coordinates of the intersection of the first line equation and the fourth line equation are marked as T′ 1
  • the coordinates of point T′ 1 are marked as (x′ t1 , y′ t1 )
  • the calculation formula is as follows ( twenty four).
  • (x′ t , y′ t ) can be regarded as the coordinates of the first pixel point to obtain the first projected coordinates
  • (x′ t , y′ t ) can be regarded as the coordinates of the second pixel point Get the third projected coordinates.
  • the second projected coordinates of the intersection of the second line equation and the third line equation are marked as T′ 2
  • the coordinates of T′ 2 are marked as (x′ t2 , y′ t2 )
  • the calculation formula is the following formula (25 ).
  • S917 Determine the first projected length of the image point according to the first projected coordinates of the image point, determine the second projected length of the image point according to the second projected coordinates of the image point, and determine the third projected length of the image point according to the third projected coordinates of the image point , according to the fourth projection coordinates of the image point, determine the fourth projection length of the image point.
  • the first projected length of the image point is obtained, and respectively according to the second projected coordinates of the image point, the third projected coordinates of the image point and the fourth projected coordinates of the image point and The coordinates of the imaging center are identified to obtain the corresponding second projected length of the image point, the third projected length of the image point and the fourth projected length of the image point.
  • the first projection length of the image point is obtained according to the coordinates (x' t1 , y' t1 ) of point T'1 , and the calculation formula is as the following formula (26).
  • the second projected length of the image point is obtained according to the coordinates (x' t2 , y' t2 ) of point T'2 , and the calculation formula is as the following formula (27).
  • the third projected length of the image point and the fourth projected length of the image point are also obtained by the above formula, which will not be repeated here.
  • S920 Determine the first object point projection length group and the second object point of the first object point according to the first projection angle, the second projection angle, the object distance, the first image point projection length group, and the second image point projection length group The second object point projection length group for .
  • the first object point projection length group of the first object point is determined, and according to the first projection The angle, the second projection angle, the object distance and the second image point projection length group determine the second object point projection length group of the second object point.
  • the first object point projected length group includes the first projected length of the object point and the second projected length of the object point.
  • the first projected length of the object point is the distance from the vertical projection of the first object point on the first preset straight line to the center of the mark.
  • the second projection length of the point is the distance from the vertical projection of the first object point on the second preset straight line to the center of the logo.
  • the second projection length group of the object point includes the third projection length of the object point and the fourth projection length of the object point.
  • the third projection length is the distance from the vertical projection of the second object point on the first preset straight line to the mark center
  • the fourth projection length of the object point is the distance from the vertical projection of the second object point on the second preset straight line to the mark center distance.
  • the connecting line between the first positioning mark and the third positioning mark is the first diagonal line
  • the connecting line between the second positioning mark and the fourth positioning mark is the second diagonal line
  • the connecting line between the second positioning mark and the fourth positioning mark is the second diagonal line. Both the diagonal line and the second diagonal line are divided into the first semi-axis and the second semi-axis by the identified imaging center.
  • the connecting line between the first positioning mark P'1 and the third positioning mark P'3 is the first diagonal line
  • the second positioning mark P'2 and the third The connecting line between the four positioning marks P′ 4 is the second diagonal
  • the first semi-axis and the second semi-axis in the first diagonal can be C′P′ 1 and C′P′ 3
  • the second The first and second semi-axes in the diagonal may be C'P' 2 and C'P' 4 .
  • the calculation method of the first object point projection length group of the first object point or the second object point projection length group of the second object point specifically includes the following steps:
  • the determination of the shorter semi-axis and the longer semi-axis is determined by the distance between the image points specifically included in the first semi-axis and the second semi-axis, where
  • the line connecting the image point T' and the image point projection point T'1 is perpendicular to the first virtual straight line C'P'3P'1
  • the image point projection point T'1 is the image point T'
  • the first semi-axis in the first diagonal is compared with the second semi-axis C'P' 1 and C'P' 3
  • C'P' 1 can be determined to be relatively Minor semi-axis, similarly, compared with C'P' 2 and C'P' 4 in the first semi-axis in the second diagonal
  • C'P' 2 is the shorter semi-axis.
  • T'1 in FIG. 8 falls on the longer semi-axis of the first diagonal.
  • the line connecting the image point T' and the image point projection point T'2 is perpendicular to the second virtual straight line C'P'3P'1
  • the image point projection point T'2 is the image point T'
  • the first semi-axis in the first diagonal is compared with the second semi-axis C'P' 1 and C'P' 3
  • C'P' 1 can be determined to be relatively Minor semi-axis
  • C'P' 2 is the shorter semi-axis.
  • CT 1 represents the first projected length of the object point or the third projected length of the object point
  • CT 2 indicates the second projection length of the object point or the fourth projection length of the object point
  • C'T' 2 indicates the second projection length of the image point corresponding to the second projection length of the object point
  • D represents the object distance
  • f represents the focal length of the camera
  • represents the second projection angle
  • represents the first projection angle.
  • T′ 2 in FIG. 8 falls on the longer semi-axis of the second diagonal.
  • S930 Determine the position of the first object point according to the first object point projection length group, and determine the position of the second object point according to the second object point projection length group.
  • determining the position of the first object point and the position of the second object point specifically includes the following steps:
  • S931 Determine the abscissa of the first object point by ⁇ 2/2 of the difference between the first projected length of the object point and the second projected length of the object point, and determine the sum of the first projected length of the object point and the second projected length of the object point ⁇ 2/2 of , determine the ordinate of the first object point.
  • (x t , y t ) is the coordinate corresponding to the object point T in the actual space.
  • S932 Determine the abscissa of the second object point by ⁇ 2/2 of the difference between the third projected length of the object point and the fourth projected length of the object point, and determine the sum of the third projected length of the object point and the fourth projected length of the object point ⁇ 2/2 of , determine the ordinate of the second object point.
  • the horizontal and vertical coordinates of the object point corresponding to the second image point can be determined by the above formula (32).
  • An image-based ranging method provided by an embodiment of the present disclosure further determines the correspondence between the first object point and the second object point in the actual space by determining the projection length group corresponding to the first image point and the second image point in the target image The projection length group, and then get the position of the first object point and the second object point, and get the distance between the two object points according to the coordinate points of the first object point and the second object point, by calculating the image point in the target image
  • the projected coordinates of the target image can determine the distance of the object point in the actual space according to the pixel information in the target image, and the calculated distance information between the object points is accurate, and the distance between any object points in the actual space can be directly Using the above formula to calculate directly, the calculation speed is faster.
  • an image-based ranging device is provided, and the ranging device 1000 includes:
  • the image acquisition module 1100 is configured to acquire the target image collected by the camera and includes four positioning marks, wherein the four positioning marks are located on the marking plane in the object space, and are arranged at equal intervals and around them;
  • the first position determining module 1200 is configured to determine the first positions of the four positioning marks in the target image
  • the second position determination module 1300 is configured to acquire the first image point and the second image point in the target image, and determine the second position of the first image point and the third position of the second image point, wherein the first image point is the image point of the first object point on the identification plane, and the second image point is the image point of the second object point on the identification plane;
  • the distance determination module 1400 is configured to determine the distance between the first object point and the second object point according to the first position, the second position and the third position.
  • the distance determination module 1400 is specifically configured to: determine the positional relationship between the image plane of the camera and the identification plane according to the first position, wherein the positional relationship includes that the image plane and the identification plane are parallel or intersecting; according to the positional relationship, the first position , the second position and the third position, to determine the distance between the first object point and the second object point.
  • the distance determination module 1400 is specifically configured to: when the lengths of the first group of opposite sides determined by the marked positions are equal, and the lengths of the second group of opposite sides determined by the marked positions are equal, the image plane is parallel to the marked plane; When any of the lengths of the first group of opposite sides determined by the logo position and the second group of lengths of opposite sides are not equal, the image plane intersects the logo plane.
  • the distance determining module 1400 is specifically configured to: when the image plane is parallel to the marking plane, determine the imaging distance between any two positioning marks among the four positioning marks according to the first position; Three positions, determine the distance between the first image point and the second image point; according to the imaging distance between any two positioning marks and the distance between the first image point and the second image point, combined with the imaging principle, determine The distance between the first object point and the second object point.
  • the relational expression satisfied by the distance between the first object point and the second object point includes: the ratio of the actual distance between any two positioning marks and the imaging distance between any two positioning marks, and the first image The product of the distance between the point and the second image point.
  • the distance determining module 1400 is specifically configured to: when the image plane intersects the marking plane, determine the first projection angle and the second projection angle according to the first position, wherein the marking plane is rotated around the first preset straight line by a second The projection angle, and after the first projection angle is rotated around the second preset straight line, it is parallel to the image plane, the first preset straight line passes through the first positioning mark and the third positioning mark in the object space, and the second preset straight line passes through the object space
  • the second positioning mark and the fourth positioning mark in; according to the first position and the first projection angle, determine the object distance; or, according to the first position and the second projection angle, determine the object distance; according to the first position, the second position , the third position, the first projection angle, the second projection angle and the object distance, determine the position of the first object point and the position of the second object point; according to the position of the first object point and the position of the second object point, determine the position of the second object point The distance between one object point and the second object point.
  • the distance determination module 1400 is specifically configured to: according to the first position, determine the first distances from the first positioning mark, the second positioning mark, the third positioning mark and the fourth positioning mark in the target image to the mark imaging center respectively , the second distance, the third distance and the fourth distance; according to the second distance and the fourth distance, determine the first projection angle; according to the first distance and the third distance, determine the second projection angle.
  • the distance determination module 1400 is specifically configured to: determine the object distance according to the second distance, the fourth distance and the cosine value including the first projection angle; or, according to the first distance, the third distance and the cosine value including the second projection angle The cosine value of , determines the object distance.
  • the distance determining module 1400 is specifically configured to: determine the first pixel projection length group of the first pixel and the second pixel projection length of the second pixel according to the first position, the second position and the third position group, wherein, the first image point projection length group and the second image point projection length group both include the distances from corresponding image points to the first virtual straight line and the second virtual straight line respectively.
  • the first virtual straight line passes through the first location in the target image logo and the third positioning logo
  • the second virtual straight line passes through the second positioning logo and the fourth positioning logo in the target image
  • the first projection angle, the second projection angle, the object distance, the first image point projection length group and the second Image point projection length group determine the first object point projection length group of the first object point and the second object point projection length group of the second object point, wherein, the first object point projection length group and the second object point projection length group Both include the distances from the corresponding object point to the first preset straight line and the second preset straight line
  • the first object point projection length group determine the position of the first object point
  • the second object point projection length group determine The location of the second object point.
  • the distance determination module 1400 is specifically configured to: determine the position marking the imaging center according to the first position; determine the distance from the corresponding image point to the first virtual line and the second virtual line according to the second position and the third position, respectively Vertical projection; according to the distance from the vertical projection to the marked imaging center, determine the first pixel projection length group and the second pixel projection length group.
  • the connection line between the first positioning mark and the third positioning mark is the first diagonal line
  • the connection line between the second positioning mark and the fourth positioning mark is the first diagonal line.
  • Two diagonal lines, the first diagonal line is specifically configured as: according to the position of the vertical projection corresponding to the first image point on the virtual straight line, the second projection angle, the object distance and the projection length group of the first image point, determine the first object Point projection length group; determine the second object point projection length group according to the position of the vertical projection corresponding to the second image point on the virtual straight line, the first projection angle, the object distance and the second image point projection length group.
  • the position of the first object point is determined according to the first object point projection length group
  • the position of the second object point is determined according to the second object point projection length group, specifically configured as follows: Determine the abscissa of the first object point by the ⁇ 2/2 of the difference between the first projected length of the object point and the second projected length of the object point, and the ⁇ 2/2 of the sum of the first projected length of the object point and the second projected length of the object point 2.
  • the image-based ranging device of the embodiment shown in FIG. 10 can be used to implement the technical solution of the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
  • an electronic device is provided.
  • the electronic device may be a terminal, and its internal structure may be as shown in FIG. 11 .
  • the electronic device includes one or more processors, memory, communication interface, display screen, and input device connected by a system bus. Wherein, one or more processors of the electronic device are used to provide calculation and control capabilities.
  • the memory of the electronic device includes a non-volatile storage medium and an internal memory.
  • the non-volatile storage medium stores an operating system and computer readable instructions.
  • the internal memory provides an environment for the execution of the operating system and computer readable instructions in the non-volatile storage medium.
  • the communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, an operator network, near field communication (NFC) or other technologies.
  • the computer readable instructions when executed by one or more processors, implement a method.
  • the display screen of the electronic device may be a liquid crystal display screen or an electronic ink display screen
  • the input device of the electronic device may be a touch layer covered on the display screen, or a button, a trackball or a touch pad provided on the housing of the electronic device , and can also be an external keyboard, touchpad, or mouse.
  • FIG. 11 is only a block diagram of a partial structure related to the disclosed solution, and does not constitute a limitation on the electronic device to which the disclosed solution is applied.
  • the specific electronic device can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.
  • the image-based distance measuring device provided by the present disclosure can be implemented in the form of computer-readable instructions, and the computer-readable instructions can be run on an electronic device as shown in FIG. 11 .
  • the various program modules that make up the image-based distance measuring device can be stored in the memory of the electronic device, for example, the image acquisition module 1100, the first position determination module 1200, the second position determination module 1300 and the distance determination module 1400 shown in FIG. 10 .
  • the computer-readable instructions constituted by various program modules enable one or more processors to execute the steps in the image-based ranging method of various embodiments of the present disclosure described in this specification.
  • the electronic device shown in FIG. 11 may execute step S410 through the image acquisition module 1100 in the apparatus shown in FIG. 8 .
  • the electronic device may execute step S420 through the first location determining module 1200 .
  • the electronic device may execute step S430 through the second location determining module 1300 .
  • the electronic device may execute step S440 through the distance determining module 1400 .
  • an electronic device including a memory and one or more processors, the memory stores computer-readable instructions, and the one or more processors execute the computer-readable instructions to implement the following steps: acquiring a camera
  • the target image collected contains four positioning marks, wherein the four positioning marks are located on the marking plane in the object space, and are arranged at equal intervals and around them; determine the first position of the four positioning marks in the target image; acquire the target image The first image point and the second image point in, and determine the second position of the first image point and the third position of the second image point, wherein, the first image point is the image point of the first object point on the identification plane, The second image point is an image point identifying the second object point on the plane; according to the first position, the second position and the third position, the distance between the first object point and the second object point is determined.
  • Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory or optical memory, etc.
  • Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory.
  • RAM Random Access Memory
  • SRAM Static Random Access Memory
  • DRAM Dynamic Random Access Memory
  • the image-based ranging method provided by the present disclosure can determine the distance between any two object points in the object space in the object space by acquiring the target image including the positioning mark, without the need to determine the distance between the image pixel and the size on the actual plane in advance
  • the fixed ratio makes it suitable for various application scenarios such as the intersection of the imaging plane and the actual plane, which reduces the limitations of the application and has strong industrial applicability.

Abstract

The present disclosure relates to the technical field of image processing, and provides an image-based distance-measuring method and apparatus, and a storage medium. The image-based distance-measuring method comprises: acquiring a target image which is collected by a camera and which comprises four positioning identifiers; determining first positions of the four positioning identifiers comprised in the target image; acquiring a first image point and a second image point in the target image, and determining the second position and third position of the first image point and the second image point in the target image, the first image point and the second image point corresponding to a first object point and a second object point on an identification plane in an object space, respectively; and according to the first positions, the second position and the third position, determining the distance between the first object point and the second object point in the object space. In the technical solution of the present disclosure, the distance between any two object points within an identification plane in an object space may be determined by acquiring a target image that comprises positioning identifiers, a fixed proportion does not need to be determined in advance, and application limitations are small; in addition, the method is suitable for various application scenarios and is convenient to implement.

Description

基于图像的测距方法、装置、和存储介质Image-based ranging method, device, and storage medium 技术领域technical field
本公开实施例涉及一种基于图像的测距方法、装置和存储介质。Embodiments of the present disclosure relate to an image-based ranging method, device and storage medium.
背景技术Background technique
距离测量是指测量平面上两点连线的长度,是各项测量工作中最基本的任务之一,尤其在三角测量、导线测量、地形测量和工程测量等工作中都需要进行距离测量,应用广泛。距离测量常用的方法有量尺量距、视距测量、视差法测距和电磁波测距等。Distance measurement refers to the measurement of the length of a line connecting two points on a plane. It is one of the most basic tasks in various measurement tasks, especially in triangulation measurement, traverse measurement, topographic measurement and engineering measurement. widely. Commonly used methods for distance measurement include measuring ruler distance, line-of-sight measurement, parallax method distance measurement and electromagnetic wave distance measurement.
目前,视距测量还包括基于图像的测量,主要是利用图像像素和实际平面上尺寸的固定比例来计算与成像面平行的实际平面上任意两点的距离。At present, line-of-sight measurement also includes image-based measurement, which mainly uses the fixed ratio of image pixels to the size of the actual plane to calculate the distance between any two points on the actual plane parallel to the imaging plane.
但是,基于图像的测量方法应用的局限性比较大,条件限制多,在实际应用场景中不便于实施,且对于成像面与实际平面相交的情况不适用,测量精度比较低。However, image-based measurement methods have relatively large application limitations and many conditions, which are not easy to implement in actual application scenarios, and are not applicable to the intersection of the imaging plane and the actual plane, and the measurement accuracy is relatively low.
发明内容Contents of the invention
(一)要解决的技术问题(1) Technical problems to be solved
现有的基于图像进行测距的方法不适配置成成像面与实际平面相交的情况,且测量精度比较低。The existing image-based ranging methods are not suitable for the situation where the imaging plane intersects the actual plane, and the measurement accuracy is relatively low.
(二)技术方案(2) Technical solution
根据本公开公开的各种实施例,提供了一种基于图像的测距方法、装置和存储介质。According to various embodiments of the present disclosure, an image-based ranging method, device and storage medium are provided.
一种基于图像的测距方法,所述方法包括:An image-based ranging method, the method comprising:
获取摄像头采集的包含四个定位标识的目标图像,其中,四个定位标识在物空间中位于标识平面,且依次等间距并环绕排列;Obtaining the target image collected by the camera and including four positioning marks, wherein the four positioning marks are located on the marking plane in the object space, and are arranged at equal intervals and in a circle;
确定四个定位标识在目标图像中的第一位置;Determining the first positions of the four positioning marks in the target image;
获取目标图像中的第一像点和第二像点,并确定第一像点的第二位置和第二像点的第三位置,其中,第一像点为标识平面上第一物点的像点,第二像点为标识平面上第二物点的像点;Acquire the first image point and the second image point in the target image, and determine the second position of the first image point and the third position of the second image point, wherein the first image point is the first object point on the identification plane An image point, the second image point is an image point that marks the second object point on the plane;
根据第一位置、第二位置和第三位置,确定第一物点与第二物点之间的距离。Based on the first position, the second position and the third position, the distance between the first object point and the second object point is determined.
一种基于图像的测距装置,包括:An image-based ranging device comprising:
图像获取模块,配置成获取摄像头采集的包含四个定位标识的目标图像,其中,四个定位标识在物空间中位于标识平面,且依次等间距并环绕排列;The image acquisition module is configured to acquire the target image collected by the camera and includes four positioning marks, wherein the four positioning marks are located on the marking plane in the object space, and are arranged at equal intervals and around them;
第一位置确定模块,配置成确定四个定位标识在目标图像中的第一位置;The first position determination module is configured to determine the first positions of the four positioning marks in the target image;
第二位置确定模块,配置成获取目标图像中的第一像点和第二像点,并确定第一像点的第二位置和第二像点的第三位置,其中,第一像点为标识平面上第一物点的像点,第二像点为标识平面上第二物点的像点;The second position determination module is configured to acquire the first image point and the second image point in the target image, and determine the second position of the first image point and the third position of the second image point, wherein the first image point is The image point of the first object point on the identification plane, and the second image point is the image point of the second object point on the identification plane;
距离确定模块,配置成根据第一位置、第二位置和第三位置,确定第一物点与第二物点之间的距离。The distance determination module is configured to determine the distance between the first object point and the second object point according to the first position, the second position and the third position.
一种电子设备,包括存储器和一个或多个处理器,存储器存储有计算机可读指令,一个或多个处理器执行计算机可读指令时实现本公开任意实施例所提供的 一种基于图像的测距方法的步骤。An electronic device includes a memory and one or more processors, the memory stores computer-readable instructions, and when the one or more processors execute the computer-readable instructions, an image-based measurement provided by any embodiment of the present disclosure is implemented. steps from the method.
一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,其上存储有计算机可读指令,计算机可读指令被一个或多个处理器执行时实现本公开任意实施例所提供的一种基于图像的测距方法的步骤。One or more non-volatile computer-readable storage media storing computer-readable instructions, on which computer-readable instructions are stored, and when the computer-readable instructions are executed by one or more processors, implement any embodiment of the present disclosure The steps of an image-based ranging method are provided.
本公开的其他特征和优点将在随后的说明书中阐述,并且,本公开的目的和其他优点在说明书、权利要求书以及附图中所特别指出的结构来实现和获得,本公开的一个或多个实施例的细节在下面的附图和描述中提出。为使本公开的上述目的、特征和优点能更明显易懂,下文特举可选实施例,并配合所附附图,作详细说明如下。Other features and advantages of the present disclosure will be set forth in the following description, and the purpose and other advantages of the present disclosure can be realized and obtained by the structure particularly pointed out in the description, claims and drawings, one or more of the present disclosure The details of these embodiments are set forth in the accompanying drawings and the description below. In order to make the above objects, features and advantages of the present disclosure more comprehensible, optional embodiments are given below and described in detail in conjunction with the accompanying drawings.
附图说明Description of drawings
此处的附图被并入说明书中并构成本说明书的一部分,示出了符合本公开的实施例,并与说明书一起用来解释本公开的原理。The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the disclosure and together with the description serve to explain the principles of the disclosure.
为了更清楚地说明本公开实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,对于本领域普通技术人员而言,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure or the prior art, the following will briefly introduce the drawings that need to be used in the description of the embodiments or the prior art. Obviously, for those of ordinary skill in the art, In other words, other drawings can also be obtained from these drawings without paying creative labor.
图1为一个或多个实施例中定位标识的示意图;Fig. 1 is a schematic diagram of positioning marks in one or more embodiments;
图2为一个或多个实施例中一种标识平面的示意图;Fig. 2 is a schematic diagram of an identification plane in one or more embodiments;
图3为一个或多个实施例中一种应用场景的示意图;Fig. 3 is a schematic diagram of an application scenario in one or more embodiments;
图4为一个或多个实施例中一种基于图像的测距方法的流程示意图;Fig. 4 is a schematic flowchart of an image-based ranging method in one or more embodiments;
图5为一个或多个实施例中一种基于图像的测距方法的流程示意图;Fig. 5 is a schematic flowchart of an image-based ranging method in one or more embodiments;
图6为一个或多个实施例中一种位置关系的示意图;Fig. 6 is a schematic diagram of a positional relationship in one or more embodiments;
图7为一个或多个实施例中一种基于图像的测距方法的流程示意图;Fig. 7 is a schematic flowchart of an image-based ranging method in one or more embodiments;
图8为一个或多个实施例中一种距离测量的示意图;Fig. 8 is a schematic diagram of distance measurement in one or more embodiments;
图9为一个或多个实施例中一种基于图像的测距方法的流程示意图;Fig. 9 is a schematic flowchart of an image-based ranging method in one or more embodiments;
图10为一个或多个实施例中一种基于图像的测距装置的结构框图;Fig. 10 is a structural block diagram of an image-based ranging device in one or more embodiments;
图11为一个或多个实施例中电子设备的内部结构图。Figure 11 is a diagram of the internal structure of an electronic device in one or more embodiments.
具体实施方式detailed description
为了能够更清楚地理解本公开的上述目的、特征和优点,下面将对本公开的方案进行进一步描述。需要说明的是,在不冲突的情况下,本公开的实施例及实施例中的特征可以相互组合。In order to more clearly understand the above objects, features and advantages of the present disclosure, the solutions of the present disclosure will be further described below. It should be noted that, in the case of no conflict, the embodiments of the present disclosure and the features in the embodiments can be combined with each other.
在下面的描述中阐述了很多具体细节以便于充分理解本公开,但本公开还可以采用其他不同于在此描述的方式来实施;显然,说明书中的实施例只是本公开的一部分实施例,而不是全部的实施例。In the following description, many specific details are set forth in order to fully understand the present disclosure, but the present disclosure can also be implemented in other ways than described here; obviously, the embodiments in the description are only some of the embodiments of the present disclosure, and Not all examples.
具体的,定位标识可以是具有较高对比度以及空间对称性的图形,能够在图像识别中具有较高的抗干扰性,定位标识可以是如图1所示的图形,如定位标识110、定位标识120、定位标识130和定位标识140,对于定位标识的具体图形结构不作限定。Specifically, the positioning mark can be a graphic with high contrast and spatial symmetry, which can have high anti-interference in image recognition. The positioning mark can be a figure as shown in Figure 1, such as the positioning mark 110, the positioning mark 120, the positioning mark 130 and the positioning mark 140, the specific graphic structure of the positioning mark is not limited.
具体的,可以在相对于拍摄目标,在固定空间位置上放置四个定位标识得到标识平面,例如,图2所示的一种标识平面的示意图,采用图1中120作为定位标识,将四个定位标识120依次等间距环绕放置在物空间中得到标识平面,任意相邻两个标识之间的距离相同,其中,标识平面内的四个定位标识的图形可以相 同。Specifically, four positioning marks can be placed on a fixed spatial position relative to the shooting target to obtain a marking plane. For example, a schematic diagram of a marking plane shown in FIG. 2 uses 120 in FIG. The positioning marks 120 are placed in the object space at equal intervals in sequence to obtain a marking plane, and the distance between any two adjacent marks is the same, wherein the graphics of the four positioning marks in the marking plane may be the same.
具体的,基于图像的测距方法可以由终端或服务器来执行。终端或服务器可以通过目标图像测量对应的标识平面中任意两个物点之间的距离。Specifically, the image-based ranging method can be performed by a terminal or a server. The terminal or server can measure the distance between any two object points in the corresponding identification plane through the target image.
例如,在一种应用场景中,如图3所示,服务器32通过目标图像测量实际空间中任意两个物点之间的距离,终端31直接从服务器32接收关于两个物点之间距离的测量结果,其中,该目标图像可以是终端31拍摄获得的并发送至服务器32。或者,该目标图像是终端31从其他设备中获取的。再或者,该目标图像是终端31对预设图像进行图像处理后得到的图像,该预设图像可以是终端31拍摄获得的,或者该预设图像可以是终端31从其他设备中获取的。此处,并不对其他设备做具体限定。For example, in an application scenario, as shown in FIG. 3, the server 32 measures the distance between any two object points in the actual space through the target image, and the terminal 31 directly receives information about the distance between the two object points from the server 32. Measurement results, wherein, the target image may be captured by the terminal 31 and sent to the server 32 . Alternatively, the target image is acquired by the terminal 31 from other devices. Alternatively, the target image is an image obtained after the terminal 31 performs image processing on a preset image, and the preset image may be obtained by shooting by the terminal 31, or the preset image may be obtained by the terminal 31 from other devices. Here, other devices are not specifically limited.
在另一种应用场景中,终端31通过目标图像测量实际空间中任意两个物点之间的距离,并将测得的距离结果发送至服务器32,其中,该目标图像可以是服务器32获得的并发送至终端31,服务器32获取目标图像的方式可以类似于如上的终端31获取目标图像的方式,此处不再赘述。In another application scenario, the terminal 31 measures the distance between any two object points in the actual space through the target image, and sends the measured distance result to the server 32, wherein the target image can be obtained by the server 32 And send it to the terminal 31. The way the server 32 acquires the target image can be similar to the way the terminal 31 acquires the target image above, and will not be repeated here.
在又一种应用场景中,终端31拍摄获得目标图像,进一步,终端31通过目标图像测量实际空间中任意两个物点之间的距离。In yet another application scenario, the terminal 31 captures the target image, and further, the terminal 31 measures the distance between any two object points in the actual space through the target image.
在一个实施例中,如图4所示,提供了一种基于图像的测距方法,本实施例以该方法应用于终端31进行举例说明,该终端31可以但不限于是各种个人计算机、笔记本电脑、智能手机、平板电脑和便携式可穿戴设备。包括如图4所示的以下步骤:In one embodiment, as shown in FIG. 4 , an image-based ranging method is provided. In this embodiment, the method is applied to a terminal 31 for illustration. The terminal 31 can be, but not limited to, various personal computers, Laptops, smartphones, tablets and portable wearables. Including the following steps as shown in Figure 4:
S410:获取摄像头采集的包含四个定位标识的目标图像。S410: Obtain the target image collected by the camera and including the four positioning marks.
可选的,四个定位标识在物空间中位于标识平面,且依次等间距并环绕排列。Optionally, the four positioning marks are located on the mark plane in the object space, and are equally spaced and arranged in a circle.
可理解的,相对于拍摄目标,在物空间(实际空间)中的固定空间位置上放置四个定位标识,参考图2所示的标识平面中四个定位标识的位置,在摄像头与拍摄目标存在一定距离(物距)的情况下,通过摄像头采集包括四个定位标识以及拍摄目标的信息生成目标图像。It can be understood that, relative to the shooting target, four positioning marks are placed at fixed spatial positions in the object space (actual space). Referring to the positions of the four positioning marks in the marking plane shown in FIG. In the case of a certain distance (object distance), the target image is generated by collecting information including four positioning marks and the shooting target through the camera.
S420:确定四个定位标识在目标图像中的第一位置。S420: Determine the first positions of the four positioning markers in the target image.
可理解的,在上述S410的基础上,可以利用图像处理算法计算出四个定位标识在目标图像中的第一位置,其中,第一位置包括四个定位标识在目标图像中的具体位置信息。It can be understood that on the basis of the above S410, the image processing algorithm may be used to calculate the first positions of the four positioning markers in the target image, where the first position includes specific position information of the four positioning markers in the target image.
S430:获取目标图像中的第一像点和第二像点,并确定第一像点的第二位置和第二像点的第三位置。S430: Acquire a first image point and a second image point in the target image, and determine a second position of the first image point and a third position of the second image point.
可选的,第一像点为标识平面上第一物点的像点,第二像点为标识平面上第二物点的像点。Optionally, the first image point is an image point that identifies the first object point on the plane, and the second image point is an image point that identifies the second object point on the plane.
可理解的,在上述S420的基础上,获取目标图像中的任意两个像点,记为第一像点和第二像点,并根据像点在目标图像中所占据的像素点的位置,确定第一像点的第二位置和第二像点的第三位置,其中,目标图像中的第一像点是标识平面上第一物点的像点,第二像点为标识平面上第二物点的像点,也就是说,目标图像中的第一像点对应实际空间中标识平面上的第一物点,目标图像中的第二像点对应实际空间中标识平面上的第二物点。It can be understood that on the basis of the above S420, any two image points in the target image are obtained, which are recorded as the first image point and the second image point, and according to the position of the pixel point occupied by the image point in the target image, Determining the second position of the first image point and the third position of the second image point, wherein the first image point in the target image is the image point of the first object point on the identification plane, and the second image point is the image point of the first object point on the identification plane. The image points of two object points, that is to say, the first image point in the target image corresponds to the first object point on the identification plane in the actual space, and the second image point in the target image corresponds to the second object point on the identification plane in the actual space. object point.
S440:根据第一位置、第二位置和第三位置,确定第一物点与第二物点之间的距离。S440: Determine the distance between the first object point and the second object point according to the first position, the second position and the third position.
可理解的,在上述S430和S420的基础上,根据目标图像中四个定位标识的 第一位置以及目标图像中的第一像点和第二像点,确定实际空间中标识平面上的第一物点与第二物点之间的距离。It can be understood that, on the basis of the above S430 and S420, according to the first positions of the four positioning marks in the target image and the first image point and the second image point in the target image, the first position on the mark plane in the actual space is determined. The distance between the object point and the second object point.
本公开实施例所提供的一种基于图像的测距方法,通过获取摄像头采集的包括四个定位标识的目标图像,确定目标图像包括的四个定位标识的第一位置,获取目标图像中的第一像点和第二像点,并确定第一像点与第二像点在目标图像中的第二位置和第三位置,其中,第一像点与第二像点分别对应物空间中标识平面上的第一物点和第二物点,根据第一位置、第二位置和第三位置,确定物空间中第一物点与第二物点之间的距离。本公开技术方案通过获取包括定位标识的目标图像,能够确定物空间中标识平面内任意两个物点之间的距离,不需要提前确定图像像素和实际平面上尺寸的固定比例,可以应用在成像面与实际平面相交的情况,应用的局限性小,适用于多种应用场景,且便于实施。An image-based ranging method provided by an embodiment of the present disclosure obtains a target image including four positioning marks captured by a camera, determines the first positions of the four positioning marks included in the target image, and obtains the first position of the four positioning marks in the target image. One image point and the second image point, and determine the second position and the third position of the first image point and the second image point in the target image, wherein, the first image point and the second image point respectively correspond to the identification in the object space The first object point and the second object point on the plane, according to the first position, the second position and the third position, determine the distance between the first object point and the second object point in the object space. The disclosed technical solution can determine the distance between any two object points in the marked plane in the object space by acquiring the target image including the positioning mark, and does not need to determine the fixed ratio between the image pixel and the size on the actual plane in advance, and can be applied in imaging When the surface intersects with the actual plane, the application limitation is small, it is suitable for a variety of application scenarios, and it is easy to implement.
在一个实施例中,如图5所示,提供了一种基于图像的测距方法,可选的,根据第一位置、第二位置和第三位置,确定第一物点与第二物点之间的距离,包括如图5所示的以下步骤:In one embodiment, as shown in FIG. 5 , an image-based ranging method is provided. Optionally, the first object point and the second object point are determined according to the first position, the second position, and the third position. The distance between, including the following steps as shown in Figure 5:
S510:根据第一位置,确定摄像头的像平面与标识平面的位置关系。S510: Determine the positional relationship between the image plane of the camera and the identification plane according to the first position.
可选的,位置关系包括像平面与标识平面平行或相交。Optionally, the positional relationship includes that the image plane is parallel to or intersects with the identification plane.
可理解的,根据目标图像中四个定位标识的第一位置,确定摄像头的像平面与标识平面的位置关系,像平面是指摄像头采集到的目标图像所在的平面。Understandably, according to the first positions of the four positioning marks in the target image, the positional relationship between the image plane of the camera and the mark plane is determined, where the image plane refers to the plane where the target image captured by the camera is located.
可选的,根据第一位置,确定摄像头的像平面与标识平面的位置关系,包括:Optionally, according to the first position, determine the positional relationship between the image plane of the camera and the identification plane, including:
当由标识位置确定的第一组对边长度相等,且由标识位置确定的第二组对边长度相等时,像平面与标识平面平行;当由标识位置确定的第一组对边长度和第二组对边长度中的任一组对边长度不相等时,像平面与标识平面相交。When the lengths of the first group of opposite sides determined by the marking position are equal, and the lengths of the second group of opposite sides determined by the marking position are equal, the image plane is parallel to the marking plane; when the length of the first group of opposite sides determined by the marking position and the second When the lengths of any one of the two sets of opposite sides are not equal, the image plane intersects the logo plane.
在本实施例一实施方案中,四个定位标识在排列方向上依次包括第一定位标识、第二定位标识、第三定位标识和第四定位标识。In the first implementation of this embodiment, the four positioning marks sequentially include the first positioning mark, the second positioning mark, the third positioning mark and the fourth positioning mark in the arrangement direction.
可选的,根据标识位置,采用两点间距离算法可确定第一定位标识与第二定位标识之间的第一成像距离、第二定位标识与第三定位标识之间的第二成像距离、第三定位标识与第四定位标识之间的第三成像距离以及第四定位标识与第一定位标识之间的第四成像距离。其中,第一成像距离和第三成像距离对应的边为第一组对边,第二成像距离和第四成像距离对应的边为第二组对边。由此,当第一成像距离与第三成像距离相等,且第二成像距离与第四成像距离相等时,像平面与标识平面平行;当第一成像距离与第三成像距离不相等时,或第二成像距离与第四成像距离不相等时,像平面与标识平面相交。。Optionally, according to the positions of the marks, the distance between two points algorithm can be used to determine the first imaging distance between the first positioning mark and the second positioning mark, the second imaging distance between the second positioning mark and the third positioning mark, A third imaging distance between the third positioning mark and the fourth positioning mark, and a fourth imaging distance between the fourth positioning mark and the first positioning mark. Wherein, the sides corresponding to the first imaging distance and the third imaging distance are the first group of opposite sides, and the sides corresponding to the second imaging distance and the fourth imaging distance are the second group of opposite sides. Thus, when the first imaging distance is equal to the third imaging distance, and the second imaging distance is equal to the fourth imaging distance, the image plane is parallel to the logo plane; when the first imaging distance is not equal to the third imaging distance, or When the second imaging distance is not equal to the fourth imaging distance, the image plane intersects the logo plane. .
可理解的,确定排列方向上相邻的第一定位标识与第二定位标识之间的第一成像距离,并依次确定排列方向上相邻的第二定位标识与第三定位标识之间的第二成像距离、第三定位标识与第四定位标识之间的第三成像距离以及第四定位标识与第一定位标识之间的第四成像距离,其中,第一定位标识与第二定位标识和第四定位标识相邻,第三定位标识与第二定位标识和第四定位标识相邻,第一定位标识不等同于第三定位标识;若第一成像距离与第三成像距离相等,且第二成像距离与第四成像距离相等时,像平面与标识平面平行,也就是说,摄像头可能放置在标识平面的正前方;若第一成像距离与第三成像距离不相等,和/或第二成像距离与第四成像距离不相等时,像平面与标识平面相交,也就是说,摄像头可能没有放置在标识平面的正前方,摄像头的镜头与标识平面有一定的倾斜角度,导致目标图像中四个定位标识之间的成像距离发生了改变,此时,采用现有技术 中的基于图像的测量方法就无法准确的确定标识平面内两个物点之间的距离。Understandably, the first imaging distance between the adjacent first positioning mark and the second positioning mark in the arrangement direction is determined, and the second imaging distance between the adjacent second positioning mark and the third positioning mark in the arrangement direction is sequentially determined. Two imaging distances, a third imaging distance between the third positioning mark and the fourth positioning mark, and a fourth imaging distance between the fourth positioning mark and the first positioning mark, wherein the first positioning mark and the second positioning mark and The fourth positioning mark is adjacent, the third positioning mark is adjacent to the second positioning mark and the fourth positioning mark, and the first positioning mark is not equal to the third positioning mark; if the first imaging distance is equal to the third imaging distance, and the second When the second imaging distance is equal to the fourth imaging distance, the image plane is parallel to the marking plane, that is to say, the camera may be placed directly in front of the marking plane; if the first imaging distance is not equal to the third imaging distance, and/or the second When the imaging distance is not equal to the fourth imaging distance, the image plane intersects the logo plane, that is to say, the camera may not be placed directly in front of the logo plane, and the lens of the camera has a certain inclination angle to the logo plane, resulting in four corners in the target image. The imaging distance between the two positioning marks has changed. At this time, the distance between the two object points in the marking plane cannot be accurately determined by using the image-based measurement method in the prior art.
示例性的,参见图6,610表示的是像平面612与标识平面611平行,也就是摄像头613放置在标识平面611的正前方,摄像头613在标识平面611中四个定位标识对角连线的焦点的正前方,也就是图中虚线与标识平面611垂直,摄像头613采集的平面可以看做像平面612,根据像平面612生成目标图像,像平面612包括的内容与目标图像相同,此时,四个定位标识之间确定的成像距离相等,可以将生成的目标图像看作是标识平面缩小后的图像。620表示的是像平面621与标识平面611相交,摄像头613的镜头与标识平面611存在倾斜角度,也就是摄像头613的主光轴与标识平面611不垂直,摄像头613对应的像平面621中四个定位标识的位置相对于标识平面611也发生了倾斜,此时,四个定位标识在目标图像中的位置相比较于标识平面中四个定位标识的位置发生了倾斜,按照固定比例无法精确的测量实际空间中物点之间的距离。Exemplarily, referring to FIG. 6 , 610 indicates that the image plane 612 is parallel to the marking plane 611, that is, the camera 613 is placed directly in front of the marking plane 611, and the camera 613 is positioned on the marking plane 611 on the diagonal line of the four positioning marks. Directly in front of the focus, that is, the dotted line in the figure is perpendicular to the logo plane 611. The plane collected by the camera 613 can be regarded as the image plane 612, and the target image is generated according to the image plane 612. The image plane 612 includes the same content as the target image. At this time, The imaging distances determined between the four positioning marks are equal, and the generated target image can be regarded as a reduced image of the mark plane. 620 indicates that the image plane 621 intersects with the logo plane 611, the lens of the camera 613 has an oblique angle to the logo plane 611, that is, the main optical axis of the camera 613 is not perpendicular to the logo plane 611, and four of the image planes 621 corresponding to the camera 613 The positions of the positioning marks are also inclined relative to the marking plane 611. At this time, the positions of the four positioning marks in the target image are inclined compared with the positions of the four positioning marks in the marking plane, and cannot be accurately measured according to a fixed ratio The distance between object points in real space.
S520:根据位置关系、第一位置、第二位置和第三位置,确定第一物点与第二物点之间的距离。S520: Determine the distance between the first object point and the second object point according to the positional relationship, the first location, the second location, and the third location.
可理解的,在上述S510的基础上,根据确定的像平面与标识平面的位置关系、目标图像中四个定位标识的第一位置、目标图像中第一像点的第二位置以及第二像点的第三位置,确定实际空间中第一物点与第二物点之间的距离,也就是说,不同的位置关系会对应不同的测量距离的方式。Understandably, on the basis of the above S510, according to the determined positional relationship between the image plane and the marker plane, the first positions of the four positioning markers in the target image, the second position of the first image point in the target image, and the second image The third position of the point determines the distance between the first object point and the second object point in the actual space, that is to say, different positional relationships correspond to different ways of measuring distance.
可选的,根据位置关系、第一位置、第二位置和第三位置,确定第一物点与第二物点之间的距离,应用于像平面与标识平面平行的情况,平行的位置关系具体参见图6中的610,具体包括以下步骤:Optionally, according to the positional relationship, the first position, the second position and the third position, the distance between the first object point and the second object point is determined, which is applied to the case where the image plane is parallel to the logo plane, and the parallel positional relationship Refer to 610 in FIG. 6 for details, which specifically includes the following steps:
S521:当像平面与标识平面平行时,根据第一位置,确定四个定位标识中任意两个定位标识之间的成像距离。S521: When the image plane is parallel to the marking plane, determine the imaging distance between any two positioning marks among the four positioning marks according to the first position.
可理解的,当像平面与标识平面平行时,根据目标图像中四个标识的第一位置,计算目标图像中任意两个定位标识之间的成像距离。Understandably, when the image plane is parallel to the marker plane, the imaging distance between any two positioning markers in the target image is calculated according to the first positions of the four markers in the target image.
示例性的,参见图6中610,根据目标图像中四个定位标识P 1’、P 2’、P 3’和P 4’的第一位置,可以确定P 1’和P 2’、P 1’和P 4’或P 1’和P 3’之间的成像距离,也可以分别确定P 2’和其他三个定位标识之间的成像距离,P 3’和P 4’亦和P 1’或P 2’同理计算成像距离。 Exemplarily, referring to 610 in FIG. 6 , according to the first positions of the four positioning marks P 1 ′, P 2 ′, P 3 ′, and P 4 ′ in the target image, P 1 ′, P 2 ′, and P 1 can be determined ' and P 4 ' or the imaging distance between P 1 ' and P 3 ', and the imaging distance between P 2 ' and the other three positioning marks can also be determined respectively, P 3 ' and P 4 ' and P 1 ' Or P 2 ' calculates the imaging distance similarly.
S522:根据第二位置和第三位置,确定第一像点和第二像点之间的距离。S522: Determine the distance between the first image point and the second image point according to the second position and the third position.
可理解的,根据目标图像中第一像素点的第二位置和第二像素点的第三位置,确定第一像素点和第二像素点之间的距离。Understandably, the distance between the first pixel and the second pixel is determined according to the second position of the first pixel and the third position of the second pixel in the target image.
S523:根据任意两个定位标识之间的成像距离和第一像点和第二像点之间的距离,并结合成像原理,确定第一物点与第二物点之间的距离。S523: Determine the distance between the first object point and the second object point according to the imaging distance between any two positioning marks and the distance between the first image point and the second image point, and in combination with the imaging principle.
可选的,第一物点与第二物点之间的距离所满足的关系式包含:任意两个定位标识的实际距离和任意两个定位标识之间的成像距离的比值,与第一像点和第二像点之间的距离的乘积。Optionally, the relational expression satisfied by the distance between the first object point and the second object point includes: the ratio of the actual distance between any two positioning marks and the imaging distance between any two positioning marks, and the first image The product of the distance between the point and the second image point.
可理解的,成像原理主要应用的是小孔成像的原理,具体的成像公式如公式(1)所示。It can be understood that the imaging principle mainly applies the principle of pinhole imaging, and the specific imaging formula is shown in formula (1).
Figure PCTCN2021102454-appb-000001
Figure PCTCN2021102454-appb-000001
其中,H为物高,D为物距,即摄像头与拍摄目标的距离,f为镜头焦距,h为像高。Among them, H is the object height, D is the object distance, that is, the distance between the camera and the shooting target, f is the focal length of the lens, and h is the image height.
可理解的,对于第一像点和第二像点之间的距离,若第一像点与第二像点连接的直线与目标图像的任一条边平行,则可以采用像素点计算距离,即计算第一像点与第二像点连接的直线占用的像素点数与像素点的边长的乘积;若第一像点与第二像点连接的直线与目标图像的任一条边均不平行,则直接测量目标图像中第一像点与第二像点连接的直线的长度。Understandably, for the distance between the first image point and the second image point, if the straight line connecting the first image point and the second image point is parallel to any side of the target image, then the distance can be calculated using pixels, that is Calculate the product of the number of pixels occupied by the straight line connecting the first pixel and the second pixel and the side length of the pixel; if the straight line connecting the first pixel and the second pixel is not parallel to any side of the target image, Then directly measure the length of the straight line connecting the first image point and the second image point in the target image.
可理解的,在上述S521和S522的基础上,实际空间中第一物点与第二物点之间的距离和目标图像中第一像点和第二像点之间的距离的比值,等于实际空间中任意两个定位标识的实际距离和目标图像中任意两个定位标识之间的成像距离的比值。Understandably, on the basis of the above S521 and S522, the ratio of the distance between the first object point and the second object point in the actual space to the distance between the first image point and the second image point in the target image is equal to The ratio of the actual distance between any two positioning marks in the actual space and the imaging distance between any two positioning marks in the target image.
示例性的,若目标图像中第一像点M’和第二像点N’之间的距离记为M’N’,实际空间中第一物点M与第二物点N之间的距离记为MN,实际空间中P 1和P 2两个定位标识的实际距离记为W,目标图像中P 1’和P 2’两个定位标识的成像距离记为W’,实际空间中第一物点M与第二物点N之间的距离MN可以采用公式(2)计算。 Exemplarily, if the distance between the first image point M' and the second image point N' in the target image is denoted as M'N', the distance between the first object point M and the second object point N in the actual space Denoted as MN, the actual distance between the two positioning marks P 1 and P 2 in the actual space is denoted as W, the imaging distance between the two positioning marks P 1 ' and P 2 ' in the target image is denoted as W', the first The distance MN between the object point M and the second object point N can be calculated using formula (2).
Figure PCTCN2021102454-appb-000002
Figure PCTCN2021102454-appb-000002
本公开实施例所提供的一种基于图像的测距方法,能够准确的确定目标图像所在的像平面与实际空间中的表示图像的位置关系,并根据不同的位置关系采用不同的测量方法确定物点之间的距离,能够适用于多种应用场景,并准确的计算出物点之间的距离,且便于实施。The image-based ranging method provided by the embodiments of the present disclosure can accurately determine the positional relationship between the image plane where the target image is located and the representation image in the actual space, and use different measurement methods to determine the distance between objects according to different positional relationships. The distance between points can be applied to a variety of application scenarios, and the distance between object points can be accurately calculated, and it is easy to implement.
在一个实施例中,如图7所示,提供了一种基于图像的测距方法,可选的,根据位置关系、第一位置、第二位置和第三位置,确定第一物点与第二物点之间的距离,应用于像平面与标识平面相交的情况,相交的位置关系具体参见图6中的620,具体包括以下步骤:In one embodiment, as shown in FIG. 7 , an image-based ranging method is provided. Optionally, according to the positional relationship, the first position, the second position and the third position, the first object point and the second The distance between two object points is applied to the situation where the image plane intersects with the logo plane, and the intersecting positional relationship is specifically referred to at 620 in Fig. 6, which specifically includes the following steps:
可选的,四个定位标识在排列方向上依次包括第一定位标识、第二定位标识、第三定位标识和第四定位标识。Optionally, the four positioning marks sequentially include a first positioning mark, a second positioning mark, a third positioning mark and a fourth positioning mark in the arrangement direction.
可理解的,第一位置包括第一定位标识对应的第一子位置、第二定位标识对应的第二子位置、第三定位标识对应的第三子位置和第四定位标识对应的第四子位置。Understandably, the first position includes the first sub-position corresponding to the first positioning mark, the second sub-position corresponding to the second positioning mark, the third sub-position corresponding to the third positioning mark, and the fourth sub-position corresponding to the fourth positioning mark. Location.
示例性的,参见图6,第一定位标识、第二定位标识、第三定位标识和第四定位标识可以分别记为P 1’、P 2’、P 3’和P 4’。 Exemplarily, referring to FIG. 6 , the first positioning mark, the second positioning mark, the third positioning mark and the fourth positioning mark can be marked as P 1 ′, P 2 ′, P 3 ′, and P 4 ′, respectively.
S710:当像平面与标识平面相交时,根据第一位置,确定第一投影角度和第二投影角度。S710: When the image plane intersects the identification plane, determine a first projection angle and a second projection angle according to the first position.
可理解的,当像平面与标识平面相交时,像平面和标识平面存在一个相交的角度,可以将相交的角度分解为独立计算的两种情况,根据目标图像中四个定位标识的第一位置,分别确定第一投影角度和第二投影角度,即经过第一投影角度和第二投影角度的变换,像平面与标识平面为平行的情况,其中,第一投影角度和第二投影角度可以为锐角。It can be understood that when the image plane intersects the logo plane, there is an intersecting angle between the image plane and the logo plane, and the intersecting angle can be decomposed into two cases of independent calculation, according to the first positions of the four positioning marks in the target image , respectively determine the first projection angle and the second projection angle, that is, after the transformation of the first projection angle and the second projection angle, the image plane is parallel to the logo plane, wherein the first projection angle and the second projection angle can be acute angle.
可选的,标识平面绕第一预设直线旋转第二投影角度,且绕第二预设直线旋转第一投影角度后,与像平面平行,第一预设直线经过物空间中的第一定位标识和第三定位标识,第二预设直线经过物空间中的第二定位标识和第四定位标识。Optionally, the logo plane is rotated around the first preset straight line by the second projection angle, and after being rotated around the second preset straight line by the first projection angle, parallel to the image plane, the first preset straight line passes through the first position in the object space mark and the third position mark, the second preset straight line passes through the second position mark and the fourth position mark in the object space.
示例性的,参见图8,图8为距离测量的示意图,标识平面611绕第一预设直线P 1P 3旋转第二投影角度β,绕第二预设直线P 2P 4旋转第一投影角度α之后,标 识平面与像平面平行,图8所示的剖面图710为标识平面611绕第一预设直线P 1P 3旋转第二投影角度β得到的,其中,OP为过标识平面中心点C的直线且与过中心点C和镜头中心L的直线垂直,α为第一投影角度。 For example, see Fig. 8, Fig. 8 is a schematic diagram of distance measurement, the logo plane 611 rotates around the first preset straight line P 1 P 3 by the second projection angle β, and rotates the first projection around the second preset straight line P 2 P 4 After the angle α, the logo plane is parallel to the image plane. The cross-sectional view 710 shown in FIG. 8 is obtained by rotating the logo plane 611 around the first preset straight line P 1 P 3 by the second projection angle β, wherein OP is the center of the logo plane The straight line at point C is perpendicular to the straight line passing through center point C and lens center L, and α is the first projection angle.
可选的,根据第一位置,确定第一投影角度和第二投影角度,包括:根据第一位置,确定目标图像中的第一定位标识、第二定位标识、第三定位标识和第四定位标识分别到标识成像中心的第一距离、第二距离、第三距离和第四距离;根据第二距离和第四距离,确定第一投影角度;根据第一距离和第三距离,确定第二投影角度。具体的,通过如下公式(3)-(16)计算得到第一投影角度以及第二投影角度,以图8中标记的符号进行说明。Optionally, determining the first projection angle and the second projection angle according to the first position includes: determining the first positioning mark, the second positioning mark, the third positioning mark and the fourth positioning mark in the target image according to the first position Mark the first distance, the second distance, the third distance and the fourth distance from the mark imaging center respectively; according to the second distance and the fourth distance, determine the first projection angle; according to the first distance and the third distance, determine the second projection angle. Specifically, the first projection angle and the second projection angle are calculated by the following formulas (3)-(16), which are described with symbols marked in FIG. 8 .
结合图8和成像公式可以得到公式(3)和公式(4)。Combining Fig. 8 and the imaging formula, formula (3) and formula (4) can be obtained.
Figure PCTCN2021102454-appb-000003
Figure PCTCN2021102454-appb-000003
其中,O点为摄像头L与第二定位标识P 2连接的直线LP 2和过中线点C且与直线CL垂直的直线的交点,P为摄像头与第四定位标识P 4连接的直线的延长线LP 4与过中线点C且与直线CL垂直的直线的交点,D为中心点C与摄像头中心L的距离,C’为目标图像中P 1’和P 3’的连线与P 2’和P 4’的连线的交点,A' 2为C’与P2’之间的距离,f为摄像头的焦距。 Wherein, point O is the intersection of the straight line LP 2 connecting the camera L with the second positioning mark P 2 and the straight line passing through the midline point C and perpendicular to the straight line CL, and P is the extension of the straight line connecting the camera and the fourth positioning mark P 4 The intersection point of LP 4 and the straight line passing through the center line point C and perpendicular to the straight line CL, D is the distance between the center point C and the camera center L, C' is the connection line between P 1 ' and P 3 ' in the target image and P 2 ' and The intersection point of the line connecting P 4 ', A' 2 is the distance between C' and P2', and f is the focal length of the camera.
Figure PCTCN2021102454-appb-000004
Figure PCTCN2021102454-appb-000004
其中,A' 4为C’与P 4’之间的距离。 Among them, A' 4 is the distance between C' and P 4 '.
结合图8和三角几何关系可以得到公式(5)至公式(10)。Combined with Fig. 8 and the triangular geometric relationship, formula (5) to formula (10) can be obtained.
P 2C=A           公式(5) P 2 C=A formula (5)
其中,A为标识平面内第二定位标识P 2与中心点C的距离。 Wherein, A is the distance between the second positioning mark P2 and the center point C in the mark plane.
P 4C=A          公式(6) P 4 C=A formula (6)
其中,在标识平面内任一定位标识到中心点C的距离均相等为A。Wherein, the distance from any positioning mark to the center point C in the mark plane is equal to A.
P 2M=A×cosα  公式(7) P 2 M=A×cosα formula (7)
其中,P 2M与MC垂直,且P 2M与P 2C的夹角为第一投影交α。 Wherein, P 2 M is perpendicular to MC, and the angle between P 2 M and P 2 C is the first projection intersection α.
P 4N=A×cosα  公式(8) P 4 N=A×cosα formula (8)
其中,P 4N与CL垂直,且P 4N与P 4C的夹角为第一投影交α。 Wherein, P 4 N is perpendicular to CL, and the angle between P 4 N and P 4 C is the first projection intersection α.
MC=A×sinα  公式(9)MC=A×sinα formula (9)
NC=A×sinα   公式(10) NC=A×sinα Formula (10)
根据由P 2ML组成的三角形与由OCL组成的三角形相似,可以得到公式(11)。 According to the similarity between the triangle formed by P 2 ML and the triangle formed by OCL, formula (11) can be obtained.
Figure PCTCN2021102454-appb-000005
Figure PCTCN2021102454-appb-000005
结合上述公式(3)、公式(7)、公式(9)和公式(11),得到如下公式(12)。Combining the above formula (3), formula (7), formula (9) and formula (11), the following formula (12) is obtained.
Figure PCTCN2021102454-appb-000006
Figure PCTCN2021102454-appb-000006
根据由P 4NL组成的三角形与由PCL组成的三角形相似,可以得到公式(13)。 According to the similarity between the triangle formed by P 4 NL and the triangle formed by PCL, formula (13) can be obtained.
Figure PCTCN2021102454-appb-000007
Figure PCTCN2021102454-appb-000007
结合上述公式(4)、公式(8)、公式(10)和公式(12),得到如下公式(14)。Combining the above formula (4), formula (8), formula (10) and formula (12), the following formula (14) is obtained.
Figure PCTCN2021102454-appb-000008
Figure PCTCN2021102454-appb-000008
根据公式(12)和公式(14),可以得到第一投影角度α的计算公式如下述公式(15)。According to the formula (12) and the formula (14), the calculation formula of the first projection angle α can be obtained as the following formula (15).
Figure PCTCN2021102454-appb-000009
Figure PCTCN2021102454-appb-000009
其中,α表示第一投影角度,A' 2表示在目标图像中第二定位标识到标识成像中心的距离,A' 4表示在目标图像中第四定位标识到标识成像中心的距离,f表示摄像头的焦距,标识成像中心为在目标图像中四个定位标识对角连线的交点。 Wherein, α represents the first projection angle, A'2 represents the distance from the second positioning mark to the mark imaging center in the target image, A'4 represents the distance from the fourth position mark to the mark imaging center in the target image, and f represents the camera The focal length of , mark the imaging center as the intersection of the diagonal lines connecting the four positioning marks in the target image.
可选的,第二投影角度β的计算方式与第一投影角度α的原理相同,在此不作赘述,第二投影角度β的计算公式如下式公式(16)。Optionally, the calculation method of the second projection angle β is the same as that of the first projection angle α, which is not repeated here. The calculation formula of the second projection angle β is as follows: formula (16).
Figure PCTCN2021102454-appb-000010
Figure PCTCN2021102454-appb-000010
其中,β表示第二投影角度,A' 1表示在目标图像中第一定位标识到标识成像中心的距离,A' 3表示在目标图像中第三定位标识到标识成像中心的距离。 Wherein, β represents the second projection angle, A'1 represents the distance from the first positioning mark to the mark imaging center in the target image, and A'3 represents the distance from the third position mark to the mark imaging center in the target image.
S720:根据第一位置和第一投影角度,确定物距;或者,根据第一位置和第二投影角度,确定物距。S720: Determine the object distance according to the first position and the first projection angle; or determine the object distance according to the first position and the second projection angle.
可理解的,在上述S710的基础上,根据目标图像中的第一位置以及像平面投影到标识平面的第一投影角度,确定物距,其中,物距是指摄像头的镜头中心到标识平面上的四个定位标识的中心的距离,中心是四个定位标识对角连线的交点。It can be understood that on the basis of the above S710, the object distance is determined according to the first position in the target image and the first projection angle of the image plane projected onto the identification plane, wherein the object distance refers to the center of the lens of the camera to the identification plane The distance between the centers of the four positioning marks, the center is the intersection point of the diagonal lines connecting the four positioning marks.
示例性的,参见图6中610,610中的虚线的长度即为摄像头613的镜头中心到标识平面摄像头的镜头中心到标识平面上的四个定位标识四个定位标识对角连线的交点的距离。For example, refer to 610 in FIG. 6 , the length of the dotted line in 610 is the intersection point of the diagonal line connecting the four positioning marks on the marking plane from the lens center of the camera 613 to the lens center of the camera on the marking plane and the four positioning markings on the marking plane. distance.
可选的,根据第二距离、第四距离和包含第一投影角度的余弦值,确定物距。具体的,根据第一位置和第一投影角度,确定物距,物距的计算公式如下述公式(17)。Optionally, the object distance is determined according to the second distance, the fourth distance and a cosine value including the first projection angle. Specifically, the object distance is determined according to the first position and the first projection angle, and the calculation formula of the object distance is as the following formula (17).
Figure PCTCN2021102454-appb-000011
Figure PCTCN2021102454-appb-000011
其中,D表示物距,A表示在物空间中定位标识到标识中心的距离,A′ 2表示在目标图像中第二定位标识到标识成像中心的距离,A′ 4表示在目标图像中第四定位标识到标识成像中心的距离,f表示摄像头的焦距,α表示第一投影角度,标识中心为在物空间中四个定位标识对角连线的交点,标识成像中心为在目标图像中四个定位标识对角连线的交点。 Among them, D represents the object distance, A represents the distance from the positioning mark to the mark center in the object space, A'2 represents the distance from the second positioning mark to the mark imaging center in the target image, and A'4 represents the fourth position mark in the target image The distance from the positioning mark to the mark imaging center, f represents the focal length of the camera, α represents the first projection angle, the mark center is the intersection point of the diagonal lines connecting the four positioning marks in the object space, and the mark imaging center is the four points in the target image Positioning identifies the intersection of diagonal lines.
可理解的,根据目标图像中四个定位标识P 1’、P 2’、P 3’和P 4’,得到A′ 1、A′ 2、A′ 3和A′ 4,并根据公式(15)计算得到的第一投影角α,得到实际空间中摄像头与标识平面中中心点的距离D。 Understandably, according to the four positioning marks P 1 ′, P 2 ′, P 3 ′ and P 4 ′ in the target image, A′ 1 , A′ 2 , A′ 3 and A′ 4 are obtained, and according to formula (15 ) to obtain the first projection angle α obtained by calculating the distance D between the camera and the central point of the logo plane in the actual space.
或者,根据第一距离、第三距离和包含第二投影角度的余弦值,确定物距。具体的,根据第一位置和第二投影角度,确定物距,物距的计算公式如下述公式(18)。Alternatively, the object distance is determined according to the first distance, the third distance and a cosine value including the second projection angle. Specifically, the object distance is determined according to the first position and the second projection angle, and the calculation formula of the object distance is as the following formula (18).
Figure PCTCN2021102454-appb-000012
Figure PCTCN2021102454-appb-000012
其中,D表示物距,A表示在物空间中定位标识到标识中心的距离,A' 1表示在目标图像中第一定位标识到标识成像中心的距离,A' 3表示在目标图像中第三定位标识到标识成像中心的距离,f表示摄像头的焦距,β表示第二投影角度,标识中心为在物空间中四个定位标识对角连线的交点,标识成像中心为在目标图像中四个定位标识对角连线的交点。 Among them, D represents the object distance, A represents the distance from the positioning mark to the mark center in the object space, A'1 represents the distance from the first positioning mark to the mark imaging center in the target image, and A'3 represents the third position mark in the target image The distance between the positioning mark and the mark imaging center, f represents the focal length of the camera, β represents the second projection angle, the mark center is the intersection point of the diagonal lines connecting the four positioning marks in the object space, and the mark imaging center is the four points in the target image Positioning identifies the intersection of diagonal lines.
可理解的,根据第一投影角度或第二投影角度均可得到实际空间中摄像头与标识平面中中心点的距离。Understandably, the distance between the camera and the central point of the logo plane in the actual space can be obtained according to the first projection angle or the second projection angle.
S730:根据第一位置、第二位置、第三位置、第一投影角度、第二投影角度和物距,确定第一物点的位置和第二物点的位置。S730: Determine the position of the first object point and the position of the second object point according to the first position, the second position, the third position, the first projection angle, the second projection angle, and the object distance.
可理解的,根据目标图像中四个定位标识的第一位置、第一像素点的第二位置、第二像素点的第三位置、像平面与标识平面对应的第一投影角度和第二投影角度以及摄像头的镜头中心到标识平面中的中心的物距,计算得到实际空间中第一物点的位置和第二物点的位置。Understandably, according to the first position of the four positioning marks in the target image, the second position of the first pixel point, the third position of the second pixel point, the first projection angle and the second projection angle corresponding to the image plane and the mark plane The angle and the object distance from the lens center of the camera to the center in the marked plane are calculated to obtain the position of the first object point and the position of the second object point in the actual space.
S740:根据第一物点的位置和第二物点的位置,确定第一物点与第二物点之间的距离。S740: Determine the distance between the first object point and the second object point according to the position of the first object point and the position of the second object point.
可理解的,在上述S730的基础上,根据实际空间中第一物点的位置和第二物点的位置,得到第一物点与第二物点之间的距离,具体计算公式可以如下述公式(19)所示。Understandably, on the basis of the above S730, according to the position of the first object point and the position of the second object point in the actual space, the distance between the first object point and the second object point is obtained, and the specific calculation formula can be as follows Formula (19) shows.
Figure PCTCN2021102454-appb-000013
Figure PCTCN2021102454-appb-000013
其中,|MN|为实际空间中第一物点与第二物点之间的距离,第一物点和第二物点在实际空间中的位置分别为(x m,y m)和(x n,y n)。 Among them, |MN| is the distance between the first object point and the second object point in the actual space, and the positions of the first object point and the second object point in the actual space are (x m , y m ) and (x n ,y n ).
本公开实施例提供的一种基于图像的测距方法,根据目标图像中四个定位标识的第一位置确定两个投影角度,便于处理像平面与标识平面相交的情况,不需要测量即可根据投影角度确定物距,即摄像头的中心到标识中心的距离,方法简便,便于实施。An image-based ranging method provided by an embodiment of the present disclosure determines two projection angles according to the first positions of the four positioning marks in the target image, which is convenient for handling the intersection of the image plane and the marking plane, and can be used without measurement. The projection angle determines the object distance, that is, the distance from the center of the camera to the center of the mark, and the method is simple and easy to implement.
在一个实施例中,如图9所示,提供了一种基于图像的测距方法,可选的,根据第一位置、第二位置、第三位置、第一投影角度、第二投影角度和物距,确定第一物点的位置和第二物点的位置,包括如图9所示的以下步骤:In one embodiment, as shown in FIG. 9 , an image-based ranging method is provided. Optionally, according to the first position, the second position, the third position, the first projection angle, the second projection angle and The object distance is to determine the position of the first object point and the position of the second object point, including the following steps as shown in Figure 9:
S910:根据第一位置、第二位置和第三位置,确定第一像点的第一像点投影长度组以及第二像点的第二像点投影长度组。S910: According to the first position, the second position and the third position, determine a first pixel projection length group of the first pixel and a second pixel projection length group of the second pixel.
其中,第一像点投影长度组和第二像点投影长度组均包括对应的像点分别到第一虚拟直线和第二虚拟直线的距离,第一虚拟直线经过目标图像中的第一定位标识和第三定位标识,第二虚拟直线经过目标图像中的第二定位标识和第四定位标识。Wherein, the first image point projection length group and the second image point projection length group both include the distances from the corresponding image point to the first virtual straight line and the second virtual straight line respectively, and the first virtual straight line passes through the first positioning mark in the target image and the third positioning mark, the second virtual straight line passes through the second positioning mark and the fourth positioning mark in the target image.
在本实施例一实施方案中,根据第一位置和第二位置,确定第一像点的第一像点投影长度组,并根据第一位置和第三位置,确定第二像点的第二像点投影长度组。In the first embodiment of this embodiment, according to the first position and the second position, the first pixel projection length group of the first pixel is determined, and according to the first position and the third position, the second pixel projection length group of the second pixel is determined. Image point projection length group.
可选的,第一像点投影长度组包括像点第一投影长度和像点第二投影长度,像点第一投影长度为第一像点在第一虚拟直线上的垂直投影到标识成像中心的距离,像点第二投影长度为第一像点在第二虚拟直线上的垂直投影到标识成像中心的距离,第二像点投影长度组包括像点第三投影长度和像点第四投影长度,像点第三投影长度为第二像点在第一虚拟直线上的垂直投影到标识成像中心的距离,像点第四投影长度为第二像点在第二虚拟直线上的垂直投影到标识成像中心的距离,第一虚拟直线经过目标图像中的第一定位标识和第三定位标识,第二虚拟直线经过目标图像中的第二定位标识和第四定位标识。Optionally, the first image point projection length group includes the first image point projection length and the image point second projection length, and the image point first projection length is the vertical projection of the first image point on the first virtual straight line to the identified imaging center The second projection length of the image point is the distance from the vertical projection of the first image point on the second virtual straight line to the center of the marked imaging. The second image point projection length group includes the third projection length of the image point and the fourth projection length of the image point length, the third projected length of the image point is the distance from the vertical projection of the second image point on the first virtual straight line to the center of the logo imaging, and the fourth projected length of the image point is the vertical projection of the second image point on the second virtual straight line to Identify the distance of the imaging center, the first virtual straight line passes through the first positioning mark and the third positioning mark in the target image, and the second virtual straight line passes through the second positioning mark and the fourth positioning mark in the target image.
示例性的,参见图8,在实际空间中的标识平面上随机确定物点T,T’为物点对应的像平面内的像点,物点T在标识平面中不相邻定位标识P 1P 3和P 2P 4上的投影记为T 1和T 2,像点T’在像平面中与物点T对应的投影记为T′ 1和T′ 2,其中,T′T′ 1平行于C′P′ 4及T′T′ 2平行于C′P′ 3,若第一像点或第二像点为像点T’,第一投影长度或第三投影长度为C’T 1’,第一虚拟直线为P 1’P 3’,第二投影长度或第四投影长度为C’T 2’,第二虚拟直线为P 2’P 4’。 Exemplarily, referring to Fig. 8, the object point T is randomly determined on the identification plane in the actual space, T' is an image point in the image plane corresponding to the object point, and the object point T is not adjacent to the identification plane in the identification plane. The projections on P 3 and P 2 P 4 are denoted as T 1 and T 2 , and the projections of the image point T' corresponding to the object point T in the image plane are denoted as T′ 1 and T′ 2 , where T′T′ 1 Parallel to C'P' 4 and T'T' 2 parallel to C'P' 3 , if the first image point or the second image point is the image point T', the first projection length or the third projection length is C'T 1 ', the first virtual straight line is P 1 'P 3 ', the second projected length or the fourth projected length is C'T 2 ', and the second virtual straight line is P 2 'P 4 '.
可选的,根据第一位置,确定标识成像中心的位置;根据第二位置和第三位置,分别确定对应的像点到第一虚拟直线以及第二虚拟直线的垂直投影;根据垂直投影到标识成像中心的距离,确定第一像点投影长度组和第二像点投影长度组。确定第一像点投影长度组或第二像点投影长度组具体包括如下步骤:Optionally, according to the first position, determine the position of the marked imaging center; according to the second position and the third position, respectively determine the vertical projection of the corresponding image point to the first virtual straight line and the second virtual straight line; according to the vertical projection to the marked The distance of the imaging center determines the first image point projection length group and the second image point projection length group. Determining the first image point projection length group or the second image point projection length group specifically includes the following steps:
S911:根据第一位置,确定标识成像中心的位置。S911: Determine the position of the marked imaging center according to the first position.
可理解的,根据目标图像中四个定位标识的第一位置,确定不相邻的定位标识连接的直线相交所得到的标识成像中心的位置。Understandably, according to the first positions of the four positioning marks in the target image, the position of the marking imaging center obtained by the intersection of straight lines connecting non-adjacent positioning marks is determined.
示例性的,根据P 1’和P 3’,P 4’和P 2’连接的直线确定目标图像的标识成像中心C’,进一步,根据P 1’,P 2’,P 3’,P 4’对应的位置确定C’的位置。 Exemplarily, according to the straight line connecting P 1 'and P 3 ', P 4 'and P 2 'determines the identification imaging center C' of the target image, further, according to P 1 ', P 2 ', P 3 ', P 4 The corresponding position of 'determines the position of C'.
S912:以标识成像中心的位置为原点,建立直角坐标系。S912: Establish a Cartesian coordinate system with the position of the marked imaging center as the origin.
可理解的,在上述S911的基础上,以标识成像中心C’的位置为原点,建立直 角坐标系,以水平方向为X轴,过C’的纵向方向为Y轴。Understandably, on the basis of the above S911, a Cartesian coordinate system is established with the position of the marked imaging center C' as the origin, with the horizontal direction as the X axis and the longitudinal direction passing through C' as the Y axis.
S913:根据第一位置,在直角坐标系中确定第一定位标识的第一标识坐标、第二定位标识的第二标识坐标、第三定位标识的第三标识坐标和第四定位标识的第四标识坐标,并根据第二位置,确定第一像点的第一像点坐标,以及根据第三位置,确定第二像点的第二像点坐标。S913: According to the first position, determine the first marker coordinates of the first positioning marker, the second marker coordinates of the second marker, the third marker coordinates of the third marker, and the fourth marker coordinates of the fourth marker in the Cartesian coordinate system. Identify the coordinates, and determine the first image point coordinates of the first image point according to the second position, and determine the second image point coordinates of the second image point according to the third position.
可理解的,在上述S912的基础上,根据确定的直角坐标系,重新确定目标图像中四个定位标识的第一位置,四个定位标识的位置分别为第一定位标识的第一标识坐标、第二定位标识的第二标识坐标、第三定位标识的第三标识坐标和第四定位标识的第四标识坐标,同时,重新确定第一像点的第一像点坐标以及第二像点的第二像点坐标,其中,随机选取的像点T’可以为第一像点或第二像点。It can be understood that on the basis of the above S912, according to the determined Cartesian coordinate system, the first positions of the four positioning marks in the target image are re-determined, and the positions of the four positioning marks are respectively the first identification coordinates of the first positioning marks, The second identification coordinates of the second positioning identification, the third identification coordinates of the third positioning identification and the fourth identification coordinates of the fourth positioning identification, at the same time, re-determine the first image point coordinates of the first image point and the second image point The coordinates of the second image point, wherein the randomly selected image point T' can be the first image point or the second image point.
S914:根据第一标识坐标或者第三标识坐标,确定第一虚拟直线的第一直线方程,根据第二标识坐标或者第四标识坐标,确定第二虚拟直线的第二直线方程。S914: Determine a first straight line equation of the first virtual straight line according to the first identified coordinates or the third identified coordinates, and determine a second straight line equation of the second virtual straight line according to the second identified coordinates or the fourth identified coordinates.
可理解的,根据第一标识坐标或者第三标识坐标中任一标识和标识成像中心,确定第一虚拟直线的第一直线方程,其中,第一虚拟直线经过第一标识坐标、第三标识坐标和标识成像中心,第一虚拟直线的第一直线方程的计算公式如下公式(20)所示。Understandably, the first line equation of the first virtual straight line is determined according to any one of the first marked coordinates or the third marked coordinates and the marked imaging center, wherein the first virtual straight line passes through the first marked coordinates, the third marked coordinates, Coordinates and mark the imaging center, the calculation formula of the first straight line equation of the first virtual straight line is shown in the following formula (20).
Figure PCTCN2021102454-appb-000014
Figure PCTCN2021102454-appb-000015
Figure PCTCN2021102454-appb-000014
or
Figure PCTCN2021102454-appb-000015
其中,第一虚拟直线为过C′P′ 3P′ 1的直线,P′ 1,P′ 2,P′ 3,P′ 4在目标图像中对应的坐标点可以记为(x′ 1,y′ 1),(x′ 2,y′ 2),(x′ 3,y′ 3),(x′ 4,y′ 4),T′的图像坐标为(x′ t,y′ t)。 Among them, the first virtual straight line is a straight line passing through C′P′ 3 P′ 1 , and the corresponding coordinate points of P′ 1 , P′ 2 , P′ 3 , and P′ 4 in the target image can be written as (x′ 1 , y′ 1 ),(x′ 2 ,y′ 2 ),(x′ 3 ,y′ 3 ),(x′ 4 ,y′ 4 ), the image coordinates of T′ are (x′ t ,y′ t ) .
可理解的,根据第二标识坐标或者第四标识坐标中任一标识与标识成像中心,确定第二虚拟直线的第二直线方程,其中,第二虚拟直线经过第二标识坐标、第四标识坐标和标识成像中心,第二虚拟直线的第二直线方程的计算公式如下述公式(21)所示。Understandably, the second line equation of the second virtual straight line is determined according to any one of the second logo coordinates or the fourth logo coordinates and the logo imaging center, wherein the second virtual straight line passes through the second logo coordinates, the fourth logo coordinates and identify the imaging center, the calculation formula of the second line equation of the second virtual line is shown in the following formula (21).
Figure PCTCN2021102454-appb-000016
Figure PCTCN2021102454-appb-000017
Figure PCTCN2021102454-appb-000016
or
Figure PCTCN2021102454-appb-000017
其中,第二虚拟直线为过C′P′ 4P′ 2的直线。 Wherein, the second virtual straight line is a straight line passing through C′P′ 4 P′ 2 .
S915:根据第一像点坐标,确定经过第一像点且平行于第一虚拟直线的第三直线方程,以及经过第一像点且平行于第二虚拟直线的第四直线方程,并根据第二像点坐标,确定经过第二像点且平行于第一虚拟直线的第五直线方程,以及经过第二像点且平行于第二虚拟直线的第六直线方程。S915: According to the coordinates of the first image point, determine the third line equation passing through the first image point and parallel to the first virtual straight line, and the fourth line equation passing through the first image point and parallel to the second virtual straight line, and according to the first image point The coordinates of the two image points determine the fifth line equation passing through the second image point and parallel to the first virtual straight line, and the sixth line equation passing through the second image point and parallel to the second virtual straight line.
示例性的,参见图8,第三直线方程为过T′和T′ 2且平行于C′P′ 3的直线,第三直线方程的计算公式如下述公式(22)所示。 Exemplarily, referring to FIG. 8, the third line equation is a line passing through T' and T'2 and parallel to C'P'3, and the calculation formula of the third line equation is shown in the following formula (22).
Figure PCTCN2021102454-appb-000018
Figure PCTCN2021102454-appb-000018
其中,将(x′ t,y′ t)看作是第一像素点的坐标即可得到第三直线方程,将(x′ t,y′ t)看作是第二像点的坐标即可得到第五直线方程。 Among them, regard (x′ t , y′ t ) as the coordinates of the first pixel point to obtain the third line equation, and regard (x′ t , y′ t ) as the coordinates of the second pixel point. Get the equation of the fifth straight line.
示例性的,参见图8,第四直线方程为过T′和T′ 1且平行于C′P′ 4的直线,第四直线方程的计算公式如下述公式(23)所示。 Exemplarily, referring to FIG. 8, the fourth straight line equation is a straight line passing through T' and T'1 and parallel to C'P'4, and the calculation formula of the fourth straight line equation is shown in the following formula (23).
Figure PCTCN2021102454-appb-000019
Figure PCTCN2021102454-appb-000019
其中,将(x′ t,y′ t)看作是第一像素点的坐标即可得到第四直线方程,将(x′ t,y′ t)看作是第二像点的坐标即可得到第六直线方程。 Among them, regard (x′ t , y′ t ) as the coordinates of the first pixel point to obtain the fourth line equation, and regard (x′ t , y′ t ) as the coordinates of the second pixel point. Get the equation of the sixth line.
S916:根据第一直线方程和第四直线方程,确定第一像点垂直投影到第一虚拟直线上的像点第一投影坐标,根据第二直线方程和第三直线方程,确定第一像点垂直投影到第二虚拟直线上的像点第二投影坐标,并根据第一直线方程和第六直线方程,确定第二像点垂直投影到第一虚拟直线上的像点第三投影坐标,根据第二直线方程和第五直线方程,确定第二像点垂直投影到第二虚拟直线上的像点第四投影坐标。S916: According to the first straight-line equation and the fourth straight-line equation, determine the first projection coordinates of the image point vertically projected onto the first virtual straight line, and determine the first image according to the second straight-line equation and the third straight-line equation The second projection coordinates of the image point vertically projected onto the second virtual straight line, and according to the first straight line equation and the sixth straight line equation, determine the third projection coordinates of the second image point vertically projected onto the first virtual straight line , according to the second straight line equation and the fifth straight line equation, determine the fourth projection coordinates of the second pixel vertically projected onto the second virtual straight line.
可理解的,第一直线方程和第四直线方程的交点即为第一像点垂直投影到第一虚拟直线上的像点第一投影坐标,第二直线方程和第三直线方程的交点即为第一像点垂直投影到第二虚拟直线上的像点第二投影坐标,第一直线方程和第六直线方程的交点即为第二像点垂直投影到第一虚拟直线上的像点第三投影坐标,第二直线方程和第五直线方程的交点即为第二像点垂直投影到第二虚拟直线上的像点第四投影坐标。It can be understood that the intersection of the first straight line equation and the fourth straight line equation is the first projection coordinate of the first image point vertically projected onto the first virtual straight line, and the intersection of the second straight line equation and the third straight line equation is is the second projection coordinate of the first image point vertically projected onto the second virtual straight line, and the intersection point of the first straight line equation and the sixth straight line equation is the second image point vertically projected onto the first virtual straight line The third projected coordinates, the intersection of the second straight line equation and the fifth straight line equation are the fourth projected coordinates of the image point vertically projected onto the second virtual straight line by the second image point.
示例性的,第一直线方程和第四直线方程的交点第一投影坐标记为T′ 1,T′ 1点的坐标记为(x′ t1,y′ t1),计算公式为如下公式(24)。 Exemplarily, the first projected coordinates of the intersection of the first line equation and the fourth line equation are marked as T′ 1 , and the coordinates of point T′ 1 are marked as (x′ t1 , y′ t1 ), and the calculation formula is as follows ( twenty four).
Figure PCTCN2021102454-appb-000020
Figure PCTCN2021102454-appb-000020
其中,将(x′ t,y′ t)看作是第一像素点的坐标即可得到第一投影坐标,将(x′ t,y′ t)看作是第二像点的坐标即可得到第三投影坐标。 Among them, (x′ t , y′ t ) can be regarded as the coordinates of the first pixel point to obtain the first projected coordinates, and (x′ t , y′ t ) can be regarded as the coordinates of the second pixel point Get the third projected coordinates.
示例性的,第二直线方程和第三直线方程的交点第二投影坐标记为T′ 2,T′ 2点的坐标记为(x′ t2,y′ t2),计算公式为如下公式(25)。 Exemplarily, the second projected coordinates of the intersection of the second line equation and the third line equation are marked as T′ 2 , and the coordinates of T′ 2 are marked as (x′ t2 , y′ t2 ), and the calculation formula is the following formula (25 ).
Figure PCTCN2021102454-appb-000021
Figure PCTCN2021102454-appb-000021
其中,将(x′ t,y′ t)看作是第一像素点的坐标即可得到第二投影坐标,将(x′ t,y′ t)看作是第二像点的坐标即可得到第四投影坐标。 Among them, regard (x′ t , y′ t ) as the coordinates of the first pixel point to obtain the second projection coordinates, and regard (x′ t , y′ t ) as the coordinates of the second pixel point. Get the fourth projected coordinates.
S917:根据像点第一投影坐标,确定像点第一投影长度,根据像点第二投影坐标,确定像点第二投影长度,并根据像点第三投影坐标,确定像点第三投影长 度,根据像点第四投影坐标,确定像点第四投影长度。S917: Determine the first projected length of the image point according to the first projected coordinates of the image point, determine the second projected length of the image point according to the second projected coordinates of the image point, and determine the third projected length of the image point according to the third projected coordinates of the image point , according to the fourth projection coordinates of the image point, determine the fourth projection length of the image point.
可理解的,根据像点第一投影坐标以及标识成像中心的坐标,得到像点第一投影长度,并分别根据像点第二投影坐标、像点第三投影坐标以及像点第四投影坐标和标识成像中心的坐标,得到对应的像点第二投影长度、像点第三投影长度和像点第四投影长度。Understandably, according to the first projected coordinates of the image point and the coordinates identifying the imaging center, the first projected length of the image point is obtained, and respectively according to the second projected coordinates of the image point, the third projected coordinates of the image point and the fourth projected coordinates of the image point and The coordinates of the imaging center are identified to obtain the corresponding second projected length of the image point, the third projected length of the image point and the fourth projected length of the image point.
示例性的,根据T′ 1点的坐标(x′ t1,y′ t1)得到像点第一投影长度,计算公式如下述公式(26)。 Exemplarily, the first projection length of the image point is obtained according to the coordinates (x' t1 , y' t1 ) of point T'1 , and the calculation formula is as the following formula (26).
Figure PCTCN2021102454-appb-000022
Figure PCTCN2021102454-appb-000022
示例性的,根据T′ 2点的坐标(x′ t2,y′ t2)得到像点第二投影长度,计算公式如下述公式(27)。 Exemplarily, the second projected length of the image point is obtained according to the coordinates (x' t2 , y' t2 ) of point T'2 , and the calculation formula is as the following formula (27).
Figure PCTCN2021102454-appb-000023
Figure PCTCN2021102454-appb-000023
其中,像点第三投影长度和像点第四投影长度也由上述公式得到,在此不作赘述。Wherein, the third projected length of the image point and the fourth projected length of the image point are also obtained by the above formula, which will not be repeated here.
S920:根据第一投影角度、第二投影角度、物距、第一像点投影长度组和第二像点投影长度组,确定第一物点的第一物点投影长度组以及第二物点的第二物点投影长度组。S920: Determine the first object point projection length group and the second object point of the first object point according to the first projection angle, the second projection angle, the object distance, the first image point projection length group, and the second image point projection length group The second object point projection length group for .
在本实施例一实施方案中,根据第一投影角度、第二投影角度、物距和第一像点投影长度组,确定第一物点的第一物点投影长度组,并根据第一投影角度、第二投影角度、物距和第二像点投影长度组,确定第二物点的第二物点投影长度组。第一物点投影长度组包括物点第一投影长度和物点第二投影长度,物点第一投影长度为第一物点在第一预设直线上的垂直投影到标识中心的距离,物点第二投影长度为第一物点在第二预设直线上的垂直投影到标识中心的距离,第二物点投影长度组包括物点第三投影长度和物点第四投影长度,物点第三投影长度为第二物点在第一预设直线上的垂直投影到标识中心的距离,物点第四投影长度为第二物点在第二预设直线上的垂直投影到标识中心的距离。In an implementation of this embodiment, according to the first projection angle, the second projection angle, the object distance and the first image point projection length group, the first object point projection length group of the first object point is determined, and according to the first projection The angle, the second projection angle, the object distance and the second image point projection length group determine the second object point projection length group of the second object point. The first object point projected length group includes the first projected length of the object point and the second projected length of the object point. The first projected length of the object point is the distance from the vertical projection of the first object point on the first preset straight line to the center of the mark. The second projection length of the point is the distance from the vertical projection of the first object point on the second preset straight line to the center of the logo. The second projection length group of the object point includes the third projection length of the object point and the fourth projection length of the object point. The third projection length is the distance from the vertical projection of the second object point on the first preset straight line to the mark center, and the fourth projection length of the object point is the distance from the vertical projection of the second object point on the second preset straight line to the mark center distance.
可选的,根据第一像点对应的垂直投影位于虚拟直线上的位置、第二投影角度、物距和第一像点投影长度组,确定第一物点投影长度组;根据第二像点对应的垂直投影位于虚拟直线上的位置、第一投影角度、物距和第二像点投影长度组,确定第二物点投影长度组。具体的,在目标图像中第一定位标识与第三定位标识之间的连线为第一对角线,第二定位标识与第四定位标识之间的连线为第二对角线,第一对角线和第二对角线均被标识成像中心分为第一半轴和第二半轴。Optionally, according to the position of the vertical projection corresponding to the first image point on the virtual straight line, the second projection angle, the object distance and the first image point projection length group, determine the first object point projection length group; according to the second image point The corresponding vertical projection position on the virtual straight line, the first projection angle, the object distance and the second image point projection length group determine the second object point projection length group. Specifically, in the target image, the connecting line between the first positioning mark and the third positioning mark is the first diagonal line, the connecting line between the second positioning mark and the fourth positioning mark is the second diagonal line, and the connecting line between the second positioning mark and the fourth positioning mark is the second diagonal line. Both the diagonal line and the second diagonal line are divided into the first semi-axis and the second semi-axis by the identified imaging center.
示例性的,参见图8,在目标图像621中,第一定位标识P′ 1与第三定位标识P′ 3之间的连线为第一对角线,第二定位标识P′ 2与第四定位标识P′ 4之间的连线为第二对角线,第一对角线中的第一半轴和第二半轴可以是C′P′ 1和C′P′ 3,第二对角线中的第一半轴和第二半轴可以是C′P′ 2和C′P′ 4Exemplarily, referring to FIG. 8, in the target image 621, the connecting line between the first positioning mark P'1 and the third positioning mark P'3 is the first diagonal line, and the second positioning mark P'2 and the third The connecting line between the four positioning marks P′ 4 is the second diagonal, the first semi-axis and the second semi-axis in the first diagonal can be C′P′ 1 and C′P′ 3 , the second The first and second semi-axes in the diagonal may be C'P' 2 and C'P' 4 .
可选的,第一物点的第一物点投影长度组或第二物点的第二物点投影长度组的计算方式具体包括如下步骤:Optionally, the calculation method of the first object point projection length group of the first object point or the second object point projection length group of the second object point specifically includes the following steps:
S921:当第一像点或第二像点在第一虚拟直线上的垂直投影,位于第一对角线的第一半轴和第二半轴中的较短半轴时,采用如下公式(28)确定物点第一投影长度或物点第三投影长度:S921: When the vertical projection of the first image point or the second image point on the first virtual straight line is located on the shorter semi-axis of the first semi-axis and the second semi-axis of the first diagonal, the following formula is used ( 28) Determine the first projection length of the object point or the third projection length of the object point:
Figure PCTCN2021102454-appb-000024
Figure PCTCN2021102454-appb-000024
可理解的,较短半轴和较长半轴的确定是通过第一半轴与第二半轴具体包括的像点之间的距离确定的,其中,|CT 1|为实际空间内物点T到标识平面中的第一虚拟直线P 1P 3投影的坐标点到标识中心的距离。 It can be understood that the determination of the shorter semi-axis and the longer semi-axis is determined by the distance between the image points specifically included in the first semi-axis and the second semi-axis, where |CT 1 | is the object point in the actual space T is the distance from the coordinate point projected by the first virtual straight line P 1 P 3 in the logo plane to the center of the logo.
示例性的,参见图8,像点T′与像点投影点T′ 1的连线垂直于第一虚拟直线C′P′ 3P′ 1,像点投影点T′ 1为像点T′在第一虚拟直线上的垂直投影点,第一对角线中的第一半轴与第二半轴C′P′ 1与C′P′ 3相比较,C′P′ 1可以确定为较短半轴,同理,第二对角线中的第一半轴与第二半轴中C′P′ 2和C′P′ 4相比较,C′P′ 2为较短半轴。 Exemplarily, referring to FIG. 8, the line connecting the image point T' and the image point projection point T'1 is perpendicular to the first virtual straight line C'P'3P'1 , and the image point projection point T'1 is the image point T' At the vertical projection point on the first virtual straight line, the first semi-axis in the first diagonal is compared with the second semi-axis C'P' 1 and C'P' 3 , and C'P' 1 can be determined to be relatively Minor semi-axis, similarly, compared with C'P' 2 and C'P' 4 in the first semi-axis in the second diagonal, C'P' 2 is the shorter semi-axis.
S922:当第一像点或第二像点在第一虚拟直线上的垂直投影,位于第一对角线的第一半轴和第二半轴中的较长半轴时,采用如下公式(29)确定物点第一投影长度或物点第三投影长度:S922: When the vertical projection of the first image point or the second image point on the first virtual straight line is located on the longer semi-axis of the first semi-axis and the second semi-axis of the first diagonal, the following formula is used ( 29) Determine the first projection length of the object point or the third projection length of the object point:
Figure PCTCN2021102454-appb-000025
Figure PCTCN2021102454-appb-000025
示例性的,图8中T′ 1落在第一对角线的较长半轴中。 Exemplarily, T'1 in FIG. 8 falls on the longer semi-axis of the first diagonal.
S923:当第一像点或第二像点在第二虚拟直线上的垂直投影,位于第二对角线的第一半轴和第二半轴中的较短半轴时,采用如下公式(30)确定物点第二投影长度或物点第四投影长度:S923: When the vertical projection of the first image point or the second image point on the second virtual straight line is located on the shorter semi-axis of the first semi-axis and the second semi-axis of the second diagonal, the following formula is used ( 30) Determine the second projected length of the object point or the fourth projected length of the object point:
Figure PCTCN2021102454-appb-000026
Figure PCTCN2021102454-appb-000026
示例性的,参见图8,像点T′与像点投影点T′ 2的连线垂直于第二虚拟直线C′P′ 3P′ 1,像点投影点T′ 2为像点T′在第二虚拟直线上的垂直投影点,第一对角线中的第一半轴与第二半轴C′P′ 1与C′P′ 3相比较,C′P′ 1可以确定为较短半轴,同理,第二对角线中的第一半轴与第二半轴中C′P′ 2和C′P′ 4相比较,C′P′ 2为较短 半轴。 Exemplarily, referring to Fig. 8, the line connecting the image point T' and the image point projection point T'2 is perpendicular to the second virtual straight line C'P'3P'1 , and the image point projection point T'2 is the image point T' At the vertical projection point on the second virtual straight line, the first semi-axis in the first diagonal is compared with the second semi-axis C'P' 1 and C'P' 3 , and C'P' 1 can be determined to be relatively Minor semi-axis, similarly, compared with C'P' 2 and C'P' 4 in the first semi-axis in the second diagonal, C'P' 2 is the shorter semi-axis.
S924:当第一像点或第二像点在第二虚拟直线上的垂直投影,位于第二对角线的第一半轴和第二半轴中的较长半轴时,采用如下公式(31)确定物点第二投影长度或物点第四投影长度:S924: When the vertical projection of the first image point or the second image point on the second virtual straight line is located on the longer semi-axis of the first semi-axis and the second semi-axis of the second diagonal, the following formula is used ( 31) Determine the second projected length of the object point or the fourth projected length of the object point:
Figure PCTCN2021102454-appb-000027
Figure PCTCN2021102454-appb-000027
其中,|CT 1|表示物点第一投影长度或者物点第三投影长度,|C'T′ 1|表示物点第一投影长度对应的像点第一投影长度或者物点第三投影长度对应的像点第三投影长度,|CT 2|表示物点第二投影长度或者物点第四投影长度,|C'T′ 2|表示物点第二投影长度对应的像点第二投影长度或者物点第四投影长度对应的像点第四投影长度,D表示物距,f表示摄像头的焦距,β表示第二投影角度,α表示第一投影角度。 Among them, |CT 1 | represents the first projected length of the object point or the third projected length of the object point, and |C'T′ 1 | represents the first projected length of the image point corresponding to the first projected length of the object point or the third projected length of the object point The corresponding third projection length of the image point, |CT 2 | indicates the second projection length of the object point or the fourth projection length of the object point, |C'T' 2 | indicates the second projection length of the image point corresponding to the second projection length of the object point Or the fourth projection length of the image point corresponding to the fourth projection length of the object point, D represents the object distance, f represents the focal length of the camera, β represents the second projection angle, and α represents the first projection angle.
示例性的,图8中T′ 2落在第二对角线的较长半轴中。 Exemplarily, T′ 2 in FIG. 8 falls on the longer semi-axis of the second diagonal.
S930:根据第一物点投影长度组,确定第一物点的位置,并根据第二物点投影长度组,确定第二物点的位置。S930: Determine the position of the first object point according to the first object point projection length group, and determine the position of the second object point according to the second object point projection length group.
可选的,确定第一物点的位置和第二物点的位置具体包括如下步骤:Optionally, determining the position of the first object point and the position of the second object point specifically includes the following steps:
S931:由物点第一投影长度与物点第二投影长度之差的√2/2,确定第一物点的横坐标,并由物点第一投影长度与物点第二投影长度之和的√2/2,确定第一物点的纵坐标。S931: Determine the abscissa of the first object point by √2/2 of the difference between the first projected length of the object point and the second projected length of the object point, and determine the sum of the first projected length of the object point and the second projected length of the object point √2/2 of , determine the ordinate of the first object point.
可理解的,在上述S920的基础上,采用如下公式(32)确定第一物点的横坐
Figure PCTCN2021102454-appb-000028
Understandably, on the basis of the above S920, the following formula (32) is used to determine the horizontal position of the first object point
Figure PCTCN2021102454-appb-000028
其中,(x t,y t)为实际空间中物点T对应的坐标。 Among them, (x t , y t ) is the coordinate corresponding to the object point T in the actual space.
S932:由物点第三投影长度与物点第四投影长度之差的√2/2,确定第二物点的横坐标,并由物点第三投影长度与物点第四投影长度之和的√2/2,确定第二物点的纵坐标。S932: Determine the abscissa of the second object point by √2/2 of the difference between the third projected length of the object point and the fourth projected length of the object point, and determine the sum of the third projected length of the object point and the fourth projected length of the object point √2/2 of , determine the ordinate of the second object point.
可理解的,第二像点对应的物点的横纵坐标均可通过上述公式(32)确定。Understandably, the horizontal and vertical coordinates of the object point corresponding to the second image point can be determined by the above formula (32).
本公开实施例提供的一种基于图像的测距方法,通过确定目标图像中第一像点与第二像点对应的投影长度组,进一步确定实际空间中第一物点与第二物点对应的投影长度组,进而得到第一物点与第二物点的位置,根据第一物点与第二物点的坐标点得到两个物点之间的距离,通过在计算目标图像中像点的投影坐标,能够根据目标图像中的像素点信息确定实际空间中物点的距离,且计算得到的物点之间的距离信息准确,对于实际空间中的任意物点之间的距离均可直接采用上述公式直接计算,计算速度较快。An image-based ranging method provided by an embodiment of the present disclosure further determines the correspondence between the first object point and the second object point in the actual space by determining the projection length group corresponding to the first image point and the second image point in the target image The projection length group, and then get the position of the first object point and the second object point, and get the distance between the two object points according to the coordinate points of the first object point and the second object point, by calculating the image point in the target image The projected coordinates of the target image can determine the distance of the object point in the actual space according to the pixel information in the target image, and the calculated distance information between the object points is accurate, and the distance between any object points in the actual space can be directly Using the above formula to calculate directly, the calculation speed is faster.
在一个实施例中,提供了一种基于图像的测距装置,测距装置1000包括:In one embodiment, an image-based ranging device is provided, and the ranging device 1000 includes:
图像获取模块1100,配置成获取摄像头采集的包含四个定位标识的目标图像,其中,四个定位标识在物空间中位于标识平面,且依次等间距并环绕排列;The image acquisition module 1100 is configured to acquire the target image collected by the camera and includes four positioning marks, wherein the four positioning marks are located on the marking plane in the object space, and are arranged at equal intervals and around them;
第一位置确定模块1200,配置成确定四个定位标识在目标图像中的第一位置;The first position determining module 1200 is configured to determine the first positions of the four positioning marks in the target image;
第二位置确定模块1300,配置成获取目标图像中的第一像点和第二像点,并确定第一像点的第二位置和第二像点的第三位置,其中,第一像点为标识平面上第一物点的像点,第二像点为标识平面上第二物点的像点;The second position determination module 1300 is configured to acquire the first image point and the second image point in the target image, and determine the second position of the first image point and the third position of the second image point, wherein the first image point is the image point of the first object point on the identification plane, and the second image point is the image point of the second object point on the identification plane;
距离确定模块1400,配置成根据第一位置、第二位置和第三位置,确定第一物点与第二物点之间的距离。The distance determination module 1400 is configured to determine the distance between the first object point and the second object point according to the first position, the second position and the third position.
可选的,距离确定模块1400具体配置成:根据第一位置,确定摄像头的像平面与标识平面的位置关系,其中,位置关系包括像平面与标识平面平行或相交;根据位置关系、第一位置、第二位置和第三位置,确定第一物点与第二物点之间的距离。Optionally, the distance determination module 1400 is specifically configured to: determine the positional relationship between the image plane of the camera and the identification plane according to the first position, wherein the positional relationship includes that the image plane and the identification plane are parallel or intersecting; according to the positional relationship, the first position , the second position and the third position, to determine the distance between the first object point and the second object point.
可选的,距离确定模块1400具体配置成:当由标识位置确定的第一组对边长度相等,且由标识位置确定的第二组对边长度相等时,像平面与标识平面平行;当由标识位置确定的第一组对边长度和第二组对边长度中的任一组对边长度不相等时,像平面与标识平面相交。Optionally, the distance determination module 1400 is specifically configured to: when the lengths of the first group of opposite sides determined by the marked positions are equal, and the lengths of the second group of opposite sides determined by the marked positions are equal, the image plane is parallel to the marked plane; When any of the lengths of the first group of opposite sides determined by the logo position and the second group of lengths of opposite sides are not equal, the image plane intersects the logo plane.
可选的,距离确定模块1400中具体配置成:当像平面与标识平面平行时,根据第一位置,确定四个定位标识中任意两个定位标识之间的成像距离;根据第二位置和第三位置,确定第一像点和第二像点之间的距离;根据任意两个定位标识之间的成像距离和第一像点和第二像点之间的距离,并结合成像原理,确定第一物点与第二物点之间的距离。Optionally, the distance determining module 1400 is specifically configured to: when the image plane is parallel to the marking plane, determine the imaging distance between any two positioning marks among the four positioning marks according to the first position; Three positions, determine the distance between the first image point and the second image point; according to the imaging distance between any two positioning marks and the distance between the first image point and the second image point, combined with the imaging principle, determine The distance between the first object point and the second object point.
可选的,第一物点与第二物点之间的距离所满足的关系式包含:任意两个定位标识的实际距离和任意两个定位标识之间的成像距离的比值,与第一像点和第二像点之间的距离的乘积。Optionally, the relational expression satisfied by the distance between the first object point and the second object point includes: the ratio of the actual distance between any two positioning marks and the imaging distance between any two positioning marks, and the first image The product of the distance between the point and the second image point.
可选的,距离确定模块1400具体配置成:当像平面与标识平面相交时,根据第一位置,确定第一投影角度和第二投影角度,其中,标识平面绕第一预设直线旋转第二投影角度,且绕第二预设直线旋转第一投影角度后,与像平面平行,第一预设直线经过物空间中的第一定位标识和第三定位标识,第二预设直线经过物空间中的第二定位标识和第四定位标识;根据第一位置和第一投影角度,确定物距;或者,根据第一位置和第二投影角度,确定物距;根据第一位置、第二位置、第三位置、第一投影角度、第二投影角度和物距,确定第一物点的位置和第二物点的位置;根据第一物点的位置和第二物点的位置,确定第一物点与第二物点之间的距离。Optionally, the distance determining module 1400 is specifically configured to: when the image plane intersects the marking plane, determine the first projection angle and the second projection angle according to the first position, wherein the marking plane is rotated around the first preset straight line by a second The projection angle, and after the first projection angle is rotated around the second preset straight line, it is parallel to the image plane, the first preset straight line passes through the first positioning mark and the third positioning mark in the object space, and the second preset straight line passes through the object space The second positioning mark and the fourth positioning mark in; according to the first position and the first projection angle, determine the object distance; or, according to the first position and the second projection angle, determine the object distance; according to the first position, the second position , the third position, the first projection angle, the second projection angle and the object distance, determine the position of the first object point and the position of the second object point; according to the position of the first object point and the position of the second object point, determine the position of the second object point The distance between one object point and the second object point.
可选的,距离确定模块1400具体配置成:根据第一位置,确定目标图像中的第一定位标识、第二定位标识、第三定位标识和第四定位标识分别到标识成像中心的第一距离、第二距离、第三距离和第四距离;根据第二距离和第四距离,确定第一投影角度;根据第一距离和第三距离,确定第二投影角度。Optionally, the distance determination module 1400 is specifically configured to: according to the first position, determine the first distances from the first positioning mark, the second positioning mark, the third positioning mark and the fourth positioning mark in the target image to the mark imaging center respectively , the second distance, the third distance and the fourth distance; according to the second distance and the fourth distance, determine the first projection angle; according to the first distance and the third distance, determine the second projection angle.
可选的,距离确定模块1400具体配置成:根据第二距离、第四距离和包含第一投影角度的余弦值,确定物距;或者,根据第一距离、第三距离和包含第二投影角度的余弦值,确定物距。Optionally, the distance determination module 1400 is specifically configured to: determine the object distance according to the second distance, the fourth distance and the cosine value including the first projection angle; or, according to the first distance, the third distance and the cosine value including the second projection angle The cosine value of , determines the object distance.
可选的,距离确定模块1400具体配置成:根据第一位置、第二位置和第三位置,确定第一像点的第一像点投影长度组以及第二像点的第二像点投影长度组,其中,第一像点投影长度组和第二像点投影长度组均包括对应的像点分别到第一虚拟直线和第二虚拟直线的距离第一虚拟直线经过目标图像中的第一定位标识和第三定位标识,第二虚拟直线经过目标图像中的第二定位标识和第四定位标识;根据第一投影角度、第二投影角度、物距、第一像点投影长度组和第二像点投影 长度组,确定第一物点的第一物点投影长度组以及第二物点的第二物点投影长度组,其中,第一物点投影长度组和第二物点投影长度组均包括对应的物点分别到第一预设直线和第二预设直线的距离;根据第一物点投影长度组,确定第一物点的位置,并根据第二物点投影长度组,确定第二物点的位置。Optionally, the distance determining module 1400 is specifically configured to: determine the first pixel projection length group of the first pixel and the second pixel projection length of the second pixel according to the first position, the second position and the third position group, wherein, the first image point projection length group and the second image point projection length group both include the distances from corresponding image points to the first virtual straight line and the second virtual straight line respectively. The first virtual straight line passes through the first location in the target image logo and the third positioning logo, the second virtual straight line passes through the second positioning logo and the fourth positioning logo in the target image; according to the first projection angle, the second projection angle, the object distance, the first image point projection length group and the second Image point projection length group, determine the first object point projection length group of the first object point and the second object point projection length group of the second object point, wherein, the first object point projection length group and the second object point projection length group Both include the distances from the corresponding object point to the first preset straight line and the second preset straight line; according to the first object point projection length group, determine the position of the first object point, and according to the second object point projection length group, determine The location of the second object point.
可选的,距离确定模块1400具体配置成:根据第一位置,确定标识成像中心的位置;根据第二位置和第三位置,分别确定对应的像点到第一虚拟直线以及第二虚拟直线的垂直投影;根据垂直投影到标识成像中心的距离,确定第一像点投影长度组和第二像点投影长度组。Optionally, the distance determination module 1400 is specifically configured to: determine the position marking the imaging center according to the first position; determine the distance from the corresponding image point to the first virtual line and the second virtual line according to the second position and the third position, respectively Vertical projection; according to the distance from the vertical projection to the marked imaging center, determine the first pixel projection length group and the second pixel projection length group.
可选的,距离确定模块1400中在目标图像中第一定位标识与第三定位标识之间的连线为第一对角线,第二定位标识与第四定位标识之间的连线为第二对角线,第一对角线具体配置成:根据第一像点对应的垂直投影位于虚拟直线上的位置、第二投影角度、物距和第一像点投影长度组,确定第一物点投影长度组;根据第二像点对应的垂直投影位于虚拟直线上的位置、第一投影角度、物距和第二像点投影长度组,确定第二物点投影长度组。Optionally, in the distance determining module 1400, in the target image, the connection line between the first positioning mark and the third positioning mark is the first diagonal line, and the connection line between the second positioning mark and the fourth positioning mark is the first diagonal line. Two diagonal lines, the first diagonal line is specifically configured as: according to the position of the vertical projection corresponding to the first image point on the virtual straight line, the second projection angle, the object distance and the projection length group of the first image point, determine the first object Point projection length group; determine the second object point projection length group according to the position of the vertical projection corresponding to the second image point on the virtual straight line, the first projection angle, the object distance and the second image point projection length group.
可选的,距离确定模块1400中根据第一物点投影长度组,确定第一物点的位置,并根据第二物点投影长度组,确定第二物点的位置,具体配置成:由物点第一投影长度与物点第二投影长度之差的√2/2,确定第一物点的横坐标,并由物点第一投影长度与物点第二投影长度之和的√2/2,确定第一物点的纵坐标;由物点第三投影长度与物点第四投影长度之差的√2/2,确定第二物点的横坐标,并由物点第三投影长度与物点第四投影长度之和的√2/2,确定第二物点的纵坐标。Optionally, in the distance determination module 1400, the position of the first object point is determined according to the first object point projection length group, and the position of the second object point is determined according to the second object point projection length group, specifically configured as follows: Determine the abscissa of the first object point by the √2/2 of the difference between the first projected length of the object point and the second projected length of the object point, and the √2/2 of the sum of the first projected length of the object point and the second projected length of the object point 2. Determine the ordinate of the first object point; determine the abscissa of the second object point by √2/2 of the difference between the third projected length of the object point and the fourth projected length of the object point, and determine the abscissa of the second object point by the third projected length of the object point The √2/2 of the sum of the fourth projected length of the object point determines the ordinate of the second object point.
图10所示实施例的基于图像的测距装置可用于执行上述方法实施例的技术方案,其实现原理和技术效果类似,此处不再赘述。The image-based ranging device of the embodiment shown in FIG. 10 can be used to implement the technical solution of the above-mentioned method embodiment, and its implementation principle and technical effect are similar, and will not be repeated here.
在一个实施例中,提供了一种电子设备,该电子设备可以是终端,其内部结构图可以如图11所示。该电子设备包括通过系统总线连接的一个或多个处理器、存储器、通信接口、显示屏和输入装置。其中,该电子设备的一个或多个处理器用于提供计算和控制能力。该电子设备的存储器包括非易失性存储介质、内存储器。该非易失性存储介质存储有操作系统和计算机可读指令。该内存储器为非易失性存储介质中的操作系统和计算机可读指令的运行提供环境。该电子设备的通信接口用于与外部的终端进行有线或无线方式的通信,无线方式可通过WIFI、运营商网络、近场通信(NFC)或其他技术实现。该计算机可读指令被一个或多个处理器执行时以实现一种方法。该电子设备的显示屏可以是液晶显示屏或者电子墨水显示屏,该电子设备的输入装置可以是显示屏上覆盖的触摸层,也可以是电子设备外壳上设置的按键、轨迹球或触控板,还可以是外接的键盘、触控板或鼠标等。In one embodiment, an electronic device is provided. The electronic device may be a terminal, and its internal structure may be as shown in FIG. 11 . The electronic device includes one or more processors, memory, communication interface, display screen, and input device connected by a system bus. Wherein, one or more processors of the electronic device are used to provide calculation and control capabilities. The memory of the electronic device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and computer readable instructions. The internal memory provides an environment for the execution of the operating system and computer readable instructions in the non-volatile storage medium. The communication interface of the electronic device is used to communicate with an external terminal in a wired or wireless manner, and the wireless manner can be realized through WIFI, an operator network, near field communication (NFC) or other technologies. The computer readable instructions, when executed by one or more processors, implement a method. The display screen of the electronic device may be a liquid crystal display screen or an electronic ink display screen, and the input device of the electronic device may be a touch layer covered on the display screen, or a button, a trackball or a touch pad provided on the housing of the electronic device , and can also be an external keyboard, touchpad, or mouse.
本领域技术人员可以理解,图11中示出的结构,仅仅是与本公开方案相关的部分结构的框图,并不构成对本公开方案所应用于其上的电子设备的限定,具体的电子设备可以包括比图中所示更多或更少的部件,或者组合某些部件,或者具有不同的部件布置。Those skilled in the art can understand that the structure shown in FIG. 11 is only a block diagram of a partial structure related to the disclosed solution, and does not constitute a limitation on the electronic device to which the disclosed solution is applied. The specific electronic device can be More or fewer components than shown in the figures may be included, or some components may be combined, or have a different arrangement of components.
在一个实施例中,本公开提供的基于图像的测距装置可以实现为一种计算机可读指令的形式,计算机可读指令可在如图11所示的电子设备上运行。电子设备的存储器中可存储组成该基于图像的测距装置的各个程序模块,比如,图10所示的图像获取模块1100、第一位置确定模块1200、第二位置确定模块1300和距离确定模块1400。各个程序模块构成的计算机可读指令使得一个或多个处理器执行 本说明书中描述的本公开各个实施例的基于图像的测距方法中的步骤。In one embodiment, the image-based distance measuring device provided by the present disclosure can be implemented in the form of computer-readable instructions, and the computer-readable instructions can be run on an electronic device as shown in FIG. 11 . The various program modules that make up the image-based distance measuring device can be stored in the memory of the electronic device, for example, the image acquisition module 1100, the first position determination module 1200, the second position determination module 1300 and the distance determination module 1400 shown in FIG. 10 . The computer-readable instructions constituted by various program modules enable one or more processors to execute the steps in the image-based ranging method of various embodiments of the present disclosure described in this specification.
例如,图11所示的电子设备可以通过如图8所示的装置中的图像获取模块1100执行步骤S410。电子设备可通过第一位置确定模块1200执行步骤S420。电子设备可通过第二位置确定模块1300执行步骤S430。电子设备可通过距离确定模块1400执行步骤S440。For example, the electronic device shown in FIG. 11 may execute step S410 through the image acquisition module 1100 in the apparatus shown in FIG. 8 . The electronic device may execute step S420 through the first location determining module 1200 . The electronic device may execute step S430 through the second location determining module 1300 . The electronic device may execute step S440 through the distance determining module 1400 .
一个实施例中,提供了一种电子设备,包括存储器和一个或多个处理器,该存储器存储有计算机可读指令,该一个或多个处理器执行计算机可读指令时实现以下步骤:获取摄像头采集的包含四个定位标识的目标图像,其中,四个定位标识在物空间中位于标识平面,且依次等间距并环绕排列;确定四个定位标识在目标图像中的第一位置;获取目标图像中的第一像点和第二像点,并确定第一像点的第二位置和第二像点的第三位置,其中,第一像点为标识平面上第一物点的像点,第二像点为标识平面上第二物点的像点;根据第一位置、第二位置和第三位置,确定第一物点与第二物点之间的距离。In one embodiment, an electronic device is provided, including a memory and one or more processors, the memory stores computer-readable instructions, and the one or more processors execute the computer-readable instructions to implement the following steps: acquiring a camera The target image collected contains four positioning marks, wherein the four positioning marks are located on the marking plane in the object space, and are arranged at equal intervals and around them; determine the first position of the four positioning marks in the target image; acquire the target image The first image point and the second image point in, and determine the second position of the first image point and the third position of the second image point, wherein, the first image point is the image point of the first object point on the identification plane, The second image point is an image point identifying the second object point on the plane; according to the first position, the second position and the third position, the distance between the first object point and the second object point is determined.
本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程,是可以通过计算机可读指令来指令相关的硬件来完成的,计算机可读指令可存储于一非易失性计算机可读取存储介质中,该计算机可读指令在执行时,可包括如上述各方法的实施例的流程。其中,本公开所提供的各实施例中所使用的对存储器、数据库或其它介质的任何引用,均可包括非易失性和易失性存储器中的至少一种。非易失性存储器可包括只读存储器(Read-Only Memory,ROM)、磁带、软盘、闪存或光存储器等。易失性存储器可包括随机存取存储器(Random Access Memory,RAM)或者外部高速缓冲存储器。作为说明而非局限,RAM以多种形式可得,比如静态随机存取存储器(Static Random Access Memory,SRAM)和动态随机存取存储器(Dynamic Random Access Memory,DRAM)等。Those of ordinary skill in the art can understand that all or part of the processes in the methods of the above embodiments can be implemented by instructing related hardware through computer-readable instructions, and the computer-readable instructions can be stored in a non-volatile computer-readable When the computer-readable instructions are executed, the computer-readable instructions may include the processes of the embodiments of the above-mentioned methods. Wherein, any reference to storage, database or other media used in the various embodiments provided by the present disclosure may include at least one of non-volatile and volatile storage. Non-volatile memory may include read-only memory (Read-Only Memory, ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory can include random access memory (Random Access Memory, RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms such as Static Random Access Memory (SRAM) and Dynamic Random Access Memory (DRAM), among others.
以上实施例的各技术特征可以进行任意的组合,为使描述简洁,未对上述实施例中的各个技术特征所有可能的组合都进行描述,然而,只要这些技术特征的组合不存在矛盾,都应当认为是本说明书记载的范围。The technical features of the above embodiments can be combined arbitrarily. To make the description concise, all possible combinations of the technical features in the above embodiments are not described. However, as long as there is no contradiction in the combination of these technical features, they should be It is considered to be within the range described in this specification.
以上实施例仅表达了本公开的几种实施方式,其描述较为具体和详细,但并不能因此而理解为对发明专利范围的限制。应当指出的是,对于本领域的普通技术人员来说,在不脱离本公开构思的前提下,还可以做出若干变形和改进,这些都属于本公开的保护范围。因此,本公开专利的保护范围应以所附权利要求为准。The above examples only express several implementations of the present disclosure, and the descriptions thereof are more specific and detailed, but should not be construed as limiting the scope of the patent for the invention. It should be noted that those skilled in the art can make several modifications and improvements without departing from the concept of the present disclosure, and these all belong to the protection scope of the present disclosure. Therefore, the scope of protection of the disclosed patent should be based on the appended claims.
工业实用性Industrial Applicability
本公开提供的基于图像的测距方法,通过获取包括定位标识的目标图像,能够确定物空间中标识平面内任意两个物点之间的距离,不需要提前确定图像像素和实际平面上尺寸的固定比例,使得适用于成像面与实际平面相交的情况等多种应用场景,减少了应用的局限性,具有很强的工业实用性。The image-based ranging method provided by the present disclosure can determine the distance between any two object points in the object space in the object space by acquiring the target image including the positioning mark, without the need to determine the distance between the image pixel and the size on the actual plane in advance The fixed ratio makes it suitable for various application scenarios such as the intersection of the imaging plane and the actual plane, which reduces the limitations of the application and has strong industrial applicability.

Claims (20)

  1. 一种基于图像的测距方法,其特征在于,包括:An image-based ranging method, characterized in that, comprising:
    获取摄像头采集的包含四个定位标识的目标图像,其中,所述四个定位标识在物空间中位于标识平面,且依次等间距并环绕排列;Obtaining the target image collected by the camera and including four positioning marks, wherein the four positioning marks are located on the marking plane in the object space, and are arranged at equal intervals and around them;
    确定所述四个定位标识在所述目标图像中的第一位置;determining the first positions of the four positioning marks in the target image;
    获取所述目标图像中的第一像点和第二像点,并确定所述第一像点的第二位置和所述第二像点的第三位置,其中,所述第一像点为所述标识平面上第一物点的像点,所述第二像点为所述标识平面上第二物点的像点;Acquiring a first image point and a second image point in the target image, and determining a second position of the first image point and a third position of the second image point, wherein the first image point is The image point of the first object point on the identification plane, and the second image point is the image point of the second object point on the identification plane;
    根据所述第一位置、所述第二位置和所述第三位置,确定所述第一物点与所述第二物点之间的距离。The distance between the first object point and the second object point is determined according to the first position, the second position and the third position.
  2. 根据权利要求1所述的方法,其特征在于,根据所述第一位置、所述第二位置和所述第三位置,确定所述第一物点与所述第二物点之间的距离,包括:The method according to claim 1, characterized in that, according to the first position, the second position and the third position, the distance between the first object point and the second object point is determined ,include:
    根据所述第一位置,确定所述摄像头的像平面与所述标识平面的位置关系,其中,所述位置关系包括所述像平面与所述标识平面平行或相交;According to the first position, determine the positional relationship between the image plane of the camera and the identification plane, wherein the positional relationship includes that the image plane is parallel to or intersects with the identification plane;
    根据所述位置关系、所述第一位置、所述第二位置和所述第三位置,确定所述第一物点与所述第二物点之间的距离。The distance between the first object point and the second object point is determined according to the positional relationship, the first position, the second position and the third position.
  3. 根据权利要求2所述的方法,其特征在于,根据所述第一位置,确定所述摄像头的像平面与所述标识平面的位置关系,包括:The method according to claim 2, wherein, according to the first position, determining the positional relationship between the image plane of the camera and the identification plane comprises:
    当由所述标识位置确定的第一组对边长度相等,且由所述标识位置确定的第二组对边长度相等时,所述像平面与所述标识平面平行;When the lengths of the first group of opposite sides determined by the marking positions are equal, and the lengths of the second group of opposite sides determined by the marking positions are equal, the image plane is parallel to the marking plane;
    当由所述标识位置确定的第一组对边长度和第二组对边长度中的任一组对边长度不相等时,所述像平面与所述标识平面相交。The image plane intersects the marker plane when any one of the lengths of the first group of opposite sides and the second group of lengths of opposite sides determined by the position of the marker is not equal.
  4. 根据权利要求3所述的方法,其特征在于,根据所述位置关系、所述第一位置、所述第二位置和所述第三位置,确定所述第一物点与所述第二物点之间的距离,包括:The method according to claim 3, characterized in that, according to the positional relationship, the first position, the second position and the third position, determine the distance between the first object point and the second object point Distances between points, including:
    当所述像平面与所述标识平面平行时,根据所述第一位置,确定所述四个定位标识中任意两个定位标识之间的成像距离;When the image plane is parallel to the marking plane, according to the first position, determine the imaging distance between any two positioning marks in the four positioning marks;
    根据所述第二位置和所述第三位置,确定所述第一像点和所述第二像点之间的距离;determining the distance between the first image point and the second image point according to the second position and the third position;
    根据所述任意两个定位标识之间的成像距离和所述第一像点和所述第二像点之间的距离,并结合成像原理,确定所述第一物点与所述第二物点之间的距离。According to the imaging distance between any two positioning marks and the distance between the first image point and the second image point, and in combination with the imaging principle, determine the first object point and the second object point distance between points.
  5. 根据权利要求4所述的方法,其特征在于,所述第一物点与所述第二物点之间的距离所满足的关系式包含:所述任意两个定位标识的实际距离和所述任意两个定位标识之间的成像距离的比值,与所述第一像点和所述第二像点之间的距离的乘积。The method according to claim 4, wherein the relational expression satisfied by the distance between the first object point and the second object point includes: the actual distance between any two positioning marks and the The product of the ratio of the imaging distance between any two positioning marks and the distance between the first image point and the second image point.
  6. 根据权利要求2所述的方法,其特征在于,所述四个定位标识在排列方向上依次包括第一定位标识、第二定位标识、第三定位标识和第四定位标识;The method according to claim 2, wherein the four positioning marks sequentially include a first positioning mark, a second positioning mark, a third positioning mark and a fourth positioning mark in the arrangement direction;
    根据所述位置关系、所述第一位置、所述第二位置和所述第三位置,确定所 述第一物点与所述第二物点之间的距离,包括:According to the positional relationship, the first position, the second position and the third position, determining the distance between the first object point and the second object point includes:
    当所述像平面与所述标识平面相交时,根据所述第一位置,确定第一投影角度和第二投影角度,其中,所述标识平面绕第一预设直线旋转所述第二投影角度,且绕第二预设直线旋转所述第一投影角度后,与所述像平面平行,所述第一预设直线经过物空间中的所述第一定位标识和所述第三定位标识,所述第二预设直线经过所述物空间中的所述第二定位标识和所述第四定位标识;When the image plane intersects the marking plane, a first projection angle and a second projection angle are determined according to the first position, wherein the marking plane is rotated around a first preset straight line by the second projection angle , and after rotating the first projection angle around a second preset straight line, parallel to the image plane, the first preset straight line passes through the first positioning mark and the third positioning mark in the object space, The second preset straight line passes through the second positioning mark and the fourth positioning mark in the object space;
    根据所述第一位置和所述第一投影角度,确定物距;或者,根据所述第一位置和所述第二投影角度,确定物距;determining the object distance according to the first position and the first projection angle; or determining the object distance according to the first position and the second projection angle;
    根据所述第一位置、所述第二位置、所述第三位置、所述第一投影角度、所述第二投影角度和所述物距,确定所述第一物点的位置和所述第二物点的位置;According to the first position, the second position, the third position, the first projection angle, the second projection angle and the object distance, determine the position of the first object point and the the location of the second object point;
    根据所述第一物点的位置和所述第二物点的位置,确定所述第一物点与所述第二物点之间的距离。The distance between the first object point and the second object point is determined according to the position of the first object point and the position of the second object point.
  7. 根据权利要求6所述的方法,其特征在于,根据所述第一位置,确定第一投影角度和第二投影角度,包括:The method according to claim 6, wherein determining the first projection angle and the second projection angle according to the first position comprises:
    根据所述第一位置,确定所述目标图像中的所述第一定位标识、所述第二定位标识、所述第三定位标识和所述第四定位标识分别到标识成像中心的第一距离、第二距离、第三距离和第四距离;According to the first position, determine the first distance from the first positioning mark, the second positioning mark, the third positioning mark and the fourth positioning mark in the target image to the imaging center respectively , the second distance, the third distance and the fourth distance;
    根据所述第二距离和所述第四距离,确定所述第一投影角度;determining the first projection angle according to the second distance and the fourth distance;
    根据所述第一距离和所述第三距离,确定所述第二投影角度。The second projection angle is determined according to the first distance and the third distance.
  8. 根据权利要求7所述的方法,其特征在于,根据所述第一位置和所述第一投影角度,确定物距,包括:The method according to claim 7, wherein determining the object distance according to the first position and the first projection angle comprises:
    根据所述第二距离、所述第四距离和包含所述第一投影角度的余弦值,确定所述物距;determining the object distance according to the second distance, the fourth distance and a cosine value including the first projection angle;
    根据所述第一位置和所述第二投影角度,确定物距,包括:Determining the object distance according to the first position and the second projection angle includes:
    根据所述第一距离、所述第三距离和包含所述第二投影角度的余弦值,确定所述物距。The object distance is determined according to the first distance, the third distance and a cosine value including the second projection angle.
  9. 根据权利要求6所述的方法,其特征在于,根据所述第一位置、所述第二位置、所述第三位置、所述第一投影角度、所述第二投影角度和所述物距,确定所述第一物点的位置和所述第二物点的位置,包括:The method according to claim 6, wherein, according to the first position, the second position, the third position, the first projection angle, the second projection angle and the object distance , determining the position of the first object point and the position of the second object point, including:
    根据所述第一位置、所述第二位置和所述第三位置,确定所述第一像点的第一像点投影长度组以及所述第二像点的第二像点投影长度组,其中,所述第一像点投影长度组和所述第二像点投影长度组均包括对应的像点分别到第一虚拟直线和第二虚拟直线的距离所述第一虚拟直线经过所述目标图像中的所述第一定位标识和所述第三定位标识,所述第二虚拟直线经过所述目标图像中的所述第二定位标识和所述第四定位标识;According to the first position, the second position and the third position, determining a first pixel projection length group of the first pixel and a second pixel projection length group of the second pixel, Wherein, the first image point projection length group and the second image point projection length group both include the distances from the corresponding image point to the first virtual straight line and the second virtual straight line respectively. The first virtual straight line passes through the target. The first positioning mark and the third positioning mark in the image, the second virtual straight line passes through the second positioning mark and the fourth positioning mark in the target image;
    根据所述第一投影角度、所述第二投影角度、所述物距、所述第一像点投影长度组和所述第二像点投影长度组,确定所述第一物点的第一物点投影长度组以及所述第二物点的第二物点投影长度组,其中,所述第一物点投影长度组和所述 第二物点投影长度组均包括对应的物点分别到所述第一预设直线和所述第二预设直线的距离;According to the first projection angle, the second projection angle, the object distance, the first image point projection length group and the second image point projection length group, determine the first point of the first object point The object point projection length group and the second object point projection length group of the second object point, wherein, the first object point projection length group and the second object point projection length group include corresponding object points to the distance between the first preset straight line and the second preset straight line;
    根据所述第一物点投影长度组,确定所述第一物点的位置,并根据所述第二物点投影长度组,确定所述第二物点的位置。The position of the first object point is determined according to the set of projection lengths of the first object point, and the position of the second object point is determined according to the set of projection lengths of the second object point.
  10. 根据权利要求9所述的方法,其特征在于,根据所述第一位置、所述第二位置和所述第三位置,确定所述第一像点的第一像点投影长度组以及所述第二像点的第二像点投影长度组,包括:The method according to claim 9, characterized in that, according to the first position, the second position and the third position, the first pixel projection length group of the first pixel and the The second image point projection length group of the second image point, including:
    根据所述第一位置,确定标识成像中心的位置;According to the first position, determine the position of the marked imaging center;
    根据所述第二位置和所述第三位置,分别确定对应的像点到所述第一虚拟直线以及所述第二虚拟直线的垂直投影;According to the second position and the third position, respectively determine the vertical projection of the corresponding image point to the first virtual straight line and the second virtual straight line;
    根据所述垂直投影到所述标识成像中心的距离,确定所述第一像点投影长度组和所述第二像点投影长度组。The first image point projection length group and the second image point projection length group are determined according to the distance from the vertical projection to the marked imaging center.
  11. 根据权利要求10所述的方法,其特征在于,根据所述第一投影角度、所述第二投影角度、所述物距、所述第一像点投影长度组和所述第二像点投影长度组,确定所述第一物点的第一物点投影长度组以及所述第二物点的第二物点投影长度组,包括:The method according to claim 10, characterized in that, according to the first projection angle, the second projection angle, the object distance, the first pixel projection length group and the second pixel projection The length group is to determine the first object point projection length group of the first object point and the second object point projection length group of the second object point, including:
    根据所述第一像点对应的垂直投影位于虚拟直线上的位置、所述第二投影角度、所述物距和所述第一像点投影长度组,确定所述第一物点投影长度组;According to the position of the vertical projection corresponding to the first image point on the virtual straight line, the second projection angle, the object distance and the first image point projection length group, determine the first object point projection length group ;
    根据所述第二像点对应的垂直投影位于虚拟直线上的位置、所述第一投影角度、所述物距和所述第二像点投影长度组,确定所述第二物点投影长度组。According to the position of the vertical projection corresponding to the second image point on the virtual straight line, the first projection angle, the object distance and the second image point projection length group, determine the second object point projection length group .
  12. 根据权利要求9所述的方法,其特征在于,根据所述第一物点投影长度组,确定所述第一物点的位置,并根据所述第二物点投影长度组,确定所述第二物点的位置,包括:The method according to claim 9, characterized in that the position of the first object point is determined according to the group of projection lengths of the first object point, and the position of the second object point is determined according to the group of projection lengths of the second object point. The location of the two object points, including:
    由所述物点第一投影长度与所述物点第二投影长度之差的
    Figure PCTCN2021102454-appb-100001
    确定所述第一物点的横坐标,并由所述物点第一投影长度与所述物点第二投影长度之和的
    Figure PCTCN2021102454-appb-100002
    确定所述第一物点的纵坐标;
    The difference between the first projected length of the object point and the second projected length of the object point
    Figure PCTCN2021102454-appb-100001
    Determine the abscissa of the first object point, and use the sum of the first projected length of the object point and the second projected length of the object point
    Figure PCTCN2021102454-appb-100002
    determining the ordinate of the first object point;
    由所述物点第三投影长度与所述物点第四投影长度之差的
    Figure PCTCN2021102454-appb-100003
    确定所述第二物点的横坐标,并由所述物点第三投影长度与所述物点第四投影长度之和的
    Figure PCTCN2021102454-appb-100004
    确定所述第二物点的纵坐标。
    The difference between the third projected length of the object point and the fourth projected length of the object point
    Figure PCTCN2021102454-appb-100003
    Determine the abscissa of the second object point, and use the sum of the third projected length of the object point and the fourth projected length of the object point
    Figure PCTCN2021102454-appb-100004
    The ordinate of the second object point is determined.
  13. 一种基于图像的测距装置,其特征在于,包括:An image-based ranging device, characterized in that it comprises:
    图像获取模块,配置成获取摄像头采集的包含四个定位标识的目标图像,其中,所述四个定位标识在物空间中位于标识平面,且依次等间距并环绕排列;The image acquisition module is configured to acquire the target image collected by the camera and includes four positioning marks, wherein the four positioning marks are located on the marking plane in the object space, and are arranged at equal intervals and around them;
    第一位置确定模块,配置成确定所述四个定位标识在所述目标图像中的第一位置;A first position determination module configured to determine a first position of the four positioning marks in the target image;
    第二位置确定模块,配置成获取所述目标图像中的第一像点和第二像点,并确定所述第一像点的第二位置和所述第二像点的第三位置,其中,所述第一像点为所述标识平面上第一物点的像点,所述第二像点为所述标识平面上第二物点的像点;The second position determination module is configured to acquire the first image point and the second image point in the target image, and determine the second position of the first image point and the third position of the second image point, wherein , the first image point is an image point of a first object point on the identification plane, and the second image point is an image point of a second object point on the identification plane;
    距离确定模块,配置成根据所述第一位置、所述第二位置和所述第三位置, 确定所述第一物点与所述第二物点之间的距离。A distance determination module configured to determine the distance between the first object point and the second object point according to the first position, the second position and the third position.
  14. 根据权利要求13所述的装置,其特征在于,The device according to claim 13, characterized in that,
    所述距离确定模块,具体配置成根据所述第一位置,确定所述摄像头的像平面与所述标识平面的位置关系,其中,所述位置关系包括所述像平面与所述标识平面平行或相交;根据所述位置关系、所述第一位置、所述第二位置和所述第三位置,确定所述第一物点与所述第二物点之间的距离。The distance determination module is specifically configured to determine a positional relationship between the image plane of the camera and the identification plane according to the first position, wherein the positional relationship includes that the image plane is parallel to the identification plane or Intersecting: determining a distance between the first object point and the second object point according to the positional relationship, the first position, the second position, and the third position.
  15. 根据权利要求14所述的装置,其特征在于,所述距离确定模块,具体配置成当由标识位置确定的第一组对边长度相等,且由标识位置确定的第二组对边长度相等时,像平面与标识平面平行;当由标识位置确定的第一组对边长度和第二组对边长度中的任一组对边长度不相等时,像平面与标识平面相交。The device according to claim 14, wherein the distance determination module is specifically configured to when the lengths of the first group of opposite sides determined by the marked positions are equal, and the lengths of the second group of opposite sides determined by the marked positions are equal , the image plane is parallel to the marker plane; when any one of the lengths of opposite sides in the first group of opposite side lengths determined by the marker position and the second group of opposite side lengths is not equal, the image plane intersects the marker plane.
  16. 根据权利要求15所述的装置,其特征在于,The device according to claim 15, characterized in that,
    所述距离确定模块,具体配置成当所述像平面与所述标识平面平行时,根据所述第一位置,确定所述四个定位标识中任意两个定位标识之间的成像距离;根据所述第二位置和所述第三位置,确定所述第一像点和所述第二像点之间的距离;根据所述任意两个定位标识之间的成像距离和所述第一像点和所述第二像点之间的距离,并结合成像原理,确定所述第一物点与所述第二物点之间的距离。The distance determining module is specifically configured to determine the imaging distance between any two positioning marks among the four positioning marks according to the first position when the image plane is parallel to the marking plane; The second position and the third position, determine the distance between the first image point and the second image point; according to the imaging distance between any two positioning marks and the first image point and the distance between the second object point and the imaging principle to determine the distance between the first object point and the second object point.
  17. 根据权利要求16所述的装置,其特征在于,所述第一物点与所述第二物点之间的距离所满足的关系式包含:所述任意两个定位标识的实际距离和所述任意两个定位标识之间的成像距离的比值,与所述第一像点和所述第二像点之间的距离的乘积。The device according to claim 16, wherein the relational expression satisfied by the distance between the first object point and the second object point includes: the actual distance between any two positioning marks and the The product of the ratio of the imaging distance between any two positioning marks and the distance between the first image point and the second image point.
  18. 根据权利要求14所述的装置,其特征在于,The device according to claim 14, characterized in that,
    所述距离确定模块,具体配置成当所述像平面与所述标识平面相交时,根据所述第一位置,确定第一投影角度和第二投影角度,其中,所述标识平面绕第一预设直线旋转所述第二投影角度,且绕第二预设直线旋转所述第一投影角度后,与所述像平面平行,所述第一预设直线经过物空间中的所述第一定位标识和所述第三定位标识,所述第二预设直线经过所述物空间中的所述第二定位标识和所述第四定位标识;The distance determination module is specifically configured to determine a first projection angle and a second projection angle according to the first position when the image plane intersects the identification plane, wherein the identification plane surrounds the first preset Assuming that the second projection angle is rotated by a straight line, and after the first projection angle is rotated around a second preset straight line, parallel to the image plane, the first preset straight line passes through the first positioning in the object space mark and the third positioning mark, the second preset straight line passes through the second positioning mark and the fourth positioning mark in the object space;
    根据所述第一位置和所述第一投影角度,确定物距;或者,根据所述第一位置和所述第二投影角度,确定物距;根据所述第一位置、所述第二位置、所述第三位置、所述第一投影角度、所述第二投影角度和所述物距,确定所述第一物点的位置和所述第二物点的位置;根据所述第一物点的位置和所述第二物点的位置,确定所述第一物点与所述第二物点之间的距离。Determine the object distance according to the first position and the first projection angle; or determine the object distance according to the first position and the second projection angle; determine the object distance according to the first position and the second position , the third position, the first projection angle, the second projection angle and the object distance, determine the position of the first object point and the position of the second object point; according to the first The position of the object point and the position of the second object point determine the distance between the first object point and the second object point.
  19. 一种电子设备,包括存储器和一个或多个处理器,所述存储器存储有计算机可读指令,其特征在于,所述一个或多个处理器执行所述计算机可读指令时实现权利要求1至12中任一项所述方法的步骤。An electronic device comprising a memory and one or more processors, the memory stores computer readable instructions, wherein the one or more processors implement the computer readable instructions according to claims 1 to The steps of any one of 12.
  20. 一个或多个存储有计算机可读指令的非易失性计算机可读存储介质,其上存储有计算机可读指令,其特征在于,所述计算机可读指令被一个或多个处理器执行时实现权利要求1至12中任一项所述方法的步骤。One or more non-volatile computer-readable storage media storing computer-readable instructions, on which computer-readable instructions are stored, characterized in that the computer-readable instructions are implemented when executed by one or more processors The steps of the method as claimed in any one of claims 1 to 12.
PCT/CN2021/102454 2021-06-25 2021-06-25 Image-based distance-measuring method and apparatus, and storage medium WO2022267028A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
CN202180001908.2A CN113597535B (en) 2021-06-25 2021-06-25 Image-based ranging method, apparatus and storage medium
PCT/CN2021/102454 WO2022267028A1 (en) 2021-06-25 2021-06-25 Image-based distance-measuring method and apparatus, and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2021/102454 WO2022267028A1 (en) 2021-06-25 2021-06-25 Image-based distance-measuring method and apparatus, and storage medium

Publications (1)

Publication Number Publication Date
WO2022267028A1 true WO2022267028A1 (en) 2022-12-29

Family

ID=78242854

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/102454 WO2022267028A1 (en) 2021-06-25 2021-06-25 Image-based distance-measuring method and apparatus, and storage medium

Country Status (2)

Country Link
CN (1) CN113597535B (en)
WO (1) WO2022267028A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009106141A1 (en) * 2008-02-29 2009-09-03 Trimble Ab Determining coordinates of a target in relation to a survey instrument having at least two cameras
CN110378898A (en) * 2019-07-26 2019-10-25 金瓜子科技发展(北京)有限公司 A kind of method, apparatus, storage medium and the equipment of beacon positioning
CN112433225A (en) * 2019-08-24 2021-03-02 上海翊威半导体有限公司 Positioning method based on image recognition
CN112816967A (en) * 2021-02-03 2021-05-18 成都康烨科技有限公司 Image distance measuring method, device, distance measuring equipment and readable storage medium

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103925927B (en) * 2014-04-18 2016-09-07 中国科学院软件研究所 A kind of traffic mark localization method based on Vehicular video
CN105698751B (en) * 2016-04-28 2018-05-08 京东方科技集团股份有限公司 A kind of range-measurement system, distance measuring method, range unit and filming apparatus
CN106813649A (en) * 2016-12-16 2017-06-09 北京远特科技股份有限公司 A kind of method of image ranging localization, device and ADAS
CN109993792B (en) * 2019-03-04 2021-05-25 杭州三坛医疗科技有限公司 Projection method, device and system and readable storage medium
CN111415307B (en) * 2020-03-13 2024-03-26 北京市商汤科技开发有限公司 Image processing method and device, electronic equipment and storage medium
CN111649716A (en) * 2020-07-14 2020-09-11 深圳移动互联研究院有限公司 Space point-to-point distance measuring and calculating method based on panoramic image
CN112991456A (en) * 2021-03-08 2021-06-18 上海闻泰信息技术有限公司 Shooting positioning method and device, computer equipment and storage medium

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009106141A1 (en) * 2008-02-29 2009-09-03 Trimble Ab Determining coordinates of a target in relation to a survey instrument having at least two cameras
CN110378898A (en) * 2019-07-26 2019-10-25 金瓜子科技发展(北京)有限公司 A kind of method, apparatus, storage medium and the equipment of beacon positioning
CN112433225A (en) * 2019-08-24 2021-03-02 上海翊威半导体有限公司 Positioning method based on image recognition
CN112816967A (en) * 2021-02-03 2021-05-18 成都康烨科技有限公司 Image distance measuring method, device, distance measuring equipment and readable storage medium

Also Published As

Publication number Publication date
CN113597535A (en) 2021-11-02
CN113597535B (en) 2023-07-04

Similar Documents

Publication Publication Date Title
US10636168B2 (en) Image processing apparatus, method, and program
JP6573419B1 (en) Positioning method, robot and computer storage medium
US20170206676A1 (en) Information processing apparatus and control method thereof
KR20180050702A (en) Image transformation processing method and apparatus, computer storage medium
KR20180070431A (en) Method and system for managing implementation of augmented reality
WO2019000692A1 (en) Three-dimensional graphic rendering method, apparatus, device, and storage medium
JP5618728B2 (en) Reinforcement information acquisition method
WO2018027451A1 (en) Flight positioning method and device
WO2022267028A1 (en) Image-based distance-measuring method and apparatus, and storage medium
CN112509135B (en) Element labeling method, element labeling device, element labeling equipment, element labeling storage medium and element labeling computer program product
CN115031635A (en) Measuring method and device, electronic device and storage medium
JP2021170272A (en) Positioning system, positioning device, positioning method, and positioning program
CN107730592B (en) Visualization method for field-of-view target in virtual environment
CN105809685A (en) Single-concentric circle image-based camera calibration method
CN111915666A (en) Volume measurement method and device based on mobile terminal
WO2022267027A1 (en) Image correction method and apparatus, and electronic device and storage medium
CN112651393B (en) Method, device, equipment and storage medium for processing interest point data
CN115439554A (en) Target, information detection method, device, terminal and storage medium
CN115187769A (en) Positioning method and device
JP2015207168A (en) Information presentation system, method, and program
US20100231709A1 (en) Position measurement system, position measurement method and computer-readable medium
Yu et al. An improved method of concentric circle positioning in visual measurement
JP2011059006A (en) Position measuring marker and position measuring system
CN115601451B (en) External parameter data calibration method, device, computer equipment and storage medium
WO2023150961A1 (en) Calibration method and device

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21946521

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE