Tensor parallel computing accelerates camera checkerboard calibration method, device and equipment
By using a tensor parallel computation method, the tensor of the checkerboard grid vertex coordinates is obtained and decomposed into width and height matrices. The global pixel distance is then calculated, which solves the problems of long calibration time and low accuracy in the existing technology and achieves faster and more accurate calibration.
Patent Information
- Application Number
- CN202211712137.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-29
- Publication Date
- 2026-02-06
- Estimated Expiration
- 2042-12-29
AI Technical Summary
Existing camera checkerboard calibration methods fail to effectively consider the statistical distribution of checkerboard pixel size, resulting in poor calibration accuracy and long calibration time.
A tensor parallel computing method is adopted. By obtaining the tensor of the chessboard grid vertex coordinates, it is split into width and height matrices, the global width and height matrices are calculated, the pixel distance is obtained, and calibration is performed.
It effectively reduces the time required for checkerboard pixel calibration and improves calibration accuracy.
Smart Images

Figure CN115880374B_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The present application relates to the technical field of calibration processing, in particular to a tensor parallel computing accelerated camera checkerboard calibration method, device, equipment and medium. BACKGROUND
[0002] Zhang Zhengyou checkerboard calibration method is a widely used camera calibration method between traditional calibration method and self-calibration method. The existing method of calculating pixel distance and performing calibration does not consider the statistical distribution of the complete checkerboard pixel size, resulting in poor calibration accuracy, high complexity of serial loop calculation of the distance between the checkerboard vertices, and long calibration process time, which causes a large time overhead for subsequent camera calibration and preparation work.
[0003] Therefore, how to reduce the time of checkerboard pixel calibration and improve the accuracy of calibration is a problem to be solved at present. SUMMARY
[0004] The present application provides a tensor parallel computing accelerated camera checkerboard calibration method, device, equipment and medium, which aims to reduce the time of checkerboard pixel calibration and improve the accuracy of calibration.
[0005] In order to achieve the above-mentioned application purpose, the present application provides a tensor parallel computing accelerated camera checkerboard calibration method, which comprises:
[0006] obtaining the tensor of the vertex coordinates according to the vertex coordinates of the checkerboard;
[0007] obtaining a width matrix and a height matrix according to the tensor of the vertex coordinates;
[0008] obtaining a global width matrix according to the width matrix, and obtaining a global height matrix according to the height matrix;
[0009] obtaining the pixel distance between the vertex coordinates of the checkerboard according to the global width matrix and the global height matrix;
[0010] calibrating the checkerboard according to the pixel distance between the vertex coordinates of the checkerboard.
[0011] Further, the width matrix and the height matrix are obtained according to the tensor of the vertex coordinates, which comprises:
[0012] the vertex coordinates are divided into coordinates in a first direction and coordinates in a second direction, wherein the first direction is the width and the second direction is the height;
[0013] obtaining the tensor of the coordinates in the first direction according to the coordinates in the first direction;
[0014] obtaining a width matrix according to the tensor of the coordinates in the first direction;
[0015] obtaining a tensor of the coordinates in the second direction according to the coordinates in the second direction;
[0016] obtaining a height matrix according to the tensor of the coordinates in the second direction.
[0017] Further, before the steps of obtaining a global width matrix according to the width matrix and obtaining a global height matrix according to the height matrix, the method comprises:
[0018] calculating one-dimensional linear distances in the first direction and the second direction respectively by staggered indexing;
[0019] obtaining a width matrix and a height matrix in the first direction according to the one-dimensional linear distances in the first direction;
[0020] obtaining a width matrix and a height matrix in the second direction according to the one-dimensional linear distances in the second direction.
[0021] Further, after the steps of obtaining a width matrix and a height matrix in the first direction according to the one-dimensional linear distances in the first direction and obtaining a width matrix and a height matrix in the second direction according to the one-dimensional linear distances in the second direction, the method comprises:
[0022] calculating a Euclidean distance matrix in the first direction according to the width matrix and the height matrix in the first direction;
[0023] calculating a Euclidean distance matrix in the second direction according to the width matrix and the height matrix in the second direction;
[0024] obtaining a global width matrix according to the Euclidean distance matrix in the first direction;
[0025] obtaining a global height matrix according to the Euclidean distance matrix in the second direction.
[0026] Further, the step of calibrating the checkerboard according to the pixel distances between the coordinates of the vertices of the checkerboard comprises:
[0027] statistically obtaining a width value according to the global width matrix and a height value according to the global height matrix;
[0028] statistically obtaining a width value according to the global width matrix;
[0029] statistically obtaining a height value according to the global height matrix;
[0030] calculating the pixel distances between the vertices of the checkerboard according to the width value and the height value;
[0031] calibrate the checkerboard according to the pixel distance and the actual measured distance.
[0032] Further, the step of calculating the pixel distance between the vertex coordinates of the checkerboard according to the width value and the height value comprises:
[0033] According to the pixel distance, the distortion measurement of the calibration of the checkerboard is performed.
[0034] Further, the calibration of the checkerboard according to the pixel distance and the actual measured distance comprises:
[0035] Calculate the median of the pixel distance between the vertex coordinates of the checkerboard;
[0036] According to the median of the pixel distance between the vertex coordinates and the actual measured distance, the pixel conversion parameter of the checkerboard is obtained;
[0037] According to the pixel conversion parameter, the calibration of the checkerboard is performed.
[0038] The application also provides a tensor parallel computing accelerated camera checkerboard calibration device, characterized in that the device comprises:
[0039] A tensor module obtains the tensor of the vertex coordinates according to the vertex coordinates of the checkerboard.
[0040] A matrix module obtains a width matrix and a height matrix according to the tensor of the vertex coordinates.
[0041] A global matrix module obtains a global width matrix according to the width matrix and a global height matrix according to the height matrix.
[0042] A pixel distance module obtains the pixel distance between the vertex coordinates of the checkerboard according to the global width matrix and the global height matrix.
[0043] A calibration module calibrates the checkerboard according to the pixel distance between the vertex coordinates of the checkerboard.
[0044] The application also provides a computer device comprising a memory and a processor, wherein the memory stores a computer program, and wherein the processor implements the steps of the tensor parallel computing accelerated camera checkerboard calibration method according to any one of the above when executing the computer program.
[0045] The application also provides a computer readable storage medium having a computer program stored thereon, wherein the computer program implements the steps of the tensor parallel computing accelerated camera checkerboard calibration method according to any one of the above when executed by a processor.
[0046] Beneficial effects: according to the vertex coordinates of the checkerboard, a tensor of the vertex coordinates is obtained; according to the tensor of the vertex coordinates, a width matrix and a height matrix are obtained; according to the width matrix, a global width matrix is obtained; according to the height matrix, a global height matrix is obtained; according to the global width matrix and the global height matrix, a pixel distance between the vertex coordinates of the checkerboard is obtained; and according to the pixel distance between the vertex coordinates of the checkerboard, the checkerboard is calibrated. The application effectively reduces the time of pixel calibration of the checkerboard, and improves the accuracy of calibration. BRIEF DESCRIPTION OF DRAWINGS
[0047] Figure 1 An embodiment flowchart of a camera checkerboard calibration method accelerated by tensor parallel calculation of the application;
[0048] Figure 2 Another embodiment flowchart of a camera checkerboard calibration method accelerated by tensor parallel calculation of the application;
[0049] Figure 3 Another embodiment flowchart of a camera checkerboard calibration method accelerated by tensor parallel calculation of the application;
[0050] Figure 4 Another embodiment flowchart of a camera checkerboard calibration method accelerated by tensor parallel calculation of the application;
[0051] Figure 5 Another embodiment flowchart of a camera checkerboard calibration method accelerated by tensor parallel calculation of the application;
[0052] Figure 6 Another embodiment flowchart of a camera checkerboard calibration method accelerated by tensor parallel calculation of the application;
[0053] Figure 7 An embodiment structure diagram of a camera checkerboard calibration device accelerated by tensor parallel calculation of the application;
[0054] Figure 8 An embodiment structure diagram of a computer device of the application.
[0055] The implementation, functional features and advantages of the application will be further described with reference to the accompanying drawings. DETAILED DESCRIPTION
[0056] In order to make the purpose, technical solutions and advantages of the application more clear, the application will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the application, and are not used to limit the application.
[0057] It is to be understood that the singular forms "a," "an," and "the" include plural referents unless the context clearly dictates otherwise. It is further understood that the terms "comprise" (or comprise), "comprises" (or comprises) and "comprising" (or comprising) when used in this specification, specify the presence of stated features, integers, steps, operations, elements, modules, and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, modules, components, and / or groups thereof. It is further understood that when an element is referred to as being "connected" or "coupled" to another element, it can be directly connected or coupled to the other element or intervening elements can be present. In addition, the word "connected" or "coupled" as used herein can include wirelessly connected or wirelessly coupled. As used herein, the term "and / or" includes any and all combinations of one or more of the associated listed items.
[0058] It is to be understood that the terms so used are intended to encompass the general meaning of such terms as well as the meaning specifically defined herein, unless otherwise expressly defined herein. It is further understood by the person of ordinary skill in the art that all terms, including technical and scientific terms, used herein have the same meaning as commonly understood by one of ordinary skill in the art to which this application belongs unless otherwise specifically defined herein. It is further understood that terms such as those defined in commonly used dictionaries should be interpreted as having a meaning that is consistent with their meaning in the context of the specification and relevant art and will not be interpreted in an idealized or overly formal sense unless expressly so defined herein.
[0059] Reference Figure 1 In some embodiments, the present application provides a method for calibrating a camera checkerboard, comprising the following steps S1-S5:
[0060] S1-S2: obtaining a tensor of vertex coordinates according to the vertex coordinates of the checkerboard; obtaining a width matrix and a height matrix according to the tensor of vertex coordinates.
[0061] In some embodiments, the vertex coordinates are the coordinates of all points of the checkerboard. In some embodiments, the checkerboard is in the format of 7*7. The concept of tensor includes scalar, vector and linear operator. Tensor can be expressed in a coordinate system, which is an array of scalars, but it is defined as "independent of the choice of reference frame". Tensors are important in physics and engineering, for example, in diffusion tensor imaging, a tensor expressing the differential permeability of an organ to water can be used to produce a scan of the brain. The most important engineering examples are probably the stress tensor and the strain tensor, both of which are second-order tensors. For general linear materials, the relationship between them is determined by a fourth-order elastic tensor. In some embodiments, the input vertex coordinate tensor is 7*7*2, which is split into two two-dimensional matrices representing the position matrix in the x direction and the y direction, respectively. The x direction represents the width and the y direction represents the height.
[0062] S3-S4: obtaining a global width matrix according to the width matrix; obtaining a global height matrix according to the height matrix; and obtaining a pixel distance between vertex coordinates of the checkerboard according to the global width matrix and the global height matrix;
[0063] In the embodiment, the obtaining of the width matrix and the height matrix according to the vertex coordinates comprises: splitting the vertex coordinates into coordinates in a first direction and coordinates in a second direction, wherein the first direction is the width and the second direction is the height; obtaining a tensor of the coordinates in the first direction according to the coordinates in the first direction; obtaining the width matrix according to the tensor of the coordinates in the first direction; obtaining a tensor of the coordinates in the second direction according to the coordinates in the second direction; and obtaining the height matrix according to the tensor of the coordinates in the second direction. Before the steps of obtaining the global width matrix according to the width matrix and obtaining the global height matrix according to the height matrix, the method comprises: calculating one-dimensional linear distances in the first direction and the second direction respectively by staggered indexing; obtaining the width matrix and the height matrix in the first direction according to the one-dimensional linear distances in the first direction; and obtaining the width matrix and the height matrix in the second direction according to the one-dimensional linear distances in the second direction. Specifically, in an embodiment, the one-dimensional linear distances in the x direction and the y direction are calculated in a global manner by staggered indexing in the form of a matrix, and two matrices are obtained in the x direction and the y direction respectively, representing the coordinates of the width (wid) and the height (hei). The Euclidean distance matrix is calculated by four matrices, and the global width matrix (wids) and the global height matrix (heis) are obtained respectively. The distance matrix is a matrix (i.e. a two-dimensional array) containing distances between two points in a group.
[0064] S5: calibrating the checkerboard according to the pixel distance between the vertex coordinates of the checkerboard.
[0065] In the embodiment, the calibrating of the checkerboard according to the pixel distance between the vertex coordinates of the checkerboard comprises: counting a width value according to the global width matrix; counting a height value according to the global height matrix; calculating a pixel distance between vertexes of the checkerboard according to the width value and the height value; and calibrating the checkerboard according to the pixel distance and an actual measured distance. The calibrating of the checkerboard according to the pixel distance and the actual measured distance comprises: calculating a median of the pixel distance between the vertex coordinates; obtaining a pixel conversion parameter of the checkerboard according to the median of the pixel distance between the vertex coordinates and the actual measured distance; and calibrating the checkerboard according to the pixel conversion parameter.
[0066] The embodiment provides a camera chessboard calibration method accelerated by tensor parallel computing, wherein a tensor of vertex coordinates of the chessboard is obtained according to the vertex coordinates; a width matrix and a height matrix are obtained according to the tensor of the vertex coordinates; a global width matrix is obtained according to the width matrix; a global height matrix is obtained according to the height matrix; a pixel distance between the vertex coordinates of the chessboard is obtained according to the global width matrix and the global height matrix; and the chessboard is calibrated according to the pixel distance between the vertex coordinates of the chessboard. The application effectively reduces the time of chessboard pixel calibration, and improves the accuracy of calibration.
[0067] With reference to Figure 2 In one embodiment, the width matrix and the height matrix are obtained according to the tensor of the vertex coordinates, and the method comprises the following steps.
[0068] S21: splitting the vertex coordinates into coordinates in a first direction and coordinates in a second direction, wherein the first direction is the width, and the second direction is the height;
[0069] S22: obtaining a tensor of the coordinates in the first direction according to the coordinates in the first direction;
[0070] S23: obtaining a width matrix according to the tensor of the coordinates in the first direction;
[0071] S24: obtaining a tensor of the coordinates in the second direction according to the coordinates in the second direction;
[0072] S25: obtaining a height matrix according to the tensor of the coordinates in the second direction.
[0073] In the embodiment, the coordinates in the first direction represent the coordinates of the vertex in the width direction of the chessboard, and the coordinates in the second direction represent the coordinates of the vertex in the height direction of the chessboard. Specifically, in one embodiment, the input vertex coordinates of the chessboard are used to obtain a tensor of the vertex coordinates, wherein x direction represents the width direction, and y direction represents the height direction. According to the tensor of the vertex coordinates in the x direction and the y direction, two two-dimensional matrices, i.e., the width matrix and the height matrix, are obtained. Through the above method, the width matrix and the height matrix are obtained, which provides a basis for obtaining the global width matrix and the global height matrix.
[0074] With reference to Figure 3 In one embodiment, before the steps of obtaining the global width matrix according to the width matrix and obtaining the global height matrix according to the height matrix, the method comprises the following steps.
[0075] S31: calculating one-dimensional linear distances in the first direction and the second direction respectively by staggered indexing
[0076] S32: obtaining a width matrix and a height matrix in the first direction according to the one-dimensional linear distance in the first direction;
[0077] S33: obtaining a width matrix and a height matrix in the second direction according to the one-dimensional linear distance in the second direction.
[0078] In the embodiment, the one-dimensional linear distance is the straight line distance between the coordinates of each vertex of the chessboard, the first direction is the width direction of the chessboard, and the second direction is the height direction of the chessboard. The width matrix and the height matrix in the first direction are obtained according to the one-dimensional linear distance in the first direction, and the width matrix and the height matrix in the second direction are obtained according to the one-dimensional linear distance in the second direction.
[0079] Referring to Figure 4 In one embodiment, after the steps of obtaining a width matrix and a height matrix in the first direction according to the one-dimensional linear distance in the first direction; and obtaining a width matrix and a height matrix in the second direction according to the one-dimensional linear distance in the second direction, the method further comprises:
[0080] S34: calculating a Euclidean distance matrix in the first direction according to the width matrix and the height matrix in the first direction;
[0081] S35: calculating a Euclidean distance matrix in the second direction according to the width matrix and the height matrix in the second direction;
[0082] S36: obtaining a global width matrix according to the Euclidean distance matrix in the first direction;
[0083] S37: obtaining a global height matrix according to the Euclidean distance matrix in the second direction.
[0084] In the embodiment, the global height matrix in the second direction is obtained according to the width and height matrices in the first direction and the width and height matrices in the second direction, the Euclidean distance matrix between the two matrices in each direction is calculated, and the global width matrix in the first direction and the global height matrix in the second direction are obtained according to the Euclidean distance matrices in the first direction and the second direction. The Euclidean distance refers to the Euclidean distance or the Euclidean metric, which is the "ordinary" (i.e. straight line) distance between two points in Euclidean space. Using this distance, the Euclidean space becomes a metric space. The associated norm is called the Euclidean norm. When using a k-NN model, the Euclidean distance between each point in the test set and each point in the training set needs to be calculated, that is, the Euclidean distance between the two matrices needs to be calculated. There are usually three schemes when implementing the k-NN algorithm, which are using two layers of loops, using one layer of loops, and not using loops.
[0085] Referring to Figure 5In one embodiment, the calibration of the checkerboard according to the pixel distance between the vertex coordinates of the checkerboard includes:
[0086] S51: Calculate the width value according to the global width matrix; and calculate the height value according to the global height matrix
[0087] S52: Calculate the pixel distance between the vertexes of the checkerboard according to the width value and the height value.
[0088] S53: Calibrate the checkerboard according to the pixel distance and the actual measured distance.
[0089] In the embodiment, after the step of calculating the pixel distance between the vertexes of the checkerboard according to the width value and the height value, the method further includes: calibrating the distortion of the calibration of the checkerboard according to the pixel distance; and measuring. The calibration of the checkerboard according to the pixel distance and the actual measured distance includes: calculating the median of the pixel distance between the vertex coordinates of the checkerboard; obtaining the pixel conversion parameter of the checkerboard according to the median of the pixel distance between the vertex coordinates and the actual measured distance; and calibrating the checkerboard according to the pixel conversion parameter.
[0090] Referring to Figure 6 In one embodiment, the calibration of the checkerboard according to the pixel distance and the actual measured distance includes:
[0091] S54: Calculate the median of the pixel distance between the vertex coordinates of the checkerboard.
[0092] S55: Obtain the pixel conversion parameter of the checkerboard according to the median of the pixel distance between the vertex coordinates and the actual measured distance.
[0093] S56: Calibrate the checkerboard according to the pixel conversion parameter.
[0094] In this embodiment, after obtaining the global width matrix and height matrix, the width and height statistics and accurate errors can be easily obtained. The mean, variance, median and other statistical quantities are used for the next step of distortion calibration. The pixel distance is calculated by combining the median of the pixel distance with the real distance of the physical world coordinate system to obtain the pixel size calibration parameter. The pixel distance is similar to the dot pitch of CRT, which generally refers to the distance between two adjacent pixels of the display screen. The picture we see is formed by many points, and the fineness of the picture quality is determined by the dot pitch. The calculation method of the dot pitch is to divide the panel size by the resolution value. The visual area of a 14-inch LCD display is generally 285.7mmx214.3mm, and the resolution is 1024x768, so the dot pitch of this LCD is calculated as 285.7 / 1024 or 214.3 / 768=0.279mm. Similarly, for a 15-inch LCD display with a resolution of 1024x768, the pixel distance can be calculated by the above method, which is 0.297mm. The smaller the dot pitch, the finer the image.
[0095] Referring to Figure 7 The embodiment of the present application also provides a tensor parallel computing acceleration camera checkerboard calibration device, which comprises:
[0096] A tensor module 10 is configured to obtain a tensor of vertex coordinates of the checkerboard according to the vertex coordinates.
[0097] A matrix module 20 is configured to obtain a width matrix and a height matrix according to the tensor of the vertex coordinates.
[0098] A global matrix module 30 is configured to obtain a global width matrix according to the width matrix and a global height matrix according to the height matrix.
[0099] A pixel distance module 40 is configured to obtain a pixel distance between the vertex coordinates of the checkerboard according to the global width matrix and the global height matrix.
[0100] A calibration module 50 is configured to calibrate the checkerboard according to the pixel distance between the vertex coordinates of the checkerboard.
[0101] In one embodiment, the matrix module 20 further comprises:
[0102] The vertex coordinates are split into coordinates in a first direction and coordinates in a second direction, wherein the first direction is the width and the second direction is the height.
[0103] The tensor of the coordinates in the first direction is obtained according to the coordinates in the first direction.
[0104] a width matrix is obtained according to the tensor of the coordinates in the first direction;
[0105] a tensor of the coordinates in the second direction is obtained according to the coordinates in the second direction;
[0106] a height matrix is obtained according to the tensor of the coordinates in the second direction.
[0107] In one embodiment, the global matrix module 30 further comprises:
[0108] a one-dimensional linear distance in the first direction and a one-dimensional linear distance in the second direction are respectively calculated by staggered indexing;
[0109] a width matrix and a height matrix in the first direction are obtained according to the one-dimensional linear distance in the first direction;
[0110] a width matrix and a height matrix in the second direction are obtained according to the one-dimensional linear distance in the second direction.
[0111] In one embodiment, the global matrix module 30 further comprises:
[0112] a Euclidean distance matrix in the first direction is calculated according to the width matrix and the height matrix in the first direction;
[0113] a Euclidean distance matrix in the second direction is calculated according to the width matrix and the height matrix in the second direction;
[0114] a global width matrix is obtained according to the Euclidean distance matrix in the first direction;
[0115] a global height matrix is obtained according to the Euclidean distance matrix in the second direction.
[0116] In one embodiment, the calibration module 50 further comprises:
[0117] a width value is counted according to the global width matrix;
[0118] a height value is counted according to the global height matrix;
[0119] a pixel distance between the vertices of the checkerboard is calculated according to the width value and the height value;
[0120] the checkerboard is calibrated according to the pixel distance and the actual measured distance.
[0121] In one embodiment, the calibration module 50 further comprises:
[0122] a distortion measurement of the calibration of the checkerboard is made according to the pixel distance.
[0123] In one embodiment, the calibration module 50 further comprises:
[0124] calculating a median of pixel distances between the vertex coordinates of the checkerboard;
[0125] acquiring a pixel conversion parameter of the checkerboard according to the median of pixel distances between the vertex coordinates and the actual measured distance;
[0126] calibrating the checkerboard according to the pixel conversion parameter.
[0127] With reference Figure 8 , the embodiment of the present application further provides a computer device, an internal structure of the computer device can be as shown in Figure 8 . The computer device comprises a processor, a memory, a network interface and a database connected through a system bus. The processor of the computer device is used to provide computing and control capabilities. The memory of the computer device comprises a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system, a computer program and a database. The internal memory provides an environment for the operating system and the computer program in the non-volatile storage medium. The database of the computer device is used to store related data of the tensor parallel computing accelerated camera checkerboard calibration method. The network interface of the computer device is used to communicate with an external terminal through a network connection. Further, the computer device can be further provided with an input device and a display screen. The computer program is executed by the processor to implement the tensor parallel computing accelerated camera checkerboard calibration method, comprising the following steps: acquiring a tensor of vertex coordinates according to vertex coordinates of the checkerboard; acquiring a width matrix and a height matrix according to the tensor of vertex coordinates; acquiring a global width matrix according to the width matrix; acquiring a global height matrix according to the height matrix; acquiring pixel distances between the vertex coordinates of the checkerboard according to the global width matrix and the global height matrix; and calibrating the checkerboard according to the pixel distances between the vertex coordinates of the checkerboard. Those skilled in the art can understand that Figure 8 the structure shown in the figure is only a block diagram of part of the structure related to the scheme of the present application, and does not constitute a limitation on the computer device to which the scheme of the present application is applied.
[0128] An embodiment of the present application further provides a computer readable storage medium, which stores a computer program. The computer program is executed by a processor to implement a tensor parallel computing accelerated camera checkerboard calibration method, and includes the following steps: obtaining a tensor of vertex coordinates of the checkerboard according to the vertex coordinates; obtaining a width matrix and a height matrix according to the tensor of the vertex coordinates; obtaining a global width matrix according to the width matrix; obtaining a global height matrix according to the height matrix; obtaining a pixel distance between the vertex coordinates of the checkerboard according to the global width matrix and the global height matrix; and calibrating the checkerboard according to the pixel distance between the vertex coordinates of the checkerboard. It can be understood that the computer readable storage medium in the embodiment can be a volatile readable storage medium or a non-volatile readable storage medium.
[0129] It can be understood by those skilled in the art that all or part of the processes in the above-mentioned embodiments can be completed by a computer program instructing related hardware. The computer program can be stored in a non-volatile computer readable storage medium, and when executed, can include the processes of the above-mentioned embodiments. Any reference to memory, storage, databases, or other media in this application and in embodiments refers to both non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration but not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (SSRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM), etc.
[0130] It should be noted that in this document, the terms "comprising", "including", or any other variant thereof are intended to cover non-exclusive inclusions, so that processes, devices, articles, or methods including a series of elements not only include those elements, but also include other elements not explicitly listed, or include elements inherent to such processes, devices, articles, or methods. Without more limitations, the element defined by the statement "including a" does not exclude the presence of another identical element in the process, device, article, or method including the element.
[0131] The above merely describes preferred embodiments of the present application, and is not intended to limit the patent scope of the present application, and any equivalent structure or equivalent process conversion made by using the content of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.
Claims
1. A method for calibrating a camera checkerboard, characterized in that, The method comprises: According to the vertex coordinates of the checkerboard, the tensor of the vertex coordinates is obtained; According to the tensor of the vertex coordinates, a width matrix and a height matrix are obtained; According to the width matrix, a global width matrix is obtained; according to the height matrix, a global height matrix is obtained; According to the global width matrix and the global height matrix, the pixel distance between the vertex coordinates of the checkerboard is obtained; According to the pixel distance between the vertex coordinates of the checkerboard, the checkerboard is calibrated; According to the tensor of the vertex coordinates, a width matrix and a height matrix are obtained, comprising: The vertex coordinates are split into coordinates in a first direction and coordinates in a second direction, wherein the first direction is the width and the second direction is the height; According to the coordinates in the first direction, the tensor of the coordinates in the first direction is obtained; According to the tensor of the coordinates in the first direction, a width matrix is obtained; According to the coordinates in the second direction, the tensor of the coordinates in the second direction is obtained; According to the tensor of the coordinates in the second direction, a height matrix is obtained; Before the steps of obtaining a global width matrix according to the width matrix and obtaining a global height matrix according to the height matrix, comprising: Calculate the one-dimensional linear distance of the first direction and the second direction respectively by staggered indexing; According to the one-dimensional linear distance in the first direction, a width matrix in the first direction is obtained; According to the one-dimensional linear distance in the second direction, a height matrix in the second direction is obtained; After the steps of obtaining a width matrix in the first direction according to the one-dimensional linear distance in the first direction and obtaining a height matrix in the second direction according to the one-dimensional linear distance in the second direction, comprising: According to the width matrix in the first direction, the Euclidean distance matrix in the first direction is calculated; According to the height matrix in the second direction, the Euclidean distance matrix in the second direction is calculated; According to the Euclidean distance matrix in the first direction, a global width matrix is obtained; According to the Euclidean distance matrix in the second direction, a global height matrix is obtained.
2. The tensor-parallel computing accelerated camera chessboard calibration method according to claim 1, wherein, According to the pixel distance between the vertex coordinates of the checkerboard, the checkerboard is calibrated, comprising: According to the global width matrix, the width value is counted; According to the global height matrix, the height value is counted; According to the width value and the height value, the pixel distance between the vertex coordinates of the checkerboard is calculated; According to the pixel distance and the actual measured distance, the checkerboard is calibrated.
3. The tensor-parallel computing accelerated camera chessboard calibration method according to claim 2, wherein, After the step of calculating the pixel distance between the vertex coordinates of the checkerboard according to the width value and the height value, comprising: According to the pixel distance, the distortion measurement of the checkerboard calibration is measured.
4. The tensor-parallel computing accelerated camera chessboard calibration method according to claim 2, wherein, According to the pixel distance and the actual measured distance, the checkerboard is calibrated, comprising: Calculate the median of the pixel distance between the vertex coordinates of the checkerboard; According to the median of the pixel distance between the vertex coordinates and the actual measured distance, the pixel conversion parameter of the checkerboard is obtained; According to the pixel conversion parameter, the checkerboard is calibrated.
5. A tensor parallel computing accelerated camera chessboard calibration device for implementing the tensor parallel computing accelerated camera chessboard calibration method according to any one of claims 1-4, characterized in that, The device comprises: A tensor module is configured to obtain the tensor of the vertex coordinates according to the vertex coordinates of the checkerboard; a matrix module configured to obtain a width matrix and a height matrix according to the tensor of the vertex coordinates; a global matrix module configured to obtain a global width matrix according to the width matrix and a global height matrix according to the height matrix; a pixel distance module configured to obtain a pixel distance between vertex coordinates of the checkerboard according to the global width matrix and the global height matrix; a calibration module configured to calibrate the checkerboard according to the pixel distance between vertex coordinates of the checkerboard. 6.A computer device, comprising a memory and a processor, wherein the memory stores a computer program, and the computer device is configured to perform the method according to any one of claims 1-5. The processor executes the computer program to implement the steps of the tensor parallel calculation accelerated camera checkerboard calibration method in any one of claims 1 to 4.
7. A computer-readable storage medium having stored thereon a computer program, characterized in that The computer program is executed by the processor to implement the steps of the tensor parallel calculation accelerated camera checkerboard calibration method in any one of claims 1 to 4.
Citation Information
Patent Citations
Method and system for calibrating camera based on 2D planar template
CN107633536A
Method and device for detecting module FOV by using checkerboard test table and readable storage medium
CN110035280A