CN106600528B - Distortion correction algorithm for full-frame micro single-fisheye camera - Google Patents

Distortion correction algorithm for full-frame micro single-fisheye camera Download PDF

Info

Publication number
CN106600528B
CN106600528B CN201611213199.1A CN201611213199A CN106600528B CN 106600528 B CN106600528 B CN 106600528B CN 201611213199 A CN201611213199 A CN 201611213199A CN 106600528 B CN106600528 B CN 106600528B
Authority
CN
China
Prior art keywords
coordinate
image
matrix
pixel
undistorted
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
Application number
CN201611213199.1A
Other languages
Chinese (zh)
Other versions
CN106600528A (en
Inventor
王留召
魏占营
钟若飞
汪煌魁
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Capital Normal University
Original Assignee
Capital Normal University
Priority date (The priority date 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 date listed.)
Filing date
Publication date
Application filed by Capital Normal University filed Critical Capital Normal University
Priority to CN201611213199.1A priority Critical patent/CN106600528B/en
Publication of CN106600528A publication Critical patent/CN106600528A/en
Application granted granted Critical
Publication of CN106600528B publication Critical patent/CN106600528B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/04Context-preserving transformations, e.g. by using an importance map
    • G06T3/047Fisheye or wide-angle transformations

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Image Processing (AREA)

Abstract

The invention discloses a distortion correction method of a full-frame micro single fisheye camera, which comprises the steps of obtaining distortion parameters of the full-frame fisheye camera, determining a coordinate matrix of an undistorted image according to the distortion parameters, matching a matrix coordinate of a shot image with the matrix coordinate of the undistorted image, then carrying out an iterative difference solving process to obtain a pixel coordinate of the undistorted image closest to the pixel coordinate of the shot image, and obtaining a pixel value corresponding to each pixel of the matrix coordinate of the shot undistorted image. The method of sampling once and iteratively solving the difference value is adopted to operate, so that the correction becomes accurate, and the information of the original image is maintained to the maximum extent.

Description

Distortion correction algorithm for full-frame micro single-fisheye camera
Technical Field
The invention relates to the field of image processing, in particular to a distortion correction algorithm for a full-frame micro single-fisheye camera.
Background
With the rapid development of information technology, panoramic images are widely applied in recent years as a new technology, the most widely used panoramic stitching method at present is to use a panoramic camera to shoot a space image of 360 degrees, and then project the space image into a panoramic model to generate a panoramic image, wherein the most important is whether the internal and external parameters of the camera are accurate or not, which is directly related to the quality of the panoramic image.
In the internal parameters of the camera, the important point is that the distortion of the camera is corrected, and photos which are not subjected to distortion correction cannot be applied to splicing of high-quality measurable panoramic photos.
At present, a camera is calibrated to obtain a distortion parameter of the camera, an undistorted image coordinate is directly calculated through an original image pixel coordinate, and an interpolation is performed on an obtained undistorted image, so that each pixel is attached with a corresponding pixel value.
However, the accuracy of the prior art is low, so that the distortion correction quality is not high, and when the distortion is large, the correction quality cannot meet the use requirement, so that the lens with particularly large distortion such as a fish-eye lens cannot be corrected.
Disclosure of Invention
The invention aims to provide a distortion correction algorithm of a full-frame micro-monoscopic camera, which can accurately correct the distortion of the full-frame fisheye camera and furthest maintain the information of an original image.
In order to achieve the purpose, the invention provides the following scheme:
the invention relates to a method for correcting distortion of a full-frame micro single-fisheye camera, which comprises the following steps:
step 1: obtaining the radial distortion parameter k of the full-frame micro single fish-eye camera1,k2,k3,k4,k5Phase-cut distortion parameter p1,p2Projection center coordinate (x)p,yp);
Step 2: according to the radial distortion parameter k1,k2,k3,k4,k5Phase-cut distortion parameter p1,p2Projection center coordinate (x)p,yp) And coordinate matrix of original image
Figure BDA0001189303280000021
Determining coordinate matrix of undistorted image
Figure BDA0001189303280000022
Coordinate matrix of the original image
Figure BDA0001189303280000023
Obtaining a coordinate matrix of a photographed image by camera irradiation
Figure BDA0001189303280000024
Coordinate matrix (x) of the original image0,y0) Coordinate matrix (x) of said undistorted image1,y1) And the seat for shooting the imageMark matrix (x)2,y2) Is a matrix with m rows and n columns;
and step 3: coordinate matrix (x) of the shot image2,y2) Coordinate matrix (x) with said undistorted image1,y1) Matching to obtain the pixel coordinate (x) of the shot image2ij,y2ij) Pixel coordinate (x) of the nearest undistorted image1uv,y1uv),dx=x1uv-x2ij,dy=y1uv-y2ij
When (dx, dy) exceeds a threshold value, correcting the original image coordinate matrix (x) by (dx, dy)0,y0):
x′0=x0-dx,y′0=y0-dy obtaining a corrected original image coordinate matrix (x'0,y′0) And then, for the corrected original image coordinate matrix (x'0,y′0) Performing the operations of step 1 and step 2 until the pixel coordinate (x) of the shot image is obtained when (dx, dy) is within the threshold range2ij,y2ij) Pixel coordinates (x ') of undistorted image with required distance precision'1uv,y′1uv) Pixel coordinates (x ') of said distortion-free video'1uv,y′1uv) Pixel coordinates in a corresponding coordinate matrix of the original image;
wherein i is a value in 1, 2.. said, m, j is a value in 1, 2.. said, n, u is a value in 1-m, and v is a value in 1-n.
And 4, step 4: determining the pixel coordinate in the coordinate matrix of the corresponding original image and the pixel value obtained by interpolation in the original image as the pixel coordinate (x) of the shot image2ij,y2ij) The pixel value of (2).
Optionally, the algorithm for correcting distortion of a full-frame micro-monoscopic camera according to claim 1, wherein the matrix coordinates of the undistorted image are determined
Figure BDA0001189303280000031
The method specifically comprises the following steps: by passingThe equation:
x=x0-xp;y=y0-yp;r2=x2+y2
dr=k1×r3+k2×r5+k3×r7+k4×r9+k5×r11
Figure BDA0001189303280000032
Figure BDA0001189303280000033
determining matrix coordinates of undistorted images
Figure BDA0001189303280000034
According to the specific embodiment provided by the invention, the invention discloses the following technical effects: the method comprises the steps of obtaining a radial distortion parameter, a phase-cut distortion parameter, a projection center coordinate and a coordinate matrix of an original image of the full-frame micro-monocular fisheye camera to obtain a coordinate matrix of an undistorted image, matching the coordinate matrix of a shot image with the coordinate matrix of the undistorted image to obtain a pixel coordinate of the undistorted image with the nearest distance to the pixel coordinate of the shot image, and determining a pixel value of the pixel coordinate in the corresponding coordinate matrix of the original image as the pixel coordinate (x coordinate) of the shot image2ij,y2ij) The problem of discontinuous corrected images when distortion correction is directly carried out is avoided, so that the distortion correction of the camera is more accurate, and the resolution of the image is increased.
Drawings
In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings needed to be used in the embodiments will be briefly described below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art to obtain other drawings without inventive exercise.
FIG. 1 is a flow chart of a specific calibration method of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are only a part of the embodiments of the present invention, and not all of the embodiments. 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.
The invention aims to provide a distortion correction algorithm for a full-frame micro-single fisheye camera, which solves the problems that the traditional calibration method is complicated in operation and cannot calibrate a fisheye lens, and the problem that the resolution of an image is reduced due to repeated sampling in the correction process is solved, so that the distortion correction of the full-frame fisheye camera becomes simple, efficient and accurate.
As shown in fig. 1, the method for correcting distortion of a full-frame micro single-fisheye camera of the invention comprises:
step 100: obtaining the radial distortion parameter k of the full-frame micro single fisheye camera after calibration by adopting calibration software1,k2,k3,k4,k5Phase-cut distortion parameter p1,p2Projection center coordinate (x)p,yp)。
Step 201: according to the radial distortion parameter k1,k2,k3,k4,k5Phase-cut distortion parameter p1,p2Projection center coordinate (x)p,yp) And coordinate matrix of original image
Figure BDA0001189303280000041
Determining coordinate matrix of undistorted image
Figure BDA0001189303280000042
Determining matrix coordinates of an undistorted image
Figure BDA0001189303280000051
The method specifically comprises the following steps: by the equation:
x=x0-xp;y=y0-yp;r2=x2+y2
dr=k1×r3+k2×r5+k3×r7+k4×r9+k5×r11
Figure BDA0001189303280000052
Figure BDA0001189303280000053
determining matrix coordinates of undistorted images
Figure BDA0001189303280000054
Step 202: coordinate matrix of the original image
Figure BDA0001189303280000055
Obtaining a coordinate matrix of a shot image through camera shooting
Figure BDA0001189303280000056
Coordinate matrix (x) of the original image0,y0) Coordinate matrix (x) of said undistorted image1,y1) And a coordinate matrix (x) of the photographed image2,y2) Is a matrix of m rows and n columns.
Step 301: coordinate matrix (x) of the shot image2,y2) Coordinate matrix (x) with said undistorted image1,y1) Matching to obtain the pixel coordinate (x) of the shot image2ij,y2ij) Pixel coordinate (x) of the nearest undistorted image1uv,y1uv),dx=x1uv-x2ij,dy=y1uv-y2ij(ii) a The difference is only carried out once, and the information of the original image is kept to the maximum extent.
Step 302: when (dx, dy) exceeds a threshold value set according to the accuracy of the corrected image to be acquired, the original image coordinate matrix (x) is corrected by (dx, dy)0,y0):
x′0=x0-dx,y′0=y0-dy obtaining a corrected original image coordinate matrix (x'0,y′0) And then, for the corrected original image coordinate matrix (x'0,y′0) The operations of step 100, step 201 and step 202 are executed until the pixel coordinate (x) of the shot image is obtained when (dx, dy) is within the threshold value range2ij,y2ij) Pixel coordinates (x ') of undistorted image with required distance precision'1uv,y′1uv) Pixel coordinates (x ') of said distortion-free video'1uv,y′1uv) Pixel coordinates in a corresponding coordinate matrix of the original image; the method has the advantages that the method solves the problem that the resolution of an image is reduced due to multiple sampling in the correction process, so that the distortion correction of the full-frame fisheye camera is simple, efficient and accurate, and a lens with a large distortion amount can be corrected.
Step 400: determining the pixel coordinate in the coordinate matrix of the corresponding original image and the pixel value obtained by interpolation in the original image as the pixel coordinate (x) of the shot image2ij,y2ij) Each pixel is assigned a corresponding pixel value.
According to the invention, the original image pixel coordinate corresponding to the shot image pixel is calculated, so that the problem that the shot image is discontinuous when distortion correction is directly carried out is avoided. And the image is sampled only once, so that the resolution of the image is kept.
The embodiments in the present description are described in a progressive manner, each embodiment focuses on differences from other embodiments, and the same and similar parts among the embodiments are referred to each other. For the system disclosed by the embodiment, the description is relatively simple because the system corresponds to the method disclosed by the embodiment, and the relevant points can be referred to the method part for description.
The principles and embodiments of the present invention have been described herein using specific examples, which are provided only to help understand the method and the core concept of the present invention; meanwhile, for a person skilled in the art, according to the idea of the present invention, the specific embodiments and the application range may be changed. In view of the above, the present disclosure should not be construed as limiting the invention.

Claims (1)

1. A correction method for distortion of a full-frame micro single-fish-eye camera is characterized by comprising the following steps:
step 1: obtaining the radial distortion parameter k of the full-frame micro single fish-eye camera1,k2,k3,k4,k5Phase-cut distortion parameter p1,p2Projection center coordinate (x)p,yp);
Step 2: according to the radial distortion parameter k1,k2,k3,k4,k5Phase-cut distortion parameter p1,p2Projection center coordinate (x)p,yp) And coordinate matrix of original image
Figure FDA0002063210250000011
Determining coordinate matrix of undistorted image
Figure FDA0002063210250000012
Coordinate matrix of the original image
Figure FDA0002063210250000013
Obtaining a coordinate matrix of a shot image through camera shooting
Figure FDA0002063210250000014
Coordinate matrix (x) of the original image0,y0) Coordinate matrix (x) of said undistorted image1,y1) And a coordinate matrix (x) of the photographed image2,y2) Is a matrix with m rows and n columns;
determining matrix coordinates of an undistorted image
Figure FDA0002063210250000015
The method specifically comprises the following steps: by the equation:
x=x0-xp;y=y0-yp;r2=x2+y2
dr=k1×r3+k2×r5+k3×r7+k4×r9+k5×r11
Figure FDA0002063210250000016
Figure FDA0002063210250000021
determining matrix coordinates of undistorted images
Figure FDA0002063210250000022
And step 3: coordinate matrix (x) of the shot image2,y2) Coordinate matrix (x) with said undistorted image1,y1) Matching to obtain the pixel coordinate (x) of the shot image2ij,y2ij) Pixel coordinate (x) of the nearest undistorted image1uv,y1uv),dx=x1uv-x2ij,dy=y1uv-y2ij
When (dx, dy) exceeds a threshold value, correcting the original image coordinate matrix (x) by (dx, dy)0,y0):
x0′=x0-dx,y0′=y0-dy obtaining a modified original image coordinate matrix (x)0′,y0') and then correcting the coordinate matrix (x) of the original image0′,y0') performing the operations of step 1 and step 2 until the pixel coordinates (x) of the photographed image are obtained when (dx, dy) is within the threshold range2ij,y2ij) Pixel coordinate (x) of undistorted image with required distance precision1uv′,y1uv') pixel coordinates (x) of said desired undistorted image1uv′,y1uv') pixel coordinates in a coordinate matrix of the corresponding original image;
wherein i is a value in 1, 2.. said, m, j is a value in 1, 2.. said, n, u is a value in 1-m, v is a value in 1-n;
and 4, step 4: determining the pixel coordinate in the coordinate matrix of the corresponding original image and the pixel value obtained by interpolation in the original image as the pixel coordinate (x) of the shot image2ij,y2ij) The pixel value of (2).
CN201611213199.1A 2016-12-23 2016-12-23 Distortion correction algorithm for full-frame micro single-fisheye camera Active CN106600528B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611213199.1A CN106600528B (en) 2016-12-23 2016-12-23 Distortion correction algorithm for full-frame micro single-fisheye camera

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611213199.1A CN106600528B (en) 2016-12-23 2016-12-23 Distortion correction algorithm for full-frame micro single-fisheye camera

Publications (2)

Publication Number Publication Date
CN106600528A CN106600528A (en) 2017-04-26
CN106600528B true CN106600528B (en) 2020-04-14

Family

ID=58601455

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611213199.1A Active CN106600528B (en) 2016-12-23 2016-12-23 Distortion correction algorithm for full-frame micro single-fisheye camera

Country Status (1)

Country Link
CN (1) CN106600528B (en)

Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101246590A (en) * 2008-03-03 2008-08-20 北京航空航天大学 Star loaded camera spacing deformation geometric image correction method
CN101276465A (en) * 2008-04-17 2008-10-01 上海交通大学 Method for automatically split-jointing wide-angle image
WO2009021139A3 (en) * 2007-08-07 2009-09-11 Qualcomm Incorporated Surface mesh matching for lens roll-off correction
CN101661162A (en) * 2009-09-09 2010-03-03 谭洪舟 Distortion compensation method based on wide-angle lens
CN105096329A (en) * 2015-08-20 2015-11-25 厦门雅迅网络股份有限公司 Method for accurately correcting ultra-wide-angle lens

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US9196022B2 (en) * 2014-03-10 2015-11-24 Omnivision Technologies, Inc. Image transformation and multi-view output systems and methods

Patent Citations (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2009021139A3 (en) * 2007-08-07 2009-09-11 Qualcomm Incorporated Surface mesh matching for lens roll-off correction
CN101246590A (en) * 2008-03-03 2008-08-20 北京航空航天大学 Star loaded camera spacing deformation geometric image correction method
CN101276465A (en) * 2008-04-17 2008-10-01 上海交通大学 Method for automatically split-jointing wide-angle image
CN101661162A (en) * 2009-09-09 2010-03-03 谭洪舟 Distortion compensation method based on wide-angle lens
CN105096329A (en) * 2015-08-20 2015-11-25 厦门雅迅网络股份有限公司 Method for accurately correcting ultra-wide-angle lens

Non-Patent Citations (2)

* Cited by examiner, † Cited by third party
Title
图像桶形畸变校正的研究与实现;冯伟;《中国优秀硕士学位论文全文数据库信息科技辑》;20110815(第08期);第1-4章 *
广角图像畸变校正算法的研究与实现;段马丽;《中国优秀硕士学位论文全文数据库信息科技辑》;20140415(第04期);第1-4章 *

Also Published As

Publication number Publication date
CN106600528A (en) 2017-04-26

Similar Documents

Publication Publication Date Title
JP5768684B2 (en) Stereo image generation apparatus, stereo image generation method, and computer program for stereo image generation
US8189960B2 (en) Image processing apparatus, image processing method, program and recording medium
US9288392B2 (en) Image capturing device capable of blending images and image processing method for blending images thereof
WO2020097851A1 (en) Image processing method, control terminal and storage medium
US20130141526A1 (en) Apparatus and Method for Video Image Stitching
CN106485758B (en) Unmanned aerial vehicle camera calibration device, calibration method and assembly line calibration implementation method
US9600863B2 (en) Method for combining images
JP5932045B2 (en) Method and apparatus for conditional display of stereoscopic image pairs
KR20090021627A (en) Method of correcting image distortion and image processing device of adapting the same method
CN106600644A (en) Parameter correction method and device of panoramic camera
WO2017113535A1 (en) Method and apparatus for geometric calibration of camera
CN105264877A (en) Systems and methods for calibration of a 360 degree camera system
TW201320734A (en) Image processing method for producing background blurred image and image capturing device thereof
CN107492080B (en) Calibration-free convenient monocular head image radial distortion correction method
CN106851103B (en) Atomatic focusing method and device based on dual camera system
TWI626500B (en) Image capturing apparatus, lens unit, and signal processing apparatus
CN114339042A (en) Image processing method and device based on multiple cameras and computer readable storage medium
US8045822B2 (en) Correction of image distortion
CN105427299B (en) A kind of camera focal length method for solving based on distortion correction
CN106600528B (en) Distortion correction algorithm for full-frame micro single-fisheye camera
US20160212330A1 (en) Image processing method, image processing device, and electronic device
US8629925B2 (en) Image processing apparatus, image processing method, and computer program
CN105427294B (en) A kind of pattern distortion linear model method for building up
JP2006010613A (en) Correcting method of image distortion
CN114184284A (en) Real-time scene correction method and system for longitudinal scanning thermal infrared imager

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