Multi-angle adaptive distortion rate calculation method and device, equipment and storage medium

By identifying the corner points of a checkerboard image, reshaping it into a corner point matrix, fitting edge curves, determining the vertices where the edge curves intersect, connecting the fitted straight lines, and translating to the point of maximum deviation, the problem of inaccurate distortion rate calculation in traditional methods for non-horizontal checkerboard images or lenses with large distortion is solved, and accurate distortion rate calculation at different angles is achieved.

CN119172523BActive Publication Date: 2026-03-20WUHAN JINGLI ELECTRONICS TECH +2
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-08-27
Publication Date
2026-03-20

AI Technical Summary

Technical Problem

Traditional distortion rate calculation methods have limitations when processing non-horizontal checkerboard images or lenses with large distortion, resulting in inaccurate distortion rate calculations.

Method used

By identifying the corner points of the checkerboard image, reshaping it into a corner point matrix, fitting edge curves, determining the vertices where the edge curves intersect, connecting the fitted straight lines and translating them to the point of maximum deviation, and calculating the distortion rate.

Benefits of technology

It enables accurate calculation of distortion rate under shooting conditions at different angles, improving the applicability and accuracy of distortion rate calculation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119172523B_ABST
    Figure CN119172523B_ABST
Patent Text Reader

Abstract

The application discloses a multi-angle adaptive distortion rate calculation method and device, equipment and a storage medium, relates to the technical field of machine vision industrial detection, and the multi-angle adaptive distortion rate calculation method comprises the following steps: identifying the corner points of a target checkerboard image, remodeling the corresponding corner point matrix according to the row and column number of the identified corner points; fitting an edge curve according to the edge points of the corner point matrix, determining a first vertex where the edge curve intersects, connecting two adjacent first vertices to form a fitting straight line, and determining the maximum deviation point of the edge points relative to the fitting straight line; translating each fitting straight line to the maximum deviation point, obtaining a second vertex formed by the intersection of the translated straight lines, and calculating the distortion rate according to the positions of the first vertex and the second vertex. The application has high applicability, can flexibly cope with different angle shooting conditions, and thus realizes more accurate distortion rate calculation.
Need to check novelty before this filing date? Find Prior Art

Description

TECHNICAL FIELD

[0001] The present application relates to the technical field of machine vision industrial detection, in particular to a multi-angle adaptive distortion rate calculation method, device, equipment and storage medium. BACKGROUND

[0002] Lens distortion refers to the phenomenon that straight-line objects in an image are curved or distorted during imaging due to imperfections in lens design and manufacturing as well as optical properties.

[0003] In the field of machine vision, accurate image processing and analysis are crucial for industrial detection, automation production and other applications. Therefore, the correction of lens distortion and the calculation of distortion rate become a key link to ensure the accuracy and reliability of image processing results.

[0004] Traditional distortion rate calculation methods are usually only applicable to horizontally placed checkerboard images and work better for lenses with small distortion. This method evaluates the distortion rate by calculating the minimum circumscribed rectangle of all corner points. However, this method may have limitations when dealing with non-horizontal checkerboard images or lenses with large distortion. SUMMARY

[0005] The present application provides a multi-angle adaptive distortion rate calculation method, device, equipment and storage medium, which has high applicability and can flexibly cope with different angle shooting conditions, thereby realizing more accurate distortion rate calculation.

[0006] In a first aspect, the present application provides a multi-angle adaptive distortion rate calculation method, which comprises:

[0007] Identifying the corner points of the target checkerboard image, and remodeling the corner point matrix according to the row and column number of the identified corner points;

[0008] Fitting an edge curve according to the edge points of the corner point matrix, determining the first vertex where the edge curves intersect, connecting the adjacent two first vertices to form a fitting straight line, and determining the maximum deviation point of the edge points relative to the fitting straight line;

[0009] Translate each fitting straight line to the maximum deviation point, obtain the second vertex formed by the intersection of the translated straight lines, and calculate the distortion rate according to the positions of the first vertex and the second vertex.

[0010] In combination with the first aspect, in an implementation manner, the fitting of the edge curve according to the edge points of the corner point matrix and the determination of the first vertex where the edge curves intersect comprises:

[0011] Extracting the corner points in the first row, the first column, the last row and the last column of the corner point matrix, and fitting four corresponding edge curves respectively;

[0012] The intersection points of two of the four edge curves are taken as the first vertex.

[0013] In combination with the first aspect, in an implementation, the translation of each of the fitting straight lines to the maximum offset point, the acquisition of the second vertex formed by the intersection of the translated straight lines, and the calculation of the distortion rate according to the positions of the first vertex and the second vertex include:

[0014] The four fitting straight lines are respectively translated to the respective maximum offset points, the straight line equations are regenerated, and the intersection points of two of the four translated straight lines are taken as the second vertex.

[0015] The coordinates of the center point are calculated according to the coordinates of the second vertex, and the distortion rates of the upper left corner, the lower left corner, the upper right corner, and the lower right corner are respectively determined according to the ratio of the distance from the first vertex to the second vertex to the distance from the second vertex to the center point.

[0016] In combination with the first aspect, in an implementation, the calculation of the coordinates of the center point according to the coordinates of the second vertex and the determination of the distortion rates of the upper left corner, the lower left corner, the upper right corner, and the lower right corner according to the ratio of the distance from the first vertex to the second vertex to the distance from the second vertex to the center point include:

[0017] The average of the horizontal coordinates of the four second vertices and the average of the vertical coordinates of the four second vertices are taken as the coordinates of the center point O.

[0018] The distortion rate of the upper left corner is calculated according to the formula: DistLT = |AA'| / |OA'|.

[0019] The distortion rate of the lower left corner is calculated according to the formula: DistLT = |AA'| / |OA'|.

[0020] The distortion rate of the upper right corner is calculated according to the formula: DistLT = |AA'| / |OA'|.

[0021] The distortion rate of the lower right corner is calculated according to the formula: DistLT = |AA'| / |OA'|.

[0022] Wherein, A, B, C, D are the first vertex, and A', B', C', D' are the second vertex.

[0023] In combination with the first aspect, in an implementation, before the identification of the corner points of the target checkerboard image, the method further includes:

[0024] A plurality of angle checkerboard images are collected to calculate the distortion correction parameters of the camera module.

[0025] A target checkerboard image is obtained by correcting a checkerboard image according to the distortion correction parameters.

[0026] In combination with the first aspect, in an implementation, the collecting the checkerboard images at multiple angles to calculate the distortion correction parameters of the camera module comprises:

[0027] The central optical axis of the lens is kept unchanged, and the checkerboard images at multiple angles are collected by means of translation and / or rotation around the center point of the camera module;

[0028] The distortion correction parameters of the camera module are calculated according to the checkerboard images at multiple angles.

[0029] In combination with the first aspect, in an implementation, the checkerboard images of the camera module in the upward translation, downward translation, leftward translation, rightward translation, clockwise rotation around the center point and counterclockwise rotation around the center point are collected, and 10 checkerboard images are collected in each manner;

[0030] The distortion correction parameters of the camera are calculated according to the 60 checkerboard images in the 6 manners.

[0031] The second aspect provides a multi-angle adaptive distortion rate calculation device, which comprises:

[0032] An identification module is configured to identify the corner points of a target checkerboard image, and to reshape the identified corner points into a corresponding corner point matrix according to the number of rows and columns of the identified corner points;

[0033] A fitting module is configured to fit an edge curve according to the edge points of the corner point matrix, to determine a first vertex where the edge curve intersects, to connect two adjacent first vertices to form a fitting straight line, and to determine a maximum deviation point of the edge points relative to the fitting straight line;

[0034] A calculation module is configured to translate each fitting straight line to the maximum deviation point, to obtain a second vertex formed by the intersection of the translated straight lines, and to calculate a distortion rate according to the positions of the first vertex and the second vertex.

[0035] The third aspect provides a multi-angle adaptive distortion rate calculation device, which comprises a processor, a memory, and a multi-angle adaptive distortion rate calculation program stored in the memory and executable by the processor, wherein the multi-angle adaptive distortion rate calculation program, when executed by the processor, implements the steps of the multi-angle adaptive distortion rate calculation method.

[0036] The fourth aspect provides a computer readable storage medium, which stores a multi-angle adaptive distortion rate calculation program, wherein the multi-angle adaptive distortion rate calculation program, when executed by a processor, implements the steps of the multi-angle adaptive distortion rate calculation method.

[0037] The technical scheme provided by the embodiments of the present application has at least the following beneficial effects:

[0038] The multi-angle adaptive distortion rate calculation method in the present application identifies the corner points of a target checkerboard image, and according to the number of rows and columns of the identified corner points, restores a corresponding corner point matrix; according to the edge points of the corner point matrix, an edge curve is fitted, a first vertex where the edge curve intersects is determined, a fitting straight line is formed by connecting two adjacent first vertices, and a maximum deviation point relative to the fitting straight line among the edge points is determined; each fitting straight line is translated to the maximum deviation point, a second vertex formed by the intersection of the translated straight lines is obtained, and the distortion rate is calculated according to the positions of the first vertex and the second vertex.

[0039] The present application uses curve fitting and translation based on the maximum deviation point to calculate the distortion rate, which can accurately solve the distortion rate even if the checkerboard image is subjected to horizontal two-dimensional rotation, has high applicability, can flexibly cope with different angles of shooting, and thus realizes more accurate distortion rate calculation. BRIEF DESCRIPTION OF DRAWINGS

[0040] Figure 1 The figure is a flowchart of an embodiment of the multi-angle adaptive distortion rate calculation method of the present application;

[0041] Figure 2 The figure is a schematic diagram of the multi-angle checkerboard image acquisition method of the present application;

[0042] Figure 3 The figure is a process diagram of the distortion correction and distortion rate calculation of the present application;

[0043] Figure 4 The figure is a schematic diagram of the edge curve and the fitting straight line when the distortion rate is calculated in the present application;

[0044] Figure 5 The figure is a structural block diagram of an embodiment of the multi-angle adaptive distortion rate calculation device of the present application;

[0045] Figure 6 The figure is a schematic diagram of the hardware structure of the multi-angle adaptive distortion rate calculation device involved in the embodiment of the present application. DETAILED DESCRIPTION

[0046] In order to enable the persons skilled in the art to better understand the present application, the technical scheme in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only a part of the embodiments of the present application, but not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by the persons skilled in the art without creative labor fall within the scope of protection of the present application.

[0047] The terms "comprise", "comprising", "include", "including", "have" and "having" and any variations thereof in the specification and in the claims are intended to cover both the express and implicit described features. For example, a process, method, system, product, or apparatus that comprises a list of steps or elements is not necessarily limited to those listed steps or elements but can include other not-listed steps or elements. The terms "first", "second", and "third" and the like, are used to distinguish between similar objects and are not necessarily used to indicate the order or precedence. Such terms are used interchangeably and are not necessarily used as superlatives.

[0048] In the description of the embodiments of the present application, "exemplary", "for example", "e.g." or "for instance" are used on the basis that a proper meaning of the words is taken. Any embodiment or design scheme described as "exemplary", "for example", "e.g." or "for instance" in the embodiments of the present application should not be interpreted as being more preferred or having more advantages than other embodiments or design schemes. In fact, the words "exemplary", "for example", "e.g." or "for instance" are used in the sense of presenting a concept in a concrete manner.

[0049] In the description of the embodiments of the present application, unless otherwise specified, " / " means or, for example, A / B can mean A or B; "and / or" in the text only means a description of a relationship between associated objects, which means that there can be three relationships, for example, A and / or B can mean that there are three cases of A alone, A and B together, and B alone. In addition, in the description of the embodiments of the present application, "multiple" means two or more than two.

[0050] In some of the processes described in the embodiments of the present application, a plurality of operations or steps are included in a specific order, but it should be understood that these operations or steps can be executed or performed in parallel or in an order different from that in which they appear in the embodiments of the present application. The serial number of the operation is only used to distinguish different operations, and the serial number itself does not represent any execution order. In addition, these processes can include more or fewer operations, and these operations or steps can be executed in sequence or in parallel, and these operations or steps can be combined.

[0051] In order to make the purposes, technical solutions and advantages of the present application clearer, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0052] In a first aspect, the embodiments of the present application provide a multi-angle adaptive distortion rate calculation method.

[0053] In an embodiment, with reference to Figure 1 , Figure 1 is a flowchart of an embodiment of the multi-angle adaptive distortion rate calculation method of the present application. As shown in Figure 1As shown, the multi-angle adaptive distortion rate calculation method comprises:

[0054] S1, identifying the corner points of the target checkerboard image, and remodeling the identified corner points into a corresponding corner point matrix according to the number of rows and columns of the identified corner points;

[0055] It is worth noting that in order to remodel the identified corner points into a corner point matrix of corresponding size, it is necessary to first ensure that there is an array containing all the corner point coordinates, which is a two-dimensional array (horizontal coordinate and vertical coordinate) containing all the corner point coordinates. After determining the number of rows and columns of the checkerboard, remodeling can begin. In addition, to calculate the distortion rate, the checkerboard image can be directly collected and then calculated. In actual production process, for fisheye lens and the like, the camera module needs to be calibrated first to obtain its intrinsic parameters and distortion parameters, and then the calibrated parameters are used to correct the checkerboard image, and finally the distortion rate is calculated to determine whether it meets the index requirements.

[0056] Therefore, before step S1, it also includes:

[0057] Collecting a plurality of angle checkerboard images to calculate the distortion correction parameters of the camera module;

[0058] Correcting a checkerboard image according to the distortion correction parameters to obtain a target checkerboard image.

[0059] Specifically, the camera module includes a camera and a lens. In this embodiment, the method adopted is to keep the central optical axis of the lens unchanged, and collect a plurality of angle checkerboard images by translating and / or rotating the camera module around the center point. The distortion correction parameters of the camera module are calculated according to the plurality of angle checkerboard images.

[0060] Referring to Figure 2 As shown, a specific implementation is given, in Figure 2 In the above, translation is performed to the left, right, up and down respectively, and 10 checkerboard images are collected in each direction. In addition, clockwise and counterclockwise rotation is also performed around the center, and 10 checkerboard images are also collected in each rotation direction.

[0061] Then the 60 checkerboard images are imported into MATLAB, and the detectCheckerboardPoints function (MATLAB internal function) in the camera calibration toolbox of MATLAB is used to detect the checkerboard corner points. The checkerboard corner point is a commonly used marker point for camera calibration and other geometric transformation tasks in computer vision, which is the black and white intersection point on the checkerboard.

[0062] For the detectCheckerboardPoints function:

[0063] [imagePoints, boardSize, imagesUsed] = detectCheckerboardPoints(images);

[0064] boardSize: This is a two-element vector [rows, columns] representing the number of rows and columns of inner corners of the checkerboard;

[0065] imagePoints: Stores the coordinates of the detected corners in each image;

[0066] In addition, the world coordinates of the checkerboard need to be set:

[0067] Define the actual world coordinates of the corners on the checkerboard;

[0068] squareSize = 50%; The actual side length of each square on the photographed checkerboard, in millimeters;

[0069] worldPoints = generateCheckerboardPoints(boardSize, squareSize);

[0070] In this embodiment, when calibrating the camera in MATLAB:

[0071] Use the estimateCameraParameters function to estimate the camera intrinsic and distortion parameters;

[0072] [cameraParams, imagesUsed, estimationErrors] = estimateCameraParameters(imagePoints, worldPoints);

[0073] Use the undistortImage function to correct the distorted image;

[0074] undistortedImage = undistortImage(distortedImage, cameraParams);

[0075] The correction parameters are cameraParams, which include the following parameters:

[0076] Radial distortion parameters (cameraParams.RadialDistortion): used to correct the stretching or contraction of the image in the radial direction.

[0077] cameraParams.TangentialDistortion: used to correct the tangential distortion caused by the non-parallel or misaligned assembly between the lens and the image sensor.

[0078] camera intrinsic parameters, comprising:

[0079] cameraParams.FocalLength: describes the focal length of the camera lens;

[0080] cameraParams.PrincipalPoint: the principal point of the image, usually the center of the image;

[0081] cameraParams.IntrinsicMatrix: contains information about focal length and principal point.

[0082] S2, fitting an edge curve according to the edge points of the corner point matrix, determining a first vertex where the edge curves intersect, connecting two adjacent first vertices to form a fitting straight line, and determining a maximum deviation point of the edge points relative to the fitting straight line;

[0083] In a specific implementation, the first row, the first column, the last row, and the last column of the corner point matrix are extracted, and four edge curves are fitted respectively. The intersection points of the four edge curves are taken as the first vertices. The corner points of the first row, the first column, the last row, and the last column correspond to the outermost corner points, and the edge curves generated by these corner points are the outermost edge curves. The specific curves can be referred to in the following figure: Figure 4

[0084] It can be understood that there are four intersection points of the four edge curves, and four fitting straight lines are formed by connecting two adjacent first vertices. The shape is similar to a rectangle. Then, by calculating the perpendicular distance, the maximum deviation point of the edge points relative to the fitting straight line can be found.

[0085] S3, translating each fitting straight line to the maximum deviation point, obtaining a second vertex formed by the intersection of the translated straight lines, and calculating the distortion rate according to the positions of the first vertex and the second vertex.

[0086] In a specific implementation, the method used in this embodiment is as follows:

[0087] The four fitting straight lines are translated to the respective maximum deviation points, the straight line equations are regenerated, the intersection points of the four translated straight lines are taken as the second vertices, the coordinates of the center point are calculated according to the coordinates of the second vertices, and the distortion rates of the upper left corner, the lower left corner, the upper right corner, and the lower right corner are determined according to the ratio of the distance from the first vertex to the second vertex to the distance from the second vertex to the center point.​

[0088] Referring to Figure 3 As shown in the process diagram of distortion correction and distortion rate calculation of the present application, after obtaining the distortion correction parameters, the checkerboard image can be corrected, and then the distortion rate is calculated to evaluate whether the camera meets the requirements.

[0089] It is worth noting that in the prior art, the distortion rate is evaluated by calculating the minimum circumscribed rectangle of all corner points. This method may have limitations when dealing with non-horizontal checkerboard images or lenses with large distortion, mainly because the shape of the non-horizontal checkerboard image may have problems when determining the minimum circumscribed rectangle, resulting in inaccurate distortion rate calculation. However, the present embodiment can well solve the problem of the minimum circumscribed rectangle by determining the vertex and the maximum offset point, thereby flexibly coping with different angles of shooting, and achieving more accurate distortion rate calculation.

[0090] The following is further illustrated with a specific example:

[0091] Referring to Figure 4 As shown in the process diagram of distortion correction and distortion rate calculation of the present application, after obtaining the distortion correction parameters, the checkerboard image can be corrected, and then the distortion rate is calculated to evaluate whether the camera meets the requirements. Figure 4 The left upper corner (A), the left lower corner (B), the right lower corner (C), and the right upper corner (D) are the positions of the four first vertices.

[0092] A straight line is fitted for each two adjacent vertices, i.e. straight lines AB, AD, BC, and CD are obtained. The perpendicular distance of all edge curves to the fitted straight line is calculated, and four maximum offset points maxDitance are found.

[0093] The fitted straight line is translated to the maximum offset point, the straight line equation is redefined, the intersection of the translated straight line is calculated, and the four new intersection positions (A', B', C', and D') of the rectangle are obtained.

[0094] Wherein, A' = [X1, Y1], B' = [X2, Y2], C' = [X3, Y3], D' = [X4, Y4], A = [x1, y1], B = [x2, y2], C = [x3, y3], D = [x4, y4];

[0095] The coordinates of the O point are:

[0096] O = [(X1+X2+X3+X4) / 4, (Y1+Y2+Y3+Y4) / 4];

[0097] Thus, the distortion rate of the left upper corner: DistLT = |AA'| / |OA'|, wherein |AA'| is the distance between the second vertex and the first vertex A, and |OA'| is the distance from the image calculation point A' to the center O. The following parameters are the same.

[0098] DistLB = |BB'| / |OB';

[0099] DistRB = |CC'| / |OC';

[0100] DistRT = |DD'| / |OD'.

[0101] Thus, the distortion rate of the checkerboard image is determined.

[0102] In summary, the multi-angle adaptive distortion rate calculation method in the present application identifies the corner points of the target checkerboard image, remolds the corner point matrix according to the row and column number of the identified corner points, fits the edge curve according to the edge points of the corner point matrix, determines the first vertex where the edge curves intersect, connects the adjacent two first vertices to form a fitting straight line, determines the maximum deviation point of the edge points relative to the fitting straight line, translates each fitting straight line to the maximum deviation point, obtains the second vertex formed by the intersection of the translated straight lines, and calculates the distortion rate according to the positions of the first vertex and the second vertex.

[0103] The present application adopts the curve fitting and translation based on the maximum deviation point to calculate the distortion rate, can still accurately solve the distortion rate in the case that the checkerboard image is subjected to horizontal two-dimensional rotation, has high applicability, can flexibly cope with different angle shooting conditions, and thus realizes more accurate distortion rate calculation.

[0104] In a second aspect, the embodiments of the present application further provide a multi-angle adaptive distortion rate calculation device.

[0105] In an embodiment, the multi-angle adaptive distortion rate calculation device comprises a recognition module, a fitting module and a calculation module. Figure 5 , Figure 5 is a functional module schematic diagram of an embodiment of the multi-angle adaptive distortion rate calculation device of the present application. As shown in the figure, the multi-angle adaptive distortion rate calculation device comprises a recognition module, a fitting module and a calculation module. Figure 5

[0106] The recognition module is configured to identify the corner points of the target checkerboard image, and remold the corner point matrix according to the row and column number of the identified corner points.

[0107] The fitting module is configured to fit the edge curve according to the edge points of the corner point matrix, determine the first vertex where the edge curves intersect, connect the adjacent two first vertices to form a fitting straight line, and determine the maximum deviation point of the edge points relative to the fitting straight line.

[0108] The calculation module is configured to translate each fitting straight line to the maximum deviation point, obtain the second vertex formed by the intersection of the translated straight lines, and calculate the distortion rate according to the positions of the first vertex and the second vertex. ​

[0109] Further, in an embodiment, the fitting module fits edge curves according to edge points of the corner point matrix, and determines first vertices where the edge curves intersect, including:

[0110] Extracting corner points in the first row, the first column, the last row and the last column of the corner point matrix, and fitting four corresponding edge curves respectively;

[0111] Taking intersection points of two of the four edge curves as the first vertices.

[0112] Further, in an embodiment, the calculation module translates each of the fitted straight lines to a maximum offset point, obtains second vertices formed by intersections of the translated straight lines, and calculates the distortion rate according to positions of the first vertices and the second vertices, including:

[0113] Translating the four fitted straight lines to their respective maximum offset points, re-generating straight line equations, and taking intersection points of two of the four translated straight lines as the second vertices;

[0114] According to coordinates of the second vertices, calculating coordinates of a center point, and according to a ratio of a distance from the first vertex to the second vertex to a distance from the second vertex to the center point, determining distortion rates of the upper left corner, the lower left corner, the upper right corner and the lower right corner respectively.

[0115] Further, in an embodiment, the calculation module calculates coordinates of a center point according to coordinates of the second vertices, and determines distortion rates of the upper left corner, the lower left corner, the upper right corner and the lower right corner according to a ratio of a distance from the first vertex to the second vertex to a distance from the second vertex to the center point, including:

[0116] Taking an average of horizontal coordinates of the four second vertices and an average of vertical coordinates of the four second vertices as coordinates of the center point O;

[0117] According to a formula: DistLT = |AA'| / |OA'|, calculating the distortion rate of the upper left corner;

[0118] According to a formula: DistLT = |AA'| / |OA'|, calculating the distortion rate of the lower left corner;

[0119] According to a formula: DistLT = |AA'| / |OA'|, calculating the distortion rate of the upper right corner;

[0120] According to a formula: DistLT = |AA'| / |OA'|, calculating the distortion rate of the upper right corner;

[0121] Wherein, A, B, C and D are the first vertices, and A', B', C' and D' are the second vertices.

[0122] Further, in an embodiment, the collection module is further configured to, before the identification module identifies the corner points of the target checkerboard image, collect a plurality of checkerboard images at different angles.

[0123] collect a plurality of checkerboard images at different angles to calculate the distortion correction parameters of the camera module;

[0124] correct a checkerboard image according to the distortion correction parameters to obtain a target checkerboard image.

[0125] Further, in an embodiment, the collection module collects a plurality of checkerboard images at different angles to calculate the distortion correction parameters of the camera module, including:

[0126] keeping the central optical axis of the lens unchanged, collecting a plurality of checkerboard images at different angles by translating and / or rotating the camera module around the center point;

[0127] calculating the distortion correction parameters of the camera module according to the plurality of checkerboard images at different angles.

[0128] Further, in an embodiment, the collection module is configured to collect checkerboard images of the camera module in the following six ways: upward translation, downward translation, leftward translation, rightward translation, clockwise rotation around the center point, and counterclockwise rotation around the center point, and 10 checkerboard images are collected in each way.

[0129] calculating the distortion correction parameters of the camera according to the 60 checkerboard images in the six ways.

[0130] The functions of each module in the above multi-angle adaptive distortion rate calculation device correspond to the steps in the above multi-angle adaptive distortion rate calculation method embodiment, and the functions and implementation processes will not be repeated here.

[0131] In a third aspect, the embodiments of the present application provide a multi-angle adaptive distortion rate calculation device. The multi-angle adaptive distortion rate calculation device can be a personal computer (PC), a notebook computer, a server, or other devices with data processing functions.

[0132] Reference is made to Figure 6 , Figure 6 FIG. 1 is a schematic diagram of a hardware structure of a multi-angle adaptive distortion rate calculation device involved in the embodiments of the present application. In the embodiments of the present application, the multi-angle adaptive distortion rate calculation device can include a processor, a memory, a communication interface, and a communication bus.

[0133] The communication bus can be of any type, used to interconnect the processor, the memory, and the communication interface.

[0134] The communication interface includes an input / output (I / O) interface, a physical interface, and a logical interface, and the like, which are used to realize the interconnection of devices inside the multi-angle adaptive distortion rate calculation device, and are used to realize the interconnection of the multi-angle adaptive distortion rate calculation device and other devices (such as other computing devices or user devices). The physical interface can be an Ethernet interface, a fiber interface, an ATM interface, and the like; the user device can be a display (Display), a keyboard (Keyboard), and the like.

[0135] The memory can be various types of storage media, such as random access memory (RAM), read-only memory (ROM), non-volatile RAM (NVRAM), flash memory, optical storage, hard disk, programmable ROM (PROM), erasable PROM (EPROM), electrically erasable PROM (EEPROM), and the like.

[0136] The processor can be a general-purpose processor, which can call a multi-angle adaptive distortion rate calculation program stored in the memory and execute the multi-angle adaptive distortion rate calculation method provided by the embodiments of the present application. For example, the general-purpose processor can be a central processing unit (CPU). The method executed by the multi-angle adaptive distortion rate calculation program when called can refer to various embodiments of the multi-angle adaptive distortion rate calculation method of the present application, which will not be repeated here.

[0137] Those skilled in the art can understand that the hardware structure shown in the above-mentioned embodiments is not a limitation of the present application, and can include more or fewer components than those shown in the figure, or combine certain components, or different component arrangements. Figure 6

[0138] In a fourth aspect, the embodiments of the present application further provide a readable storage medium.

[0139] The readable storage medium of the present application stores a multi-angle adaptive distortion rate calculation program, wherein when the multi-angle adaptive distortion rate calculation program is executed by the processor, the steps of the multi-angle adaptive distortion rate calculation method as described above are realized.

[0140] The method realized by the multi-angle adaptive distortion rate calculation program when executed can refer to various embodiments of the multi-angle adaptive distortion rate calculation method of the present application, which will not be repeated here.

[0141] ​It should be noted that the above application embodiment serial number is only for description, not representing the pros and cons of the embodiment.

[0142] Through the above description of the embodiments, those skilled in the art can clearly understand that the above-mentioned embodiment method can be realized by means of software and the necessary general hardware platform, of course, it can also be realized by hardware, but in many cases the former is a better embodiment. Based on such understanding, the technical solutions of the present application can be embodied in the form of a software product, which is stored in a storage medium (such as ROM / RAM, magnetic disk, optical disk) as described above, and includes a plurality of instructions to make a terminal device execute the method described in each embodiment of the present application.

[0143] The above is only the preferred embodiment of the present application, and does not limit the patent scope of the present application, and any equivalent structure or equivalent process transformation using the content of the present application specification and drawings, or directly or indirectly applied in other related technical fields, are also included in the patent protection scope of the present application.

Claims

1. A multi-angle adaptive distortion rate calculation method, characterized in that, The multi-angle adaptive distortion rate calculation method includes: Identify the corner points of the target chessboard image, and reconstruct the corresponding corner point matrix based on the number of rows and columns of the identified corner points; Based on the edge points of the corner point matrix, fit the edge curve, determine the first vertex where the edge curves intersect, connect two adjacent first vertices to form a fitting straight line, and determine the maximum deviation point of the edge points relative to the fitting straight line. Each fitted line is translated to the maximum offset point, and the second vertex formed by the intersection of the translated lines is obtained. The distortion rate is calculated based on the positions of the first and second vertices. The step of translating each of the fitted lines to the maximum offset point, obtaining the second vertex formed by the intersection of the translated lines, and calculating the distortion rate based on the positions of the first and second vertices includes: The four fitted lines are translated to their respective maximum offset points, and the line equations are regenerated. The intersection points of the four translated lines are taken as the second vertices. Calculate the coordinates of the center point based on the coordinates of the second vertex. Determine the distortion rates of the top left, bottom left, top right, and bottom right corners based on the ratio of the distance from the first vertex to the second vertex to the distance from the second vertex to the center point.

2. The multi-angle adaptive distortion rate calculation method as described in claim 1, characterized in that, The step of fitting an edge curve based on the edge points of the corner point matrix and determining the first vertex where the edge curves intersect includes: Extract the corner points of the first row, first column, last row, and last column of the corner point matrix, and fit the corresponding four edge curves respectively; The first vertex is the point where each pair of the four edge curves intersects.

3. The multi-angle adaptive distortion rate calculation method as described in claim 1, characterized in that, The process of calculating the coordinates of the center point based on the coordinates of the second vertex, and determining the distortion rates of the top-left, bottom-left, top-right, and bottom-right corners based on the ratio of the distance from the first vertex to the second vertex to the distance from the second vertex to the center point, includes: The average of the x-coordinates and y-coordinates of the four second vertices is used as the coordinates of the center point O. Calculate the distortion rate of the top left corner using the formula: DistLT = |AA'| / |OA'|; Calculate the distortion rate at the bottom left corner using the formula: DistLT = |AA'| / |OA'|; Calculate the distortion rate in the upper right corner using the formula: DistLT = |AA'| / |OA'|; Calculate the distortion rate in the upper right corner using the formula: DistLT = |AA'| / |OA'|; Among them, A, B, C, and D are the first vertices, and A', B', C', and D' are the second vertices.

4. The multi-angle adaptive distortion rate calculation method as described in claim 1, characterized in that, Before identifying the corner points of the target checkerboard image, the method further includes: Collect checkerboard images from multiple angles to calculate the distortion correction parameters of the camera module; The target chessboard image is obtained by correcting a chessboard image according to the distortion correction parameters.

5. The multi-angle adaptive distortion rate calculation method as described in claim 4, characterized in that, The acquisition of checkerboard images from multiple angles to calculate the distortion correction parameters of the camera module includes: Keeping the central optical axis of the lens unchanged, the checkerboard image is acquired from multiple angles by translating and / or rotating the camera module around the center point; The distortion correction parameters of the camera module are calculated based on checkerboard images from multiple angles.

6. The multi-angle adaptive distortion rate calculation method as described in claim 5, characterized in that: The camera module is used to capture checkerboard images by translating upwards, downwards, leftwards, rightwards, rotating clockwise around the center point, and rotating counterclockwise around the center point. Ten checkerboard images are captured for each method. The camera's distortion correction parameters were calculated based on 60 checkerboard images from 6 different methods.

7. A multi-angle adaptive distortion rate calculation device, characterized in that, The multi-angle adaptive distortion rate calculation device includes: The recognition module is used to identify the corner points of the target chessboard image and reshape them into the corresponding corner point matrix based on the number of rows and columns of the identified corner points. The fitting module fits the edge curves based on the edge points of the corner point matrix, determines the first vertex where the edge curves intersect, connects two adjacent first vertices to form a fitting line, and determines the maximum deviation point of the edge points relative to the fitting line. The calculation module is used to translate each of the fitted lines to the maximum offset point, obtain the second vertex formed by the intersection of the translated lines, and calculate the distortion rate based on the positions of the first vertex and the second vertex. The step of translating each of the fitted lines to the maximum offset point, obtaining the second vertex formed by the intersection of the translated lines, and calculating the distortion rate based on the positions of the first and second vertices includes: The four fitted lines are translated to their respective maximum offset points, and the line equations are regenerated. The intersection points of the four translated lines are taken as the second vertices. Calculate the coordinates of the center point based on the coordinates of the second vertex. Determine the distortion rates of the top left, bottom left, top right, and bottom right corners based on the ratio of the distance from the first vertex to the second vertex to the distance from the second vertex to the center point.

8. A multi-angle adaptive distortion rate calculation device, characterized in that, The multi-angle adaptive distortion rate calculation device includes a processor, a memory, and a multi-angle adaptive distortion rate calculation program stored in the memory and executable by the processor, wherein when the multi-angle adaptive distortion rate calculation program is executed by the processor, it implements the steps of the multi-angle adaptive distortion rate calculation method as described in any one of claims 1 to 6.

9. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores a multi-angle adaptive distortion rate calculation program, wherein when the multi-angle adaptive distortion rate calculation program is executed by a processor, it implements the steps of the multi-angle adaptive distortion rate calculation method as described in any one of claims 1 to 6.

Citation Information

Patent Citations

  • Image correction method and device, display equipment, storage medium and program product

    CN116664437A

  • Lens distortion parameter testing method, system and device and storage medium

    CN117969034A