CN117437296A - Camera calibration method, glass measurement method, electronic device and storage medium - Google Patents

Camera calibration method, glass measurement method, electronic device and storage medium Download PDF

Info

Publication number
CN117437296A
CN117437296A CN202311277126.9A CN202311277126A CN117437296A CN 117437296 A CN117437296 A CN 117437296A CN 202311277126 A CN202311277126 A CN 202311277126A CN 117437296 A CN117437296 A CN 117437296A
Authority
CN
China
Prior art keywords
calibration plate
calibration
camera
glass
image
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
Application number
CN202311277126.9A
Other languages
Chinese (zh)
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.)
Zhejiang Huaray Technology Co Ltd
Original Assignee
Zhejiang Huaray 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 Zhejiang Huaray Technology Co Ltd filed Critical Zhejiang Huaray Technology Co Ltd
Priority to CN202311277126.9A priority Critical patent/CN117437296A/en
Publication of CN117437296A publication Critical patent/CN117437296A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR 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
    • 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
    • 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/002Measuring arrangements characterised by the use of optical techniques for measuring two or more coordinates

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Theoretical Computer Science (AREA)
  • Studio Devices (AREA)

Abstract

The application provides a camera calibration method, a glass measurement method, electronic equipment and a computer storage medium. The camera calibration method comprises the following steps: sequentially placing the calibration plates at different positions of a preset area, collecting corresponding calibration plate images, and dividing the calibration plate images into a left calibration plate image and a right calibration plate image according to the area of the left calibration plate and the area of the right calibration plate; taking a calibration plate image acquired at the central position of a preset area as a standard calibration plate image, projecting a left calibration plate image acquired at other positions onto the standard calibration plate image to acquire a left homography matrix, and projecting a right calibration plate image acquired at other positions onto the standard calibration plate image to acquire a right homography matrix; and acquiring calibration parameters of the camera based on the left homography matrix and the right homography matrix. The camera calibration method has the advantages of low hardware cost, simple structure, large visual field and suitability for glass measurement under ultra-large visual field.

Description

Camera calibration method, glass measurement method, electronic device and storage medium
Technical Field
The present disclosure relates to the field of camera calibration technologies, and in particular, to a camera calibration method, a glass measurement method, an electronic device, and a storage medium.
Background
In the prior art, a plurality of small visual fields obtained by an optical measuring device are seamlessly spliced to output a high-precision large visual field, so that the hardware cost is high. The partition calibration method is not suitable for ultra-large-view glass measurement because the calibration plate with known prior size is relied on, and the calibration plate with two-dimensional code mark information is required to cover four camera views at the same time. The mode uses telecentric lens, has smaller distortion, and is not suitable for measuring scenes with larger distortion of FA lens under ultra-large visual field.
In the prior art, the motion control of the optical system by the motion platform is excessively dependent, the glass size measurement cannot be independently completed by the optical system, the single system can only complete the size measurement in one direction, the size measurement in other angle directions cannot be completed, the limitation is large, and the method is not suitable for industrial actual scenes.
Disclosure of Invention
In order to solve the technical problems, the application provides a camera calibration method, a camera calibration device and a computer storage medium.
In order to solve the technical problems, the application provides a camera calibration method, which comprises the following steps: sequentially placing the calibration plates at different positions in a preset area, and collecting corresponding calibration plate images, wherein the calibration plates consist of a left calibration plate and a right calibration plate which are on the same plane; splitting the calibration plate image into a left calibration plate image and a right calibration plate image according to the region of the left calibration plate and the region of the right calibration plate; taking a calibration plate image acquired at the central position of the preset area as a standard calibration plate image, projecting a left calibration plate image acquired at other positions onto the standard calibration plate image to acquire a left homography matrix, and projecting a right calibration plate image acquired at other positions onto the standard calibration plate image to acquire a right homography matrix; and acquiring calibration parameters of the camera based on the left homography matrix and the right homography matrix.
After the corresponding calibration plate image is acquired, the camera calibration method further comprises the following steps: and carrying out distortion correction on the calibration plate image, wherein the distortion correction mode comprises radial distortion correction and/or tangential distortion correction.
The camera calibration method comprises the steps of acquiring a left homography matrix, wherein the left calibration plate image acquired at other positions is projected onto the standard calibration plate image, and the camera calibration method further comprises the following steps: acquiring a plurality of groups of left calibration plate images acquired at the same position to obtain a plurality of groups of left homography matrixes; and carrying out optimization calculation by using the initial values of the plurality of groups of left homography matrixes to obtain optimal solutions of the plurality of groups of left homography matrixes.
The optimizing calculation is performed by using the initial values of the plurality of groups of left homography matrixes to obtain optimal solutions of the plurality of groups of left homography matrixes, and the optimizing calculation comprises the following steps: decomposing the plurality of groups of left homography matrixes to obtain a camera internal reference matrix and a camera external reference matrix; performing optimization calculation based on the camera internal reference matrix and initial values of camera focal length parameters to obtain internal reference optimal solutions of a plurality of groups of left homography matrixes; performing optimization calculation based on the initial value of the rotation matrix and the initial value of the translation matrix in the camera external parameter matrix to obtain external parameter optimal solutions of a plurality of groups of left homography matrices; and obtaining the optimal solutions of the multiple groups of left homography matrixes from the internal reference optimal solution and the external reference optimal solution.
The optimizing calculation is performed based on the camera internal parameter matrix and the initial value of the camera focal length parameter to obtain an internal parameter optimal solution of a plurality of groups of left homography matrixes, and the optimizing calculation comprises the following steps: constructing a rotation matrix by using the camera internal parameter matrix and the camera external parameter matrix; obtaining a relation of camera internal parameters in the rotation matrix based on the unit orthogonality of the rotation matrix; substituting initial values of camera focal length parameters of the plurality of groups of left homography matrixes into the relational expression, and solving the internal reference optimal solution.
The left calibration plate and the right calibration plate are round calibration plates with the same size.
In order to solve the technical problem, the application further provides a glass measurement method, which comprises the following steps: obtaining calibration parameters of a camera, wherein the calibration parameters are obtained through the camera calibration method; acquiring a placement area of the calibration plate in the calibration process, and acquiring a plurality of glass images according to the placement area; taking a glass image corresponding to the standard calibration plate image as a standard glass image; projecting the glass image of the left half area of the glass to a coordinate system of the standard glass image by utilizing the left homography matrix; projecting the glass image of the right half area of the glass to a coordinate system of the standard glass image by utilizing the right homography matrix; the dimensions of the glass are measured based on several glass images of the same coordinate system.
Wherein, the glass measurement method further comprises: projecting an image area of the glass image positioned in the left half area of the glass onto a coordinate system of the standard glass image by utilizing the left homography matrix; and projecting an image area of the glass image positioned in the right half area of the glass to a coordinate system of the standard glass image by utilizing the right homography matrix.
In order to solve the technical problem, the application further provides electronic equipment, which comprises a memory and a processor coupled with the memory; wherein the memory is configured to store program data and the processor is configured to execute the program data to implement the camera calibration method according to the above claims and/or the glass measurement method according to the above claims.
In order to solve the above technical problem, the present application further proposes a computer storage medium, where the computer storage medium is configured to store program data, where the program data, when executed by a computer, is configured to implement the above-mentioned camera calibration method and/or the above-mentioned glass measurement method.
Compared with the prior art, the beneficial effects of this application are: the electronic equipment sequentially places the calibration plates at different positions in a preset area and acquires corresponding calibration plate images, wherein the calibration plates consist of a left calibration plate and a right calibration plate which are on the same plane; splitting the calibration plate image into a left calibration plate image and a right calibration plate image according to the region of the left calibration plate and the region of the right calibration plate; taking a calibration plate image acquired at the central position of the preset area as a standard calibration plate image, projecting a left calibration plate image acquired at other positions onto the standard calibration plate image to acquire a left homography matrix, and projecting a right calibration plate image acquired at other positions onto the standard calibration plate image to acquire a right homography matrix; and acquiring calibration parameters of the camera based on the left homography matrix and the right homography matrix. The camera calibration method of the multi-homography matrix of the left homography matrix and the right homography matrix has the advantages of low hardware cost, simple structure, large visual field and suitability for glass measurement under an oversized visual field, and the edge measurement error can be effectively reduced by using the glass left and right half-zone size measurement method based on the left and right homography matrices.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are needed in the description of the embodiments will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present application, and that other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
Wherein:
FIG. 1 is a flow chart of a first embodiment of a camera calibration method provided herein;
FIG. 2 is a schematic diagram of an implementation of a calibration plate of the camera calibration method provided by the present application;
FIG. 3 is a flow chart of a second embodiment of a camera calibration method provided herein;
FIG. 4 is a flow chart of the substeps of step S22 in the camera calibration method provided herein;
FIG. 5 is a flow chart of an embodiment of a glass measurement method provided herein;
FIG. 6 is a schematic diagram of an embodiment of an electronic device provided herein;
fig. 7 is a schematic structural diagram of an embodiment of a computer storage medium provided in the present application.
Detailed Description
The following description of the technical solutions in the embodiments of the present application will be made clearly and completely with reference to the accompanying drawings in the embodiments of the present application, and it is apparent that the described embodiments are only some embodiments of the present application, not all embodiments. All other embodiments, which can be made by one of ordinary skill in the art without undue burden from the present disclosure, are within the scope of the present disclosure.
The terms "first," "second," "third," "fourth" and the like in the description and in the claims of this application and in the above-described figures, if any, are used for distinguishing between similar objects and not necessarily for describing a particular sequential or chronological order. It is to be understood that the data so used may be interchanged where appropriate such that embodiments of the present application described herein may be implemented, for example, in sequences other than those illustrated or described herein. Furthermore, the terms "comprises," "comprising," and "having," and any variations thereof, are intended to cover a non-exclusive inclusion, such that a process, method, system, article, or apparatus that comprises a list of steps or elements is not necessarily limited to those steps or elements expressly listed but may include other steps or elements not expressly listed or inherent to such process, method, article, or apparatus.
Referring to fig. 1 and fig. 2, fig. 1 is a schematic flow chart of a first embodiment of a camera calibration method provided in the present application; fig. 2 is a schematic diagram of an implementation of a calibration plate of the camera calibration method provided in the present application.
The camera calibration method is applied to the electronic equipment, wherein the electronic equipment can be a server, a local terminal or a system formed by mutually matching the server and the local terminal. Accordingly, each part, such as each unit, subunit, module, and sub-module, included in the camera calibration device may be all disposed in the server, or may be all disposed in the local terminal, or may be disposed in the server and the local terminal, respectively.
Further, the server may be hardware or software. When the server is hardware, the server may be implemented as a distributed server cluster formed by a plurality of servers, or may be implemented as a single server. When the server is software, it may be implemented as a plurality of software or software modules, for example, software or software modules for providing a distributed server, or may be implemented as a single software or software module, which is not specifically limited herein.
As shown in fig. 1, the specific steps are as follows:
step S11: and sequentially placing the calibration plates at different positions in a preset area, and collecting corresponding calibration plate images.
The calibration plate is composed of a left calibration plate and a right calibration plate which are on the same plane as shown in fig. 2.
In an embodiment of the present application, the left calibration plate and the right calibration plate are circular calibration plates with the same dimensions.
Specifically, the electronic devices are sequentially placed at different positions of the preset area according to the calibration plates, wherein the preset positions can be that two calibration plates are located on the same plane, the electronic devices aim at offset in the horizontal direction, the offset size is 1/2-1/4 of the size of the calibration plates, and the camera or any image acquisition device is used for acquiring the images of the calibration plates corresponding to the calibration plates.
In the embodiment of the application, the electronic equipment sequentially places the calibration plates along the positions 2-9 in the track diagram, acquires corresponding images of the calibration plates, and allows the calibration plates to slightly rotate in the moving process.
In the embodiment of the application, after the electronic equipment collects the corresponding calibration plate image, distortion correction is performed on the calibration plate image. The distortion correction mode comprises any distortion correction method such as radial distortion correction and/or tangential distortion correction, so that the influence of image distortion is reduced, and the image accuracy is improved.
Step S12: splitting the calibration plate image into a left calibration plate image and a right calibration plate image according to the area of the left calibration plate and the area of the right calibration plate.
Specifically, the electronic equipment performs automatic segmentation through image recognition, and further divides a calibration plate in the calibration plate image into two parts to obtain a left calibration plate image and a right calibration plate image.
Step S13: taking a calibration plate image acquired at the central position of a preset area as a standard calibration plate image, projecting a left calibration plate image acquired at other positions onto the standard calibration plate image to acquire a left homography matrix, and projecting a right calibration plate image acquired at other positions onto the standard calibration plate image to acquire a right homography matrix.
In an embodiment of the present application, after the left calibration plate image acquired at other positions is projected onto the standard calibration plate image and the left homography matrix is acquired, an embodiment is further provided for acquiring an optimal solution of multiple sets of left homography matrices. Referring to fig. 3 in particular, fig. 3 is a schematic flow chart of a second embodiment of the camera calibration method provided in the present application.
As shown in fig. 3, the specific steps are as follows:
step S21: and acquiring a plurality of groups of left calibration plate images acquired at the same position to obtain a plurality of groups of left homography matrixes.
Specifically, the electronic device acquires a plurality of groups of left calibration plate images acquired at the same position through image acquisition or image segmentation.
It should be noted that, in the embodiment of the present application, the step of acquiring, by the electronic device, a plurality of sets of right calibration plate images acquired at the same position to obtain a plurality of sets of right homography matrices is the same as the step of acquiring, by the electronic device, a plurality of sets of left homography matrices acquired by the left calibration plate images, and will not be described herein.
Step S22: and carrying out optimization calculation by using initial values of the left homography matrixes to obtain optimal solutions of the left homography matrixes.
Specifically, the electronic device performs optimization calculation by using initial values of the multiple groups of left homography matrices to obtain optimal solutions of the multiple groups of left homography matrices.
In order to further obtain the optimal solution of the left homography matrix, the present application proposes step S221-step S224 as a sub-step of step S22. Referring specifically to fig. 4, fig. 4 is a schematic flow chart of a sub-step of step S22 in the camera calibration method provided in the present application.
As shown in fig. 4, the specific steps are as follows:
step S221: and decomposing the plurality of groups of left homography matrixes to obtain a camera internal reference matrix and a camera external reference matrix.
Specifically, the electronic device decomposes multiple sets of left homography matrices of the image, wherein the homography matrices of the single image are decomposed into h=sa [ r ] 1 r 2 t]S is a proportionality coefficient, A is a camera internal reference matrix,[r 1 r 2 t]is an extrinsic matrix.
Step S222: and performing optimization calculation based on the camera internal reference matrix and the initial value of the camera focal length parameter to obtain internal reference optimal solutions of a plurality of groups of left homography matrixes.
The electronic equipment utilizes the camera internal parameter matrix and the camera external parameter matrix to construct a rotation matrix, and a relation of camera internal parameters in the rotation matrix is obtained based on unit orthogonality of the rotation matrix; substituting initial values of camera focal length parameters of the plurality of groups of left homography matrixes into the relational expression, and solving the internal reference optimal solution.
Specifically, assuming that (u, v) in the internal reference matrix is the image center coordinate, after decomposing the H matrix, a structure is constructed about (H 11 ,H 12 ,H 13 ,H 21 ,H 22 ,H 23 ,H 31 ,H 32 ,H 33 The new matrix M of u, v) is obtainable from the unit orthogonality of the rotation matrix:
wherein the homographies provide internal references (f x ,f y ) And (3) optimizing the initial solution by using an LM algorithm (damping Gaussian Newton method) or other optimization algorithms to obtain an internal reference optimal solution.
Step S223: and performing optimization calculation based on the initial value of the rotation matrix and the initial value of the translation matrix in the camera external matrix to obtain external parameter optimal solutions of a plurality of groups of left homography matrices.
Specifically, the electronic device can obtain an initial value of the external parameter by decomposing the homography matrix H into RT (R represents a rotation matrix, T represents a translation vector), and obtain an optimal solution of the external parameter by optimization through an LM algorithm (damped gaussian newton method) or other optimization algorithms.
Step S224: and obtaining optimal solutions of a plurality of groups of left homography matrixes by the internal reference optimal solution and the external reference optimal solution.
Specifically, the electronic equipment combines the optimized internal and external parameters to obtain an optimized homography matrix, and at the moment, the re-projection error of the optimized homography matrix on all the calibration plate patterns reaches the minimum value.
By the mode, the reprojection error of the homography matrix on all the calibration plate patterns reaches the minimum value.
Step S14: and acquiring calibration parameters of the camera based on the left homography matrix and the right homography matrix.
Specifically, the electronic device obtains calibration parameters of the camera through the left homography matrix and the right homography matrix.
Through the steps S11-S14, the electronic equipment sequentially places the calibration plates at different positions in a preset area and acquires corresponding calibration plate images, wherein the calibration plates consist of a left calibration plate and a right calibration plate which are on the same plane; splitting the calibration plate image into a left calibration plate image and a right calibration plate image according to the region of the left calibration plate and the region of the right calibration plate; taking a calibration plate image acquired at the central position of the preset area as a standard calibration plate image, projecting a left calibration plate image acquired at other positions onto the standard calibration plate image to acquire a left homography matrix, and projecting a right calibration plate image acquired at other positions onto the standard calibration plate image to acquire a right homography matrix; and acquiring calibration parameters of the camera based on the left homography matrix and the right homography matrix. The camera calibration method of the multi-homography matrix of the left homography matrix and the right homography matrix has the advantages of low hardware cost, simple structure and large visual field.
In order to solve the above-mentioned technical problems, the present application further provides a glass measurement method, and specifically please refer to fig. 5, fig. 5 is a schematic flow chart of an embodiment of the glass measurement method provided in the present application.
As shown in fig. 5, the specific steps are as follows:
step S31: and obtaining calibration parameters of the camera.
Specifically, the electronic device obtains calibration parameters of the camera through the camera calibration method in the above embodiment.
Step S32: and acquiring a placement area of the calibration plate in the calibration process, and acquiring a plurality of glass images according to the placement area.
Specifically, referring to fig. 2, the electronic device acquires the placement position of the calibration plate in any calibration process, and acquires a plurality of glass images of a plurality of glasses according to the placement position by image acquisition modes such as shooting or recording.
Step S33: and taking the glass image corresponding to the standard calibration plate image as a standard glass image.
Specifically, the electronic device takes a glass image corresponding to the standard calibration plate image as a standard glass image. The standard calibration plate image is a calibration plate image obtained when the calibration plate is placed at the middle position, namely, a calibration plate image shot when the calibration plate is placed at the No. 5 position in FIG. 2. The standard glass image is a glass image photographed when the calibration plate is placed in the middle position.
Step S34: and projecting the glass image of the left half area of the glass to a coordinate system of the standard glass image by using the left homography matrix.
In an embodiment of the present application, the electronic device uses a left homography matrix, and uses a standard glass image middle line as a boundary, when the glass image is completely in the left half area, the electronic device uses the left homography matrix to project all the glass images in the left half area of the glass onto the coordinate system of the standard glass image.
In other embodiments of the present application, when the glass image is not entirely in the left half area, i.e., only a portion of the glass image is in the left half area, the electronic device projects the portion of the glass image in the left half area with a left homography matrix, projects the glass image in the left half area of the glass image to the coordinate system of the standard glass image with the left homography matrix, projects the portion of the glass image in the right half area with a right homography matrix, and projects the glass image in the right half area of the glass image to the coordinate system of the standard glass image with the right homography matrix.
Step S35: and projecting the glass image of the right half area of the glass to a coordinate system of the standard glass image by using the right homography matrix.
In an embodiment of the present application, the electronic device uses a right homography matrix, and uses a middle line of a standard glass image as a boundary, when the glass image is completely in a right half area, the electronic device uses the right homography matrix to project, and uses the right homography matrix to project all the glass images in a left half area of the glass onto a coordinate system of the standard glass image.
In other embodiments of the present application, when the glass image is not entirely in the right half, i.e., only a portion of the glass image is in the right half, the electronic device projects the portion of the glass image in the right half with a right homography matrix, projects the glass image in the right half of the glass image to the coordinate system of the standard glass image with the right homography matrix, projects the portion of the glass image in the left half with a left homography matrix, and projects the glass image in the left half of the glass image to the coordinate system of the standard glass image with the left homography matrix.
Step S36: the dimensions of the glass are measured based on several glass images of the same coordinate system.
Specifically, in the embodiment of the application, according to the hole site measurement requirement in the glass, the electronic device measures the size of the left half area by using a left homography matrix (HI), and measures the size of the right half area by using a right homography matrix Hr. And (3) crossing the sizes of the left and right half areas, obtaining the conversion relation between Hl and Hr through the priori physical sizes of the left and right calibration plates, integrating a world coordinate system into the Hl coordinate system, and measuring the sizes of the glass based on a plurality of glass images of the same coordinate system.
Through the mode, the method and the device can realize the measurement of the ultra-large visual field glass, and have the advantages of low cost, strong feasibility, no dependence on hardware plc and a motion platform and no limitation on the requirement on the dimension measurement direction. Meanwhile, the measurement of the left and right half areas of the glass based on the double homography matrix can effectively reduce the measurement error caused by the distortion of the edge area.
In order to implement the camera calibration method and/or the glass measurement method, an electronic device is further provided, and referring to fig. 6, fig. 6 is a schematic structural diagram of an embodiment of the electronic device provided in the present application.
The electronic device 400 of the present embodiment includes a processor 41, a memory 42, an input-output device 43, and a bus 44.
The processor 41, the memory 42 and the input/output device 43 are respectively connected to the bus 44, and the memory 42 stores program data, and the processor 41 is configured to execute the program data to implement the camera calibration method and/or the glass measurement method according to the above embodiments.
In the present embodiment, the processor 41 may also be referred to as a CPU (Central Processing Unit ). The processor 41 may be an integrated circuit chip with signal processing capabilities. The processor 41 may also be a general purpose processor, a digital signal processor (DSP, digital Signal Process), an application specific integrated circuit (ASIC, application Specific Integrated Circuit), a field programmable gate array (FPGA, field Programmable Gate Array) or other programmable logic device, discrete gate or transistor logic device, discrete hardware components. The general purpose processor may be a microprocessor or the processor 41 may be any conventional processor or the like.
Still further, referring to fig. 7, fig. 7 is a schematic structural diagram of an embodiment of the computer storage medium provided in the present application, in which the computer storage medium 600 stores a computer program 61, and the computer program 61 is configured to implement the camera calibration method and/or the glass measurement method according to the above embodiments when executed by a processor.
Embodiments of the present application are implemented in the form of software functional units and sold or used as a stand-alone product, which may be stored on a computer readable storage medium. Based on such understanding, the technical solution of the present application may be embodied in essence or a part contributing to the prior art or all or part of the technical solution, in the form of a software product stored in a storage medium, including several instructions to cause a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor (processor) to perform all or part of the steps of the methods described in the embodiments of the present application. And the aforementioned storage medium includes: a U-disk, a removable hard disk, a Read-Only Memory (ROM), a random access Memory (RAM, random Access Memory), a magnetic disk, or an optical disk, or other various media capable of storing program codes.
The foregoing description is only of embodiments of the present application, and is not intended to limit the scope of the patent application, and all equivalent structures or equivalent processes using the descriptions and the contents of the present application or other related technical fields are included in the scope of the patent application.

Claims (10)

1. The camera calibration method is characterized by comprising the following steps of:
sequentially placing the calibration plates at different positions in a preset area, and collecting corresponding calibration plate images, wherein the calibration plates consist of a left calibration plate and a right calibration plate which are on the same plane;
splitting the calibration plate image into a left calibration plate image and a right calibration plate image according to the region of the left calibration plate and the region of the right calibration plate;
taking a calibration plate image acquired at the central position of the preset area as a standard calibration plate image, projecting a left calibration plate image acquired at other positions onto the standard calibration plate image to acquire a left homography matrix, and projecting a right calibration plate image acquired at other positions onto the standard calibration plate image to acquire a right homography matrix;
and acquiring calibration parameters of the camera based on the left homography matrix and the right homography matrix.
2. The camera calibration method according to claim 1, wherein,
after the corresponding calibration plate image is acquired, the camera calibration method further comprises the following steps:
and carrying out distortion correction on the calibration plate image, wherein the distortion correction mode comprises radial distortion correction and/or tangential distortion correction.
3. The camera calibration method according to claim 1, wherein,
the camera calibration method further comprises the steps of projecting the left calibration plate image acquired at other positions onto the standard calibration plate image, and after the left homography matrix is acquired:
acquiring a plurality of groups of left calibration plate images acquired at the same position to obtain a plurality of groups of left homography matrixes;
and carrying out optimization calculation by using the initial values of the plurality of groups of left homography matrixes to obtain optimal solutions of the plurality of groups of left homography matrixes.
4. A camera calibration method according to claim 3, wherein,
the optimizing calculation is performed by using the initial values of the plurality of groups of left homography matrixes to obtain optimal solutions of the plurality of groups of left homography matrixes, including:
decomposing the plurality of groups of left homography matrixes to obtain a camera internal reference matrix and a camera external reference matrix;
performing optimization calculation based on the camera internal reference matrix and initial values of camera focal length parameters to obtain internal reference optimal solutions of a plurality of groups of left homography matrixes;
performing optimization calculation based on the initial value of the rotation matrix and the initial value of the translation matrix in the camera external parameter matrix to obtain external parameter optimal solutions of a plurality of groups of left homography matrices;
and obtaining the optimal solutions of the multiple groups of left homography matrixes from the internal reference optimal solution and the external reference optimal solution.
5. The camera calibration method of claim 4, wherein,
the optimizing calculation is performed based on the camera internal reference matrix and the initial value of the camera focal length parameter to obtain the internal reference optimal solution of a plurality of groups of left homography matrixes, and the optimizing calculation comprises the following steps:
constructing a rotation matrix by using the camera internal parameter matrix and the camera external parameter matrix;
obtaining a relation of camera internal parameters in the rotation matrix based on the unit orthogonality of the rotation matrix;
substituting initial values of camera focal length parameters of the plurality of groups of left homography matrixes into the relational expression, and solving the internal reference optimal solution.
6. The camera calibration method according to claim 1, wherein,
the left calibration plate and the right calibration plate are round calibration plates with the same size.
7. A glass measurement method, characterized in that the glass measurement method comprises:
obtaining calibration parameters of a camera, wherein the calibration parameters are obtained by the camera calibration method according to any one of claims 1 to 6;
acquiring a placement area of the calibration plate in the calibration process, and acquiring a plurality of glass images according to the placement area;
taking a glass image corresponding to the standard calibration plate image as a standard glass image;
projecting the glass image of the left half area of the glass to a coordinate system of the standard glass image by utilizing the left homography matrix;
projecting the glass image of the right half area of the glass to a coordinate system of the standard glass image by utilizing the right homography matrix;
the dimensions of the glass are measured based on several glass images of the same coordinate system.
8. The glass measurement method according to claim 7, wherein,
the glass measurement method further comprises the following steps:
projecting an image area of the glass image positioned in the left half area of the glass onto a coordinate system of the standard glass image by utilizing the left homography matrix;
and projecting an image area of the glass image positioned in the right half area of the glass to a coordinate system of the standard glass image by utilizing the right homography matrix.
9. An electronic device comprising a memory and a processor coupled to the memory;
wherein the memory is for storing program data and the processor is for executing the program data to implement the camera calibration method of any one of claims 1 to 6 and/or the glass measurement method of any one of claims 7 to 8.
10. A computer storage medium for storing program data which, when executed by a computer, is adapted to carry out the camera calibration method according to any one of claims 1 to 6 and/or the glass measurement method according to any one of claims 7 to 8.
CN202311277126.9A 2023-09-28 2023-09-28 Camera calibration method, glass measurement method, electronic device and storage medium Pending CN117437296A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202311277126.9A CN117437296A (en) 2023-09-28 2023-09-28 Camera calibration method, glass measurement method, electronic device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202311277126.9A CN117437296A (en) 2023-09-28 2023-09-28 Camera calibration method, glass measurement method, electronic device and storage medium

Publications (1)

Publication Number Publication Date
CN117437296A true CN117437296A (en) 2024-01-23

Family

ID=89550683

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202311277126.9A Pending CN117437296A (en) 2023-09-28 2023-09-28 Camera calibration method, glass measurement method, electronic device and storage medium

Country Status (1)

Country Link
CN (1) CN117437296A (en)

Similar Documents

Publication Publication Date Title
US10924729B2 (en) Method and device for calibration
CN109840477B (en) Method and device for recognizing shielded face based on feature transformation
US20190130605A1 (en) Method and device for verification
US11615548B2 (en) Method and system for distance measurement based on binocular camera, device and computer-readable storage medium
CN110599586A (en) Semi-dense scene reconstruction method and device, electronic equipment and storage medium
CN108924544A (en) Camera distortion measurement method and test device
CN111507894B (en) Image stitching processing method and device
CN111325798A (en) Camera model correction method and device, AR implementation equipment and readable storage medium
CN111107274B (en) Image brightness statistical method and imaging device
CN111709999A (en) Calibration plate, camera calibration method and device, electronic equipment and camera system
CN113962876B (en) Pixel distortion correction method, correction device and terminal
CN107067441B (en) Camera calibration method and device
CN111161348B (en) Object pose estimation method, device and equipment based on monocular camera
CN110599588A (en) Particle reconstruction method and device in three-dimensional flow field, electronic device and storage medium
CN117522963A (en) Corner positioning method and device of checkerboard, storage medium and electronic equipment
CN117437296A (en) Camera calibration method, glass measurement method, electronic device and storage medium
Kim et al. An efficient method of estimating edge locations with subpixel accuracy in noisy images
CN112785651A (en) Method and apparatus for determining relative pose parameters
CN114897990A (en) Camera distortion calibration method and system based on neural network and storage medium
CN112529943B (en) Object detection method, object detection device and intelligent equipment
CN111311690B (en) Calibration method and device of depth camera, terminal and computer storage medium
CN115100225A (en) Method and device for determining error field of camera view field, electronic equipment and medium
CN113409375A (en) Image processing method, image processing apparatus, and non-volatile storage medium
CN113538588A (en) Calibration method, calibration device and electronic equipment applying calibration device
CN118229938B (en) Color-imparting method, device, apparatus, medium and program product for point cloud model

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