Image correction evaluation methods, apparatus and equipment

By calculating the straightness, rectangularity, and spatial uniformity indices of the image after distortion correction, a comprehensive evaluation score is generated, which solves the problem that existing technologies cannot fully evaluate the fidelity of image geometric features and achieves a more accurate image correction quality assessment.

CN121504779BActive Publication Date: 2026-04-03SHENZHEN ZMOTION TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2026-01-13
Publication Date
2026-04-03

AI Technical Summary

Technical Problem

Existing technologies cannot fully and directly reflect the fidelity of key geometric features in images after distortion correction, resulting in a disconnect between evaluation results and the accuracy requirements of actual visual applications.

Method used

By acquiring the calibration board image after distortion correction, corner coordinates are extracted, and straightness, rectangularity, and spatial uniformity indices are calculated to generate a comprehensive evaluation score, including straightness, rectangularity, and spatial uniformity indices.

Benefits of technology

It enables comprehensive and accurate evaluation of distortion-corrected images, diagnoses and quantifies various distortion types, and improves the efficiency and reliability of calibration work.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121504779B_ABST
    Figure CN121504779B_ABST
Patent Text Reader

Abstract

This application discloses an image correction evaluation method, apparatus, and device, relating to the field of visual correction technology. The method includes: acquiring a calibration board image after distortion correction based on camera calibration parameters, and extracting corner coordinates from the corrected image; calculating straightness, rectangularity, and spatial uniformity indices of the corrected image based on the corner coordinates; and generating a comprehensive evaluation score for the image correction of the camera calibration parameters based on the straightness, rectangularity, and spatial uniformity indices. This application improves the accuracy and efficiency of calibration and debugging through multi-dimensional index calculation and comprehensive evaluation, avoiding the correction distortion of traditional single-index methods.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of visual correction technology, and in particular to an image correction evaluation method, apparatus and equipment. Background Technology

[0002] In precision measurement, positioning, and inspection applications based on 2D vision, camera lens distortion and installation deviations can introduce systematic errors, thus requiring camera calibration and image correction before application. To ensure the accuracy of subsequent vision tasks, accurate and reliable evaluation of the quality of the corrected image is a critical and fundamental technical requirement in this field.

[0003] Currently, the industry generally uses checkerboard calibration boards for camera calibration and relies on the "reprojection error" provided by the calibration tool as the sole or core indicator for evaluating the quality of calibration and correction. This indicator is obtained by calculating the pixel position error of the backprojection of the corner points of the calibration board to obtain an overall average value.

[0004] However, as a holistic statistic for optimizing corner pixel positions, reprojection error cannot fully and directly reflect the fidelity of key geometric features of the corrected image. It is difficult to detect residual distortion at image edges or in local areas, and it cannot effectively assess straightness, angle preservation, and scale consistency in image space that are directly related to geometric measurement accuracy. This results in a serious disconnect between the evaluation results and the accuracy requirements of actual visual applications (such as size and angle measurements).

[0005] The above content is only used to help understand the technical solution of this application and does not represent an admission that the above content is prior art. Summary of the Invention

[0006] The main objective of this application is to provide an image correction evaluation method, apparatus, and device, which aims to solve the technical problem of how to effectively evaluate the fidelity of geometric features of an image after distortion correction.

[0007] To achieve the above objectives, this application proposes an image correction evaluation method, the method comprising:

[0008] Acquire the calibration board image after distortion correction based on camera calibration parameters, and extract the corner coordinates in the corrected image;

[0009] The straightness index, rectangularity index, and spatial uniformity index of the corrected image are calculated based on the corner coordinates.

[0010] Based on the straightness index, rectangularity index, and spatial uniformity index, a comprehensive evaluation score for image correction of the camera calibration parameters is generated.

[0011] In one embodiment, the step of calculating the straightness index, rectangularity index, and spatial uniformity index of the corrected image based on the corner coordinates includes calculating the straightness index:

[0012] Based on the corner coordinates in the calibration board image, corners in the same row are grouped into the same row corner set, and corners in the same column are grouped into the same column corner set.

[0013] For each set of row corner points, fit a horizontal straight line using the least squares method, and calculate the vertical distance from each corner point in the set of row corner points to the fitted horizontal straight line, which is used as the row direction straightness deviation of the corner point;

[0014] For each set of column corner points, a vertical line is fitted using the least squares method, and the horizontal distance from each corner point in the set of column corner points to the fitted vertical line is calculated as the column direction straightness deviation of the corner point.

[0015] For all corner points, the row direction straightness deviation and the column direction straightness deviation are respectively formed into a row direction deviation set and a column direction deviation set;

[0016] Based on the set of row direction deviations and the set of column direction deviations, a straightness index is calculated, wherein the straightness index includes at least one of the following: average row straightness, average column straightness, overall average straightness, maximum straightness, and directional uniformity.

[0017] In one embodiment, the rectangularity index of the corrected image includes one or more of the following: the angular deviation between the interior angle and the right angle of each calibration grid, the ratio of the opposite side length of each calibration grid, and the diagonal geometric features of each calibration grid, and their weighted fusion results.

[0018] In one embodiment, the step of calculating the straightness index, rectangularity index, and spatial uniformity index of the corrected image based on the corner coordinates further includes calculating the rectangularity index based on the angle deviation:

[0019] Obtain the coordinates of the four corner points of the current calibration board grid, wherein the four corner points are arranged in clockwise or counterclockwise order;

[0020] Based on the coordinates of the four corner points, the angle between the two vectors formed by adjacent corner points is calculated in turn to obtain the four interior angles of the current calibration board grid.

[0021] The four interior angles are compared with the reference angles respectively, and the deviation values ​​of the four angles are calculated.

[0022] The four angular deviation values ​​are aggregated and calculated to obtain the comprehensive angular deviation of the current calibration plate grid.

[0023] Based on the comprehensive angle deviation, the angle rectangularity index of the current calibration board grid is calculated, wherein the angle rectangularity index is negatively correlated with the comprehensive angle deviation.

[0024] In one embodiment, the step of calculating the straightness index, rectangularity index, and spatial uniformity index of the corrected image based on the corner coordinates further includes calculating the rectangularity index based on the ratio of opposite side lengths:

[0025] Obtain the coordinates of the four corner points A, B, C, and D of the current calibration board grid, wherein the four corner points are arranged in clockwise or counterclockwise order;

[0026] Based on the coordinates of the four corner points, calculate the side lengths of the four sides formed by adjacent corner points respectively;

[0027] Take sides AB and CD as the first pair of opposite sides, and sides BC and DA as the second pair of opposite sides, and calculate the ratio of the lengths of the first pair of opposite sides and the ratio of the lengths of the second pair of opposite sides respectively.

[0028] Based on the ratio of the first opposite side length to the ratio of the second opposite side length, the opposite side ratio characteristic value is calculated as the side length rectangularity index of the current calibration board grid.

[0029] In one embodiment, the step of calculating the straightness index, rectangularity index, and spatial uniformity index of the corrected image based on the corner coordinates further includes calculating the rectangularity index based on the diagonal geometric features:

[0030] Obtain the coordinates of the four corner points A, B, C, and D of the current calibration board grid;

[0031] Calculate the length of the first diagonal based on the coordinates of corner points A and C, and calculate the length of the second diagonal based on the coordinates of corner points B and D;

[0032] Calculate the coordinates of the intersection point of the two diagonals AC and BD based on their equations.

[0033] Based on the coordinates of the four corner points, calculate the coordinates of the geometric center of the four corner points;

[0034] Calculate the second distance between the intersection point of the equations of the lines and the geometric center;

[0035] Based on the first and second diagonal lengths and the second distance, the diagonal rectangularity index of the current calibration grid is calculated.

[0036] In one embodiment, the step of calculating the straightness index, rectangularity index, and spatial uniformity index of the corrected image based on the corner coordinates further includes calculating the spatial uniformity index:

[0037] The corrected image is divided into a central region and an edge region;

[0038] Calculate the average rectangularity of all calibration grids in the central and edge regions respectively;

[0039] The ratio of the average rectangularity of the edge region to the average rectangularity of the center region is calculated and used as the spatial uniformity index.

[0040] In one embodiment, the comprehensive evaluation score includes a first grading standard and a second grading standard. The comprehensive evaluation score for image correction of the camera calibration parameters, based on the straightness index, rectangularity index, and spatial uniformity index, includes:

[0041] The radial distortion correction quality is evaluated based on the straightness index using a first-level standard.

[0042] The quality of tangential distortion correction is evaluated using a second-level standard based on the rectangularity index and / or the spatial uniformity index.

[0043] Furthermore, to achieve the above objectives, this application also proposes an image correction evaluation apparatus, which includes:

[0044] The data acquisition module is used to acquire the calibration board image after distortion correction based on camera calibration parameters, and extract the corner coordinates in the corrected image;

[0045] The index calculation module is used to calculate the straightness index, rectangularity index, and spatial uniformity index of the corrected image based on the corner coordinates.

[0046] The calibration evaluation module is used to generate a comprehensive evaluation of the image correction of the camera calibration parameters based on the straightness index, rectangularity index, and spatial uniformity index.

[0047] In addition, to achieve the above objectives, this application also proposes an image correction evaluation device, the device comprising: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the image correction evaluation method as described above.

[0048] In addition, to achieve the above objectives, this application also proposes a storage medium, which is a computer-readable storage medium, on which a computer program is stored, which, when executed by a processor, implements the steps of the image correction evaluation method as described above.

[0049] In addition, to achieve the above objectives, this application also provides a computer program product, which includes a computer program that, when executed by a processor, implements the steps of the image correction evaluation method as described above.

[0050] One or more technical solutions proposed in this application have at least the following technical effects:

[0051] This application acquires a calibration board image after distortion correction based on camera calibration parameters and extracts the corner coordinates from the corrected image. Based on these corner coordinates, it calculates the straightness, rectangularity, and spatial uniformity indices of the corrected image. Based on these indices, it generates a comprehensive evaluation score for the image correction based on the camera calibration parameters. This application, by using straightness, rectangularity, and spatial uniformity indices, solves the problem of relying solely on "reprojection error" for image quality assessment, which results in a one-sided evaluation dimension and fails to directly reflect the fidelity of key geometric features. It achieves a qualitative leap in the evaluation perspective from a single "point position accuracy" to a comprehensive "geometric feature fidelity," providing a more comprehensive and accurate quantitative evaluation result for image correction quality. Attached Figure Description

[0052] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this application and, together with the description, serve to explain the principles of this application.

[0053] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, for those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0054] Figure 1 This is a flowchart illustrating an embodiment of the image correction and evaluation method of this application.

[0055] Figure 2 This is a flowchart illustrating Embodiment 2 of the image correction and evaluation method of this application.

[0056] Figure 3 This is a flowchart illustrating Embodiment 3 of the image correction and evaluation method of this application;

[0057] Figure 4 This is a flowchart illustrating Embodiment 4 of the image correction and evaluation method of this application;

[0058] Figure 5 This is a flowchart illustrating Embodiment 5 of the image correction and evaluation method of this application;

[0059] Figure 6 This is a flowchart illustrating Embodiment Six of the image correction and evaluation method of this application;

[0060] Figure 7 This is a schematic diagram of the module structure of the image correction and evaluation device according to an embodiment of this application;

[0061] Figure 8 This is a schematic diagram of the device structure of the hardware operating environment involved in the image correction and evaluation method in the embodiments of this application.

[0062] The purpose, features, and advantages of this application will be further explained in conjunction with the embodiments and with reference to the accompanying drawings. Detailed Implementation

[0063] It should be understood that the specific embodiments described herein are merely illustrative of the technical solutions of this application and are not intended to limit this application.

[0064] To better understand the technical solution of this application, a detailed description will be provided below in conjunction with the accompanying drawings and specific implementation methods.

[0065] Because existing technologies cannot effectively assess the fidelity of geometric features in images after distortion correction.

[0066] This application provides a solution to acquire a calibration board image after distortion correction based on camera calibration parameters, and extract the corner coordinates in the corrected image; calculate the straightness index, rectangularity index, and spatial uniformity index of the corrected image based on the corner coordinates; and generate a comprehensive evaluation score for the image correction of the camera calibration parameters based on the straightness index, rectangularity index, and spatial uniformity index.

[0067] Based on this, embodiments of this application provide an image correction evaluation method, referring to... Figure 1 , Figure 1 This is a flowchart illustrating the first embodiment of the image correction and evaluation method of this application.

[0068] In this embodiment, the image correction evaluation method includes steps S10 to S30:

[0069] Step S10: Obtain the calibration board image after distortion correction based on camera calibration parameters, and extract the corner coordinates in the corrected image;

[0070] It should be noted that, in this embodiment, camera calibration parameters refer to a set of data obtained through the camera calibration process that describes the camera's intrinsic parameters (such as focal length and principal point) and extrinsic parameters (such as rotation and translation relative to the calibration board), as well as the lens distortion model. This constitutes a mathematical transformation relationship mapping from the original distorted image to an ideal distortion-free image. The distortion-corrected calibration board image refers to the image obtained by applying the mathematical model defined by the aforementioned camera calibration parameters to the original, distorted calibration board image for geometric transformation. The purpose is to eliminate or greatly reduce the influence of lens distortion and perspective projection deformation. The precise pixel positions of each feature corner point on the calibration board pattern (such as a checkerboard) are usually represented by two-dimensional image coordinates (u, v).

[0071] In this embodiment, the evaluation object is the result state after calibration parameter processing, rather than the original, distorted image. By accurately locating the corner points of the calibration board from the corrected image, the abstract problem of calibration effect is transformed into a computable problem of analyzing the spatial distribution of a set of discrete points with clear geometric meaning. In one possible implementation, the corner point coordinate extraction employs a sub-pixel precision algorithm to achieve positioning accuracy higher than the integer pixel level, thereby meeting the requirements of high-precision evaluation.

[0072] Step S20: Calculate the straightness index, rectangularity index, and spatial uniformity index of the corrected image based on the corner coordinates;

[0073] It should be noted that, in the embodiments of this application, the straightness index refers to one or a set of values ​​used to quantitatively evaluate the actual straightness of features that should theoretically be straight in the corrected image (such as the row or column lines of a checkerboard pattern). It reflects the extent to which straight features are restored or preserved after radial distortion is corrected. The rectangularity index refers to one or a set of values ​​used to quantitatively evaluate the degree to which the shape of each grid cell (such as each cell of a checkerboard pattern) enclosed by corner points in the corrected image approximates an ideal rectangle. It represents the preservation of shape characteristics such as right angles and parallel sides after tangential and perspective distortion are corrected. The spatial uniformity index refers to a value used to quantitatively evaluate whether the correction effect has consistency across the entire image field of view. It reveals potential spatial non-uniformity of the correction by comparing the geometric properties (such as rectangularity) of different regions of the image (such as the center and the edges).

[0074] This step analyzes the spatial distribution of corner points in the same row or column, calculates the straightness index, fits the corner points to an ideal straight line, and measures the degree of "non-straightness" by statistically analyzing the distance of each point from this straight line (such as average and maximum values). It then identifies and analyzes the grid cells formed by every four adjacent corner points, calculates the rectangularity index, and comprehensively measures the degree of "non-rectangularity" by measuring the differences between the grid's interior angles, opposite side lengths, or diagonal intersections and the ideal rectangle. Finally, it calculates the spatial uniformity index by partitioning the image and comparing the average rectangularity level of the grid cells in each region to verify whether the correction quality remains consistent across the entire field of view. These three indices together constitute a multi-dimensional evaluation system capable of diagnosing and quantifying geometric distortions associated with different types of distortion.

[0075] Step S30: Based on the straightness index, rectangularity index, and spatial uniformity index, generate a comprehensive evaluation score for the image correction of the camera calibration parameters.

[0076] It should be noted that, in the embodiments of this application, the comprehensive evaluation degree refers to a summary and conclusive quality assessment result of the image correction effect produced by the camera calibration parameters. It is not a single numerical value, but a structured evaluation conclusion, which may include grading (such as excellent, good, qualified, unqualified), suggestions for applicable scenarios (such as ultra-high precision measurement, general detection), or detailed diagnostic reports, etc.

[0077] This step uses built-in, predefined evaluation rules to compare and logically judge the calculated straightness, rectangularity, and spatial uniformity indices with the threshold ranges corresponding to different quality levels. Users can determine whether the current calibration parameters meet the accuracy requirements of their specific application scenario or whether recalibration is needed based on the comprehensive evaluation, thereby greatly improving the efficiency and reliability of the calibration workflow.

[0078] This application embodiment decomposes the geometric properties of the corrected image into linear feature preservation degree directly related to radial distortion correction, shape feature preservation degree directly related to tangential and perspective distortion correction, and spatial uniformity reflecting global consistency, thus constructing a comprehensive and refined evaluation system. This system can not only simultaneously diagnose and quantify the correction residues of multiple distortions, but also effectively reveal the local area correction defects that are masked by traditional overall indicators. Ultimately, the evaluation results are transformed into clear grading conclusions and guidance for applicable scenarios.

[0079] Furthermore, referring to Figure 2 The second embodiment of the image correction evaluation method of this application provides a flowchart, based on the above. Figure 2The embodiment shown further refines the step of calculating the straightness index in step S20, "calculating the straightness index, rectangularity index, and spatial uniformity index of the corrected image based on the corner coordinates," including steps A201 to A205:

[0080] Step A201: Based on the corner coordinates in the calibration board image, corners in the same row are grouped into the same row corner set, and corners in the same column are grouped into the same column corner set.

[0081] It should be noted that, in this embodiment, the corner points of the same row / column refer to a group of corner points in an ideal, distortion-free calibration plate image whose two-dimensional image coordinates should have the same or similar vertical coordinates (v coordinates) / horizontal coordinates (u coordinates), corresponding to points located on the same horizontal / vertical line in the physical world.

[0082] Step A202: Fit a horizontal straight line using the least squares method for each set of row corner points, and calculate the vertical distance from each corner point in the set of row corner points to the fitted horizontal straight line, as the deviation of the straightness of the row direction of the corner point;

[0083] It should be noted that, in this embodiment, least squares fitting refers to a mathematical optimization method that finds a straight line in a Cartesian coordinate system such that the sum of the squares of the vertical distances between the predicted values ​​of points on that line and the given data points (i.e., the coordinates of the row corner point set) is minimized. A horizontal straight line refers to a line in the image coordinate system whose equation can be expressed as v = k*u + b, and whose theoretical expected slope k is usually close to 0. It corresponds to the ideal line that a row of corner points should form on the calibration board. Vertical distance specifically refers to the shortest distance from a point to a straight line in the vertical direction (i.e., the direction of the image's vertical axis v-axis). For a near-horizontal straight line, this distance effectively reflects the degree to which a point deviates from the ideal straight line in the vertical direction. Row direction straightness deviation refers to the absolute value of the vertical distance by which a corner point deviates from the ideal horizontal straight line within its own row.

[0084] Step A203: Fit a vertical line using the least squares method for each column corner point set, and calculate the horizontal distance from each corner point in the column corner point set to the fitted vertical line as the column direction straightness deviation of the corner point;

[0085] It should be noted that in this embodiment, a vertical straight line refers to an ideal line formed by a column of corner points on a calibration board, whose equation can be expressed as u = m*v + c (or more commonly, with a slope approaching infinity) in the image coordinate system. Horizontal distance specifically refers to the shortest distance from a point to a straight line in the horizontal direction (i.e., the direction of the image's horizontal axis u). For a nearly vertical straight line, this distance effectively reflects the degree to which a point deviates from the ideal straight line in the horizontal direction. Column-direction straightness deviation refers to the absolute value of the horizontal distance by which a corner point deviates from the ideal vertical straight line of its column.

[0086] Step A204: For all corner points, construct a row direction deviation set and a column direction deviation set by the row direction straightness deviation and the column direction straightness deviation, respectively.

[0087] It should be noted that, in this embodiment, the row direction deviation set refers to the numerical set consisting of the row direction straightness deviation values ​​of all corner points. The column direction deviation set refers to the numerical set consisting of the column direction straightness deviation values ​​of all corner points.

[0088] Step A205: Based on the set of row direction deviations and the set of column direction deviations, a straightness index is calculated, wherein the straightness index includes at least one of the following: average row straightness, average column straightness, overall average straightness, maximum straightness, and directional uniformity.

[0089] It should be noted that in this embodiment, the row average straightness refers to the arithmetic mean of all deviation values ​​in the row direction deviation set, reflecting the average degree to which all horizontal lines in the image deviate from the ideal straight line. The column average straightness refers to the arithmetic mean of all deviation values ​​in the column direction deviation set, reflecting the overall average deviation degree of all vertical lines. The overall average straightness refers to the total arithmetic mean of all deviation values ​​in the row and column direction deviation sets, reflecting the overall curvature of all straight line features (including horizontal and vertical) in the image. The maximum straightness refers to the maximum value of all deviation values ​​in the row and column direction deviation sets, reflecting the most severe local straightness deviation in the image. Directional uniformity is a ratio obtained by comparing the row average straightness and the column average straightness, usually calculated by dividing the larger of the two by the smaller value. It is used to evaluate the balance of straightness correction effect in the horizontal and vertical directions; the closer the ratio is to 1, the better the uniformity.

[0090] This application embodiment achieves a refined, quantitative, and directionally distinguishable evaluation of the radial distortion correction quality of an image by systematically grouping, directionally fitting, calculating deviations, and comprehensively statistically analyzing the corner coordinates. It transforms the subjective visual judgment of "whether a line is straight" into a set of objective, measurable, and physically meaningful numerical values. This not only comprehensively reflects the overall fidelity of the straight line features of the corrected image but also effectively diagnoses the uniformity and directional specificity defects of the distortion correction.

[0091] In one possible implementation, the rectangularity index of the corrected image includes one or more of the following: the angular deviation between the interior angle and the right angle of each calibration grid, the ratio of the opposite side length of each calibration grid, and the diagonal geometric features of each calibration grid, and their weighted fusion results.

[0092] It should be noted that in this embodiment, the calibration plate grid refers to the smallest closed quadrilateral unit formed by connecting four adjacent corner points in the corrected image, corresponding to a square on the physical calibration plate (such as a chessboard). The deviation between the interior angle and the right angle refers to the absolute value or square error of the difference between the measured angle value of each interior angle formed by the above four corner points and the ideal right angle (90 degrees), used to measure the distortion of the angle. The ratio of opposite side lengths refers to the ratio of the lengths of two sets of opposite sides in the same calibration plate grid. Ideally (such as a square), this ratio should be 1:1. The degree of deviation of the ratio from 1 reflects the shape distortion of the grid caused by non-uniform scaling or shearing deformation. The diagonal geometric features mainly include: first, the ratio of the lengths of the two diagonals, which should ideally be 1; second, the distance between the intersection of the two diagonals and the geometric center point of the four corner points of the grid, which should ideally be 0. This feature comprehensively reflects the central symmetry and squareness of the grid. The weighted fusion result refers to the linear combination of intermediate evaluation values ​​(such as sub-rectangularity) calculated separately based on three independent evaluation methods: angle deviation, side length ratio, and diagonal geometric features, according to a pre-set weight coefficient, to obtain a comprehensive and single rectangularity index value.

[0093] This embodiment adopts three complementary geometric perspectives—"angle accuracy," "parallelism and equal length of opposite sides," and "central symmetry"—to cross-validate and comprehensively evaluate the shape distortion of the same grid. By weighted and fused multiple evaluation results, the system can obtain a more robust and comprehensive rectangularity index, which can more sensitively capture different types of shape distortion (such as simple angular skew, uneven stretching, or complex trapezoidal distortion), thus more accurately reflecting the correction quality of non-radial distortion.

[0094] In one possible implementation, in order to pursue evaluation speed, the evaluation system can use only the "opposite side length ratio" with the lowest computational complexity to quickly estimate the rectangularity. In addition, when higher accuracy is required, the system can use all three methods and give a higher weight to the "interior angle deviation" (e.g., 0.4), while the weights of the "opposite side length ratio" and "diagonal geometric features" are each set to 0.3, so as to achieve a comprehensive evaluation that balances efficiency and accuracy.

[0095] Furthermore, referring to Figure 3 The third embodiment of the image correction evaluation method of this application provides a flowchart, based on the above. Figure 3 The embodiment shown further refines the step of calculating the rectangularity index based on the angle deviation in step S20, "calculating the straightness index, rectangularity index, and spatial uniformity index of the corrected image based on the corner coordinates," including steps A301 to A304:

[0096] Step A301: Obtain the coordinates of the four corner points of the current calibration board grid, wherein the four corner points are arranged in clockwise or counterclockwise order;

[0097] It should be noted that, in this embodiment, the current calibration grid refers to a single grid cell in the calibration image that is being evaluated for rectangularity by being defined by four adjacent corner points, such as a square in a checkerboard grid.

[0098] Step A302: Based on the coordinates of the four corner points, calculate the angle between the two vectors formed by adjacent corner points in turn to obtain the four interior angles of the current calibration board grid.

[0099] It should be noted that in this embodiment, the two vectors formed by adjacent corner points refer to the following: in the sequentially arranged sequence of corner points, for each corner point (as a vertex), the first vector is formed by starting with the preceding corner point and ending with the current corner point itself; the second vector is formed by starting with the current corner point itself and ending with the following corner point. For example, for a clockwise sequence of corner points [A, B, C, D], at vertex B, the two vectors refer to vectors AB and BC. The included angle refers to the planar angle between the two vectors, which typically ranges from 0 to 180 degrees; this included angle is the "interior angle" at that vertex. The purpose of this step is to transform the boundary information of the grid (four points) into its internal shape information (four corners).

[0100] Step A303: Compare the four interior angles with the reference angles respectively, and calculate the four angle deviation values;

[0101] It should be noted that in this embodiment, the reference angle index is the angle value that the interior angle of the grid should have under ideal correction; for a standard square checkerboard, this reference angle is 90 degrees. The angle deviation value refers to the absolute value of the difference between each actual interior angle and the reference angle, i.e., |measured interior angle - 90 degrees|, which is a non-negative scalar used to quantify the severity of angle distortion at that vertex. This application generates a set of error data that directly reflects the angle fidelity of the grid at each vertex by quantifying the specific distortion of each interior angle relative to the ideal right angle.

[0102] Step A304: Perform aggregate calculation on the four angle deviation values ​​to obtain the comprehensive angle deviation of the current calibration board grid;

[0103] It should be noted that, in this embodiment, aggregation calculation refers to the operation of performing mathematical operations on a set of values ​​(four angular deviation values) to obtain a single scalar value that can represent the overall or typical level of the set of values. The comprehensive angular deviation refers to the result obtained through aggregation calculation, which is a comprehensive measure used to characterize the overall angular distortion level of the current calibration board grid.

[0104] In one possible implementation, the aggregation calculation can employ the arithmetic mean method to reflect the average level of angular error; alternatively, it can use the maximum value method to focus on the most severe corner distortion; or it can use the method of calculating the sum of squares and then taking the square root to comprehensively consider the magnitude of each error. The comprehensive metric reflects the overall degree to which the grid shape deviates from the ideal rectangle in the angular dimension.

[0105] Step A305: Based on the comprehensive angle deviation, calculate the angle rectangularity index of the current calibration board grid, wherein the angle rectangularity index is negatively correlated with the comprehensive angle deviation.

[0106] It should be noted that in this embodiment, the angular rectangularity index is an evaluation value calculated based on the comprehensive angular deviation, used to ultimately characterize the angular fidelity quality of the grid. Its numerical range is usually normalized to, for example, the interval [0,1]. A negative correlation indicates that the larger the deviation (the less rectangular), the lower the index score (the worse the quality).

[0107] This application's embodiment maps the comprehensive angle deviation, representing error, into an intuitive and standardized quality score. By inputting the comprehensive angle deviation value into a preset, monotonically decreasing mathematical mapping function, the final angle rectangularity index is calculated, generating a user-friendly quality value that can be directly used for subsequent weighted fusion or graded evaluation. The closer the index value is to 1, the closer the grid is to an ideal rectangle from the angle dimension; the closer it is to 0, the more severe the angle distortion.

[0108] In one specific implementation, after completing the identification of all cells, the evaluation system begins to calculate the angular rectangularity index of a specific cell (corner points in the order of A, B, C, and D). First, the sub-pixel coordinates of these four corner points are read; then, the included angles ∠A, ∠B, ∠C, and ∠D formed by the vectors of adjacent corner points are calculated sequentially. Next, the absolute values ​​of the differences between each included angle and 90 degrees are calculated: |∠A-90|, |∠B-90|, |∠C-90|, and |∠D-90|. The arithmetic mean of these four absolute values ​​is taken to obtain the comprehensive angular deviation of the cell, denoted as angle_err (in degrees). Finally, the system calculates the angular rectangularity index R_angle using a preset mapping function R_angle = 1 - angle_err / 90. At this point, R_angle is 1 when angle_err is 0 (perfect right angle).

[0109] Furthermore, referring to Figure 4 The fourth embodiment of the image correction evaluation method of this application provides a flowchart, based on the above. Figure 4 The embodiment shown further refines the step of calculating the rectangularity based on the ratio of opposite side lengths in step S20, "calculating the straightness index, rectangularity index, and spatial uniformity index of the corrected image based on the corner coordinates," including steps A401 to A404:

[0110] Step A401: Obtain the coordinates of the four corner points A, B, C, and D of the current calibration board grid, wherein the four corner points are arranged in clockwise or counterclockwise order;

[0111] Step A402: Based on the coordinates of the four corner points, calculate the side lengths of the four sides formed by the adjacent corner points respectively;

[0112] It should be noted that in this embodiment, the four sides formed by adjacent corner points refer to the line segments connecting every two adjacent corner points in a sequentially arranged sequence, namely sides AB, BC, CD, and DA. The side length refers to the length of each side, which is usually calculated using the Euclidean distance formula between two points in the image pixel coordinate system.

[0113] Step A403: Take edge AB and edge CD as the first pair of opposite edges, and take edge BC and edge DA as the second pair of opposite edges, and calculate the ratio of the lengths of the first pair of opposite edges and the ratio of the lengths of the second pair of opposite edges respectively.

[0114] It should be noted that in this embodiment, opposite sides refer to two sides in a quadrilateral that are not adjacent and are in opposite positions. In the quadrilateral formed by the corner points A, B, C, and D arranged in sequence, sides AB and CD form one pair of opposite sides, and sides BC and DA form another pair of opposite sides. The opposite side length ratio refers to the ratio obtained by dividing the length of one side by the length of the other side in a pair of opposite sides. The opposite side length ratio quantifies the relative difference in length between the two pairs of opposite sides in the current calibration board grid.

[0115] In one possible implementation, the lengths of edge AB are denoted as L_AB, edge BC as L_BC, edge CD as L_CD, and edge DA as L_DA. Then, the ratio of the lengths of the first pair of edges is calculated as R1 = min(L_AB, L_CD) / max(L_AB, L_CD), and the ratio of the lengths of the second pair of edges is calculated as R2 = R1 = min(L_BC, L_DA) / max(L_BC, L_DA). The scaling consistency of the grid in the two perpendicular directions is evaluated by comparing the lengths of the opposite edges.

[0116] Step A404: Based on the ratio of the first opposite side length to the ratio of the second opposite side length, calculate the opposite side ratio characteristic value as the side length rectangularity index of the current calibration board grid.

[0117] It should be noted that, in this embodiment, the opposite side ratio characteristic value refers to a scalar value used to comprehensively characterize the degree to which the ratio of the lengths of the two sets of opposite sides deviates from the ideal value (1). It can be obtained by calculating the deviation of the two ratios from 1 (e.g., absolute difference or relative difference) and then aggregating them (e.g., taking the average, taking the maximum value, etc.). In one possible implementation, the opposite side ratio characteristic value Ri = (R1 + R2) / 2. The closer this index value is to 1, the closer the grid is to the ideal rectangle (equal opposite sides) from the perspective of the opposite side length ratio; the closer it is to 0, the more serious the imbalance of the opposite side length ratio.

[0118] Furthermore, referring to Figure 5 The fifth embodiment of the image correction evaluation method of this application provides a flowchart, based on the above. Figure 5 The embodiment shown further refines the step of calculating the rectangularity index based on the diagonal geometric features in step S20, "calculating the straightness index, rectangularity index, and spatial uniformity index of the corrected image based on the corner coordinates," including steps A501 to A506:

[0119] Step A501: Obtain the coordinates of the four corner points A, B, C, and D of the current calibration board grid;

[0120] Step A502: Calculate the length of the first diagonal based on the coordinates of corner points A and C, and calculate the length of the second diagonal based on the coordinates of corner points B and D;

[0121] It should be noted that in this embodiment, the first diagonal length refers to the length L_AC of the line segment AC connecting a pair of opposite vertices A and C of the current calibration board grid. The second diagonal length refers to the length L_BD of the line segment BD connecting another pair of opposite vertices B and D. The lengths are calculated in the image pixel coordinate system using the Euclidean distance formula between the two points.

[0122] Step A503: Based on the equations of the two diagonals AC and BD, calculate the coordinates of the intersection point of the equations of the two diagonals;

[0123] It should be noted that in this embodiment, the linear equations refer to the mathematical equations corresponding to the straight lines passing through points A and C, and points B and D, respectively, in the image pixel coordinate system. These equations can typically be expressed as point-slope form, two-point form, or general form. The coordinates of the intersection point of the linear equations refer to the coordinates (x_O, y_O) of the unique intersection point O in the plane determined by the two linear equations. This intersection point lies on both diagonals and is their point of intersection. Using analytical geometry methods, the intersection point of continuous straight lines is calculated from discrete point coordinates, determining the precise intersection position of the two diagonals in the image plane, which is used to evaluate the central symmetry of the grid.

[0124] Step A504: Based on the coordinates of the four corner points, calculate the coordinates of the geometric center of the four corner points;

[0125] It should be noted that, in this embodiment, the coordinates of the geometric center of the four corner points refer to the coordinates of the geometric center (or centroid) determined by the coordinates of the four vertices of the current calibration board grid. For a quadrilateral, the coordinates of its geometric center can usually be obtained by calculating the average of the x-coordinates and y-coordinates of the four vertices, i.e., O'=((x_A + x_B + x_C + x_D) / 4, (y_A + y_B + y_C + y_D) / 4).

[0126] Step A505: Calculate the second distance between the intersection point of the line equations and the geometric center;

[0127] It should be noted that in this embodiment, the second distance specifically refers to the Euclidean distance between the coordinates of the diagonal intersection point O and the coordinates of the geometric center O' calculated in step A504 in the image pixel coordinate system, denoted as d(OO'). Its purpose is to quantify the degree of deviation between the diagonal intersection point and the geometric center. For a perfect rectangle, this distance should be 0; the larger the distance value, the more irregular the grid and the worse the central symmetry.

[0128] Step A506: Calculate the diagonal rectangularity index of the current calibration grid based on the first and second diagonal lengths and the second distance.

[0129] It should be noted that, in this embodiment, the diagonal rectangularity index is an evaluation value calculated by integrating information from the first diagonal length, the second diagonal length, and the second distance (i.e., the distance between the intersection point and the center). This value characterizes how close the grid is to an ideal rectangle in the diagonal feature dimension, and its numerical range is typically normalized to, for example, the interval [0, 1]. This index is usually designed to be negatively correlated with both the difference in the lengths of the two diagonals and the magnitude of the second distance, aiming to integrate the evaluation results of both diagonal length consistency and central symmetry into a single diagonal feature quality score.

[0130] In one possible implementation, the diagonal ratio Rd = min(L_AC, L_BD) / max(L_AC, L_BD) is calculated based on the first and second diagonal lengths, and the diagonal rectangle R3 = Rd * (1 - 2 * d(OO') / (L_AC + L_BD)) is obtained based on the diagonal ratio and the second distance, with a range of [0, 1].

[0131] In one possible implementation, the rectangle of the final chessboard grid is Ro = w1 * R_angle + w2 * Ri + w3 * R3, where w1, w2, and w3 are the corresponding weight coefficients, R_angle is the angular rectangle, Ri is the side length rectangle, and Ro is the diagonal rectangle.

[0132] Furthermore, referring to Figure 6 The sixth embodiment of the image correction evaluation method of this application provides a flowchart, based on the above. Figure 6 The embodiment shown further refines the step of calculating the spatial uniformity index in step S20, "calculating the straightness index, rectangularity index, and spatial uniformity index of the corrected image based on the corner coordinates," including steps A601 to A603:

[0133] Step A601: Divide the corrected image into a central region and an edge region;

[0134] It should be noted that, in this embodiment, the central region refers to a continuous sub-region located in the center of the field of view in the corrected image, which is usually rectangular, and its range is defined by a preset ratio of the image width and height (for example, a rectangular area enclosed by 25% to 75% of the image width and 25% to 75% of the image height). The edge region refers to the part remaining in the corrected image after removing the central region, that is, the area around the image.

[0135] Based on pre-defined geometric rules (such as percentage ranges), this application calculates the pixel coordinate boundaries of the central and edge regions according to the overall size of the image, discretizing the continuous image plane into two comparative analysis units, thereby enabling the examination of the correction effect in the central and peripheral regions of the image separately.

[0136] Step A602: Calculate the average rectangularity of all calibration grids in the central and edge regions, respectively.

[0137] It should be noted that in this embodiment, all calibration board grids refer to every complete grid cell (such as a checkerboard grid) whose geometric center or all vertices are located within the defined "central region" or "edge region" pixel range. The average rectangularity refers to a scalar value obtained by averaging or other statistical averaging the rectangularity index (which is the comprehensive value Ro previously calculated by weighted fusion of angle, opposite edge, and diagonal features) corresponding to each qualified calibration board grid within the specified region. It represents the average level of grid shape fidelity within the region.

[0138] This embodiment uses regional-level statistical aggregation to summarize a large amount of grid-level data into two regionally representative values, obtaining two average rectangularity values, R_c and R_s, respectively characterizing the overall correction effect of the core and peripheral regions of the image. For example, the system first determines whether each grid belongs to the central or peripheral region based on its position; then, for the set of grids belonging to the central region and the set of grids belonging to the peripheral region, it reads their respective comprehensive rectangularity index values ​​and calculates the arithmetic mean of the two sets.

[0139] Step A603: Calculate the ratio of the average rectangularity of the edge region to the average rectangularity of the center region, and use it as the spatial uniformity index.

[0140] It should be noted that, in this embodiment, the spatial uniformity index refers to an index calculated by the relative relationship between the average rectangularity of the edge region (R_s) and the average rectangularity of the center region (R_c), which is used to quantify the image correction effect.

[0141] In one possible implementation, the spatial uniformity U = R_s / R_c, where R_s is the average rectangularity of the edge region and R_c is the average rectangularity of the center region. The closer U is to 1, the more uniform the correction effect is across the entire image range; if U is small, it indicates that the correction quality of the edge region is worse than that of the center region, meaning that the distortion correction is insufficient (especially the distortion in the edge region is not completely corrected).

[0142] In one possible implementation, the comprehensive evaluation score includes a first grading standard and a second grading standard. The process of generating the comprehensive evaluation score for image correction of the camera calibration parameters based on the straightness index, rectangularity index, and spatial uniformity index includes:

[0143] The radial distortion correction quality is evaluated based on the straightness index using a first-level standard.

[0144] The quality of tangential distortion correction is evaluated using a second-level standard based on the rectangularity index and / or the spatial uniformity index.

[0145] It should be noted that, in this embodiment, the first grading standard refers to a pre-set set of grading rules for evaluating the quality of radial distortion correction. These rules correspond one-to-one with different quality levels such as "Excellent," "Good," "Pass," and "Fail" to specific numerical threshold ranges of straightness indicators such as "Overall Average Straightness," "Maximum Straightness," and "Directional Uniformity." The second grading standard refers to another set of pre-set grading rules for evaluating the quality of tangential distortion (and perspective distortion) correction. This set of rules associates different quality levels with numerical threshold ranges of rectangularity-related statistics such as "Average Rectangularity," "Minimum Rectangularity," "Spatial Uniformity," and "Maximum Angular Error," as well as spatial uniformity indicators. Radial distortion correction quality specifically refers to evaluating the straightness of straight line features in the corrected image to reflect the effectiveness of radial distortion correction by the camera lens. Tangential distortion correction quality specifically refers to evaluating the regularity of the shape of grid cells (rectangularity) and the spatial uniformity of the correction effect in the corrected image to comprehensively reflect the effectiveness of tangential and perspective distortion correction.

[0146] This embodiment establishes a systematic mapping relationship between "indicator type - distortion type - quality level - application scenario": The linearity index is used to specifically evaluate radial distortion correction, and its quality level is derived according to the first grading standard; simultaneously, the rectangularity index and spatial uniformity index are used to collaboratively evaluate tangential distortion correction, and its quality level is derived according to the second grading standard; the calculated, dispersed multi-dimensional geometric indices (linearity, rectangularity, spatial uniformity) are transformed into comprehensive conclusions with clear quality levels and applicable scenario recommendations for specific distortion types through two independent grading standards closely linked to application scenarios; this separate evaluation method allows for rapid identification of the primary source of the problem when the overall correction effect is poor, greatly optimizing the efficiency of subsequent calibration parameter adjustments or problem troubleshooting.

[0147] In one possible implementation, the straightness index includes an overall average straightness of 0.25 pixels, a maximum straightness of 0.7 pixels, and directional uniformity of 1.15; the rectangularity index includes an average rectangularity of 0.98, a minimum rectangularity of 0.95, a maximum angular error of 0.4 degrees; and the spatial uniformity index is 0.97. The system first evaluates the radial distortion correction quality: comparing the values ​​of 0.25, 0.7, and 1.15 with the radial distortion grading threshold, it finds that they fall within the range of [0, 0.3], [0, 0.8], and [1.0, 1.3] corresponding to the "excellent" level, thus determining the radial distortion correction quality as "excellent." Next, it evaluates the tangential distortion correction quality: comparing the values ​​of 0.98, 0.95, 0.97, and 0.4 with the tangential distortion grading threshold, it finds that they fall within the range of [0.98, 1], [0.95, 1], [0.97, 1], and [0, 0.5] corresponding to the "excellent" level, thus determining the tangential distortion correction quality as "excellent" as well. Finally, the system generates a comprehensive evaluation report, clearly stating: Radial distortion correction quality: Excellent (suitable for ultra-high precision measurement); Tangential and perspective distortion correction quality: Excellent (suitable for ultra-high precision measurement); Overall recommendation: The current calibration parameters can meet the requirements of ultra-high precision visual measurement applications.

[0148] This application embodiment constructs a comprehensive evaluation system covering geometric fidelity by systematically calculating straightness index (reflecting the straightness of a line), rectangularity index (comprehensively evaluating shape features such as angles, opposite sides, and diagonals), and spatial uniformity index (measuring the consistency of the correction effect across the entire field of view). Subsequently, the straightness index is evaluated using a first-level standard to specifically diagnose the correction effect of radial distortion; the rectangularity and spatial uniformity indices are evaluated using a second-level standard to specifically diagnose the correction effect of tangential and perspective distortion. This effectively solves the core defects of existing technologies, such as a single evaluation dimension, vague conclusions, and a disconnect from practical applications.

[0149] It should be noted that the above examples are only for understanding this application and do not constitute a limitation on the image correction evaluation method of this application. Any simple modifications based on this technical concept are within the protection scope of this application.

[0150] This application also provides an image correction and evaluation apparatus; please refer to... Figure 7 The image correction and evaluation device includes:

[0151] The data acquisition module 10 is used to acquire the calibration board image after distortion correction based on camera calibration parameters, and extract the corner coordinates in the corrected image;

[0152] The index calculation module 20 is used to calculate the straightness index, rectangularity index and spatial uniformity index of the corrected image based on the corner coordinates.

[0153] The calibration evaluation module 30 is used to generate a comprehensive evaluation of the image correction of the camera calibration parameters based on the straightness index, rectangularity index and spatial uniformity index.

[0154] The image correction evaluation apparatus provided in this application, employing the image correction evaluation method described in the above embodiments, can solve the technical problem of how to effectively evaluate the fidelity of the geometric features of an image after distortion correction. Compared with the prior art, the beneficial effects of the image correction evaluation apparatus provided in this application are the same as those of the image correction evaluation method provided in the above embodiments, and other technical features in the image correction evaluation apparatus are the same as those disclosed in the methods of the above embodiments, and will not be repeated here.

[0155] This application provides an image correction evaluation device, which includes: at least one processor; and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, which are executed by the at least one processor to enable the at least one processor to perform the image correction evaluation method in Embodiment 1 above.

[0156] The following is for reference. Figure 8 The diagram illustrates a structural schematic of an image correction evaluation device suitable for implementing embodiments of this application. The image correction evaluation device in the embodiments of this application may include, but is not limited to, mobile terminals such as mobile phones, laptops, digital broadcast receivers, PDAs (Personal Digital Assistants), PADs (Portable Application Description), PMPs (Portable Media Players), in-vehicle terminals (e.g., in-vehicle navigation terminals), and fixed terminals such as digital TVs and desktop computers. Figure 8 The image correction evaluation device shown is merely an example and should not impose any limitations on the functionality and scope of use of the embodiments of this application.

[0157] like Figure 8As shown, the image correction evaluation device may include a processing unit 1001 (e.g., a central processing unit, a graphics processing unit, etc.), which can perform various appropriate actions and processes according to a program stored in a read-only memory 1002 or a program loaded from a storage device 1003 into a random access memory 1004. The random access memory 1004 also stores various programs and data required for the operation of the image correction evaluation device. The processing unit 1001, the read-only memory 1002, and the random access memory 1004 are interconnected via a bus 1005. An input / output interface 1006 is also connected to the bus. Typically, the following systems can be connected to the input / output interface 1006: input devices 1007 including, for example, a touchscreen, touchpad, keyboard, mouse, image sensor, microphone, accelerometer, gyroscope, etc.; output devices 1008 including, for example, a liquid crystal display (LCD), speaker, vibrator, etc.; storage devices 1003 including, for example, magnetic tape, hard disk, etc.; and communication devices 1009. The communication device 1009 allows the image correction evaluation device to communicate wirelessly or wiredly with other devices to exchange data. Although the figure shows an image correction evaluation device with various systems, it should be understood that implementing or having all the systems shown is not required. More or fewer systems may be implemented alternatively.

[0158] Specifically, according to the embodiments disclosed in this application, the processes described above with reference to the flowcharts can be implemented as computer software programs. For example, embodiments disclosed in this application include a computer program product comprising a computer program carried on a computer-readable medium, the computer program containing program code for performing the methods shown in the flowcharts. In such embodiments, the computer program can be downloaded and installed from a network via a communication device, or installed from storage device 1003, or installed from read-only memory 1002. When the computer program is executed by processing device 1001, it performs the functions defined in the methods of the embodiments disclosed in this application.

[0159] The image correction evaluation device provided in this application, employing the image correction evaluation method described in the above embodiments, can solve the technical problem of how to effectively evaluate the fidelity of the geometric features of an image after distortion correction. Compared with the prior art, the beneficial effects of the image correction evaluation device provided in this application are the same as those of the image correction evaluation method provided in the above embodiments, and other technical features in this image correction evaluation device are the same as those disclosed in the previous embodiment method, and will not be repeated here.

[0160] It should be understood that the various parts disclosed in this application can be implemented using hardware, software, firmware, or a combination thereof. In the description of the above embodiments, specific features, structures, materials, or characteristics can be combined in any suitable manner in one or more embodiments or examples.

[0161] The above description is merely a specific embodiment of this application, but the scope of protection of this application 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 this application should be included within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.

[0162] This application provides a computer-readable storage medium having computer-readable program instructions (i.e., a computer program) stored thereon, the computer-readable program instructions being used to perform the image correction evaluation method described in the above embodiments.

[0163] The computer-readable storage medium provided in this application may be, for example, a USB flash drive, but is not limited to, electrical, magnetic, optical, electromagnetic, infrared, or semiconductor systems or devices, or any combination thereof. More specific examples of computer-readable storage media may include, but are not limited to: electrical connections having one or more wires, portable computer disks, hard disks, random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber, portable compact disk read-only memory (CD-ROM), optical storage devices, magnetic storage devices, or any suitable combination thereof. In this embodiment, the computer-readable storage medium may be any tangible medium containing or storing a program that can be used by or in conjunction with an instruction execution system or device. The program code contained on the computer-readable storage medium may be transmitted using any suitable medium, including but not limited to: wires, optical cables, RF (Radio Frequency), etc., or any suitable combination thereof.

[0164] The aforementioned computer-readable storage medium may be included in the image correction evaluation device; or it may exist independently and not assembled into the image correction evaluation device.

[0165] The aforementioned computer-readable storage medium carries one or more programs that, when executed by the image correction evaluation device, cause the image correction evaluation device to: acquire a calibration board image after distortion correction based on camera calibration parameters, and extract corner coordinates from the corrected image; calculate the straightness index, rectangularity index, and spatial uniformity index of the corrected image based on the corner coordinates; and generate a comprehensive evaluation score for the image correction of the camera calibration parameters based on the straightness index, rectangularity index, and spatial uniformity index.

[0166] Computer program code for performing the operations of this application can be written in one or more programming languages ​​or a combination thereof, including object-oriented programming languages ​​such as Java, Smalltalk, and C++, and conventional procedural programming languages ​​such as the "C" language or similar programming languages. The program code can be executed entirely on the user's computer, partially on the user's computer, as a standalone software package, partially on the user's computer and partially on a remote computer, or entirely on a remote computer or server. In cases involving remote computers, the remote computer can be connected to the user's computer via any type of network—including a Local Area Network (LAN) or a Wide Area Network (WAN)—or can be connected to an external computer (e.g., via the Internet using an Internet service provider).

[0167] The flowcharts and block diagrams in the accompanying drawings illustrate the architecture, functionality, and operation of possible implementations of systems, methods, and computer program products according to various embodiments of this application. In this regard, each block in a flowchart or block diagram may represent a module, segment, or portion of code containing one or more executable instructions for implementing a specified logical function. It should also be noted that in some alternative implementations, the functions indicated in the blocks may occur in a different order than those indicated in the drawings. For example, two consecutively indicated blocks may actually be executed substantially in parallel, and they may sometimes be executed in reverse order, depending on the functions involved. It should also be noted that each block in the block diagrams and / or flowcharts, and combinations of blocks in the block diagrams and / or flowcharts, can be implemented using a dedicated hardware-based system that performs the specified function or operation, or using a combination of dedicated hardware and computer instructions.

[0168] The modules described in the embodiments of this application can be implemented in software or hardware. The names of the modules do not necessarily limit the functionality of the unit itself.

[0169] The readable storage medium provided in this application is a computer-readable storage medium that stores computer-readable program instructions (i.e., a computer program) for executing the above-described image correction evaluation method, which can solve the technical problem of how to effectively evaluate the fidelity of the geometric features of an image after distortion correction. Compared with the prior art, the beneficial effects of the computer-readable storage medium provided in this application are the same as the beneficial effects of the image correction evaluation method provided in the above embodiments, and will not be repeated here.

[0170] This application also provides a computer program product, including a computer program that, when executed by a processor, implements the steps of the image correction evaluation method described above.

[0171] The computer program product provided in this application can solve the technical problem of how to effectively evaluate the fidelity of geometric features of an image after distortion correction. Compared with the prior art, the beneficial effects of the computer program product provided in this application are the same as those of the image correction evaluation method provided in the above embodiments, and will not be repeated here.

[0172] The above description is only a part of the embodiments of this application and does not limit the patent scope of this application. All equivalent structural transformations made under the technical concept of this application and using the contents of the specification and drawings of this application, or direct / indirect applications in other related technical fields, are included in the patent protection scope of this application.

Claims

1. An image correction evaluation method, characterized in that, The image correction evaluation method includes: Acquire the calibration board image after distortion correction based on camera calibration parameters, and extract the corner coordinates in the corrected image; Based on the corner coordinates, the straightness index, rectangularity index, and spatial uniformity index of the corrected image are calculated. The straightness index refers to one or a set of values ​​used to quantify the actual straightness of straight lines in the corrected image, reflecting the recovery or preservation of straight-line features after radial distortion correction. The rectangularity index refers to one or a set of values ​​used to quantify the degree to which the shape of each grid cell enclosed by the corner points in the corrected image resembles an ideal rectangle, indicating the preservation of right angles and parallel side shape characteristics after tangential and perspective distortion correction. The spatial uniformity index is a value used to quantify the consistency of the correction effect across the entire image's field of view, revealing spatial non-uniformity through comparison of the geometric properties of different regions of the image. Based on the straightness index, rectangularity index, and spatial uniformity index, a comprehensive evaluation score for image correction of the camera calibration parameters is generated.

2. The image correction evaluation method as described in claim 1, characterized in that, The step of calculating the straightness index, rectangularity index, and spatial uniformity index of the corrected image based on the corner coordinates includes calculating the straightness index: Based on the corner coordinates in the calibration board image, corners in the same row are grouped into the same row corner set, and corners in the same column are grouped into the same column corner set. For each set of row corner points, fit a horizontal straight line using the least squares method, and calculate the vertical distance from each corner point in the set of row corner points to the fitted horizontal straight line, which is used as the row direction straightness deviation of the corner point; For each set of column corner points, a vertical line is fitted using the least squares method, and the horizontal distance from each corner point in the set of column corner points to the fitted vertical line is calculated as the column direction straightness deviation of the corner point. For all corner points, the row direction straightness deviation and the column direction straightness deviation are respectively formed into a row direction deviation set and a column direction deviation set; Based on the set of row direction deviations and the set of column direction deviations, a straightness index is calculated, wherein the straightness index includes at least one of the following: average row straightness, average column straightness, overall average straightness, maximum straightness, and directional uniformity.

3. The image correction evaluation method as described in claim 1, characterized in that, The rectangularity index of the corrected image includes one or more of the following: the angular deviation between the interior angle and the right angle of each calibration plate grid, the ratio of the opposite side length of each calibration plate grid, and the diagonal geometric features of each calibration plate grid, and their weighted fusion results.

4. The image correction evaluation method as described in claim 3, characterized in that, The step of calculating the straightness index, rectangularity index, and spatial uniformity index of the corrected image based on the corner coordinates further includes calculating the rectangularity index based on the angle deviation: Obtain the coordinates of the four corner points of the current calibration board grid, wherein the four corner points are arranged in clockwise or counterclockwise order; Based on the coordinates of the four corner points, the angle between the two vectors formed by adjacent corner points is calculated in turn to obtain the four interior angles of the current calibration board grid. The four interior angles are compared with the reference angles respectively, and the deviation values ​​of the four angles are calculated. The four angular deviation values ​​are aggregated and calculated to obtain the comprehensive angular deviation of the current calibration plate grid. Based on the comprehensive angle deviation, the angle rectangularity index of the current calibration board grid is calculated, wherein the angle rectangularity index is negatively correlated with the comprehensive angle deviation.

5. The image correction evaluation method as described in claim 3, characterized in that, The step of calculating the straightness index, rectangularity index, and spatial uniformity index of the corrected image based on the corner coordinates further includes calculating the rectangularity index based on the ratio of opposite side lengths: Obtain the coordinates of the four corner points A, B, C, and D of the current calibration board grid, wherein the four corner points are arranged in clockwise or counterclockwise order; Based on the coordinates of the four corner points, calculate the side lengths of the four sides formed by adjacent corner points respectively; Take sides AB and CD as the first pair of opposite sides, and sides BC and DA as the second pair of opposite sides, and calculate the ratio of the lengths of the first pair of opposite sides and the ratio of the lengths of the second pair of opposite sides respectively. Based on the ratio of the first opposite side length to the ratio of the second opposite side length, the opposite side ratio characteristic value is calculated as the side length rectangularity index of the current calibration board grid.

6. The image correction evaluation method as described in claim 3, characterized in that, The step of calculating the straightness index, rectangularity index, and spatial uniformity index of the corrected image based on the corner coordinates further includes calculating the rectangularity index based on the diagonal geometric features: Obtain the coordinates of the four corner points A, B, C, and D of the current calibration board grid; Calculate the length of the first diagonal based on the coordinates of corner points A and C, and calculate the length of the second diagonal based on the coordinates of corner points B and D; Calculate the coordinates of the intersection point of the two diagonals AC and BD based on their equations. Based on the coordinates of the four corner points, calculate the coordinates of the geometric center of the four corner points; Calculate the second distance between the intersection point of the equations of the lines and the geometric center; Based on the first diagonal length and the second diagonal length, as well as the second distance, the diagonal rectangularity index of the current calibration board grid is calculated.

7. The image correction evaluation method as described in claim 1, characterized in that, The step of calculating the straightness index, rectangularity index, and spatial uniformity index of the corrected image based on the corner coordinates further includes calculating the spatial uniformity index: The corrected image is divided into a central region and an edge region; Calculate the average rectangularity of all calibration grids in the central and edge regions respectively; The ratio of the average rectangularity of the edge region to the average rectangularity of the center region is calculated and used as the spatial uniformity index.

8. The image correction evaluation method according to any one of claims 1-7, characterized in that, The comprehensive evaluation score includes a first grading standard and a second grading standard. The comprehensive evaluation score for image correction of the camera calibration parameters, generated based on the straightness index, rectangularity index, and spatial uniformity index, includes: The radial distortion correction quality is evaluated based on the straightness index using a first-level standard. The quality of tangential distortion correction is evaluated using a second-level standard based on the rectangularity index and / or the spatial uniformity index.

9. An image correction and evaluation device, characterized in that, The image correction and evaluation device includes: The data acquisition module is used to acquire the calibration board image after distortion correction based on camera calibration parameters, and extract the corner coordinates in the corrected image; The index calculation module is used to calculate the straightness index, rectangularity index, and spatial uniformity index of the corrected image based on the corner coordinates. The straightness index refers to one or a set of values ​​used to quantify the actual straightness of straight lines in the corrected image, reflecting the recovery or preservation of straight line features after radial distortion correction. The rectangularity index refers to one or a set of values ​​used to quantify the degree to which the shape of each grid cell enclosed by the corner points in the corrected image resembles an ideal rectangle, indicating the preservation of right angles and parallel sides after tangential and perspective distortion correction. The spatial uniformity index is a value used to quantify the consistency of the correction effect across the entire image field of view, revealing spatial non-uniformity by comparing the geometric properties of different regions of the image. The calibration evaluation module is used to generate a comprehensive evaluation of the image correction of the camera calibration parameters based on the straightness index, rectangularity index, and spatial uniformity index.

10. An image correction and evaluation device, characterized in that, The device includes: a memory, a processor, and a computer program stored in the memory and executable on the processor, the computer program being configured to implement the steps of the image correction evaluation method as described in any one of claims 1 to 8.

Citation Information

Patent Citations

  • Camera distortion image correction method based on polar coordinates

    CN111383194A

  • Checkerboard calibration board angular point screening method, device and equipment and storage medium

    CN119339099A