High-precision Camera Image Calibration and Distortion Correction Method, System and Storage Medium
By establishing a position calibration mapping table and actual scale, the position of each pixel point is directly corrected, and the problem of low imaging accuracy caused by lens distortion is solved, and high-precision image correction effect is achieved.
Patent Information
- Application Number
- CN202211475309.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-11-23
- Publication Date
- 2025-08-01
- Estimated Expiration
- 2042-11-23
AI Technical Summary
In the prior art, the imaging accuracy caused by lens distortion during camera image calibration is low, especially inconsistent errors at different positions in the field of view. The existing methods cannot effectively reduce this error by taking the mean value.
Establish a position calibration mapping table, obtain the CCD camera image information, extract the actual scale of each pixel row, and use the mapping table to correct the position of each pixel point, directly correct each pixel point to reduce the impact of lens distortion.
It improves the absolute accuracy of imaging, reduces the error caused by lens distortion, and enhances the flatness and accuracy of the image contour.
Smart Images

Figure CN115937023B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of digital image processing technology, and particularly relates to a high-precision camera image calibration distortion correction method, system and storage medium. Background Art
[0002] Distortion refers to the degree of distortion of the image formed by an optical system with respect to the object itself, and these distortions are actually caused by the magnification differences of the lens and lens system. For an ideal optical system, on a pair of conjugate object and image planes, the magnification is a constant. However, for an optical system in actual use, it is almost impossible to achieve the ideal state because the magnification of the lens changes with the angle formed between the light beam and the main axis. Generally speaking, when the light is orthogonal to the main axis and passes through the main axis, no distortion occurs. The farther the light is from the main axis, the more obvious the distortion change is.
[0003] In the prior art, the default state in the calibration method is that the imaging system has no distortion, but in actual process, there must be distortion. For a CCD (Charge-coupled Device) camera with a resolution of 1000*1920, when we calibrate, we take the average value of the 1920 point row coordinates extracted in a whole row as the scale value corresponding to this row. In fact, an error is introduced here, and the error sizes at different positions are different: because in the actual process, the distortion is smaller at the center of the field of view. The difference between the center and the edge is about 1 pixel, the difference at the upper end of the field of view is about 2 pixels, and the difference at the lower end of the field of view is even up to about 4 pixels. When we calibrate, the roughness of the target surface is selected to be below 5um (as flat as possible). However, at different positions in the field of view, due to the TV distortion, the contour line that is originally flat in the object space is no longer flat but has a curvature, and the bending degrees at the central field of view and the edge field of view are inconsistent. That is, the existing method of taking the average value of 1920 row pixel coordinate points is a general processing method, which makes its absolute accuracy still relatively low. Summary of the Invention
[0004] The present application aims to at least solve one of the technical problems existing in the prior art. For this purpose, the present application provides a high-precision camera image calibration distortion correction method, system and storage medium, which can reduce the influence brought by the distortion of the lens and improve the absolute accuracy of imaging.
[0005] In a first aspect, the present application provides a high-precision camera image calibration distortion correction method, including: establishing a position calibration mapping table; wherein, the position calibration mapping table is used to represent the mapping relationship between the pixel positions obtained on the CCD camera and the actual positions of these pixel points; obtaining the image information collected from the CCD camera; according to the image information, extracting the first positions of the pixel points in each different pixel row of the image contour obtained on the CCD camera; according to the first positions and the position calibration mapping table, determining the actual scales of the pixel points in each different pixel row of the contour; according to the first positions and the actual scales, obtaining the actual second positions of the pixel points corresponding to each different pixel row in the image contour; and sequentially connecting according to the second positions of all the pixel points to obtain a corrected image.
[0006] The high-precision camera image calibration distortion correction method according to the embodiment of the first aspect of the present application has at least the following beneficial effects: establishing a position calibration mapping table, which is used to represent the mapping relationship between the pixel positions obtained on the CCD camera and the actual positions of these pixel points, that is, providing a table for correcting the pixel positions obtained on the CCD camera to the actual positions. After establishment, in actual use, obtaining the image information collected from the CCD camera, and according to the image information, extracting the first positions of the pixel points in each different pixel row of the image contour obtained on the CCD camera. This first position may deviate from the actual position due to the magnification ratio difference of the lens and lens system. According to the first positions and the position calibration mapping table, determining the actual scales of the pixel points in each different pixel row of the contour, and according to the first positions and the actual scales, obtaining the actual second positions of the pixel points corresponding to each different pixel row in the image contour. Subsequently, connecting the new pixel points at several second positions in sequence can obtain a corrected image. Through the above method, instead of generally correcting the entire contour by using the mean value, it directly corrects the first position of each pixel point on the contour, searches and matches with the established position calibration mapping table to obtain the actual scales of the pixel points in each different pixel row, and corrects to obtain the actual second positions of the pixel points corresponding to each different pixel row. This method can reduce the influence caused by lens distortion and improve the absolute accuracy of imaging.
[0007] According to some embodiments of the first aspect of the present application, the establishment of the position calibration mapping table includes: obtaining the depth of field range of the CCD camera; according to the depth of field range and a preset interval, obtaining a number of image-side lines collected by the CCD camera and the scale values corresponding to each image-side line; and establishing a position calibration mapping table according to the image-side lines and the scale values.
[0008] According to some embodiments of the first aspect of the present application, obtaining a plurality of image-side lines collected by the CCD camera and the scale value corresponding to each image-side line according to the depth of field range and the preset interval includes: obtaining n image-side lines collected by the CCD camera according to the depth of field range and the preset interval; where the value of n is obtained by dividing the depth of field range by the preset interval and then adding 1, and is a positive integer; obtaining the scale value corresponding to each image-side line according to the maximum value of the depth of field range, the minimum value of the depth of field range, and the preset interval.
[0009] According to some embodiments of the first aspect of the present application, establishing a position calibration mapping table according to the image-side line and the scale value includes: forming a mapping relationship between the pixel column of each pixel point in the same image-side line and the same corresponding scale value, and establishing a position calibration mapping table.
[0010] According to some embodiments of the first aspect of the present application, determining the actual scale of the pixel points in each different pixel row in the contour according to the first position and the position calibration mapping table includes: determining the actual scale corresponding to the pixel column in the pixel points in each different pixel row in the contour by matching the pixel row and pixel column of the first position with the position calibration mapping table.
[0011] According to some embodiments of the first aspect of the present application, determining the actual scale corresponding to the pixel column in the pixel points in each different pixel row in the contour by matching the pixel row and pixel column of the first position with the position calibration mapping table includes: determining the closest first calibration point and second calibration point of the first position in the position calibration mapping table according to the pixel row and pixel column of the first position; where the pixel rows of the first calibration point and the second calibration point are the same as the pixel row of the first position, the pixel column of the first calibration point is less than the pixel column of the first position, and the pixel column of the second calibration point is greater than the pixel column of the second position; determining the actual scale corresponding to the pixel column in the pixel points in each different pixel row in the contour according to the first position, the first calibration point, and the second calibration point.
[0012] According to some embodiments of the first aspect of the present application, determining the actual scale corresponding to the pixel column in the pixel points in each different pixel row in the contour according to the first position, the first calibration point, and the second calibration point includes: determining the first actual scale corresponding to the first calibration point and the second actual scale corresponding to the second calibration point according to the first calibration point and the second calibration point; determining the actual scale corresponding to the pixel column in the pixel points in each different pixel row in the contour according to the pixel column of the first position, the pixel column of the first calibration point, the pixel column of the second calibration point, the first actual scale, and the second actual scale.
[0013] According to some embodiments of the first aspect of the present application, obtaining the actual second position of the pixel points corresponding to each different pixel row in the image contour according to the first position and the actual scale includes: replacing the pixel column of the first position with the corresponding actual scale to obtain the actual second position of the pixel points corresponding to each different pixel row in the image contour.
[0014] In a second aspect, the present application further provides a high-precision camera image calibration distortion correction system, including: at least one memory; at least one processor; at least one program; the program is stored in the memory, and the processor executes at least one of the programs to implement the high-precision camera image calibration distortion correction method according to any one of the embodiments of the first aspect.
[0015] The high-precision camera image calibration distortion correction system according to the embodiments of the second aspect of the present application has at least the following beneficial effects: establishing a position calibration mapping table, which is used to represent the mapping relationship between the pixel point positions obtained on the CCD camera and the actual positions of the pixel points, that is, providing a table for correcting the pixel point positions obtained on the CCD camera to the actual positions. After the establishment, in actual use, obtain the image information collected from the CCD camera, and according to the image information, extract the first position of the pixel points of each different pixel row in the image contour obtained on the CCD camera. This first position may deviate from the actual position due to the magnification difference of the lens and lens system. According to the first position and the position calibration mapping table, determine the actual scale of the pixel points of each different pixel row in the contour. According to the first position and the actual scale, obtain the actual second position of the pixel points corresponding to each different pixel row in the image contour. Subsequently, connect the new pixel points of several second positions in sequence to obtain the corrected image. Through the above method, instead of generally correcting the entire contour by the mean method, it directly corrects the first position of each pixel point on the contour, searches for the actual scale of the pixel points of each different pixel row by matching with the established position calibration mapping table, and obtains the actual second position of the pixel points corresponding to each different pixel row after correction. This method can reduce the influence of lens distortion and improve the absolute accuracy of imaging.
[0016] In a third aspect, the present application further provides a computer-readable storage medium, characterized in that the computer-readable storage medium stores computer-executable signals for executing the high-precision camera image calibration distortion correction method according to any one of the embodiments of the first aspect.
[0017] The additional aspects and advantages of the present application will be partially given in the following description, partially become obvious from the following description, or be understood through the practice of the present application. BRIEF DESCRIPTION OF THE DRAWINGS
[0018] Additional aspects and advantages of the present application will become apparent and be readily understood in the description of the embodiments with reference to the following drawings, where:
[0019] Figure 1 is a flowchart of a high-precision camera image calibration distortion correction method according to an embodiment of the present application;
[0020] Figure 2 is a flowchart of a high-precision camera image calibration distortion correction method according to another embodiment of the present application;
[0021] Figure 3 is a flowchart of a high-precision camera image calibration distortion correction method according to another embodiment of the present application;
[0022] Figure 4 is a flowchart of a high-precision camera image calibration distortion correction method according to another embodiment of the present application;
[0023] Figure 5 is a flowchart of a high-precision camera image calibration distortion correction method according to another embodiment of the present application;
[0024] Figure 6 is a flowchart of a high-precision camera image calibration distortion correction method according to another embodiment of the present application;
[0025] Figure 7 is a flowchart of a high-precision camera image calibration distortion correction method according to another embodiment of the present application;
[0026] Figure 8 is a flowchart of a high-precision camera image calibration distortion correction method according to another embodiment of the present application;
[0027] Figure 9 is a schematic structural diagram of a high-precision camera image calibration distortion correction system according to an embodiment of the present application. Detailed Description of the Embodiments
[0028] Embodiments of the present application will be described in detail below. Examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described by referring to the accompanying drawings are exemplary only for explaining the present application and should not be construed as limiting the present application.
[0029] In the description of the present application, it should be understood that regarding the orientation description, for example, the orientation or positional relationship indicated by up, down, front, back, left, right, etc. is based on the orientation or positional relationship shown in the drawings. It is only for the convenience of describing the present application and simplifying the description, rather than indicating or implying that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation. Therefore, it should not be construed as a limitation to the present application.
[0030] In the description of the present application, if the first and second are described only for the purpose of distinguishing technical features, it should not be understood as indicating or implying relative importance or implicitly specifying the quantity of the indicated technical features or implicitly specifying the sequence relationship of the indicated technical features.
[0031] In the description of the present application, unless otherwise clearly defined, terms such as setting, installation, connection, etc. should be understood in a broad sense, and those skilled in the art can reasonably determine the specific meanings of the above terms in the present application in combination with the specific content of the technical solution.
[0032] In a first aspect, with reference to Figure 1 , the present application provides a high-precision camera image calibration distortion correction method, including but not limited to steps S110, S120, S130, S140, S150, and S160:
[0033] Step S110: Establish a position calibration mapping table; wherein, the position calibration mapping table is used to represent the mapping relationship between the pixel positions obtained on the CCD camera and the actual positions of these pixel points;
[0034] Step S120: Obtain the image information collected from the CCD camera;
[0035] Step S130: According to the image information, extract the first positions of the pixel points in each different pixel row of the image contour obtained on the CCD camera;
[0036] Step S140: According to the first positions and the position calibration mapping table, determine the actual scales of the pixel points in each different pixel row of the contour;
[0037] Step S150: According to the first positions and the actual scales, obtain the actual second positions of the pixel points corresponding to each different pixel row in the image contour;
[0038] Step S160: According to the second positions of all the pixel points, connect them in sequence to obtain the corrected image.
[0039] Establish a position calibration mapping table, which is used to represent the mapping relationship between the pixel positions obtained on the CCD camera and the actual positions of these pixel points, that is, provide a table for correcting the pixel positions obtained on the CCD camera to the actual positions. After establishment, in actual use, obtain the image information collected from the CCD camera. According to the image information, extract the first positions of the pixel points in each different pixel row in the image contour obtained on the CCD camera. This first position may deviate from the actual position due to the magnification ratio difference of the lens system. According to the first position and the position calibration mapping table, determine the actual scale of the pixel points in each different pixel row in the contour. According to the first position and the actual scale, obtain the actual second positions of the pixel points corresponding to each different pixel row in the image contour. Subsequently, connect the new pixel points at several second positions in sequence to obtain the corrected image. Through the above method, instead of generally correcting the entire contour using the average value method, it directly corrects the first position of each pixel point on the contour. By matching and searching with the established position calibration mapping table, the actual scale of the pixel points in each different pixel row is obtained, and after correction, the actual second positions of the pixel points corresponding to each different pixel row are obtained. This method can reduce the influence caused by lens distortion and improve the absolute accuracy of imaging.
[0040] Refer to Figure 2 , it can be understood that in step S110, it may include but is not limited to the following steps:
[0041] Step S210: Obtain the depth of field range of the CCD camera;
[0042] Step S220: According to the depth of field range and the preset interval, obtain several image-side lines collected by the CCD camera and the scale values corresponding to each image-side line;
[0043] Step S230: Establish a position calibration mapping table according to the image-side lines and the scale values.
[0044] Refer to Figure 3 , it can be understood that in step S220, it may include but is not limited to the following steps:
[0045] Step S310: According to the above-mentioned depth of field range and the preset interval, obtain n image-side lines collected by the CCD camera; where the value of n is obtained by dividing the depth of field range by the preset interval and then adding 1, and is a positive integer;
[0046] Step S320: According to the maximum value of the depth of field range, the minimum value of the depth of field range and the preset interval, obtain the scale values corresponding to each image-side line.
[0047] In an embodiment of the present application, a CCD camera with a resolution of 1000*1920 is adopted. The depth of field range of the CCD camera is 18 mm, and the preset interval is 0.1 mm. The projected laser line of the sensor after alignment and adjustment is vertically projected onto an ideal plane (with a roughness less than 5 μm). In the object space, it is a laser line with very high collimation and conforming to a Gaussian distribution in the line width direction. The line in the image space is no longer a laser line with the same collimation as in the object space. As the ideal plane moves (moves parallel to the laser propagation direction within the depth of field range), the collimation of the laser line on the object surface does not change, but the laser line on the CCD after passing through the lens is no longer a laser line with unchanged collimation. Its collimation is changing, and in different regions of the depth of field, the change in collimation is inconsistent. Each time the ideal plane moves 0.1 mm relative to within the depth of field range, that is, then (18÷0.1 + 1) image space lines can be obtained by the CCD camera, that is, 181 image space lines. In the case of no distortion, the interval between two adjacent image space lines should be 5.5 pixels. However, in the actual imaging process, distortion will occur, making the image space lines in the imaging not a straight line. Therefore, it is necessary to re-calibrate the pixel columns corresponding to the pixel points of each different pixel row in each image space line. In the present application, the maximum value of the depth of field range is 8.3 mm, that is, the front depth of field is 8.3 mm, and the minimum value of the depth of field range is -9.2 mm, that is, the rear depth of field is 9.2 mm. The scale values mapped by the pixel columns in the pixel points of the 181 image space lines are 8.3 mm, 8.2 mm, 8.1 mm,..., -9.1 mm, -9.2 mm from top to bottom in sequence.
[0048] It should be noted that the smaller the preset interval is selected, the higher the accuracy of calibrating and correcting distortion. However, the smaller the interval is selected, the larger the data of the position calibration mapping table will be, and the correction efficiency will be reduced. Therefore, relevant technicians can select an appropriate preset interval according to the depth of field of the CCD camera.
[0049] Refer to Figure 4 , it can be understood that in step S230, it may include but is not limited to the following steps:
[0050] Step S410: Establish a mapping relationship between the pixel column of each pixel point in the same image space line and the same corresponding scale value, and establish a position calibration mapping table.
[0051] That is, the object space line is actually a straight line, while the distorted image space line may be a non-smooth curve. The pixel columns corresponding to the pixel points of each different pixel row in the same distorted image space line are uniformly calibrated to the same scale value. The 181 image space lines are sequentially calibrated with corresponding scale values according to the depth of field range to form a position calibration mapping table. The position calibration mapping table is shown in the following table:
[0052]
[0053]
[0054] Among them, D j,v represents the pixel column of the pixel point in the v-th column of the j-th image-side line in the position calibration mapping table.
[0055] Referring to Figure 5 , it can be understood that in step S140, it includes but is not limited to the following steps:
[0056] Step S510: According to the pixel row and pixel column of the first position, by matching with the position calibration mapping table, determine the actual scale corresponding to the pixel column among the pixel points of each different pixel row in the contour.
[0057] In an embodiment, if the pixel row corresponding to the first position of one pixel point is 70 and the pixel column is 445, then first find the 70th column in the position calibration mapping table according to the pixel row, and then compare the pixel column 445 with D 1,70 to D 181,70 to find the closest calibration point, so as to confirm the actual scale corresponding to the pixel point of the contour, that is, the actual position, so as to achieve the effect of distortion correction.
[0058] Referring to Figure 6 , it can be understood that in step S510, it may include but is not limited to the following steps:
[0059] Step S610: According to the pixel row and pixel column of the first position, determine the first calibration point and the second calibration point closest to the first position in the position calibration mapping table; among them, the pixel rows of the first calibration point and the second calibration point are the same as the pixel row of the first position, the pixel column of the first calibration point is less than the pixel column of the first position, and the pixel column of the second calibration point is greater than the pixel column of the second position;
[0060] Step S620: According to the first position, the first calibration point and the second calibration point, determine the actual scale corresponding to the pixel column among the pixel points of each different pixel row in the contour.
[0061] In an embodiment, if the pixel row corresponding to the first position of one pixel point is 70 and the pixel column is 445, then first find the 70th column in the position calibration mapping table according to the pixel row, and then compare the pixel column 445 with D 1,70 to D 181,70 for comparison, and it is found that D 80,70 is 442, D 81,70 is 446, and one of the pixel points of the contour is located between D 80,70 and D 81,70between the first position and two calibration points D 80,70 and D 81,70 to perform distortion correction on each pixel point of the contour more precisely.
[0062] Referring to Figure 7 , it can be understood that in step S620, the following steps may be included but are not limited to:
[0063] Step S710: Determine the first actual scale corresponding to the first calibration point and the second actual scale corresponding to the second calibration point according to the first calibration point and the second calibration point;
[0064] Step S720: Determine the actual scale corresponding to the pixel column in the pixel points of each different pixel row in the contour according to the pixel column of the first position, the pixel column of the first calibration point, the pixel column of the second calibration point, the first actual scale, and the second actual scale.
[0065] Specifically, the calculation formula for the actual scale corresponding to the pixel column in the pixel points of each different pixel row in the contour is:
[0066]
[0067] where β j represents the pixel column of the pixel point in the j-th column of the contour, β j ' represents the actual scale of the pixel point in the j-th column of the contour, D x,j represents the pixel column corresponding to the j-th column in the x-th image-side line in the position calibration mapping table, D y,j represents the pixel column corresponding to the j-th column in the y-th image-side line in the position calibration mapping table, D y represents the scale value corresponding to all pixel points in the y-th image-side line in the position calibration mapping table, λ represents a preset interval, where y = x + 1.
[0068] In an embodiment, the pixel row corresponding to the first position of one pixel point is 70 and the pixel column is 445. First, find the 70th column in the position calibration mapping table according to the pixel row, and then compare the pixel column 445 from D 1,80 to D 181,80 in the calibration mapping table. It is found that D 80,70 is 442, D 81,70 is 446, and one pixel point of this contour is located between D 80,70 and D 81,70 . Through the formula, it can be obtained that
[0069]
[0070] Therefore, the actual scale corresponding to the pixel column in the pixel points corresponding to the pixel behavior 70 in the contour is 0.325 mm. The distortion correction of each pixel point in the contour is performed more precisely in the above manner.
[0071] Referring to Figure 8 , it can be understood that in step S150, it may include but is not limited to the following steps:
[0072] Step S810: Replace the pixel column at the first position with the corresponding actual scale to obtain the actual second position of the pixel points corresponding to each different pixel row in the image contour.
[0073] Replace the pixel column at the first position with the corresponding actual scale, and obtain the actual second position of the corrected pixel points according to the actual scale.
[0074] In a second aspect, referring to Figure 9 , the present application also provides a high-precision camera image calibration distortion correction system, including: at least one memory, at least one processor, and at least one program. The program is stored in the memory, and the processor executes one or more programs to implement the above high-precision camera image calibration distortion correction method.
[0075] Establish a position calibration mapping table, which is used to represent the mapping relationship between the pixel point positions obtained on the CCD camera and the actual positions of these pixel points, that is, provide a table for correcting the pixel point positions obtained on the CCD camera to the actual positions. After establishment, in actual use, obtain the image information collected from the CCD camera. According to the image information, extract the first positions of the pixel points of each different pixel row in the image contour obtained on the CCD camera. This first position may deviate from the actual position due to the magnification difference of the lens and lens system. According to the first position and the position calibration mapping table, determine the actual scale of the pixel points of each different pixel row in the contour. According to the first position and the actual scale, obtain the actual second position of the pixel points corresponding to each different pixel row in the image contour. Subsequently, connect the new pixel points of several second positions in sequence to obtain the corrected image. Through the above method, instead of generally correcting the entire contour using the mean method, it directly corrects the first position of each pixel point on the contour. By matching and searching with the established position calibration mapping table, obtain the actual scale of the pixel points of each different pixel row, and after correction, obtain the actual second position of the pixel points corresponding to each different pixel row. This method can reduce the influence of lens distortion and improve the absolute accuracy of imaging.
[0076] Referring to Figure 9 , the processor and the memory can be connected through a bus or other means.
[0077] The memory, as a non-transitory computer-readable storage medium, can be used to store non-transitory software programs, non-transitory computer-executable programs, and signals, such as the program instructions / signals corresponding to the processing module in the embodiments of the present application. The processor executes various functional applications and data processing by running the non-transitory software programs, instructions, and signals stored in the memory, that is, implementing the high-precision camera image calibration distortion correction method in the above method embodiments.
[0078] The memory may include a program storage area and a data storage area. Among them, the program storage area can store an operating system and application programs required for at least one function; the data storage area can store relevant data of the above high-precision camera image calibration distortion correction method, etc. In addition, the memory may include a high-speed random access memory, and may also include a non-transitory memory, such as at least one magnetic disk storage device, a flash memory device, or other non-transitory solid-state storage devices. In some embodiments, the memory may optionally include a memory remotely set relative to the processor, and these remote memories can be connected to the processing module through a network. Examples of the above network include but are not limited to the Internet, an enterprise intranet, a local area network, a mobile communication network, and combinations thereof.
[0079] One or more signals are stored in the memory, and when executed by one or more processors, the high-precision camera image calibration distortion correction method in any of the above method embodiments is executed. For example, execute the Figure 1 method steps S110 to S160 in, Figure 2 method steps S210 to S230 in, Figure 3 method steps S310 to S320 in, Figure 4 method step S410 in, Figure 5 method step S510 in, Figure 6 method steps S610 to S620 in, Figure 7 method steps S710 to S720 in and Figure 8 method step S810 in.
[0080] In a fifth aspect, the embodiments of the present application provide a computer-readable storage medium. The computer-readable storage medium stores computer-executable instructions, and when the computer-executable instructions are executed by one or more processors, the one or more processors can be caused to execute the high-precision camera image calibration distortion correction method in the above method embodiments. For example, execute the Figure 1 method steps S110 to S160 in, Figure 2 method steps S210 to S230 in, Figure 3 method steps S310 to S320 in, Figure 4 method step S410 in, Figure 5 method step S510 in,Figure 6 Method steps S610 to S620 in Figure 7 method steps S710 to S720 in Figure 8 and method step S810 in
[0081] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0082] Through the description of the above embodiments, those of ordinary skill in the art can understand that all or some of the steps and systems disclosed above can be implemented as software, firmware, hardware, and their appropriate combinations. Some physical components or all physical components can be implemented as software executed by a processor, such as a central processing unit, a digital signal processor, or a microprocessor, or implemented as hardware, or implemented as an integrated circuit, such as an application-specific integrated circuit. Such software can be distributed on a computer-readable medium, which can include a computer storage medium (or non-transitory medium) and a communication medium (or transitory medium). As is well known to those of ordinary skill in the art, the term computer storage medium includes volatile and non-volatile, removable and non-removable media implemented in any method or technology for storing information, such as computer-readable signals, data structures, program modules, or other data. Computer storage media includes, but is not limited to, RAM, ROM, EEPROM, flash memory, or other memory technologies, CD-ROM, digital versatile disk (DVD), or other optical disk storage, magnetic cassette, tape, magnetic disk storage, or other magnetic storage devices, or any other medium that can be used to store the desired information and can be accessed by a computer. In addition, as is well known to those of ordinary skill in the art, a communication medium typically includes computer-readable signals, data structures, program modules, or other data in a modulated data signal such as a carrier wave or other transmission mechanism, and can include any information delivery medium.
[0083] In the description of this specification, the description with reference to terms such as "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specifically", or "some examples" means that the specific features, structures, materials, or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present application. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials, or characteristics described can be combined in a suitable manner in any one or more embodiments or examples.
[0084] The embodiments of the present application have been described in detail above with reference to the accompanying drawings. However, the present application is not limited to the above embodiments, and various changes can be made without departing from the spirit of the present application within the scope of knowledge possessed by those of ordinary skill in the art.
Claims
1. A high-precision camera image calibration and distortion correction method, characterized in that Including: Establish a position calibration mapping table; wherein, the position calibration mapping table is used to represent the mapping relationship between the position of the pixel points obtained on the CCD camera and the actual position of the pixel points; Obtain the image information collected from the CCD camera; According to the image information, extract the first position of the pixel points of each different pixel row in the image contour obtained on the CCD camera; According to the first position and the position calibration mapping table, determine the actual scale of the pixel points of each different pixel row in the contour; According to the first position and the actual scale, obtain the actual second position of the pixel points corresponding to each different pixel row in the image contour; According to the second positions of all the pixel points, connect them in sequence to obtain a corrected image; Wherein, the determining the actual scale of the pixel points of each different pixel row in the contour according to the first position and the position calibration mapping table includes: According to the pixel row and pixel column of the first position, determine the first calibration point and the second calibration point closest to the first position in the position calibration mapping table; wherein, the pixel row of the first calibration point and the second calibration point is the same as the pixel row of the first position, the pixel column of the first calibration point is less than the pixel column of the first position, and the pixel column of the second calibration point is greater than the pixel column of the second position; According to the first calibration point and the second calibration point, determine the first actual scale corresponding to the first calibration point and the second actual scale corresponding to the second calibration point; According to the pixel column of the first position, the pixel column of the first calibration point, the pixel column of the second calibration point, the first actual scale and the second actual scale, determine the actual scale corresponding to the pixel column of the pixel points of each different pixel row in the contour.
2. The high-precision camera image calibration distortion correction method according to claim 1, characterized in that The establishing the position calibration mapping table includes: Obtain the depth of field range of the CCD camera; According to the depth of field range and the preset interval, obtain a number of object space lines collected by the CCD camera and the scale value corresponding to each object space line; According to the object space line and the scale value, establish a position calibration mapping table.
3. The high-precision camera image calibration distortion correction method according to claim 2, wherein The obtaining a number of object space lines collected by the CCD camera and the scale value corresponding to each object space line according to the depth of field range and the preset interval includes: According to the depth of field range and the preset interval, obtain n object space lines collected by the CCD camera; wherein, the value of n is obtained by dividing the depth of field range by the preset interval and then adding 1, and is a positive integer; According to the maximum value of the depth of field range, the minimum value of the depth of field range and the preset interval, obtain the scale value corresponding to each object space line.
4. The high-precision camera image calibration and distortion correction method according to claim 2, wherein The establishing the position calibration mapping table according to the object space line and the scale value includes: Form a mapping relationship between the pixel column of each pixel point in the same object space line and the same corresponding scale value, and establish a position calibration mapping table.
5. The high-precision camera image calibration distortion correction method according to claim 1, characterized in that The obtaining the actual second position of the pixel points corresponding to each different pixel row in the image contour according to the first position and the actual scale includes: Replace the pixel columns at the first positions with the corresponding actual scales to obtain the actual second positions of the pixel points corresponding to each different pixel row in the image contour.
6. A high-precision camera image calibration and distortion correction system, characterized in that, Comprising: At least one memory; At least one processor; At least one program; The program is stored in the memory, and the processor executes at least one of the programs to implement the high-precision camera image calibration distortion correction method according to any one of claims 1 to 5.
7. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer-executable signals for executing the high-precision camera image calibration distortion correction method according to any one of claims 1 to 5.
Citation Information
Patent Citations
Distortion correction method for calculating virtual image plane based on AR-HUD (Auto Register-Head Up Display) dynamic eye position
CN113240592A
Image compensation method, computer readable storage medium and electronic device
WO2019237977A1