Method, apparatus, device and storage medium for calibrating optical parameters of an imaging system
By identifying and distinguishing different types of calibration icons in the calibration image, and using pre-stored relative position information and image coordinates, the optical parameters of the imaging system are calculated, solving the problem of optical parameter calibration when the calibration plate is incomplete, and achieving accurate optical parameter calculation.
Patent Information
- Application Number
- CN202311835255.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-12-27
- Publication Date
- 2026-01-27
- Estimated Expiration
- 2043-12-27
AI Technical Summary
During the calibration of optical parameters of the imaging system, when the calibration board is obscured or the complete calibration board cannot be photographed, the spatial coordinates of each identifiable calibration icon in the calibration image cannot be determined, making it impossible to perform optical parameter calibration.
By identifying the first and second type of calibration icons in the calibration image, and using the pre-stored relative position information between the second type of calibration icons and the actual image coordinates, the spatial coordinates of the calibration icons are determined, and the optical parameters of the imaging system are calculated in combination with the image coordinates.
Even if the calibration plate is obscured or incomplete, the optical parameters of the imaging system can be accurately calculated, solving the calibration problem when the calibration plate is incomplete.
Smart Images

Figure CN120219500B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and in particular to a method, apparatus, device, and storage medium for optical parameters of an imaging system. Background Technology
[0002] When using a calibration board to calibrate the optical parameters of an imaging system, the calibration image captured must include the complete calibration board. This allows the pre-stored spatial coordinates of each calibration icon to be determined based on its relative position in the image. For example, the spatial coordinates of the top-left calibration icon are pre-stored, as are the spatial coordinates of the icon adjacent to its right. In other words, for any calibration icon, its spatial coordinates can be determined as long as its position relative to other calibration icons in the calibration image is known.
[0003] When the calibration board is obscured (or the complete calibration board cannot be captured), in some cases, the captured calibration image of the calibration board may be missing some calibration icons. However, it is impossible to know which calibration icons on the calibration board are not obscured (the ones that can be identified on the calibration board) (for example, the calibration board has 100 calibration icons, but only 30 calibration icons in the center of the calibration board are captured). Therefore, it is impossible to determine the spatial coordinates of each identifiable calibration icon in the calibration image, and thus it is impossible to calibrate the optical parameters of the imaging system. Summary of the Invention
[0004] This disclosure provides a method, apparatus, device, and storage medium for calibrating the optical parameters of an imaging system, which can solve the technical problems existing in related technologies. The technical solution is as follows:
[0005] In a first aspect, embodiments of this disclosure provide a method for calibrating optical parameters of an imaging system, the method comprising:
[0006] Acquire calibration images of a calibration board, wherein the calibration icons on the calibration board include multiple first-type calibration icons and at least one second-type calibration icon;
[0007] In the calibration image, icon recognition is performed to determine the image coordinates of the first type of calibration icon and the second type of calibration icon.
[0008] Based on the pre-stored relative position information between the second type of calibration icons, the spatial coordinates of the identified second type of calibration icons, and the image coordinates of the identified first type of calibration icons and second type of calibration icons, the spatial coordinates of each identified calibration icon are determined.
[0009] Based on the spatial coordinates and image coordinates of each identified calibration icon, the optical parameters of the imaging system are calculated.
[0010] In one possible implementation, determining the spatial coordinates of each identified calibration icon based on pre-stored relative position information between the second type of calibration icons, the spatial coordinates of the identified second type of calibration icons, and the image coordinates of the identified first type and second type of calibration icons includes:
[0011] Based on the pre-stored relative position information between the second type of calibration icons and the image coordinates of the identified second type of calibration icons, the calibration icons belonging to the same reference icon group among all the identified calibration icons are determined, wherein the calibration icons belonging to the same reference icon group include at least one second type of calibration icon.
[0012] Based on the image coordinates and spatial coordinates of the calibration icons belonging to the same reference icon group, calculate the initial optical parameters of the imaging system;
[0013] Based on the initial imaging system optical parameters and the spatial coordinates of each calibration icon in the calibration board, determine the estimated image coordinates corresponding to each calibration icon in the calibration board;
[0014] Based on the image coordinates of each identified calibration icon, the estimated image coordinates and spatial coordinates corresponding to each calibration icon in the calibration board, the spatial coordinates of each identified calibration icon are determined.
[0015] In one possible implementation, the relative position information includes the relative position information of the second type of calibration icons in each reference icon group;
[0016] The process of determining the calibration icons belonging to the same reference icon group among all identified calibration icons based on pre-stored relative position information between the second type of calibration icons and the image coordinates of the identified second type of calibration icons includes:
[0017] Based on the image coordinates of the identified second-type calibration icons, the relative position information of the identified second-type calibration icons is determined;
[0018] Based on the relative position information of the second type of calibration icons in each reference icon group and the relative position information of the identified second type of calibration icons, the calibration icons belonging to the same reference icon group among all the identified calibration icons are determined.
[0019] In one possible implementation, determining the calibration icons belonging to the same reference icon group among all identified calibration icons, based on the relative position information of the second type of calibration icons in each reference icon group and the relative position information of the identified second type of calibration icons, includes:
[0020] Based on the relative position information of the second type of calibration icons in each reference icon group, the relative position information of the identified second type of calibration icons, and the pre-stored relative position information of all calibration icons in each reference icon group, the calibration icons belonging to the same reference icon group among all the identified calibration icons are determined.
[0021] In one possible implementation, determining the calibration icons belonging to the same reference icon group among all identified calibration icons, based on the relative position information of the second type of calibration icons in each reference icon group, the relative position information of the identified second type of calibration icons, and the pre-stored relative position information of all calibration icons in each reference icon group, includes:
[0022] Based on the relative position information of the second type of calibration icons in each reference icon group and the relative position information of the identified second type of calibration icons, determine the second type of calibration icons that belong to the same reference icon group among all the identified second type of calibration icons;
[0023] Based on the relative position information of the second-class calibration icons that belong to the same reference icon group among all the identified second-class calibration icons and all the calibration icons in each pre-stored reference icon group, the calibration icons that belong to the same reference icon group among all the identified calibration icons are determined.
[0024] In one possible implementation, determining the spatial coordinates of each identified calibration icon based on its image coordinates, the estimated image coordinates and spatial coordinates corresponding to each calibration icon in the calibration board includes:
[0025] For each identified calibration icon's image coordinates, among the estimated image coordinates corresponding to each calibration icon in the calibration board, the target estimated image coordinates with the highest similarity to the identified calibration icon's image coordinates are determined, and the target spatial coordinates of the target calibration icon corresponding to the target estimated image coordinates are determined as the spatial coordinates of the identified calibration icon.
[0026] In one possible implementation, the first type of label icon is a specified graphic, and the second type of label icon is a graphic whose equivalent center is a black dot.
[0027] In one possible implementation, the method further includes fixing the calibration plate to the robotic arm.
[0028] Secondly, embodiments of this disclosure provide an apparatus for calibrating optical parameters of an imaging system, characterized in that the apparatus comprises:
[0029] The acquisition module is used to acquire calibration images captured on the calibration board, wherein the calibration icons in the calibration board include multiple first-type calibration icons and at least one second-type calibration icon;
[0030] The determination module is used to perform icon recognition in the calibration image and determine the image coordinates of the first type of calibration icon and the second type of calibration icon that have been identified;
[0031] The determining module is further configured to determine the spatial coordinates of each identified calibration icon based on the pre-stored relative position information between the second type of calibration icons, the spatial coordinates of the identified second type of calibration icons, and the image coordinates of the identified first type of calibration icons and the second type of calibration icons.
[0032] The calculation module is used to calculate the optical parameters of the imaging system based on the spatial coordinates and image coordinates of each identified calibration icon.
[0033] Thirdly, a computer device is provided, comprising a memory and a processor, the memory for storing computer instructions; the processor executes the computer instructions stored in the memory to cause the computer device to perform the method of the first aspect and its possible implementations.
[0034] Fourthly, a computer-readable storage medium is provided, which stores computer program code, such that when the computer program code is executed by a computer device, the computer device performs the method of the first aspect and its possible implementations.
[0035] Fifthly, a computer program product is provided, comprising computer program code, wherein when the computer program code is executed by a computer device, the computer device executes the method of the first aspect and its possible implementations.
[0036] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure.
[0037] In this embodiment of the disclosure, when calibrating the optical parameters of the imaging system, the calibration icons in the captured calibration image can be identified to distinguish between the first type of calibration icons and the second type of calibration icons. The spatial coordinates of each calibration icon in the calibration image are determined using pre-stored relative position information between the second type of calibration icons and the image coordinates of the actually identified second type of calibration icons. Because relative position information can directly or indirectly reflect the local distribution of the second type of calibration icons on the calibration board, and image coordinates can directly or indirectly reflect the local distribution of the second type of calibration icons in the calibration image, this information allows us to determine which calibration icons on the calibration board each identified belongs to, i.e., to determine the spatial coordinates of each identified calibration icon. The optical parameters of the imaging system are then calculated by combining the image coordinates. Thus, the optical parameters of the imaging system can also be calculated when the calibration board is obstructed or a complete image of the calibration board cannot be captured. Attached Figure Description
[0038] To more clearly illustrate the technical solutions in the embodiments of this disclosure, the accompanying drawings used in the description of the embodiments will be briefly introduced below. Obviously, the accompanying drawings described below are only some embodiments of this disclosure. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0039] Figure 1 This is a schematic diagram of the structure of a controller provided in an embodiment of this disclosure;
[0040] Figure 2 This is a schematic flowchart illustrating the calibration of optical parameters of an imaging system according to an embodiment of this disclosure;
[0041] Figure 3 This is a schematic diagram of a calibration plate provided in an embodiment of this disclosure;
[0042] Figure 4 This is a schematic flowchart illustrating the calibration of optical parameters of an imaging system according to an embodiment of this disclosure;
[0043] Figure 5 This is a schematic diagram of a calibration plate provided in an embodiment of this disclosure;
[0044] Figure 6 This is a schematic diagram of a calibration image provided in an embodiment of this disclosure;
[0045] Figure 7 This is a schematic diagram of a device for calibrating the optical parameters of an imaging system according to an embodiment of this disclosure. Detailed Implementation
[0046] This disclosure provides a method for calibrating the optical parameters of an imaging system. This method can be applied to a target device, which may be a camera, a structured light imaging system, or other device with image acquisition capabilities. The structured light imaging system includes a camera and a projector. This disclosure uses a structured light imaging system as an example for detailed explanation; other cases are similar and will not be described in detail. The target device may include one or more cameras. The target device may also include a controller, and the method can be specifically executed by the controller. Figure 1 As shown, the controller may include a processor 110, a memory 120, a communication component 130, etc.
[0047] The processor 110 can be a central processing unit (CPU). The processor can be used to read instructions and process data, such as recognizing icons in a calibration image, or calculating the optical parameters of the imaging system based on the spatial coordinates and image coordinates of each calibration icon in the recognized calibration image.
[0048] The memory 120 can be various volatile or non-volatile memories, such as solid-state disks (SSDs) and dynamic random access memory (DRAM). The memory 120 can be used to store pre-stored data, intermediate data, and result data during the processing of the optical parameters of the calibration imaging system. For example, it can store the spatial coordinates of each calibration icon on the calibration board, the relative position information between the second type of calibration icons, the image coordinates of each identified calibration icon, and the calculated optical parameters of the imaging system, etc.
[0049] The communication component 130 can be a wired network connector, a wireless fidelity (WiFi) module, a Bluetooth module, a cellular network communication module, etc. The communication component 130 can be used to transmit data with other devices. For example, the communication component 130 can send the calculated optical parameters of the imaging system to another device, and so on.
[0050] This disclosure provides a method for calibrating the optical parameters of an imaging system. For example... Figure 2 The diagram shows the processing flow of this method, which may include the following steps:
[0051] Step 201: Obtain a calibration image of the calibration board, wherein the calibration icons in the calibration board include multiple first-class calibration icons and at least one second-class calibration icon.
[0052] The calibration board includes multiple calibration icons, among which the first type of calibration icons and the second type of calibration icons are icons carrying different markings. The first type of calibration icons and the second type of calibration icons can be icons of different shapes; for example, the first type of calibration icons might be shaped like a rabbit, and the second type of calibration icons might be shaped like a tiger. Alternatively, the first type of calibration icons and the second type of calibration icons can be icons of the same shape but carrying different markings. For example, an icon without any markings is called the original calibration icon; a first type of calibration icon is an icon whose equivalent center is a red dot, and a second type of calibration icon is an icon whose equivalent center is a black dot. Another example is that the first type of calibration icon is the original calibration icon, and the second type of calibration icon is an icon whose equivalent center is a black dot. Figure 3 The diagram shows a calibration board including a first type of calibration icon and a second type of calibration icon. A circle filled entirely with white is referred to as the first type of calibration icon, and a circle with a black dot at its center is referred to as the second type of calibration icon. Technicians can configure the first and second types of calibration icons on the calibration board according to actual needs; this embodiment does not limit this.
[0053] Step 202: In the calibration image, perform icon recognition to determine the image coordinates of the first type of calibration icon and the second type of calibration icon.
[0054] Each calibration icon corresponds to a calibration point. The location of the calibration point can be determined based on the specific shape of the calibration icon. For example, when the shape of the calibration icon is relatively regular, its equivalent center can be designated as the calibration point; when the shape of the calibration icon is irregular, its top or bottom can be designated as the calibration point. Examples are given below. Figure 3 As shown, the calibration icon is a circle, and the center of the circle is defined as the calibration point. Accordingly, the image coordinates of the calibration icon are the image icons corresponding to the calibration points.
[0055] After acquiring the calibration image, it is then recognized. Once two types of calibration icons are identified, the calibration points of each icon are further determined. Based on the image coordinates of the pixels corresponding to the calibration points of each icon, the image coordinates of each icon can be obtained. This process can be automated using image recognition software, or technicians can manually click on the calibration points of each icon in the calibration image within the software to obtain its image coordinates. The image coordinates of each identified icon and its corresponding category are recorded and stored.
[0056] Step 203: Based on the pre-stored relative position information between the second type of calibration icons, the spatial coordinates of the identified second type of calibration icons, and the image coordinates of the identified first type of calibration icons and second type of calibration icons, determine the spatial coordinates of each identified calibration icon.
[0057] First, the relative position information between all the second-type calibration icons on the calibration board is stored. Based on the image coordinates of the identified second-type calibration icons, the relative position information between them can be obtained. Based on the pre-stored relative position information between all the second-type calibration icons and the relative position information between the identified second-type calibration icons, the image coordinates and spatial coordinates of all identified calibration icons can be obtained. The specific processing procedure for this step will then be explained in detail.
[0058] Step 204: Calculate the optical parameters of the imaging system based on the spatial coordinates and image coordinates of each identified calibration icon.
[0059] Based on the spatial coordinates and image coordinates of the identified calibration icons, the optical parameters of the imaging system can be calculated. There are many calculation methods, such as Zhang's calibration method or other calibration methods; this disclosure does not limit the specific methods used. The imaging system can be a camera, and the optical parameters of the imaging system are calibrated using a calibration board carrying first-type and second-type calibration icons. After acquiring multiple calibration images of the calibration board, steps 201-203 described above can be used to determine the spatial coordinates and image coordinates of each calibration icon in the calibration images, thereby obtaining the camera's intrinsic parameters. Alternatively, the imaging system can be a structured light imaging system, which includes a camera and a projector. In this system architecture, the images of the calibration board include the calibration image of the calibration board and the calibration image of the structured light projected onto the calibration board by the projector. After obtaining these two calibration images, steps 201-203 above can be used to determine the spatial coordinates and image coordinates of each calibration icon in the identified calibration image, thereby obtaining the camera's intrinsic parameters, the projector's intrinsic parameters, and the extrinsic parameters between the camera and the projector.
[0060] Optionally, a robotic arm can be used to hold a calibration plate for calibrating the optical parameters of the imaging system. Control commands are issued to the robotic arm to hold the calibration plate and change its position and orientation within a calibration space. The calibration space can be preset, and technicians can set different calibration spaces for different imaging systems; this will not be elaborated upon in detail in this embodiment. The control commands can move the calibration plate based on certain rules. For example, the movement path of the robotic arm can be set as a triangle, square, or circle, etc. After setting the movement path, a specific movement strategy is set according to the movement path. An example of a control command is given below: the movement path is set as an equilateral triangle, and the calibration plate is placed once at each of the three vertices and the center of each of the three sides of the equilateral triangle. Each time the robotic arm moves the calibration plate, its orientation can be changed. Each time the orientation of the calibration plate is determined, the camera takes a picture of the calibration plate, thus acquiring multiple calibration images.
[0061] In this embodiment of the disclosure, when calibrating the optical parameters of the imaging system, the calibration icons in the captured calibration image can be identified to distinguish between the first type of calibration icons and the second type of calibration icons. The spatial coordinates of each calibration icon in the calibration image are determined using pre-stored relative position information between the second type of calibration icons and the image coordinates of the actually identified second type of calibration icons. Because relative position information can directly or indirectly reflect the local distribution of the second type of calibration icons on the calibration board, and image coordinates can directly or indirectly reflect the local distribution of the second type of calibration icons in the calibration image, this information allows us to determine which calibration icons on the calibration board each identified belongs to, i.e., to determine the spatial coordinates of each identified calibration icon. The optical parameters of the imaging system are then calculated by combining the image coordinates. Thus, the optical parameters of the imaging system can also be calculated when the calibration board is obstructed or a complete image of the calibration board cannot be captured.
[0062] The following is a further explanation of step 203 above, such as... Figure 4 The diagram shows the specific processing flow corresponding to step 203, which may include the following steps:
[0063] Step 401: Based on the pre-stored relative position information between the second type of calibration icons and the image coordinates of the identified second type of calibration icons, determine the calibration icons that belong to the same reference icon group among all the identified calibration icons.
[0064] A reference icon set consists of multiple calibration icons, including at least one second-type calibration icon. A calibration board can have several reference icon sets, and their distribution should be as dispersed as possible to ensure that even when some calibration icons on the calibration board are obscured (i.e., the acquired calibration board's calibration icons are incomplete), at least one complete reference icon set can still be identified. It should be noted that different reference icon sets have different distributions of the second-type calibration icons, meaning the relative position information of the second-type calibration icons in different reference icon sets is different. When each reference icon set includes the same number of calibration icons, and each calibration icon's location is numbered, with different identifiers representing the type of calibration icon at that location, the identifiers are combined in numerical order to serve as the relative position information of the second-type calibration icons in that reference icon set. In this case, the relative position information of the second-type calibration icons in each reference icon set is the same as the relative position information of all calibration icons in each reference icon set.
[0065] The following example further illustrates the meaning of the reference icon group. For ease of understanding, in this example, the reference icon group will be referred to as the reference group, and the labeling icon will be referred to as the icon. For example... Figure 5As shown, there are 5 reference groups on the calibration board, namely reference group A, reference group B, reference group C, reference group D and reference group E. The first type of calibration icon is encoded as 0 and the second type of calibration icon is encoded as 1. By combining the codes in the direction of the arrows shown in the figure, the corresponding identifiers of the above 5 reference groups are: 0101110, 1100101, 1011111, 1100110 and 0011110.
[0066] Based on the image coordinates of the second-type calibration icons identified in the calibration image, the positions of all identified second-type calibration icons can be obtained, and thus their relative position information can be obtained. The relative position information of all identified second-type calibration icons is compared with the pre-stored relative position information of second-type calibration icons included in each calibration reference group. If the relative position information is exactly the same, then these identified second-type calibration icons belong to the same calibration reference group. Therefore, based on the pre-stored calibration icons included in that calibration reference group, all calibration icons within the same calibration reference group to which these identified second-type calibration icons belong can be obtained.
[0067] The following example illustrates this, continuing with the examples above, such as... Figure 6 As shown, the calibration plate is partially obscured; the shaded area on the calibration plate represents the obscured region. Figure 6 The calibration image of the calibration board is shown in the image, but the right half of the image is obscured. The calibration icon combination that can form a hexagon and includes the second type of calibration icon is encoded. The encoding rule of this calibration icon combination is the same as the encoding rule of the reference icon group. The calibration icon combination F can be found. The identifier of the calibration icon combination F is 0100001. The identifier is compared with the pre-stored identifier. It is found that there is no identifier corresponding to the calibration icon combination F in the pre-stored identifier. Therefore, the calibration icon combination F is discarded. Continuing the search for calibration icon combinations that satisfy the above conditions, we find calibration icon combination G, whose corresponding identifier is 1000010. Comparing this identifier with the pre-stored identifiers, we find that there is no identifier in the pre-stored identifiers corresponding to calibration icon combination G, so we discard calibration icon combination G. We then continue searching for calibration icon combinations that can form a hexagon and include at least one second-type calibration icon. After finding a calibration icon combination, if there is no identifier in the pre-stored identifiers corresponding to it, we discard the calibration icon combination. If there is an identifier in the pre-stored identifiers corresponding to it, we record the identifier and designate the calibration combination as a reference icon group. All calibration icons included in this calibration combination belong to the same reference icon group. We then continue the above operations until we have traversed all calibration icon combinations that can form a hexagon and include at least one second-type calibration icon. Figure 6As shown, through the above process, we can obtain the reference icon group A corresponding to the calibration icon group H, the reference icon group C corresponding to the calibration icon group I, and the reference icon group D corresponding to the calibration icon group J. Then, we can determine the calibration icons that belong to the same reference icon group among all the identified calibration icons, as well as the spatial coordinates and image coordinates of the calibration icons.
[0068] Step 402: Calculate the initial imaging system optical parameters based on the image coordinates and spatial coordinates of the calibration icons belonging to the same reference icon group.
[0069] Based on the image coordinates and spatial coordinates of the calibration icons belonging to the same reference icon group, the transformation matrix from the spatial coordinate system to the image coordinate system can be obtained, which is the initial optical parameters of the imaging system.
[0070] Continuing with the example above, based on the image coordinates and spatial coordinates of all the calibration icons included in calibration icon combination H, calibration icon combination I, and calibration icon combination J, the transformation matrix from the spatial coordinate system to the image coordinate system is obtained.
[0071] Step 403: Based on the initial imaging system optical parameters and the spatial coordinates of each calibration icon in the calibration board, determine the estimated image coordinates corresponding to each calibration icon in the calibration board.
[0072] By using the spatial coordinates of each calibration icon on the calibration board and the transformation matrix from the spatial coordinate system to the image coordinate system, we can obtain the estimated image coordinates corresponding to all the calibration icons on the calibration board.
[0073] Step 404: Based on the image coordinates of each identified calibration icon, the estimated image coordinates and spatial coordinates corresponding to each calibration icon in the calibration board, determine the spatial coordinates of each identified calibration icon.
[0074] In the calibration image, for the image coordinates of each identified calibration icon, the target estimated image coordinates with the highest similarity to the image coordinates of the identified calibration icon are determined from the estimated image coordinates corresponding to each calibration icon in the calibration board. Similarity can be represented by the distance between the vectors corresponding to the coordinates. For example, if coordinate A is (x1, x2, x3) and coordinate B is (y1, y2, y3), the distance between coordinates A and coordinate B can be expressed as d = (x1 - y1). 2 +(x²-y²) 2 +(x³-y³) 2 The smaller d is, the higher the similarity between the two vectors, that is, the higher the coordinate similarity. The target spatial coordinates of the target calibration icon corresponding to the target estimated image coordinates are determined as the spatial coordinates of the identified calibration icon.
[0075] Based on the same technical concept, embodiments of this disclosure provide an apparatus for calibrating the optical parameters of an imaging system, such as... Figure 7 As shown, the device includes:
[0076] The acquisition module 710 can be used to acquire calibration images of a calibration board including two types of calibration icons, corresponding to step 201 above. The specific implementation method can be referred to the content of step 201 above.
[0077] The determination module 720 can be used to perform icon recognition in the calibration image and determine the image coordinates corresponding to the two types of calibration icons identified, corresponding to step 202 above. The specific implementation method can be referred to the content of step 202 above.
[0078] The determination module 720 can also be used to determine the spatial coordinates of each identified calibration icon based on the pre-stored relative position information between the second type of calibration icons, the spatial coordinates of the identified second type of calibration icons, and the image coordinates of the two types of calibration icons identified. This corresponds to step 203 above. The specific implementation method can be referred to the content of step 203 above.
[0079] The calculation module 730 is used to calculate the optical parameters of the imaging system based on the spatial coordinates and image coordinates of each identified calibration icon, corresponding to step 204 above. The specific implementation method can be referred to the content of step 204 above.
[0080] It should be noted that the acquisition module 710, determination module 720 and calculation module 730 mentioned above can be implemented by a processor, or by a processor in conjunction with a memory.
[0081] In this embodiment of the disclosure, when calibrating the optical parameters of the imaging system, the calibration icons in the captured calibration image can be identified to distinguish between the first type of calibration icons and the second type of calibration icons. The spatial coordinates of each calibration icon in the calibration image are determined using pre-stored relative position information between the second type of calibration icons and the image coordinates of the actually identified second type of calibration icons. Because relative position information can directly or indirectly reflect the local distribution of the second type of calibration icons on the calibration board, and image coordinates can directly or indirectly reflect the local distribution of the second type of calibration icons in the calibration image, this information allows us to determine which calibration icons on the calibration board each identified belongs to, i.e., to determine the spatial coordinates of each identified calibration icon. The optical parameters of the imaging system are then calculated by combining the image coordinates. Thus, the optical parameters of the imaging system can also be calculated when the calibration board is obstructed or a complete image of the calibration board cannot be captured.
[0082] It should be noted that the apparatus for calibrating the optical parameters of an imaging system provided in the above embodiments is only illustrated by the division of the above functional modules. In practical applications, the above functions can be assigned to different functional modules as needed, that is, the internal structure of the apparatus can be divided into different functional modules to complete all or part of the functions described above. Furthermore, the apparatus for calibrating the optical parameters of an imaging system provided in the above embodiments and the method embodiments for calibrating the optical parameters of an imaging system belong to the same concept, and their specific implementation process is detailed in the method embodiments, which will not be repeated here.
[0083] In the above embodiments, implementation can be achieved entirely or partially through software, hardware, firmware, or any combination thereof. When implemented in software, it can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions that, when loaded and executed on a device, generate all or part of the processes or functions described in the embodiments of this disclosure. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another via wired (e.g., coaxial cable, fiber optic cable, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium accessible to the device or a data storage device such as a server or data center that integrates one or more available media. The available medium can be a magnetic medium (e.g., floppy disk, hard disk, and magnetic tape), an optical medium (e.g., digital video disk (DVD), etc.), or a semiconductor medium (e.g., solid-state drive).
[0084] Those skilled in the art will understand that all or part of the steps of the above embodiments can be implemented by hardware or by a program instructing related hardware. The program can be stored in a computer-readable storage medium, such as a read-only memory, a disk, or an optical disk.
[0085] The above description is only one embodiment of this disclosure and is not intended to limit this disclosure. Any modifications, equivalent substitutions, improvements, etc., made within the principles of this disclosure should be included within the protection scope of this disclosure.
Claims
1. A method for calibrating optical parameters of an imaging system, characterized in that, The method includes: Acquire calibration images of a calibration board, wherein the calibration icons on the calibration board include multiple first-type calibration icons and at least one second-type calibration icon; In the calibration image, icon recognition is performed to determine the image coordinates of the first type of calibration icon and the second type of calibration icon. Based on the pre-stored relative position information between the second type of calibration icons and the image coordinates of the identified second type of calibration icons, the calibration icons belonging to the same reference icon group among all the identified calibration icons are determined. The calibration icons belonging to the same reference icon group include at least one second type of calibration icon. The relative position information is obtained by combining the identifiers in the order of their numbers when each reference icon group includes the same number of calibration icons and the position of each calibration icon is numbered and different identifiers are used to represent the type of calibration icon at the position. Based on the image coordinates and spatial coordinates of the calibration icons belonging to the same reference icon group, calculate the initial optical parameters of the imaging system; Based on the initial imaging system optical parameters and the spatial coordinates of each calibration icon in the calibration board, determine the estimated image coordinates corresponding to each calibration icon in the calibration board; Based on the image coordinates of each identified calibration icon, the estimated image coordinates and spatial coordinates corresponding to each calibration icon in the calibration board, the spatial coordinates of each identified calibration icon are determined. Based on the spatial coordinates and image coordinates of each identified calibration icon, the optical parameters of the imaging system are calculated.
2. The method according to claim 1, characterized in that, The process of determining the calibration icons belonging to the same reference icon group among all identified calibration icons based on pre-stored relative position information between the second type of calibration icons and the image coordinates of the identified second type of calibration icons includes: Based on the image coordinates of the identified second-type calibration icons, the relative position information of the identified second-type calibration icons is determined; Based on the relative position information of the second type of calibration icons in each reference icon group and the relative position information of the identified second type of calibration icons, the calibration icons belonging to the same reference icon group among all the identified calibration icons are determined.
3. The method according to claim 1, characterized in that, The step of determining the spatial coordinates of each identified calibration icon based on the image coordinates of each identified calibration icon, the estimated image coordinates and spatial coordinates corresponding to each calibration icon in the calibration board, includes: For each identified calibration icon's image coordinates, among the estimated image coordinates corresponding to each calibration icon in the calibration board, the target estimated image coordinates with the highest similarity to the identified calibration icon's image coordinates are determined, and the target spatial coordinates of the target calibration icon corresponding to the target estimated image coordinates are determined as the spatial coordinates of the identified calibration icon.
4. The method according to claim 1, characterized in that, The first type of label icon is a specified graphic, and the second type of label icon is a graphic composed of the specified graphic and the points at the equivalent center of the specified graphic.
5. The method according to any one of claims 1-4, characterized in that, The calibration icon is circular.
6. The method according to any one of claims 1-4, characterized in that, The calibration plate is fixed to the robotic arm.
7. A device for calibrating the optical parameters of an imaging system, characterized in that, The device includes: The acquisition module is used to acquire calibration images captured on a calibration board, wherein the calibration icons on the calibration board include multiple first-type calibration icons and at least one second-type calibration icon; The determination module is used to perform icon recognition in the calibration image and determine the image coordinates of the first type of calibration icon and the second type of calibration icon that have been identified; The determining module is further configured to: determine, based on the pre-stored relative position information between the second-type calibration icons and the image coordinates of the identified second-type calibration icons, determine the calibration icons belonging to the same reference icon group among all identified calibration icons, wherein the calibration icons belonging to the same reference icon group include at least one second-type calibration icon; the relative position information is obtained by combining the identifiers in numerical order when each reference icon group includes the same number of calibration icons and the location of each calibration icon is numbered, and different identifiers are used to represent the type of calibration icon at the location; calculate the initial imaging system optical parameters based on the image coordinates and spatial coordinates of the calibration icons belonging to the same reference icon group; determine the estimated image coordinates corresponding to each calibration icon in the calibration board based on the initial imaging system optical parameters and the spatial coordinates of each calibration icon in the calibration board; and determine the spatial coordinates of each identified calibration icon based on the image coordinates of each identified calibration icon, the estimated image coordinates corresponding to each calibration icon in the calibration board, and the spatial coordinates of the identified calibration icons. The calculation module is used to calculate the optical parameters of the imaging system based on the spatial coordinates and image coordinates of each identified calibration icon.
8. A computer device, characterized in that, The computer device includes a memory and a processor, the memory being used to store computer instructions; The processor executes computer instructions stored in the memory to cause the computer device to perform the method according to any one of claims 1-6.
9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer program code, which, when executed by a computer device, performs the method described in any one of claims 1-6.
Citation Information
Patent Citations
Method and apparatus for calibrating internal parameters of camera, method and apparatus for calibrating relative attitude of camera, unmanned aerial vehicle and storage apparatus
WO2020237574A1