CN117392217A - Calibration method for rapid large-format image - Google Patents
Calibration method for rapid large-format image Download PDFInfo
- Publication number
- CN117392217A CN117392217A CN202311309736.2A CN202311309736A CN117392217A CN 117392217 A CN117392217 A CN 117392217A CN 202311309736 A CN202311309736 A CN 202311309736A CN 117392217 A CN117392217 A CN 117392217A
- Authority
- CN
- China
- Prior art keywords
- calibration
- image
- camera
- calibration plate
- grid
- 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.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 49
- 230000009466 transformation Effects 0.000 claims abstract description 7
- 238000013507 mapping Methods 0.000 claims abstract description 6
- 230000005540 biological transmission Effects 0.000 claims abstract description 4
- 239000011159 matrix material Substances 0.000 claims abstract description 4
- 241001292396 Cirrhitidae Species 0.000 claims description 7
- 238000001514 detection method Methods 0.000 claims description 6
- 238000000605 extraction Methods 0.000 claims description 3
- 239000004744 fabric Substances 0.000 claims description 3
- 239000012535 impurity Substances 0.000 claims description 3
- 239000010985 leather Substances 0.000 claims description 3
- 230000001131 transforming effect Effects 0.000 claims description 3
- 238000005070 sampling Methods 0.000 claims description 2
- 238000010586 diagram Methods 0.000 description 3
- 230000009286 beneficial effect Effects 0.000 description 2
- 241000226585 Antennaria plantaginifolia Species 0.000 description 1
- 238000010276 construction Methods 0.000 description 1
- 238000003384 imaging method Methods 0.000 description 1
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T7/00—Image analysis
- G06T7/70—Determining position or orientation of objects or cameras
- G06T7/73—Determining position or orientation of objects or cameras using feature-based methods
-
- 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/30—Subject of image; Context of image processing
- G06T2207/30244—Camera pose
Landscapes
- Engineering & Computer Science (AREA)
- Computer Vision & Pattern Recognition (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
Abstract
The invention discloses a camera calibration method for a rapid large-format image, and belongs to the field of machine vision. The calibration method of the invention adopts a plane calibration plate, the size of the calibration plate is not smaller than the plane size of a workbench, grid lines distributed in square are drawn on the calibration plate, a camera is used for shooting an image of the calibration plate, the image of the calibration plate is required to cover a working area, the image is input into image processing software to process the image, characteristic points are obtained, pixel coordinates of all the characteristic points are stored after the characteristic points are obtained, all the pixel coordinates are stored as a tuple, the tuple is subjected to mapping transformation and matrix processing to obtain a correction data set, various distortion problems caused by transmission transformation and barrel distortion are corrected, and the correction of the true position of each characteristic point after the camera calibration is completed. The correction data obtained through the image algorithm can be directly used in the image calibration work, and complex algorithm processing is not needed to be carried out on the camera calibration and the image processing in the follow-up process; the calibration method only needs to calibrate one calibration plate image, can quickly complete the calibration of a large-format image, does not need multiple calibrations in subsequent work, does not need a large number of image calibrations or multi-angle shooting, can simplify the calibration process of the image, and saves time and cost.
Description
Technical Field
The invention belongs to the field of machine vision, and particularly relates to a method for calibrating a quick large-format image.
Background
Machine vision is a process that uses a computer to simulate human vision and uses software algorithms to analyze and understand images acquired by cameras for automatic recognition and judgment. The nature of machine vision is that the real information of the three-dimensional world is obtained through an image, and two problems need to be considered in the process, namely, how an object in a camera coordinate system corresponds to the object in the real world coordinate system, and how to correct various distortions of a lens. Thus mention is made of calibration by which the image is linked to the world, correcting various distortions of the image.
The calibration of the camera may establish a correspondence of points of the two-dimensional image with points in three-dimensional space. In actual photography, camera distortion is one of the most common problems, such as radial distortion, tangential distortion, and the like. Radial distortion in turn includes pincushion distortion and barrel distortion, while tangential distortion is typically caused by the lens not being perfectly parallel to the image. The shape of the lens or the difference in process may also cause distortion of the image, so that the image needs to be distortion corrected by calibration.
In modern machine vision calibration, a Zhang Zhengyou method is generally adopted to calibrate the internal and external parameters of a camera. The method has the advantages that a plane calibration plate with characteristic points is used, and the calibration accuracy is high. However, the method needs to shoot at least 3 calibration plate images with different angles (but usually needs to shoot about 10 images) to finish calibration, and the calibration has long working time and is easy to make mistakes. In addition, when a plurality of cameras need to be calibrated at the same time, the angles and positions of the calibration plates which are suitable for all the cameras are not easy to find, the shooting is easy to be missed, the angle positions need to be carefully adjusted, otherwise, algorithm errors can be generated, and calibration is a complicated work.
Disclosure of Invention
Aiming at the problems of long calibration working time, complex calibration and the like of a plurality of calibration plate images with different angles, which are required by the existing calibration method, the calibration method for the quick large-format image is provided, a plane calibration plate is used for calibrating by shooting only one image, correction data is obtained by reading characteristic points in image processing software, the correction data is used in an algorithm, the calibration can be completed, the operation is simple and convenient, and the quick calibration and the high calibration precision can be realized.
In order to achieve the above object, the technical scheme of the present invention is as follows: a calibration method of a quick large-format image adopts a plane calibration plate, wherein grid lines are uniformly distributed on the plane calibration plate;
taking a picture and sampling by using a camera with a fixed angle, uploading an image to image processing software to perform algorithm processing, acquiring characteristic points as grid points, and further realizing calibration of the camera;
when the algorithm detection is carried out, the coordinate data of each characteristic point is stored after the characteristic points are read, correction data is obtained after matrix processing, correction processing is carried out on various distortion problems caused by transmission transformation and barrel distortion, and correction of the real positions of each characteristic point after camera calibration is completed;
the correction data obtained through the algorithm can be directly used for image calibration, and complex algorithm processing is not needed for camera calibration and image processing in the follow-up process, so that the calibration is quick and accurate;
the calibration method only needs to calibrate one calibration plate image, the calibration of the image is completed, multiple calibrations are not needed in the processing work of the subsequent image, and the calibration is not needed through a large number of images or images shot at multiple angles, so that the calibration process of the image is simplified, and the time and the cost are saved;
the method for obtaining correction data by adopting the algorithm comprises the following specific contents:
step 1: reading a calibration plate image shot by a camera in image processing software, selecting an area where a grid is positioned, and removing redundant parts of edges;
step 2: adopting automatic local threshold processing, selecting a dark region to extract grid lines;
step 3: carrying out impurity treatment on the image, so that only the background and the grid lines are arranged on the calibration plate, and the subsequent extraction of the characteristic points is convenient;
step 4: separating the background from the grid lines, selecting a dark area (i.e., the grid lines) to be displayed in another window;
step 5: performing an insert operation to respectively determine a grid row area 1 and a grid column area 2;
step 6: calculating the intersection of the region 1 and the region 2 to obtain a region intersection;
step 7: separating the crossing points as characteristic points, recording pixel coordinates of each characteristic point, and storing the pixel coordinates as a tuple;
step 8: mapping and transforming the tuple obtained in the step 7 to obtain correction data of normal perspective;
step 9: the correction data obtained in the step 8 can be used as a new calibration algorithm for image calibration, so that time and cost are saved;
the calibration method belongs to a calibration method of a large-format image, the size of a calibration plate platform of the large-format image is not smaller than the size of a workbench plane, and the calibration method can be suitable for large-format image detection industries such as cloth, leather and the like;
in the calibration method, only one calibration plate is used, rectangular grids which are uniformly distributed are arranged on the calibration plate, and the lines are mutually perpendicular to the lines;
the camera adopted by the calibration method is fixed right above the calibration plate, the shooting path of the camera lens is perpendicular to the calibration plate, and the type of the camera can be selected from a linear array camera or an area array camera;
halcon, openCV is selected as the image processing software;
the rectangular grids on the calibration plate are characterized in that the rectangular grids are designed to be a grid distance every 50mm, and the number of the grids is related to the precision requirement;
due to the adoption of the technical scheme, the invention has the beneficial effects that: the correction data can be directly applied to any subsequent image calibration (if the image is shot under the same camera), the recalibration is not needed, and the algorithm calibration is only needed to be carried out on one calibration plate picture with an angle.
Drawings
FIG. 1 is a diagram of the construction of a facility for the disclosed calibration method;
FIG. 2 is a calibration flow chart of the disclosed calibration method;
FIG. 3 is a calibration template view taken by the camera of the present disclosure;
FIG. 4 is a diagram of a calibration plate after the Halcon algorithm calibration disclosed by the invention;
FIG. 5 is a flow chart of the correction vector diagram obtained by the Halcon algorithm of the present disclosure;
FIG. 6 is a graph of feature point distribution extracted during the calibration of Halcon algorithm according to the present invention;
FIG. 7 is a schematic view of a planar calibration plate grid used in the present disclosure;
Detailed Description
In order to better express the technical scheme, technical characteristics and beneficial results of the whole invention, the invention is further described in detail below with reference to the accompanying drawings and examples, but the invention is not limited to the examples, and the following embodiments are modified, altered and equivalent changes according to the principles of the invention, which are all within the scope of the invention.
Example 1:
the embodiment provides a calibration method of a rapid large-format image, which has the structural composition shown in figure 1 and comprises a camera (1), a working platform (2) and a calibration plate (3); the camera (1) is located directly over the working platform (2), the calibration plate (3) is placed on the plane of the working platform (2) in parallel, the shooting path of the camera is perpendicular to the calibration plate, the calibration plate is a plane calibration plate, and the calibration plate surface is provided with a plurality of rectangular grids.
The calibration flow is shown in fig. 2, the camera shoots a plane calibration plate image, all rectangular grids in the calibration plate are ensured to be in the imaging range of the camera, and then the calibration plate image is uploaded into image processing software to carry out algorithm processing on the image, so that feature points are obtained.
When the algorithm detection is carried out, the pixel coordinates of each characteristic point are stored after the characteristic points are obtained, all the pixel coordinates are stored as a tuple, correction data are obtained after the tuple is subjected to mapping transformation and matrix processing, correction processing is carried out on various distortion problems caused by transmission transformation and barrel distortion, and correction of the real positions of each characteristic point after camera calibration is completed;
the correction data obtained through the algorithm can be directly used for image calibration, and complex algorithm processing is not needed for camera calibration and image processing in the follow-up process, so that the calibration is quick and accurate; fig. 3 is a calibration plate image with distortion and other problems after being photographed by a camera, and the distortion problem is solved after the calibration plate image is processed by the calibration method to obtain fig. 4.
Example 2:
in the content based on embodiment 1, as shown in fig. 5, the embodiment provides a process for calibrating a calibration plate picture by using a Halcon algorithm, which specifically includes the following steps:
step 1: reading a calibration plate image shot by a camera in Halcon software, selecting an area where a grid is positioned, and removing redundant parts of edges;
step 2: adopting automatic local threshold processing, selecting a dark region to extract grid lines;
step 3: carrying out impurity treatment on the image, so that only the background and the grid lines are arranged on the calibration plate, and the subsequent extraction of the characteristic points is convenient;
step 4: separating the background from the grid lines, selecting a dark area (i.e., the grid lines) to be displayed in another window;
step 5: performing an insert operation to respectively determine a grid row area 1 and a grid column area 2;
step 6: calculating the intersection of the region 1 and the region 2 to obtain a region intersection, as shown in fig. 6;
step 7: separating out the crossing points as characteristic points, recording the pixel value of each characteristic point, and storing the pixel value as a tuple;
step 8: mapping and transforming the tuple obtained in the step 7 to obtain correction data of normal perspective;
step 9: the correction data obtained in the step 8 can be used as a new calibration algorithm for image calibration, so that time and cost are saved;
example 3:
the embodiment provides the calibration method, which belongs to the calibration method of the large-format image, wherein the size of a calibration plate platform of the large-format image is not less than 120cm multiplied by 90cm, and the calibration method can be applied to the industries of large-format image detection such as cloth, leather and the like, but is not limited to the industries;
example 4:
in the embodiment, a grid plane calibration plate is also used, rectangular grids are uniformly distributed on the calibration plate, lines are mutually perpendicular, and a total of 24×18 small rectangles are shown in fig. 7; in the calibration process, only one calibration plate image is required to be calibrated, after the image is calibrated, multiple calibrations are not required in subsequent work, and a large number of image calibrations or multi-angle shooting are not required, so that the image calibration process is simplified, and the time and cost are saved.
Example 5:
the embodiment provides that the camera adopted by the calibration method is fixed right above the calibration plate, the shooting path of the camera lens is perpendicular to the calibration plate, and the type of the camera can be selected from a linear array camera or an area array camera.
Example 6:
the embodiment proposes that Halcon, openCV may be selected as the image processing software.
Example 7:
the embodiment provides that rectangular grids are designed to be a grid distance every 50mm, and the number of the grids is related to the precision requirement; the number of rectangular grids on the calibration plate in this embodiment is 24×18, but is not limited to 24×18, and an increase in the number can improve the calibration accuracy.
Claims (7)
1. The method for calibrating the rapid large-format image is characterized by comprising the following steps of:
the method for calibrating the rapid large-format image adopts a plane calibration plate, and square grid lines are drawn on the calibration plate;
taking a picture and sampling by using a camera with a fixed angle, inputting the picture into image processing software to perform algorithm processing on the picture, acquiring characteristic points as grid points, and further realizing calibration of the camera;
when the image algorithm detection is carried out, the pixel coordinates of each characteristic point are stored after the characteristic points are obtained, all the pixel coordinates are stored as a tuple, the tuple is subjected to mapping transformation and matrix processing to obtain correction data, various distortion problems caused by transmission transformation and barrel distortion are corrected, and the correction of the real position of each characteristic point after camera calibration is completed;
the correction data obtained through the algorithm can be directly used for image calibration, and complex algorithm processing is not needed for camera calibration and image processing in the follow-up process, so that the calibration is quick and accurate;
the calibration method only needs to calibrate one calibration plate image, the calibration of the image is completed, multiple calibrations are not needed in the processing work of the subsequent image, and the calibration is not needed through a large number of images or images shot at multiple angles, so that the calibration process of the image is simplified, and the time and the cost are saved.
2. The method for obtaining correction data using an image algorithm according to claim 1, wherein the specific contents include the steps of:
step 1: reading a calibration plate image shot by a camera in image processing software, selecting an area where a grid is positioned, and removing redundant parts of edges;
step 2: adopting automatic local threshold processing, selecting a dark region to extract grid lines;
step 3: carrying out impurity treatment on the image, so that only the background and the grid lines are arranged on the calibration plate, and the subsequent extraction of the characteristic points is convenient;
step 4: separating the background from the grid lines, selecting a dark area (i.e., the grid lines) to be displayed in another window;
step 5: performing an insert operation to respectively determine a grid row area 1 and a grid column area 2;
step 6: calculating the intersection of the region 1 and the region 2 to obtain a region intersection;
step 7: separating the crossing points as characteristic points, recording pixel coordinates of each characteristic point, and storing the pixel coordinates as a tuple;
step 8: mapping and transforming the tuple obtained in the step 7 to obtain correction data of normal perspective;
step 9: the correction data obtained in the step 8 can be used as a new calibration algorithm for image calibration, so that time and cost are saved.
3. The method for calibrating the rapid large-format image according to claim 1, wherein the size of a calibration plate platform of the large-format image is not smaller than the size of a workbench plane, and the method is suitable for large-format image detection industries such as cloth, leather and the like.
4. The calibration plate of claim 1, wherein,
in the calibration method, only one calibration plate is used, rectangular grids which are uniformly distributed are arranged on the calibration plate, and the lines are mutually perpendicular to the lines.
5. A camera for photographing as claimed in claim 1, wherein,
the camera adopted by the calibration method is fixed right above the calibration plate, the shooting path of the camera lens is mutually perpendicular to the calibration plate, and the type of the camera can be selected from a linear array camera or an area array camera.
6. The image processing software of claim 2, wherein the image processing software is selected from Halcon, openCV.
7. The rectangular grid on calibration plate surface according to claim 4, characterized in that the rectangular grid is designed to be a grid distance every 50mm, the number of grids being related to the accuracy requirement.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311309736.2A CN117392217A (en) | 2023-10-10 | 2023-10-10 | Calibration method for rapid large-format image |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202311309736.2A CN117392217A (en) | 2023-10-10 | 2023-10-10 | Calibration method for rapid large-format image |
Publications (1)
Publication Number | Publication Date |
---|---|
CN117392217A true CN117392217A (en) | 2024-01-12 |
Family
ID=89469414
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202311309736.2A Pending CN117392217A (en) | 2023-10-10 | 2023-10-10 | Calibration method for rapid large-format image |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN117392217A (en) |
-
2023
- 2023-10-10 CN CN202311309736.2A patent/CN117392217A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11503275B2 (en) | Camera calibration system, target, and process | |
CN110580724B (en) | Method and device for calibrating binocular camera set and storage medium | |
CN112070845A (en) | Calibration method and device of binocular camera and terminal equipment | |
CN109859272B (en) | Automatic focusing binocular camera calibration method and device | |
CN106780623A (en) | A kind of robotic vision system quick calibrating method | |
CN110660107A (en) | Plane calibration plate, calibration data acquisition method and system | |
CN110099267A (en) | Trapezoidal correcting system, method and projector | |
WO2018196303A1 (en) | Projector calibration method and apparatus based on multi-directional projection | |
CN111932636B (en) | Calibration and image correction method and device for binocular camera, storage medium, terminal and intelligent equipment | |
CN110033407B (en) | Shield tunnel surface image calibration method, splicing method and splicing system | |
CN111383194B (en) | Polar coordinate-based camera distortion image correction method | |
CN110136205B (en) | Parallax calibration method, device and system of multi-view camera | |
CN112802124A (en) | Calibration method and device for multiple stereo cameras, electronic equipment and storage medium | |
CN112907675B (en) | Calibration method, device, system, equipment and storage medium of image acquisition equipment | |
CN105989588B (en) | Special-shaped material cutting image correction method and system | |
CN114549652A (en) | Camera calibration method, device, equipment and computer readable medium | |
CN112489137A (en) | RGBD camera calibration method and system | |
CN113920206A (en) | Calibration method of perspective tilt-shift camera | |
CN112264992A (en) | Industrial robot coordinate system calibration method, system, device and storage medium | |
CN112700502A (en) | Binocular camera system and binocular camera space calibration method | |
CN116188591A (en) | Multi-camera global calibration method and device and electronic equipment | |
CN112258581B (en) | On-site calibration method for panoramic camera with multiple fish glasses heads | |
CN117392217A (en) | Calibration method for rapid large-format image | |
CN115100225B (en) | Method and device for determining error field of camera view field, electronic equipment and medium | |
CN111340891B (en) | Method and system for calibrating camera by using LED screen |
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 |