CN111595560B - Visual detection method for flatness of line laser - Google Patents

Visual detection method for flatness of line laser Download PDF

Info

Publication number
CN111595560B
CN111595560B CN202010574424.4A CN202010574424A CN111595560B CN 111595560 B CN111595560 B CN 111595560B CN 202010574424 A CN202010574424 A CN 202010574424A CN 111595560 B CN111595560 B CN 111595560B
Authority
CN
China
Prior art keywords
line
laser
image
flatness
laser bar
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.)
Active
Application number
CN202010574424.4A
Other languages
Chinese (zh)
Other versions
CN111595560A (en
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.)
Yi Si Si Hangzhou Technology Co ltd
Original Assignee
Isvision Hangzhou Technology Co 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 Isvision Hangzhou Technology Co Ltd filed Critical Isvision Hangzhou Technology Co Ltd
Priority to CN202010574424.4A priority Critical patent/CN111595560B/en
Publication of CN111595560A publication Critical patent/CN111595560A/en
Application granted granted Critical
Publication of CN111595560B publication Critical patent/CN111595560B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01MTESTING STATIC OR DYNAMIC BALANCE OF MACHINES OR STRUCTURES; TESTING OF STRUCTURES OR APPARATUS, NOT OTHERWISE PROVIDED FOR
    • G01M11/00Testing of optical apparatus; Testing structures by optical methods not otherwise provided for
    • G01M11/02Testing optical properties
    • G01M11/0242Testing optical properties by measuring geometrical properties or aberrations
    • G01M11/0257Testing optical properties by measuring geometrical properties or aberrations by analyzing the image formed by the object to be tested
    • GPHYSICS
    • G01MEASURING; TESTING
    • G01BMEASURING LENGTH, THICKNESS OR SIMILAR LINEAR DIMENSIONS; MEASURING ANGLES; MEASURING AREAS; MEASURING IRREGULARITIES OF SURFACES OR CONTOURS
    • G01B11/00Measuring arrangements characterised by the use of optical techniques
    • G01B11/30Measuring arrangements characterised by the use of optical techniques for measuring roughness or irregularity of surfaces

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Geometry (AREA)
  • Chemical & Material Sciences (AREA)
  • Analytical Chemistry (AREA)
  • Length Measuring Devices By Optical Means (AREA)

Abstract

The invention discloses a visual detection method for the flatness of a line laser, wherein a plane I is arranged right in front of the line laser to be detected, two plumb lines are hung above the plane I, and a laser bar is projected to the plane I by the line laser to be detected; the camera collects laser bar images from a plurality of photographing positions; rotating and shearing each laser bar image to enable the edge of the image to be superposed with the line type I; then making the horizontal coordinates of all points on the inner line type II of all the laser bar images equal; longitudinally splicing the laser bar images to form a spliced image; extracting the light strip central line of the laser strip in the spliced image, obtaining the pixel coordinates of each point on the light strip central line, and calculating the physical coordinates of each point: performing linear fitting on the physical coordinate to obtain a maximum fitting residual value Q as an evaluation parameter; the method effectively evaluates the performance of the line laser, and a tester can select a proper laser according to the requirement according to the calculation result of the maximum residual value or the planeness.

Description

Visual detection method for flatness of line laser
Technical Field
The invention relates to the field of laser vision measurement, in particular to a visual detection method for flatness of a line laser.
Background
The line structured light measurement technology projects line structured light to the surface of a measured object, a camera shoots a laser stripe image, and then a light stripe center extraction algorithm and a camera calibration model jointly calculate three-dimensional coordinate information of the surface of the measured object; with the rapid development of photoelectric sensing technology, computer technology and optical semiconductor technology in recent years, linear structured light measurement is widely applied to the fields of industrial detection, target recognition and reverse engineering due to the characteristics of non-contact efficient real-time measurement.
The line laser is the device that throws line structured light, and under the ideal condition, the laser plane that the line laser throwed is the standard plane of ideal, but because machining error, the assembly error of laser mirror group and semiconductor device's characteristic, the laser plane is not ideal plane, is the curved surface form, handles as the plane with the laser plane in traditional measurement process, can cause the influence to final measurement accuracy, and the measurement visual field is big more, and the influence is big more, and from this can know, the flatness detection to the line laser is the indispensable link of assurance line structured light measurement accuracy.
Disclosure of Invention
Aiming at the problems, the invention provides a visual detection method for the flatness of a line laser, which can effectively evaluate the performance of the line laser, and according to the maximum residual value or the calculation result of the flatness, a tester can select a proper laser as required to perform subsequent operation, thereby avoiding low precision of the subsequent detection result caused by the difference of the flatness, and further playing a role in guaranteeing the line structure light measurement technology.
A visual detection method for the flatness of a line laser comprises the steps that a plane I is arranged right in front of a line laser to be detected, two plumb lines are hung above the plane I, and a laser bar is projected to the plane I by the line laser to be detected;
1) the camera collects and stores laser bar images from a plurality of photographing positions in sequence; the multiple photographing positions are sequentially arranged from top to bottom or from bottom to top along the direction of the laser strip, and a single laser strip image comprises a longitudinal through image: a local laser bar and two local plumb lines;
2) starting from the first laser stripe image, each laser stripe image is processed as follows:
judging whether a local laser bar is positioned between two plumb lines, if so, marking any plumb line as a line type I, and marking the other plumb line as a line type II; if not, marking the plumb line far away from the laser bar as a line type I, and marking the other plumb line as a line type II;
rotating and shearing the image according to a linear function of the linear I in the image to enable the edge of the image to be superposed with the linear I;
3) selecting any laser strip image processed in the step 2) as a standard image, selecting any point on the line type II in the standard image, and processing the pixel points of other lines according to the line reference where the point is located to make the horizontal coordinates of all the points on the line type II in the standard image equal;
4) processing other laser bar images except the standard image line by line to enable the abscissa of all points on the inner line type II of all the laser bar images to be equal;
5) sequentially and longitudinally splicing the laser bar images along the sequence from bottom to top to form the laser bar image with the size of t multiplied by mjThe spliced image of the line, t is the total number of the laser bar images, mjThe total number of rows of pixels of the jth laser stripe image;
extracting the light strip central line of the laser strip in the spliced image to obtain the pixel coordinates (u) of each point on the light strip central lineji,vji)j=1,2,3……t,i=1,2,3……mj
The physical coordinates of each point are calculated according to the following formula:
Figure BDA0002550502830000031
wherein L represents a physical distance between the left vertical line and the right vertical line, and d represents a pixel distance between the left vertical line and the right vertical line; a. the1The vertical physical dimension of the 1 st laser bar image is shown; a. thejRepresenting the longitudinal physical dimension of the jth laser bar image; g represents the distance between the photographing position of the current jth image and the last photographing position when the current jth image is photographed by the camera;
to coordinate point (x)ji,yji) Performing linear fitting to obtain a maximum fitting residual value Q as an evaluation parameter; and when the evaluation parameter is within the range of the preset value, the line laser to be measured is considered to meet the requirement, otherwise, the line laser to be measured does not meet the requirement.
Further, the method for enabling the edge of the laser bar image to coincide with the line type I in the step II comprises the following steps:
performing straight line fitting on the linear I to obtain a straight line function y which is k1x+b1The angle theta between the line I and the image edge1=arctank1Rotating the image to make the line I parallel to the edge of the laser bar image;
and performing linear fitting on the linear I again to obtain a linear function y as b2Cutting the image to remove b near the edge of the image2A column of pixels;
so far, the line type I in the image is superposed with the edge of the laser bar image.
For the convenience of image acquisition, the laser stripe is approximately parallel to the plumb line, and preferably, an included angle between the laser stripe and the plumb line is less than or equal to 5 degrees.
In order to sample more coordinate points, it is preferable that the distance between two adjacent photographing positions is equal to or less than the longitudinal physical dimension a of a single imagej
Further, the flatness of the line laser is calculated:
Figure BDA0002550502830000032
A1the vertical physical dimension of the 1 st laser bar image is shown; a. thetRepresenting the vertical physical dimension of the last laser bar image; t represents the total number of laser bar images.
In order to facilitate verification of the flatness of the line laser, a third plumb line is further arranged above the plane I, the maximum fitting residual error E of the third plumb line is obtained by adopting the method same as the steps 1) to 5), and the flatness is calculated:
Figure BDA0002550502830000041
and marking the flatness as standard flatness R, comparing the flatness S with the standard flatness R, and judging whether the flatness of the line laser to be measured is qualified.
Preferably, the working distance of the line laser is more than 3m, the shooting positions of the cameras are more than 3, and the cameras are uniformly distributed from top to bottom along the direction of the laser strip.
For a laser with a long working distance and/or a large divergence angle, because the projection range of the laser is relatively large, the length of a laser stripe is long, at the moment, a camera is limited by a shooting field of view, the whole laser stripe cannot be shot at one time, multi-position image acquisition is needed, in the process, the shooting pose of the camera generates offset and a pitch angle, and the images cannot be spliced directly; meanwhile, the method can also design a perpendicular bisector, and visually and accurately evaluate the flatness of the laser to be measured by using the flatness of the perpendicular bisector as a reference.
Drawings
FIG. 1 is a schematic diagram showing the relationship between the positions of a line laser, a camera, three plumb lines and a plane I in the embodiment;
FIG. 2 is a diagram illustrating a relationship between positions of a local plumb line and a local laser stripe in a single laser stripe image according to an embodiment;
FIG. 3 is a schematic illustration of longitudinal stitching of individual laser bar images.
Detailed Description
The technical solution of the present invention is described in detail below with reference to the accompanying drawings and the detailed description.
A visual detection method for the flatness of a line laser comprises the steps that a plane I is arranged right in front of a line laser to be detected, two plumb lines are hung above the plane I, and a laser bar is projected to the plane I by the line laser to be detected; in this embodiment, the plane I is selected as a wall surface with good flatness, which is perpendicular to the ground;
1) the camera collects and stores laser bar images from a plurality of photographing positions in sequence; the plurality of photographing positions are sequentially arranged from top to bottom (or from bottom to top) along the direction of the laser bar; as shown in fig. 2, the image of a single laser stripe includes the following longitudinally through image: a local laser bar and two local plumb lines;
2) starting from the first laser stripe image, each laser stripe image is processed as follows:
judging whether a local laser bar is positioned between two plumb lines, if so, marking any plumb line as a line type I, and marking the other plumb line as a line type II; if not, marking the plumb line far away from the laser bar as a line type I, and marking the other plumb line as a line type II;
rotating and shearing the image according to a linear function of the linear I in the image to enable the edge of the image to be superposed with the linear I;
3) selecting any laser strip image processed in the step 2) as a standard image, selecting a point on the line type II in the standard image, and processing the pixel points of other lines according to the behavior reference of the point, so that the horizontal coordinates of all the points on the line type II in the standard image are equal;
4) processing other laser bar images except the standard image line by line to enable the abscissa of all points on the inner line type II of all the laser bar images to be equal;
5) each sheet is putThe laser stripe images are sequentially and longitudinally spliced along the sequence from bottom to top (as shown in FIG. 3) to form the size of t × mjThe spliced image of the line, t is the total number of the laser bar images, mjThe total number of rows of pixels of the jth laser stripe image;
extracting the central line of the optical strip of the laser strip in the spliced image to obtain the pixel coordinates (u) of each point on the central line of the optical stripji,vji)j=1,2,3……t,i=1,2,3……mj
The physical coordinates of each point are calculated according to the following formula:
Figure BDA0002550502830000061
wherein L represents a physical distance between the left vertical line and the right vertical line, and d represents a pixel distance between the left vertical line and the right vertical line; a. the1Represents the vertical physical dimension of the 1 st (closest to the ground) laser bar image; a. thejRepresenting the longitudinal physical dimension of the jth laser bar image; g represents the distance between the photographing position of the current jth image and the last photographing position when the current jth image is photographed by the camera;
to coordinate point (x)ji,yji) Performing linear fitting to obtain a maximum fitting residual value Q as an evaluation parameter; and when the evaluation parameter is within the range of the preset value, the line laser to be measured is considered to meet the requirement, otherwise, the line laser to be measured does not meet the requirement.
Specifically, the method for making the edge of the laser bar image coincide with the line type I in the step two comprises the following steps:
as shown in fig. 2, a straight line is fitted to the line pattern I, and a straight line function y ═ k is obtained1x+b1The angle theta between the line I and the image edge1=arctank1Rotating the image to make the line I parallel to the edge of the laser bar image;
and performing linear fitting on the linear I again to obtain a linear function y as b2Cutting the image to remove b near the edge of the image2A column of pixels;
so far, the line type I in the image is superposed with the edge of the laser bar image.
The invention is particularly suitable for the condition that the working distance of the line laser is more than 3m, and at the moment, the shooting positions of the cameras are more than 3 and are uniformly distributed from top to bottom along the direction of the laser strip.
In order to facilitate image acquisition, the laser bar is approximately parallel to the plumb line, and in the embodiment, the laser bar is located between two plumb lines, and the included angle between the laser bar and the single plumb line is less than or equal to 5 degrees.
In order to sample more coordinate points, the distance g between two adjacent photographing positions is less than or equal to the longitudinal physical dimension A of a single imagej
As an embodiment of the present invention, in a specific implementation, the flatness of the line laser may be calculated as follows:
Figure BDA0002550502830000071
A1represents the vertical physical dimension of the 1 st (closest to the ground) laser bar image; a. thetRepresenting the vertical physical dimension of the last laser bar image; t represents the total number of laser bar images.
Meanwhile, in order to facilitate verification of the flatness of the line laser, in this embodiment, a third plumb line is further disposed above the plane I, and the maximum fitting residual E of the third plumb line is obtained by the same method as in steps 1) to 5), and the flatness is calculated:
Figure BDA0002550502830000072
and marking the flatness as standard flatness R, and judging whether the flatness of the line laser to be measured is qualified or not by comparing the flatness S with the standard flatness R.
In specific implementation, as shown in fig. 1, the projected laser bar is substantially parallel to the plumb line and is distributed between two plumb lines (the left plumb line is denoted as line I), and the third plumb line is also distributed between two plumb lines;
the same camera is adopted, a high-precision positioning support is utilized, the camera is uniformly moved 8 positions from top to bottom along the direction of the laser strip to take pictures, and the distance between every two adjacent picture taking positions is smaller than or equal to the longitudinal size of a single image;
the process of the embodiment is adopted to collect 3 types of lasers in total, the planeness of the lasers is respectively calculated, and the result is as follows:
number of experiments Maximum fit residual E Maximum fit residual Q Standard flatness R Flatness S of line laser
Line laser 1 0.0594mm 0.2426mm 27827:1 6809:1
Line laser 2 0.0757mm 0.1959mm 21829:1 8434:1
Line laser 0.0735mm 0.2542mm 22469:1 6498:1
According to the calculation result of the flatness, a tester can select a proper laser as required to perform subsequent operation, so that the reduction of the precision of the subsequent detection result due to the difference of the flatness is avoided.
The foregoing descriptions of specific exemplary embodiments of the present invention have been presented for purposes of illustration and description. It is intended that the scope of the invention be defined by the following claims and their equivalents.

Claims (7)

1. A visual detection method for the flatness of a line laser is characterized in that a plane I is arranged right in front of the line laser to be detected, two plumb lines are hung above the plane I, and a laser bar is projected to the plane I by the line laser to be detected;
1) the camera collects and stores laser bar images from a plurality of photographing positions in sequence; the multiple photographing positions are sequentially arranged from top to bottom or from bottom to top along the direction of the laser strip, and a single laser strip image comprises a longitudinal through image: a local laser bar and two local plumb lines;
2) starting from the first laser stripe image, each laser stripe image is processed as follows:
judging whether a local laser bar is positioned between two plumb lines, if so, marking any plumb line as a line type I, and marking the other plumb line as a line type II; if not, marking the plumb line far away from the laser bar as a line type I, and marking the other plumb line as a line type II;
rotating and shearing the image according to a linear function of the linear I in the image to enable the edge of the image to be superposed with the linear I;
3) selecting any laser strip image processed in the step 2) as a standard image, selecting any point on the line type II in the standard image, and processing the pixel points of other lines according to the line reference where the point is located to make the horizontal coordinates of all the points on the line type II in the standard image equal;
4) processing other laser bar images except the standard image line by line to enable the abscissa of all points on the inner line type II of all the laser bar images to be equal;
5) sequentially and longitudinally splicing the laser bar images along the sequence from bottom to top to form the laser bar image with the size of t multiplied by mjThe spliced image of the line, t is the total number of the laser bar images, mjThe total number of rows of pixels of the jth laser stripe image;
extracting the light strip central line of the laser strip in the spliced image to obtain the pixel coordinates (u) of each point on the light strip central lineji,vji)j=1,2,3……t,i=1,2,3……mj
The physical coordinates of each point are calculated according to the following formula:
Figure FDA0002550502820000021
wherein L represents a physical distance between the left vertical line and the right vertical line, and d represents a pixel distance between the left vertical line and the right vertical line; a. the1The vertical physical dimension of the 1 st laser bar image is shown; a. thejRepresenting the longitudinal physical dimension of the jth laser bar image; g represents the distance between the photographing position of the current jth image and the last photographing position when the current jth image is photographed by the camera;
to coordinate point (x)ji,yji) Performing linear fitting to obtain a maximum fitting residual value Q as an evaluation parameter; and when the evaluation parameter is within the range of the preset value, the line laser to be measured is considered to meet the requirement, otherwise, the line laser to be measured does not meet the requirement.
2. The method for visually inspecting the flatness of a line laser according to claim 1, wherein: the method for enabling the edge of the laser bar image to be superposed with the line type I in the step II comprises the following steps:
performing straight line fitting on the linear I to obtain a straight line function y which is k1x+b1The angle theta between the line I and the image edge1=arctank1Rotating the image to make the line I parallel to the edge of the laser bar image;
and performing linear fitting on the linear I again to obtain a linear function y as b2Cutting the image to remove b near the edge of the image2A column of pixels;
so far, the line type I in the image is superposed with the edge of the laser bar image.
3. The method for visually inspecting the flatness of a line laser according to claim 1, wherein: the included angle between the laser strip and the plumb line is less than or equal to 5 degrees.
4. The method for visually inspecting the flatness of a line laser according to claim 1, wherein: the distance between two adjacent photographing positions is less than or equal to the longitudinal physical dimension A of a single imagej
5. The method for visually inspecting the flatness of a line laser according to claim 1, wherein: calculating the flatness of the line laser:
Figure FDA0002550502820000031
A1the vertical physical dimension of the 1 st laser bar image is shown; a. thetRepresenting the vertical physical dimension of the last laser bar image; t represents the total number of laser bar images.
6. The method for visually inspecting the flatness of a line laser according to claim 5, wherein: a third plumb line is further arranged above the plane I, the maximum fitting residual error E of the third plumb line is obtained by adopting the method same as the steps 1) to 5), and the planeness is calculated:
Figure FDA0002550502820000032
and marking the flatness as standard flatness R, comparing the flatness S with the standard flatness R, and judging whether the flatness of the line laser to be measured is qualified.
7. The method for visually inspecting the flatness of a line laser according to claim 1, wherein: the working distance of the line laser is larger than 3m, the number of photographing positions of the cameras is more than 3, and the cameras are uniformly distributed from top to bottom along the direction of the laser strips.
CN202010574424.4A 2020-06-22 2020-06-22 Visual detection method for flatness of line laser Active CN111595560B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010574424.4A CN111595560B (en) 2020-06-22 2020-06-22 Visual detection method for flatness of line laser

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010574424.4A CN111595560B (en) 2020-06-22 2020-06-22 Visual detection method for flatness of line laser

Publications (2)

Publication Number Publication Date
CN111595560A CN111595560A (en) 2020-08-28
CN111595560B true CN111595560B (en) 2022-03-29

Family

ID=72189030

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010574424.4A Active CN111595560B (en) 2020-06-22 2020-06-22 Visual detection method for flatness of line laser

Country Status (1)

Country Link
CN (1) CN111595560B (en)

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100577954B1 (en) * 2004-03-17 2006-05-10 강영준 Apparatus and method for the non-contact adaptive dimension measurement
CN107907048A (en) * 2017-06-30 2018-04-13 长沙湘计海盾科技有限公司 A kind of binocular stereo vision method for three-dimensional measurement based on line-structured light scanning
CN110220481B (en) * 2019-05-09 2020-06-26 易思维(杭州)科技有限公司 Handheld visual detection equipment and pose detection method thereof
CN110057555B (en) * 2019-05-28 2020-09-04 易思维(杭州)科技有限公司 Method for detecting flatness of line laser
CN110631809A (en) * 2019-11-12 2019-12-31 易思维(杭州)科技有限公司 Method for evaluating flatness of line structured light laser
CN111289226A (en) * 2020-04-02 2020-06-16 易思维(杭州)科技有限公司 Line laser flatness detection method based on visual measurement technology

Also Published As

Publication number Publication date
CN111595560A (en) 2020-08-28

Similar Documents

Publication Publication Date Title
CN110068270B (en) Monocular vision box volume measuring method based on multi-line structured light image recognition
CN107292927B (en) Binocular vision-based symmetric motion platform pose measurement method
EP3033875B1 (en) Image processing apparatus, image processing system, image processing method, and computer program
US8208029B2 (en) Method and system for calibrating camera with rectification homography of imaged parallelogram
CN104567727B (en) Global unified calibration method for linear structured light profile sensor through three-dimensional target
US20070091174A1 (en) Projection device for three-dimensional measurement, and three-dimensional measurement system
CN109827521B (en) Calibration method for rapid multi-line structured optical vision measurement system
JPH10253322A (en) Method and apparatus for designating position of object in space
CN109238084B (en) Automatic guiding method for micro round hole measurement
JP2012042396A (en) Position attitude measurement device, position attitude measurement method, and program
CN102376089A (en) Target correction method and system
CN113744351B (en) Underwater structure light measurement calibration method and system based on multi-medium refraction imaging
CN111932565B (en) Multi-target recognition tracking calculation method
JP2005017286A (en) Method and system for camera calibration
CN113538583A (en) Method for accurately positioning position of workpiece on machine tool and vision system
CN111289226A (en) Line laser flatness detection method based on visual measurement technology
CN114241061A (en) Calibration method, calibration system and calibration target for line structured light imaging and measurement system using calibration target
JP3696336B2 (en) How to calibrate the camera
Wohlfeil et al. Automatic camera system calibration with a chessboard enabling full image coverage
JP5254545B2 (en) Image processing apparatus and image processing method
CN111595560B (en) Visual detection method for flatness of line laser
Ricolfe-Viala et al. Optimal conditions for camera calibration using a planar template
CN111968182A (en) Calibration method for binocular camera nonlinear model parameters
JP4236202B2 (en) Modeling apparatus and camera parameter calculation method
JP2006317418A (en) Image measuring device, image measurement method, measurement processing program, and recording medium

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CP01 Change in the name or title of a patent holder

Address after: Room 495, building 3, 1197 Bin'an Road, Binjiang District, Hangzhou City, Zhejiang Province 310051

Patentee after: Yi Si Si (Hangzhou) Technology Co.,Ltd.

Address before: Room 495, building 3, 1197 Bin'an Road, Binjiang District, Hangzhou City, Zhejiang Province 310051

Patentee before: ISVISION (HANGZHOU) TECHNOLOGY Co.,Ltd.

CP01 Change in the name or title of a patent holder