WO2021259151A1 - 一种激光标定系统的标定方法、装置以及激光标定系统 - Google Patents

一种激光标定系统的标定方法、装置以及激光标定系统 Download PDF

Info

Publication number
WO2021259151A1
WO2021259151A1 PCT/CN2021/100796 CN2021100796W WO2021259151A1 WO 2021259151 A1 WO2021259151 A1 WO 2021259151A1 CN 2021100796 W CN2021100796 W CN 2021100796W WO 2021259151 A1 WO2021259151 A1 WO 2021259151A1
Authority
WO
WIPO (PCT)
Prior art keywords
image
laser
camera
coordinates
target
Prior art date
Legal status (The legal status 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 status listed.)
Ceased
Application number
PCT/CN2021/100796
Other languages
English (en)
French (fr)
Inventor
王维林
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Autel Intelligent Technology Corp Ltd
Original Assignee
Autel Intelligent Technology Corp Ltd
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 Autel Intelligent Technology Corp Ltd filed Critical Autel Intelligent Technology Corp Ltd
Publication of WO2021259151A1 publication Critical patent/WO2021259151A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/80Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
    • GPHYSICS
    • G06COMPUTING OR CALCULATING; COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image

Definitions

  • This application relates to the technical field of laser calibration, in particular to a calibration method, device and laser calibration system of a laser calibration system.
  • laser measurement equipment including lasers and cameras are used to measure the depth information of the target object, and the application of 3D reconstruction is very extensive.
  • factory production the installation position of the laser and camera has a certain working gap. Even if the laboratory has already calibrated the product, due to the working gap and individual component differences, the laser measurement equipment must be re-calibrated before leaving the factory.
  • the relative position of the laser and the camera is fixed.
  • the position of the laser plane in the camera coordinate system is represented by the laser plane equation.
  • the parameters of the laser plane equation are determined by the laser plane on the laser line formed by the laser on the calibration table. The calibration of the plane is particularly important.
  • the inventor of the present invention found that the laser plane is currently calibrated by manual calibration.
  • the manual calibration takes a long time and is complicated to operate, making it difficult to apply to large quantities in factories. Production.
  • embodiments of the present invention provide a calibration method, device, and laser calibration system for a laser calibration system, which overcomes the above problems or at least partially solves the above problems.
  • a calibration method of a laser calibration system including: acquiring a first image of the target collected when the camera is in a first position; and according to the first image , Identify the first laser line formed when the laser hits the target; select a first reference point in the first laser line, and determine the position of the first reference point in the first image Pixel coordinates; converting the pixel coordinates of the first reference point in the first image into camera coordinates; acquiring a second image of the target collected when the camera is at the second position, wherein The first position and the second position are the positions of the camera relative to the target, and the first position and the second position are not the same; according to the second image, it is recognized that the laser hits the The second laser line formed when targeting the target; select a second reference point in the second laser line, and determine the pixel coordinates of the second reference point in the second image; set the second reference point The pixel coordinates of the point in the second image are converted into camera coordinates; according to the camera coordinate
  • the step of converting the pixel coordinates of the first reference point in the first image into camera coordinates further includes: obtaining a first conversion matrix when the camera is at the first position; According to the first conversion matrix and the pixel coordinates of the first reference point in the first image, the camera coordinates of the first reference point are calculated; and the second reference point is set in the second
  • the step of converting pixel coordinates in the image to camera coordinates further includes: acquiring a second conversion matrix when the camera is at the second position, wherein the first conversion matrix and the second conversion matrix are used to convert the pixel coordinates to Camera coordinates; according to the second conversion matrix and the pixel coordinates of the second reference point in the second image, the camera coordinates of the second reference point are calculated.
  • the step of obtaining the first conversion matrix when the camera is at the first position further includes: obtaining the pixel coordinates of the multiple calibration points set on the target in the first image According to the pixel coordinates of the plurality of calibration points in the first image, obtain the first camera coordinates corresponding to the plurality of calibration points; obtain the first camera coordinates of the plurality of calibration points when the camera is at the first position A world coordinate; the first conversion matrix is determined according to the pixel coordinates, the first world coordinates, and the first camera coordinates of the multiple calibration points in the first image.
  • the first conversion matrix includes a camera's internal parameter matrix A and a first external parameter matrix V 1
  • the first external parameter matrix V 1 includes a first rotation matrix R 1 and a first transfer vector T 1 , so According to the pixel coordinates, the first world coordinates, and the first camera coordinates of the multiple calibration points in the first image, the calculation formula for determining the first conversion matrix is as follows:
  • the (u 1 , v 1 ) is the pixel coordinates of the multiple calibration points in the first image
  • the (X 1 , Y 1 , Z 1 ) is the first world of the multiple calibration points
  • the coordinates, the (x 1 , y 1 , z 1 ) are the first camera coordinates of the multiple calibration points, wherein the internal parameter matrix A is a known number.
  • the step of selecting a first reference point in the first laser line, and determining the pixel coordinates of the first reference point in the first image further includes: The laser line selects at least two first fitting points, and obtains the pixel coordinates of the at least two first fitting points in the first image; according to the at least two first fitting points in the first image
  • the pixel coordinates in an image are fitted to the pixel straight line equation of the first laser line; the pixel coordinates of the multiple calibration points set on the target in the first image are obtained; according to the multiple calibration points
  • the pixel straight line equation of the first target line is fitted, wherein the first target line is formed by connecting at least two calibration points of the plurality of calibration points, and The first target line intersects the first laser line; the intersection of the first target line and the first laser line is used as the first reference point, and the pixel line equation of the first laser line And the pixel straight line equation of the first target line to calculate the pixel coordinates of the first reference point in the first image.
  • the acquiring a second conversion matrix when the camera is at the second position wherein the first conversion matrix and the second conversion matrix are used for the step of converting pixel coordinates into camera coordinates, and further includes : Obtain the pixel coordinates of the plurality of calibration points set on the target in the second image; obtain the first corresponding to the plurality of calibration points according to the pixel coordinates of the plurality of calibration points in the second image Two camera coordinates; acquiring the second world coordinates of the plurality of calibration points when the camera is at the second position; according to the pixel coordinates, the second world coordinates of the plurality of calibration points in the second image, and The second camera coordinates determine the second conversion matrix.
  • the second conversion matrix includes the camera's internal parameter matrix A and a second external parameter matrix V 2
  • the second external parameter matrix V 2 includes a second rotation matrix R 2 and a second transfer vector T 2 , so According to the pixel coordinates, second world coordinates, and second camera coordinates of the multiple calibration points in the second image, the calculation formula for determining the second conversion matrix is as follows:
  • the (u 2 , v 2 ) is the pixel coordinates of the multiple calibration points in the second image
  • the (X 2 , Y 2 , Z 2 ) is the second world of the multiple calibration points
  • the coordinates, the (x 2 , y 2 , z 2 ) are the second camera coordinates of the multiple calibration points, wherein the internal parameter matrix A is a known number.
  • the step of selecting a second reference point in the second laser line, and determining the pixel coordinates of the second reference point in the second image further includes: The laser line selects at least two second fitting points, and obtains the pixel coordinates of the at least two second fitting points in the second image; according to the at least two second fitting points in the first image
  • the pixel coordinates in the second image are fitted to the pixel straight line equation of the second laser line; the pixel coordinates of the multiple calibration points set on the target in the second image are obtained; according to the multiple calibration points
  • the pixel straight line equation of the second target line is fitted, wherein the second target line is formed by connecting at least two calibration points of the plurality of calibration points, and The second target line intersects the second laser line; the intersection of the second target line and the second laser line is used as the second reference point, and the pixel line equation of the second laser line And the pixel straight line equation of the second target line to calculate the pixel coordinates of the second reference point in the second image
  • a calibration device for a laser calibration system which is characterized by comprising: a first acquisition module for acquiring the target collected by the camera at the first position The first image; the first identification module, used to identify the first laser line formed when the laser hits the target according to the first image; the first determination module, used to identify the first laser line Select a first reference point in the line, and determine the pixel coordinates of the first reference point in the first image; a first conversion module for converting the first reference point in the first image The pixel coordinates are converted into camera coordinates; the second acquisition module is used to acquire the second image of the target collected when the camera is in the second position, wherein the first position and the second position are the The position of the camera relative to the target, and the first position and the second position are not the same; the second recognition module is used to recognize the formation when the laser hits the target according to the second image The second laser line; a second determination module, used to select a second reference point in the second laser line, and determine
  • the first conversion module includes: a first obtaining unit, configured to obtain a first conversion matrix when the camera is at the first position; a first calculation unit, configured to obtain a first conversion matrix according to the first conversion matrix And the pixel coordinates of the first reference point in the first image to calculate the camera coordinates of the first reference point;
  • the second conversion module includes: a second acquisition unit that acquires the camera coordinates when the camera is at the second position The second conversion matrix, wherein the first conversion matrix and the second conversion matrix are used to convert pixel coordinates into camera coordinates; and the second calculation unit is configured to perform the conversion between the second conversion matrix and the second reference point. For the pixel coordinates in the second image, the camera coordinates of the second reference point are calculated.
  • the first obtaining unit is specifically configured to: obtain the pixel coordinates of the multiple calibration points set on the target in the first image; Pixel coordinates, obtain the first camera coordinates corresponding to the multiple calibration points; obtain the first world coordinates of the multiple calibration points when the camera is at the first position; The pixel coordinates, the first world coordinates, and the first camera coordinates in the first image determine the first conversion matrix.
  • the first conversion matrix includes a camera's internal parameter matrix A and a first external parameter matrix V 1
  • the first external parameter matrix V 1 includes a first rotation matrix R 1 and a first transfer vector T 1 , so According to the pixel coordinates, the first world coordinates, and the first camera coordinates of the multiple calibration points in the first image, the calculation formula for determining the first conversion matrix is as follows:
  • the (u 1 , v 1 ) is the pixel coordinates of the multiple calibration points in the first image
  • the (X 1 , Y 1 , Z 1 ) is the first world of the multiple calibration points
  • the coordinates, the (x 1 , y 1 , z 1 ) are the first camera coordinates of the multiple calibration points, wherein the internal parameter matrix A is a known number.
  • the first determining module includes: a third acquiring unit, configured to select at least two first fitting points from the first laser line, and to acquire the at least two first fitting points The pixel coordinates in the first image; a first fitting unit, configured to fit the pixel straight line of the first laser line according to the pixel coordinates of the at least two first fitting points in the first image Equation; a fourth acquisition unit for acquiring the pixel coordinates of a plurality of calibration points set on the target in the first image; a second fitting unit for acquiring the pixel coordinates in the first image according to the plurality of calibration points The pixel coordinates in the first image are fitted to the pixel straight line equation of the first target line, wherein the first target line is formed by connecting at least two calibration points among the plurality of calibration points, and the first target line The target line intersects the first laser line; a third calculation unit is configured to use the intersection point of the first target line and the first laser line as the first reference point, and according to the first laser line The pixel line equation of the pixel line;
  • the second acquiring unit includes: acquiring pixel coordinates of a plurality of calibration points set on the target in the second image; according to the pixel coordinates of the plurality of calibration points in the second image , Obtain the second camera coordinates corresponding to the plurality of calibration points; obtain the second world coordinates of the plurality of calibration points when the camera is at the second position; The pixel coordinates, the second world coordinates, and the second camera coordinates in the image determine the second conversion matrix.
  • the second conversion matrix includes the camera's internal parameter matrix A and a second external parameter matrix V 2
  • the second external parameter matrix V 2 includes a second rotation matrix R 2 and a second transfer vector T 2 , so According to the pixel coordinates, second world coordinates, and second camera coordinates of the multiple calibration points in the second image, the calculation formula for determining the second conversion matrix is as follows:
  • the (u 2 , v 2 ) is the pixel coordinates of the multiple calibration points in the second image
  • the (X 2 , Y 2 , Z 2 ) is the second world of the multiple calibration points
  • the coordinates, the (x 2 , y 2 , z 2 ) are the second camera coordinates of the multiple calibration points, wherein the internal parameter matrix A is a known number.
  • the second determining module includes: a fifth acquiring unit, configured to select at least two second fitting points from the second laser line, and to acquire the at least two second fitting points The pixel coordinates in the second image; a third fitting unit, configured to fit the pixel straight line of the second laser line according to the pixel coordinates of the at least two second fitting points in the second image Equation; a sixth acquisition unit for acquiring the pixel coordinates of a plurality of calibration points set on the target in the second image; a fourth fitting unit for acquiring the pixel coordinates in the second image according to the plurality of calibration points The pixel coordinates in the second image are fitted to the pixel straight line equation of the second target line, wherein the second target line is formed by connecting at least two calibration points of the plurality of calibration points, and the second target line The target line intersects the second laser line; a fourth calculation unit is configured to use the intersection point of the second target line and the second laser line as the second reference point, and according to the second laser line The pixel straight line equation of the second target
  • a laser calibration system including: a target; a support; a laser, fixed on the support, and a laser output by the laser hits the target; a camera, fixed On the support, the camera is used to take an image of the target; the controller includes at least one processor and a memory, the memory and the camera are both communicatively connected to the at least one processor, and the memory stores There are instructions executable by the at least one processor, and the instructions are executed by the at least one processor, so that the at least one processor can execute the calibration method of the laser calibration system described above.
  • the laser calibration system further includes a fill light and a filter; the fill light is fixed to the bracket, the fill light is used to output an illumination light source to the target, and the filter is provided On the viewfinder lens of the camera, the wavelength of the light source allowed by the filter is the same as the wavelength of the illuminating light source output by the fill light.
  • a reflective material is coated on the target.
  • the target is divided into a plurality of calibration points and a background area, wherein the colors of the plurality of calibration points and the background area are different, and the reflective material is coated on the background area.
  • the laser calibration system further includes a base and a pose adjustment device; the target and the pose adjustment device are both set on the base, and the bracket is set on the pose adjustment device, The pose adjusting device is used to adjust the position of the bracket to adjust the position of the camera relative to the target.
  • the posture adjustment device includes a fixing seat and a plurality of spacers; the plurality of spacers are stacked on the base, the fixing seat is arranged on the plurality of spacers, and the fixing seat is arranged There is a fixing slot, and one end of the bracket is inserted into the fixing slot.
  • the beneficial effect of the embodiment of the present invention is: different from the calibration method of the existing laser calibration system, the embodiment of the present invention obtains the first image of the target collected when the camera is in the first position;
  • the first image identifies the first laser line formed when the laser hits the target; selects a first reference point in the first laser line, and determines that the first reference point is in the first laser line
  • the pixel coordinates in an image; the pixel coordinates of the first reference point in the first image are converted into camera coordinates; the second image of the target collected when the camera is at the second position is acquired , Wherein the first position and the second position are the positions of the camera relative to the target, and the first position and the second position are not the same; according to the second image, the laser is identified The second laser line formed when hitting the target; select a second reference point in the second laser line, and determine the pixel coordinates of the second reference point in the second image; The pixel coordinates of the second reference point in the second image are converted into camera coordinates; according to the camera coordinate
  • Figure 1 is a schematic diagram of a laser calibration system provided by an embodiment of the present invention.
  • FIG. 2 is a schematic diagram of the connection relationship of various components of a laser calibration system provided by an embodiment of the present invention
  • FIG. 3 is a schematic flowchart of a calibration method of a laser calibration system provided by an embodiment of the present invention
  • FIG. 4 is a schematic diagram of a process for determining the pixel coordinates of the first reference point in the first image according to an embodiment of the present invention
  • Figure 5 is a schematic diagram of a target provided by an embodiment of the present invention.
  • FIG. 6 is a schematic diagram of a process of converting the pixel coordinates of the first reference point in the first image into camera coordinates according to an embodiment of the present invention
  • FIG. 7 is a schematic diagram of a process for determining the pixel coordinates of the second reference point in the second image according to an embodiment of the present invention.
  • FIG. 8 is a schematic diagram of a process for converting the pixel coordinates of the second reference point in the second image into camera coordinates according to an embodiment of the present invention
  • FIG. 9 is a schematic diagram of a calibration device of a laser calibration system provided by an embodiment of the present invention.
  • FIG. 10 is a schematic diagram of the hardware structure of the controller for executing the calibration method of the laser calibration system provided by the embodiment of the present invention.
  • the laser calibration system 100 includes a target 101, a bracket 102, a laser 103, a camera 104, a controller 105, a fill light 106, a filter 107, a base 108 and a pose adjustment device 109.
  • the laser 103, the camera 104, and the fill light 106 are fixed on the bracket 102, the filter 107 is arranged on the viewfinder lens of the camera 104, and the filter 107 is used to filter into the camera 104 of light.
  • the laser light output by the laser 103 strikes the target 101.
  • the target 101 and the pose adjustment device 109 are both set on the base 108, the bracket 102 is set on the pose adjustment device 109, and the pose adjustment device 109 is used to adjust the bracket 102 ,
  • the controller 105 is connected to the laser 103, the camera 104, the fill light 106, and the filter 107, and the controller 105 is used to control the laser 103, the camera 104, the fill light 106, and the filter 107.
  • 107 turns on or off and controls the camera 104 to take an image of the target 101.
  • the target 101 is divided into a number of calibration points 1011 and a background area 1012, wherein the colors of the plurality of calibration points 1011 and the background area 1012 are different, for example, the plurality of calibration points 1011 are black, then the The background area 1012 is white, or the plurality of calibration points 1011 are white, then the background area 1012 is black, and so on.
  • the background area 1012 may also be coated with a reflective material to increase the light reflection function of the background area 1012, and the light reflection function of the calibration point 1011 is weaker than the light reflection function of the background area 1012, so that the calibration point 1011 and the background area The imaging difference of 1012 in the camera is greater, so that the camera can obtain a high-quality image of the target 101.
  • the shooting direction of the camera 104 and the laser plane where the laser light output by the laser 103 is located form a fixed included angle.
  • the fixed included angle ranges from 25 to 30 degrees.
  • the position of the line of intersection between the target 101 and the laser plane output by the laser 103 is different.
  • the target 101 moves in the vertical direction
  • the The position of the line of intersection between the target 101 and the laser plane output by the laser 103 is not the same. Therefore, the laser can be found by moving the support in the vertical direction, or moving the target 101 in the vertical direction.
  • the plane and the target 101 have different intersection lines, and the position of the intersection line in the camera coordinate system is obtained, and then the parameters of the laser plane in the camera coordinate system are determined according to the position of the intersection line, so as to achieve calibration.
  • the fill light 106 is used to output an illuminating light source to the target 101
  • the filter 107 is used to filter the light source entering the camera 104.
  • the wavelength of the light source allowed by the filter 107 is the same as the wavelength of the illumination light source output by the fill light 106 and the laser light output by the laser, so that only the fill light 106 and the laser
  • the light emitted by 103 enters the camera 104 after being reflected and scattered by the target 101, thereby filtering out other interference light in the environment and avoiding the influence of ambient light on the imaging of the camera, so that the camera 104 can obtain a high-quality target image.
  • the fill light 106 can be turned off first, and when the calibration point 1011 on the target 101 disappears in the image of the camera 104, the laser is turned on. Diffuse reflection enters the camera 104, and at this time, the camera 104 only captures the image of the laser line.
  • the posture adjustment device 109 includes a fixing seat (not shown) and a plurality of spacers (not shown), the plurality of spacers are stacked on the base 108, and the fixing seat
  • the fixing base is provided with a fixing groove (not shown in the figure), and one end of the bracket 102 is inserted into the fixing groove.
  • position and posture adjustment device 109 is not limited to the above-mentioned manner, and may also be other manners, which will not be repeated here.
  • the position of the laser plane output by the laser 103 in the camera coordinate system of the camera 104 is also fixed. Even if the bracket 102 is moved, it will not affect the laser plane on the camera. The position in the coordinate system, therefore, the position of the two straight lines of the laser plane in the camera coordinate system can be found by moving the bracket 102 or moving the target 101, and the position of the laser plane can be determined according to the positions of the two straight lines of the laser plane in the camera coordinate system.
  • the parameters in the camera coordinate system are used to calibrate the laser calibration system. The following describes the calibration process of the laser calibration system in detail.
  • FIG. 3 is a schematic flowchart of a calibration method of a laser calibration system provided by an embodiment of the present invention.
  • the structure and function of the laser calibration system are the same as those of the above-mentioned laser calibration system, and will not be omitted here.
  • the method includes the following steps:
  • Step S10 Acquire a first image of the target collected when the camera is at the first position.
  • the first position is the position of the camera relative to the target. You can adjust the position of the camera relative to the target by moving the target and moving the bracket. You can also adjust the position of the camera relative to the target by moving the target without moving the bracket. Location.
  • the first image includes an image of the target surface of the target facing the laser.
  • the laser When the laser outputs laser, the laser will form a laser line on the target surface, and the first image will also include the laser line.
  • the first image In order to make the first image include the laser line, when the camera is in the first position, the laser is activated, and then the camera is activated to collect the first image of the target.
  • Step S20 according to the first image, identify the first laser line formed when the laser hits the target.
  • the first laser line refers to the line formed by the laser on the target plane.
  • the diffuse reflection of the laser enters the camera, and the camera only Grab the first image containing the laser line.
  • the first image may also be an image collected under the premise that the fill light is turned on. In this case, the first image contains a panoramic view of the target, that is, contains the calibration point and also contains the first laser line.
  • the recognition algorithm for recognizing the first laser line from the first image can be implemented by using an existing algorithm, which is not within the protection scope of the present invention.
  • Step S30 selecting a first reference point in the first laser line, and determining the pixel coordinates of the first reference point in the first image.
  • the first reference point is two points on the first laser line.
  • the pixel coordinates of the first reference point refer to the coordinates of the first reference point in the image, which can pass through the image coordinate system, and the first reference point is in the first image In the location recognition.
  • the first reference point is the intersection point of the line of the first laser line and the multiple calibration points on the target, and the coordinates of the intersection point may be the equation of a straight line connected by the calibration points and The equation of the first laser line is calculated, please refer to Fig. 4, step S30 includes:
  • Step S301 Select at least two first fitting points from the first laser line, and obtain the pixel coordinates of the at least two first fitting points in the first image.
  • the first fitting point is a point on the first laser line, the two first fitting points are non-overlapping points, and the two points determine a straight line. Therefore, the two first fitting points can be passed To determine the pixel line equation of the first laser line.
  • Step S302 Fit the pixel straight line equation of the first laser line according to the pixel coordinates of the at least two first fitting points in the first image.
  • Step S303 Obtain the pixel coordinates of the multiple calibration points set on the target in the first image.
  • the first image is a panoramic image including a target and a first laser line
  • the multiple calibration points set on the target can be directly obtained from the first image. Pixel coordinates in an image. If the first image is an image containing only the first laser line, it is necessary to turn on the fill light to reacquire the first image of the target collected when the camera is in the first position.
  • Step S304 Fit the pixel straight line equation of the first target line according to the pixel coordinates of the plurality of calibration points in the first image, wherein the first target line is determined by at least one of the plurality of calibration points. Two calibration points are connected, and the first target line intersects the first laser line.
  • the number of calibration points on the target plane is multiple, and multiple calibration points can be arranged in a matrix, for example: 5*5 matrix arrangement, 4*4 matrix arrangement and so on.
  • a matrix for example: 5*5 matrix arrangement, 4*4 matrix arrangement and so on.
  • Step 305 Use the intersection of the first target line and the first laser line as the first reference point, and calculate according to the pixel line equation of the first laser line and the pixel line equation of the first target line
  • the first reference point is at the pixel coordinates of the first image.
  • the pixel line equation of the first laser line and the pixel line equation of the first target line can be combined into an equation group, and the equations can be solved Calculate the pixel coordinates of the first reference point in the first image.
  • the intersection of the first laser line and the first target line can be identified by image recognition, and the pixel coordinates of the intersection can be determined.
  • Step S40 Convert the pixel coordinates of the first reference point in the first image into camera coordinates.
  • step S40 includes:
  • Step S401 Obtain a first conversion matrix when the camera is at the first position.
  • the step of acquiring the first conversion matrix when the camera is at the first position specifically includes: acquiring the number of calibration points set on the target in the first image Pixel coordinates; obtain the first camera coordinates corresponding to the plurality of calibration points according to the pixel coordinates of the plurality of calibration points in the first image; obtain the plurality of calibration points when the camera is at the first position The first world coordinates; the first conversion matrix is determined according to the pixel coordinates, the first world coordinates, and the first camera coordinates of the multiple calibration points in the first image.
  • the image processing software built into the laser calibration system can obtain the first camera coordinates corresponding to the plurality of calibration points according to the pixel coordinates of the plurality of calibration points in the first image.
  • the image processing software may be OpenCV or Mathlab.
  • the first world coordinates of each calibration point on the target are determined in advance.
  • the first conversion matrix includes a camera's internal parameter matrix A and a first external parameter matrix V 1
  • the first external parameter matrix V 1 includes a first rotation matrix R 1 and a first transfer vector T 1 .
  • the pixel coordinates, the first world coordinates, and the first camera coordinates of the multiple calibration points in the first image, and the calculation formula for determining the first conversion matrix is as follows:
  • the (u 1 , v 1 ) is the pixel coordinates of the multiple calibration points in the first image
  • the (X 1 , Y 1 , Z 1 ) is the first world of the multiple calibration points
  • the coordinates, the (x 1 , y 1 , z 1 ) are the first camera coordinates of the multiple calibration points, wherein the internal parameter matrix A is a known number.
  • Step S402 Calculate the camera coordinates of the first reference point according to the first conversion matrix and the pixel coordinates of the first reference point in the first image.
  • the process of calculating the camera coordinates of the first reference point is opposite to the process of determining the first conversion matrix.
  • the calculation formula of the camera coordinates of the first reference point is as follows:
  • the (u 3 , v 3 ) is the pixel coordinates of the first reference point in the first image determined in step S30, and the (X 3 , Y 3 , Z 3 ) is the first reference
  • the world coordinates of the point, the (x 3 , y 3 , z 3 ) are the camera coordinates of the first reference point, wherein the internal parameter matrix A is a known number, and the first rotation matrix R 1 and the A transition vector T 1 is obtained in step S401.
  • the pixel coordinates of the first reference point can be used to obtain the State the world coordinates of the first reference point.
  • FIG. 5 A, B, C, and D are calibration points, and P1, P2, P3, P4, and P5 are the first reference points.
  • P1A is the distance between point P1 and point A
  • AD is the distance between point A and point D.
  • the ratio of P1A/AD in pixel coordinates is the same as the ratio in world coordinates.
  • the ratio of P1 can be calculated In the same way, the world coordinates of points P2, P3, P4, and P5 can be obtained, that is, the world coordinates of the first reference point can be obtained.
  • the world coordinates of the first reference point can be calculated for the camera coordinates of the first reference point.
  • Step S50 acquiring a second image of the target collected when the camera is in a second position, wherein the first position and the second position are the positions of the camera relative to the target, And the first position and the second position are not the same.
  • the second position is the position of the camera relative to the target, and the difference between the first position and the second position means that the position of the camera relative to the target is different, not the position of the camera in world coordinates Are not the same.
  • Step S60 identify the second laser line formed when the laser hits the target.
  • the second laser line refers to the line formed by the laser on the target plane.
  • the diffuse reflection of the laser enters the camera, and the camera only Grab the second image containing the laser line.
  • the second image may also be an image collected under the premise that the fill light is turned on. In this case, the second image contains the panoramic view of the target, that is, contains the calibration point and also contains the second laser line.
  • the recognition algorithm for recognizing the second laser line from the second image can be implemented by using an existing algorithm, which is not within the protection scope of the present invention.
  • Step S70 Select a second reference point in the second laser line, and determine the pixel coordinates of the second reference point in the second image.
  • step S70 includes:
  • Step S701 Select at least two second fitting points from the second laser line, and obtain the pixel coordinates of the at least two second fitting points in the second image.
  • the second fitting point is a point on the second laser line, and the number of the second fitting point is at least two.
  • Step S702 Fit the pixel straight line equation of the second laser line according to the pixel coordinates of the at least two second fitting points in the second image.
  • Step S703 Obtain the pixel coordinates of the multiple calibration points set on the target in the second image.
  • the second image is a panoramic image including a target and a second laser line
  • the multiple calibration points set on the target can be directly obtained from the second image. 2. Pixel coordinates in the image. If the second image is an image containing only the second laser line, it is necessary to turn on the fill light to reacquire the second image of the target collected when the camera is in the second position.
  • Step S704 according to the pixel coordinates of the plurality of calibration points in the second image, fit the pixel straight line equation of the second target line, wherein the second target line is determined by at least one of the plurality of calibration points. Two calibration points are connected, and the second target line intersects the second laser line.
  • the number of calibration points on the target plane is multiple, and multiple calibration points can be arranged in a matrix, for example: 5*5 matrix arrangement, 4*4 matrix arrangement and so on.
  • the laser forms the second laser line on the plane of the target, the second laser line is placed horizontally, and the second target line intersects with the line of the vertical alignment points.
  • Step S705 Use the intersection of the second target line and the second laser line as the second reference point, and calculate according to the pixel line equation of the second laser line and the pixel line equation of the second target line
  • the second reference point is at the pixel coordinates of the second image.
  • Step S80 Convert the pixel coordinates of the second reference point in the second image into camera coordinates
  • Step S80 includes:
  • Step S801 Obtain a second conversion matrix when the camera is at the second position, where the first conversion matrix and the second conversion matrix are used to convert pixel coordinates into camera coordinates.
  • the step of obtaining a second conversion matrix when the camera is at the second position, wherein the first conversion matrix and the second conversion matrix are used to convert pixel coordinates into camera coordinates includes: acquiring the pixel coordinates of the plurality of calibration points set on the target in the second image; according to the pixel coordinates of the plurality of calibration points in the second image, acquiring the corresponding pixel coordinates of the plurality of calibration points The second camera coordinates; acquiring the second world coordinates of the plurality of calibration points when the camera is at the second position; according to the pixel coordinates of the plurality of calibration points in the second image, the second world The coordinates and the second camera coordinates determine the second conversion matrix.
  • the image processing software built into the laser calibration system can obtain the second camera coordinates corresponding to the plurality of calibration points according to the pixel coordinates of the plurality of calibration points in the second image.
  • the image processing software may be OpenCV or Mathlab.
  • the first world coordinates of the multiple calibration points can be obtained through the displacement of the second position relative to the first position and the first world coordinates of the multiple calibration points. Two world coordinates.
  • the second conversion matrix includes the camera's internal parameter matrix A and a second external parameter matrix V 2
  • the second external parameter matrix V 2 includes a second rotation matrix R 2 and a second transfer vector T 2 , according to The pixel coordinates, the second world coordinates, and the second camera coordinates of the multiple calibration points in the second image, and the calculation formula for determining the second conversion matrix is as follows:
  • the (u 2 , v 2 ) is the pixel coordinates of the multiple calibration points in the second image
  • the (X 2 , Y 2 , Z 2 ) is the second world of the multiple calibration points
  • the coordinates, the (x 2 , y 2 , z 2 ) are the second camera coordinates of the multiple calibration points, wherein the internal parameter matrix A is a known number.
  • Step S802 Calculate the camera coordinates of the second reference point according to the second conversion matrix and the pixel coordinates of the second reference point in the second image.
  • the process of calculating the camera coordinates of the second reference point is opposite to the process of determining the second conversion matrix.
  • the calculation formula of the camera coordinates of the second reference point is as follows:
  • the (u 4 , v 4 ) is the pixel coordinates of the second reference point in the second image determined in step S70, and the (X 4 , Y 4 , Z 4 ) is the second reference
  • the world coordinates of the point, the (x 4 , y 4 , z 4 ) are the camera coordinates of the second reference point, wherein the internal parameter matrix A is a known number, and the second rotation matrix R 2 and the The second transition vector T 2 is obtained in step S801.
  • the pixel coordinates of the second reference point can be used to obtain the State the world coordinates of the second reference point. Specifically, reference may be made to the method of obtaining the world coordinates of the first reference point through the pixel coordinates of the first reference point, which will not be repeated here.
  • the world coordinates of the second reference point can be calculated for the camera coordinates of the second reference point.
  • Step S90 According to the camera coordinates of the first reference point and the second reference point, determine the plane equation of the laser plane where the laser light output by the laser is located in the camera coordinate system. Among them, calculate the plane equation of the laser plane in the camera coordinate system as follows:
  • the first image of the target collected when the camera is at the first position is acquired; according to the first image, the image formed when the laser hits the target is identified The first laser line; select a first reference point in the first laser line, and determine the pixel coordinates of the first reference point in the first image; place the first reference point in the first image
  • the pixel coordinates in an image are converted into camera coordinates; the second image of the target collected when the camera is in the second position is acquired, where the first position and the second position are relative to the camera Where the target is located, and the first position and the second position are not the same; according to the second image, identify the second laser line formed when the laser hits the target; Select a second reference point in the two laser lines, and determine the pixel coordinates of the second reference point in the second image; convert the pixel coordinates of the second reference point in the second image to a camera Coordinates; according to the camera coordinates of the first reference point and the second reference point, determine the plane equation of the laser plane output by the laser in the camera coordinate
  • FIG. 9 is a schematic diagram of a calibration device of a laser calibration system according to an embodiment of the present invention.
  • the calibration device 400 includes a first acquisition module 401, a first identification module 402, a first determination module 403, and a A conversion module 404, a second acquisition module 405, a second identification module 406, a second determination module 407, a second conversion module 408, and a third determination module 409.
  • the first acquisition module 401 is used to acquire the first image of the target collected when the camera is in the first position; the first recognition module 402 is used to identify the first image according to the first image The first laser line formed when the laser hits the target; the first determining module 403 is used to select a first reference point in the first laser line, and determine that the first reference point is in the first laser line Pixel coordinates in an image; a first conversion module 404, used to convert the pixel coordinates of the first reference point in the first image into camera coordinates; a second acquisition module 405, used to obtain the camera coordinates The second image of the target collected in the second position, wherein the first position and the second position are the positions of the camera relative to the target, and the first position and the second position The two positions are different; the second identification module 406 is used to identify the second laser line formed when the laser hits the target according to the second image; the second determination module 407 is used to A second reference point is selected from the two laser lines, and the pixel coordinates of the second reference point in the second image are
  • the first conversion module 404 includes: a first acquisition unit 4041 and a first calculation unit 4042.
  • the first obtaining unit 4041 is configured to obtain the first conversion matrix when the camera is at the first position;
  • the first calculating unit 4042 is configured to obtain the first conversion matrix according to the first conversion matrix and the first reference point. The pixel coordinates in the first image are calculated, and the camera coordinates of the first reference point are calculated.
  • the second conversion module 408 includes: a second acquisition unit 4081 and a second calculation unit 4082.
  • the second obtaining unit 4081 obtains the second conversion matrix when the camera is at the second position, wherein the first conversion matrix and the second conversion matrix are used to convert pixel coordinates into camera coordinates; a second calculation unit 4082. Calculate the camera coordinates of the second reference point according to the second conversion matrix and the pixel coordinates of the second reference point in the second image.
  • the first obtaining unit 4041 is specifically configured to: obtain the pixel coordinates of the multiple calibration points set on the target in the first image; Obtain the first camera coordinates corresponding to the multiple calibration points from the pixel coordinates in the image; acquire the first world coordinates of the multiple calibration points when the camera is at the first position; according to the multiple calibration points
  • the pixel coordinates, the first world coordinates, and the first camera coordinates in the first image determine the first conversion matrix.
  • the first conversion matrix includes a camera's internal parameter matrix A and a first external parameter matrix V 1
  • the first external parameter matrix V 1 includes a first rotation matrix R 1 and a first transfer vector T 1
  • the calculation formula for determining the first conversion matrix according to the pixel coordinates, the first world coordinates, and the first camera coordinates of the multiple calibration points in the first image is as follows:
  • the (u 1 , v 1 ) is the pixel coordinates of the multiple calibration points in the first image
  • the (X 1 , Y 1 , Z 1 ) is the first world of the multiple calibration points
  • the coordinates, the (x 1 , y 1 , z 1 ) are the first camera coordinates of the multiple calibration points, wherein the internal parameter matrix A is a known number.
  • the first determining module 403 includes: a third acquiring unit 4031, a first fitting unit 4032, a fourth acquiring unit 4033, a second fitting unit 4034, and a third calculating unit 4035.
  • the third obtaining unit 4031 is configured to select at least two first fitting points from the first laser line, and obtain the pixel coordinates of the at least two first fitting points in the first image;
  • the first fitting unit 4032 is configured to fit the pixel straight line equation of the first laser line according to the pixel coordinates of the at least two first fitting points in the first image;
  • the fourth acquiring unit 4033 It is used to obtain the pixel coordinates of the multiple calibration points set on the target in the first image;
  • the second fitting unit 4034 is used to obtain the pixel coordinates of the multiple calibration points in the first image Coordinates, fitting the pixel straight line equation of the first target line, wherein the first target line is formed by connecting at least two calibration points among the plurality of calibration points, and the first target line is connected to the first target line.
  • a laser line intersects; a third calculation unit 4035, configured to use the intersection point of the first target line and the first laser line as the first reference point, and according to the pixel line equation of the first laser line and The pixel straight line equation of the first target line is calculated, and the pixel coordinates of the first reference point in the first image are calculated.
  • the second acquiring unit 4081 is specifically configured to: acquire the pixel coordinates of the multiple calibration points set on the target in the second image; Acquire the second camera coordinates corresponding to the multiple calibration points from the pixel coordinates in the image; acquire the second world coordinates of the multiple calibration points when the camera is at the second position; according to the multiple calibration points
  • the pixel coordinates, the second world coordinates, and the second camera coordinates in the second image determine the second conversion matrix.
  • the second conversion matrix includes a camera's internal parameter matrix A and a second external parameter matrix V 2
  • the second external parameter matrix V 2 includes a second rotation matrix R 2 and a second transition vector T 2
  • the calculation formula for determining the second conversion matrix according to the pixel coordinates, the second world coordinates, and the second camera coordinates of the plurality of calibration points in the second image is as follows:
  • the (u 2 , v 2 ) is the pixel coordinates of the multiple calibration points in the second image
  • the (X 2 , Y 2 , Z 2 ) is the second world of the multiple calibration points
  • the coordinates, the (x 2 , y 2 , z 2 ) are the second camera coordinates of the multiple calibration points, wherein the internal parameter matrix A is a known number.
  • the second determining module 407 includes: a fifth acquiring unit 4071, a third fitting unit 4072, a sixth acquiring unit 4073, a fourth fitting unit 4074, and a fourth calculating unit 4075.
  • the fifth obtaining unit 4071 is configured to select at least two second fitting points from the second laser line, and obtain the pixel coordinates of the at least two second fitting points in the second image;
  • the third fitting unit 4072 is configured to fit the pixel straight line equation of the second laser line according to the pixel coordinates of the at least two second fitting points in the second image;
  • the sixth acquiring unit 4073 Is used to obtain the pixel coordinates of the multiple calibration points set on the target in the second image;
  • the fourth fitting unit 4074 is used to obtain the pixel coordinates of the multiple calibration points in the second image Coordinate, fitting the pixel straight line equation of the second target line, wherein the second target line is formed by connecting at least two calibration points among the plurality of calibration points, and the second target line is connected to the first target line.
  • the fourth calculation unit 4075 is configured to use the intersection point of the second target line and the second laser line as the second reference point, and according to the pixel line equation of the second laser line and The pixel straight line equation of the second target line is calculated, and the pixel coordinates of the second reference point in the second image are calculated.
  • the first acquisition module is used to acquire the first image of the target collected when the camera is in the first position; the first recognition module is used to identify all the targets based on the first image.
  • the pixel coordinates in the first image are converted into camera coordinates through the first conversion module;
  • the second acquisition module is used to acquire the camera coordinates when the camera is at the second position
  • the second image of the target obtained, wherein the first position and the second position are the positions of the camera relative to the target, and the first position and the second position are not the same;
  • the second recognition module according to the second image, recognizes the second laser line formed when the laser hits the target; through the second determination module, selects a second reference point in the second laser line , And determine the pixel coordinates of the second reference point in the second image; use a second conversion module to convert the pixel coordinates of the
  • FIG. 10 is a schematic diagram of the hardware structure of the controller for executing the calibration method of the laser calibration system according to an embodiment of the present invention.
  • the controller 105 includes one or more processors 1051 and a memory 1052.
  • a memory is taken as an example.
  • the processor 1051 and the memory 1052 may be connected through a bus or in other ways.
  • the connection through a bus is taken as an example.
  • the memory 1052 can be used to store non-volatile software programs, non-volatile computer-executable programs and modules, such as the calibration method of the laser calibration system in the embodiment of the present invention.
  • Program instructions/modules for example, the various modules shown in Figure 9).
  • the processor 1051 executes various functional applications and data processing of the calibration device of the laser calibration system by running the non-volatile software programs, instructions, and modules stored in the memory 1052, that is, realizes the laser calibration system of the above method embodiment. Calibration method.
  • the memory 1052 may include a storage program area and a storage data area, where the storage program area can store an operating system and an application program required by at least one function; the storage data area can store data created based on the use of the calibration device of the laser calibration system, etc. .
  • the memory 1052 may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one magnetic disk storage device, a flash memory device, or other non-volatile solid-state storage devices.
  • the memory 1052 may optionally include a memory remotely provided with respect to the processor 1051, and these remote memories may be connected to the calibration device of the laser calibration system via a network. Examples of the aforementioned networks include, but are not limited to, the Internet, corporate intranets, local area networks, mobile communication networks, and combinations thereof.
  • the one or more modules are stored in the memory 1052, and when executed by the one or more processors 1051, the calibration method of the laser calibration system in any of the foregoing method embodiments is executed.
  • the embodiment of the present invention provides a non-volatile computer-readable storage medium, the non-volatile computer-readable storage medium stores computer-executable instructions, and the computer-executable instructions are executed by an electronic device in any of the foregoing method embodiments
  • the calibration method of the laser calibration system in.
  • the embodiment of the present invention provides a computer program product, which includes a calculation program stored on a non-volatile computer-readable storage medium.
  • the computer program includes program instructions.
  • the program instructions are executed by a computer, the The computer executes the calibration method of the laser calibration system in any of the foregoing method embodiments.
  • each implementation manner can be implemented by means of software plus a general hardware platform, and of course, it can also be implemented by hardware.
  • a person of ordinary skill in the art can understand that all or part of the processes in the methods of the foregoing embodiments can be implemented by a computer program instructing relevant hardware.
  • the program can be stored in a computer readable storage medium. When executed, it may include the procedures of the above-mentioned method embodiments.
  • the storage medium can be a magnetic disk, an optical disc, a read-only memory (Read-Only Memory, ROM), or a random access memory (Random Access Memory, RAM), etc.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

本发明实施例涉及激光标定技术领域,特别是涉及一种激光标定系统的标定方法、装置以及激光标定系统。激光标定系统的标定方法包括:获取相机在第一位置时标靶的第一图像;识别激光打在标靶时的第一激光线;在第一激光线中选定第一参考点,确定第一参考点的像素坐标并转换为相机坐标;获取相机在第二位置时标靶的第二图像,其中,第一位置和第二位置为相机相对于标靶所在的位置,并且第一位置和第二位置不相同;识别激光打在标靶时的第二激光线;在第二激光线中选定第二参考点,确定第二参考点的像素坐标并转换为相机坐标;根据第一参考点和第二参考点的相机坐标,确定激光平面的平面方程。通过上述方法实现对激光标定系统的标定,非常方便快捷。

Description

一种激光标定系统的标定方法、装置以及激光标定系统
本申请要求于2020年6月24日提交中国专利局、申请号为202010590850.7、申请名称为“一种激光标定系统的标定方法、装置以及激光标定系统”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及激光标定技术领域,特别是涉及一种激光标定系统的标定方法、装置以及激光标定系统。
背景技术
在工业深度测量领域中,根据三角测量原理,用包括激光器和相机在内的激光测量设备对目标物体的深度信息进行测量,进行三维重构应用非常广泛。在工厂生产中,激光器和相机的安装位置有一定的工差,即使实验室对产品已经做了标定,由于工差和器件个体差异的存在,出厂前,激光测量设备必须进行重新标定。其中,激光器和相机的相对位置固定,激光平面在相机坐标系中的位置由激光平面方程表示,该激光平面方程的参数由激光在标定台上形成的激光线上的激光平面确定,因此对激光平面的标定尤为重要。
但是,本发明的发明人在实现本发明实施例的过程中,发现:目前是采用手工标定的方法对激光平面进行标定的,手工标定的标定时间长且操作复杂,很难适用于工厂大批量生产。
发明内容
鉴于上述问题,本发明实施例提供了一种激光标定系统的标定方法、装置以及激光标定系统,克服了上述问题或者至少部分地解决了上述问题。
根据本发明实施例的一个方面,提供了一种激光标定系统的标定方法,包括:获取所述相机在第一位置时所采集到的所述标靶的第一图像;根据所述第一图像,识别所述激光打在所述标靶时形成的第一激光线;在所述第一激光线中选定第一参考点,并且确定所述第一参考点在所述第一图像中的像素坐标;将所述第一参考点在所述第一图像中的像素坐标转换为相机坐标;获取所述相机在第二位置时所采集到的所述标靶的第二图像,其中,所述第一位置和第二位置为所述相机相对于所述标靶所在的位置,并且所述第一位置和第二位置不相同;根据所述第二图像,识别所述激光打在所述标靶时形成的第二激光线;在所述第二激光线中选定第二参考点,并且确定所述第二参考点在所述第二图像中的像素坐标;将所述第二参考点在所述第二图像中的像素坐标转换为相机坐标;根据所述第一参考点和第二参考点的相机坐标,确定所述激光器所输出的激光所在的激光平面在相机坐标系中的平面方程。
可选的,所述将所述第一参考点在所述第一图像中的像素坐标转换为相机 坐标的步骤,进一步包括:获取所述相机在所述第一位置时的第一转换矩阵;根据所述第一转换矩阵和所述第一参考点在所述第一图像中的像素坐标,计算所述第一参考点的相机坐标;所述将所述第二参考点在所述第二图像中的像素坐标转换为相机坐标的步骤,进一步包括:获取所述相机在第二位置时的第二转换矩阵,其中,所述第一转换矩阵和第二转换矩阵用于将像素坐标转换为相机坐标;根据所述第二转换矩阵和所述第二参考点在所述第二图像中的像素坐标,计算所述第二参考点的相机坐标。
可选的,所述获取所述相机在所述第一位置时的第一转换矩阵的步骤,进一步包括:获取所述标靶上设置的多个标定点在所述第一图像中的像素坐标;根据所述多个标定点在第一图像中的像素坐标,获取所述多个标定点对应的第一相机坐标;获取所述相机在所述第一位置时所述多个标定点的第一世界坐标;根据所述多个标定点在所述第一图像中的像素坐标、第一世界坐标以及第一相机坐标,确定所述第一转换矩阵。
可选的,所述第一转换矩阵包括相机的内参矩阵A和第一外参矩阵V 1,所述第一外参矩阵V 1包括第一旋转矩阵R 1和第一转移向量T 1,所述根据所述多个标定点在所述第一图像的像素坐标、第一世界坐标以及第一相机坐标,确定所述第一转换矩阵的计算公式如下:
Figure PCTCN2021100796-appb-000001
所述(u 1,v 1)为所述多个标定点在所述第一图像中的像素坐标,所述(X 1,Y 1,Z 1)为所述多个标定点的第一世界坐标,所述(x 1,y 1,z 1)为所述多个标定点的第一相机坐标,其中,所述内参矩阵A为已知数。
可选的,所述在所述第一激光线中选定第一参考点,并且确定所述第一参考点在所述第一图像中的像素坐标的步骤,进一步包括:从所述第一激光线选取至少两个第一拟合点,并且获取所述至少两个第一拟合点在所述第一图像中的像素坐标;根据所述至少两个第一拟合点在所述第一图像中的像素坐标,拟合所述第一激光线的像素直线方程;获取所述标靶上设置的多个标定点在所述第一图像中的像素坐标;根据所述多个标定点在所述第一图像中的像素坐标,拟合第一靶线的像素直线方程,其中,所述第一靶线是由所述多个标定点中至少两个标定点连接而成,并且所述第一靶线与所述第一激光线相交;将所述第一靶线与所述第一激光线的交点作为所述第一参考点,并且根据所述第一激光线的像素直线方程和第一靶线的像素直线方程,计算所述第一参考点在所述第一图像的像素坐标。
可选的,所述获取所述相机在所述第二位置时的第二转换矩阵,其中,所述第一转换矩阵和第二转换矩阵用于将像素坐标转换为相机坐标的步骤,进一步包括:获取所述标靶上设置的多个标定点在所述第二图像中的像素坐标;根据所述多个标定点在第二图像中的像素坐标,获取所述多个标定点对应的第二 相机坐标;获取所述相机在所述第二位置时所述多个标定点的第二世界坐标;根据所述多个标定点在所述第二图像中的像素坐标、第二世界坐标以及第二相机坐标,确定所述第二转换矩阵。
可选的,所述第二转换矩阵包括相机的内参矩阵A和第二外参矩阵V 2,所述第二外参矩阵V 2包括第二旋转矩阵R 2和第二转移向量T 2,所述根据所述多个标定点在所述第二图像的像素坐标、第二世界坐标以及第二相机坐标,确定所述第二转换矩阵的计算公式如下:
Figure PCTCN2021100796-appb-000002
所述(u 2,v 2)为所述多个标定点在所述第二图像中的像素坐标,所述(X 2,Y 2,Z 2)为所述多个标定点的第二世界坐标,所述(x 2,y 2,z 2)为所述多个标定点的第二相机坐标,其中,所述内参矩阵A为已知数。
可选的,所述在所述第二激光线中选定第二参考点,并且确定所述第二参考点在所述第二图像中的像素坐标的步骤,进一步包括:从所述第二激光线选取至少两个第二拟合点,并且获取所述至少两个第二拟合点在所述第二图像中的像素坐标;根据所述至少两个第二拟合点在所述第二图像中的像素坐标,拟合所述第二激光线的像素直线方程;获取所述标靶上设置的多个标定点在所述第二图像中的像素坐标;根据所述多个标定点在所述第二图像中的像素坐标,拟合第二靶线的像素直线方程,其中,所述第二靶线是由所述多个标定点中至少两个标定点连接而成,并且所述第二靶线与所述第二激光线相交;将所述第二靶线与所述第二激光线的交点作为所述第二参考点,并且根据所述第二激光线的像素直线方程和第二靶线的像素直线方程,计算所述第二参考点在所述第二图像的像素坐标。
根据本发明实施例的一个方面,提供了一种激光标定系统的标定装置,其特征在于,包括:第一获取模块,用于获取所述相机在第一位置时所采集到的所述标靶的第一图像;第一识别模块,用于根据所述第一图像,识别所述激光打在所述标靶时形成的第一激光线;第一确定模块,用于在所述第一激光线中选定第一参考点,并且确定所述第一参考点在所述第一图像中的像素坐标;第一转换模块,用于将所述第一参考点在所述第一图像中的像素坐标转换为相机坐标;第二获取模块,用于获取所述相机在第二位置时所采集到的所述标靶的第二图像,其中,所述第一位置和第二位置为所述相机相对于所述标靶所在的位置,并且所述第一位置和第二位置不相同;第二识别模块,用于根据所述第二图像,识别所述激光打在所述标靶时形成的第二激光线;第二确定模块,用于在所述第二激光线中选定第二参考点,并且确定所述第二参考点在所述第二图像中的像素坐标;第二转换模块,用于将所述第二参考点在所述第二图像中的像素坐标转换为相机坐标;第三确定模块,用于根据所述第一参考点和第二 参考点的相机坐标,确定所述激光器所输出的激光所在的激光平面在相机坐标系中的平面方程。
可选的,所述第一转换模块包括:第一获取单元,用于获取所述相机在所述第一位置时的第一转换矩阵;第一计算单元,用于根据所述第一转换矩阵和所述第一参考点在所述第一图像中的像素坐标,计算所述第一参考点的相机坐标;第二转换模块包括:第二获取单元,获取所述相机在第二位置时的第二转换矩阵,其中,所述第一转换矩阵和第二转换矩阵用于将像素坐标转换为相机坐标;第二计算单元,根据所述第二转换矩阵和所述第二参考点在所述第二图像中的像素坐标,计算所述第二参考点的相机坐标。
可选的,所述第一获取单元具体用于:获取所述标靶上设置的多个标定点在所述第一图像中的像素坐标;根据所述多个标定点在第一图像中的像素坐标,获取所述多个标定点对应的第一相机坐标;获取所述相机在所述第一位置时所述多个标定点的第一世界坐标;根据所述多个标定点在所述第一图像中的像素坐标、第一世界坐标以及第一相机坐标,确定所述第一转换矩阵。
可选的,所述第一转换矩阵包括相机的内参矩阵A和第一外参矩阵V 1,所述第一外参矩阵V 1包括第一旋转矩阵R 1和第一转移向量T 1,所述根据所述多个标定点在所述第一图像的像素坐标、第一世界坐标以及第一相机坐标,确定所述第一转换矩阵的计算公式如下:
Figure PCTCN2021100796-appb-000003
所述(u 1,v 1)为所述多个标定点在所述第一图像中的像素坐标,所述(X 1,Y 1,Z 1)为所述多个标定点的第一世界坐标,所述(x 1,y 1,z 1)为所述多个标定点的第一相机坐标,其中,所述内参矩阵A为已知数。
可选的,所述第一确定模块包括:第三获取单元,用于从所述第一激光线选取至少两个第一拟合点,并且获取所述至少两个第一拟合点在所述第一图像中的像素坐标;第一拟合单元,用于根据所述至少两个第一拟合点在所述第一图像中的像素坐标,拟合所述第一激光线的像素直线方程;第四获取单元,用于获取所述标靶上设置的多个标定点在所述第一图像中的像素坐标;第二拟合单元,用于根据所述多个标定点在所述第一图像中的像素坐标,拟合第一靶线的像素直线方程,其中,所述第一靶线是由所述多个标定点中至少两个标定点连接而成,并且所述第一靶线与所述第一激光线相交;第三计算单元,用于将所述第一靶线与所述第一激光线的交点作为所述第一参考点,并且根据所述第一激光线的像素直线方程和第一靶线的像素直线方程,计算所述第一参考点在所述第一图像的像素坐标。
可选的,所述第二获取单元包括:获取所述标靶上设置的多个标定点在所述第二图像中的像素坐标;根据所述多个标定点在第二图像中的像素坐标,获 取所述多个标定点对应的第二相机坐标;获取所述相机在所述第二位置时所述多个标定点的第二世界坐标;根据所述多个标定点在所述第二图像中的像素坐标、第二世界坐标以及第二相机坐标,确定所述第二转换矩阵。
可选的,所述第二转换矩阵包括相机的内参矩阵A和第二外参矩阵V 2,所述第二外参矩阵V 2包括第二旋转矩阵R 2和第二转移向量T 2,所述根据所述多个标定点在所述第二图像的像素坐标、第二世界坐标以及第二相机坐标,确定所述第二转换矩阵的计算公式如下:
Figure PCTCN2021100796-appb-000004
所述(u 2,v 2)为所述多个标定点在所述第二图像中的像素坐标,所述(X 2,Y 2,Z 2)为所述多个标定点的第二世界坐标,所述(x 2,y 2,z 2)为所述多个标定点的第二相机坐标,其中,所述内参矩阵A为已知数。
可选的,所述第二确定模块包括:第五获取单元,用于从所述第二激光线选取至少两个第二拟合点,并且获取所述至少两个第二拟合点在所述第二图像中的像素坐标;第三拟合单元,用于根据所述至少两个第二拟合点在所述第二图像中的像素坐标,拟合所述第二激光线的像素直线方程;第六获取单元,用于获取所述标靶上设置的多个标定点在所述第二图像中的像素坐标;第四拟合单元,用于根据所述多个标定点在所述第二图像中的像素坐标,拟合第二靶线的像素直线方程,其中,所述第二靶线是由所述多个标定点中至少两个标定点连接而成,并且所述第二靶线与所述第二激光线相交;第四计算单元,用于将所述第二靶线与所述第二激光线的交点作为所述第二参考点,并且根据所述第二激光线的像素直线方程和第二靶线的像素直线方程,计算所述第二参考点在所述第二图像的像素坐标。
根据本发明实施例的一个方面,提供了一种激光标定系统,包括:标靶;支架;激光器,固定于所述支架上,所述激光器所输出的激光打在所述标靶;相机,固定于所述支架上,所述相机用于拍摄所述标靶的图像;控制器,包括至少一个处理器以及存储器,所述存储器和相机均与所述至少一个处理器通信连接,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行上述激光标定系统的标定方法。
可选的,所述激光标定系统还包括补光灯和滤波片;所述补光灯固定于所述支架,所述补光灯用于向所述标靶输出照明光源,所述滤波片设置于所述相机的取景镜头上,其中,所述滤波片允许通过的光源的波长与所述补光灯所输出的照明光源的波长相同。
可选的,所述标靶上涂覆有反光材料。
可选的所述标靶划分若干标定点和背景区,其中,所述若干标定点和背景 区的颜色不相同,所述反光材料涂覆于所述背景区。
可选的,所述激光标定系统还包括基台和位姿调整装置;所述标靶和位姿调整装置均设置于所述基台上,所述支架设置于所述位姿调整装置上,所述位姿调整装置用于调整所述支架的位置,以调整所述相机相对于所述标靶所在的位置。
可选的,所述位姿调整装置包括固定座和若干垫片;所述若干垫片叠置于所述基台上,所述固定座设置于所述若干垫片上,所述固定座设置有固定槽,所述支架的一端插接于所述固定槽内。
本发明实施例的有益效果是:区别于现有的激光标定系统的标定方法,本发明实施例通过获取所述相机在第一位置时所采集到的所述标靶的第一图像;根据所述第一图像,识别所述激光打在所述标靶时形成的第一激光线;在所述第一激光线中选定第一参考点,并且确定所述第一参考点在所述第一图像中的像素坐标;将所述第一参考点在所述第一图像中的像素坐标转换为相机坐标;获取所述相机在第二位置时所采集到的所述标靶的第二图像,其中,所述第一位置和第二位置为所述相机相对于所述标靶所在的位置,并且所述第一位置和第二位置不相同;根据所述第二图像,识别所述激光打在所述标靶时形成的第二激光线;在所述第二激光线中选定第二参考点,并且确定所述第二参考点在所述第二图像中的像素坐标;将所述第二参考点在所述第二图像中的像素坐标转换为相机坐标;根据所述第一参考点和第二参考点的相机坐标,确定所述激光器所输出的激光所在的激光平面在相机坐标系中的平面方程实现对所述激光标定系统的标定,非常方便快捷。
附图说明
一个或多个实施例通过与之对应的附图中的图片进行示例性说明,这些示例性说明并不构成对实施例的限定,附图中具有相同参考数字标号的元件表示为类似的元件,除非有特别申明,附图中的图不构成比例限制。
图1是本发明实施例提供的一种激光标定系统的示意图;
图2是本发明实施例提供的一种激光标定系统的各部件连接关系示意图;
图3是本发明实施例提供的一种激光标定系统的标定方法的流程示意图;
图4是本发明实施例提供的一种确定所述第一参考点在所述第一图像中的像素坐标的流程示意图;
图5是本发明实施例提供的标靶的示意图;
图6是本发明实施例提供的一种将所述第一参考点在所述第一图像中的像素坐标转换为相机坐标的流程示意图;
图7是本发明实施例提供的一种确定所述第二参考点在所述第二图像中的像素坐标的流程示意图;
图8是本发明实施例提供的一种将所述第二参考点在所述第二图像中的像素坐标转换为相机坐标的流程示意图;
图9是本发明实施例提供的一种激光标定系统的标定装置的示意图;
图10是本发明实施例提供的执行激光标定系统的标定方法的控制器的硬件结构示意图。
具体实施方式
为了使本发明的目的、技术方案及优点更加清楚明白,以下结合附图及实施例,对本发明进行进一步详细说明。应当理解,此处所描述的具体实施例仅用以解释本发明,并不用于限定本发明。
请参阅图1和图2,激光标定系统100包括标靶101、支架102、激光器103、相机104、控制器105、补光灯106、滤光片107、基台108以及位姿调整装置109。所述激光器103、相机104和补光灯106固定于所述支架102上,所述滤光片107设置于所述相机104的取景镜头上,所述滤光片107用于过滤进入所述相机104的光。所述激光器103所输出的激光打在所述标靶101。所述标靶101和位姿调整装置109均设置于所述基台108上,所述支架102设置于所述位姿调整装置109上,所述位姿调整装置109用于调整所述支架102的位置,以调整所述相机104和激光器103相对于所述标靶101所在的位置。所述控制器105分别与所述激光器103、相机104、补光灯106和滤光片107连接,所述控制器105用于控制所述激光器103、相机104、补光灯106和滤光片107开启或关闭以及控制所述相机104拍摄所述标靶101的图像。
对于上述标靶101,标靶101划分若干标定点1011和背景区1012,其中,所述若干标定点1011和背景区1012的颜色不相同,例如,所述若干标定点1011为黑色,则所述背景区1012为白色,或者所述若干标定点1011为白色,则所述背景区1012为黑色等等。在一些实施例中,所述背景区1012还可以涂覆反光材料,以增加背景区1012的反光功能,而标定点1011的反光功能弱于背景区1012的反光功能,使得标定点1011和背景区1012在相机中的成像区别更大,从而使得相机获得高质量的标靶101图像。
对于上述激光器103和相机104,由于激光器103和相机104均固定于支架102,激光器103和相机104的位置相对固定,当支架102移动时,相机104和激光器103同步移动。由于所述相机104和激光器103同步移动,因此,所述激光器103在相机104的相机坐标系中的位置不会变化,同理的,所述激光器103所输出的激光平面在相机坐标系的位置也不会变化。
值得说明的是:所述相机104的拍摄方向与所述激光器103所输出的激光所在的激光平面成固定夹角,可选的,该固定夹角范围为25-30度。当所述支架102在垂直方向运动时,所述标靶101与激光器103所输出的激光平面相交的交线的位置不相同,同样的,当所述标靶101在垂直方向运动时,所述标靶101与激光器103所输出的激光平面相交的交线的位置也不相同,因此,可以通过在垂直方向上移动所述支架,或者,在垂直方向上移动所述标靶101,来寻找激光平面与所述标靶101的不同交线,并且获取该交线在相机坐标系中的 位置,然后根据交线的位置确定激光平面在相机坐标系中的参数,从而实现定标。
对于上述补光灯106和滤光片107,补光灯106用于向所述标靶101输出照明光源,滤光片107用于过滤进入相机104的光源。在一些实施例中,所述滤光片107允许通过的光源的波长与所述补光灯106所输出的照明光源和激光器所输出的激光的波长相同,使得只有所述补光灯106和激光器103所发出的光经过标靶101反射和散射后进入相机104,从而过滤掉环境其它干扰光,避免环境光对相机的成像产生影响,从而使得相机104获取到高质量的标靶图像。
在一些实施例中,为了实现相机104获得高质量的图像,可先关闭所述补光灯106,当所述标靶101上的标定点1011在相机104图像中消失时,开启激光,激光的漫反射进入相机104,而此时相机104就只抓取激光线的图像。
对于上述位姿调整装置109,位姿调整装置109包括固定座(图未示)和若干垫片(图未示),所述若干垫片叠置于所述基台108上,所述固定座设置于所述若干垫片上,所述固定座设置有固定槽(图未示),所述支架102的一端插接于所述固定槽内。通过增加或者减少所述垫片的数量,可调整所述支架102相对于所述标靶101的距离,从而调整所述支架102上固定的相机104相对于所述标靶101的位置。
可以理解的是:位姿调整装置109也不限定为上述方式,也可以为其它方式,此处不再一一赘述。
需要说明的是:由于激光器103和相机104的位置相对固定,激光器103所输出的激光平面在相机104的相机坐标系中的位置也是固定的,即使移动支架102,也不会影响激光平面在相机坐标系中的位置,因此,可以通过移动支架102或者移动标靶101来找出激光平面两条直线在相机坐标系的位置,并根据激光平面两条直线在相机坐标系的位置确定激光平面在相机坐标系中的参数,从而实现对激光标定系统进行标定,如下详细描述了对激光标定系统进行标定的过程。
实施例一
请参阅图3,图3是本发明实施例提供的一种激光标定系统的标定方法的流程示意图,该激光标定系统的结构和功能与上述激光标定系统的结构和功能均相同,此处不再一一赘述,所述方法包括以下步骤:
步骤S10,获取所述相机在第一位置时所采集到的所述标靶的第一图像。
第一位置是相机相对于标靶的位置,可以通过标靶不动,支架动来调整相机相对于标靶的位置,也可以通过标靶动,支架不动,来调整相机相对于标靶的位置。
第一图像包含标靶面向激光器的标靶靶面的图像,当激光器输出激光时,激光会在标靶靶面形成激光线,第一图像也会包含该激光线。而为了使第一图像包含该激光线,当相机位于第一位置时,启动激光器,再启动相机采集标靶 的第一图像。步骤S20,根据所述第一图像,识别所述激光打在所述标靶时形成的第一激光线。
第一激光线是指激光在标靶平面上形成的线条。为了更好地采集第一激光线,可以先关闭所述补光灯,待所述标靶上的标定点在相机图像中消失时再开启激光,此时激光的漫反射进入相机,相机就只抓取包含激光线的第一图像。而在该第一图像由于只包含第一激光线,因此,从第一图像中识别出第一激光线更方便。当然,所述第一图像也可以是在补光灯开启的前提下采集到的图像,此时,第一图像包含标靶的全景,即包含标定点,又包含第一激光线。
值得说明的是:从第一图像中识别第一激光线的识别算法,可以采用现有算法实现,其不在本发明的保护范围之内。
步骤S30,在所述第一激光线中选定第一参考点,并且确定所述第一参考点在所述第一图像中的像素坐标。
第一参考点是位于第一激光线上的两点,第一参考点的像素坐标是指第一参考点在图像中的坐标,其可以通过图像坐标系,以及第一参考点在第一图像中的位置识别得到的。在一些实例中,所述第一参考点为所述第一激光线与所述标靶上的多个标定点的连线的交点,该交点的坐标可以通过标定点连成的直线的方程和第一激光线的方程来计算,请参阅图4,步骤S30包括:
步骤S301,从所述第一激光线选取至少两个第一拟合点,并且获取所述至少两个第一拟合点在所述第一图像中的像素坐标。
所述第一拟合点为所述第一激光线上的点,两个所述第一拟合点为不重叠的点,两点决定一条直线,因此,可以通过两个第一拟合点来确定第一激光线的像素直线方程。
步骤S302,根据所述至少两个第一拟合点在所述第一图像中的像素坐标,拟合所述第一激光线的像素直线方程。
其中,拟合所述第一激光线的像素直线方程如下:
y=ax+b
可以理解的是:通过增加所述第一拟合点的数量,可提高拟合所述第一激光线的精度。
步骤S303,获取所述标靶上设置的多个标定点在所述第一图像中的像素坐标。
需要说明的是,若所述第一图像为包含标靶和第一激光线的全景图像,则可从所述第一图像中直接获取所述标靶上设置的多个标定点在所述第一图像中的像素坐标。若所述第一图像为仅包含所述第一激光线的图像,则需要打开补光灯,重新获取所述相机在第一位置时所采集到的所述标靶的第一图像。
步骤S304,根据所述多个标定点在所述第一图像中的像素坐标,拟合第一靶线的像素直线方程,其中,所述第一靶线是由所述多个标定点中至少两个标定点连接而成,并且所述第一靶线与所述第一激光线相交。
标靶平面上的标定点的数量是多个的,多个标定点可按矩阵的方式排列, 例如:按5*5矩阵排列、4*4矩阵排列等等。请参阅图5,当激光在标靶平面形成第一激光线L1时,第一激光线L1呈横向放置,与纵列的标定点连线形成第一靶线L2相交。
可以理解的是:当标定点可按矩阵的方式排列时,每一个纵列的标定点连线形成一条第一靶线,其中,第一靶线的数量为多条。当然,标定点的排列方式也可以为其它方式,不限定为矩阵方式,只要若干标定点连线形成的第一靶线与第一激光线相交即可。步骤305,将所述第一靶线与所述第一激光线的交点作为所述第一参考点,并且根据所述第一激光线的像素直线方程和第一靶线的像素直线方程,计算所述第一参考点在所述第一图像的像素坐标。
由于第一参考点既在第一激光线上也在第一靶线上,因此,可以将第一激光线的像素直线方程和第一靶线的像素直线方程组成方程组,通过解方程的方式,计算出第一参考点在所述第一图像的像素坐标。
可以理解的是:当第一图像为标靶的全景图像时,可以通过图像识别的方式识别第一激光线与第一靶线的交点,并且确定该交点的像素坐标。
步骤S40,将所述第一参考点在所述第一图像中的像素坐标转换为相机坐标。
当相机位于第一位置时,图像上的点的像素坐标和相机坐标的转换矩阵是相同的。因此,可以先确定该转换矩阵,当识别到第一参考点时,再根据该转换矩阵,将第一参考点的像素坐标转换为相机坐标,具体的,请参阅图6,步骤S40包括:
步骤S401,获取所述相机在所述第一位置时的第一转换矩阵。
在一些实施例中,所述获取所述相机在所述第一位置时的第一转换矩阵的步骤,具体包括:获取所述标靶上设置的多个标定点在所述第一图像中的像素坐标;根据所述多个标定点在第一图像中的像素坐标,获取所述多个标定点对应的第一相机坐标;获取所述相机在所述第一位置时所述多个标定点的第一世界坐标;根据所述多个标定点在所述第一图像中的像素坐标、第一世界坐标以及第一相机坐标,确定所述第一转换矩阵。
其中,可通过所述激光标定系统内置的图像处理软件根据所述多个标定点在第一图像中的像素坐标,获取所述多个标定点对应的第一相机坐标。所述图像处理软件可以是OpenCV或者Mathlab等。
需要说明的是:当相机位于第一位置时,标靶上各标定点的第一世界坐标是预先测定好的。
其中,所述第一转换矩阵包括相机的内参矩阵A和第一外参矩阵V 1,所述第一外参矩阵V 1包括第一旋转矩阵R 1和第一转移向量T 1,所述根据所述多个标定点在所述第一图像的像素坐标、第一世界坐标以及第一相机坐标,确定所述第一转换矩阵的计算公式如下:
Figure PCTCN2021100796-appb-000005
所述(u 1,v 1)为所述多个标定点在所述第一图像中的像素坐标,所述(X 1,Y 1,Z 1)为所述多个标定点的第一世界坐标,所述(x 1,y 1,z 1)为所述多个标定点的第一相机坐标,其中,所述内参矩阵A为已知数。
步骤S402,根据所述第一转换矩阵和所述第一参考点在所述第一图像中的像素坐标,计算所述第一参考点的相机坐标。
其中,计算所述第一参考点的相机坐标的过程与确定第一转换矩阵的过程是相反的过程。所述第一参考点的相机坐标的计算公式如下:
Figure PCTCN2021100796-appb-000006
所述(u 3,v 3)为步骤S30中确定的所述第一参考点在所述第一图像中的像素坐标,所述(X 3,Y 3,Z 3)为所述第一参考点的世界坐标,所述(x 3,y 3,z 3)为所述第一参考点的相机坐标,其中,所述内参矩阵A为已知数,所述第一旋转矩阵R 1和第一转移向量T 1由步骤S401获得。
由于所述第一参考点为所述第一靶线与所述第一激光线的交点,在一些实施例中,根据交比不变形原理,可通过所述第一参考点的像素坐标获取所述第一参考点的世界坐标。具体的,请参阅图5,图6中A、B、C、D为标定点,P1、P2、P3、P4和P5为所述第一参考点。P1A为P1点和A点的距离,AD为A点和D点的距离,根据交比不变形远离,P1A/AD在像素坐标中的比例和世界坐标中的比例相同,可以计算出P1点的世界坐标,同理可获得P2、P3、P4和P5点的世界坐标,即获得所述第一参考点的世界坐标。
进一步的,根据所述第一转换矩阵、所述第一参考点在所述第一图像中的像素坐标,所述第一参考点的世界坐标可计算所述第一参考点的相机坐标。
步骤S50,获取所述相机在第二位置时所采集到的所述标靶的第二图像,其中,所述第一位置和第二位置为所述相机相对于所述标靶所在的位置,并且所述第一位置和第二位置不相同。
所述第二位置为所述相机相对于所述标靶的位置,所述第一位置和第二位置不相同是指相机相对于标靶的位置不相同,而不是相机在世界坐标中的位置不相同。
需要说明的是:在采集第二图像时,也需要先启动激光器以使激光器所输出的激光打到标靶平面上形成第二激光线,从而使得所采集到的第二图像包含第二激光线。此外,由于第一位置和第二位置不相同,因此,标靶平面与激光平面相交的直线的位置不相同,该两条相交的直线就是第一激光线和第二激光 线。
步骤S60,根据所述第二图像,识别所述激光打在所述标靶时形成的第二激光线。第二激光线是指激光在标靶平面上形成的线条。为了更好地采集第二激光线,可以先关闭所述补光灯,待所述标靶上的标定点在相机图像中消失时再开启激光,此时激光的漫反射进入相机,相机就只抓取包含激光线的第二图像。而在该第二图像由于只包含第二激光线,因此,从第二图像中识别出第二激光线更方便。当然,所述第二图像也可以是在补光灯开启的前提下采集到的图像,此时,第二图像包含标靶的全景,即包含标定点,又包含第二激光线。
值得说明的是:从第二图像中识别第二激光线的识别算法,可以采用现有算法实现,其不在本发明的保护范围之内。
步骤S70,在所述第二激光线中选定第二参考点,并且确定所述第二参考点在所述第二图像中的像素坐标。
所述第二参考点为所述第二激光线与所述标靶上的多个标定点的连线的交点。请参阅图7,步骤S70包括:
步骤S701,从所述第二激光线选取至少两个第二拟合点,并且获取所述至少两个第二拟合点在所述第二图像中的像素坐标。
所述第二拟合点为所述第二激光线上的点,所述第二拟合点的数量至少为两个。
步骤S702,根据所述至少两个第二拟合点在所述第二图像中的像素坐标,拟合所述第二激光线的像素直线方程。
其中,拟合所述第二激光线的像素直线方程如下:
y=ax+b
可以理解的是:通过增加所述第二拟合点的数量,可提高拟合所述第二激光线的精度。
步骤S703,获取所述标靶上设置的多个标定点在所述第二图像中的像素坐标。
需要说明的是,若所述第二图像为包含标靶和第二激光线的全景图像,则可从所述第二图像中直接获取所述标靶上设置的多个标定点在所述第二图像中的像素坐标。若所述第二图像为仅包含所述第二激光线的图像,则需要打开补光灯,重新获取所述相机在第二位置时所采集到的所述标靶的第二图像。
步骤S704,根据所述多个标定点在所述第二图像中的像素坐标,拟合第二靶线的像素直线方程,其中,所述第二靶线是由所述多个标定点中至少两个标定点连接而成,并且所述第二靶线与所述第二激光线相交。
标靶平面上的标定点的数量是多个的,多个标定点可按矩阵的方式排列,例如:按5*5矩阵排列、4*4矩阵排列等等。当激光在标靶平面形成第二激光线时,第二激光线呈横向放置,与纵列的标定点连线形成第二靶线相交。
步骤S705,将所述第二靶线与所述第二激光线的交点作为所述第二参考点,并且根据所述第二激光线的像素直线方程和第二靶线的像素直线方程,计 算所述第二参考点在所述第二图像的像素坐标。
步骤S80,将所述第二参考点在所述第二图像中的像素坐标转换为相机坐标;
当相机位于第二位置时,图像上的点的像素坐标和相机坐标的转换矩阵是相同的。因此,可以先确定该转换矩阵,当识别到第二参考点时,再根据该转换矩阵,将第二参考点的像素坐标转换为相机坐标,具体的,请参阅图8,步骤S80包括:
步骤S801,获取所述相机在所述第二位置时的第二转换矩阵,其中,所述第一转换矩阵和第二转换矩阵用于将像素坐标转换为相机坐标。
在一些实施例中,所述获取所述相机在所述第二位置时的第二转换矩阵的步骤,其中,所述第一转换矩阵和第二转换矩阵用于将像素坐标转换为相机坐标,具体包括:获取所述标靶上设置的多个标定点在所述第二图像中的像素坐标;根据所述多个标定点在第二图像中的像素坐标,获取所述多个标定点对应的第二相机坐标;获取所述相机在所述第二位置时所述多个标定点的第二世界坐标;根据所述多个标定点在所述第二图像中的像素坐标、第二世界坐标以及第二相机坐标,确定所述第二转换矩阵。
其中,可通过所述激光标定系统内置的图像处理软件根据所述多个标定点在第二图像中的像素坐标,获取所述多个标定点对应的第二相机坐标。所述图像处理软件可以是OpenCV或者Mathlab等。
需要说明的是:当相机位于第二位置时,通过所述第二位置相对于所述第一位置的位移以及所述多个标定点的第一世界坐标可获得所述多个标定点的第二世界坐标。
其中,所述第二转换矩阵包括相机的内参矩阵A和第二外参矩阵V 2,所述第二外参矩阵V 2包括第二旋转矩阵R 2和第二转移向量T 2,所述根据所述多个标定点在所述第二图像的像素坐标、第二世界坐标以及第二相机坐标,确定所述第二转换矩阵的计算公式如下:
Figure PCTCN2021100796-appb-000007
所述(u 2,v 2)为所述多个标定点在所述第二图像中的像素坐标,所述(X 2,Y 2,Z 2)为所述多个标定点的第二世界坐标,所述(x 2,y 2,z 2)为所述多个标定点的第二相机坐标,其中,所述内参矩阵A为已知数。
步骤S802,根据所述第二转换矩阵和所述第二参考点在所述第二图像中的像素坐标,计算所述第二参考点的相机坐标。
其中,计算所述第二参考点的相机坐标的过程与确定第二转换矩阵的过程是相反的过程。所述第二参考点的相机坐标的计算公式如下:
Figure PCTCN2021100796-appb-000008
所述(u 4,v 4)为步骤S70中确定的所述第二参考点在所述第二图像中的像素坐标,所述(X 4,Y 4,Z 4)为所述第二参考点的世界坐标,所述(x 4,y 4,z 4)为所述第二参考点的相机坐标,其中,所述内参矩阵A为已知数,所述第二旋转矩阵R 2和第二转移向量T 2由步骤S801获得。
由于所述第二参考点为所述第二靶线与所述第二激光线的交点,在一些实施例中,根据交比不变形原理,可通过所述第二参考点的像素坐标获取所述第二参考点的世界坐标。具体的,可参考通过所述第一参考点的像素坐标获取所述第一参考点的世界坐标的方法,此处不再一一赘述。
进一步的,根据所述第二转换矩阵、所述第二参考点在所述第二图像中的像素坐标,所述第二参考点的世界坐标可计算所述第二参考点的相机坐标。
步骤S90,根据所述第一参考点和第二参考点的相机坐标,确定所述激光器所输出的激光所在的激光平面在相机坐标系中的平面方程。其中,计算激光平面在相机坐标系中的平面方程如下:
Ax+By+Cz+D=0
在本发明实施例中,通过获取所述相机在第一位置时所采集到的所述标靶的第一图像;根据所述第一图像,识别所述激光打在所述标靶时形成的第一激光线;在所述第一激光线中选定第一参考点,并且确定所述第一参考点在所述第一图像中的像素坐标;将所述第一参考点在所述第一图像中的像素坐标转换为相机坐标;获取所述相机在第二位置时所采集到的所述标靶的第二图像,其中,所述第一位置和第二位置为所述相机相对于所述标靶所在的位置,并且所述第一位置和第二位置不相同;根据所述第二图像,识别所述激光打在所述标靶时形成的第二激光线;在所述第二激光线中选定第二参考点,并且确定所述第二参考点在所述第二图像中的像素坐标;将所述第二参考点在所述第二图像中的像素坐标转换为相机坐标;根据所述第一参考点和第二参考点的相机坐标,确定所述激光器所输出的激光所在的激光平面在相机坐标系中的平面方程,可实现对所述激光标定系统的标定,非常快捷方便。
实施例二
请参阅图9,图9是本发明实施例提供的一种激光标定系统的标定装置的示意图,所述标定装置400包括第一获取模块401、第一识别模块402、第一确定模块403、第一转换模块404、第二获取模块405、第二识别模块406、第二确定模块407、第二转换模块408以及第三确定模块409。其中,第一获取模块401,用于获取所述相机在第一位置时所采集到的所述标靶的第一图像;第一识别模块402,用于根据所述第一图像,识别所述激光打在所述标靶时形成的第一激光线;第一确定模块403,用于在所述第一激光线中选定第一参考 点,并且确定所述第一参考点在所述第一图像中的像素坐标;第一转换模块404,用于将所述第一参考点在所述第一图像中的像素坐标转换为相机坐标;第二获取模块405,用于获取所述相机在第二位置时所采集到的所述标靶的第二图像,其中,所述第一位置和第二位置为所述相机相对于所述标靶所在的位置,并且所述第一位置和第二位置不相同;第二识别模块406,用于根据所述第二图像,识别所述激光打在所述标靶时形成的第二激光线;第二确定模块407,用于在所述第二激光线中选定第二参考点,并且确定所述第二参考点在所述第二图像中的像素坐标;第二转换模块408,用于将所述第二参考点在所述第二图像中的像素坐标转换为相机坐标;第三确定模块409,用于根据所述第一参考点和第二参考点的相机坐标,确定所述激光器所输出的激光所在的激光平面在相机坐标系中的平面方程。
在一些实施例中,所述第一转换模块404包括:第一获取单元4041和第一计算单元4042。其中,第一获取单元4041,用于获取所述相机在所述第一位置时的第一转换矩阵;第一计算单元4042,用于根据所述第一转换矩阵和所述第一参考点在所述第一图像中的像素坐标,计算所述第一参考点的相机坐标。
在一些实施例中,所述第二转换模块408包括:第二获取单元4081和第二计算单元4082。其中,第二获取单元4081,获取所述相机在第二位置时的第二转换矩阵,其中,所述第一转换矩阵和第二转换矩阵用于将像素坐标转换为相机坐标;第二计算单元4082,根据所述第二转换矩阵和所述第二参考点在所述第二图像中的像素坐标,计算所述第二参考点的相机坐标。
在一些实施例中,所述第一获取单元4041具体用于:获取所述标靶上设置的多个标定点在所述第一图像中的像素坐标;根据所述多个标定点在第一图像中的像素坐标,获取所述多个标定点对应的第一相机坐标;获取所述相机在所述第一位置时所述多个标定点的第一世界坐标;根据所述多个标定点在所述第一图像中的像素坐标、第一世界坐标以及第一相机坐标,确定所述第一转换矩阵。
在一些实施例中,所述第一转换矩阵包括相机的内参矩阵A和第一外参矩阵V 1,所述第一外参矩阵V 1包括第一旋转矩阵R 1和第一转移向量T 1,所述根据所述多个标定点在所述第一图像的像素坐标、第一世界坐标以及第一相机坐标,确定所述第一转换矩阵的计算公式如下:
Figure PCTCN2021100796-appb-000009
所述(u 1,v 1)为所述多个标定点在所述第一图像中的像素坐标,所述(X 1,Y 1,Z 1)为所述多个标定点的第一世界坐标,所述(x 1,y 1,z 1)为所述多个标定点的第一相机坐标,其中,所述内参矩阵A为已知数。
在一些实施例中,第一确定模块403包括:第三获取单元4031、第一拟 合单元4032、第四获取单元4033、第二拟合单元4034以及第三计算单元4035。其中,第三获取单元4031,用于从所述第一激光线选取至少两个第一拟合点,并且获取所述至少两个第一拟合点在所述第一图像中的像素坐标;第一拟合单元4032,用于根据所述至少两个第一拟合点在所述第一图像中的像素坐标,拟合所述第一激光线的像素直线方程;第四获取单元4033,用于获取所述标靶上设置的多个标定点在所述第一图像中的像素坐标;第二拟合单元4034,用于根据所述多个标定点在所述第一图像中的像素坐标,拟合第一靶线的像素直线方程,其中,所述第一靶线是由所述多个标定点中至少两个标定点连接而成,并且所述第一靶线与所述第一激光线相交;第三计算单元4035,用于将所述第一靶线与所述第一激光线的交点作为所述第一参考点,并且根据所述第一激光线的像素直线方程和第一靶线的像素直线方程,计算所述第一参考点在所述第一图像的像素坐标。
在一些实施例中,所述第二获取单元4081具体用于:获取所述标靶上设置的多个标定点在所述第二图像中的像素坐标;根据所述多个标定点在第二图像中的像素坐标,获取所述多个标定点对应的第二相机坐标;获取所述相机在所述第二位置时所述多个标定点的第二世界坐标;根据所述多个标定点在所述第二图像中的像素坐标、第二世界坐标以及第二相机坐标,确定所述第二转换矩阵。
在一些实施例中,所述第二转换矩阵包括相机的内参矩阵A和第二外参矩阵V 2,所述第二外参矩阵V 2包括第二旋转矩阵R 2和第二转移向量T 2,所述根据所述多个标定点在所述第二图像的像素坐标、第二世界坐标以及第二相机坐标,确定所述第二转换矩阵的计算公式如下:
Figure PCTCN2021100796-appb-000010
所述(u 2,v 2)为所述多个标定点在所述第二图像中的像素坐标,所述(X 2,Y 2,Z 2)为所述多个标定点的第二世界坐标,所述(x 2,y 2,z 2)为所述多个标定点的第二相机坐标,其中,所述内参矩阵A为已知数。
在一些实施例中,所述第二确定模块407包括:第五获取单元4071、第三拟合单元4072、第六获取单元4073、第四拟合单元4074以及第四计算单元4075。其中,第五获取单元4071,用于从所述第二激光线选取至少两个第二拟合点,并且获取所述至少两个第二拟合点在所述第二图像中的像素坐标;第三拟合单元4072,用于根据所述至少两个第二拟合点在所述第二图像中的像素坐标,拟合所述第二激光线的像素直线方程;第六获取单元4073,用于获取所述标靶上设置的多个标定点在所述第二图像中的像素坐标;第四拟合单元4074,用于根据所述多个标定点在所述第二图像中的像素坐标,拟合第二靶线的像素直线方程,其中,所述第二靶线是由所述多个标定点中至少两个标定点连接而成,并且所述第二靶线与所述第二激光线相交;第四计算单元4075, 用于将所述第二靶线与所述第二激光线的交点作为所述第二参考点,并且根据所述第二激光线的像素直线方程和第二靶线的像素直线方程,计算所述第二参考点在所述第二图像的像素坐标。
在本发明实施例中,通过第一获取模块,获取所述相机在第一位置时所采集到的所述标靶的第一图像;通过第一识别模块,根据所述第一图像,识别所述激光打在所述标靶时形成的第一激光线;通过一确定模块,在所述第一激光线中选定第一参考点,并且确定所述第一参考点在所述第一图像中的像素坐标;通过第一转换模块,将所述第一参考点在所述第一图像中的像素坐标转换为相机坐标;通过第二获取模块,获取所述相机在第二位置时所采集到的所述标靶的第二图像,其中,所述第一位置和第二位置为所述相机相对于所述标靶所在的位置,并且所述第一位置和第二位置不相同;通过第二识别模块,根据所述第二图像,识别所述激光打在所述标靶时形成的第二激光线;通过第二确定模块,在所述第二激光线中选定第二参考点,并且确定所述第二参考点在所述第二图像中的像素坐标;通过第二转换模块,将所述第二参考点在所述第二图像中的像素坐标转换为相机坐标;通过第三确定模块,根据所述第一参考点和第二参考点的相机坐标,确定所述激光器所输出的激光所在的激光平面在相机坐标系中的平面方程,从而实现对所述激光标定系统的标定,非常方便快捷。
实施例三
请参阅图10,图10是是本发明实施例提供的执行激光标定系统的标定方法的控制器的硬件结构示意图。控制器105包括:一个或多个处理器1051以及存储器1052,图10中以一个存储器为例。
处理器1051和存储器1052可以通过总线或者其他方式连接,图10中以通过总线连接为例。
存储器1052作为一种非易失性计算机可读存储介质,可用于存储非易失性软件程序、非易失性计算机可执行程序以及模块,如本发明实施例中的激光标定系统的标定方法对应的程序指令/模块(例如,附图9所示的各个模块)。处理器1051通过运行存储在存储器1052中的非易失性软件程序、指令以及模块,从而执行激光标定系统的标定装置的各种功能应用以及数据处理,即实现上述方法实施例的激光标定系统的标定方法。
存储器1052可以包括存储程序区和存储数据区,其中,存储程序区可存储操作系统、至少一个功能所需要的应用程序;存储数据区可存储根据激光标定系统的标定装置的使用所创建的数据等。此外,存储器1052可以包括高速随机存取存储器,还可以包括非易失性存储器,例如至少一个磁盘存储器件、闪存器件、或其他非易失性固态存储器件。在一些实施例中,存储器1052可选包括相对于处理器1051远程设置的存储器,这些远程存储器可以通过网络连接至激光标定系统的标定装置。上述网络的实例包括但不限于互联网、企业内部网、局域网、移动通信网及其组合。
所述一个或者多个模块存储在所述存储器1052中,当被所述一个或者多个处理器1051执行时,执行上述任意方法实施例中的激光标定系统的标定方法。
上述产品可执行本发明实施例所提供的方法,具备执行方法相应的功能模块和有益效果。未在本实施例中详尽描述的技术细节,可参见本发明实施例所提供的方法。
本发明实施例提供了一种非易失性计算机可读存储介质,所述非易失性计算机可读存储介质存储有计算机可执行指令,该计算机可执行指令被电子设备执行上述任意方法实施例中的激光标定系统的标定方法。
本发明实施例提供了一种计算机程序产品,包括存储在非易失性计算机可读存储介质上的计算程序,所述计算机程序包括程序指令,当所述程序指令被计算机执行时时,使所述计算机执行上述任意方法实施例中的激光标定系统的标定方法。
通过以上的实施方式的描述,本领域普通技术人员可以清楚地了解到各实施方式可借助软件加通用硬件平台的方式来实现,当然也可以通过硬件来实现。本领域普通技术人员可以理解实现上述实施例方法中的全部或部分流程是可以通过计算机程序来指令相关的硬件来完成,所述的程序可存储于一计算机可读取存储介质中,该程序在执行时,可包括如上述各方法的实施例的流程。其中,所述的存储介质可为磁碟、光盘、只读存储记忆体(Read-Only Memory,ROM)或随机存储记忆体(Random Access Memory,RAM)等。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;在本发明的思路下,以上实施例或者不同实施例中的技术特征之间也可以进行组合,步骤可以以任意顺序实现,并存在如上所述的本发明的不同方面的许多其它变化,为了简明,它们没有在细节中提供;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。

Claims (15)

  1. 一种激光标定系统的标定方法,所述激光标定系统包括激光器、相机、标靶和支架,所述激光器和相机均固定于所述支架,所述激光器所输出的激光打在所述标靶,其特征在于,所述方法包括:
    获取所述相机在第一位置时所采集到的所述标靶的第一图像;
    根据所述第一图像,识别所述激光打在所述标靶时形成的第一激光线;
    在所述第一激光线中选定第一参考点,并且确定所述第一参考点在所述第一图像中的像素坐标;
    将所述第一参考点在所述第一图像中的像素坐标转换为相机坐标;
    获取所述相机在第二位置时所采集到的所述标靶的第二图像,其中,所述第一位置和第二位置为所述相机相对于所述标靶所在的位置,并且所述第一位置和第二位置不相同;
    根据所述第二图像,识别所述激光打在所述标靶时形成的第二激光线;
    在所述第二激光线中选定第二参考点,并且确定所述第二参考点在所述第二图像中的像素坐标;
    将所述第二参考点在所述第二图像中的像素坐标转换为相机坐标;
    根据所述第一参考点和第二参考点的相机坐标,确定所述激光器所输出的激光所在的平面在相机坐标系中的平面方程。
  2. 根据权利要求1所述的标定方法,其特征在于,
    所述将所述第一参考点在所述第一图像中的像素坐标转换为相机坐标的步骤,进一步包括:
    获取所述相机在所述第一位置时的第一转换矩阵;
    根据所述第一转换矩阵和所述第一参考点在所述第一图像中的像素坐标,计算所述第一参考点的相机坐标;
    所述将所述第二参考点在所述第二图像中的像素坐标转换为相机坐标的步骤,进一步包括:
    获取所述相机在第二位置时的第二转换矩阵,其中,所述第一转换矩阵和第二转换矩阵用于将像素坐标转换为相机坐标;
    根据所述第二转换矩阵和所述第二参考点在所述第二图像中的像素坐标,计算所述第二参考点的相机坐标。
  3. 根据权利要求2所述的标定方法,其特征在于,所述获取所述相机在所述第一位置时的第一转换矩阵的步骤,进一步包括:
    获取所述标靶上设置的多个标定点在所述第一图像中的像素坐标;
    根据所述多个标定点在第一图像中的像素坐标,获取所述多个标定点对应的第一相机坐标;
    获取所述相机在所述第一位置时所述多个标定点的第一世界坐标;
    获取所述多个标定点的世界坐标;
    根据所述多个标定点在所述第一图像中的像素坐标、第一世界坐标以及第一相机坐标,确定所述第一转换矩阵。
  4. 根据权利要求3所述的标定方法,其特征在于,所述第一转换矩阵包括相机的内参矩阵A和第一外参矩阵V 1,所述第一外参矩阵V 1包括第一旋转矩阵R 1和第一转移向量T 1,所述根据所述多个标定点在所述第一图像的像素坐标、第一世界坐标以及第一相机坐标,确定所述第一转换矩阵的计算公式如下:
    Figure PCTCN2021100796-appb-100001
    所述(u 1,v 1)为所述多个标定点在所述第一图像中的像素坐标,所述(X 1,Y 1,Z 1)为所述多个标定点的第一世界坐标,所述(x 1,y 1,z 1)为所述多个标定点的第一相机坐标,其中,所述内参矩阵A为已知数。
  5. 根据权利要求1-4中任意一项所述的标定方法,其特征在于,所述在所述第一激光线中选定第一参考点,并且确定所述第一参考点在所述第一图像中的像素坐标的步骤,进一步包括:
    从所述第一激光线选取至少两个第一拟合点,并且获取所述至少两个第一拟合点在所述第一图像中的像素坐标;
    根据所述至少两个第一拟合点在所述第一图像中的像素坐标,拟合所述第一激光线的像素直线方程;
    获取所述标靶上设置的多个标定点在所述第一图像中的像素坐标;
    根据所述多个标定点在所述第一图像中的像素坐标,拟合第一靶线的像素直线方程,其中,所述第一靶线是由所述多个标定点中至少两个标定点连接而成,并且所述第一靶线与所述第一激光线相交;
    将所述第一靶线与所述第一激光线的交点作为所述第一参考点,并且根据所述第一激光线的像素直线方程和第一靶线的像素直线方程,计算所述第一参考点在所述第一图像的像素坐标。
  6. 根据权利要求2所述的标定方法,其特征在于,所述获取所述相机在所述第二位置时的第二转换矩阵的步骤,进一步包括:
    获取所述标靶上设置的多个标定点在所述第二图像中的像素坐标;
    根据所述多个标定点在第二图像中的像素坐标,获取所述多个标定点对应的第二相机坐标;
    获取所述相机在所述第二位置时所述多个标定点的第二世界坐标;
    获取所述多个标定点的世界坐标;
    根据所述多个标定点在所述第二图像中的像素坐标、第二世界坐标以及第二相机坐标,确定所述第二转换矩阵。
  7. 根据权利要求6所述的标定方法,其特征在于,所述第二转换矩阵包括相机的内参矩阵A和第二外参矩阵V 2,所述第二外参矩阵V 2包括第二旋转矩阵R 2和第二转移向量T 2,所述根据所述多个标定点在所述第二图像的像素坐标、第二世界坐标以及第二相机坐标,确定所述第二转换矩阵的计算公式如下:
    Figure PCTCN2021100796-appb-100002
    所述(u 2,v 2)为所述多个标定点在所述第二图像中的像素坐标,所述(X 2,Y 2,Z 2)为所述多个标定点的第二世界坐标,所述(x 2,y 2,z 2)为所述多个标定点的第二相机坐标,其中,所述内参矩阵A为已知数。
  8. 根据权利要求1、2、3、4、6和7中任意一项所述的标定方法,其特征在于,所述在所述第二激光线中选定第二参考点,并且确定所述第二参考点在所述第二图像中的像素坐标的步骤,进一步包括:
    从所述第二激光线选取至少两个第二拟合点,并且获取所述至少两个第二拟合点在所述第二图像中的像素坐标;
    根据所述至少两个第二拟合点在所述第二图像中的像素坐标,拟合所述第二激光线的像素直线方程;
    获取所述标靶上设置的多个标定点在所述第二图像中的像素坐标;
    根据所述多个标定点在所述第二图像中的像素坐标,拟合第二靶线的像素直线方程,其中,所述第二靶线是由所述多个标定点中至少两个标定点连接而成,并且所述第二靶线与所述第二激光线相交;
    将所述第二靶线与所述第二激光线的交点作为所述第二参考点,并且根据所述第二激光线的像素直线方程和第二靶线的像素直线方程,计算所述第二参考点在所述第二图像的像素坐标。
  9. 一种激光标定系统的标定装置,其特征在于,包括:
    第一获取模块,用于获取所述相机在第一位置时所采集到的所述标靶的第一图像;
    第一识别模块,用于根据所述第一图像,识别所述激光打在所述标靶时形成的第一激光线;
    第一确定模块,用于在所述第一激光线中选定第一参考点,并且确定所述第一参考点在所述第一图像中的像素坐标;
    第一转换模块,用于将所述第一参考点在所述第一图像中的像素坐标转换为相机坐标;
    第二获取模块,用于获取所述相机在第二位置时所采集到的所述标靶的第二图像,其中,所述第一位置和第二位置为所述相机相对于所述标靶所在的位置,并且所述第一位置和第二位置不相同;
    第二识别模块,用于根据所述第二图像,识别所述激光打在所述标靶时形成的第二激光线;
    第二确定模块,用于在所述第二激光线中选定第二参考点,并且确定所述第二参考点在所述第二图像中的像素坐标;
    第二转换模块,用于将所述第二参考点在所述第二图像中的像素坐标转换为相机坐标;
    第三确定模块,用于根据所述第一参考点和第二参考点的相机坐标,确定所述激光器所输出的激光所在的平面在相机坐标系中的平面方程。
  10. 一种激光标定系统,其特征在于,包括:
    标靶;
    支架;
    激光器,固定于所述支架上,所述激光器所输出的激光打在所述标靶;
    相机,固定于所述支架上,所述相机用于拍摄所述标靶的图像;
    控制器,包括至少一个处理器以及存储器,所述存储器和相机均与所述至少一个处理器通信连接,所述存储器存储有可被所述至少一个处理器执行的指令,所述指令被所述至少一个处理器执行,以使所述至少一个处理器能够执行权利要求1-8中任一项所述的方法。
  11. 根据权利要求10所述的激光标定系统,其特征在于,还包括补光灯和滤波片;
    所述补光灯固定于所述支架,所述补光灯用于向所述标靶输出照明光源,所述滤波片设置于所述相机的取景镜头上,其中,所述滤波片允许通过的光源的波长与所述补光灯所输出的照明光源的波长相同。
  12. 根据权利要求10所述的激光标定系统,其特征在于,所述标靶上涂覆有反光材料。
  13. 根据权利要求12所述的激光标定系统,其特征在于,所述标靶的标靶平面划分标定点区域和背景区域,其中,所述标定点区域和背景区域的颜色不相同,所述反光材料涂覆于所述背景区域。
  14. 根据权利要求10-13中任意一项所述的激光标定系统,其特征在于,还包括基台和位姿调整装置;
    所述标靶和位姿调整装置均设置于所述基台上,所述支架设置于所述位姿 调整装置上,所述位姿调整装置用于调整所述支架的位置,以调整所述相机相对于所述标靶所在的位置。
  15. 根据权利要求14所述的激光标定系统,其特征在于,所述位姿调整装置包括固定座和若干垫片;
    所述若干垫片叠置于所述基台上,所述固定座设置于所述若干垫片上,所述固定座设置有固定槽,所述支架的一端插接于所述固定槽内。
PCT/CN2021/100796 2020-06-24 2021-06-18 一种激光标定系统的标定方法、装置以及激光标定系统 Ceased WO2021259151A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010590850.7 2020-06-24
CN202010590850.7A CN111739104B (zh) 2020-06-24 2020-06-24 一种激光标定系统的标定方法、装置以及激光标定系统

Publications (1)

Publication Number Publication Date
WO2021259151A1 true WO2021259151A1 (zh) 2021-12-30

Family

ID=72652078

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/100796 Ceased WO2021259151A1 (zh) 2020-06-24 2021-06-18 一种激光标定系统的标定方法、装置以及激光标定系统

Country Status (2)

Country Link
CN (1) CN111739104B (zh)
WO (1) WO2021259151A1 (zh)

Cited By (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114862788A (zh) * 2022-04-29 2022-08-05 湖南联智科技股份有限公司 一种三维激光扫描的平面标靶坐标自动识别方法
CN115035204A (zh) * 2022-06-15 2022-09-09 北京机科国创轻量化科学研究院有限公司 一种基于双线激光双目视觉的圆柱件定位方法
CN115265371A (zh) * 2022-06-26 2022-11-01 太原科技大学 一种基于线结构光的钢板在线实时测量方法
CN115307570A (zh) * 2022-06-27 2022-11-08 北京工业大学 一种u槽平面式线激光传感器位姿标定件及标定方法
CN115307572A (zh) * 2022-06-27 2022-11-08 北京工业大学 一种定宽平面式线激光传感器位姿标定件及标定方法
CN115307571A (zh) * 2022-06-27 2022-11-08 北京工业大学 一种平面式线激光传感器位姿标定件及标定方法
CN115564941A (zh) * 2022-09-14 2023-01-03 蔚来汽车科技(安徽)有限公司 图像采集装置和方法、用于车内座舱的图像处理系统
CN115690229A (zh) * 2022-10-31 2023-02-03 北京信息科技大学 一种基于二维标靶的线结构光平面现场标定方法
CN115808137A (zh) * 2022-12-19 2023-03-17 山东科技大学 一种标志点辅助双目视觉的液压支架群直线度检测方法
CN115953474A (zh) * 2022-10-11 2023-04-11 梅卡曼德(北京)机器人科技有限公司 参数标定方法、三维重建方法及电子设备、存储介质
CN116182703A (zh) * 2023-01-31 2023-05-30 桂林电子科技大学 一种线结构光传感器标定方法及系统
WO2023165632A1 (zh) * 2022-03-01 2023-09-07 中国科学院自动化研究所 基于振镜相机的主动视觉三维标定方法、系统和设备
CN116736259A (zh) * 2023-07-20 2023-09-12 北京东土科技股份有限公司 一种用于塔吊自动驾驶的激光点云坐标标定的方法及装置
CN116901430A (zh) * 2023-08-10 2023-10-20 奥比中光科技集团股份有限公司 3d打印机及激光轮廓仪的工作方法
CN119681455A (zh) * 2024-12-12 2025-03-25 深圳镁伽科技有限公司 激光加工参数的确定方法、激光加工的控制方法及装置

Families Citing this family (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111739104B (zh) * 2020-06-24 2024-05-03 深圳市道通科技股份有限公司 一种激光标定系统的标定方法、装置以及激光标定系统
CN112184836B (zh) * 2020-10-16 2024-08-16 深圳市道通科技股份有限公司 一种相机标定的方法及相机标定设备
CN112270719B (zh) * 2020-12-21 2021-04-02 苏州挚途科技有限公司 相机标定方法、装置及系统
CN113808214B (zh) * 2021-08-24 2024-07-05 东莞固高自动化技术有限公司 相机标定设备、相机生产系统、相机及其标定方法
CN116138878B (zh) * 2022-12-05 2026-04-10 佗道医疗科技有限公司 一种激光导航标定方法
CN117437294B (zh) * 2023-08-30 2025-04-25 上海同陆云交通科技有限公司 一种基于线激光设备的相机外参标定方法及系统

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8049779B2 (en) * 2004-05-24 2011-11-01 Centre De Recherche Industrielle Du Quebec Camera calibrating apparatus and method
CN104197960A (zh) * 2014-09-15 2014-12-10 北京航空航天大学 一种激光跟踪仪视觉导引摄像机的全局标定方法
CN105091782A (zh) * 2015-05-29 2015-11-25 南京邮电大学 一种基于双目视觉的多线激光器光平面标定方法
CN106056620A (zh) * 2016-06-13 2016-10-26 西南科技大学 用于线激光位置标定的标定板及线激光相机测量系统标定方法
CN110245599A (zh) * 2019-06-10 2019-09-17 深圳市超准视觉科技有限公司 一种智能三维焊缝自主寻迹方法
CN111062992A (zh) * 2019-11-14 2020-04-24 杭州电子科技大学 一种双视角线激光扫描三维成像装置及方法
CN111739104A (zh) * 2020-06-24 2020-10-02 深圳市道通科技股份有限公司 一种激光标定系统的标定方法、装置以及激光标定系统

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2013122434A (ja) * 2011-12-12 2013-06-20 Itt:Kk レーザーを用いた単眼カメラによる3次元形状位置計測装置,3次元形状位置計測処理方法および3次元形状位置計測処理プログラム
CN102794763B (zh) * 2012-08-31 2014-09-24 江南大学 基于线结构光视觉传感器引导的焊接机器人系统标定方法
CN107121109B (zh) * 2017-06-12 2019-12-06 北京航空航天大学 一种基于前镀膜平面镜的结构光参数标定装置及方法
CN109211264B (zh) * 2017-07-06 2021-04-30 杭州海康机器人技术有限公司 测量系统的标定方法、装置、电子设备及可读存储介质
CN110322513B (zh) * 2018-03-30 2022-03-04 杭州海康威视数字技术股份有限公司 一种相机外参标定方法、装置及电子设备
CN109946680B (zh) * 2019-02-28 2021-07-09 北京旷视科技有限公司 探测系统的外参数标定方法、装置、存储介质及标定系统
CN110031824B (zh) * 2019-04-12 2020-10-30 杭州飞步科技有限公司 激光雷达联合标定方法及装置
CN110118528B (zh) * 2019-04-29 2020-11-06 天津大学 一种基于棋盘靶标的线结构光标定方法

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8049779B2 (en) * 2004-05-24 2011-11-01 Centre De Recherche Industrielle Du Quebec Camera calibrating apparatus and method
CN104197960A (zh) * 2014-09-15 2014-12-10 北京航空航天大学 一种激光跟踪仪视觉导引摄像机的全局标定方法
CN105091782A (zh) * 2015-05-29 2015-11-25 南京邮电大学 一种基于双目视觉的多线激光器光平面标定方法
CN106056620A (zh) * 2016-06-13 2016-10-26 西南科技大学 用于线激光位置标定的标定板及线激光相机测量系统标定方法
CN110245599A (zh) * 2019-06-10 2019-09-17 深圳市超准视觉科技有限公司 一种智能三维焊缝自主寻迹方法
CN111062992A (zh) * 2019-11-14 2020-04-24 杭州电子科技大学 一种双视角线激光扫描三维成像装置及方法
CN111739104A (zh) * 2020-06-24 2020-10-02 深圳市道通科技股份有限公司 一种激光标定系统的标定方法、装置以及激光标定系统

Cited By (17)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2023165632A1 (zh) * 2022-03-01 2023-09-07 中国科学院自动化研究所 基于振镜相机的主动视觉三维标定方法、系统和设备
CN114862788A (zh) * 2022-04-29 2022-08-05 湖南联智科技股份有限公司 一种三维激光扫描的平面标靶坐标自动识别方法
CN114862788B (zh) * 2022-04-29 2024-05-24 湖南联智科技股份有限公司 一种三维激光扫描的平面标靶坐标自动识别方法
CN115035204A (zh) * 2022-06-15 2022-09-09 北京机科国创轻量化科学研究院有限公司 一种基于双线激光双目视觉的圆柱件定位方法
CN115265371A (zh) * 2022-06-26 2022-11-01 太原科技大学 一种基于线结构光的钢板在线实时测量方法
CN115307570A (zh) * 2022-06-27 2022-11-08 北京工业大学 一种u槽平面式线激光传感器位姿标定件及标定方法
CN115307572A (zh) * 2022-06-27 2022-11-08 北京工业大学 一种定宽平面式线激光传感器位姿标定件及标定方法
CN115307571A (zh) * 2022-06-27 2022-11-08 北京工业大学 一种平面式线激光传感器位姿标定件及标定方法
CN115564941A (zh) * 2022-09-14 2023-01-03 蔚来汽车科技(安徽)有限公司 图像采集装置和方法、用于车内座舱的图像处理系统
CN115953474A (zh) * 2022-10-11 2023-04-11 梅卡曼德(北京)机器人科技有限公司 参数标定方法、三维重建方法及电子设备、存储介质
CN115690229A (zh) * 2022-10-31 2023-02-03 北京信息科技大学 一种基于二维标靶的线结构光平面现场标定方法
CN115808137A (zh) * 2022-12-19 2023-03-17 山东科技大学 一种标志点辅助双目视觉的液压支架群直线度检测方法
CN116182703B (zh) * 2023-01-31 2024-05-03 桂林电子科技大学 一种线结构光传感器标定方法及系统
CN116182703A (zh) * 2023-01-31 2023-05-30 桂林电子科技大学 一种线结构光传感器标定方法及系统
CN116736259A (zh) * 2023-07-20 2023-09-12 北京东土科技股份有限公司 一种用于塔吊自动驾驶的激光点云坐标标定的方法及装置
CN116901430A (zh) * 2023-08-10 2023-10-20 奥比中光科技集团股份有限公司 3d打印机及激光轮廓仪的工作方法
CN119681455A (zh) * 2024-12-12 2025-03-25 深圳镁伽科技有限公司 激光加工参数的确定方法、激光加工的控制方法及装置

Also Published As

Publication number Publication date
CN111739104B (zh) 2024-05-03
CN111739104A (zh) 2020-10-02

Similar Documents

Publication Publication Date Title
WO2021259151A1 (zh) 一种激光标定系统的标定方法、装置以及激光标定系统
CN115830103B (zh) 一种基于单目彩色的透明物体定位方法、装置及存储介质
CN110390719B (zh) 基于飞行时间点云重建设备
JP6363863B2 (ja) 情報処理装置および情報処理方法
CN105258710B (zh) 一种高精度相机主点标定方法
US11403745B2 (en) Method, apparatus and measurement device for measuring distortion parameters of a display device, and computer-readable medium
WO2019105261A1 (zh) 背景虚化处理方法、装置及设备
KR101053506B1 (ko) 어안 렌즈를 구비하는 카메라 모듈에 의해 획득된 영상의 왜곡 보정을 위한 파라미터 조정 방법
CN207766424U (zh) 一种拍摄装置及成像设备
WO2022050279A1 (ja) 三次元計測装置
JP2016100698A (ja) 校正装置、校正方法、プログラム
CN109727290A (zh) 基于单目视觉三角测距法的变焦相机动态标定方法
CN105513074B (zh) 一种羽毛球机器人相机以及车身到世界坐标系的标定方法
US20200193568A1 (en) Multi-projection system, image projection method and projector
CN113281723A (zh) 一种基于AR tag的3D激光雷达与相机间结构参数的标定方法
CN114140534A (zh) 一种用于激光雷达与相机的联合标定方法
CN106500626A (zh) 一种手机立体成像方法及三维成像手机
JP2009276233A (ja) パラメータ計算装置、パラメータ計算システムおよびプログラム
JP6186431B2 (ja) キャリブレーション装置、キャリブレーションシステム、及び撮像装置
EP3688407A1 (en) Light projection systems
WO2016068353A1 (ko) 영상처리기반의 거리 측정장치 및 그 방법
EP4071578A1 (en) Light source control method for vision machine, and vision machine
CN105427302B (zh) 一种基于移动稀疏相机采集阵列的三维采集及重建系统
CN119246524B (zh) 一种基于俯仰角校准图像的视觉检测信息采集装置及方法
CN109741384B (zh) 深度相机的多距离检测装置及方法

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: 21828644

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21828644

Country of ref document: EP

Kind code of ref document: A1