CN111080530B - Method for realizing high-precision coordinate jigsaw based on grating ruler position - Google Patents
Method for realizing high-precision coordinate jigsaw based on grating ruler position Download PDFInfo
- Publication number
- CN111080530B CN111080530B CN201911417096.0A CN201911417096A CN111080530B CN 111080530 B CN111080530 B CN 111080530B CN 201911417096 A CN201911417096 A CN 201911417096A CN 111080530 B CN111080530 B CN 111080530B
- Authority
- CN
- China
- Prior art keywords
- camera
- coordinates
- axis motor
- image
- distance
- 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
Links
- 238000000034 method Methods 0.000 title claims abstract description 28
- 230000000007 visual effect Effects 0.000 claims abstract description 8
- 238000005516 engineering process Methods 0.000 description 7
- 238000012545 processing Methods 0.000 description 7
- 238000010586 diagram Methods 0.000 description 6
- 238000006243 chemical reaction Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 3
- 238000004422 calculation algorithm Methods 0.000 description 2
- 238000011161 development Methods 0.000 description 2
- 238000004364 calculation method Methods 0.000 description 1
- 238000004891 communication Methods 0.000 description 1
- 238000012937 correction Methods 0.000 description 1
- 230000007547 defect Effects 0.000 description 1
- 230000004927 fusion Effects 0.000 description 1
- 238000007499 fusion processing Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000005259 measurement Methods 0.000 description 1
- 238000011160 research Methods 0.000 description 1
- 238000005070 sampling Methods 0.000 description 1
- 238000004088 simulation Methods 0.000 description 1
- 238000011179 visual inspection Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T3/00—Geometric image transformations in the plane of the image
- G06T3/40—Scaling of whole images or parts thereof, e.g. expanding or contracting
- G06T3/4038—Image mosaicing, e.g. composing plane images from plane sub-images
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/80—Analysis of captured images to determine intrinsic or extrinsic camera parameters, i.e. camera calibration
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T2207/00—Indexing scheme for image analysis or image enhancement
- G06T2207/20—Special algorithmic details
- G06T2207/20112—Image segmentation details
- G06T2207/20132—Image cropping
-
- Y—GENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
- Y02—TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
- Y02P—CLIMATE CHANGE MITIGATION TECHNOLOGIES IN THE PRODUCTION OR PROCESSING OF GOODS
- Y02P90/00—Enabling technologies with a potential contribution to greenhouse gas [GHG] emissions mitigation
- Y02P90/30—Computing systems specially adapted for manufacturing
Landscapes
- Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Image Processing (AREA)
Abstract
The invention provides a method for realizing high-precision coordinate jigsaw based on a grating ruler position, which has large drawing view and high precision. The method comprises the following steps: (1) Calibrating the position of a camera on automation equipment to obtain the equivalent S of the camera; (2) Taking pictures of the product at different positions twice, setting actual shooting coordinates recorded by the grating ruler at the two different positions during shooting as A (X1, Y1) and B (X2, Y2) respectively, and setting the moving width of the camera in the Y direction in the visual field as d; (3) Converting the coordinates of the XY axis motor group at different positions obtained in the step (2) twice into image coordinates; (4) And performing picture splicing treatment on the two shot images, cutting off the overlapped part of the two images, splicing the two cut images in the Y direction, and translating in the X direction by the distance of (X1-X2)/S to obtain the picture mosaic. The invention is used in the technical field of vision.
Description
Technical Field
The invention relates to the technical field of vision, in particular to a method for realizing high-precision coordinate jigsaw based on a grating ruler position.
Background
With the development of science and technology, the visual technology develops more and more mature. The vision technology mainly aims at processing images. However, the conventional visual image processing mainly has the following problems: in order to improve the precision, a single image is taken, but the visual field is necessarily reduced, otherwise, the hardware cost is increased by geometric multiples; however, most of the existing jigsaw technology is to splice a plurality of pictures according to image characteristics, and because a motor-driven camera is used to shoot and obtain the pictures when a plurality of pictures are taken, a gear clearance problem between a motor output shaft and a driven device exists in the motor driving process, so that the repeatability is poor. The excessive splicing part has to be subjected to pre-value processing, so that the most real characteristics of the image are lost, the spliced image is obviously not real after measurement and other operations, and the accuracy is not ensured. This does not meet the current demands of high integration electronic product markets for precision and accuracy.
At present, some solutions to the above problems are also available on the market. For example, the fast and accurate image stitching based on the grating is realized, but the technology does not consider the error brought by the included angle between the camera and the mechanism, the equivalent weight calibration is only two lines (4-point calibration), the precision is limited, the processing scheme of the overlapped part of the stitching is not adopted, the algorithm is complex, the realization difficulty is high, and the cost is high. For another example, "a two-dimensional image stitching method based on raster positioning in automatic visual inspection", this technique needs to calculate the position coordinates of 4 corners of each sub-image, and then performs stitching through the position coordinates. But the control system cannot be accurate to the pixel level, so there must be an overlap between pictures, and the splicing overlap is not given a detailed scheme of truncation. For example, the technology of 'research on a rapid sequence image splicing technology based on grating positioning', which is based on a template matching algorithm, sequence images are equidistantly arranged, an image splicing region is subjected to fusion processing, but the maximum running speed of the image splicing region is only 12m/min, the position is inquired by serial port communication with the sampling interval time of 25ms, after a sequence is obtained, the error is reduced by MATLAB simulation correction, and the real-time performance is poor.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides a method for realizing high-precision coordinate jigsaw based on a grating ruler position, which has large drawing view and high precision.
The technical scheme adopted by the invention is that the method is carried out on automatic equipment, wherein the automatic equipment is provided with a camera and an XY-axis motor set for driving the camera to move, the automatic equipment is also provided with a grating ruler, the XY-axis motor set drives the camera to photograph and take pictures of products, and the grating ruler records the moving position of the XY-axis motor set, and the method comprises the following steps:
(1) Calibrating the position of a camera on automatic equipment to obtain the position relation between the coordinates of an XY-axis motor set on the automatic equipment and the coordinates of an image obtained by photographing the camera, and solving the equivalent S of the camera;
(2) Taking pictures of the product at different positions twice, setting actual shooting coordinates recorded by the grating ruler at the two different positions during shooting as A (X1, Y1) and B (X2, Y2) respectively, and setting the moving width of the camera in the Y direction in the visual field as d;
(3) Converting the coordinates of the XY-axis motor set at different positions twice obtained in the step (2) into image coordinates;
(4) And performing picture splicing treatment on the two shot images, cutting off the overlapped part of the two images, splicing the two cut images in the Y direction, and translating in the X direction by the distance of (X1-X2)/S to obtain the picture mosaic.
According to the scheme, any image is obtained by photographing through a camera, the conversion relation from the coordinates of the XY-axis motor set to the image coordinates is confirmed by utilizing a plurality of set point position calibration points, so that the equivalent weight of the camera is obtained, the conversion from the coordinates of the grating ruler to the image coordinates can be quickly obtained through the equivalent weight of the camera, the requirement that the jigsaw puzzle precision reaches the pixels is met, the precision of the image coordinates is guaranteed through the precision of the grating ruler, and the jigsaw puzzle precision is further guaranteed; for the boundary overlapping part of the two images, the processing which influences precision such as fusion and the like can not be carried out, but splicing is carried out by depending on the physical position obtained by the grating ruler, the overlapping part is deleted, the linking part is directly carried out without any image processing, the truest expression of the product is restored, and the accuracy of the jigsaw puzzle is greatly improved; because the boundary of the image is not required to be processed, the pixel requirement on the image is reduced, so that the image view field acquired by the camera is relatively enlarged, the image acquisition times of the camera are reduced, and the image splicing speed is increased; in addition, the visual field of the camera is enlarged, so that images with different sizes can be quickly processed, and the compatibility of the jigsaw equipment is improved.
Further, the process of calculating the organic equivalent S in step (1) is as follows:
the method comprises the following steps that a camera carries out image shooting, any one feature circle on an image is selected, an XY-axis motor set is controlled to move through automatic equipment, position calibration points are selected in the selected feature circle at a fixed distance D, nine position calibration points are selected in total, any two position calibration points are not overlapped, image coordinates of the nine position calibration points are respectively calibrated to be (x 1, y 1) - (x 9, y 9), distances between every two points are summed and the average distance is calculated through the following formula:
the camera equivalent S was found to be S = D/Ad.
According to the scheme, different position calibration points are taken, and the distance between the point and the point is ensured to be a fixed value, so that the average distance between the two points is conveniently obtained, the equivalent weight of the camera is further obtained, and the accuracy of the equivalent weight of the camera calculated by the method is high.
Further, in the step (3), the coordinates of the XY-axis motor set at two different positions are calculated by the following formula and converted into image coordinates:
a. calculating the distance in the Y direction of the image taken twice and converting the distance into pixels: (Y1-Y2)/S;
b. calculating the Y-direction clipping distance of the overlapped part of the two pictures: ((Y1-Y2)/S-d)/2;
c. calculating the distance in the X direction of the image taken twice and converting the distance into pixels: (X1-X2)/S;
wherein the units of X1, X2, Y1 and Y2 are all mm, and the unit of S is mm/Pixel; the unit of d is Pixel.
The scheme shows that the process of converting the coordinates of the XY-axis motor set into the image coordinates is simple, and compared with the prior art, the calculation amount and the cost are greatly reduced.
And finally, the XY-axis motor set is a mechanical screw rod XY-axis motor driving module. Therefore, the requirement on equipment is not high, and a common screw rod structure is adopted, so that the cost is relatively reduced.
Drawings
FIG. 1 is a path calibration diagram of nine position calibration points in the present invention;
FIG. 2 is a schematic diagram of image coordinate conversion stitching in the present invention;
FIG. 3 is a diagram illustrating the effect of images taken by the camera at two points AB;
FIG. 4 is an effect diagram of the distance cut in the Y direction to remove the overlapped part of the two diagrams in FIG. 3;
fig. 5 is an effect diagram of a complete picture obtained after splicing the two pictures in fig. 3.
Detailed Description
As shown in fig. 1 to 5, the method of the present invention is performed on an automation device, wherein the automation device is provided with a camera and an XY axis motor set for driving the camera to move, the automation device is further provided with a grating ruler, the XY axis motor set drives the camera to photograph a product to take a picture, and the grating ruler records a moving position of the XY axis motor set. The method comprises the following steps:
(1) And calibrating the position of the camera on the automatic equipment to obtain the position relation between the coordinates of the XY-axis motor set on the automatic equipment and the coordinates of an image obtained by photographing the camera, and solving the equivalent weight S of the camera.
The process of calculating the camera equivalent S is as follows:
the method comprises the following steps that a camera carries out image shooting, any one feature circle on an image is selected, an XY-axis motor set is controlled to move through automatic equipment, position calibration points are selected in the selected feature circle at a fixed distance D (the unit of D is mm), nine position calibration points are selected in total, any two position calibration points are not overlapped, image coordinates of the nine position calibration points are respectively calibrated to be (x 1, y 1) - (x 9, y 9), the distances between every two points are summed and the average distance is calculated through the following formula:
the resulting camera equivalent S is S = D/Ad.
(2) The method comprises the steps of taking pictures of a product at two different positions twice, setting actual shooting coordinates recorded by the grating ruler at the two different positions during shooting as A (X1, Y1) and B (X2, Y2) respectively, setting the moving width of a camera in the Y direction in a visual field as d, and setting the unit of d as Pixel.
(3) And (3) converting the coordinates of the XY axis motor group at two different positions obtained in the step (2) into image coordinates. In the step, the coordinates of the XY-axis motor set at two different positions are converted into image coordinates through the following formula:
a. calculating the distance in the Y direction of the image taken twice and converting the distance into pixels: (Y1-Y2)/S;
b. calculating the Y-direction clipping distance of the overlapped part of the two pictures: ((Y1-Y2)/S-d)/2;
c. calculating the distance in the X direction of the image taken twice and converting the distance into pixels: (X1-X2)/S,
wherein the units of X1, X2, Y1 and Y2 are all mm, and the unit of S is mm/Pixel; the unit of d is Pixel.
(4) And performing picture splicing treatment on the two shot images, cutting off the overlapped part of the two images, splicing the two cut images in the Y direction, and translating in the X direction by the distance of (X1-X2)/S to obtain the picture mosaic.
Compared with the prior art, the invention has the following advantages:
according to the invention, based on the actual moving position of the XY-axis motor set read by the grating ruler, the actual position coordinates are converted into image coordinates, and the image coordinates are spliced through the actual position, and the grating ruler can reach the precision of <1um, so that the jigsaw puzzle precision is greatly improved; the method does not depend on the hardware requirement of specific driving equipment (such as a motor), and all position information comes from the grating ruler, so that the equipment cost is reduced, and the precision is also ensured; because the precision requirement of the camera is relatively low, a larger image view can be obtained, the method is compatible with wider size requirement, and the method can be used for drawing and splicing for multiple times according to different product size requirements; splicing is carried out by depending on the physical position of the grating ruler, and the connection part between the pictures does not carry out any image processing, so that the truest expression of the product is restored, and the precision is improved; the XY axis motor module of the general screw rod mechanism can meet the motion requirement, and the development cost is low.
Claims (3)
1. A method for realizing high-precision coordinate jigsaw based on the position of a grating ruler is carried out on automatic equipment, wherein the automatic equipment is provided with a camera and an XY-axis motor set for driving the camera to move, the automatic equipment is also provided with the grating ruler, the XY-axis motor set drives the camera to photograph and take pictures of products, and the grating ruler records the moving position of the XY-axis motor set, and is characterized by comprising the following steps:
(1) Calibrating the position of a camera on automatic equipment to obtain the position relation between the coordinates of an XY-axis motor set on the automatic equipment and the coordinates of an image obtained by photographing the camera, and solving the equivalent S of the camera;
(2) Taking pictures of the product at different positions twice, setting actual shooting coordinates recorded by the grating ruler at the two different positions during shooting as A (X1, Y1) and B (X2, Y2) respectively, and setting the moving width of the camera in the Y direction in the visual field as d;
(3) Converting the coordinates of the XY axis motor group at different positions obtained in the step (2) twice into image coordinates;
(4) Performing picture splicing treatment on the images obtained by the two-time shooting, cutting off the overlapped part of the two images, splicing the two cut images in the Y direction, and translating the two cut images in the X direction by a distance of (X1-X2)/S to obtain a picture mosaic;
the process of calculating the equivalent S in the step (1) is as follows:
the method comprises the following steps that a camera shoots an image, any one characteristic circle on the image is selected, an XY axis motor set is controlled to move through automatic equipment, position calibration points are selected in the selected characteristic circle at a fixed distance D, nine position calibration points are selected in total, any two position calibration points are not overlapped, image coordinates of the nine position calibration points are respectively calibrated to be (x 1, y 1) - (x 9, y 9), and the distance between every two points is summed and the average distance is calculated through the following formulas:
the camera equivalent S was found to be S = D/Ad.
2. The method for realizing the jigsaw puzzle with high precision based on the position of the grating ruler in claim 1, wherein in step (3), the coordinates of the XY axis motor set at two different positions are calculated and converted into the image coordinates by the following formula:
a. calculating the distance in the Y direction of the image taken twice and converting the distance into pixels: (Y1-Y2)/S;
b. calculating the Y-direction clipping distance of the overlapped part of the two pictures: ((Y1-Y2)/S-d)/2;
c. calculating the distance in the X direction of the image taken twice and converting the distance into pixels: (X1-X2)/S,
wherein the units of X1, X2, Y1 and Y2 are all mm, and the unit of S is mm/Pixel; the unit of d is Pixel.
3. The method for realizing the high-precision coordinate jigsaw based on the grating ruler position according to the claim 1, wherein: the XY-axis motor set is a mechanical lead screw XY-axis motor driving module.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911417096.0A CN111080530B (en) | 2019-12-31 | 2019-12-31 | Method for realizing high-precision coordinate jigsaw based on grating ruler position |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201911417096.0A CN111080530B (en) | 2019-12-31 | 2019-12-31 | Method for realizing high-precision coordinate jigsaw based on grating ruler position |
Publications (2)
Publication Number | Publication Date |
---|---|
CN111080530A CN111080530A (en) | 2020-04-28 |
CN111080530B true CN111080530B (en) | 2023-04-07 |
Family
ID=70320959
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201911417096.0A Active CN111080530B (en) | 2019-12-31 | 2019-12-31 | Method for realizing high-precision coordinate jigsaw based on grating ruler position |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN111080530B (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN113674214A (en) * | 2021-07-26 | 2021-11-19 | 常州市新创智能科技有限公司 | Straightness detection method and device based on binocular camera splicing |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012027000A (en) * | 2010-06-22 | 2012-02-09 | Itt:Kk | Image measurement processor, image measurement processing method and image measurement processing program by single camera |
CN103455993A (en) * | 2013-09-30 | 2013-12-18 | 电子科技大学 | Two-dimensional image splicing method based on optical grating positioning in automatic visual inspection |
CN105046650A (en) * | 2015-07-12 | 2015-11-11 | 中国计量学院 | Machine vision-based image mosaic method for small module gear detection process |
CN106537269A (en) * | 2015-05-06 | 2017-03-22 | 东莞市神州视觉科技有限公司 | Method, apparatus and system for improving system accuracy of xy motion platform |
-
2019
- 2019-12-31 CN CN201911417096.0A patent/CN111080530B/en active Active
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012027000A (en) * | 2010-06-22 | 2012-02-09 | Itt:Kk | Image measurement processor, image measurement processing method and image measurement processing program by single camera |
CN103455993A (en) * | 2013-09-30 | 2013-12-18 | 电子科技大学 | Two-dimensional image splicing method based on optical grating positioning in automatic visual inspection |
CN106537269A (en) * | 2015-05-06 | 2017-03-22 | 东莞市神州视觉科技有限公司 | Method, apparatus and system for improving system accuracy of xy motion platform |
CN105046650A (en) * | 2015-07-12 | 2015-11-11 | 中国计量学院 | Machine vision-based image mosaic method for small module gear detection process |
Also Published As
Publication number | Publication date |
---|---|
CN111080530A (en) | 2020-04-28 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN111801198B (en) | Hand-eye calibration method, system and computer storage medium | |
WO2020147397A1 (en) | Machine vision system for use in curved surface inspection and inspection method | |
CN109360243B (en) | Calibration method of multi-degree-of-freedom movable vision system | |
US20070211955A1 (en) | Perspective correction panning method for wide-angle image | |
CN110726379B (en) | High-precision imaging method for irregular product contour | |
CN114399554A (en) | Calibration method and system of multi-camera system | |
CN101221375A (en) | Machine vision system used for step photo-etching machine alignment system and its calibration method | |
CN113554757A (en) | Three-dimensional reconstruction method and system for workpiece track based on digital twinning | |
CN109712139B (en) | Monocular vision size measurement method based on linear motion module | |
CN111080530B (en) | Method for realizing high-precision coordinate jigsaw based on grating ruler position | |
CN110640303B (en) | High-precision vision positioning system and positioning calibration method thereof | |
CN107990825B (en) | High-precision position measuring device and method based on priori data correction | |
CN111340854A (en) | Mobile robot target tracking method based on ICamshift algorithm | |
CN104819690A (en) | Double-camera machine vision positioning method of surface mounted component | |
CN202141852U (en) | Microscope device for full-view micro image shooting | |
CN114511690A (en) | 3D target detection data set acquisition device and labeling method | |
CN113643382A (en) | Dense coloring point cloud obtaining method and device based on rotating laser fusion camera | |
CN103192399A (en) | Micro-vision hand-eye calibration method based on target motion | |
EP4071713A1 (en) | Parameter calibration method and apapratus | |
CN114359393B (en) | Cross-platform visual guide dispensing guiding method | |
CN116206320A (en) | Method, system, equipment and medium for matching drawing characteristics with numbers | |
CN108592789A (en) | A kind of steel construction factory pre-assembly method based on BIM and machine vision technique | |
CN114565720A (en) | Active three-dimensional reconstruction system and method based on line structured light rotation scanning | |
CN112361982B (en) | Method and system for extracting three-dimensional data of large-breadth workpiece | |
CN114708151A (en) | PCB image processing method |
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 |