WO2022033145A1 - 角点编码方法、标定方法、装置、电子设备和存储介质 - Google Patents

角点编码方法、标定方法、装置、电子设备和存储介质 Download PDF

Info

Publication number
WO2022033145A1
WO2022033145A1 PCT/CN2021/098857 CN2021098857W WO2022033145A1 WO 2022033145 A1 WO2022033145 A1 WO 2022033145A1 CN 2021098857 W CN2021098857 W CN 2021098857W WO 2022033145 A1 WO2022033145 A1 WO 2022033145A1
Authority
WO
WIPO (PCT)
Prior art keywords
target
checkerboard
type
grid
grids
Prior art date
Application number
PCT/CN2021/098857
Other languages
English (en)
French (fr)
Inventor
余金清
Original Assignee
成都极米科技股份有限公司
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 成都极米科技股份有限公司 filed Critical 成都极米科技股份有限公司
Publication of WO2022033145A1 publication Critical patent/WO2022033145A1/zh

Links

Images

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
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/30Subject of image; Context of image processing
    • G06T2207/30204Marker
    • G06T2207/30208Marker matrix

Definitions

  • the present application relates to the technical field of optical element calibration, and in particular, to a corner point coding method, a calibration method, an apparatus, an electronic device and a storage medium.
  • a calibration object with a known size is generally used, and a certain algorithm is used to obtain the internal and external parameters of the camera model by establishing the correspondence between points with known coordinates on the calibration object and their image points.
  • the scale can be a checkerboard.
  • the distribution of the grids on the chessboard is periodic, and each chessboard corner point cannot be distinguished from each other.
  • the common solution is to preset the size of the checkerboard in advance. When shooting, the checkerboard needs to be completely captured, and the collected corner points are filtered through the preset checkerboard size, so as to calculate the position and order relationship of all the checkerboards.
  • the purpose of the present application is to provide a corner point coding method, a calibration method, an apparatus, an electronic device and a storage medium, which can solve the problem that the corner points of a checkerboard cannot be distinguished.
  • an embodiment of the present invention provides a corner encoding method, including:
  • a target checkerboard is determined according to the target usage scenario, wherein the target checkerboard includes a first-type grid and a second-type grid that are alternately arranged, wherein the intersection of every four adjacent grids is a corner point;
  • the code of each corner point is determined according to the target quantity and the identifier in the first type of grid.
  • the determining the target checkerboard according to the target usage scenario includes:
  • the target checkerboard is determined according to the target size and the grid size.
  • the target size of the checkerboard to be used can be determined based on the field of view of the camera, and the required target checkerboard can be configured, so that the target checkerboard can satisfy the target camera. Calibration requirements.
  • determining the target checkerboard according to the target size and the grid size includes:
  • the grid distribution in the target checkerboard is determined according to the target size and the checkerboard size, so as to obtain the target checkerboard.
  • the horizontal size and the vertical size of the target checkerboard can be obtained respectively, so that the determined checkerboard can be adapted to the required size of the target checkerboard.
  • the coding of each corner point is determined according to the target quantity and the identifier in the first type of grid, including:
  • For the target corners in the target chessboard select the first type of grids of the target number according to the positions of the target corners, and obtain a target grid group, and the target corners are the chessboard any corner point;
  • the code of the target corner is determined according to the identifier in the first type of grid in the target grid group.
  • the required number of the first type of grids is determined based on the length of the target encoding, so that the length of the combined corner encoding can reach the required length.
  • determining the code of the target corner point according to the identifier in the first type of grid in the target grid group includes:
  • sorting the target value group according to a set arrangement rule to obtain the code of the target corner including:
  • the coding of the determined corners can have coding rules, so that the coding of the determined corners can be more suitable for each corner The requirement of encoding uniqueness of points.
  • the filling of the identification for the first type of grid of the target checkerboard includes:
  • a pseudo-random matrix is constructed according to the target number and the target base, and the length of the row vector of the pseudo-random matrix is not less than the number of the first type of grids in each row of the target checkerboard.
  • the length of the column vector of the matrix is not less than the number of the first type of grids in each column grid of the target checkerboard;
  • the first type of grid in the target checkerboard is filled with identification.
  • a pseudo-random matrix is constructed, so that the sequence obtained based on the local matrix of the pseudo-random matrix can be unique, so that each element in the target checkerboard can be uniquely identified based on the pseudo-random matrix. corner.
  • an embodiment of the present invention provides a calibration method, including:
  • the camera to be calibrated is calibrated by using a target checkerboard, where the target checkerboard is a checkerboard obtained by using the corner encoding method described in any one of the foregoing embodiments.
  • an embodiment of the present invention provides a corner encoding device, including:
  • the first determination module is used to determine the target checkerboard according to the target usage scenario, wherein the target checkerboard includes the first type of grid and the second type of grid arranged alternately, wherein the intersection of every four grids is a corner point ;
  • the second determining module is used to determine the target quantity and target base of the required coding sequence according to the quantity of the corner points;
  • the filling module is used to fill the first type of grid of the target checkerboard with identifications, wherein the number of categories of identifications in the first type of grid of the target checkerboard is equal to the target base, and each type of identification represents a number. ;
  • Filling identification for the first type lattice of the target checkerboard including: constructing a pseudo-random matrix according to the target number and the target base, and the length of the row vector of the pseudo-random matrix is not less than the target checkerboard The number of the first type of grids in each row of grids, the length of the column vector of the pseudo-random matrix is not less than the number of first-type grids in each column of grids in the target checkerboard; from the pseudo-random matrix Selecting a partial matrix; according to the partial matrix, filling the first type of grids in the target checkerboard with an identifier;
  • the third determining module is configured to determine the code of each corner point according to the target quantity and the identifier in the first type of grid.
  • an embodiment of the present invention provides a calibration device, including:
  • the calibration module is used for calibrating the camera to be calibrated by using a target checkerboard, where the target checkerboard is a checkerboard obtained by using the corner coding method described in any one of the foregoing embodiments.
  • an embodiment of the present invention provides an electronic device, including: a processor and a memory, where the memory stores machine-readable instructions executable by the processor, and when the electronic device runs, the machine-readable instructions The steps of the method according to any one of the preceding embodiments are performed when executed by the processor.
  • an embodiment of the present invention provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program is executed by a processor to execute the method described in any one of the foregoing embodiments. step.
  • each grid in the checkerboard can be differentiated, and further, the corners of the checkerboard are determined according to the grids with differences, so that the grids can be distinguished.
  • FIG. 1 is a schematic block diagram of an electronic device provided by an embodiment of the present application.
  • FIG. 2 is a flowchart of a corner encoding method provided by an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a checkerboard provided by the corner point coding method provided by the embodiment of the present application.
  • FIG. 4 is a schematic diagram of functional modules of a corner encoding apparatus provided by an embodiment of the present application.
  • the processing methods of the checkerboard mainly include: 1), the checkerboard is detected directly through image recognition, but since the surrounding grid layout of the checkerboard is the same, it is impossible to distinguish the corner points of each checkerboard; 2), some features Point detection methods such as SIFT (Scale-invariant feature transform, scale-invariant feature transform) algorithm, SURF (Speeded Up Robust Features, accelerated robust features) algorithm, ORB (Oriented Fast and Rotated Brief, feature extraction algorithm), etc., through specific The algorithm finds feature points, and calculates descriptors for each feature point to distinguish different feature points.
  • SIFT Scale-invariant feature transform, scale-invariant feature transform
  • SURF Speeded Up Robust Features, accelerated robust features
  • ORB Oriented Fast and Rotated Brief, feature extraction algorithm
  • the embodiments of the present application provide a corner encoding method, a calibration method, a corner encoding device, a calibration device, an electronic device, and a computer-readable storage medium, which can realize the encoding of the corners of a checkerboard by using a simple method. identification, and the amount of calculation is small, and it can better distinguish each corner point on the checkerboard.
  • the electronic device 100 may include a memory 111 , a memory controller 112 , and a processor 113 .
  • Those of ordinary skill in the art can understand that the structure shown in FIG. 1 is only for illustration, and does not limit the structure of the electronic device 100 .
  • the electronic device 100 may also include more or less components than those shown in FIG. 1 , or have a different configuration than that shown in FIG. 1 .
  • the above-mentioned elements of the memory 111 , the storage controller 112 , and the processor 113 are directly or indirectly electrically connected to each other to realize data transmission or interaction.
  • these elements may be electrically connected to each other through one or more communication buses or signal lines.
  • the above-mentioned processor 113 is used to execute executable modules stored in the memory.
  • the memory 111 may be, but not limited to, random access memory (Random Access Memory, referred to as RAM), read only memory (Read Only Memory, referred to as ROM), programmable read only memory (Programmable Read-Only Memory, referred to as PROM) ), Erasable Programmable Read-Only Memory (EPROM for short), Electrical Erasable Programmable Read-Only Memory (EEPROM for short), etc.
  • RAM Random Access Memory
  • ROM Read Only Memory
  • PROM programmable read only memory
  • EPROM Erasable Programmable Read-Only Memory
  • EEPROM Electrical Erasable Programmable Read-Only Memory
  • the above-mentioned processor 113 may be an integrated circuit chip with signal processing capability.
  • the above-mentioned processor 113 may be a general-purpose processor, including a central processing unit (Central Processing Unit, referred to as CPU), a network processor (Network Processor, referred to as NP), etc.; may also be a digital signal processor (digital Signal processor, referred to as DSP) ), Application Specific Integrated Circuit (ASIC), Field Programmable Gate Array (FPGA) or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components.
  • DSP digital Signal processor
  • ASIC Application Specific Integrated Circuit
  • FPGA Field Programmable Gate Array
  • a general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
  • the electronic device 100 in this embodiment may be used to execute each step in each method provided in this embodiment of the present application.
  • the implementation process of the corner point coding method will be described in detail below through several embodiments.
  • FIG. 2 is a flowchart of a corner encoding method provided by an embodiment of the present application. The specific flow shown in FIG. 2 will be described in detail below.
  • Step 201 Determine the target checkerboard according to the target usage scene.
  • the target checkerboard includes first-type grids and second-type grids alternately arranged, wherein the intersection of every four adjacent grids is a corner point.
  • the target size of the full coverage of the target camera is calculated and obtained, according to the target size and the grid size to determine the target checkerboard.
  • the above-mentioned full-coverage picture represents a picture obtained by the target camera in the current posture and by collecting the above-mentioned picture of the use distance.
  • the size of the area occupied by the captured image in the real space is the target size.
  • the target size is the size of the target checkerboard.
  • the target camera has a horizontal field of view (HFOV) of 40°, a vertical field of view (VFOV) of 30°, and a use distance of 0.5m.
  • HFOV horizontal field of view
  • VFOV vertical field of view
  • the target size of the full coverage picture of the target camera may include the size in the horizontal direction and the size in the vertical direction. can be expressed as:
  • the target size of the full coverage picture may be 0.36*0.26m 2 .
  • step 201 may include the following steps.
  • Step 2011 Determine the horizontal size and the vertical size of the target checkerboard according to the target size.
  • the horizontal size of the target checkerboard is 0.36m and the vertical size is 0.26m.
  • Step 2012 Determine the grid size of the target checkerboard according to the horizontal size and the vertical size.
  • the determined side lengths of the grids of the target checkerboard may be a submultiple of the horizontal dimension and the vertical dimension at the same time.
  • the side lengths of the grids of the target chessboard can be 1cm, 2cm, 0.5cm and the like.
  • the number of grids in the target checkerboard may be 18*13.
  • the selection of the size of the cells of the target checkerboard may vary depending on the exactness required for camera calibration. For example, the higher the accuracy required for camera calibration, the smaller the side length of the grid of the target checkerboard; the lower the accuracy required for camera calibration, the larger the side length of the grid of the target checkerboard.
  • Step 2013 Determine the grid distribution in the target checkerboard according to the target size and the grid size to obtain the target checkerboard.
  • the first type of grid and the second type of grid are alternately arranged on the target checkerboard to form the target checkerboard.
  • the above-mentioned first type of grids may be black grids
  • the above-mentioned second type of grids may be white grids.
  • Step 202 Determine the target quantity and target base of the required coding sequence according to the quantity of the corner points.
  • the number of corner points may be an array of m*n, and the checkerboard array corresponding to the corner points may be (m+1)*(n+1). Then the number of unique codes required in the checkerboard is the number of the first-type lattices in the checkerboard (m+1)*(n+1)/2.
  • the determined target number and the maximum value formed by the target base are not less than the number of corner points.
  • the number of the above-mentioned corner points is m*n.
  • the number of targets can be denoted as i, and the target base can be denoted as j.
  • the number of targets and the maximum value ji formed by the target base is greater than the number of corners m*n.
  • the number of corner points of the target checkerboard may be 17*12.
  • the target base may be 2 and the target number may be 12. In another example, the target base may be 8 and the target number may be 4.
  • Step 203 Fill in the flags for the first type of grids of the target checkerboard.
  • the number of categories of identifiers in the first type of grid of the target checkerboard is equal to the target base, and each type of identifier represents a number.
  • the type of identification is two.
  • the type of identification is eight.
  • the identifiers filled into the first type of grids of the target checkerboard may be geometric figures, such as triangles, circles, trapezoids, and the like.
  • the identifiers filled into the first type of grids of the target checkerboard may also be numerical values, for example, numerical values such as 1, 2, 3, and 4.
  • the identifiers filled into the first-type grids of the target checkerboard may also be symbols, for example, symbols such as @, #, &, and ⁇ .
  • the identifiers filled into the first-type grids of the target checkerboard may also be other forms of identifiers.
  • each non-zero value corresponds to a different flag
  • a value of zero corresponds to an empty flag.
  • a pseudo-random matrix may be constructed based on the above-mentioned target quantity and target basis.
  • the length of the row vector of the pseudo-random matrix is not less than the number of the first type of grids in each row of the target checkerboard, and the length of the column vector of the pseudo-random matrix is not less than the first type of grids in each column of the target checkerboard. the number of grids.
  • the number of values in the pseudo-random matrix constructed above is not less than 117, and the length of the row vector of the pseudo-random matrix is not less than the number of first-type grids in each row of the target checkerboard, and the pseudo-random matrix The length of the column vector is not less than the number of first-class grids in each column grid of the target checkerboard.
  • the target base may be 2, and when the target number may be 12, the corresponding pseudo-random matrix may be a 65*63 matrix.
  • the values in the pseudorandom matrix are binary values.
  • the corresponding pseudo-random matrix may be a 33*31 matrix.
  • the values in the pseudorandom matrix are binary values.
  • the values in the pseudo-random matrix may be different as the target base is selected differently.
  • the target base may be 8
  • the value in the pseudo-random matrix may be an octal value.
  • the target base may be 16
  • the value in the pseudo-random matrix may be a hexadecimal value.
  • a partial matrix is selected from the above-mentioned pseudo-random matrix, and the first type of grid in the target checkerboard grid is filled with identifiers according to the partial matrix.
  • the number of numerical values of the row vectors of the partial matrix is not less than the number of grids in each row of the grid array formed by the grids of the first type of the target checkerboard.
  • the number of values of the column vectors of the partial matrix is not less than the number of grids in each column of the grid array formed by the grids of the first type of the target checkerboard.
  • selecting a partial matrix from the above-mentioned pseudorandom matrix, and filling the first type of grid in the target checkerboard including: when the first type of grid in the target checkerboard corresponds to the value in the partial matrix of the pseudorandom matrix When it is one, fill in the first type of grid with a corresponding identifier; when the first type of grid in the target checkerboard corresponds to the value in the partial matrix of the pseudo-random matrix is zero, then in the first type of grid Fill in the ID corresponding to the value zero.
  • the figure shows the target checkerboard in an example.
  • the first type of grid in the figure is a black grid
  • the second type of grid is a white grid.
  • the target checkerboard includes 18*13 grids.
  • the filled “ ⁇ ” geometric pattern in the illustration represents 1, and the unfilled geometric pattern represents 0.
  • the local matrix is:
  • the target checkerboard shown in FIG. 3 can be obtained.
  • Step 204 Determine the code of each corner point according to the target quantity and the identifier in the first type of grid.
  • the coding of each corner point corresponds to the coordinates of the corner point in the target checkerboard.
  • the length of the code of each corner point is equal to the above-mentioned target number.
  • the target checkerboard obtained in this embodiment can be used to calibrate the camera.
  • step 204 may include the following steps.
  • Step 2041 For the target corner points in the target checkerboard, select the first type of grids of the target number according to the positions of the target corner points to obtain a target grid group.
  • the above target corner point is any corner point in the checkerboard.
  • the target lattice group is selected from the position of the target corner point.
  • the target lattice group is the first type of lattice that is closest to the target corner point.
  • Step 2042 Determine the code of the target corner point according to the target number and the identifier in the first type of grid in the target grid group.
  • a target value group is determined according to the identifier in the first type of grid in the target grid group; the target value group is sorted according to a set arrangement rule to obtain the target corner point 's encoding.
  • sorting the target value group according to a set arrangement rule to obtain the code of the target corner point includes: according to the grid distance corresponding to each value in the target value group The target value groups are sorted in order from near to far, so as to obtain the codes of the target corners.
  • sorting the target value group according to a set arrangement rule to obtain the code of the target corner point including: according to the grid corresponding to the target value group in the target checkerboard.
  • An array formed by a class of lattices forms a numerical matrix, and the row vectors of the numerical matrix are connected at one time to form the code of the target corner.
  • sorting the target value group according to a set arrangement rule to obtain the code of the target corner point including: according to the grid corresponding to the target value group in the target checkerboard.
  • the above pseudo-random matrix is a finite field.
  • the code of the target corner is unique in the target checkerboard. That is, the encoding of any two target corners in the target checkerboard is not the same.
  • the method in this embodiment may further include: collecting image data of an entity's target checkerboard; For the identifiers in the grids, the unique codes corresponding to each corner point in the collected image data are determined according to the identifiers in the first-type grid around each corner point.
  • the coordinates in the image coordinate system of each corner point may be determined according to the unique code of each corner point.
  • each grid in the checkerboard can be differentiated, and further, the corners of the checkerboard are determined according to the grids with the difference , so that the first-type grids around each corner point are not exactly the same, so that each corner point can be uniquely identified based on the surrounding first-type grids, so that each chessboard corner point can be distinguished, which can improve the use of The convenience of camera calibration with this target checkerboard.
  • the embodiment of the present application also provides a corner encoding device corresponding to the corner encoding method.
  • a corner encoding device corresponding to the corner encoding method.
  • FIG. 4 is a schematic diagram of functional modules of the corner encoding device provided by the embodiment of the present application.
  • Each module in the corner point encoding apparatus in this embodiment is used to execute each step in the foregoing method embodiment.
  • the corner encoding device includes: a first determination module 301, a second determination module 302, a filling module 303 and a third determination module 304; wherein,
  • the first determination module 301 is configured to determine the target checkerboard according to the target usage scenario, wherein the target checkerboard includes the first type of grid and the second type of grid arranged alternately, wherein the intersection of every four grids is a corner point;
  • the second determining module 302 is configured to determine the target quantity and target base of the required coding sequence according to the quantity of the corner points;
  • the filling module 303 is used to fill the first type of grids of the target checkerboard with identifiers, wherein the number of types of identifiers in the first type of grids of the target checkerboard is equal to the target base, and each type of identifier represents a number;
  • the third determining module 304 is configured to determine the code of each corner point according to the target quantity and the identifier in the first type of grid.
  • the first determining module 301 is used for:
  • the target checkerboard is determined according to the target size and the grid size.
  • the first determining module 301 is used for:
  • the grid distribution in the target checkerboard is determined according to the target size and the checkerboard size, so as to obtain the target checkerboard.
  • the third determining module 304 is configured to:
  • For the target corners in the target chessboard select the first type of grids of the target number according to the positions of the target corners, and obtain a target grid group, and the target corners are the chessboard any corner point;
  • the code of the target corner is determined according to the identifier in the first type of grid in the target grid group.
  • the third determining module 304 includes: an array determining unit and an array sorting unit; wherein,
  • an array determination unit for determining a target numerical value group according to the identifier in the first type of grid in the target grid group
  • the array sorting unit is used to sort the target value group according to the set arrangement rule, so as to obtain the code of the target corner point.
  • the array sorting unit is used to:
  • the filling module 303 is used for:
  • a pseudo-random matrix is constructed according to the target number and the target base, and the length of the row vector of the pseudo-random matrix is not less than the number of the first type of grids in each row of the target checkerboard.
  • the length of the column vector of the matrix is not less than the number of the first type of grids in each column grid of the target checkerboard;
  • the first type of grid in the target checkerboard is filled with identification.
  • the calibration methods provided in the embodiments of the present application may include: using a target checkerboard to calibrate the camera to be calibrated.
  • the above-mentioned target checkerboard is a checkerboard obtained by using the corner coding method provided in the second embodiment.
  • the embodiment of the present application also provides a calibration device corresponding to the calibration method.
  • a calibration device corresponding to the calibration method.
  • the calibration device includes: a calibration module for calibrating the camera to be calibrated by using the target checkerboard.
  • the above-mentioned target checkerboard is a checkerboard obtained by using the corner coding method provided in the second embodiment.
  • an embodiment of the present application further provides a computer-readable storage medium, where a computer program is stored on the computer-readable storage medium, and the computer program is executed by a processor to execute the corner encoding method and the method described in the foregoing method embodiment. /or steps of the calibration method.
  • the computer program products of the corner point coding method and the calibration method provided by the embodiments of the present application include a computer-readable storage medium storing program codes, and the instructions included in the program codes can be used to execute the corner point coding methods described in the above method embodiments.
  • the steps of the point coding method and the calibration method reference may be made to the foregoing method embodiments, and details are not described herein again.
  • each block in the flowchart or block diagrams may represent a module, segment, or portion of code that contains one or more functions for implementing the specified logical function(s) executable instructions. It should also be noted that, in some alternative implementations, the functions noted in the block may occur out of the order noted in the figures.
  • each block of the block diagrams and/or flowchart illustrations, and combinations of blocks in the block diagrams and/or flowchart illustrations can be implemented in dedicated hardware-based systems that perform the specified functions or actions , or can be implemented in a combination of dedicated hardware and computer instructions.
  • each functional module in each embodiment of the present application may be integrated together to form an independent part, or each module may exist independently, or two or more modules may be integrated to form an independent part.
  • the functions are implemented in the form of software function modules and sold or used as independent products, they can be stored in a computer-readable storage medium.
  • the technical solution of the present application can be embodied in the form of a software product in essence, or the part that contributes to the prior art or the part of the technical solution.
  • the computer software product is stored in a storage medium, including Several instructions are used to cause a computer device (which may be a personal computer, a server, or a network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present application.
  • the aforementioned storage medium includes: U disk, mobile hard disk, Read-Only Memory (ROM, Read-Only Memory), Random Access Memory (RAM, Random Access Memory), magnetic disk or optical disk and other media that can store program codes .
  • relational terms such as first and second are only used to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any relationship between these entities or operations. any such actual relationship or sequence exists.
  • the terms "comprising”, “comprising” or any other variation thereof are intended to encompass a non-exclusive inclusion such that a process, method, article or device that includes a list of elements includes not only those elements, but also includes not explicitly listed or other elements inherent to such a process, method, article or apparatus.
  • an element defined by the phrase “comprises” does not preclude the presence of additional identical elements in a process, method, article, or device that includes the element.

Landscapes

  • Engineering & Computer Science (AREA)
  • Computer Vision & Pattern Recognition (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Theoretical Computer Science (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)

Abstract

本申请提供了一种角点编码方法、标定方法、装置、电子设备和存储介质,其中,该方法包括:根据目标使用场景确定出目标棋盘格,其中,目标棋盘格包括交替布置的第一类格子和第二类格子,其中,每相邻四个格子的交点为一个角点;根据角点的数量确定出所需编码序列的目标数量以及目标基;为目标棋盘格的第一类格子随机填充标识,其中,目标棋盘格的第一类格子中的标识的类别数量等于目标基,每一类标识表示一个数;根据目标数量和第一类格子中的标识确定出每一个角点的编码。

Description

角点编码方法、标定方法、装置、电子设备和存储介质 技术领域
本申请涉及光学元件标定技术领域,具体而言,涉及一种角点编码方法、标定方法、装置、电子设备和存储介质。
背景技术
在相机标定领域中,一般是使用已经使用尺寸已知的标定物,通过建立标定物上坐标已知的点与其图像点之间的对应,利用一定的算法获得相机模型的内外参数。
例如,标定物可以是棋盘格。但是棋盘格上的格子的分布具有周期性,每个棋盘角点无法互相区分。常用解决是提前预设好棋盘格的尺寸,拍摄时需要完全拍摄到棋盘格,通过预设的棋盘格尺寸对采集到的角点进行筛选,从而计算到所有棋盘格的位置与顺序关系。但是就棋盘格的各个格子还是存在相似,局部的棋盘角点还是无法互相区分。
发明内容
本申请的目的在于提供一种角点编码方法、标定方法、装置、电子设备和存储介质,能够解决棋盘格的角点无法区分的问题。
第一方面,本发明实施例提供一种角点编码方法,包括:
根据目标使用场景确定出目标棋盘格,其中,所述目标棋盘格包括交替布置的第一类格子和第二类格子,其中,每相邻四个格子的交点为一个角点;
根据所述角点的数量确定出所需编码序列的目标数量以及目标基;
为所述目标棋盘格的第一类格子填充标识,其中,所述目标棋盘格的第一类格子中的标识的类别数量等于所述目标基,每一类标识表示一个数;
根据所述目标数量和所述第一类格子中的标识确定出每一个角点的编码。
在可选的实施方式中,所述根据目标使用场景确定出目标棋盘格,包括:
根据目标相机的视场角以及所述目标相机的使用距离,计算得到所述目标相机全覆盖画面的目标尺寸;
根据所述目标尺寸以及格子尺寸确定出目标棋盘格。
通过本申请实施例的角点编码方法,能够基于相机的视场角确定出需要使用的棋盘格的目标尺寸,进而可以配置出需要的目标棋盘格,从而可以使该目标棋盘格能够满足目标相机标定需求。
在可选的实施方式中,所述根据所述目标尺寸以及格子尺寸确定出目标棋盘格,包括:
根据所述目标尺寸确定出目标棋盘格的水平尺寸和竖直尺寸;
根据所述水平尺寸和所述竖直尺寸确定出所述目标棋盘格的格子尺寸;
根据所述目标尺寸以及格子尺寸确定出所述目标棋盘格中的格子分布,以得到所述目标棋盘格。
通过本申请实施例的角点编码方法,通过分别获得目标棋盘格的水平尺寸和竖直尺寸,从而可以使确定出的格子能够适应所需目标棋盘格的尺寸。
在可选的实施方式中,根据所述目标数量和所述第一类格子中的标识确定出每一个角点的编码,包括:
针对所述目标棋盘格中的目标角点,根据所述目标角点的位置选出所述目标数量的所述第一类格子,得的目标格子组,所述目标角点为所述棋盘格中任意一个角点;
根据所述目标格子组中的第一类格子中的标识,确定出所述目标角点的编码。
通过本申请实施例的角点编码方法,通过基于目标编码的长度确定出需要的第一类格子数量,从而可以使组合成的角点的编码的长度能够达到需要的长度。
在可选的实施方式中,所述根据所述目标格子组中的第一类格子中的标识,确定出所述目标角点的编码,包括:
根据所述目标格子组中的第一类格子中的标识,确定目标数值组;
按照设定的排列规则对所述目标数值组进行排序,以得到所述目标角点的编码。
在可选的实施方式中,所述按照设定的排列规则对所述目标数值组进行排序,以得到所述目标角点的编码,包括:
按照所述目标数值组中的各个数值对应的格子距离所述目标角点从近到远的顺序,将所述目标数值组进行排序,以得到所述目标角点的编码。
通过本申请实施例的角点编码方法,通过将目标数值组进行排序,从而可以使确定出的角点的编码能够具有编码规律,从而可以使确定出的角点的编码可以更适应每一个角点的编码唯一性的需求。
在可选的实施方式中,所述为所述目标棋盘格的第一类格子填充标识,包括:
根据所述目标数量以及所述目标基构造一伪随机矩阵,所述伪随机矩阵的行向量的长度不小于所述目标棋盘格中每一行格子中的第一类格子的数量,所述伪随机矩阵的列向量的长度不小于所述目标棋盘格中每一列格子中的第一类格子的数量;
从所述伪随机矩阵中选择部分矩阵;
根据所述部分矩阵,对所述目标棋盘格中的第一类格子填充标识。
通过本申请实施例的角点编码方法,通过构建一伪随机矩阵,从而可以使基于该伪随机矩阵的局部矩阵得到的序列唯一,从而可以基于该伪随机矩阵能够唯一标识目标棋盘格中的各个角点。
第二方面,本发明实施例提供一种标定方法,包括:
使用目标棋盘格对待标定的相机进行标定,所述目标棋盘格为使用前述实施方式任意一项所述的角点编码方法编码得到的棋盘格。
第三方面,本发明实施例提供一种角点编码装置,包括:
第一确定模块,用于根据目标使用场景确定出目标棋盘格,其中,所述目标棋盘格包括交替布置的第一类格子和第二类格子,其中,每四个格子的交点为一个角点;
第二确定模块,用于根据所述角点的数量确定出所需编码序列的目标数量以及目标基;
填充模块,用于为所述目标棋盘格的第一类格子填充标识,其中,所述目标棋盘格的第一类格子中的标识的类别数量等于所述目标基,每一类标识表示一个数;为所述目标棋盘格的第一类格子填充标识,包括:根据所述目标数量以及所述目标基构造一伪随机矩阵,所述伪随机矩阵的行向量的长度不小于所述目标棋盘格中每一行格子中的第一类格子的数量,所述伪随机矩阵的列向量的长度不小于所述目标棋盘格中每一列格子中的第一类格子的数量;从所述伪随机矩阵中选择部分矩阵;根据所述部分矩阵,对所述目标棋盘格中的第一类格子填充标识;
第三确定模块,用于根据所述目标数量和所述第一类格子中的标识确定出每一个角点的编码。
第四方面,本发明实施例提供一种标定装置,包括:
标定模块,用于使用目标棋盘格对待标定的相机进行标定,所述目标棋盘格为使用前述实施方式任意一项所述的角点编码方法编码得到的棋盘格。
第五方面,本发明实施例提供一种电子设备,包括:处理器、存储器,所述存储器存储有所述处理器可执行的机器可读指令,当电子设备运行时,所述机器可读指令被所述处理器执行时执行如前述实施方式任意一项所述的方法的步骤。
第六方面,本发明实施例提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行如前述实施方式任意一项所述的方法的步骤。
本申请实施例的有益效果是:通过在第一类格子中填充区别标识,从而可以使棋盘格中的各个格子具有区别,进一步地,根据具有区别的格子确定出棋盘格的角点,从而可以使每个角点周围的第一类格子都不完全相同,从而可以基于周围的第一类格子唯一标识每一个角点,从而可以使每个棋盘角点存在区别,从而可以提高使用该目标棋盘格对相机进行标定的便利性。
附图说明
为了更清楚地说明本申请实施例的技术方案,下面将对实施例中所需要使用的附图作简单地介绍,应当理解,以下附图仅示出了本申请的某些实施例,因此不应被看作是对范围的限定,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他相关的附图。
图1为本申请实施例提供的电子设备的方框示意图。
图2为本申请实施例提供的角点编码方法的流程图。
图3为本申请实施例提供的角点编码方法提供的棋盘格的示意图。
图4为本申请实施例提供的角点编码装置的功能模块示意图。
具体实施方式
下面将结合本申请实施例中附图,对本申请实施例中的技术方案进行描述。
应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。同时,在本申请的描述中,术语“第一”、“第二”等仅用于区分描述,而不能理解为指示或暗示相对重要性。
目前,关于棋盘格的处理方式主要包括:1)、直接通过图像识别对棋盘格进行检测,但是由于棋盘格的周边格子布局是一样的,导致无法区分各个棋盘格角点;2)、一些特征点检测方法如SIFT(Scale-invariant feature transform,尺度不变特征变换)算法,SURF(Speeded Up Robust Features,加速稳健特征)算法,ORB(Oriented Fast and Rotated Brief,特征提取算法)等,通过特定的算法找到特征点,对每个特征点计算描述符用于区分不同的特征点,使用范围较广,对图像无要求,但是计算复杂且精度较低。
基于上述研究,本申请实施例提供一种角点编码方法、标定方法、角点编码装置、标定装置、电子设备和计算机可读存储介质,通过使用简单的方法能够实现对棋盘格的角点进行标识,且计算量较小,且能够更好地区别棋盘格上的各个角点。
实施例一
为便于对本实施例进行理解,首先对执行本申请实施例所公开的角点编码方法和标定方法的电子设备进行详细介绍。
如图1所示,是电子设备的方框示意图。电子设备100可以包括存储器111、存储控制器112、处理器113。本领域普通技术人员可以理解,图1所示的结构仅为示意,其并不对电子设备100的结构造成限定。例如,根据电子设备100所需要的处理任务不同,电子设备100还可包括比图1中所示更多或者更少的组件,或者具有与图1所示不同的配置。
上述的存储器111、存储控制器112、处理器113各元件相互之间直接或间接地电性连接,以实现数据的传输或交互。例如,这些元件相互之间可通过一条或多条通讯总线或信号线实现电性连接。上述的处理器113用于执行存储器中存储的可执行模块。
其中,存储器111可以是,但不限于,随机存取存储器(Random Access Memory,简称RAM),只读存储器(Read Only Memory,简称ROM),可编程只读存储器(Programmable Read-Only Memory,简称PROM),可擦除只读存储器(Erasable Programmable Read-Only Memory,简称EPROM),电可擦除只读存储器(Electric Erasable Programmable Read-Only Memory,简称EEPROM)等。其中,存储器111用于存储程序,所述处理器113在接收到执行指令后,执行所述程序,本申请实施例任一实施例揭示的过程定义的电子设备100所执行的方法可以应用于处理器113中,或者由处理器113实现。
上述的处理器113可能是一种集成电路芯片,具有信号的处理能力。上述的处理器113可以是通用处理器,包括中央处理器(Central Processing Unit,简称CPU)、网络处理器(Network Processor,简称NP)等;还可以是数字信号处理器(digital signal processor,简称DSP)、专用集成电路(Application Specific Integrated Circuit,简称ASIC)、现场可编程门阵列 (FPGA)或者其他可编程逻辑器件、分立门或者晶体管逻辑器件、分立硬件组件。可以实现或者执行本申请实施例中的公开的各方法、步骤及逻辑框图。通用处理器可以是微处理器或者该处理器也可以是任何常规的处理器等。
本实施例中的电子设备100可以用于执行本申请实施例提供的各个方法中的各个步骤。下面通过几个实施例详细描述角点编码方法的实现过程。
实施例二
请参阅图2,是本申请实施例提供的角点编码方法的流程图。下面将对图2所示的具体流程进行详细阐述。
步骤201,根据目标使用场景确定出目标棋盘格。
其中,所述目标棋盘格包括交替布置的第一类格子和第二类格子,其中,每相邻四个格子的交点为一个角点。
在一种实施方式中,根据目标相机的视场角(Field of view,简称:FOV)以及所述目标相机的使用距离,计算得到所述目标相机全覆盖画面的目标尺寸,根据所述目标尺寸以及格子尺寸确定出目标棋盘格。
示例性地,上述的全覆盖画面表示目标相机以当前姿态,采集上述的使用距离的画面得到的画面。该采集图像在真实空间中所占区域的尺寸为该目标尺寸。
示例性地,该目标尺寸则为目标棋盘格的尺寸。
在一个实例中,目标相机水平视场角(HFOV)为40°,垂直视场角(VF0V)为30°,使用距离为0.5m。
则目标相机的全覆盖画面的目标尺寸可以包括水平方向的尺寸和垂直方向的尺寸。则分别可以表示为:
水平方向:2*0.5*tan(20°)=0.36m;
垂直方向:2*0.5*tan(15°)=0.26m。
因此,在上述实例中,全覆盖画面的目标尺寸可以为0.36*0.26m 2
可选地,步骤201可以包括以下步骤。
步骤2011,根据所述目标尺寸确定出目标棋盘格的水平尺寸和竖直尺寸。
本实施例中,根据上述的目标尺寸0.36*0.26m 2可以确定出目标棋盘格的水平尺寸为0.36m和竖直尺寸为0.26m。
步骤2012,根据所述水平尺寸和所述竖直尺寸确定出所述目标棋盘格的格子尺寸。
可选地,确定的目标棋盘格的格子的边长可以同时为该水平尺寸和该竖直尺寸的约数。
以上述的目标棋盘格的水平尺寸为0.36m和竖直尺寸为0.26m为例,目标棋盘格的格子的边长可以为1cm、2cm、0.5cm等长度。
在一个实例中,若目标棋盘格的格子的边长为2cm,则目标棋盘格中的格子数量可以是18*13。
示例性地,目标棋盘格的格子的尺寸的选择可以根据相机标定所需的精确的不同而不同。例如,相机标定所需的精确越高,则目标棋盘格的格子的边长的越小;相机标定所需的精确越低,则目标棋盘格的格子的边长的越大。
步骤2013,根据所述目标尺寸以及格子尺寸确定出所述目标棋盘格中的格子分布,以得到所述目标棋盘格。
示例性地,在目标棋盘格交替设置第一类格子和第二类格子,以形成目标棋盘格。
示例性地,上述的第一类格子可以是黑色格子,上述的第二类格子可以是白色格子。
步骤202,根据所述角点的数量确定出所需编码序列的目标数量以及目标基。
示例性地,角点的数量可以是m*n的阵列,则该角点对应的棋盘格阵列可为(m+1)*(n+1)。则在该棋盘格中所需的不重复编码数量为该棋盘格中的第一类格子的数量(m+1)*(n+1)/2。
其中,确定出的目标数量以及目标基形成的最大数值不小于角点的数量。
示例性地,上述角点的数量为m*n。目标数量可以表示为i,目标基可以表示为j。目标数量以及目标基形成的最大数值j i大于角点的数量m*n。
以上述目标棋盘格的格子数量可以是18*13为例,上述目标棋盘格的角点的数量可以是17*12。
在一个实例中,目标基可以为2,目标数量可以为12。在另一个实例中,目标基可以为8,目标数量可以为4。
步骤203,为所述目标棋盘格的第一类格子填充标识。
其中,所述目标棋盘格的第一类格子中的标识的类别数量等于所述目标基,每一类标识表示一个数。
示例性地,上述的目标基为二时,标识的种类为二。
示例性地,上述的目标基为八时,标识的种类为八。
可选地,填充至目标棋盘格的第一类格子中的标识可以是几何图形,例如,三角形、圆形、梯形等。
可选地,填充至目标棋盘格的第一类格子中的标识也可以是数值,例如,1、2、3、4等数值。
可选地,填充至目标棋盘格的第一类格子中的标识也可以是符号,例如,@、#、&、¥等符号。
当然,填充至目标棋盘格的第一类格子中的标识也可以是其它形式的标识码。例如,每一个非零数值对应不同的标识,数值零对应为空标识。
本实施例中,可以基于上述目标数量以及目标基构造一伪随机矩阵。该伪随机矩阵的行向量的长度不小于目标棋盘格中每一行格子中的第一类格子的数量,该伪随机矩阵的列向量的长度不小于目标棋盘格中每一列格子中的第一类格子的数量。
以该目标棋盘格的格子数量为18*13为例。其中,该目标棋盘格中的第一类格子的数量为18*13/2=117。因此,在该实例中,需要不重复的编码数量为117。在该实例中,上述构造伪随机矩阵中的数值数量不小于117,且该伪随机矩阵的行向量的长度不小于目标棋盘格中每一行格子中的第一 类格子的数量,该伪随机矩阵的列向量的长度不小于目标棋盘格中每一列格子中的第一类格子的数量。
在一个实例中,该目标基可以为2,该目标数量可以为12时,则对应的伪随机矩阵可以是65*63的矩阵。在该实例中,伪随机矩阵中的数值为二进制的数值。
在一个实例中,该目标基可以为2,该目标数量可以为6时,则对应的伪随机矩阵可以是33*31的矩阵。在该实例中,伪随机矩阵中的数值为二进制的数值。
示例性地,随着目标基的选择不同,伪随机矩阵中的数值也可以不同。例如,目标基可以为8时,则该伪随机矩阵中的数值可以是八进制的数值。再例如,目标基可以为16时,则该伪随机矩阵中的数值可以是十六进制的数值。
可选地,从上述的伪随机矩阵中选择部分矩阵,根据该部分矩阵对目标棋盘格中的第一类格子填充标识。
示例性地,该部分矩阵的行向量的数值数量不小于目标棋盘格的第一类格子形成的格子阵列的每一行的格子数量。该部分矩阵的列向量的数值数量不小于目标棋盘格的第一类格子形成的格子阵列的每一列的格子数量。
示例性地,从上述的伪随机矩阵中选择部分矩阵,对目标棋盘格中的第一类格子填充,包括:当目标棋盘格中的第一类格子对应至伪随机矩阵的部分矩阵中的数值为一时,则在该第一类格子中填充数值一对应的标识; 当目标棋盘格中的第一类格子对应至伪随机矩阵的部分矩阵中的数值为零时,则在该第一类格子中填充数值零对应的标识。
如图3所示,图示中为一实例中的目标棋盘格。图示中的第一类格子为黑色格子,第二类格子为白色格子。其中,该目标棋盘格中包括18*13个格子。图3所示的实例中,图示中的填充“○”几何图案的表示1,未填充几何图案的表示0。
在图3所示的实例中,局部矩阵为:
Figure PCTCN2021098857-appb-000001
根据上述局部矩阵对目标棋盘格填充标识,可以得到图3所示的目标棋盘格。
步骤204,根据所述目标数量和所述第一类格子中的标识确定出每一个角点的编码。
可选地,每一个角点的编码对应有该角点在目标棋盘格中的坐标。
本实施例中,每一个角点的编码的长度等于上述目标数量。
可选地,本实施例中得到的目标棋盘格可以用于对相机进行标定。
在一种实施方式中,步骤204可以包括以下步骤。
步骤2041,针对所述目标棋盘格中的目标角点,根据所述目标角点的位置选出所述目标数量的所述第一类格子,得的目标格子组。
上述的目标角点为棋盘格中任意一个角点。
示例性地,根据确定出的目标数量,从该目标角点的位置选择目标格子组。示例性地,该目标格子组是与该目标角点距离最近的第一类格子。
步骤2042,根据所述目标数量和所述目标格子组中的第一类格子中的标识,确定出所述目标角点的编码。
在一种实施方式中,根据所述目标格子组中的第一类格子中的标识,确定目标数值组;按照设定的排列规则对所述目标数值组进行排序,以得到所述目标角点的编码。
在一种实施方式中,按照设定的排列规则对所述目标数值组进行排序,以得到所述目标角点的编码,包括:按照所述目标数值组中的各个数值对应的格子距离所述目标角点从近到远的顺序,将所述目标数值组进行排序,以得到所述目标角点的编码。
在一种实施方式中,按照设定的排列规则对所述目标数值组进行排序,以得到所述目标角点的编码,包括:按照该目标数值组对应的格子在该目 标棋盘格中的第一类格子形成的阵列,形成数值矩阵,将该数值矩阵的行向量一次连接形成目标角点的编码。
在一种实施方式中,按照设定的排列规则对所述目标数值组进行排序,以得到所述目标角点的编码,包括:按照该目标数值组对应的格子在该目标棋盘格中的第一类格子形成的阵列,形成数值矩阵,该数值矩阵作为目标角点的编码。
可选地,上述的伪随机矩阵为一有限域。
本实施例中,根据有限域的特性,该目标角点的编码在目标棋盘格中唯一。也就是,目标棋盘格中任意两个目标角点的编码都不相同。
可选地,本实施例中的方法还可以包括:采集实体的目标棋盘格的图像数据;对该图像数据中的第一类格子中的标识进行识别,以得到各个角点周边的第一类格子中的标识,根据各个角点周边的第一类格子中的标识确定出采集到的图像数据中的各个角点对应的唯一编码。
可选地,可以根据各个角点的唯一编码确定出该角点的图像坐标系下的坐标。
在本申请实施例的角点编码方法中,通过在第一类格子中填充区别标识,从而可以使棋盘格中的各个格子具有区别,进一步地,根据具有区别的格子确定出棋盘格的角点,从而可以使每个角点周围的第一类格子都不完全相同,从而可以基于周围的第一类格子唯一标识每一个角点,从而可 以使每个棋盘角点存在区别,从而可以提高使用该目标棋盘格对相机进行标定的便利性。
实施例三
基于同一申请构思,本申请实施例中还提供了与角点编码方法对应的角点编码装置,由于本申请实施例中的装置解决问题的原理与前述的角点编码方法实施例相似,因此本实施例中的装置的实施可以参见上述方法的实施例中的描述,重复之处不再赘述。
请参阅图4,是本申请实施例提供的角点编码装置的功能模块示意图。本实施例中的角点编码装置中的各个模块用于执行上述方法实施例中的各个步骤。角点编码装置包括:第一确定模块301、第二确定模块302、填充模块303以及第三确定模块304;其中,
第一确定模块301,用于根据目标使用场景确定出目标棋盘格,其中,所述目标棋盘格包括交替布置的第一类格子和第二类格子,其中,每四个格子的交点为一个角点;
第二确定模块302,用于根据所述角点的数量确定出所需编码序列的目标数量以及目标基;
填充模块303,用于为所述目标棋盘格的第一类格子填充标识,其中,所述目标棋盘格的第一类格子中的标识的类别数量等于所述目标基,每一类标识表示一个数;
第三确定模块304,用于根据所述目标数量和所述第一类格子中的标识确定出每一个角点的编码。
一种可能的实施方式中,第一确定模块301,用于:
根据目标相机的视场角以及所述目标相机的使用距离,计算得到所述目标相机全覆盖画面的目标尺寸;
根据所述目标尺寸以及格子尺寸确定出目标棋盘格。
一种可能的实施方式中,第一确定模块301,用于:
根据所述目标尺寸确定出目标棋盘格的水平尺寸和竖直尺寸;
根据所述水平尺寸和所述竖直尺寸确定出所述目标棋盘格的格子尺寸;
根据所述目标尺寸以及格子尺寸确定出所述目标棋盘格中的格子分布,以得到所述目标棋盘格。
一种可能的实施方式中,第三确定模块304,用于:
针对所述目标棋盘格中的目标角点,根据所述目标角点的位置选出所述目标数量的所述第一类格子,得的目标格子组,所述目标角点为所述棋盘格中任意一个角点;
根据所述目标格子组中的第一类格子中的标识,确定出所述目标角点的编码。
一种可能的实施方式中,第三确定模块304,包括:数组确定单元以及数组排序单元;其中,
数组确定单元,用于根据所述目标格子组中的第一类格子中的标识,确定目标数值组;
数组排序单元,用于按照设定的排列规则对所述目标数值组进行排序,以得到所述目标角点的编码。
一种可能的实施方式中,数组排序单元,用于:
按照所述目标数值组中的各个数值对应的格子距离所述目标角点从近到远的顺序,将所述目标数值组进行排序,以得到所述目标角点的编码。
一种可能的实施方式中,填充模块303,用于:
根据所述目标数量以及所述目标基构造一伪随机矩阵,所述伪随机矩阵的行向量的长度不小于所述目标棋盘格中每一行格子中的第一类格子的数量,所述伪随机矩阵的列向量的长度不小于所述目标棋盘格中每一列格子中的第一类格子的数量;
从所述伪随机矩阵中选择部分矩阵;
根据所述部分矩阵,对所述目标棋盘格中的第一类格子填充标识。
实施例四
本申请实施例提供的标定方法。在本实施例中的标定方法中,可以包括:使用目标棋盘格对待标定的相机进行标定。
其中,上述的目标棋盘格为使用实施例二提供的角点编码方法编码得到的棋盘格。
示例性地,通过拍摄目标棋盘格,对拍摄得到的图像进行图像识别,识别到的角点周围的第一类格子中的图形,以确定出该角点对应的编码。
实施例五
基于同一申请构思,本申请实施例中还提供了与标定方法对应的标定装置,由于本申请实施例中的装置解决问题的原理与前述的标定方法实施例相似,因此本实施例中的装置的实施可以参见上述方法的实施例中的描述,重复之处不再赘述。
本实施例中的标定装置中的各个模块用于执行上述方法实施例中的各个步骤。标定装置包括:标定模块,用于使用目标棋盘格对待标定的相机进行标定。
其中,上述的目标棋盘格为使用实施例二提供的角点编码方法编码得到的棋盘格。
此外,本申请实施例还提供一种计算机可读存储介质,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行上述方法实施例中所述的角点编码方法和/或标定方法的步骤。
本申请实施例所提供的角点编码方法和标定方法的计算机程序产品,包括存储了程序代码的计算机可读存储介质,所述程序代码包括的指令可用于执行上述方法实施例中所述的角点编码方法和标定方法的步骤,具体可参见上述方法实施例,在此不再赘述。
在本申请所提供的几个实施例中,应该理解到,所揭露的装置和方法,也可以通过其它的方式实现。以上所描述的装置实施例仅仅是示意性的,例如,附图中的流程图和框图显示了根据本申请的多个实施例的装置、方法和计算机程序产品的可能实现的体系架构、功能和操作。在这点上,流程图或框图中的每个方框可以代表一个模块、程序段或代码的一部分,所述模块、程序段或代码的一部分包含一个或多个用于实现规定的逻辑功能的可执行指令。也应当注意,在有些作为替换的实现方式中,方框中所标 注的功能也可以以不同于附图中所标注的顺序发生。例如,两个连续的方框实际上可以基本并行地执行,它们有时也可以按相反的顺序执行,这依所涉及的功能而定。也要注意的是,框图和/或流程图中的每个方框、以及框图和/或流程图中的方框的组合,可以用执行规定的功能或动作的专用的基于硬件的系统来实现,或者可以用专用硬件与计算机指令的组合来实现。
另外,在本申请各个实施例中的各功能模块可以集成在一起形成一个独立的部分,也可以是各个模块单独存在,也可以两个或两个以上模块集成形成一个独立的部分。
所述功能如果以软件功能模块的形式实现并作为独立的产品销售或使用时,可以存储在一个计算机可读取存储介质中。基于这样的理解,本申请的技术方案本质上或者说对现有技术做出贡献的部分或者该技术方案的部分可以以软件产品的形式体现出来,该计算机软件产品存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)执行本申请各个实施例所述方法的全部或部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、磁碟或者光盘等各种可以存储程序代码的介质。需要说明的是,在本文中,诸如第一和第二等之类的关系术语仅仅用来将一个实体或者操作与另一个实体或操作区分开来,而不一定要求或者暗示这些实体或操作之间存在任何这种实际的关系或者顺序。而且,术语“包括”、“包含”或者其任何其他变体意在涵盖非排他性的包含,从而使得包括一系列要素的过程、方法、物品或者设备不仅包括那些要素,而且还包括没有明确列出的其他要素,或者是还包括为这种过程、方法、物品或者设备所固有的要素。在没有更多限制的情况下,由语句“包括……”限定的要素,并不排除在包括所述要素的过程、方法、物品或者设备中还存在另外的相同要素。
以上所述仅为本申请的优选实施例而已,并不用于限制本申请,对于本领域的技术人员来说,本申请可以有各种更改和变化。凡在本申请的精神和原则之内,所作的任何修改、等同替换、改进等,均应包含在本申请的保护范围之内。应注意到:相似的标号和字母在下面的附图中表示类似项,因此,一旦某一项在一个附图中被定义,则在随后的附图中不需要对其进行进一步定义和解释。
以上所述,仅为本申请的具体实施方式,但本申请的保护范围并不局限于此,任何熟悉本技术领域的技术人员在本申请揭露的技术范围内,可轻易想到变化或替换,都应涵盖在本申请的保护范围之内。因此,本申请的保护范围应以权利要求的保护范围为准。

Claims (11)

  1. 一种角点编码方法,其特征在于,包括:
    根据目标使用场景确定出目标棋盘格,其中,所述目标棋盘格包括交替布置的第一类格子和第二类格子,其中,每相邻四个格子的交点为一个角点;
    根据所述角点的数量确定出所需编码序列的目标数量以及目标基;
    为所述目标棋盘格的第一类格子填充标识,其中,所述目标棋盘格的第一类格子中的标识的类别数量等于所述目标基,每一类标识表示一个数;
    根据所述目标数量和所述第一类格子中的标识确定出每一个角点的编码,所述目标棋盘格用于对相机进行标定;
    所述为所述目标棋盘格的第一类格子填充标识,包括:
    根据所述目标数量以及所述目标基构造一伪随机矩阵,所述伪随机矩阵的行向量的长度不小于所述目标棋盘格中每一行格子中的第一类格子的数量,所述伪随机矩阵的列向量的长度不小于所述目标棋盘格中每一列格子中的第一类格子的数量;
    从所述伪随机矩阵中选择部分矩阵;
    根据所述部分矩阵,对所述目标棋盘格中的第一类格子填充标识。
  2. 根据权利要求1所述的方法,其特征在于,所述根据目标使用场景确定出目标棋盘格,包括:
    根据目标相机的视场角以及所述目标相机的使用距离,计算得到所述目标相机全覆盖画面的目标尺寸;
    根据所述目标尺寸以及格子尺寸确定出目标棋盘格。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述目标尺寸以及格子尺寸确定出目标棋盘格,包括:
    根据所述目标尺寸确定出目标棋盘格的水平尺寸和竖直尺寸;
    根据所述水平尺寸和所述竖直尺寸确定出所述目标棋盘格的格子尺寸;
    根据所述目标尺寸以及格子尺寸确定出所述目标棋盘格中的格子分布,以得到所述目标棋盘格。
  4. 根据权利要求1所述的方法,其特征在于,根据所述目标数量和所述第一类格子中的标识确定出每一个角点的编码,包括:
    针对所述目标棋盘格中的目标角点,根据所述目标角点的位置选出所述目标数量的所述第一类格子,得的目标格子组,所述目标角点为所述棋盘格中任意一个角点;
    根据所述目标格子组中的第一类格子中的标识,确定出所述目标角点的编码。
  5. 根据权利要求4所述的方法,其特征在于,所述根据所述目标格子组中的第一类格子中的标识,确定出所述目标角点的编码,包括:
    根据所述目标格子组中的第一类格子中的标识,确定目标数值组;
    按照设定的排列规则对所述目标数值组进行排序,以得到所述目标角点的编码。
  6. 根据权利要求5所述的方法,其特征在于,所述按照设定的排列规则对所述目标数值组进行排序,以得到所述目标角点的编码,包括:
    按照所述目标数值组中的各个数值对应的格子距离所述目标角点从近到远的顺序,将所述目标数值组进行排序,以得到所述目标角点的编码。
  7. 一种标定方法,其特征在于,包括:
    使用目标棋盘格对待标定的相机进行标定,所述目标棋盘格为使用权利要求1-6任意一项所述的角点编码方法编码得到的棋盘格。
  8. 一种角点编码装置,其特征在于,包括:
    第一确定模块,用于根据目标使用场景确定出目标棋盘格,其中,所述目标棋盘格包括交替布置的第一类格子和第二类格子,其中,每四个格子的交点为一个角点;
    第二确定模块,用于根据所述角点的数量确定出所需编码序列的目标数量以及目标基;
    填充模块,用于为所述目标棋盘格的第一类格子填充标识,其中,所述目标棋盘格的第一类格子中的标识的类别数量等于所述目标基,每一类标识表示一个数;为所述目标棋盘格的第一类格子填充标识,包括:根据所述目标数量以及所述目标基构造一伪随机矩阵,所述伪随机矩阵的行向量的长度不小于所述目标棋盘格中每一行格子中的第一类格子的数量,所 述伪随机矩阵的列向量的长度不小于所述目标棋盘格中每一列格子中的第一类格子的数量;从所述伪随机矩阵中选择部分矩阵;根据所述部分矩阵,对所述目标棋盘格中的第一类格子填充标识;
    第三确定模块,用于根据所述目标数量和所述第一类格子中的标识确定出每一个角点的编码。
  9. 一种标定装置,其特征在于,包括:
    标定模块,用于使用目标棋盘格对待标定的相机进行标定,所述目标棋盘格为使用权利要求1-6任意一项所述的角点编码方法编码得到的棋盘格。
  10. 一种电子设备,其特征在于,包括:处理器、存储器,所述存储器存储有所述处理器可执行的机器可读指令,当电子设备运行时,所述机器可读指令被所述处理器执行时执行如权利要求1至7任意一项所述的方法的步骤。
  11. 一种计算机可读存储介质,其特征在于,该计算机可读存储介质上存储有计算机程序,该计算机程序被处理器运行时执行如权利要求1至7任意一项所述的方法的步骤。
PCT/CN2021/098857 2020-08-12 2021-06-08 角点编码方法、标定方法、装置、电子设备和存储介质 WO2022033145A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN202010805424.0A CN111739106B (zh) 2020-08-12 2020-08-12 角点编码方法、标定方法、装置、电子设备和存储介质
CN202010805424.0 2020-08-12

Publications (1)

Publication Number Publication Date
WO2022033145A1 true WO2022033145A1 (zh) 2022-02-17

Family

ID=72658335

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2021/098857 WO2022033145A1 (zh) 2020-08-12 2021-06-08 角点编码方法、标定方法、装置、电子设备和存储介质

Country Status (2)

Country Link
CN (1) CN111739106B (zh)
WO (1) WO2022033145A1 (zh)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111739106B (zh) * 2020-08-12 2020-12-25 成都极米科技股份有限公司 角点编码方法、标定方法、装置、电子设备和存储介质

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100624469B1 (ko) * 2004-11-19 2006-09-15 삼성전자주식회사 비대칭 패턴을 갖는 체크보드 및 이를 이용한영상획득장치의 캘리브레이션 방법 및 장치
CN106225719A (zh) * 2016-08-04 2016-12-14 西安交通大学 一种符号阵列结构光编码图案的生成方法及装置
CN108734743A (zh) * 2018-04-13 2018-11-02 深圳市商汤科技有限公司 用于标定摄像装置的方法、装置、介质及电子设备
CN108765328A (zh) * 2018-05-18 2018-11-06 凌美芯(北京)科技有限责任公司 一种高精度多特征平面模板及其畸变优化和标定方法
CN110047109A (zh) * 2019-03-11 2019-07-23 南京航空航天大学 一种基于自识别标记的相机标定板及其识别检测方法
KR20190110311A (ko) * 2018-03-20 2019-09-30 주식회사 만도 어라운드뷰 카메라의 캘리브레이션 장치 및 그 방법
CN111340893A (zh) * 2020-03-24 2020-06-26 深圳奥比中光科技有限公司 一种标定板、标定方法及系统
CN111739106A (zh) * 2020-08-12 2020-10-02 成都极米科技股份有限公司 角点编码方法、标定方法、装置、电子设备和存储介质

Family Cites Families (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103047943B (zh) * 2012-12-31 2016-04-06 吉林大学 基于单投射编码结构光的车门外板形状尺寸检测方法
CN106671081B (zh) * 2016-11-30 2019-05-14 同济大学 一种基于单目视觉的少自由度机器人运动学标定方法
KR102391667B1 (ko) * 2017-09-11 2022-04-28 한국전자기술연구원 일반 영상 카메라와 열화상 카메라의 동시 캘리브레이션이 가능한 플레이트
CN107657646B (zh) * 2017-09-22 2021-05-07 武汉中观自动化科技有限公司 一种半伪随机编码图案及其生成方法和系统
CN108305286B (zh) * 2018-01-25 2021-09-07 哈尔滨工业大学深圳研究生院 基于颜色编码的多目立体视觉脚型三维测量方法、系统和介质
CN110276810B (zh) * 2018-03-14 2023-04-07 宁波盈芯信息科技有限公司 一种结构光散斑编码图案的生成方法
CN111243032B (zh) * 2020-01-10 2023-05-12 大连理工大学 一种棋盘格角点全自动检测方法

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100624469B1 (ko) * 2004-11-19 2006-09-15 삼성전자주식회사 비대칭 패턴을 갖는 체크보드 및 이를 이용한영상획득장치의 캘리브레이션 방법 및 장치
CN106225719A (zh) * 2016-08-04 2016-12-14 西安交通大学 一种符号阵列结构光编码图案的生成方法及装置
KR20190110311A (ko) * 2018-03-20 2019-09-30 주식회사 만도 어라운드뷰 카메라의 캘리브레이션 장치 및 그 방법
CN108734743A (zh) * 2018-04-13 2018-11-02 深圳市商汤科技有限公司 用于标定摄像装置的方法、装置、介质及电子设备
CN108765328A (zh) * 2018-05-18 2018-11-06 凌美芯(北京)科技有限责任公司 一种高精度多特征平面模板及其畸变优化和标定方法
CN110047109A (zh) * 2019-03-11 2019-07-23 南京航空航天大学 一种基于自识别标记的相机标定板及其识别检测方法
CN111340893A (zh) * 2020-03-24 2020-06-26 深圳奥比中光科技有限公司 一种标定板、标定方法及系统
CN111739106A (zh) * 2020-08-12 2020-10-02 成都极米科技股份有限公司 角点编码方法、标定方法、装置、电子设备和存储介质

Also Published As

Publication number Publication date
CN111739106B (zh) 2020-12-25
CN111739106A (zh) 2020-10-02

Similar Documents

Publication Publication Date Title
JP6566768B2 (ja) 情報処理装置、情報処理方法、プログラム
CN108109169B (zh) 一种基于矩形标识的位姿估计方法、装置及机器人
US9613457B2 (en) Multi-primitive fitting device and operation method thereof
CN110956660A (zh) 定位方法、机器人以及计算机存储介质
US10783373B2 (en) Method and apparatus for augmenting reality
KR20120023052A (ko) 3 차원에 있어서의 형상의 일치를 판정하는 방법 및 장치
Stamatopoulos et al. Automated Target-Free Network Orienation and Camera Calibration
WO2022033145A1 (zh) 角点编码方法、标定方法、装置、电子设备和存储介质
JP7368924B2 (ja) 勾配方向ヒストグラムの演算のためのハードウェアアクセレレータ
US8164633B2 (en) Calibration apparatus and method for imaging devices and computer program
Andaló et al. Efficient height measurements in single images based on the detection of vanishing points
CN107067441B (zh) 摄像机标定方法及装置
CN112396068A (zh) 点云数据的处理方法、装置及电子设备
CN111986299B (zh) 点云数据处理方法、装置、设备及存储介质
US9378555B2 (en) Enhanced outlier removal for 8 point algorithm used in camera motion estimation
Urbančič et al. THE RELIABILITY OF RANSAC METHOD WHEN ESTIMATING THE PARAMETERS OF GEOMETRIC OBJECT.
Stamatopoulos et al. Fully automated image orientation in the absence of targets
CN110930344B (zh) 一种目标的质量确定方法、装置、系统及电子设备
CN112927276A (zh) 图像配准方法、装置、电子设备及存储介质
CN108629350B (zh) 一种识别图片之间相似关系的方法及装置
CN117115242B (zh) 标志点的识别方法、计算机存储介质和终端设备
CN117520581A (zh) 一种土地测绘信息管理方法、系统、设备及介质
CN115760996A (zh) 角点筛选方法、装置、计算机设备和计算机可读存储介质
CN117635875A (zh) 一种三维重建方法、装置及终端
CN117635675A (zh) 多目相机的同名点配对方法

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 21855201

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 21855201

Country of ref document: EP

Kind code of ref document: A1