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

By collecting target image data, constructing a light model, obtaining light parameters and intersection points, and establishing a distortion correction mapping, the problem of poor imaging distortion correction in the existing technology is solved, and rapid distortion correction is achieved for a variety of imaging devices.

CN119991519BActive Publication Date: 2025-09-26SHENZHEN UNIV
View PDF 2 Cites 0 Cited by

Patent Information

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

AI Technical Summary

Technical Problem

Existing imaging distortion correction methods have poor correction effects in imaging devices such as non-pinhole imaging, irregular reflecting mirrors, asymmetric refractive media, and ultra-wide-angle large distortion.

Method used

By collecting the orthogonal phase-shifted fringe images of the target, determining the absolute phase data set, obtaining the object point set and light parameters, constructing the intersection set of the optical axis perpendicular plane, calculating the weighted coefficients, establishing the distortion correction mapping set, and performing image correction.

Benefits of technology

The invention realizes rapid distortion correction of imaging devices with small distortion, large distortion and irregular deformation, and is applicable to a variety of imaging devices.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119991519B_ABST
    Figure CN119991519B_ABST
Patent Text Reader

Abstract

The present invention discloses an imaging distortion correction method, device, equipment and medium based on a light model. The method includes: collecting an orthogonal phase-shifted fringe image corresponding to a target and determining an absolute phase data set corresponding to each pixel point in the orthogonal phase-shifted fringe image, and obtaining a set of object points corresponding to each pixel point and corresponding light parameters in combination with preset size parameters; obtaining a set of intersection points corresponding to the light and a plane perpendicular to the optical axis based on 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 set and constructing a distortion correction mapping set; and correcting the grayscale values ​​of the pixel points in the input image to be corrected based on the distortion correction mapping set to obtain a corresponding corrected image. The above method can establish a distortion correction mapping set by calibrating the light parameters of the imaging device and reconstructing the light, and can be generally applied to 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] During the optical imaging process, due to errors in the hardware processing and assembly of the actual imaging device, or interference from the imaging environment and imaging conditions, the object information will inevitably be distorted or deformed after passing through the imaging device. Conventional imaging distortion models, such as radial and tangential polynomial distortion models, cannot be applied to all imaging devices, especially those with non-pinhole imaging, irregular reflective mirrors, asymmetric refractive media, and ultra-wide-angle large distortion. As a result, the conventional imaging distortion models have poor correction effects in some imaging devices. Therefore, the imaging distortion correction methods in the existing technical methods have the problem of poor distortion correction effect. Summary of the Invention

[0003] The embodiments of the present invention provide a method, apparatus, device and medium for correcting imaging distortion based on a light model, aiming to solve the problem of poor distortion correction effect existing in imaging distortion correction methods in the prior art.

[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] Acquire 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 determine an absolute phase data set corresponding to each pixel point in the orthogonal phase-shifted fringe image;

[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] an acquisition unit, configured to acquire a set of object points corresponding to each pixel point and corresponding light parameters according to the absolute phase data set and 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] A weight coefficient acquisition unit, configured to acquire a weight coefficient corresponding to each grid point in the plane perpendicular to the optical axis and an adjacent light intersection point in the intersection point set;

[0016] A mapping set construction unit, configured to construct a distortion correction mapping set based on the pixel indices corresponding to the intersections of the orthogonal phase-shifted fringe images and the light rays in the imaging device and the weighting coefficients;

[0017] 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.

[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 for storing computer programs;

[0020] The processor is configured to implement the steps of the imaging distortion correction method based on the light model described in the first aspect when executing the program stored in the memory.

[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] The embodiments of the present invention provide an imaging distortion correction method, device, equipment, and medium based on a light model. The method includes: collecting an orthogonal phase-shifted fringe image corresponding to a target and determining an absolute phase data set corresponding to each pixel in the orthogonal phase-shifted fringe image, and obtaining a set of object points corresponding to each pixel and corresponding light parameters in combination with preset size parameters; obtaining a set of intersection points corresponding to the light parameters and a plane perpendicular to the optical axis; obtaining weight coefficients corresponding to each grid point in the plane perpendicular to the optical axis and adjacent light intersections in the intersection set and constructing a distortion correction mapping set; and correcting 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. The above method directly calibrates the light parameters of the imaging device and reconstructs the light to establish a distortion correction mapping set. It is generally applicable to imaging devices with small distortion, large distortion, and irregular deformation, and realizes rapid distortion correction of images. BRIEF DESCRIPTION OF THE DRAWINGS

[0023] In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the following briefly introduces the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0024] Figure 1 A flowchart of a method for correcting imaging distortion based on a light model provided by an embodiment of the present invention;

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

[0026] Figure 3 A schematic diagram of another application scenario of the imaging distortion correction method based on the light model provided in an embodiment of the present invention;

[0027] Figure 4 A schematic diagram of another application scenario of the imaging distortion correction method based on the light model provided in an embodiment of the present invention;

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

[0029] Figure 6 It is a schematic block diagram of a computer device provided by 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] See also 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, the light passes through multiple targets in sequence and enters the imaging device; wherein the target corresponds to the plane where the effective field of view is located, and the target is provided with sinusoidal phase-shifted stripes in the horizontal or vertical direction, then the orthogonal phase-shifted stripe image corresponding to the sinusoidal phase-shifted stripes can be obtained through the imaging device and output to the terminal device, and the terminal device can obtain the orthogonal phase-shifted stripe image through the imaging device. The absolute phase data of each pixel point in the orthogonal phase-shifted stripe image is compared with the absolute phase data of the target reference, then the absolute phase data of each pixel point in the orthogonal phase-shifted stripe image can correspond to the reference absolute phase data on each target. As shown Figure 2 As shown, the absolute phase data of pixel m is consistent with the absolute phase data of target Π1 on X1 w The absolute phase data at the mark matches the X2 on the target Π2 w The absolute phase data at the mark matches the target π N Up X N w The absolute phase data at the marked position matches, and N represents the total number of targets. Then, the multiple absolute phase data corresponding to each pixel point and multiple targets are combined into an absolute phase data set.

[0037] S120 . Obtain an object point set corresponding to each pixel point and corresponding light parameters according to the absolute phase data set and preset size parameters.

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

[0039] Specifically, the target coordinate system of each target in the three-dimensional space can be restored according to the size and orientation information of each target in the size parameter. The phase data matching the phase data set is obtained. Each set of phase data corresponds to a pixel point and the absolute phase data corresponding to the pixel point and multiple targets. Each photosensitive pixel m in the sensor corresponds to a ray in space. The coordinates of the object point on the ray are X = (X, Y, Z) T The relationship with the light l can be expressed as follows:

[0040]

[0041] Among them, the light parameters (x, y) and Represent the spatial and angular coordinates of the light, respectively. Each pixel in the absolute phase data set corresponds to a photosensitive pixel m and a light ray. Each photosensitive pixel and a target coordinate system correspond to an object point coordinate. The multiple object point coordinates corresponding to each pixel and each target coordinate system are combined into an object point set.

[0042] Converting Equation (1) into vector form can be expressed as Equation (2):

[0043]

[0044] Where x = (x, y, 0) T is the intersection of the light and the xy plane of the coordinate system. The light l corresponds to different light parameter values ​​in different light coordinate systems. Taking the light parameters (x, y) in the light ray l can form an intersection with a corresponding coordinate system xy plane. is the direction vector of the light, and Z is the coordinate parameter value corresponding to the z-axis direction.

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

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

[0047] Wherein, i=1, 2, N, i is the serial number of the target.

[0048] The coordinate X of an object point on a certain ray in the ray coordinate system i The pose transformation parameters (R i |T i ) is converted to the coordinate X in the i-th target coordinate system i w When , there is a corresponding relationship as shown in formula (4):

[0049]

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

[0051]

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

[0053] S130 , 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.

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

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

[0056] Select a ray at the most central position of the imaging device as the main ray, use the main ray as the optical axis to establish a plane perpendicular to the optical axis, and use the plane perpendicular to the optical axis as the plane to calculate the corresponding plane equation; Figure 3 As shown, the imaging plane is the plane where the sensor performs photosensitive imaging. Furthermore, by performing a simultaneous calculation based on the light parameters of each pixel and the plane equation of the plane perpendicular to the optical axis, the intersection coordinates corresponding to the intersection between the light emitted by each pixel and the plane perpendicular to the optical axis can be obtained. Thus, each pixel's light ray and the plane perpendicular to the optical axis correspond to one intersection coordinate. Obtaining the intersection coordinates of all intersections yields the intersection set.

[0057] S140. Obtain 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.

[0058] Obtaining weight coefficients corresponding to each grid point in the plane perpendicular to the optical axis and adjacent ray intersection points in the intersection point set. Furthermore, the plane perpendicular to the optical axis may be gridded to obtain a plane perpendicular to the optical axis containing the grid points, and weight coefficients are calculated based on the grid points and the adjacent ray intersection points in the intersection point set to obtain the weight coefficients.

[0059] In a specific embodiment, step S140 includes sub-steps: 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; obtaining the light intersection points adjacent to each grid point according to the distance between the light intersection points in the intersection point set and each grid point in the grid point set; calculating the distance weight corresponding to each grid point and the adjacent light intersection points; normalizing the distance weights of each grid point to obtain the weighting coefficient corresponding to each grid point.

[0060] Specifically, the plane perpendicular to the optical axis can be first divided into a grid. Specifically, the maximum and minimum values ​​of the horizontal coordinates of each intersection in the intersection set, as well as the maximum and minimum values ​​of the vertical coordinates of the intersections can be obtained; the horizontal boundary size of the grid can be determined according to the maximum and minimum values ​​of the horizontal coordinates; the vertical boundary size of the grid can be determined according to 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 horizontal grids is S, the horizontal single-side size of the grid d = (X max -X min ) / (S-1), the corresponding relationship of the horizontal single-side size d in the plane perpendicular to the optical axis is as follows Figure 3 As shown, the horizontal spacing between adjacent grid points is d.

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

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

[0064] Among them, dis() is used to calculate the geometric distance between two spatial points. Further, according to the distance d k The distance weights corresponding to the h adjacent light intersection points and grid points are obtained respectively, which can be expressed as formula (7):

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

[0066] Among them, f() represents the function of solving the weight based on the distance, and obtains h adjacent light intersection points q k For p g After the distance weights are calculated, the h distance weights are normalized to obtain the corresponding weight coefficients. The calculation formula for normalization is shown in formula (8):

[0067]

[0068] Among them, the distance weight W of the kth ray intersection point k , after normalization, the weight coefficient obtained is W' k Obtain the weighted coefficients of each weight obtained after normalization.

[0069] S150 , constructing a distortion correction mapping set based on the pixel indices corresponding to the intersections of the orthogonal phase-shifted fringe images and the light rays in the imaging device and the weighting coefficients.

[0070] A set of distortion correction maps is constructed based on the pixel indices corresponding to the intersections of the orthogonal phase-shifted fringe images and the light rays in the imaging device and the weighted coefficients. Furthermore, a set of distortion correction maps based on the weighted coefficients can be constructed based on the pixel indices corresponding to the intersections of the orthogonal phase-shifted fringe images and the light rays.

[0071] Specifically, since the number of grid points is equal to the number of pixels in the orthogonal phase-shifted fringe image (i.e., one grid point corresponds to one pixel), and each ray intersection corresponds to a grid point, each pixel in the orthogonal phase-shifted fringe image corresponds to a ray intersection. The 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-shifted fringe image can be determined. A one-to-one mapping relationship can then be established between pixels and weighting coefficients, which can then be combined into a distortion correction mapping set.

[0072] S160 , 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.

[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, the weight coefficient corresponding to each pixel in the image to be corrected can be determined based on the mapping relationship in the distortion correction mapping set, and the weight coefficient and the grayscale value of the corresponding pixel are weighted to obtain a grayscale calculation value; the grayscale calculation value is superimposed on the grayscale value of the corresponding pixel in the image to be corrected, thereby correcting a pixel in the image to be corrected. By the above method, each pixel in the image to be corrected is corrected separately to obtain the corresponding corrected image. 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, device, equipment and medium based on the light model disclosed in the above embodiments include: collecting the orthogonal phase-shifted fringe image corresponding to the target and determining the absolute phase data set corresponding to each pixel in the orthogonal phase-shifted fringe image, combining the preset size parameters to obtain the object point set corresponding to each pixel and the corresponding light parameters; obtaining the intersection set corresponding to the light parameters and the plane perpendicular to the optical axis; obtaining the weighted coefficients corresponding to each grid point in the plane perpendicular to the optical axis and the adjacent light intersections in the intersection set and constructing a distortion correction mapping set; correcting 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 method directly calibrates the light parameters of the imaging device and reconstructs the light to establish the distortion correction mapping set. It can be used for imaging devices with small distortion, large distortion, and irregular deformation and realizes rapid distortion correction of images.

[0077] The embodiment of the present invention further provides an imaging distortion correction device based on a light model, which can be configured in a terminal device and is used to perform any embodiment of the imaging distortion correction method based on a light model. Figure 5 , Figure 5 A schematic block diagram of an imaging distortion correction device based on a light model provided in an embodiment of the present invention.

[0078] like Figure 5 As shown, the imaging distortion correction device 100 based on the light model includes a data set acquisition unit 110 , an acquisition unit 120 , an intersection set acquisition unit 130 , a weight 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 collect an orthogonal phase-shifted fringe image corresponding to 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-shifted fringe image.

[0080] The acquisition unit 120 is 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.

[0081] In a more specific embodiment, the acquisition unit 120 includes the following sub-units: an object point set acquisition unit, which is 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; a light parameter calculation unit, which is used to calculate the light parameters of the light corresponding to the object point of each pixel point according to the object point set based on the collinearity of the object points corresponding to the pixel points in each target coordinate system.

[0082] The intersection point set acquisition unit 130 is configured to determine a corresponding optical axis vertical 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 vertical plane according to the light parameters.

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

[0084] The weight coefficient acquisition unit 140 is used to obtain 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.

[0085] The mapping set construction unit 150 is configured to construct a distortion correction mapping set based on the pixel indices corresponding to the intersections of the orthogonal phase-shifted fringe images and the light rays in the imaging device and the weighting coefficients.

[0086] The correction processing unit 160 is configured to perform correction processing 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.

[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 imaging distortion correction device based on the light model can be implemented in the form of a computer program. Figure 6 Runs on the computer equipment shown.

[0089] See also Figure 6 , Figure 6 1 is a schematic block diagram of a computer device provided by an embodiment of the present invention. The computer device may be a terminal device for executing an imaging distortion correction method based on a light model to perform distortion correction processing on an image in an imaging device.

[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 , wherein the memory may include a storage medium 503 and an 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, the processor 502 may execute an imaging distortion correction method based on a light model. The storage medium 503 may be a volatile storage medium or a non-volatile storage medium.

[0092] The processor 502 is used to provide 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 the imaging distortion correction method based on the light model.

[0094] The communication interface 505 is used for network communication, such as providing data information transmission. Those skilled in the art will understand that Figure 6 The structure shown in the figure is merely a block diagram of a portion of the structure related to the solution of the present invention and does not constitute a limitation on the computer device 500 to which the solution of 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 a different component arrangement.

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

[0096] Those skilled in the art will understand that Figure 6 The embodiment of the computer device shown in the figure does not constitute a limitation on the specific composition of the computer device. In other embodiments, the computer device may include more or fewer components than shown in the figure, or combine certain components, or arrange the components differently. For example, in some embodiments, the computer device may only include a memory and a processor. In such an embodiment, the structure and function of the memory and processor are the same as those in the figure. Figure 6 The embodiments shown are consistent and will not be described again here.

[0097] It should be understood that in the embodiment of the present invention, the processor 502 may be a central processing unit (CPU), and the processor 502 may also be other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA) 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, etc.

[0098] In another embodiment of the present invention, a computer-readable storage medium is provided. The 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 method for correcting imaging distortion based on a light model.

[0099] Those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described equipment, devices and units can refer to the corresponding processes in the aforementioned method embodiments, and will not be repeated here. Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented with electronic hardware, computer software, or a combination of the two. In order 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 above description. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.

[0100] In the several embodiments provided by the present invention, it should be understood that the disclosed devices, apparatuses and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of the units is merely a logical function division. In actual implementation, there may be other division methods, or units with the same function may be combined 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 mutual 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 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 in the form of 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 is essentially 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. The computer software product is stored in a computer-readable storage medium and includes several instructions for enabling a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the method described in each embodiment of the present invention. The aforementioned computer-readable storage medium includes various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a magnetic disk, or an optical disk.

[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 such modifications or substitutions are intended to be within the scope of protection of the present invention. Therefore, the scope of protection of the present invention shall be subject to the scope of protection of the claims.

Claims

1. An imaging distortion correction method based on a light model, characterized in that: The method comprises: Acquire 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 determine an absolute phase data set corresponding to each pixel point in the orthogonal phase-shifted fringe image; 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; 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; 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 intersection of the orthogonal phase-shifted fringe image and the light in the imaging device and the weighting coefficient; 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.

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, the object point set corresponding to each pixel point and the corresponding light parameters are obtained, including: Calculating the object point coordinates corresponding to each pixel point and the target coordinate system based on 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 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: The determining of the 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, includes: Based on 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 optical axis perpendicular plane; The intersection coordinates are obtained by performing simultaneous calculations based on the light parameters of each pixel point and the plane equation of the plane perpendicular to the optical axis, so as 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 obtaining of 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 grid point coordinates of each grid point; Obtaining a ray intersection point adjacent to each grid point according to the distance between the ray intersection point in the intersection point set and each grid point in the grid point set; Calculating the distance weight corresponding to each grid point and the adjacent light intersection point; 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: 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 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 a light model is used to perform the imaging distortion correction method based on a light model according to any one of claims 1 to 5, and the device includes: 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; an acquisition unit, configured to acquire a set of object points 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, 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; A weight coefficient acquisition unit, configured to acquire a weight coefficient corresponding to each grid point in the plane perpendicular to the optical axis and an adjacent light intersection point in the intersection point set; A mapping set construction unit, configured to construct a distortion correction mapping set based on the pixel indices corresponding to the intersections of the orthogonal phase-shifted fringe images and the light rays in the imaging device and the weighting coefficients; 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 a light model according to claim 6, characterized in that: The acquisition unit includes: an object point set acquisition unit, configured 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 an 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 a light model according to claim 6, characterized in that: The intersection point set acquisition unit includes: an optical axis perpendicular plane generating unit, configured to generate a plane perpendicular to the optical axis according to the principal ray of the imaging device as the optical axis and determine the plane as the corresponding optical axis perpendicular plane; The coordinate calculation unit is used to perform simultaneous calculations based on 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 point 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 for storing computer programs; The processor is configured to implement the steps of the imaging distortion correction method based on the light model according to 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 the 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