Imaging distortion correction method and device based on light model, equipment and medium

Through the imaging distortion correction method based on the light ray model, the target image is collected and the light parameters is determined, and the distortion correction mapping set is constructed, which solves the problem of poor imaging distortion correction effect in the prior art, and achieves rapid distortion correction for a variety of imaging devices.

CN119991519AActive Publication Date: 2025-05-13SHENZHEN UNIV
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN202510086176.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-01-20
Publication Date
2025-05-13
Estimated Expiration
2045-01-20

AI Technical Summary

Technical Problem

In the prior art, the imaging distortion correction method has poor correction effect in some imaging devices, especially in non-small hole imaging, irregular reflective mirrors, asymmetric refractive media and ultra-wide-angle large distortion devices, and the distortion correction effect is poor.

Method used

Using an imaging distortion correction method based on the light ray model, the absolute phase data set is determined by collecting the orthogonal phase shift fringe images of the target, and the object point set and light parameters are obtained in combination with the preset size parameters. Then, the vertical plane of the optical axis is determined, the weight weighting coefficients of the intersection of light rays and the plane are obtained, the distortion correction mapping set is constructed, and the correction processing is performed on the corrected image.

Benefits of technology

The image of the imaging device with small distortion, large distortion, and irregular deformation is realized, and the effect of imaging distortion correction is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119991519A_ABST
    Figure CN119991519A_ABST
Patent Text Reader

Abstract

The invention discloses an imaging distortion correction method, device and equipment based on a light model, and a medium, and the method comprises the steps: collecting an orthogonal phase shift fringe image corresponding to a target, determining an absolute phase data set corresponding to each pixel point in the orthogonal phase shift fringe image, and combining preset size parameters, obtaining an object point set corresponding to each pixel point and a corresponding light parameter; acquiring an intersection point set corresponding to the light and an optical axis vertical plane according to the light parameters; obtaining weight weighting coefficients corresponding to each grid point in the plane vertical to the optical axis and adjacent light intersection points in the intersection point set, and constructing to obtain a distortion correction mapping set; and according to the distortion correction mapping set, carrying out correction processing on gray values of pixel points in an input to-be-corrected image to obtain a corresponding corrected image. According to the method, the distortion correction mapping set can be established by calibrating the light parameters of the imaging device and reconstructing the light, and the method can be generally used for imaging devices with small distortion, large distortion and irregular deformation.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the field of optical imaging technology, and in particular to a method, device, equipment and medium for correcting imaging distortion based on a light model. Background Art

[0002] In optical imaging, due to hardware manufacturing and assembly errors in the actual imaging device, or interference from the imaging environment and conditions, object information inevitably suffers some distortion or aberration after passing through the imaging device. Conventional imaging distortion models, such as radial and tangential polynomial distortion models, are not applicable to all imaging devices, especially those with non-pinhole imaging, irregular reflecting mirrors, asymmetric refractive media, and ultra-wide-angle large distortion. This results in poor correction performance of conventional imaging distortion models in some imaging devices. Therefore, existing imaging distortion correction methods suffer from poor distortion correction performance. Summary of the Invention

[0003] This invention provides an imaging distortion correction method, apparatus, device, and medium based on a ray model, aiming to solve the problem of poor distortion correction effect in existing imaging distortion correction methods.

[0004] In a first aspect, an embodiment of the present invention provides an imaging distortion correction method based on a light model, wherein the method includes:

[0005] The orthogonal phase-shifting fringe image corresponding to the plane covering the effective field of view is acquired by a target placed in the space in front of the imaging device, and the absolute phase data set corresponding to each pixel in the orthogonal phase-shifting fringe image is determined.

[0006] Obtaining an object point set corresponding to each pixel point and corresponding light parameters according to the absolute phase data set and preset size parameters;

[0007] Determining a corresponding optical axis perpendicular plane according to the imaging device and the light parameters, and obtaining a set of intersection points corresponding to the light and the optical axis perpendicular plane according to the light parameters;

[0008] Obtaining weight coefficients corresponding to each grid point in the plane perpendicular to the optical axis and adjacent light intersection points in the intersection point set;

[0009] Constructing a distortion correction mapping set based on the pixel index corresponding to the intersection of the orthogonal phase-shifted fringe image and the light in the imaging device and the weighting coefficient;

[0010] Correction processing is performed on the grayscale values ​​of pixels in the input image to be corrected according to the distortion correction mapping set to obtain a corresponding corrected image.

[0011] In a second aspect, an embodiment of the present invention further provides an imaging distortion correction device based on a light model, wherein the device is used to perform the imaging distortion correction method based on a light model as described in the first aspect above, and the device includes:

[0012] a data set acquisition unit for collecting an orthogonal phase-shifted fringe image corresponding to a target placed in a space in front of the imaging device and covering the plane where the effective field of view is located, and determining an absolute phase data set corresponding to each pixel point in the orthogonal phase-shifted fringe image;

[0013] The acquisition unit is used to acquire the set of object points corresponding to each pixel and the corresponding light parameters based on the absolute phase data set and the preset size parameters;

[0014] an intersection point set acquisition unit, configured to determine a corresponding optical axis perpendicular plane according to the imaging device and the light parameters, and acquire a set of intersection points corresponding to the light and the optical axis perpendicular plane according to the light parameters;

[0015] The weighting coefficient acquisition unit is used to acquire the weighting coefficients corresponding to the light rays that are adjacent to each grid point in the optical axis vertical plane and the intersection point set.

[0016] A mapping set construction unit is used to construct a distortion correction mapping set based on the pixel index corresponding to the intersection point of the orthogonal phase-shifting fringe image and the light ray in the imaging device and the weighting coefficients.

[0017] The correction processing unit is used to correct the gray values ​​of pixels in the input image to be corrected according to the distortion correction mapping set, so as to obtain the corresponding corrected image.

[0018] In a third aspect, an embodiment of the present invention further provides a computer device, wherein the device includes a processor, a communication interface, a memory, and a communication bus, wherein the processor, the communication interface, and the memory communicate with each other via the communication bus;

[0019] Memory, used to store computer programs;

[0020] When the processor executes the program stored in the memory, it implements the steps of the imaging distortion correction method based on the ray model described in the first aspect above.

[0021] In a fourth aspect, an embodiment of the present invention further provides a computer-readable storage medium having a computer program stored thereon, wherein when the computer program is executed by a processor, the steps of the imaging distortion correction method based on the light model as described in the first aspect above are implemented.

[0022] This invention provides an imaging distortion correction method, apparatus, device, and medium based on a ray model. The method includes: acquiring an orthogonal phase-shift fringe image corresponding to a target and determining the absolute phase data set corresponding to each pixel in the orthogonal phase-shift fringe image; combining preset size parameters to obtain the object point set corresponding to each pixel and the corresponding ray parameters; obtaining the intersection point set corresponding to the ray parameters and the plane perpendicular to the optical axis; obtaining the weighted coefficients corresponding to the intersection points of adjacent ray points in the intersection point set of each grid point in the plane perpendicular to the optical axis and constructing a distortion correction mapping set; and correcting the gray values ​​of pixels in the input image to be corrected according to the distortion correction mapping set to obtain the corresponding corrected image. This method directly calibrates the ray parameters of the imaging device, and the distortion correction mapping set can be established by reconstructing the ray. It is applicable to imaging devices with small distortion, large distortion, and irregular deformation, and achieves rapid distortion correction of images. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] To more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings used in the following description of the embodiments will be briefly introduced. Obviously, the drawings described below are some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0024] Figure 1 A flowchart illustrating the imaging distortion correction method based on a ray model provided in an embodiment of the present invention;

[0025] Figure 2 A schematic diagram illustrating an application scenario of the imaging distortion correction method based on a ray model provided in an embodiment of the present invention;

[0026] Figure 3 This is a schematic diagram illustrating another application scenario of the imaging distortion correction method based on a ray model provided in this embodiment of the invention.

[0027] Figure 4 This is a schematic diagram illustrating another application scenario of the imaging distortion correction method based on the ray model provided in this embodiment of the invention.

[0028] Figure 5 A schematic block diagram of an imaging distortion correction device based on a ray model provided in an embodiment of the present invention;

[0029] Figure 6 This is a schematic block diagram of a computer device provided in an embodiment of the present invention. DETAILED DESCRIPTION

[0030] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of them. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.

[0031] It will be understood that when used in this specification and the appended claims, the terms “comprises” and “comprising” indicate the presence of described features, integers, steps, operations, elements and / or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components and / or groups thereof.

[0032] It should also be understood that the terms used in the present specification are only for the purpose of describing particular embodiments and are not intended to limit the present invention. As used in the present specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0033] It should be further understood that the term "and / or" used in the present description and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0034] Please see Figure 1 As shown in the figure, the embodiment of the present invention provides an imaging distortion correction method based on a light model, which is applied to a terminal device. The method is executed by an application software installed in the terminal device, and the terminal device is connected to a sensor (such as a photosensitive chip) in the imaging device for communication. The terminal device can be a laptop, desktop computer, tablet computer or mobile phone. Figure 1 As shown, the method includes steps S110 to S160.

[0035] S110 , collecting an orthogonal phase-shifted fringe image corresponding to a target placed in a space in front of an imaging device and covering a plane where an effective field of view is located, and determining an absolute phase data set corresponding to each pixel point in the orthogonal phase-shifted fringe image.

[0036] The target placed in the space in front of the imaging device is used to collect an orthogonal phase-shifted fringe image corresponding to the plane where the effective field of view is located, and the absolute phase data set corresponding to each pixel point in the orthogonal phase-shifted fringe image is determined. Multiple targets can be placed in the space in front of the imaging device, specifically Figure 2As shown, light rays sequentially pass through multiple targets and enter the imaging device. Each target corresponds to a plane covering the effective field of view, and each target has horizontal or vertical sinusoidal phase-shifting fringes. The imaging device can acquire orthogonal phase-shifting fringe images corresponding to the sinusoidal phase-shifting fringes and output them to a terminal device. The terminal device can then acquire orthogonal phase-shifting fringe images through the imaging device. By comparing the absolute phase data of each pixel in the orthogonal phase-shifting fringe image with the absolute phase data of the target reference, the absolute phase data of each pixel in the orthogonal phase-shifting fringe image can be correlated with the reference absolute phase data on each target. For example... Figure 2 As shown, the absolute phase data of pixel m is compared with X1 on target Π1. w The absolute phase data at the marker matches the X2 data on the target Π2. w The absolute phase data at the marker matches the target Π. N Up X N w The absolute phase data at the markers are matched, where N represents the total number of targets. Then, the multiple absolute phase data points corresponding to each pixel and multiple targets are combined to form an absolute phase data set.

[0037] S120. Based on the absolute phase data set and the preset size parameters, obtain the object point set corresponding to each pixel and the corresponding light parameters.

[0038] Based on the absolute phase data set and preset size parameters, obtain the object point set corresponding to each pixel and the corresponding ray parameters. The preset size parameters include the size and orientation information of each target. In a specific embodiment, step S120 includes the following sub-steps: calculating the object point coordinates corresponding to each pixel in the target coordinate system based on the matching phase data pairs in the absolute phase data set and the size parameters, thereby obtaining the object point set corresponding to each pixel; and calculating the ray parameters of the ray corresponding to each pixel in the object point set based on the collinearity of the corresponding object points in each target coordinate system.

[0039] Specifically, the target coordinate system in three-dimensional space can be reconstructed based on the size and orientation information of each target in the size parameters. Matching phase data is acquired from the phase data set; each set of phase data corresponds to a pixel and the absolute phase data of that pixel relative to multiple targets. Each photosensitive pixel m in the sensor corresponds to a ray of light in space. The coordinates of the object point on the ray are X = (X, Y, Z) T The relationship with ray l can be expressed as shown in equation (1):

[0040]

[0041] Among them, the ray parameters (x,y) and These represent the spatial and angular coordinates of the light ray, respectively. Each pixel in the absolute phase data set corresponds to a photosensitive pixel m and a light ray. Each photosensitive pixel corresponds to an object point coordinate in a target coordinate system. Therefore, the combination of each pixel and the multiple object point coordinates corresponding to each target coordinate system forms the object point set.

[0042] Equation (1) can be converted into vector form as equation (2):

[0043]

[0044] Where x = (x, y, 0) T Let l be the point where the ray intersects the xy plane of the coordinate system. The ray l corresponds to different ray parameter values ​​in different ray coordinate systems. By taking the ray parameters (x, y) in ray l, we can construct the intersection point with a corresponding coordinate system xy plane. Let Z be the direction vector of the light ray, and Z be the coordinate parameter value corresponding to the z-axis direction.

[0045] When light propagates, the coordinates of the intersection points between each target and the light ray are also the object point coordinates corresponding to the pixel point and the target coordinate system. These intersection point coordinates can be expressed as equation (3) in the light ray coordinate system:

[0046] X i =θZ i +x (3);

[0047] Where i = 1, 2, N, and i is the target number.

[0048] The coordinates X of an object point on a certain ray in the ray coordinate system i Pose transformation parameters (R) i |T i Transform to the coordinates X in the coordinate system of the i-th target. i w At that time, there exists a correspondence as shown in equation (4):

[0049]

[0050] Since the intersection point of the ray in the ray coordinate system with the xy plane of the target coordinate system when the ray propagates to the i-th target coordinate system should be the same as the coordinate of the corresponding object point on the current target, the ray parameters can be obtained through nonlinear optimization. The objective function is actually to minimize the difference in the magnitude of the two coordinates, as shown in equation (5):

[0051]

[0052] Where M is the total number of light rays participating in the optimization, N is the total number of targets, and Xij w (θ j ,x j ,R i ,T i Let X be the coordinates of the object point on the j-th ray transformed to the coordinates of the i-th target. ij w Let be the intersection point of the object point on the j-th ray and the xy plane at the i-th target coordinate system. By using the above formula (5) for nonlinear optimization, the corresponding ray parameters can be obtained. Each pixel corresponds to one ray, and each ray corresponds to a set of ray parameters.

[0053] S130. Determine the corresponding vertical plane of the optical axis based on the imaging device and the light parameters, and obtain the set of intersection points between the light rays and the vertical plane of the optical axis based on the light parameters.

[0054] The corresponding optical axis vertical plane is determined based on the imaging device and the light parameters, and the set of intersection points between the light rays and the optical axis vertical plane is obtained based on the light parameters. The corresponding optical axis vertical plane can be determined based on the imaging system and the light parameters obtained above. The optical axis vertical plane is a plane perpendicular to the optical axis, and the set of intersection points between the light parameters and the optical axis vertical plane is obtained.

[0055] In a specific embodiment, step S130 includes the following sub-steps: using the principal ray of the imaging device as the optical axis, generating a plane perpendicular to the optical axis and determining it as the corresponding optical axis perpendicular plane; performing simultaneous calculations based on the ray parameters of each pixel and the plane equation of the optical axis perpendicular plane to obtain the intersection coordinates, so as to obtain the corresponding intersection set.

[0056] Select the light ray at the very center of the imaging device as the principal ray, and establish a plane perpendicular to this principal ray as the optical axis. Calculate the corresponding plane equation using this plane perpendicular to the optical axis; specifically, as follows... Figure 3 As shown, the imaging plane is the plane on which the sensor performs photosensitive imaging. Further, by simultaneously solving the equations of the light parameters of each pixel and the plane perpendicular to the optical axis, the coordinates of the intersection points between the light rays emitted from each pixel and the plane perpendicular to the optical axis can be obtained. Thus, each pixel's light ray corresponds to one intersection point coordinate with the plane perpendicular to the optical axis. Obtaining the coordinates of all intersection points yields the set of intersection points.

[0057] S140. Obtain the weighting coefficients corresponding to the light rays that are adjacent to each grid point in the vertical plane of the optical axis and the intersection point set.

[0058] Obtain the weighted coefficients corresponding to the intersection points of adjacent rays in the intersection point set for each grid point in the vertical plane of the optical axis. Further, the vertical plane of the optical axis can be meshed to obtain a vertical plane containing grid points. Weighted coefficients are then calculated based on the correspondence between the grid points and the intersection points of adjacent rays in the intersection point set, thus obtaining the weighted coefficients.

[0059] In a specific embodiment, step S140 includes the following sub-steps: dividing the vertical plane of the optical axis into a grid according to the intersection point set to obtain a grid point set obtained by combining the grid point coordinates of each grid point; obtaining the light ray intersection points adjacent to each grid point according to the distance between the light ray intersection points in the intersection point set and each grid point in the grid point set; calculating the distance weights corresponding to each grid point and the adjacent light ray intersection points; and normalizing the distance weights of each grid point to obtain the weighting coefficients corresponding to each grid point.

[0060] Specifically, the plane perpendicular to the optical axis can be meshed first. Specifically, the maximum and minimum values ​​of the horizontal coordinates and the maximum and minimum values ​​of the vertical coordinates of each intersection point in the intersection point set can be obtained. The horizontal boundary size of the mesh can be determined based on the maximum and minimum values ​​of the horizontal coordinates. The vertical boundary size of the mesh can be determined based on the maximum and minimum values ​​of the vertical coordinates.

[0061] Taking the horizontal direction as an example, if the maximum value of the horizontal coordinate is X max The minimum value is X min Since the size of the grid (the number of grid points in the horizontal and vertical directions) must be consistent with the resolution of the sensor, if the number of grid points in the horizontal direction is S, then the single-side dimension d in the horizontal direction of the grid is (X... max -X min The relationship between the horizontal single-sided dimension d and the plane perpendicular to the optical axis is as follows: ) / (S-1). Figure 3 As shown, the horizontal spacing between adjacent grid points is d.

[0062] Further calculate the distance weights between each grid point and the nearest intersection points of the rays; the current grid point can be represented as p. g =(x g ,y g The set of intersections includes the light ray intersections (the light ray intersections are...). Figure 3 Find h points in the grid that are adjacent to the solid points shown in the diagram, denoted as q. k =(x k ,y k(k = 1, 2, ..., h). Based on the relative positional relationship between the adjacent ray intersection points and grid points obtained by the above screening, the distances between these h adjacent ray intersection points and grid points are obtained respectively, expressed as Equation (6):

[0063] d k =dis(p g , q k (6);

[0064] The `dis()` function calculates the geometric distance between two spatial points. Further, it calculates the distance based on the distance `d`. k The distance weights between the h adjacent ray intersection points and the grid points can be obtained and expressed as formula (7):

[0065] W k =f(d k (7);

[0066] Where f() represents the function for calculating the weights based on distance, and the h nearest ray intersection points q are obtained. k For p g After determining the distance weights, the h distance weights are normalized to obtain the corresponding weighting coefficients. The calculation formula for the normalization process is shown in equation (8):

[0067]

[0068] Wherein, the distance weight W at the kth ray intersection point k After normalization, the resulting weighting coefficients are W'. k Obtain the weighted coefficients of each weight after normalization.

[0069] S150. Based on the pixel index corresponding to the intersection point of the orthogonal phase-shifting fringe image and the light ray in the imaging device and the weighting coefficient, a distortion correction mapping set is constructed.

[0070] A distortion correction mapping set is constructed based on the pixel indices corresponding to the intersection points of the orthogonal phase-shifting fringe image and the light rays in the imaging device, and the weighting coefficients. Furthermore, a distortion correction mapping set based on weighting coefficients can be constructed according to the pixel indices corresponding to the intersection points of the orthogonal phase-shifting fringe image and the light rays.

[0071] Specifically, since the number of grid points is equal to the number of pixels in the orthogonal phase-shifting fringe image (one grid point corresponds to one pixel), and each ray intersection corresponds to one grid point, then each pixel in the orthogonal phase-shifting fringe image corresponds to one ray intersection. This one-to-one correspondence between pixels and ray intersections constitutes the pixel index. Based on the pixel index, a weighting coefficient corresponding to each pixel in the orthogonal phase-shifting fringe image can be determined. Thus, a one-to-one mapping relationship can be established between pixels and weighting coefficients, and this mapping relationship can be combined into a distortion correction mapping set.

[0072] S160. The gray values ​​of the pixels in the input image to be corrected are corrected according to the distortion correction mapping set to obtain the corresponding corrected image.

[0073] The grayscale values ​​of pixels in the input image to be corrected are corrected according to the distortion correction mapping set to obtain a corresponding corrected image. When correcting the image to be corrected using the distortion correction mapping set, the grayscale values ​​of each pixel in the image to be corrected before distortion correction are superimposed on the weighted coefficients of the corresponding mappings for calculation.

[0074] In a specific embodiment, step S160 includes sub-steps: according to the mapping relationship in the distortion correction mapping set, weighting coefficients in the distortion correction mapping set are weightedly calculated with the grayscale values ​​of corresponding pixel points in the image to be corrected to obtain grayscale calculation values; and the grayscale calculation values ​​are superimposed on the image to be corrected to obtain a corresponding corrected image.

[0075] Specifically, based on the mapping relationships in the distortion correction mapping set, the weighting coefficients corresponding to each pixel in the image to be corrected can be determined. These weighting coefficients are then weighted with the corresponding pixel's grayscale value to obtain a calculated grayscale value. This calculated grayscale value is then superimposed onto the grayscale value of the corresponding pixel in the image to be corrected, thus correcting a single pixel in the image. By correcting each pixel in the image to be corrected using the above method, the corresponding corrected image is obtained. The image to be corrected is as follows: Figure 4 As shown in Figure (a), the corrected image is as follows Figure 4 As shown in Figure (b).

[0076] The imaging distortion correction method, apparatus, device, and medium based on ray model disclosed in the above embodiments include: acquiring an orthogonal phase-shift fringe image corresponding to a target and determining the absolute phase data set corresponding to each pixel in the orthogonal phase-shift fringe image; combining preset size parameters to obtain the object point set corresponding to each pixel and the corresponding ray parameters; obtaining the intersection point set corresponding to the ray parameters and the plane perpendicular to the optical axis; obtaining the weighted coefficients corresponding to the intersection points of each grid point in the plane perpendicular to the optical axis and the adjacent ray intersection points in the intersection point set, and constructing a distortion correction mapping set; and correcting the gray values ​​of the pixels in the input image to be corrected according to the distortion correction mapping set to obtain the corresponding corrected image. This method directly calibrates the ray parameters of the imaging device, and the distortion correction mapping set can be established by reconstructing the ray. It is applicable to imaging devices with small distortion, large distortion, and irregular deformation, and achieves rapid distortion correction of images.

[0077] This invention also provides an imaging distortion correction device based on a ray model. This ray model-based imaging distortion correction device can be configured in a terminal device and is used to execute any embodiment of the aforementioned ray model-based imaging distortion correction method. Specifically, please refer to... Figure 5 , Figure 5 This is a schematic block diagram of an imaging distortion correction device based on a ray model provided in an embodiment of the present invention.

[0078] like Figure 5 As shown, the imaging distortion correction device 100 based on the ray model includes a data set acquisition unit 110, an acquisition unit 120, an intersection point set acquisition unit 130, a weighted coefficient acquisition unit 140, a mapping set construction unit 150, and a correction processing unit 160.

[0079] The data set acquisition unit 110 is used to acquire an orthogonal phase-shift fringe image of a target placed in the space in front of the imaging device, which corresponds to the plane covering the effective field of view, and to determine the absolute phase data set corresponding to each pixel in the orthogonal phase-shift fringe image.

[0080] The acquisition unit 120 is used to acquire the set of object points corresponding to each pixel and the corresponding light parameters based on the absolute phase data set and the preset size parameters.

[0081] In a more specific embodiment, the acquisition unit 120 includes the following sub-units: an object point set acquisition unit, used to calculate the object point coordinates corresponding to each pixel point and the target coordinate system based on the matching phase data pairs in the absolute phase data set and the size parameters, thereby obtaining the object point set corresponding to each pixel point; and a ray parameter calculation unit, used to calculate the ray parameters of the ray corresponding to each pixel point based on the collinearity of the corresponding object points in each target coordinate system and the object point set.

[0082] The intersection point set acquisition unit 130 is used to determine the corresponding optical axis vertical plane according to the imaging device and the light parameters, and to acquire the intersection point set between the light and the optical axis vertical plane according to the light parameters.

[0083] In a more specific embodiment, the intersection point set acquisition unit 130 includes the following sub-units: an optical axis vertical plane generation unit, used to generate a plane perpendicular to the optical axis based on the principal ray of the imaging device and determine it as the corresponding optical axis vertical plane; and a coordinate calculation unit, used to perform simultaneous calculations based on the ray parameters of each pixel and the plane equation of the optical axis vertical plane to obtain the intersection point coordinates, so as to obtain the corresponding intersection point set.

[0084] The weighting coefficient acquisition unit 140 is used to acquire the weighting coefficients corresponding to the light rays that are adjacent to each grid point in the vertical plane of the optical axis and the intersection point set.

[0085] The mapping set construction unit 150 is used to construct a distortion correction mapping set based on the pixel index corresponding to the intersection point of the orthogonal phase-shifting fringe image and the light ray in the imaging device and the weighting coefficient.

[0086] The correction processing unit 160 is used to perform correction processing on the gray values ​​of pixels in the input image to be corrected according to the distortion correction mapping set, so as to obtain the corresponding corrected image.

[0087] The imaging distortion correction device based on the light model provided in the embodiment of the present invention applies the above-mentioned imaging distortion correction method based on the light model, collects the orthogonal phase-shifted fringe image corresponding to the target and determines the absolute phase data set corresponding to each pixel in the orthogonal phase-shifted fringe image, and obtains the object point set corresponding to each pixel and the corresponding light parameters in combination with the preset size parameters; obtains the intersection set corresponding to the light parameters and the plane perpendicular to the optical axis; obtains the weight coefficients corresponding to each grid point in the plane perpendicular to the optical axis and the adjacent light intersection points in the intersection set and constructs a distortion correction mapping set; corrects the grayscale values ​​of the pixels in the input image to be corrected according to the distortion correction mapping set to obtain the corresponding corrected image. The above-mentioned method directly calibrates the light parameters of the imaging device and reconstructs the light to establish the distortion correction mapping set. It can be generally used for imaging devices with small distortion, large distortion, and irregular deformation and realizes rapid distortion correction of images.

[0088] The aforementioned imaging distortion correction device based on a ray model can be implemented as a computer program, which can be used in, for example... Figure 6 It runs on the computer device shown.

[0089] Please see Figure 6 , Figure 6 This is a schematic block diagram of a computer device provided in an embodiment of the present invention. The computer device can be a terminal device used to execute a ray-model-based imaging distortion correction method to perform distortion correction processing on images in an imaging apparatus.

[0090] See Figure 6 The computer device 500 includes a processor 502, a memory, and a communication interface 505 connected via a communication bus 501. The memory may include a storage medium 503 and internal memory 504.

[0091] The storage medium 503 may store an operating system 5031 and a computer program 5032. When the computer program 5032 is executed, it causes the processor 502 to execute an imaging distortion correction method based on a ray model. The storage medium 503 may be a volatile storage medium or a non-volatile storage medium.

[0092] The processor 502 provides computing and control capabilities to support the operation of the entire computer device 500.

[0093] The internal memory 504 provides an environment for the operation of the computer program 5032 in the storage medium 503. When the computer program 5032 is executed by the processor 502, the processor 502 can execute an imaging distortion correction method based on a ray model.

[0094] This communication interface 505 is used for network communication, such as providing data transmission. Those skilled in the art will understand that... Figure 6 The structure shown is merely a block diagram of a portion of the structure related to the present invention and does not constitute a limitation on the computer device 500 to which the present invention is applied. The specific computer device 500 may include more or fewer components than shown in the figure, or combine certain components, or have different component arrangements.

[0095] The processor 502 is used to run the computer program 5032 stored in the memory to implement the corresponding functions in the above-mentioned imaging distortion correction method based on the ray model.

[0096] Those skilled in the art will understand that Figure 6 The embodiments of the computer device shown do not constitute a limitation on the specific configuration of the computer device. In other embodiments, the computer device may include more or fewer components than illustrated, or combine certain components, or have different component arrangements. For example, in some embodiments, the computer device may include only memory and a processor. In such embodiments, the structure and function of the memory and processor are different from those shown. Figure 6 The embodiments shown are consistent and will not be described again here.

[0097] It should be understood that, in this embodiment of the invention, the processor 502 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.

[0098] In another embodiment of the invention, a computer-readable storage medium is provided. This computer-readable storage medium may be volatile or non-volatile. The computer-readable storage medium stores a computer program, which, when executed by a processor, implements the steps included in the above-described ray-based imaging distortion correction method.

[0099] Those skilled in the art will readily understand that, for the sake of convenience and brevity, the specific working processes of the devices, apparatuses, and units described above can be referred to the corresponding processes in the foregoing method embodiments, and will not be repeated here. Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in terms of function in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this invention.

[0100] In the embodiments provided by this invention, it should be understood that the disclosed devices, apparatuses, and methods can be implemented in other ways. For example, the apparatus embodiments described above are merely illustrative. For instance, the division of units is only a logical functional division, and in actual implementation, there may be other division methods. Units with the same function may be grouped into one unit. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interfaces, devices, or units, or it may be an electrical, mechanical, or other form of connection.

[0101] The units described as separate components may or may not be physically separate, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed across multiple network units. Some or all of these units may be selected according to actual needs to achieve the objectives of the embodiments of the present invention.

[0102] In addition, the functional units in the various embodiments of the present invention may be integrated into a single processing unit, each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.

[0103] If the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, in essence, or the part that contributes to the prior art, or all or part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a computer-readable storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned computer-readable storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), magnetic disks, or optical disks.

[0104] The above description is merely a specific embodiment of the present invention, but the scope of protection of the present invention is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present invention, and these modifications or substitutions should all be covered within the scope of protection of the present invention. Therefore, the scope of protection of the present invention should be determined by the scope of the claims.

Claims

1. An imaging distortion correction method based on a light model, characterized in that: The method comprises: Collecting an orthogonal phase-shift fringe image corresponding to a target placed in the space in front of the imaging device and covering the plane where the effective field of view is located, and determining an absolute phase data set corresponding to each pixel point in the orthogonal phase-shift fringe image; According to the absolute phase data set and the preset size parameters, obtaining an object point set corresponding to each pixel point and corresponding light parameters; Determine a corresponding plane perpendicular to the optical axis according to the imaging device and the light parameters, and obtain a set of intersection points corresponding to the light and the plane perpendicular to the optical axis according to the light parameters; Obtaining weight coefficients corresponding to each grid point in the plane perpendicular to the optical axis and adjacent light intersection points in the intersection point set; Constructing a distortion correction mapping set based on the pixel index corresponding to the orthogonal phase-shifted fringe image in the imaging device and the intersection of the light rays and the weight coefficient; The grayscale values ​​of the pixels in the input image to be corrected are corrected according to the distortion correction mapping set to obtain a corresponding corrected image.

2. The imaging distortion correction method based on the light model according to claim 1, characterized in that: According to the absolute phase data set and the preset size parameters, an object point set corresponding to each pixel point and corresponding light parameters are obtained, including: Calculating the object point coordinates corresponding to each pixel point and the target coordinate system according to the matched phase data pairs in the absolute phase data set and the size parameters, thereby obtaining the object point set corresponding to each pixel point; According to the collinearity of the pixel points corresponding to the object points in each target coordinate system, the light parameters of the light beam where each pixel point corresponds to the object point are calculated according to the object point set.

3. The imaging distortion correction method based on the light model according to claim 1, characterized in that: Determining the corresponding optical axis vertical plane according to the imaging device and the light parameters, and acquiring a set of intersection points corresponding to the light and the optical axis vertical plane according to the light parameters, includes: Using the principal ray of the imaging device as the optical axis, a plane perpendicular to the optical axis is generated and determined as the corresponding plane perpendicular to the optical axis; The intersection coordinates are obtained by performing a simultaneous calculation based on the light parameters of each pixel point and the plane equation of the plane perpendicular to the optical axis to obtain a corresponding intersection point set.

4. The imaging distortion correction method based on the light model according to claim 1, characterized in that: The step of obtaining weight coefficients corresponding to each grid point in the plane perpendicular to the optical axis and adjacent light intersection points in the intersection point set includes: Gridding the plane perpendicular to the optical axis according to the intersection point set to obtain a grid point set obtained by combining the grid point coordinates of each grid point; According to the distance between the light intersection point in the intersection point set and each grid point in the grid point set, obtaining the light intersection point adjacent to each grid point; Calculate the distance weight corresponding to each grid point and the adjacent intersection point of the light rays; The distance weights of the grid points are normalized and calculated to obtain weight coefficients corresponding to the grid points.

5. The imaging distortion correction method based on the light model according to claim 1, characterized in that: The step of correcting the grayscale values ​​of pixels in the input image to be corrected according to the distortion correction mapping set to obtain a corresponding corrected image includes: According to the mapping relationship in the distortion correction mapping set, weighted calculation is performed on the weighted coefficients in the distortion correction mapping set and the grayscale values ​​of the corresponding pixels in the image to be corrected to obtain a grayscale calculation value; The grayscale calculated value is superimposed on the image to be corrected to obtain a corresponding corrected image.

6. An imaging distortion correction device based on a light model, characterized in that: The imaging distortion correction device based on the light model is used to perform the imaging distortion correction method based on the light model according to any one of claims 1 to 5, and the device comprises: A data set acquisition unit, used to collect an orthogonal phase-shift fringe image corresponding to a target placed in the space in front of the imaging device and covering the plane where the effective field of view is located, and determine an absolute phase data set corresponding to each pixel point in the orthogonal phase-shift fringe image; An acquisition unit, configured to acquire an object point set corresponding to each pixel point and corresponding light parameters according to the absolute phase data set and preset size parameters; An intersection point set acquisition unit, used to determine the corresponding optical axis vertical plane according to the imaging device and the light parameters, and acquire the intersection point set corresponding to the light and the optical axis vertical plane according to the light parameters; A weight coefficient acquisition unit, used to acquire the weight coefficient corresponding to each grid point in the plane perpendicular to the optical axis and the adjacent light intersection points in the intersection point set; A mapping set construction unit, configured to construct a distortion correction mapping set based on the pixel index corresponding to the orthogonal phase-shifted fringe image in the imaging device and the light intersection and the weight coefficient; The correction processing unit is used to perform correction processing on the grayscale values ​​of the pixels in the input image to be corrected according to the distortion correction mapping set to obtain a corresponding corrected image.

7. The imaging distortion correction device based on the light model according to claim 6, characterized in that: The acquisition unit comprises: An object point set acquisition unit, used to calculate the object point coordinates corresponding to each pixel point and the target coordinate system according to the matching phase data pairs in the absolute phase data set and the size parameters, so as to obtain the object point set corresponding to each pixel point; The light parameter calculation unit is used to calculate the light parameters of the light corresponding to the object point of each pixel point according to the collinearity of the object points corresponding to the pixel points in each target coordinate system and according to the object point set.

8. The imaging distortion correction device based on the light model according to claim 6, characterized in that: The intersection set acquisition unit includes: An optical axis vertical plane generating unit, used to generate a plane vertical to the optical axis according to the principal light of the imaging device as the optical axis and determine the plane as the corresponding optical axis vertical plane; The coordinate calculation unit is used to perform simultaneous calculations according to the light parameters of each pixel point and the plane equation of the plane perpendicular to the optical axis to obtain the intersection coordinates, so as to obtain the corresponding intersection set.

9. A computer device, characterized in that: The device includes a processor, a communication interface, a memory and a communication bus, wherein the processor, the communication interface and the memory communicate with each other via the communication bus; Memory, used to store computer programs; The processor is used to implement the steps of the imaging distortion correction method based on the light model described in any one of claims 1 to 5 when executing the program stored in the memory.

10. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the imaging distortion correction method based on a light model as described in any one of claims 1 to 5 are implemented.

Citation Information

Patent Citations

  • Light field camera calibration method for eliminating distortion of main lens

    CN114782545A

  • Multi-eye epipolar correction method and device, computer equipment and storage medium

    CN116957987A

  • Calibration device, calibration method, optical device, photographing device, projecting device, measurement system, and measurement method

    US20190073795A1