CN110533618B - Lens distortion correction method and photographic device - Google Patents
Lens distortion correction method and photographic device Download PDFInfo
- Publication number
- CN110533618B CN110533618B CN201910827446.4A CN201910827446A CN110533618B CN 110533618 B CN110533618 B CN 110533618B CN 201910827446 A CN201910827446 A CN 201910827446A CN 110533618 B CN110533618 B CN 110533618B
- Authority
- CN
- China
- Prior art keywords
- lens
- distortion
- image
- focal length
- value
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
- 238000000034 method Methods 0.000 title claims abstract description 42
- 238000003384 imaging method Methods 0.000 claims abstract description 38
- 238000004364 calculation method Methods 0.000 claims abstract description 26
- 230000003287 optical effect Effects 0.000 claims description 19
- 241000226585 Antennaria plantaginifolia Species 0.000 claims description 17
- 238000004422 calculation algorithm Methods 0.000 claims description 10
- 230000007423 decrease Effects 0.000 claims description 3
- 238000005070 sampling Methods 0.000 claims description 3
- 238000000691 measurement method Methods 0.000 claims description 2
- 230000004075 alteration Effects 0.000 claims 1
- 238000003702 image correction Methods 0.000 abstract description 12
- 238000005259 measurement Methods 0.000 abstract description 12
- 238000001514 detection method Methods 0.000 abstract description 3
- 238000009432 framing Methods 0.000 abstract description 2
- 230000014509 gene expression Effects 0.000 description 5
- 238000010586 diagram Methods 0.000 description 3
- 230000000694 effects Effects 0.000 description 2
- 108091008695 photoreceptors Proteins 0.000 description 2
- 241000251468 Actinopterygii Species 0.000 description 1
- 238000012634 optical imaging Methods 0.000 description 1
- 238000005293 physical law Methods 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06T—IMAGE DATA PROCESSING OR GENERATION, IN GENERAL
- G06T5/00—Image enhancement or restoration
- G06T5/80—Geometric correction
Landscapes
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Image Processing (AREA)
- Studio Devices (AREA)
Abstract
The invention relates to a method for correcting lens distortion and a photographic device, belonging to the field of video imaging, and comprising a correction parameter module, a control module, a lens module, a photosensitive device, an image correction module, a display module and a storage module; aiming at the combination of different lenses and photosensitive devices, corresponding parameter values are obtained through measurement, and the radial distortion of the image shot by the photosensitive device can be quickly corrected through reverse calculation; the correcting parameter sequences under different focal lengths are established by the photographing device aiming at the specific lens and the photosensitive device by using the correcting method, and the correction calculation of framing and photographing is carried out in real time during photographing; the method has the characteristics of simplicity and rapidness, the method can be realized under various hardware conditions, and when the device is used for industrial measurement, video detection and other applications, the measurement precision can be effectively improved, and when the device is used for photographing, the picture fidelity can be improved, and a real scene can be restored.
Description
Technical Field
The invention belongs to the field of video imaging, and particularly relates to a method for correcting lens distortion and a photographic device.
Background
In all video imaging systems, the video imaging system is composed of a lens and a photosensitive device, generally, the lens always has distortion due to the limitation of optical characteristics, although the distortion of the lens can be reduced to the maximum extent by using an aspheric lens and combining a plurality of lenses, the current technical means still cannot produce a lens without distortion completely, and especially for a variable focal length lens, the requirement of small distortion at both long focal length and short focal length can not be met basically.
When the film is used as a photosensitive device, the distortion of video imaging depends on a lens, and when the electronic photosensitive device is used, a video image signal is directly converted into a digital electric signal and further can be processed by a computer technology to correct the distortion of the lens, so that a more real video image is obtained.
The distortion generated by the lens mainly consists of radial distortion and tangential distortion, wherein the tangential distortion is mainly caused by the fact that the optical axis of the lens and a photosensitive device are not perpendicular, and the tangential distortion can be basically ignored under the condition of modern processing technology, so that the method and the photographic device provided by the invention are used for correcting the radial distortion of the lens.
The radial distortion of the lens can be divided into barrel distortion and pincushion distortion, the two distortion causes are that the actual imaging and ideal distortion-free imaging of the lens on a photosensitive device are not in linear relation along the radial direction in a polar coordinate system which takes the intersection point of the optical axis of the lens and an imaging plane as the origin and a plane perpendicular to the optical axis as a coordinate plane, and for the pixels with barrel distortion and farther away from the origin, the actual imaging point is closer to the origin than the ideal distortion-free imaging point; for the pixels farther away from the origin, the actual imaging point is farther away from the origin than the ideal imaging point without distortion; the mathematical description can be expressed as:
rd=f(r) (1)
wherein r isdThe distance from the pixel coordinate of the actual imaging point to the origin point is r, and the distance from the pixel coordinate of the ideal distortion-free imaging point to the origin point is r.
In general, the function f in the formula (1) is not a simple function, and for a lens with a large shooting angle such as a fish lens, f cannot be expressed even by using an analytic function, and for a zoom lens, f is not constant, for example, some zoom lenses are distorted into pincushion distortion at a long focal length and barrel distortion at a short focal length; but for general application scenarios, such as ordinary photo cameras, industrial cameras, optical measurement cameras, etc., the lens radial distortion and fisheye lens ratio are relatively small, and f can be approximately described by a simple function, or can be described by a combination of simple functions.
Disclosure of Invention
The present invention is directed to solve the above problems, and a non-linear relationship of radial distortion can be described by using a simple function for a use scene with a small lens radial distortion.
According to the lens distortion correction method, in a polar coordinate system which takes the intersection point of a lens optical axis and an imaging plane as an origin and takes a plane vertical to the optical axis as a coordinate plane, the radial distortion of a lens is expressed as follows according to the characteristics of the radial distortion of the lens:
rd=K(r)·r
wherein r isdThe distance from the pixel coordinate of the actual imaging point to the origin; r is the distance from the pixel coordinate of the ideal undistorted imaging point to the origin; k (r) is a function close to constant 1, where r → 0, K → 1, where K monotonically decreases with r for barrel distortion and increases monotonically with r for pincushion distortion;
in the method, an exponential function is selected that is based on a natural constant e (i.e., e)xFunction) to approximate the surrogate K function because: e.g. of the typexThe function is a trend function of most attenuation and conduction processes in physics, and conforms to a general physical law; e.g. of a cylinderxThe function is the simplest nonlinear monotonic function conforming to the characteristics of the K function; using exAs an approximate function of the K function, barrel distortion and pincushion distortion, and zero distortion can be described simultaneously by one expression; both the CPU and the GPU with the math coprocessor contain exThe quick calculation instruction of the function can realize the quick calculation of the computer; in the case of small lens distortion, when the K function is expanded according to Taylor series, the constant 1 is dominant, and other high-order terms account for a smaller proportion, and the trend and e of x → 0xAre very similar in nature; using exWhen the K function is approximately expressed, a single parameter can be used for describing the whole distortion degree for the combination of the fixed focal length lens and the specific photosensitive device, and when the focal length is determined for the combination of the variable focal length lens and the specific photosensitive device, the specific parameter describes the distortion degree under the corresponding focal length, and the whole distortion degree is describedThe distortion parameter of the variable focal length lens can be described as a function with the focal length of the lens as an independent variable.
For pincushion distortion, for any pixel other than the origin, the actual imaging point is farther from the origin than the ideal undistorted imaging point, and the extent of this distancing increases with increasing distance from the origin, in exApproximating the K function, it can be expressed as:
rd=ea·r·r …a≥0 (3)
conversely, for any pixel that is barrel-distorted and not at the origin, the actual imaging point is closer to the origin than the ideal, distortion-free imaging point, and the degree of such a reduction increases as the distance from the pixel to the origin increases; with exApproximating the K function, it can be expressed as:
further, the barrel distortion and the pincushion distortion can be expressed in a unified form as:
rd=ea·rr … a is a real number (5)
When a is<0, represents barrel distortion, when a>0, representing pincushion distortion, and a =0, e a·r1, essentially representing no radial distortion, i.e. zero distortion, the larger a | representing the more severe the distortion;
for the combination of the lens with fixed focal length and the photosensitive device, when the parameters and the characteristics of the lens and the photosensitive device are determined, a is a constant;
for the combination of the variable focal length lens and the photosensitive device, when the parameters and the characteristics of the lens and the photosensitive device are determined, a is a function of the focal length F of the variable focal length lens, and the function is a continuous monotonic function;
for the shot image with radial distortion, a is obtained by a measuring method, and a corrected image with smaller distortion can be obtained by performing reverse calculation according to the formula;
for the coordinates (x, y) of the pixel point of the ideal undistorted image, the corresponding actual shooting pixel pointCoordinate (x)d,yd) The following equation can be obtained by substituting equation (5):
wherein the coordinate (x)0,y0) Coordinates of a rectangular coordinate system of an actually photographed image, which is an origin of a polar coordinate system, are generally central coordinates of an actually photographed picture, and coordinates (x) of the actually photographed pictured,yd) And filling the corrected image coordinate (x, y) pixel with the pixel color value to obtain the corrected color value of the coordinate (x, y) pixel, and further calculating all possible pixel coordinates (x, y) of the image one by one to obtain the corrected image, namely finishing the lens distortion correction.
In the method for correcting lens distortion, for a fixed focal length lens, a in the formula (6) can be obtained by a measurement method in a specific process: the method comprises the following steps of using a plane graph consisting of a plurality of vertical lines and horizontal lines as a shot object, placing the plane graph in front of a measured lens and photosensitive device combination, wherein the plane of the shot object is vertical to the optical axis of the lens, in the distortion-free ideal imaging, the imaging of all the horizontal lines and the vertical lines is necessarily straight, when the lens has barrel-shaped distortion, the horizontal lines and the vertical lines of an actually shot image converge towards the center of the image, and when the lens has pillow-shaped distortion, the horizontal lines and the vertical lines of the actually shot image diverge towards the periphery of the image;
selecting an arbitrary a value, carrying out correction calculation on the actually shot image by using the formula (6) to obtain a corrected image, carrying out collimation comparison on horizontal lines and vertical lines in all the corrected image by using a computer graphic processing tool such as Photoshop and the like, adjusting the a value according to the distortion characteristics of the corrected image, reducing the a value when the corrected image is barrel distortion, increasing the a value when the corrected image is pincushion distortion, carrying out correction calculation by using the formula (6) again after adjusting the a value, and repeating the steps until the a value with the minimum distortion degree of the corrected image is found out.
In the method for correcting lens distortion, for a variable focal length lens, a in the formula (6) can be obtained by a multipoint sampling method in a specific process that: respectively measuring a values a corresponding to a plurality of focal lengths of the variable focal length lens to form a parameter sequence of the values a; when the zoom lens is actually used, a mathematical approximation value of a corresponding to the actual focal length is calculated by using a mathematical interpolation method according to the actual focal length of the zoom lens, and the calculated mathematical approximation value of a is further substituted into the formula (6) to correct and calculate the shot image.
The method for correcting the lens distortion of the invention is characterized in that the coordinate (x) of the actually shot pictured,yd) The pixel color value of the image is calculated and obtained by using a mathematical image interpolation algorithm; the image interpolation algorithm comprises a nearest neighbor interpolation algorithm or a bilinear interpolation algorithm or a cubic interpolation algorithm. The radial distortion expressions (5) and (6) are continuous function expressions, the shot image is digital discrete data, and the coordinate (x) is obtained by calculation of the above expressiond,yd) In most cases, it cannot be aligned with the pixel coordinates of the actual shot, and therefore the picture coordinates (x) of the actual shotd,yd) The pixel color value of (2) needs to be obtained by calculation by using a mathematical interpolation method.
The invention relates to a camera device for correcting lens distortion, which comprises a correction parameter module, a control module, a lens module, a photosensitive device, an image correction module, a display module and a storage module; the correction parameter module, the control module, the lens module, the photosensitive device and the image correction module are electrically connected in sequence; the control module, the image correction module and the display module are electrically connected in sequence; the control module, the display module and the storage module are electrically connected in sequence; the control module is electrically connected with the storage module; the correction parameter module is used for measuring and creating correction parameters of the combination of the lens and the photoreceptor; for the variable focal length lens, the correction parameter module calculates a correction parameter a under the currently used focal length condition according to the instruction sent by the control module; the control module is used for receiving a user instruction and controlling other modules to work cooperatively; the lens module is an optical device for imaging and is connected with an instruction of the control module to perform focal length adjustment operation; the photosensitive device is used for converting the optical imaging into a digital electric signal; the image correction module is used for performing real-time correction calculation on the image shot by the current photosensitive device by using the value a provided by the correction parameter module according to the instruction sent by the control module; the display module is used for displaying the image information after the image correction module carries out correction calculation on the display screen in real time; the storage module is used for carrying out photographing or video shooting operation according to the instruction of the control module and storing the image information or the video information to a corresponding storage medium.
The lens distortion correction method and the photographic device provided by the invention are used for measuring and obtaining corresponding parameter values aiming at the combination of different lenses and photosensitive devices, and can be used for quickly correcting the radial distortion of an image shot by the photosensitive devices through reverse calculation; the correcting parameter sequences under different focal lengths are established by the photographing device aiming at the specific lens and the photosensitive device by using the correcting method, and the correction calculation of framing and photographing is carried out in real time during photographing; the method has the characteristics of simplicity and rapidness, the method can be realized under various hardware conditions, and when the device is used for industrial measurement, video detection and other applications, the measurement precision can be effectively improved, and when the device is used for photographing, the picture fidelity can be improved, and a real scene can be restored.
Drawings
FIG. 1 is a schematic diagram of the principles of the present invention;
fig. 2 is a schematic diagram of the relationship between the variable focal length lenses a and F according to the present invention.
Fig. 3 is a flowchart of an implementation of a method for correcting lens distortion according to embodiment 1 of the present invention;
fig. 4 is a structural view of a camera apparatus for correcting lens distortion according to embodiment 2 of the present invention;
FIG. 5 is a square base chart for measurement taken by an industrial camera;
FIG. 6 is a graph showing the effect of correcting a square-base chart for measurement using the method of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention are further described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only some embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
According to the characteristic of the lens radial distortion, in a polar coordinate system which takes the intersection point of a lens optical axis and an imaging plane as an origin and takes a plane perpendicular to the optical axis as a coordinate plane, the lens radial distortion is expressed as:
rd=K(r)·r
wherein r isdThe distance from the pixel coordinate of the actual imaging point to the origin; r is the distance from the pixel coordinate of the ideal undistorted imaging point to the origin; k (r) is a function close to constant 1, where r → 0, K → 1, where K monotonically decreases with r for barrel distortion and increases monotonically with r for pincushion distortion;
as shown in FIG. 1, for pincushion distortion, for any pixel other than the origin, the actual imaging point is farther from the origin than the ideal undistorted imaging point, and this distance increases with increasing distance from the origin, in exApproximating the K function, it can be expressed as:
rd=ea·r·r …a≥0 (3)
conversely, for any pixel that is barrel-distorted and not at the origin, the actual imaging point is closer to the origin than the ideal, distortion-free imaging point, and the degree of such a reduction increases as the distance from the pixel to the origin increases; with exApproximating the K function, it can be expressed as:
further, the barrel distortion and the pincushion distortion can be expressed in a unified form as:
rd=ea·rr … a is a real number (5)
When a is<0, represents barrel distortion, when a>0, representing a pillow distortionWhen a =0, ea·r≡ 1, essentially representing no radial distortion, i.e. zero distortion, a larger | a | representing a more severe distortion;
for the combination of the lens with fixed focal length and the photosensitive device, a is a constant;
for the combination of the variable focal length lens and the photosensitive device, a is a function of the focal length F of the variable focal length lens, and the function is a continuous monotonic function;
for the shot image with radial distortion, a is obtained by a measuring method, and a corrected image with smaller distortion can be obtained by performing reverse calculation according to the formula;
for the pixel point coordinates (x, y) of the ideal undistorted image, the corresponding actual shooting pixel point coordinates (x)d,yd) The following equation can be obtained by substituting equation (5):
the specific steps of the method for correcting lens distortion are shown in fig. 3:
the method comprises the following steps: a checkered pattern composed of a plurality of horizontal straight line segments and vertical straight line segments is used as a subject to be shot, and the optical axis of the lens of the shooting device is vertically aligned with the center of the checkered pattern.
In the distortion-free ideal imaging, imaging of all horizontal lines and vertical lines is necessarily straight lines, when barrel distortion exists in the lens, the horizontal lines and the vertical lines of the actually shot image converge towards the center of the image, and when pillow distortion exists in the lens, the horizontal lines and the vertical lines of the actually shot image diverge towards the periphery of the image.
Step two: the variable focal length lens is adjusted to the minimum focal length, the distance from a shot object to the lens is moved, the whole square graph is filled in the whole shooting field of view, and the focal length does not need to be adjusted for the lens with the fixed focal length.
For a combination of a specific lens and a photosensitive device, a is a constant, and for a combination of a variable focal length lens and a specific photosensitive device, a is a function of a focal length F of the variable focal length lens, so that for the variable focal length lens, a needs to be measured from a plurality of different focal lengths respectively, and a sequence of a parameters is formed.
Step three: an image is captured, and correction calculation is performed according to equation (6) using an arbitrary a value, to obtain a corrected image.
In fact, without any limitation to a in theory, an arbitrary a value is empirically obtained for a lens with small radial distortion, usually | a | is much smaller than 1, and can be calculated from | a | =0.01, where a is negative when the actually photographed image is barrel-shaped distortion and positive when the actually photographed image is pincushion distortion.
Step four: adjusting the value a according to the distortion characteristic of the corrected image, and calculating the corrected image from the new value a until the value a with the best correction effect is obtained and used as the value a under the corresponding focal length of the lens or the value a of the fixed lens;
and (3) readjusting the value a according to the corrected image calculated in the step three and the corrected distortion condition, increasing the value a when the corrected image is pincushion distortion, reducing the value a when the corrected image is barrel-shaped distortion, adjusting the value a, then performing correction calculation again by using the formula (6), and repeating the steps until finding out the value a with the minimum distortion degree of the corrected image.
Step five: and (5) for the variable focal length lens, adjusting the actual focal length of the lens, repeatedly shooting and calculating the a value corresponding to the focal length according to the step (6).
Step six: and repeatedly adjusting the focal length of the variable focal length lens, photographing and calculating the value a of the corresponding focal length until the focal length of the variable focal length lens is adjusted to be the longest focal length.
The a of the zoom lens is a function taking the focal length of the zoom lens as an independent variable, so that multi-point sampling is needed, under the condition of different focal lengths, the a value corresponding to the focal length is measured for multiple times, and an a parameter sequence is formed, and generally, one zoom lens samples at least 5-10 different focal lengths and calculates the corresponding a value.
Step seven: for a fixed lens, the a value is recorded as a parameter for performing image correction calculation using expression (6), and for a variable focal length lens, a plurality of a values corresponding to focal lengths are recorded, and as a parameter sequence for performing correction calculation using expression (6).
The parameter sequence a of the variable focal length lens or the value a of the fixed lens can be obtained through the seven steps or the steps; and (3) for the fixed focal length lens, correcting the actually shot image by using the a value of the fixed focal length lens through the formula (6), for the variable focal length lens, obtaining an a value approximate to the actually used focal length by performing mathematical interpolation on the a parameter sequence according to the focal length used by the actual lens, and further correcting the actually shot image by using the formula (6) for calculation.
Fig. 2 is a schematic diagram showing the relationship between a and the focal length F of a zoom lens, in general, the zoom lens generates barrel distortion at a short focal length and pincushion distortion at a long focal length, and the curve is as shown in fig. 2, where a is negative at the short focal length and a is positive at the long focal length, and the lens necessarily has a focal length, a is zero, i.e., a distortion point of zero, and if the zoom lens generates the pincushion distortion at both the short focal length and the long focal length, the curves in fig. 2 are all located above the F-axis, whereas if the zoom lens generates the barrel distortion at both the short focal length and the long focal length, the curves in fig. 2 are all located below the F-axis.
Fig. 5 is a background grid chart for optical measurement, and in the actual working condition of an image shot by using an industrial camera, the grids at the boundary are obviously not straight lines, but inwardly converged, and the lens has barrel-shaped distortion.
Fig. 6 is an image corrected by the method of fig. 5 according to the first embodiment, in which the boundaries of the square lines and the drawing board in the corrected image are both close to straight lines, and the accuracy of measurement with higher resolution is higher than that of the original image.
Example two
A camera device for correcting lens distortion, as shown in fig. 4, is composed of nine modules, each of which is: the device comprises a correction parameter module, a control module, a lens module, a photosensitive device, an image correction module, a display module and a storage module.
The control module is the control core of the photographic device, receives user instructions and controls the whole other modules to work cooperatively according to the user instructions.
The correction parameter module stores a correction parameter a or a parameter sequence of a lens and photoreceptor combination obtained by measurement according to the first embodiment, and if the lens is a variable focal length lens, the correction parameter module can obtain the actual focal length of the current lens according to an instruction sent by the control module, and calculate the approximate value of a under the current focal length condition by using the parameter sequence of a and a mathematical interpolation method.
The lens module is a specific optical device in the photographic device, consists of a lens and a corresponding control mechanism, can receive an instruction sent by the control module to adjust parameters such as the focal length of the lens, and correspondingly stores a correction parameter a or a parameter sequence matched with the lens in the correction parameter module.
The photosensitive device is a device for directly converting an optical signal into a digital electrical signal, a specific photosensitive device and a specific lens combination determine a specific correction parameter a or a parameter sequence, and the a or a parameter sequence is required to be re-measured according to the method of the first embodiment no matter the photosensitive device or the lens is replaced; for a specific device, such as a specific model of smart phone, tablet computer, etc., the lens and the light sensing device are determined and known, and the a or a parameter sequence thereof can be provided by the device manufacturer or obtained from other sources and stored in the correction parameter module in an internet sharing manner.
The image correction module performs real-time correction calculation on the image shot by the current photosensitive device by using the value a provided by the correction parameter module according to the instruction sent by the control module to obtain a real-time corrected image, and for a smart phone, a tablet computer, a notebook computer and the like, the CPU or the GPU of the system can be used for calculation.
The display module displays the image information after the image correction module carries out correction calculation on the image information to a display screen in real time for a user to find a view and shoot reference.
The storage module is used for carrying out photographing or video shooting operation according to the instruction of the control module and storing the image information or the video information to a corresponding storage medium.
The nine modules form a complete photographic device, can realize real-time distortion correction and video shooting, and when the image correction module is applied to other scenes, the image correction module can also output corrected image information to other processing equipment, such as a video guide head of an automatic aircraft, an industrial detection video processing module, an optical measurement image processing module and the like.
Claims (4)
1. A method for correcting lens distortion, comprising: according to the characteristics of radial distortion of the lens, in a polar coordinate system which takes the intersection point of the optical axis of the lens and an imaging plane as an origin and takes a plane perpendicular to the optical axis as a coordinate plane, the radial distortion of the lens is expressed as:
rd=K(r)·r
wherein r isdThe distance from the pixel coordinate of the actual imaging point to the origin; r is the distance from the pixel coordinate of the ideal undistorted imaging point to the origin; k (r) is a function close to constant 1, where r → 0, K → 1, where K monotonically decreases with r for barrel distortion and increases monotonically with r for pincushion distortion;
with exInstead of the K function, the radial distortion of the further lens can be expressed as:
rd=ea·ra is a real number (5)
Barrel distortion is represented when a < 0, pincushion distortion is represented when a > 0, and e is represented when a =0a·r1, essentially representing no radial distortion, i.e. zero distortion, the larger a | representing the more severe the distortion;
for the combination of the lens with fixed focal length and the photosensitive device, when the parameters and the characteristics of the lens and the photosensitive device are determined, a is a constant;
for the combination of the variable focal length lens and the photosensitive device, when the parameters and the characteristics of the lens and the photosensitive device are determined, a is a function of the focal length F of the variable focal length lens, and the function is a continuous monotonic function;
for the shot image with radial distortion, a is obtained by a measuring method, and a corrected image with smaller distortion can be obtained by performing reverse calculation according to the formula;
for the pixel point coordinates (x, y) of the ideal undistorted image, the corresponding actual shooting pixel point coordinates (x)d,yd) The following equation can be obtained by substituting equation (5):
wherein the coordinate (x)0,y0) Coordinates of a rectangular coordinate system of an actually photographed image, which is an origin of a polar coordinate system, are generally central coordinates of an actually photographed picture, and coordinates (x) of the actually photographed pictured,yd) And filling the corrected image coordinate (x, y) pixel with the pixel color value to obtain the corrected color value of the coordinate (x, y) pixel, and further calculating all possible pixel coordinates (x, y) of the image one by one to obtain the corrected image, namely finishing the lens distortion correction.
2. The method for correcting lens distortion according to claim 1, wherein: for the fixed focal length lens, the specific process that a in the above formula (6) can be obtained by adopting a measurement method is as follows: the method comprises the following steps of using a plane graph consisting of a plurality of vertical lines and horizontal lines as a shot object, placing the plane graph in front of a measured lens and photosensitive device combination, wherein the plane of the shot object is vertical to the optical axis of the lens, in the distortion-free ideal imaging, the imaging of all the horizontal lines and the vertical lines is necessarily straight, when the lens has barrel-shaped distortion, the horizontal lines and the vertical lines of an actually shot image converge towards the center of the image, and when the lens has pillow-shaped distortion, the horizontal lines and the vertical lines of the actually shot image diverge towards the periphery of the image;
selecting an arbitrary a value, carrying out correction calculation on the actually shot image by using the formula (6) to obtain a corrected image, carrying out collimation comparison on horizontal lines and vertical lines in all the corrected images, adjusting the a value according to the distortion characteristics of the corrected image, reducing the a value when the corrected image is barrel-shaped distortion, increasing the a value when the corrected image is pillow-shaped distortion, carrying out correction calculation by using the formula (6) again after adjusting the a value, and repeating the steps until the a value with the minimum distortion degree of the corrected image is found out.
3. The method for correcting lens distortion of claim 1, wherein: for the variable focal length lens, the specific process that a in the above formula (6) can be obtained by adopting a multipoint sampling mode is as follows: respectively measuring a values a corresponding to a plurality of focal lengths of the variable focal length lens to form a parameter sequence of the values a; in actual use, according to the actual focal length of the zoom lens, a mathematical approximation value of a corresponding to the actual focal length is calculated by using a mathematical interpolation method, and the calculated mathematical approximation value of a is further substituted into the formula (6) to perform correction calculation on the shot image.
4. A method for lens aberration correction according to claim 2 or 3, wherein: the actual shot coordinates (x)d,yd) The pixel color value of the image is calculated and obtained by using a mathematical image interpolation algorithm; the image interpolation algorithm comprises a nearest neighbor interpolation algorithm or a bilinear interpolation algorithm or a cubic interpolation algorithm.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910827446.4A CN110533618B (en) | 2019-09-03 | 2019-09-03 | Lens distortion correction method and photographic device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201910827446.4A CN110533618B (en) | 2019-09-03 | 2019-09-03 | Lens distortion correction method and photographic device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN110533618A CN110533618A (en) | 2019-12-03 |
CN110533618B true CN110533618B (en) | 2022-11-01 |
Family
ID=68666410
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201910827446.4A Active CN110533618B (en) | 2019-09-03 | 2019-09-03 | Lens distortion correction method and photographic device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN110533618B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
WO2021195946A1 (en) * | 2020-03-31 | 2021-10-07 | Guangdong Oppo Mobile Telecommunications Corp., Ltd. | Imaging device, electrical device, method of manufacturing imaging device, and method of manufacturing electrical device |
CN112183413B (en) * | 2020-09-30 | 2024-05-14 | 东风柳州汽车有限公司 | Parking space detection method and device, storage medium and vehicle |
CN112215892B (en) * | 2020-10-22 | 2024-03-12 | 常州大学 | Method for monitoring position and motion path of site robot |
CN112330557A (en) * | 2020-11-03 | 2021-02-05 | 中国测绘科学研究院 | Bridge monitoring method of non-contact close-range image |
CN113238376B (en) * | 2021-05-10 | 2022-10-25 | 苏州中科全象智能科技有限公司 | Distortion analysis method for Samm lens |
Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016192618A (en) * | 2015-03-31 | 2016-11-10 | キヤノン株式会社 | Optical instrument having optical correction, and system using the same |
Family Cites Families (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP5067336B2 (en) * | 2007-12-26 | 2012-11-07 | 大日本印刷株式会社 | Image conversion apparatus and image conversion method |
JP5169787B2 (en) * | 2008-12-12 | 2013-03-27 | 大日本印刷株式会社 | Image conversion apparatus and image conversion method |
CN102915525B (en) * | 2012-09-19 | 2015-03-04 | 西北工业大学 | Method for correcting barrel distortion of images for full-frame fish-eye lenses |
US10438331B2 (en) * | 2014-06-26 | 2019-10-08 | Intel Corporation | Distortion meshes against chromatic aberrations |
CN106204480B (en) * | 2016-07-08 | 2018-12-18 | 石家庄域联视控控制技术有限公司 | Pattern distortion antidote and real-time apparatus for correcting based on conic section |
CN106780374B (en) * | 2016-12-01 | 2020-04-24 | 哈尔滨工业大学 | Fisheye image distortion correction method based on fisheye imaging model |
CN107492080B (en) * | 2017-09-25 | 2021-03-23 | 杭州云栖智慧视通科技有限公司 | Calibration-free convenient monocular head image radial distortion correction method |
CN108055510B (en) * | 2017-12-25 | 2018-10-12 | 北京航空航天大学 | A kind of real-time apparatus for correcting of two-way video based on FPGA and method |
-
2019
- 2019-09-03 CN CN201910827446.4A patent/CN110533618B/en active Active
Patent Citations (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2016192618A (en) * | 2015-03-31 | 2016-11-10 | キヤノン株式会社 | Optical instrument having optical correction, and system using the same |
Also Published As
Publication number | Publication date |
---|---|
CN110533618A (en) | 2019-12-03 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110533618B (en) | Lens distortion correction method and photographic device | |
CN111246089B (en) | Jitter compensation method and apparatus, electronic device, computer-readable storage medium | |
WO2019105154A1 (en) | Image processing method, apparatus and device | |
JP4159986B2 (en) | Method and system for calculating an image converted from a digital image | |
CN110493525B (en) | Zoom image determination method and device, storage medium and terminal | |
KR102143456B1 (en) | Depth information acquisition method and apparatus, and image collection device | |
JP6308748B2 (en) | Image processing apparatus, imaging apparatus, and image processing method | |
CN112261387B (en) | Image fusion method and device for multi-camera module, storage medium and mobile terminal | |
CN111385461B (en) | Panoramic shooting method and device, camera and mobile terminal | |
CN111340737B (en) | Image correction method, device and electronic system | |
TWI626500B (en) | Image capturing apparatus, lens unit, and signal processing apparatus | |
CN105141841A (en) | Camera equipment and method therefor | |
CN102236790B (en) | Image processing method and device | |
TWI517094B (en) | Image calibration method and image calibration circuit | |
CN114339042A (en) | Image processing method and device based on multiple cameras and computer readable storage medium | |
CN109996005B (en) | Focus correction method and device | |
CN111405185A (en) | Zoom control method and device for camera, electronic equipment and storage medium | |
CN113592753B (en) | Method and device for processing image shot by industrial camera and computer equipment | |
CN117278851A (en) | Focusing method and device applied to monitoring device and storage medium | |
CN107645634A (en) | A kind of undistorted wide angle network video camera and safety defense monitoring system | |
CN111614865B (en) | Multi-shot brightness synchronization method, equipment, device and storage medium | |
CN112804477B (en) | Method and device for determining image parameters of preset points, electronic equipment and storage medium | |
CN114092316A (en) | Image processing method, apparatus and storage medium | |
CN109584313B (en) | Camera calibration method and device, computer equipment and storage medium | |
EP2634750B1 (en) | A viewing device with object dimension measurement |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |