Camera attitude calibration method and device, and image correction method and device
By using a camera in a two-dimensional imaging platform to capture calibration images of the target calibration board within an automated optical inspection system for wafers, the camera's attitude information is determined, thus solving the problem of image quality degradation caused by camera attitude errors and achieving high-precision camera attitude calibration and image correction.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- SUZHOU MEGAROBO TECH CO LTD
- Filing Date
- 2025-12-19
- Publication Date
- 2026-04-21
AI Technical Summary
In automated optical inspection systems for wafers, the camera's pose information leads to a decrease in image quality due to relative motion errors. Existing technologies that rely on external equipment or image feature matching methods suffer from insufficient accuracy and error accumulation.
The camera captures calibration images of the target calibration board within a two-dimensional imaging platform. The camera's attitude information, including tilt and yaw angles, is determined by the relationship between feature points in the calibration and standard images. This approach, combined with imaging characteristics, eliminates the need for additional equipment.
It accurately determines camera attitude information, reduces image errors, and improves image quality. It does not rely on external equipment and is suitable for both line scan and area scan cameras.
Smart Images

Figure CN121904178A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of camera attitude calibration technology, specifically to a camera attitude calibration method, an image correction method, a camera attitude calibration device, an image correction device, an electronic device, a storage medium, and a computer program product. Background Technology
[0002] Camera pose calibration is a key technology in fields such as computer vision, robotics, augmented reality (AR), and autonomous driving. Its purpose is to determine the position and orientation (i.e., extrinsic parameters) of a camera in three-dimensional space.
[0003] Taking automated optical inspection (AIO) of wafers as an example, in a typical AIO system, the line scan camera used to capture images is usually fixedly mounted within the system's imaging module, while the wafer is fixed to the stage via vacuum adsorption. During system operation, the camera and the stage move relative to each other along the X and Y axes to acquire images of different sub-regions of the wafer. However, due to the limitations of the motion detection platform of the AIO system, errors inevitably exist in the relative motion between the wafer and the camera, resulting in changes in the camera's attitude information relative to the stage, which in turn affects the captured images.
[0004] In existing technologies, a two-dimensional laser interferometer or external measuring equipment can be used to calibrate and correct the axis of the motion detection platform to determine the camera's attitude information, thereby reducing attitude errors caused by the relative motion between the wafer and the camera. However, this method relies on external equipment, and the accuracy of the determined attitude information is limited by the precision of the external equipment, placing high demands on the hardware. For images of different sub-regions of the wafer, the camera's attitude error can also be estimated based on feature point matching of overlapping areas or by minimizing image similarity. These methods can reduce local stitching distortion to some extent, but their correction effect heavily depends on the stability of image features. Furthermore, when the wafer has large areas of missing cores or insufficient texture information, it is prone to generating large stitching errors, which gradually accumulate globally, leading to a decrease in overall measurement accuracy. Summary of the Invention
[0005] The present invention was proposed in view of the above-mentioned problems.
[0006] According to a first aspect of the present invention, a camera attitude calibration method is provided. The method includes: taking a picture of at least a portion of a target calibration board using a camera within a two-dimensional imaging platform to obtain a calibration image; determining attitude information of the camera when taking the calibration image within the two-dimensional imaging platform based on the actual positional relationship between feature points in the calibration image and the theoretical positional relationship between feature points in a standard image, wherein the standard image represents an image obtained by the camera taking a picture of the at least a portion of the target area within the two-dimensional imaging platform when the camera is in a standard attitude.
[0007] For example, the attitude information includes the tilt attitude angle relative to the plane where the target calibration plate is located; determining the attitude information of the camera when capturing the calibration image in the two-dimensional imaging platform based on the actual positional relationship between feature points in the calibration image and the theoretical positional relationship between feature points in the standard image includes: determining a first target point pair based on the target feature points corresponding to the positions in different target groups in the calibration image; determining the actual distance between the two target points based on the coordinates of the two target points in the first target point pair; determining the standard distance between the standard target points corresponding to the two target points in the standard image; and calculating the tilt attitude angle of the camera when capturing the calibration image in the two-dimensional imaging platform based on the actual distance and the standard distance.
[0008] For example, the first target point pair includes a first calibration point pair and a second calibration point pair. The first reference point pair corresponding to the first calibration point pair in the standard image and the second reference point pair corresponding to the second calibration point pair in the standard image are located on the same straight line, and the standard distance between the first reference point pair and the standard distance between the second reference point pair are the same.
[0009] The step of calculating the tilt attitude angle of the camera when capturing the calibration image within the two-dimensional imaging platform based on the actual distance and the standard distance includes: determining the magnitude relationship between a first distance and a second distance, wherein the first distance is the actual distance between the first calibration point pair and the second distance is the actual distance between the second calibration point pair; determining the relative positional relationship between the first calibration point pair and the second calibration point pair; determining the target value range of the tilt attitude angle based on the magnitude relationship and the relative positional relationship; and determining the tilt attitude angle within the target value range based on the actual distance and the standard distance.
[0010] For example, the number of target feature points in each target group is multiple; determining the first target point pair based on the target feature points corresponding to the positions in different target groups in the calibration image includes: determining each target point in the first target point pair based on the mean coordinates of the target feature points in each target group, so as to obtain the first target point pair.
[0011] For example, the feature points in the target calibration board are evenly distributed in rows and columns; when the tilt attitude angle is a roll angle, the target feature points corresponding to the positions in different target groups are the feature points corresponding to the rows in different target columns; when the tilt attitude angle is a pitch angle, the target feature points corresponding to the positions in different target groups are the feature points corresponding to the columns in different target rows.
[0012] For example, the different target columns are adjacent columns, and the different target rows are adjacent rows.
[0013] For example, the attitude information includes a yaw angle; determining the attitude information of the camera when capturing the calibration image on the two-dimensional imaging platform based on the actual positional relationship between feature points in the calibration image and the theoretical positional relationship between feature points in the standard image includes: fitting a target straight line based on at least one group of reference feature points in the calibration image; determining the yaw angle of the camera when capturing the calibration image on the two-dimensional imaging platform based on the angle between the target straight line and the reference straight line, wherein the reference straight line is the straight line where the standard target point corresponding to the reference feature point is located in the standard image.
[0014] For example, the target line includes multiple first lines, and the reference line includes multiple second lines. The first lines and the second lines correspond one-to-one. The reference feature points used to fit the same first line correspond to the standard feature points in the standard image in the same row or column, and all the second lines are parallel. Determining the sway angle of the camera when capturing the calibration image in the two-dimensional imaging platform based on the angle between the target line and the reference lines includes: determining the reference angle between each pair of corresponding first lines and second lines; and determining the sway angle of the camera when capturing the calibration image in the two-dimensional imaging platform based on all the reference angles.
[0015] According to a second aspect of the present invention, an image correction method is provided. The method includes: capturing an image of at least a portion of a target object using a camera within a two-dimensional imaging platform to obtain a target image; and correcting the target image according to a reference image correction amount to obtain a corrected target image, wherein the reference image correction amount is determined based on camera attitude information determined by the camera attitude calibration method according to any one of claims 1-8.
[0016] For example, the attitude information includes the tilt attitude angle relative to the plane where the target calibration board is located; wherein, determining the reference image correction amount includes the following steps: for target feature points of each target group in the calibration image, determining a first coordinate difference between the actual mean coordinates of the target feature points in the target group and the actual mean coordinates of the target feature points in the reference group, wherein the positions of the target feature points in different target groups correspond one-to-one, and the reference group is a target group other than the target group in the different target groups; determining a second coordinate difference between the standard mean coordinates of the target feature points in the target group and the standard mean coordinates of the target feature points in the reference group, wherein the standard mean coordinates are the mean coordinates of the standard target points corresponding to the target feature points in the target group in the standard image; determining the overall offset corresponding to the target group based on the first deviation between the first coordinate difference and the second coordinate difference; determining the reference image correction amount based on the second deviation between the overall offset corresponding to each target group and the mean of the overall offsets corresponding to all target groups.
[0017] For example, the attitude information includes a yaw angle; wherein, determining the reference image correction amount includes the following steps: determining the target rotation angle of the target image as the reference image correction amount based on the angle of the yaw angle.
[0018] For example, the step of using a camera within a two-dimensional imaging platform to capture images of at least a portion of a target object to obtain a target image includes: capturing images of different sub-regions of the target object from different positions within the two-dimensional imaging platform to obtain respective target images; the step of correcting the target image based on the reference image correction amount to obtain a corrected target image includes: determining a correspondence between the camera's shooting position within the two-dimensional imaging platform and the target image correction amount based on the reference image correction amount and the position of the camera when capturing the calibration image within the two-dimensional imaging platform, wherein the calibration image includes multiple images obtained by capturing images of different sub-regions of a target calibration plate from different positions within the two-dimensional imaging platform; determining a target image correction amount for the target image based on the correspondence and the position of the camera when capturing the target image within the two-dimensional imaging platform; and correcting the target image using the target image correction amount to obtain a corrected target image.
[0019] According to a third aspect of the present invention, a camera attitude calibration device is also provided, comprising:
[0020] The imaging module is used to capture images of at least a portion of the target calibration board within a two-dimensional imaging platform using a camera, so as to obtain calibration images;
[0021] The attitude calculation module is used to determine the attitude information of the camera when it captures the calibration image in the two-dimensional imaging platform based on the actual positional relationship between feature points in the calibration image and the theoretical positional relationship between feature points in the standard image. The standard image represents the image obtained by the camera capturing at least a portion of the region in the two-dimensional imaging platform when it is in a standard attitude.
[0022] According to a fourth aspect of the present invention, an image correction apparatus is also provided, comprising:
[0023] The image acquisition module is used to capture images of at least a portion of a target object within a two-dimensional imaging platform using a camera, in order to obtain a target image;
[0024] An image correction module is used to correct the target image according to a reference image correction amount to obtain a corrected target image, wherein the reference image correction amount is determined based on the camera attitude information determined by the camera attitude calibration method as described in any one of claims 1-8.
[0025] According to a fifth aspect of the present invention, an electronic device is also provided, comprising: a processor and a memory, wherein the memory stores computer program instructions, which, when executed by the processor, are used to perform the camera pose calibration method and / or image correction method described above.
[0026] According to a sixth aspect of the present invention, a storage medium is also provided, on which program instructions are stored, which, when executed, are used to perform the camera attitude calibration method and / or image correction method described above.
[0027] According to a seventh aspect of the present invention, a computer program product is also provided, comprising computer program instructions, which, when executed, are used to perform the camera pose calibration method and / or image correction method described above.
[0028] In the above technical solution, a camera is used to capture images of at least a portion of the target calibration board within a two-dimensional imaging platform to obtain calibration images. Then, based on the actual positional relationships between feature points in the calibration images and the theoretical positional relationships between feature points in the standard images, the camera's attitude information when capturing the calibration images within the two-dimensional imaging platform is determined. The standard image represents the image obtained when the camera is in a standard posture within the two-dimensional imaging platform, capturing images of at least a portion of the target area. This approach combines the imaging characteristics of the camera within the two-dimensional imaging platform with the differences between the calibration images and the standard images captured on the calibration board to accurately determine the camera's attitude information when capturing images within the two-dimensional imaging platform, without requiring real-time assistance from additional equipment.
[0029] The above description is merely an overview of the technical solution of the present invention. In order to better understand the technical means of the present invention and to implement it in accordance with the contents of the specification, and to make the above and other objects, features and advantages of the present invention more apparent and understandable, specific embodiments of the present invention are described below. Attached Figure Description
[0030] The above and other objects, features, and advantages of the present invention will become more apparent from the more detailed description of the embodiments of the invention in conjunction with the accompanying drawings. The drawings are provided to further illustrate the embodiments of the invention and form part of the specification. They are used together with the embodiments of the invention to explain the invention and do not constitute a limitation thereof. In the drawings, the same reference numerals generally represent the same parts or steps.
[0031] Figure 1 A schematic flowchart of a camera pose calibration method according to an embodiment of the present invention is shown;
[0032] Figure 2 A schematic diagram illustrating the use of a line scan camera to capture images of different sub-regions of a target calibration board according to an embodiment of the present invention is shown.
[0033] Figure 3 A schematic flowchart illustrating the determination of pose information of a camera when capturing a calibration image within a two-dimensional imaging platform, according to an embodiment of the present invention, is shown.
[0034] Figure 4 A schematic diagram illustrating the determination of the tilt attitude angle of a camera when capturing a calibration image within a two-dimensional imaging platform, according to an embodiment of the present invention, is shown.
[0035] Figure 5 A schematic flowchart illustrating the tilt attitude angle of a camera capturing a calibration image within a two-dimensional imaging platform, according to yet another embodiment of the present invention, is shown.
[0036] Figure 6 A schematic diagram illustrating the determination of a target range of tilt attitude angles according to an embodiment of the present invention is shown;
[0037] Figure 7 A schematic flowchart illustrating the determination of pose information of a camera when capturing a calibration image within a two-dimensional imaging platform, according to an embodiment of the present invention, is shown.
[0038] Figure 8 A schematic flowchart illustrating the determination of the yaw angle of a camera when capturing a calibration image within a two-dimensional imaging platform, according to an embodiment of the present invention, is shown.
[0039] Figure 9A schematic diagram illustrating the determination of a deflection angle according to an embodiment of the present invention is shown;
[0040] Figure 10 A schematic flowchart of an image correction method according to an embodiment of the present invention is shown;
[0041] Figure 11 A schematic flowchart illustrating the determination of a reference image correction amount according to an embodiment of the present invention is shown;
[0042] Figure 12 A schematic flowchart of an image correction method according to yet another embodiment of the present invention is shown;
[0043] Figure 13 A schematic block diagram of a camera attitude calibration device according to an embodiment of the present invention is shown;
[0044] Figure 14 A schematic block diagram of an image correction apparatus according to an embodiment of the present invention is shown;
[0045] Figure 15 A schematic block diagram of an electronic device according to an embodiment of the present invention is shown. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of the present invention more apparent, exemplary embodiments according to the present invention will be described in detail below with reference to the accompanying drawings. Obviously, the described embodiments are merely a part of the embodiments of the present invention, and not all of the embodiments of the present invention. It should be understood that the present invention is not limited to the exemplary embodiments described herein. Based on the embodiments of the present invention described herein, all other embodiments obtained by those skilled in the art without inventive effort should fall within the protection scope of the present invention.
[0047] To at least partially address the aforementioned problems, a camera attitude calibration method is proposed. This method utilizes a camera to capture images of at least a portion of a target calibration board within a two-dimensional imaging platform, obtaining calibration images. Then, based on the actual positional relationships between feature points in the calibration images and the theoretical positional relationships between feature points in the standard image, the camera's attitude information when capturing the calibration images within the two-dimensional imaging platform is determined. The standard image represents the image obtained when the camera is in a standard attitude within the two-dimensional imaging platform, capturing images of at least a portion of the target area. This approach combines the imaging characteristics of the camera within the two-dimensional imaging platform with the differences between the calibration images and the standard images to accurately determine the camera's attitude information when capturing images within the two-dimensional imaging platform, without requiring real-time assistance from additional equipment.
[0048] Figure 1A schematic flowchart of a camera pose calibration method according to an embodiment of the present invention is shown. Figure 1 As shown, the camera attitude calibration method may include steps S110 to S120.
[0049] In step S110, a camera is used to capture images of at least a portion of the target calibration plate within a two-dimensional imaging platform to obtain calibration images.
[0050] The camera can be any type of camera, such as a monocular camera, a stereo / binocular camera, or an RGB-D camera. For example, the camera can be a line scan camera or an area scan camera.
[0051] In a 2D imaging platform, a target calibration plate can be placed on a stage, while the camera can be mounted on a support. In the standard orientation, the camera's imaging plane is parallel to the plane of the stage, i.e., parallel to the plane of the target calibration plate. At this time, the camera's optical axis is perpendicular to the plane of the target calibration plate and stage, i.e., perpendicular to the target calibration plate, and the camera's field of view remains unchanged relative to the standard field of view. The stage or the support that holds the camera in the 2D imaging platform can move along the XY motion mechanism during the imaging process. This allows the stage and camera to move relative to each other along the X / Y axes of the 2D motion, enabling the camera to capture images of at least a portion of the target calibration plate from the 2D imaging platform. In commonly used 2D imaging platforms, the camera can be mounted on a support and positioned above the stage, with the camera's optical axis pointing vertically downwards. Preferably, a 2D imaging platform where the stage can move along the XY motion mechanism during the imaging process is selected.
[0052] For example, at least a portion of a target calibration board may include a single sub-region. This allows a camera to capture a calibration image of at least a portion of the target calibration board.
[0053] For example, at least a portion of the target calibration board may include multiple distinct sub-regions. This allows for the capture of multiple calibration images of the different sub-regions of the target calibration board using a camera.
[0054] In step S120, the pose information of the camera when capturing the calibration image in the two-dimensional imaging platform is determined based on the actual positional relationship between feature points in the calibration image and the theoretical positional relationship between feature points in the standard image. The standard image represents the image obtained by the camera capturing at least a portion of the area in the two-dimensional imaging platform when the camera is in a standard pose.
[0055] Based on the stage, the direction perpendicular to the target calibration plate can be used as the Z-axis of the motion coordinate system of the 2D imaging platform, the row arrangement direction of the feature points on the target calibration plate can be used as the X-axis, and the column arrangement direction of the feature points on the target calibration plate can be used as the Y-axis. This gives the motion coordinate system of the 2D imaging platform, which can then be used to analyze the calibration image, the target calibration plate, and the standard image.
[0056] Although in the aforementioned two-dimensional imaging platform, it is desirable that the camera's imaging plane is parallel to the plane of the stage during shooting, i.e., parallel to the target calibration plate plane, and that the camera's field of view does not rotate relative to the standard field of view, the relative motion between the stage (where the target calibration plate is placed) and the camera along the two-dimensional motion axis may cause the camera's imaging plane to be non-parallel to the plane of the stage, or the camera's field of view to rotate relative to the standard field of view. This results in a difference between the camera's posture when capturing calibration images and the standard posture, leading to a discrepancy between the calibration images captured by the camera and the standard images that the camera should capture in the standard posture.
[0057] A standard image can be a real image captured by a camera in a standard pose on a 2D imaging platform, targeting at least a portion of the target calibration board. A standard image can also be a theoretical image inferred based on camera intrinsic parameters (e.g., magnification, field of view), at least a portion of the target calibration board, and the standard pose of the camera when capturing at least a portion of the target calibration board on the 2D imaging platform; that is, the standard image can be a virtual image. For example, when inferring the theoretical image, only the corresponding feature points in at least a portion of the target calibration board can be inferred to reduce computational load.
[0058] Provided the camera's imaging sharpness meets the requirements, feature points in at least a portion of the target calibration board will have corresponding feature points in both the calibration image and the standard image. Therefore, there is a correspondence between the feature points in the calibration image and the standard image. Traditional feature point detection methods or models can be used to detect feature points in the calibration image to determine these feature points. Feature points can be corner points, speckles, edge points, etc., and are not limited here. For example, if the target calibration board is a checkerboard calibration board, the feature points could be corner points. If the target calibration board is a dot matrix calibration board, the feature points could be speckles. After determining the feature points in the calibration image, the correspondence between the feature points in the calibration image and the feature points in the target calibration board can be established. Furthermore, based on the correspondence between the feature points in the target calibration board and the feature points in the standard image, the correspondence between the feature points in the calibration image and the feature points in the standard image can be determined. This is understandable, because the calibration image and the standard image both target the same area of the calibration board, so the feature points in the calibration image correspond one-to-one with the feature points in the standard image.
[0059] For example, a map file of the target calibration board can be predetermined, and the positions of feature points in the target calibration board can be determined based on this map file. This map file can record the number and geometric spacing information of each feature point. The feature point number can be determined based on the row and column to which the feature point belongs, thus distinguishing each feature point. Then, by matching the feature points in the map file with those in the calibration image, the correspondence between the feature points in the calibration image and those in the target calibration board can be determined.
[0060] After determining the correspondence between feature points in the calibration image and feature points in the standard image, the actual positional relationship between feature points in the calibration image and the theoretical positional relationship between their corresponding feature points in the standard image can be determined. If the camera posture when capturing the calibration image differs from the standard posture, the calibration image captured by the camera will differ from the standard image that the camera should capture at the standard posture. This difference will manifest as a discrepancy between the actual distribution of feature points in the calibration image and the theoretical distribution of their corresponding feature points in the standard image; that is, the actual positional relationship between feature points in the calibration image will differ from the theoretical positional relationship between feature points in the standard image. For example, if the field of view is rotated when the camera captures the calibration image, the position of the feature points in the calibration image will be rotated relative to the position of their corresponding feature points in the theoretical image, with the image center as the rotation center. The larger this rotation, the larger the deflection angle of the camera when capturing the calibration image. Another example is if the optical axis of the camera is not perpendicular to the target calibration plate when capturing the calibration image; the position of the feature points in the calibration image will differ from their corresponding position in the theoretical image due to optical axis tilt, resulting in differences in the horizontal and vertical coordinates. When there are no other attitude deviations between the camera attitude and the standard attitude, the greater the difference between the horizontal and vertical coordinates, the greater the tilt angle of the image plane of the camera relative to the target calibration plate when it takes the calibration image. That is, the greater the tilt attitude angle of the camera relative to the plane where the target calibration plate is located. In the world coordinate system, this means that the angle between the image plane of the camera and the plane where the target calibration plate is located is greater.
[0061] Therefore, based on the differences between the actual positional relationships and the theoretical positional relationships described above, the discrepancies between the calibration image and the standard image can be determined. Furthermore, the pose information relative to the standard pose, corresponding to the camera's position when shooting the target calibration board, can be deduced. This pose information corresponds to the position of the camera when shooting the calibration image.
[0062] For a line scan camera, each time it captures a different portion of at least a certain area of the target calibration plate and generates a corresponding column or row of pixels in the calibration image, until a complete calibration image is obtained. During this process, because the line scan camera moves relative to the stage and generates the calibration image in units of one column or row of pixels, the camera's pose information relative to the stage may change due to the relative movement when generating different rows or columns of pixels, thus distorting the image content in the calibration image. Therefore, for a line scan camera, its pose information when capturing calibration images within the 2D imaging platform can include pose information at multiple locations when capturing each row or column of pixels in the calibration image.
[0063] For area scan cameras, the entire or at least part of the area can be photographed directly to obtain a calibration image. There can be only one location for taking the calibration image, so the attitude information at that location can be determined.
[0064] Figure 2 A schematic diagram illustrating the use of a line scan camera to capture images of different sub-regions of a target calibration plate according to an embodiment of the present invention is shown.
[0065] like Figure 2 As shown, the target calibration plate can be a dot matrix calibration plate. The dots in this dot matrix calibration plate can be evenly distributed in rows and columns, and when the dot matrix calibration plate is placed on the stage, the dots are evenly arranged in rows and columns along the X-axis and Y-axis movement directions of the stage, respectively. During the process of using a line scan camera to capture images of different sub-regions of the target calibration plate, each scan band can be determined from these different sub-regions. For each scan band, when the field of view of the line scan camera can cover an entire row of pixels used to generate the calibration image, the stage can be moved along the Y-axis to allow the line scan camera to capture the entire scan band. Each scan band can be the same size, and there can be overlapping areas between adjacent scan bands to capture as many calibration images as possible for each scan band. The Y-axis range of different scan bands can be the same; for example, the Y-axis range of the dots in different sub-regions targeted by the first and second scan bands can be the same, while the X-axis coordinate ranges can be different. For example, after the second scan band is captured, the stage can continue to move along the X-axis to capture the next scan band to obtain a calibration image, until all scan bands for the target calibration plate have been captured.
[0066] For example, in addition to checkerboard or dot arrays, target calibration boards with high-precision reference patterns such as line arrays, striped gratings, or random speckle patterns can also be used.
[0067] In the above technical solution, a camera is used to capture images of at least a portion of the target calibration board within a two-dimensional imaging platform to obtain calibration images. Then, based on the actual positional relationships between feature points in the calibration images and the theoretical positional relationships between feature points in the standard images, the camera's attitude information when capturing the calibration images within the two-dimensional imaging platform is determined. The standard image represents the image obtained when the camera is in a standard posture within the two-dimensional imaging platform, capturing images of at least a portion of the target area. This approach combines the imaging characteristics of the camera within the two-dimensional imaging platform with the differences between the calibration images and the standard images captured on the calibration board to accurately determine the camera's attitude information when capturing images within the two-dimensional imaging platform, without requiring real-time assistance from additional equipment.
[0068] For example, the attitude information includes the tilt attitude angle relative to the plane where the target calibration board is located. Figure 3 A schematic flowchart illustrating the determination of pose information of a camera when capturing a calibration image within a two-dimensional imaging platform, according to an embodiment of the present invention, is shown. Figure 3 As shown, step S120 may include steps S310 to S340.
[0069] In step S310, the first target point pair is determined based on the target feature points corresponding to the positions in different target groups in the calibration image.
[0070] When the camera's tilt angle relative to the plane of the target calibration board is not 0 degrees, the camera's optical axis will not be perpendicular to the target calibration board, and the image plane of the calibration image will not be parallel to the target calibration board plane. Due to the projection shortening effect, the positional relationship between feature points in the calibration image will be different from that in the standard image. Therefore, the first target point pair can be determined as the basis for comparing positional relationships.
[0071] The target groups to which feature points belong can be pre-defined or defined in real-time based on the calibration image. The number of target feature points in different target groups can be the same. The corresponding feature points in the standard image for target feature points within the same target group can lie on the same straight line, and the straight lines containing the corresponding feature points in the standard image for each target group can be parallel. For example, for each target group, the target feature points within that group can belong to the same row or column, facilitating subsequent statistics and calculations. Alternatively, the corresponding feature points in the standard image for target feature points within the same target group can also lie on the same straight line, not in a row or column.
[0072] Understandably, when the target feature points in a target group are aligned with the corresponding feature points in the standard image, the corresponding feature points in the target calibration board are also aligned with the target feature points in the target group. Each target group can contain one or more target feature points.
[0073] For example, a target feature point can be selected from different target groups as the target point of the first target point pair to form the first target point pair, wherein each target feature point selected as the target point corresponds in position.
[0074] For example, the number of target feature points in each target group is multiple. Each target point in the first target point pair can be determined based on the mean coordinates of the target feature points in each target group to obtain the tilt attitude angle.
[0075] The mean coordinates of the target feature points in each target group reflect the overall distribution of the target feature points in that group within the calibration image. Based on the mean coordinates of the target feature points in each target group, the coordinates of each target point in the calibration image can be determined to obtain the first target point pair. That is, the points in the first target pair may not be target feature points of the target group itself, but rather points determined based on the overall distribution of target feature points in each target group within the calibration image. Using this first target point pair, the tilt attitude angle can be determined by combining information from more target feature points, resulting in a more reasonable tilt attitude angle.
[0076] In step S320, the actual distance between the two target points is determined based on the coordinates of the two target points in the first target point pair.
[0077] The actual distance between two target points can be calculated based on the difference in their x and y coordinates.
[0078] In step S330, the standard distance between the standard target points corresponding to the two target points in the standard image is determined.
[0079] First, based on the correspondence of feature points, determine the standard target points in the standard image that correspond to the two target points respectively. For example, based on the numbering of the feature points mentioned above, determine the standard target points in the standard image that have the same number as the two target points. Then, based on the difference in the x-coordinate and y-coordinate of the two standard target points, the actual distance between the two standard target points can be calculated.
[0080] In step S340, the tilt angle of the camera when capturing calibration images within the two-dimensional imaging platform is calculated based on the actual distance and the standard distance.
[0081] When the actual distance and the standard distance are equal, it indicates that the camera's tilt angle when capturing calibration images within the 2D imaging platform is 0 degrees, meaning there is no attitude deviation between the camera and the standard attitude relative to the plane of the target calibration board. When the actual distance and the standard distance are not equal, it indicates that the camera's tilt angle when capturing calibration images within the 2D imaging platform is 0 degrees, meaning there is an attitude deviation between the camera and the standard attitude relative to the plane of the target calibration board.
[0082] If the x-coordinates or y-coordinates of the two standard target points are the same, the tilt attitude angles of the camera around the motion axis coordinate system of the two-dimensional imaging platform when capturing calibration images can be directly calculated based on the ratio between the actual distance and the standard distance. If the x-coordinates and y-coordinates of the two standard target points are different, the tilt attitude angles of the camera around the motion axis coordinate system of the two-dimensional imaging platform can be determined by combining the differences in the x-coordinates and y-coordinates of the two standard target points.
[0083] For example, the theoretical distance between the corresponding feature points of two target points on the target calibration board can be derived from the actual distance using the theoretical camera coordinate system. Then, the actual distance between the corresponding feature points of two standard target points on the target calibration board can be derived from the standard distance using the theoretical camera coordinate system. The tilt attitude angle is determined based on the difference between the theoretical and actual distances.
[0084] The ratio between the actual distance and the standard distance is usually a positive number. The tilt attitude angle is the angle of the camera's attitude around the X-axis and / or Y-axis in the counterclockwise direction. Therefore, when the camera's tilt attitude angle is not 0 degrees, the calculated tilt attitude angle may also have two results: acute angle or obtuse angle.
[0085] For example, the first target point pair may include multiple point pairs, and the distances between multiple point pairs may be combined to more accurately determine the tilt attitude angle.
[0086] For example, the feature points in the target calibration board are uniformly distributed in rows and columns. When the tilt attitude angle is the roll angle, the target feature points corresponding to the positions in different target groups are the feature points corresponding to the rows in different target columns. When the tilt attitude angle is the pitch angle, the target feature points corresponding to the positions in different target groups are the feature points corresponding to the columns in different target rows.
[0087] When feature points in the target calibration plate are uniformly distributed in rows and columns, the difference in the x-coordinates of feature points belonging to the same column in different rows is the same, and the difference in the y-coordinates of feature points belonging to the same row in different columns is the same. Similarly, in the standard image, the difference in the x-coordinates of feature points belonging to the same column in different rows is the same, and the difference in the y-coordinates of feature points belonging to the same row in different columns is the same. If the camera's tilt angle is 0 degrees, the positional relationship between corresponding feature points in the calibration image should follow the same principle. If the camera's tilt angle is not 0 degrees, the positional relationship between corresponding feature points in the calibration image will differ from that in the standard image.
[0088] A roll angle that is not 0 degrees indicates an attitude deviation between the camera's Y-axis (the coordinate system of the camera's motion axis around the 2D imaging platform) and the standard attitude. A roll angle that is not 0 degrees will cause the difference in the abscissa of the feature points in the calibration image to be different from the difference in the abscissa of the corresponding feature points in the standard image, thus making the distance between the feature points in the calibration image different from the distance between the corresponding feature points in the standard image.
[0089] A pitch angle that is not 0 degrees indicates an attitude deviation between the X-axis of the camera's motion axis coordinate system around the 2D imaging platform and the standard attitude. A pitch angle that is not 0 degrees usually results in a difference in the ordinate of the feature points in the calibration image and the difference in the ordinate of the corresponding feature points in the standard image, and also results in a difference in the distance between the feature points in the calibration image and the distance between the corresponding feature points in the standard image.
[0090] The first target point pair is determined by identifying the feature points corresponding to the rows in different target columns. This eliminates the interference from pitch angle calculation. At this point, the roll angle can be determined based on the difference between the actual distance and the standard distance between the target points in the first target point pair.
[0091] By determining the first target point pair based on the feature points corresponding to the columns in different target rows, the interference of roll angle calculation can be eliminated. At this time, the pitch angle can be determined based on the difference between the actual distance and the standard distance of the target point in the first target point pair.
[0092] This method of determining the first target point pair can avoid potential interference between roll and pitch angles, and it also simplifies the determination of the first target point pair and reduces the computational complexity of roll and pitch angles.
[0093] For example, different target columns are adjacent columns, and different target rows are adjacent rows. Compared to non-adjacent rows or columns, the feature point distance between adjacent columns or rows is smaller, and they are less affected by possible image noise or image distortion, making it easier to determine the accurate tilt attitude angle.
[0094] Figure 4 A schematic diagram is shown illustrating the determination of the tilt attitude angle of a camera when capturing a calibration image within a two-dimensional imaging platform, according to an embodiment of the present invention.
[0095] like Figure 4As shown, under ideal conditions where the camera captures at least a portion of the target calibration board in a standard orientation, three adjacent feature points A1, A2, and A3 on the target calibration board are parallel to the camera's image plane. After imaging by the camera objective lens, their projection points are a1, a2, and a3, respectively. a1, a2, and a3 are the feature points in the standard image corresponding to A1, A2, and A3, respectively. a1, a2, and a3 are evenly spaced in the standard image and parallel to the X-axis of the motion axis coordinate system of the two-dimensional imaging platform. However, the target calibration board undergoes a small rotation α around the Y-axis in the camera coordinate system. This rotation manifests as a horizontal projection shortening effect in the calibration image. This small rotation α also causes a deviation between the actual orientation of the camera and the standard orientation in the motion axis coordinate system. For simplicity, this is referred to as the roll angle α below. If the feature points in the same row are located at positions A′1, A′2, and A′3 on the object side (target calibration board), and their light rays, after passing through the camera's objective lens, correspond to feature points a′1, a′2, and a′3 on the calibration image, then the total image-side distance of the feature points is shortened due to perspective effect, i.e., a′1a′3. <a1a3。
[0096] For example, assuming the objective lens magnification is M, based on the theoretical camera coordinate system, the theoretical distance of the feature points in the target calibration plate can be calculated according to the following formula 1:
[0097]
[0098] Where ΔX represents the projected length of the true distance A′1A′3 between feature points on the calibration plate tilted relative to the image plane on the X-axis of the motion axis coordinate system. That is, based on the theoretical camera coordinate system, the theoretical distance between the corresponding feature points of the two points on the target calibration plate is deduced from the actual distance of the feature points in the calibration image. a′1a′3 represents the true distance of a′1 and a′3 in the calibration image. A small rotation α will cause the theoretical distance of the feature points on the target calibration plate to differ from the true distance of the corresponding feature points on the target calibration plate.
[0099] The roll angle when the camera captures the calibration image can be determined based on the actual and theoretical distances of the feature points within the target calibration plate. The actual distance can be determined based on the standard distances between corresponding feature points in the standard image.
[0100] For example, after determining the theoretical distance ΔX of the feature point within the target calibration plate, the amount of the roll angle |α| can be determined according to the following formula 2:
[0101]
[0102] Where A′1A′3 represents the true distance between feature points within the target calibration board.
[0103] In the above technical solution, a first target point pair is determined based on the target feature points corresponding to the positions in different target groups in the calibration image. Then, the actual distance between the two target points is determined based on the coordinates of the two target points in the first target point pair. Next, the standard distance between the standard target points corresponding to the two target points in the standard image is determined. Finally, the tilt attitude angle of the camera when capturing the calibration image on the two-dimensional imaging platform is calculated based on the actual distance and the standard distance. This allows for the accurate determination of the tilt attitude angle by combining the influence of the tilt attitude angle on the distribution of feature points in the calibration image and the distances between feature points in the calibration image and the standard image.
[0104] For example, the first target point pair includes a first calibration point pair and a second calibration point pair. The first reference point pair corresponding to the first calibration point pair in the standard image and the second reference point pair corresponding to the second calibration point pair in the standard image are located on the same straight line, and the standard distance between the first reference point pair and the standard distance between the second reference point pair are the same. Figure 5 A schematic flowchart illustrating the calculation of the tilt attitude angle of a camera when capturing calibration images within a two-dimensional imaging platform, according to an embodiment of the present invention, is shown. Figure 5 As shown, step S340 may include steps S510 to S540.
[0105] In step S510, the relationship between the first distance and the second distance is determined, wherein the first distance is the actual distance between the first calibration point pair and the second distance is the actual distance between the second calibration point pair.
[0106] The first distance can be calculated based on the difference in the x-coordinates and y-coordinates of the first calibration point pair. The second distance can be calculated similarly.
[0107] In step S520, the relative positional relationship between the first calibration point pair and the second calibration point pair is determined.
[0108] For example, the relative positional relationship between the first calibration point pair and the second calibration point pair can be determined based on the relative positional relationship between the mean coordinates of the first calibration point pair and the mean coordinates of the second calibration point pair.
[0109] Because the first reference point pair corresponding to the first calibration point pair in the standard image and the second reference point pair corresponding to the second calibration point pair in the standard image are located on the same straight line, and the standard distance between the first reference point pair and the second reference point pair is the same, the positions of the first point pair and the second point pair are different. For example, the relative positional relationship between the first calibration point pair and the second calibration point pair can be determined based on the relative positional relationship between the reference points in the first calibration point pair and the reference points in the second calibration point pair, according to the mean coordinates. Here, the reference point can be the point with the maximum or minimum x-coordinate of each of the first and second calibration point pairs, or it can be the point with the maximum or minimum y-coordinate of each of the first and second calibration point pairs.
[0110] In step S530, the target range of tilt attitude angle is determined based on the size relationship and relative position relationship.
[0111] When the first distance is greater than the second distance and the first calibration point pair is offset to the left relative to the second calibration point pair, it can be determined that the target range of the tilt attitude angle of the camera around the Y-axis of the motion axis coordinate system of the two-dimensional shooting platform is an acute angle.
[0112] When the first distance is greater than the second distance and the first calibration point pair is offset to the right relative to the second calibration point pair, it can be determined that the target range of the tilt attitude angle of the camera around the Y-axis of the motion axis coordinate system of the two-dimensional shooting platform is an obtuse angle.
[0113] When the first distance is greater than the second distance and the first calibration point pair is lower than the second calibration point pair, it can be determined that the target range of the tilt attitude angle of the camera around the X-axis of the motion axis coordinate system of the two-dimensional shooting platform is an obtuse angle.
[0114] When the first distance is greater than the second distance and the first calibration point pair is slightly higher than the second calibration point pair, it can be determined that the target range of the tilt attitude angle of the camera around the X-axis of the motion axis coordinate system of the two-dimensional shooting platform is an acute angle.
[0115] Figure 6 A schematic diagram is shown illustrating the determination of a target range of tilt attitude angles according to an embodiment of the present invention.
[0116] like Figure 6As shown, a′1, a′2, and a′3 are the projection points of the feature points in the same row of the target calibration board on the imaging plane. If the roll angle α is an acute angle, the distances between a′1, a′2, and a′3 will show regular changes. Since a′1a′2 is on the left of a′2a′3, so a′1a′2 < a′2a′3. At this time, the rotation angle of the target calibration board relative to the camera around the Y-axis is an acute angle. If the roll angle α is an obtuse angle, the distances between a″1, a″2, and a″3 will show regular changes. Since a″1a″2 is on the left of a″2a″3, so a″1a″2 > a″2a″3. At this time, the counterclockwise rotation angle of the plane where the target calibration board is located relative to the camera around the Y-axis is an obtuse angle. Thus, the unique roll angle of the camera can be determined, that is, the tilt angle of the camera around the Y-axis of the motion axis coordinate system of the two-dimensional shooting platform. Based on similar reasons, the unique pitch angle of the camera can also be determined, that is, the tilt angle of the camera around the X-axis of the motion axis coordinate system of the two-dimensional shooting platform.
[0117] In step S540, according to the actual distance and the standard distance, determine the tilt angle within the target value range.
[0118] After determining the target value range, the unique tilt angle within the target value range can be calculated according to the actual distance and the standard distance in combination with the above embodiments.
[0119] In the above technical solution, determine the magnitude relationship between the first distance and the second distance, where the first distance is the actual distance between the first pair of calibration points, and the second distance is the actual distance between the second pair of calibration points. Then determine the relative position relationship between the first pair of calibration points and the second pair of calibration points. Then, according to the magnitude relationship and the relative position relationship, determine the target value range of the tilt angle. Finally, according to the actual distance and the standard distance, determine the tilt angle within the target value range. In this way, the unique tilt angle of the camera can be accurately determined in combination with the distance distribution law between the feature points in the calibration image.
[0120] Exemplarily, the attitude information includes the yaw angle. The yaw angle is the attitude deviation of the camera around the Z-axis of the motion axis coordinate system from the standard attitude. Figure 7 shows a schematic flowchart of determining the attitude information of the camera when taking a calibration image within a two-dimensional shooting platform according to an embodiment of the present invention. As Figure 7 shown, the above step S120 may include steps S710 to S720.
[0121] In step S710, fit the target straight line according to at least one group of reference feature points in the calibration image.
[0122] Each group of reference feature points used to fit the target straight line can be multiple.
[0123] Optionally, any set of reference feature points in the calibration image can be selected to fit the target line.
[0124] Optionally, any number of reference feature points in the calibration image can be selected for line fitting to obtain multiple target lines.
[0125] For example, the target line can be fitted using the least squares method based on the coordinates of the reference feature points.
[0126] For example, the coordinates of reference feature points can be input into a line fitting model to obtain a target line. For example, the reference feature points used to fit the target line can correspond to standard target points in a standard image that belong to the same row.
[0127] In step S720, the sway angle of the camera when capturing the calibration image on the two-dimensional imaging platform is determined based on the angle between the target line and the reference line. The reference line is the line where the standard target point corresponding to the reference feature point is located in the standard image.
[0128] Each target line has a corresponding reference line in the standard image. For each pair of corresponding target lines and reference lines, a baseline, such as the X-axis or Y-axis, can be determined first. The first angle between the target line and the baseline can be determined, and the second angle between the reference line and the baseline can be determined. Based on the angle difference between the first angle and the second angle, the angle between the pair of target lines and reference lines can be calculated.
[0129] When the camera slants at 0 degrees while capturing a calibration image on a 2D imaging platform, the target line and the reference line should be at the same angle. When the angle between the target line and the reference line is greater than 0 degrees, it indicates that the camera slants at 0 degrees while capturing the calibration image on the 2D imaging platform.
[0130] For example, when there is only one target line, the angle between the target line and the reference line can be used as the sway angle of the camera when capturing the calibration image on the two-dimensional imaging platform. For example, for an area scan camera, since it can directly capture at least a portion of the entire target calibration plate, if the sway angle of the camera when capturing the calibration image is not 0 degrees, the calibration image will rotate around the center of the calibration image relative to the standard image. Therefore, if the position of the reference feature point is reasonable (for example, one of the reference feature points is located at the center of the calibration image), the sway angle of the camera when capturing the calibration image on the two-dimensional imaging platform can be determined based on the angle between a target line and the reference line.
[0131] For example, when there are multiple target lines, the yaw angle of the camera when capturing calibration images on the 2D imaging platform can be determined based on the set of angles between each target line and each reference line. Determining the yaw angle based on the angles between a single pair of corresponding target lines and reference lines requires precise positioning of the target lines and reference feature points. Furthermore, because the principle of line scan cameras for capturing calibration images differs from that of area scan cameras, the yaw angle may differ for each part of the calibration image captured by a line scan camera. Therefore, the yaw angle of the camera when capturing calibration images on the 2D imaging platform can be comprehensively evaluated based on multiple pairs of corresponding target lines and reference lines.
[0132] For example, the reference feature points used to fit the target line can be in the same row on the target calibration plate. Thus, the reference line corresponding to these reference feature points in the standard image is parallel to the X-axis. The angle between the target line and the reference line can be determined based on the slope of the target line, facilitating the calculation of the sway angle.
[0133] In the above technical solution, a target straight line is fitted based on at least one set of reference feature points in the calibration image. The sway angle of the camera when capturing the calibration image on the two-dimensional imaging platform is determined based on the angle between the target straight line and the reference straight line. The reference straight line is the straight line containing the standard target point corresponding to the reference feature point in the standard image. In this way, the sway angle leading to the distribution pattern of feature points in the calibration image can be accurately calculated.
[0134] For example, the target line includes multiple first lines, the reference line includes multiple second lines, the first lines and the second lines correspond one-to-one, and the reference feature points used to fit the same first line have the corresponding standard feature points in the standard image belonging to the same row or column, and all the second lines are parallel. Figure 8 A schematic flowchart illustrating the determination of the yaw angle of a camera when capturing a calibration image within a two-dimensional imaging platform, according to an embodiment of the present invention, is shown. Figure 8 As shown, step S120 may include steps S810 to S820.
[0135] In step S810, a reference angle is determined between each pair of corresponding first and second lines.
[0136] When the feature points used to fit the first and second lines correspond one-to-one, it can be considered that there is a one-to-one correspondence between the first and second lines. Ideally, the reference angle between each pair of corresponding first and second lines should be 0 degrees. However, due to the camera's yaw angle, the reference angle between each pair of corresponding first and second lines may be greater than 0 degrees.
[0137] In step S820, the yaw angle of the camera when capturing calibration images within the two-dimensional imaging platform is determined based on all reference angles.
[0138] Based on all the reference angles, a sequence of reference angles representing the deflection angle can be determined. Since the reference feature points that fit the same first straight line correspond to the same standard feature points in the standard image, and all the second straight lines are parallel, this sequence of reference angles reflects the influence of the deflection angle on each set of reference feature points in the calibration plate image.
[0139] Taking a line scan camera as an example, when capturing calibration images, the line scan camera obtains the calibration images row by row or column by column. During this process, the line scan camera moves relative to the stage.
[0140] When the line scan camera captures calibration images pixel by pixel, it can move relative to the stage along the Y-axis of the motion axis coordinate system. Ideally, the first straight line fitted to each set of reference feature points should be parallel to the corresponding second straight line in the standard image. However, during this relative movement, the deflection angle of the line scan camera when capturing images of the corresponding feature points on the target calibration board for each set of reference feature points may not be 0 degrees. This deflection angle will cause the first straight line fitted to each set of reference feature points to not be parallel to the corresponding second straight line, i.e., the reference angle is not 0 degrees. In this case, the standard feature points corresponding to the reference feature points used to fit the same first straight line in the standard image can belong to the same row. Thus, based on the reference angle between each pair of corresponding first and second straight lines, the deflection angle of the line scan camera when capturing images of the corresponding feature points on the target calibration board for each row of reference feature points can be determined.
[0141] When the line scan camera captures calibration images pixel by pixel, it can move relative to the stage along the X-axis of the motion axis coordinate system. Ideally, the first straight line fitted to each set of reference feature points should be parallel to the corresponding second straight line in the standard image. However, during this relative movement, the deflection angle of the line scan camera when capturing images of the corresponding feature points on the target calibration plate for each set of reference feature points may not be 0 degrees. This deflection angle will cause the first straight line fitted to each set of reference feature points to not be parallel to the corresponding second straight line, i.e., the reference angle is not 0 degrees. In this case, the standard feature points corresponding to the reference feature points used to fit the same first straight line in the standard image can belong to the same column. Thus, based on the reference angle between each pair of corresponding first and second straight lines, the deflection angle of the line scan camera when capturing images of the corresponding feature points on the target calibration plate for each column of reference feature points can be determined.
[0142] Therefore, the sequence of reference angles can represent the deflection angle of the line scan camera when it takes pictures of the corresponding feature points on the target calibration plate for each set of reference feature points.
[0143] For example, the reference angles in the reference angle sequence correspond to the positions of the target feature points used to fit the first straight line. This reference angle sequence reflects the influence of the yaw angle of the camera when capturing the calibration image on the 2D imaging platform on the pixels at the target feature points used to fit the first straight line in the calibration image.
[0144] For example, the mean angle of all reference angles can be calculated, and then this mean angle can be subtracted from each reference angle in the above reference angle sequence to obtain an updated reference angle sequence. This can remove the overall error caused by the placement error of the target calibration plate. The mean angle can be an arithmetic mean, a weighted mean, a robust mean, etc.
[0145] Figure 9 A schematic diagram illustrating the determination of the deflection angle according to an embodiment of the present invention is shown.
[0146] like Figure 9 As shown, the calibration image can be obtained by capturing pixels row by row with a line-scanning camera. The straight lines containing the feature points of each row in the target calibration board are parallel to the X-axis of the camera coordinate system; therefore, the corresponding second straight lines in the standard image are also parallel to the X-axis. For the feature point sequence {a} of the feature points in the i-th row of the calibration image... i,1 a i,2 ,…,a i,n Using the coordinates x and y of each feature point, the equation of the i-th first line can be fitted using the least squares method: y = k i x+b. The reference angle between the first and second lines can be the angle between each of the first lines and the X-axis, that is, the tilt angle between each of the first lines and the X-axis.
[0147] For example, the included angle can be calculated using the following formula 3 based on the slope of each first line:
[0148] θ i =arctan(k i ) Formula 3
[0149] Where, θ i k represents the angle between the first straight line fitted to the feature point sequence of the i-th row and the X-axis. i Let θ represent the slope of the first straight line corresponding to the feature point sequence in the i-th row. This is understandable. i It can also represent the deflection angle when the line scan camera captures the feature points in the i-th row within the target calibration plate area of the calibration image.
[0150] For example, the tilt angle of each row feature point within the entire scan strip can be calculated to obtain the corresponding tilt angle sequence {θ1, θ2, ..., θ}.i} and calculate the mean. This mean reflects the overall tilt of the calibration plate. This is achieved by adjusting the tilt angles corresponding to the feature points in each row using the mean. This eliminates the influence of overall placement error of the calibration plate, resulting in the final tilt angle sequence representing the deflection angle.
[0151] In the above technical solution, a reference angle is determined between each pair of corresponding first and second straight lines. Based on the average of all reference angles, the sway angle of the camera when capturing calibration images within the two-dimensional imaging platform is determined. This integrates the camera's deflection angle reflected between each pair of corresponding first and second straight lines, thus more accurately determining the sway angle of the camera when capturing calibration images within the two-dimensional imaging platform.
[0152] According to another aspect of the present invention, an image correction method is also provided. Figure 10 A schematic flowchart of an image correction method according to an embodiment of the present invention is shown. Figure 10 As shown, the camera attitude calibration method may include steps S1010 to S1020.
[0153] In step S1010, a camera is used to capture images of at least a portion of the target object within a two-dimensional imaging platform to obtain a target image.
[0154] For example, the field of view of the camera when capturing the target image is the same as the field of view when capturing the calibration board image in the camera attitude calibration method described above.
[0155] For example, at least a portion of a target object may include a single sub-region. This allows a camera to capture a calibrated image of at least a portion of the target object.
[0156] For example, at least a portion of the target object may include multiple distinct sub-regions. This allows for the capture of multiple calibrated images of the different sub-regions of the target object using a camera.
[0157] In step S1020, the target image is corrected according to the reference image correction amount to obtain the corrected target image, wherein the reference image correction amount is determined based on the camera attitude information determined by the camera attitude calibration method described above.
[0158] The camera attitude information determined by the above camera attitude calibration method corresponds to the position of the camera when capturing calibration images on a two-dimensional imaging platform.
[0159] The correspondence between pose information and image correction amounts can be predetermined, and the mapping relationship between the camera's position in the motion axis coordinate system of the 2D imaging platform and the corresponding pose information can be determined based on the camera pose calibration method described above. Then, the pose information of the camera when capturing the calibration image in the 2D imaging platform is determined based on the camera's position when capturing the target image and this mapping relationship. The reference image correction amount can then be determined based on this correspondence. Finally, the target image can be corrected based on the reference image correction amount.
[0160] For example, if there is only one calibration image in the camera pose calibration method described above, the image correction amount can be determined based on the feature point differences between the calibration image and the corresponding standard image, serving as the reference image correction amount for the camera to take pictures on the 2D imaging platform. Then, the target image can be corrected based on the reference image correction amount to obtain the corrected target image.
[0161] For example, if the calibration images in the camera pose calibration method described above include calibration images for different sub-regions, then the pose information of the camera when capturing each calibration image can be determined based on the camera pose calibration method described above. Then, based on the pose information and real-time position of the camera when capturing each calibration image, a mapping relationship between the camera's position in the motion axis coordinate system of the 2D imaging platform and the corresponding pose information can be fitted. Then, based on the position of the camera when capturing the target image and this mapping relationship, the pose information of the camera when capturing the calibration image in the 2D imaging platform can be determined. Then, a reference image correction amount can be determined based on this correspondence. Afterwards, the target image can be corrected based on the reference image correction amount.
[0162] In the above technical solution, a camera is used to capture images of at least a portion of the target object within a two-dimensional imaging platform to obtain a target image. Then, the target image is corrected based on a reference image correction amount to obtain a corrected target image. The reference image correction amount is determined based on the camera's attitude information obtained through the camera attitude calibration method described above. This allows for the determination of relatively accurate camera attitude information using the camera's position when capturing the target image, enabling the determination of the corresponding image correction amount and accurate correction of the target image to reduce image errors caused by the camera's attitude information.
[0163] For example, the attitude information includes the tilt attitude angle relative to the plane where the target calibration board is located. Figure 11 A schematic flowchart illustrating the determination of a reference image correction amount according to an embodiment of the present invention is shown. Figure 11 As shown, the above camera attitude calibration method may further include steps S1110 to S1140.
[0164] In step S1110, for each target feature point in the calibration image, the first coordinate difference between the actual mean coordinates of the target feature points in the target group and the actual mean coordinates of the target feature points in the reference group is determined. The positions of the target feature points in different target groups correspond one-to-one, and the reference group is a target group outside the target group in different target groups.
[0165] The number of target feature points in each target group is the same and their positions correspond.
[0166] For example, the target feature points of each target group can belong to the same row or column. The reference group can be the first row or the first column.
[0167] The first coordinate difference represents the positional interval between the target feature points of other target groups and the target feature points of the reference group.
[0168] In step S1120, a second coordinate difference is determined between the standard mean coordinates of the target feature points in the target group and the standard mean coordinates of the target feature points in the reference group, wherein the standard mean coordinates are the mean coordinates of the standard target points corresponding to the target feature points in the target group in the standard image.
[0169] The second coordinate difference represents the positional interval between the standard target points of other target groups and the standard target points of the reference group.
[0170] In step S1130, the overall offset of the target group is determined based on the first deviation between the first coordinate difference and the second coordinate difference.
[0171] The larger the first deviation, the larger the overall offset of the target group.
[0172] For example, the first deviation can be used as the overall offset corresponding to the target group.
[0173] For example, the corresponding weighting coefficient can be determined based on the interval between the target group and the reference group corresponding to the first deviation. The product of the corresponding weighting coefficient and the first deviation is used as the overall offset corresponding to that target group. The smaller the interval between the target group and the reference group corresponding to the first deviation, the larger the corresponding weighting coefficient can be.
[0174] The overall offset represents the total offset caused by calibration and placement errors.
[0175] In step S1140, the reference image correction amount is determined based on the second deviation between the overall offset corresponding to each target group and the mean of the overall offsets corresponding to all target groups.
[0176] The second deviation for each target group reflects the amount of correction required for the feature points of that target group. A reference image correction amount for the entire calibration image can be determined based on the second deviation for each target group and the position of the target feature points for each group. This reference image correction amount is used to correct image errors caused by the camera's tilt angle, which corresponds to the camera's position relative to the target calibration board in the 2D imaging platform when capturing the calibration image. Based on the correspondence between the tilt angle and the camera's position in the 2D imaging platform when capturing the calibration image, and the reference image correction amount determined for the calibration board image, a reference image correction amount can be determined to correct image errors in the target image caused by the camera's tilt angle.
[0177] In the above technical solution, for each target feature point in the calibration image, a first coordinate difference is determined between the actual mean coordinates of the target feature points in that target group and the actual mean coordinates of the target feature points in the reference group. The positions of the target feature points in different target groups correspond one-to-one. The reference group is a target group outside of the target group. A second coordinate difference is determined between the standard mean coordinates of the target feature points in that target group and the standard mean coordinates of the target feature points in the reference group. The standard mean coordinates are the mean coordinates of the standard target points corresponding to the target feature points in the target group in the standard image. Based on the first deviation between the first and second coordinate differences, the overall offset corresponding to that target group is determined. Then, based on the second deviation between the overall offset corresponding to each target group and the mean of the overall offsets corresponding to all target groups, the reference image correction amount is determined. This allows for the accurate determination of the reference image correction amount used to correct image errors caused by the camera's tilt attitude angle, taking into account the feature point distribution errors present in the calibration image.
[0178] For example, the attitude information includes a yaw angle. Determining the reference image correction amount includes the following steps S1150: determining the target rotation angle of the target image as the reference image correction amount based on the yaw angle.
[0179] Based on the angle of the yaw, the opposite rotation angle can be determined as the target rotation angle.
[0180] For example, the yaw angle can be a unique angle value, and the opposite rotation angle can be determined as the target rotation angle as a reference image correction amount for the entire area of the target image.
[0181] For example, the tilt angle sequence representing the deflection angle in the above embodiments. For example, each tilt angle represents the deflection angle of the target position when the line scan camera captures the reference feature point used to fit the first straight line in the target calibration plate. For the target position corresponding to each tilt angle, the corresponding reverse tilt angle can be determined as the target rotation degree of the line scan camera at that target position, and it is used as part of the reference image correction amount.
[0182] Furthermore, when subsequently correcting the target image using the reference correction amount, the position of each row or column of pixels in the target image captured by the line scan camera and the target rotation angle corresponding to the target position can be used to correct each row or column of pixels in the target image, so as to accurately reduce the influence of the camera's deflection angle on the target image.
[0183] In the above technical solution, the target rotation angle of the target image is determined based on the yaw angle and used as a reference image correction amount. This allows for the determination of the reference image correction amount for the camera's yaw angle, which is beneficial for subsequent correction of image errors caused by the camera's yaw angle in the target image.
[0184] For example, the attitude information may include the tilt attitude angle and yaw angle relative to the plane where the target calibration plate is located. The image correction amount for the tilt attitude angle can be determined according to steps S1110 to S1140 above, and the image correction amount for the yaw angle can be determined according to step S1150 above. Then, the target image correction amount for the target image can be determined by combining these two image correction amounts.
[0185] Figure 12 A schematic flowchart of an image correction method according to yet another embodiment of the present invention is shown. Figure 12 As shown, step S1010 may include step S1210, and step S1020 may include steps S1220 to S1240.
[0186] In step S1210, the camera is used to take pictures of different sub-regions of the target object at different positions within the two-dimensional imaging platform to obtain their respective target images.
[0187] For example, different sub-regions can have the same size.
[0188] For example, the field of view used by the camera to capture the target image and the field of view used to capture the calibration image can be the same.
[0189] In step S1220, based on the reference image correction amount and the position of the camera when capturing calibration images within the two-dimensional imaging platform, the correspondence between the camera's shooting position within the two-dimensional imaging platform and the target image correction amount is determined. The calibration images include multiple images obtained by capturing images of different sub-regions of the target calibration board from different positions within the two-dimensional imaging platform.
[0190] Since there is a correspondence between the reference image correction amount and the camera's attitude information when capturing calibration images on the 2D imaging platform, and the camera's attitude information when capturing calibration images on the 2D imaging platform is also corresponding to the camera's position when capturing calibration images on the 2D imaging platform, the reference image correction amount and the camera's position when capturing calibration images on the 2D imaging platform are corresponding.
[0191] For example, interpolation or surface fitting can be performed based on the reference image correction amount and the camera's position when capturing the calibration image within the 2D imaging platform to determine the correspondence between the reference image correction amount and the camera's position when capturing the calibration image within the 2D imaging platform. For instance, a surface model representing the correspondence between the reference image correction amount and the camera's position when capturing the calibration image within the 2D imaging platform can be fitted.
[0192] In step S1230, the target image correction amount is determined based on the correspondence and the position of the camera when capturing the target image within the two-dimensional imaging platform.
[0193] The position of the camera when capturing the target image within the 2D imaging platform can be retrieved from the correspondence, and the target image correction amount corresponding to the retrieved position can be used as the target image correction amount of the target image.
[0194] In step S1240, the target image is corrected using the target image correction amount to obtain the corrected target image.
[0195] The pixel coordinates of the target image can be corrected using the target image correction amount to obtain the corrected target image.
[0196] In the above technical solution, a camera is used at different positions within a two-dimensional imaging platform to capture images of different sub-regions of the target object, obtaining individual target images. Then, based on the correction amount of the reference image and the camera's position when capturing calibration images within the two-dimensional imaging platform, the correspondence between the camera's position within the platform and the target image correction amount is determined. The calibration images include multiple images obtained by capturing images of different sub-regions of the target calibration plate at different positions within the two-dimensional imaging platform. Next, based on the correspondence and the camera's position when capturing the target image within the two-dimensional imaging platform, the target image correction amount is determined. Finally, the target image is corrected using the target image correction amount to obtain the corrected target image. This accurately removes image errors caused by the camera's pose information when capturing target images at any position within the two-dimensional imaging platform, resulting in an accurate target image.
[0197] Figure 13 A schematic block diagram of a camera attitude calibration device according to an embodiment of the present invention is shown. Figure 13 As shown, the camera attitude calibration device includes a shooting module 1310 and an attitude calculation module 1320.
[0198] The imaging module is used to capture images of at least a portion of the target calibration board within a two-dimensional imaging platform using a camera, in order to obtain calibration images.
[0199] The attitude calculation module is used to determine the attitude information of the camera when capturing the calibration image in the two-dimensional imaging platform based on the actual positional relationship between feature points in the calibration image and the theoretical positional relationship between feature points in the standard image. The standard image refers to the image obtained by the camera capturing at least a part of the area in the two-dimensional imaging platform when the camera is in a standard attitude.
[0200] Figure 14 A schematic block diagram of an image correction apparatus according to an embodiment of the present invention is shown. Figure 14 As shown, the camera attitude calibration device includes an image acquisition module 1410 and an image correction module 1420.
[0201] The image acquisition module 1410 is used to capture images of at least a portion of a target object within a two-dimensional imaging platform using a camera, so as to obtain a target image;
[0202] The image correction module 1420 is used to correct the target image according to the correction amount of the reference image to obtain the corrected target image, wherein the correction amount of the reference image is determined based on the camera attitude information determined by the camera attitude calibration method described above.
[0203] According to another aspect of the present invention, an electronic device is also provided. Figure 15 A schematic block diagram of an electronic device according to an embodiment of the present invention is shown. Figure 15 As shown, the electronic device includes a processor and a memory, wherein the memory stores computer program instructions, which are executed by the processor to perform the camera pose calibration method and / or image correction method as described above.
[0204] Furthermore, according to another aspect of the present invention, a storage medium is provided, on which program instructions are stored. When the program instructions are executed by a computer or processor, the computer or processor performs corresponding steps of the camera pose calibration method and / or image correction method described in the embodiments of the present invention, and is used to implement corresponding modules in the camera pose calibration apparatus and / or image correction apparatus described in the embodiments of the present invention. The storage medium may, for example, include a storage component of a tablet computer, a hard disk of a personal computer, a read-only memory (ROM), an erasable programmable read-only memory (EPROM), a portable compact disc read-only memory (CD-ROM), a USB memory, or any combination of the above storage media. A computer-readable storage medium may be any combination of one or more computer-readable storage media.
[0205] According to another aspect of the present invention, a computer program product is also provided, including computer program instructions, which, when executed, are used to perform the above-described camera pose calibration method and / or image correction method.
[0206] Those skilled in the art can understand the specific implementation and beneficial effects of the above-described camera attitude calibration method and / or image correction method by reading the detailed description above. For the sake of brevity, they will not be described in detail here.
[0207] Although exemplary embodiments have been described herein with reference to the accompanying drawings, it should be understood that the above exemplary embodiments are merely illustrative and are not intended to limit the scope of the invention. Various changes and modifications can be made therein by those skilled in the art without departing from the scope and spirit of the invention. All such changes and modifications are intended to be included within the scope of the invention as claimed in the appended claims.
[0208] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this invention.
[0209] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another device, or some features may be ignored or not executed.
[0210] Numerous specific details are set forth in the specification provided herein. However, it will be understood that embodiments of the invention may be practiced without these specific details. In some instances, well-known methods, structures, and techniques have not been shown in detail so as not to obscure the understanding of this specification.
[0211] Similarly, it should be understood that, in order to streamline the invention and aid in understanding one or more of the various aspects of the invention, features of the invention are sometimes grouped together in a single embodiment, figure, or description thereof in the description of exemplary embodiments of the invention. However, this approach should not be construed as reflecting an intention that the claimed invention requires more features than are expressly recited in each claim. Rather, as reflected in the corresponding claims, its inventive point lies in solving the corresponding technical problem with fewer features than all of those in a single disclosed embodiment. Therefore, the claims following the detailed description are hereby expressly incorporated into that detailed description, wherein each claim itself is a separate embodiment of the invention.
[0212] Those skilled in the art will understand that, apart from the mutual exclusion of features, all features disclosed in this specification (including the accompanying claims, abstract, and drawings) and all processes or units of any method or apparatus so disclosed can be combined in any combination. Unless otherwise expressly stated, each feature disclosed in this specification (including the accompanying claims, abstract, and drawings) may be replaced by an alternative feature that serves the same, equivalent, or similar purpose.
[0213] Furthermore, those skilled in the art will understand that although some embodiments herein include certain features included in other embodiments but not others, combinations of features from different embodiments are intended to be within the scope of the invention and form different embodiments. For example, in the claims, any of the claimed embodiments can be used in any combination.
[0214] The various component embodiments of the present invention can be implemented in hardware, or as software modules running on one or more processors, or a combination thereof. Those skilled in the art will understand that microprocessors or digital signal processors (DSPs) can be used in practice to implement some or all of the functions of some modules in a camera attitude calibration and / or image correction apparatus according to embodiments of the present invention. The present invention can also be implemented as an apparatus program (e.g., a computer program and computer program product) for performing some or all of the methods described herein. Such programs implementing the present invention can be stored on a computer-readable medium or can be in the form of one or more signals. Such signals can be downloaded from an Internet website, provided on a carrier signal, or provided in any other form.
[0215] It should be noted that the above embodiments are illustrative of the invention and not restrictive, and that those skilled in the art can devise alternative embodiments without departing from the scope of the appended claims. In the claims, any reference signs placed between parentheses should not be construed as limiting the claims. The word "comprising" does not exclude the presence of elements or steps not listed in the claims. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several different elements and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means may be embodied by the same item of hardware. The use of the words first, second, and third, etc., does not indicate any order. These words can be interpreted as names.
[0216] The above are merely specific embodiments or descriptions of the present invention, and the scope of protection of the present invention is not limited thereto. Any variations or substitutions that can be easily conceived by those skilled in the art within the scope of the technology disclosed in the present invention should be included within the scope of protection of the present invention. The scope of protection of the present invention should be determined by the scope of the claims.
Claims
1. A camera attitude calibration method, characterized in that, The method includes: A camera is used to capture images of at least a portion of the target calibration board within a two-dimensional imaging platform to obtain calibration images; Based on the actual positional relationship between feature points in the calibration image and the theoretical positional relationship between feature points in the standard image, the pose information of the camera when capturing the calibration image in the two-dimensional imaging platform is determined, wherein the standard image represents the image obtained by the camera capturing at least a portion of the region in a standard pose in the two-dimensional imaging platform.
2. The method according to claim 1, characterized in that, The attitude information includes the tilt attitude angle relative to the plane where the target calibration board is located; The step of determining the pose information of the camera when capturing the calibration image on the two-dimensional imaging platform based on the actual positional relationship between feature points in the calibration image and the theoretical positional relationship between feature points in the standard image includes: Based on the target feature points corresponding to the positions in different target groups in the calibration image, determine the first target point pair; Based on the coordinates of the two target points in the first target point pair, determine the actual distance between the two target points; Determine the standard distance between the standard target points in the standard image that correspond to the two target points respectively; Based on the actual distance and the standard distance, calculate the tilt angle of the camera when capturing the calibration image within the two-dimensional imaging platform.
3. The method according to claim 2, characterized in that, The first target point pair includes a first calibration point pair and a second calibration point pair. The first reference point pair corresponding to the first calibration point pair in the standard image and the second reference point pair corresponding to the second calibration point pair in the standard image are located on the same straight line, and the standard distance between the first reference point pair and the standard distance between the second reference point pair are the same. The step of calculating the tilt angle of the camera when capturing the calibration image within the two-dimensional imaging platform based on the actual distance and the standard distance includes: Determine the magnitude relationship between the first distance and the second distance, wherein the first distance is the actual distance between the first pair of calibration points, and the second distance is the actual distance between the second pair of calibration points; Determine the relative positional relationship between the first calibration point pair and the second calibration point pair; Based on the magnitude relationship and the relative position relationship, determine the target range of the tilt attitude angle; The tilt attitude angle is determined within the target value range based on the actual distance and the standard distance.
4. The method according to claim 2, characterized in that, The number of target feature points in each target group is multiple; The step of determining the first target point pair based on the target feature points corresponding to the positions in different target groups in the calibrated image includes: Based on the mean coordinates of the target feature points in each target group, each target point in the first target point pair is determined to obtain the first target point pair.
5. The method according to claim 2, characterized in that, The feature points in the target calibration plate are evenly distributed in rows and columns; When the tilt attitude angle is the roll angle, the target feature points corresponding to the positions in the different target groups are the feature points corresponding to the rows in the different target columns; When the tilt attitude angle is a pitch angle, the target feature points in different target groups that correspond to the positions are the feature points in different target rows that correspond to the columns they belong to.
6. The method according to claim 5, characterized in that, The different target columns are adjacent columns, and the different target rows are adjacent rows.
7. The method according to claim 1, characterized in that, The attitude information includes the yaw angle; The step of determining the pose information of the camera when capturing the calibration image on the two-dimensional imaging platform based on the actual positional relationship between feature points in the calibration image and the theoretical positional relationship between feature points in the standard image includes: Fit a target straight line based on at least one set of reference feature points in the calibration image; The sway angle of the camera when capturing the calibration image on the two-dimensional imaging platform is determined based on the angle between the target line and the reference line, wherein the reference line is the line where the standard target point corresponding to the reference feature point is located in the standard image.
8. The method according to claim 7, characterized in that, The target line includes multiple first lines, and the reference line includes multiple second lines. The first lines and the second lines correspond one-to-one. The reference feature points used to fit the same first line correspond to the standard feature points in the standard image in the same row or column, and all the second lines are parallel. Determining the yaw angle of the camera when capturing the calibration image within the two-dimensional imaging platform based on the angle between the target line and the reference line includes: Determine the reference angle between each pair of corresponding first and second lines; Based on all reference angles, determine the yaw angle of the camera when capturing the calibration image within the two-dimensional imaging platform.
9. An image correction method, characterized in that, include: Using a camera, at least a portion of the target object is photographed within a two-dimensional imaging platform to obtain a target image; The target image is corrected according to the reference image correction amount to obtain the corrected target image, wherein the reference image correction amount is determined based on the camera attitude information determined by the camera attitude calibration method as described in any one of claims 1-8.
10. The image correction method according to claim 9, characterized in that, The attitude information includes the tilt attitude angle relative to the plane where the target calibration board is located; Determining the reference image correction amount includes the following steps: For each target group in the calibration image, the target feature points Determine the first coordinate difference between the actual mean coordinates of the target feature points in the target group and the actual mean coordinates of the target feature points in the reference group, wherein the positions of the target feature points in different target groups correspond one-to-one, and the reference group is a target group other than the target group in the different target groups; Determine a second coordinate difference between the standard mean coordinates of the target feature points in the target group and the standard mean coordinates of the target feature points in the reference group, wherein the standard mean coordinates are the mean coordinates of the standard target points corresponding to the target feature points in the target group in the standard image; Based on the first deviation between the first coordinate difference and the second coordinate difference, determine the overall offset corresponding to the target group; The reference image correction amount is determined based on the second deviation between the overall offset corresponding to each target group and the mean of the overall offsets corresponding to all target groups.
11. The image correction method according to claim 9, characterized in that, The attitude information includes the yaw angle; Determining the reference image correction amount includes the following steps: Based on the angle of the yaw angle, the target rotation angle of the target image is determined as the correction amount for the reference image.
12. The image correction method according to claim 9, characterized in that, The step of using a camera within a two-dimensional imaging platform to capture images of at least a portion of a target object to obtain a target image includes: By using a camera at different positions within a two-dimensional imaging platform to capture images of different sub-regions of the target object, individual target images can be obtained. The step of correcting the target image based on the reference image correction amount to obtain the corrected target image includes: Based on the reference image correction amount and the position of the camera when capturing the calibration image within the two-dimensional imaging platform, the correspondence between the camera's shooting position within the two-dimensional imaging platform and the target image correction amount is determined. The calibration image includes multiple images obtained by capturing different sub-regions of the target calibration board from different positions within the two-dimensional imaging platform. Based on the correspondence and the position of the camera when capturing the target image within the two-dimensional imaging platform, the target image correction amount is determined. The target image is corrected using the target image correction amount to obtain the corrected target image.
13. A camera attitude calibration device, characterized in that, include: The imaging module is used to capture images of at least a portion of the target calibration board within a two-dimensional imaging platform using a camera, so as to obtain calibration images; The attitude calculation module is used to determine the attitude information of the camera when it captures the calibration image in the two-dimensional imaging platform based on the actual positional relationship between feature points in the calibration image and the theoretical positional relationship between feature points in the standard image. The standard image represents the image obtained by the camera capturing at least a portion of the region in the two-dimensional imaging platform when it is in a standard attitude.
14. An image correction device, characterized in that, include: The image acquisition module is used to capture images of at least a portion of a target object within a two-dimensional imaging platform using a camera, in order to obtain a target image; An image correction module is used to correct the target image according to a reference image correction amount to obtain a corrected target image, wherein the reference image correction amount is determined based on the camera attitude information determined by the camera attitude calibration method as described in any one of claims 1-8.
15. An electronic device comprising a processor and a memory, characterized in that, The memory stores computer program instructions, which, when executed by the processor, are used to perform the camera pose calibration method as described in any one of claims 1 to 8 and / or the image correction method as described in any one of claims 9 to 12.
16. A storage medium on which program instructions are stored, characterized in that, The program instructions, when executed, are used to perform the camera attitude calibration method as described in any one of claims 1 to 8 and / or the image correction method as described in any one of claims 9 to 12.
17. A computer program product comprising computer program instructions, characterized in that, The computer program instructions, when executed, are used to perform the camera attitude calibration method as described in any one of claims 1 to 8 and / or the image correction method as described in any one of claims 9 to 12.