CN105046657A - Image stretching distortion adaptive correction method - Google Patents

Image stretching distortion adaptive correction method Download PDF

Info

Publication number
CN105046657A
CN105046657A CN201510354230.2A CN201510354230A CN105046657A CN 105046657 A CN105046657 A CN 105046657A CN 201510354230 A CN201510354230 A CN 201510354230A CN 105046657 A CN105046657 A CN 105046657A
Authority
CN
China
Prior art keywords
coordinate
energy function
image
point
constraint
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.)
Granted
Application number
CN201510354230.2A
Other languages
Chinese (zh)
Other versions
CN105046657B (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.)
Zhejiang University ZJU
Original Assignee
Zhejiang University ZJU
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 Zhejiang University ZJU filed Critical Zhejiang University ZJU
Priority to CN201510354230.2A priority Critical patent/CN105046657B/en
Publication of CN105046657A publication Critical patent/CN105046657A/en
Application granted granted Critical
Publication of CN105046657B publication Critical patent/CN105046657B/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/80Geometric correction
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformations in the plane of the image
    • G06T3/60Rotation of whole images or parts thereof
    • G06T3/608Rotation of whole images or parts thereof by skew deformation, e.g. two-pass or three-pass rotation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10004Still image; Photographic image
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/10Image acquisition modality
    • G06T2207/10052Images from lightfield camera

Landscapes

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

Abstract

The invention provides an image stretching distortion adaptive correction method comprising: dividing an image into uniform square grids and establishing an input-output coordinate; determining a person area and a background area by using a face detection algorithm, establishing homographic constraint for each grid in order to correct the stretching distortion appearing in the person area, establishing homographic compatible constraint for adjacent grids in order to guarantee the continuity of the grids; determining a linear area by using a linear detection algorithm and establishing linear maintaining constraint for the linear area in order to protect a corrected line against bending; guaranteeing the uniform continuity of the whole image by means of global coordinate smoothness and uniformity constraint; using an energy function to express the constraint, adding weights and adding the energy equations, computing a coordinate value with the minimum energy by using a least square method so as to obtain a corrected image coordinate value; performing rendering by using bilinear mapping to obtain a final corrected image.

Description

A kind of image stretch distortion self-adapting correction method
Technical field
The present invention relates to a kind of digital image processing techniques, particularly relate to a kind of image stretch distortion self-adapting correction method.
Background technology
Camera wide-angle lens head can obtain the image compared with Large visual angle, but also easily introduces pattern distortion.Wherein a kind of distortion carries out imaging when pin-hole imaging model followed by wide-angle lens, and when having object near camera in imaging scene and be in field of view edge, in image after shooting, this object can seriously be stretched due to perspective effect, causes the distortion of this geometry of objects.Particularly this object be face or personage time, because the distortion of human eye to face and character image is comparatively responsive, this stretch distortion is more obvious.Therefore, needing the correct image to there is object stretch distortion, making image meet human eye vision.
But the straight line in image scene can be bent because correcting the stretching of object, therefore, need making other scenes or object remain unaffected at correction stretch distortion simultaneously.
In addition, panoramic picture is also a kind of wide angle picture in essence.When panoramic picture adopts linear perspective projection, this image also there will be stretch distortion.
In existing technology, there is the overall projection correction method by changing projection centre, having by image background to be separated the method corrected respectively again with figure picture, having projection correction's method of the maintenance picture material of optimization.
Summary of the invention
The object of the invention is to for the deficiencies in the prior art, provide a kind of image stretch to distort self-adapting correction method, the object especially stretch distortion that occurs of personage in correcting image while keeping background straight line in image straight.
The object of the invention is to be achieved through the following technical solutions: a kind of image stretch distortion self-adapting correction method, said method comprising the steps of:
Steps A: input the image with object stretch distortion.
Step B: set up grid and coordinate, is divided into square uniform grid by the image with object stretch distortion, and grid intersecting point coordinate is designated as x i,j=(x i,j, y i,j), i, j are grid intersection point sequence number; If grid intersecting point coordinate x i,jcoordinate after correction is u i,j=(u i,j, v i,j).
Step C: structure u i,jbound energy function.
Step C1: structure homography bound energy function.Calculate the angle rotation of people's object area being needed to field of view center to rotate computing formula is:
Wherein L is the horizontal-shift distance of people's object area center to field of view center, and f is focal length, L and f is all converted in units of pixel count.Then the homography conversion of people's object area can be written as:
u i , j = f ( U W ) + L
v i , j = f ( V W )
The homography conversion described by above formula is designated as H (x i,j), then can define the energy function of personage's area grid point homography constraint:
E h 1 = Σ x i , j ∈ P 1 | u i , j - H ( x i , j ) | 2
Wherein, P 1the set of behaviour object area net point.
The homography bound energy function of background area net point is defined as:
E h 2 = Σ x i , j ∈ P 2 | u i , j - x i , j | 2
Wherein, P 2for the set of background area net point.
Total homography bound energy function is
E h = E h 1 + E h 2 = Σ x i , j ∈ P 1 | u i , j - H ( x i , j ) | 2 + Σ x i , j ∈ P 2 | u i , j - x i , j | 2
Step C2: structure homography compatibility restriction energy function.
Definition P hcthe net point on total border between behaviour object area and background area, H 1, H 2be respectively the homography conversion of background area and people's object area.Then the energy function of homography compatibility restriction is:
E h c = Σ x i , j ∈ P h c ( | u i , j - H 1 ( x i , j ) | 2 + | u i , j - H 2 ( x i , j ) | 2 )
Step C3: structure straight line keeps bound energy function.First the straight-line segment except personage in background area in line segment detection algorithm detected image is used.The straight line set detected is defined as L.
Have in the grid of straight line process at each and define a virtual point
u i , j L = au i , j + bu i + 1 , j + cu i , j + 1 + du i + 1 , j + 1
Wherein coefficient a, b, c, d are calculated through bilinear interpolation by the x-y coordinate figure corresponding with u-v coordinate.Computing formula is:
a = ( x i + 1 , j - x i , j L ) ( y i , j + 1 - y i , j L ) ( x i + 1 , j - x i , j ) ( y i , j + 1 - y i , j )
b = ( x i , j L - x i , j ) ( y i , j + 1 - y i , j L ) ( x i + 1 , j - x i , j ) ( y i , j + 1 - y i , j )
c = ( x i , j L - x i , j ) ( y i , j L - y i , j ) ( x i + 1 , j - x i , j ) ( y i , j + 1 - y i , j )
d = ( x i + 1 , j - x i , j L ) ( y i , j L - y i , j ) ( x i + 1 , j - x i , j ) ( y i , j + 1 - y i , j )
Wherein, be taken as the mid point of line segment in gridblock.
For any straight line, define its starting point and terminal is respectively u startand u end.
Point u on calculated curve i,jand this is to the distance D between subpoint on straight line, and D is constrained to zero.Can be obtained by geometric relationship, the calculating formula of this distance D is
D=|(u i,j-u start) Tn|
n = 0 - 1 1 0 ( u e n d - u s t a r t ) | | u e n d - u s t a r t | |
Wherein, n=(n 1, n 2) be the unit normal vector of straight line.Calculate distance D, then the energy function of definable straight line maintenance constraint is
E l = Σ x i , j ∈ L ( ( u i , j - u s t a r t ) T n ) 2 = Σ x i , j ∈ L ( n 1 ( u i , j - u s t a r t ) + n 2 ( v i , j - v s t a r t ) ) 2 ;
Step C4: structure world coordinates smoothness constraint energy function.The Jacobi matrix of definition u-v coordinate is
J = ∂ u ∂ x = ∂ u ∂ x ∂ u ∂ y ∂ v ∂ x ∂ v ∂ y ;
When every in Jacobi matrix meets Cauchy-Riemann equations:
∂ u ∂ x = ∂ v ∂ y ∂ u ∂ y = - ∂ v ∂ x Time,
The continuously smooth of coordinate can be realized.Above formula discretize is obtained:
u i+1,j-u i,j=v i,j+1-v i,j
u i,j+1-u i,j=-(v i+1,j-v i,j);
Can coordinates computed smoothness constraint energy function by above formula:
E s=Σ((u i+1,j-u i,j)-(v i,j+1-v i,j)) 2+Σ((v i+1,j-v i,j)+(u i,j+1-u i,j)) 2
Step C5: structure world coordinates uniform restraint energy function.By Laplace operator discretize, the energy function of definable world coordinates uniform restraint is
E u = Σ | | u i + 1 , j + u i - 1 , j + u i , j +1 + u i , j -1 -4u i , j v i + 1 , j +v i - 1 , j +v i , j +1 +v i , j -1 -4v i , j | | 2 ;
Step D: linear least-squares solves.For each energy function adds weight coefficient and each energy function addition is obtained total energy function be:
E = w h 2 E h + w h c 2 E h c + w l 2 E l + w s 2 E s + w u 2 E u
Make E=0, then E h, E hc, E l, E s, E uall be required to be 0, can system of linear equations be constructed thus
Ax=b
Wherein A is constraint matrix, comprises the u in bound energy function i,jeach front coefficient.X is for comprising unknown quantity u to be asked i,jand v i,jcolumn vector, b comprises the constant term of separate equation.
Solve x with linear least square, solution formula is
x=(A TA) -1A Tb
Step e: solve net point coordinate u i,jand v i,jafter, the coordinate adopting bilinear map to calculate except net point after arbitrfary point (x, y) correction is
(u,v)=(1-x)(1-y)p1+x(1-y)p2+(1-x)yp3+xyp4。
Wherein, p1, p2, p3, p4 are respectively 4 net point coordinates of point (x, y) place grid, and p1 is upper left corner net point coordinate, and p2 is upper right corner net point coordinate, and p3 is lower left corner net point coordinate, and p4 is lower right corner net point coordinate.
Step F: after calculating calibration coordinate (u, v).By from input coordinate value (x, y) remapping and interpolation to the coordinate figure (u, v) calculated, obtain correcting image.
Method disclosed by the invention compares existing bearing calibration following feature: (1) can correct the stretch distortion of field of view edge place object, can keep again background straight line not by bending; (2) correct result images content consistent continuously, occur without the cutting imagination; (3) after correcting, the visual field loss of image is less; (4) bearing calibration completes automatically, without the need to manual intervention.
Accompanying drawing explanation
Fig. 1 is the process flow diagram of a kind of image stretch distortion correction method of the present invention;
Fig. 2 is the example image with stretch distortion described in the invention;
Fig. 3 is the foundation of grid and the definition schematic diagram of coordinate;
Fig. 4 is the division schematic diagram of image-region;
Fig. 5 is the definition schematic diagram of virtual point;
Fig. 6 is the calculating schematic diagram of distance D;
Fig. 7 is bilinear map schematic diagram;
Fig. 8 is the example image after the inventive method corrects;
Fig. 9 is that the example image after the inventive method corrects cuts out the image after into rectangle.
Embodiment
Image stretch distortion self-adapting correction method of the present invention comprises the image accepted with object stretch distortion; With uniform grid image divided and set up input and output coordinate system; Input picture is detected face location and size by Face datection algorithm, and determines rectangular area residing for personage and remaining background area by this information; Be respectively regional and set up homography constraint, to correct the stretch distortion occurred in people's object area, and set up homography compatibility restriction for adjacent area, the continuity of guarantee regional; Determine linearity region by line detection algorithm, set up straight line for linearity region and keep constraint, to ensure that bending does not appear in the straight line after correcting; Set up the level and smooth and homogeneity constraint guarantee entire image congruous continuity of world coordinates; Above-mentioned constraint is expressed as energy function, and adds weight, each energy equation is added; Energy function is minimized to construct system of linear equations, uses least square method to calculate this system of linear equations, obtain the image coordinate value after correcting; Use bilinear texture to map to carry out playing up obtaining final image.
For understanding implementation procedure of the present invention better, elaborate a kind of image stretch distortion self-adapting correction method of the present invention below in conjunction with accompanying drawing.The process flow diagram of concrete implementation step is see Fig. 1, and applying method of the present invention, to realize the concrete steps of image stretch distortion correction as follows:
Steps A: input the image with object stretch distortion.Fig. 2 is an example of the image with personage's stretch distortion, and distorted position double-head arrow is indicated.
Step B: set up grid and coordinate.For Fig. 2, as shown in Figure 3, image is divided into square uniform grid, grid intersecting point coordinate is designated as x i,j=(x i,j, y i,j), i, j are grid intersection point sequence number.After scalloping, coordinate to be solved is designated as u i,j=(u i,j, v i,j).
Step C: structure constraint energy function.
Step C1: structure homography bound energy function.Occur that the reason of stretch distortion is that object is in image f iotaeld-of-view edge, when rotation camera make it just to object and make object be in the shooting of visual field central authorities time, then object tensionless winkler foundation distortion.Therefore, the visual angle being changed image local area by homography conversion (perspective transform) is needed, to correct the stretch distortion of object in this region.First, use image Face datection algorithm to detect face location and size, determine rectangular area residing for personage and remaining background area by this information, the people's object area determined for Fig. 2 and background area are as shown in Figure 4.Calculate the angle rotation of people's object area being needed to field of view center to rotate computing formula is:
Wherein L is the horizontal-shift distance of people's object area center to field of view center, and f is focal length, L and f is all converted in units of pixel count.Then the homography conversion of people's object area can be written as:
u i , j = f ( U W ) + L
v i , j = f ( V W )
The homography conversion described by above formula is designated as H (x i,j), then can define the energy function of personage's area grid point homography constraint:
E h 1 = Σ x i , j ∈ P 1 | u i , j - H ( x i , j ) | 2
Wherein P 1the set of behaviour object area net point.Background area does not need homography to convert, and therefore the homography bound energy function of this regional network lattice point is defined as:
E h 2 = Σ x i , j ∈ P 2 | u i , j - x i , j | 2
Wherein P 2for the set of background area net point.Total homography bound energy function is
E h = E h 1 + E h 2 = Σ x i , j ∈ P 1 | u i , j - H ( x i , j ) | 2 + Σ x i , j ∈ P 2 | u i , j - x i , j | 2
Step C2: structure homography compatibility restriction energy function.There is public limit people's object area and background area.In order to prevent regional from causing region joining part to occur inconsistent phenomenon after homography conversion, homography compatibility restriction must be added at the adjacent part in region.Definition P hcfor the net point on interregional total border, H 1, H 2be respectively the homography conversion in figure and ground region.Then the energy function of homography compatibility restriction is:
E h c = Σ x i , j ∈ P h c ( | u i , j - H 1 ( x i , j ) | 2 + | u i , j - H 2 ( x i , j ) | 2 )
Described homography conversion H 1for:
u i , j = f ( U W ) + L
v i , j = f ( V W )
Described homography conversion H 2it is the unit matrix of 3 × 3.
Step C3: structure straight line keeps bound energy function.Ensure that image cathetus still keeps straight after calibrated, need to add straight line and keep constraint.First the straight-line segment of background area except personage in line segment detection algorithm detected image is used.The straight line set detected is defined as L.
Due to be not any straight line all through net point, therefore as shown in Figure 5, each have in the grid of straight line process define a virtual point
u i , j L = au i , j + bu i + 1 , j + cu i , j + 1 + du i + 1 , j + 1
Wherein coefficient a, b, c, d are calculated through bilinear interpolation by the x-y coordinate figure corresponding with u-v coordinate.Computing formula is:
a = ( x i + 1 , j - x i , j L ) ( y i , j + 1 - y i , j L ) ( x i + 1 , j - x i , j ) ( y i , j + 1 - y i , j )
b = ( x i , j L - x i , j ) ( y i , j + 1 - y i , j L ) ( x i + 1 , j - x i , j ) ( y i , j + 1 - y i , j )
c = ( x i , j L - x i , j ) ( y i , j L - y i , j ) ( x i + 1 , j - x i , j ) ( y i , j + 1 - y i , j )
d = ( x i + 1 , j - x i , j L ) ( y i , j L - y i , j ) ( x i + 1 , j - x i , j ) ( y i , j + 1 - y i , j )
Wherein, be taken as the mid point of line segment in gridblock.
For any straight line, define its starting point and terminal is respectively u startand u end.As shown in Figure 6, in order to by stretching for curve be straight line, need the some u on calculated curve i,jand this is to the distance D between subpoint on straight line, and D is constrained to zero.Can be obtained by geometric relationship, the calculating formula of this distance D is
D=|(u i,j-u start) Tn|
n = 0 - 1 1 0 ( u e n d - u s t a r t ) | | u e n d - u s t a r t | |
Wherein, n=(n 1, n 2) be the unit normal vector of straight line.Calculate distance D, then the energy function of definable straight line maintenance constraint is
E l = Σ x i , j ∈ L ( ( u i , j - u s t a n ) T n ) 2 = Σ x i , j ∈ L ( n 1 ( u i , j - u s t a r t ) + n 2 ( ν i , j - v s t a r t ) ) 2
Step C4: structure world coordinates smoothness constraint energy function.Enable picture material congruous continuity, need define world coordinates smoothness constraint, the Jacobi matrix of definition u-v coordinate is
J = ∂ u ∂ x = ∂ u ∂ x ∂ u ∂ y ∂ v ∂ x ∂ v ∂ y
When every in Jacobi matrix meets Cauchy-Riemann equations:
∂ u ∂ x = ∂ v ∂ y
∂ u ∂ y = - ∂ v ∂ x
Time, the continuously smooth of coordinate can be realized.Because grid is discrete, above formula discretize is obtained
u i+1,j-u i,j=v i,j+1-v i,j
u i,j+1-u i,j=-(v i+1,j-v i,j)
Can coordinates computed smoothness constraint energy function by above formula:
E s=Σ((u i+1,j-u i,j)-(v i,j+1-v i,j)) 2+Σ((v i+1,j-v i,j)+(u i,j+1-u i,j)) 2
Step C5: structure world coordinates uniform restraint energy function.Only consider that coordinate smoothness constraint can make correction of a final proof image peripheral meshes more much larger than grid in the middle part of image.Therefore, be necessary to add world coordinates uniform restraint, the grid ratio inside and outside image is consistent.The solution of Laplace's equation has even character, therefore adopts Laplace operator here.By Laplace operator discretize, the energy function of definable coordinate uniform restraint is
E u = Σ | | u i + 1 , j + u i - 1 , j + u i , j + 1 + u i , j - 1 - 4 u i , j v i + 1 , j + v i - 1 , j + v i , j + 1 + v i , j - 1 - vu i , j | | 2
Step D: linear least-squares solves.For each energy function adds weight coefficient and each energy function addition is obtained total energy function be:
E = w h 2 E h + w h c 2 E h c + w l 2 E l + w s 2 E s + w u 2 E u
Make energy function minimum, need E=0 be made.E=0, then E h, E hc, E l, E s, E uall be required to be 0, can system of linear equations be constructed thus
Ax=b
Wherein A is constraint matrix, comprises the u in bound energy function i,jeach front coefficient. xfor comprising unknown quantity u to be asked i,jand v i,jcolumn vector, b comprises the constant term of separate equation.Because this system of linear equations is overdetermination, useable linear least square method pair xsolve, solution formula is
x=(A TA) -1A Tb
Step e: solve net point coordinate u i,jand v i,jafter, bilinear map need be adopted to calculate all the other coordinates except net point.As shown in Figure 7, known net point p1, p2, p3, p4 coordinate, in grid, the calculating formula of arbitrfary point (u, v) is
(u,v)=(1-x)(1-y)p1+x(1-y)p2+(1-x)yp3+xyp4
Step F: after calculating calibration coordinate (u, v).Through from input coordinate value remapping and interpolation to the coordinate figure calculated, correction of a final proof image can be obtained, as shown in Figure 8.Correcting image irregularity boundary, need cut out as exporting after rectangle, as shown in Figure 9.

Claims (1)

1. an image stretch distortion self-adapting correction method, is characterized in that, said method comprising the steps of:
Steps A: input the image with object stretch distortion.
Step B: set up grid and coordinate, is divided into square uniform grid by the image with object stretch distortion, and grid intersecting point coordinate is designated as x i,j=(x i,j, y i,j), i, j are grid intersection point sequence number; If grid intersecting point coordinate x i,jcoordinate after correction is u i,j=(u i,j, v i,j).
Step C: structure u i,jbound energy function.
Step C1: structure homography bound energy function.Calculate the angle rotation of people's object area being needed to field of view center to rotate computing formula is:
Wherein L is the horizontal-shift distance of people's object area center to field of view center, and f is focal length, L and f is all converted in units of pixel count.Then the homography conversion of people's object area can be written as:
u i , j = f ( U W ) + L
v i , j = f ( V W )
The homography conversion described by above formula is designated as H (x i,j), then can define the energy function of personage's area grid point homography constraint:
E h 1 = Σ x i , j ∈ P 1 | u i , j - H ( x i , j ) | 2
Wherein, P 1the set of behaviour object area net point.
The homography bound energy function of background area net point is defined as:
E h 2 = Σ x i , j ∈ P 2 | u i , j - x i , j | 2
Wherein, P 2for the set of background area net point.
Total homography bound energy function is
E h = E h 1 + E h 2 = Σ x i , j ∈ P 1 | u i , j - H ( x i , j ) | 2 + Σ x i , j ∈ P 2 | u i , j - x i , j | 2
Step C2: structure homography compatibility restriction energy function.
Definition P hcthe net point on total border between behaviour object area and background area, H 1, H 2be respectively the homography conversion of background area and people's object area.Then the energy function of homography compatibility restriction is:
E h c = Σ x i , j ∈ P h c ( | u i , j - H 1 ( x i , j ) | 2 + | u i , j - H 2 ( x i , j ) | 2 )
Step C3: structure straight line keeps bound energy function.First the straight-line segment except personage in background area in line segment detection algorithm detected image is used.The straight line set detected is defined as L.
Have in the grid of straight line process at each and define a virtual point
u i , j L = au i , j + bu i + 1 , j + cu i , j + 1 + du i + 1 , j + 1
Wherein coefficient a, b, c, d are calculated through bilinear interpolation by the x-y coordinate figure corresponding with u-v coordinate.Computing formula is:
a = ( x i + 1 , j - x i , j L ) ( y i , j + 1 - y i , j L ) ( x i + 1 , j - x i , j ) ( y i , j + 1 - y i , j )
b = ( x i , j L - x i , j ) ( y i , j + 1 - y i , j L ) ( x i + 1 , j - x i , j ) ( y i , j + 1 - y i , j )
c = ( x i , j L - x i , j ) ( y i , j L - y i , j ) ( x i + 1 , j - x i , j ) ( y i , j + 1 - y i , j )
d = ( x i + 1 , j - x i , j L ) ( y i , j L - y i , j ) ( x i + 1 , j - x i , j ) ( y i , j + 1 - y i , j )
Wherein, be taken as the mid point of line segment in gridblock.
For any straight line, define its starting point and terminal is respectively u startand u end.
Point u on calculated curve i,jand this is to the distance D between subpoint on straight line, and D is constrained to zero.Can be obtained by geometric relationship, the calculating formula of this distance D is
D=|(u i,j-u start) Tn|
n = 0 - 1 1 0 ( u e n d - u s t a r t ) || u e n d - u s t a r t ||
Wherein, n=(n 1, n 2) be the unit normal vector of straight line.Calculate distance D, then the energy function of definable straight line maintenance constraint is
E l = Σ x i , j ∈ L ( ( u i , j - u s t a r t ) T n ) 2 = Σ x i , j ∈ L ( n 1 ( u i , j - u s t a r t ) + n 2 ( v i , j - v s t a r t ) ) 2 ;
Step C4: structure world coordinates smoothness constraint energy function.The Jacobi matrix of definition u-v coordinate is
J = ∂ u ∂ x = ∂ u ∂ x ∂ u ∂ y ∂ v ∂ x ∂ v ∂ y ;
When every in Jacobi matrix meets Cauchy-Riemann equations:
∂ u ∂ x = ∂ v ∂ y ∂ u ∂ y = - ∂ v ∂ x Time,
The continuously smooth of coordinate can be realized.Above formula discretize is obtained:
u i + 1 , j - u i , j = v i , j + 1 - v i , j u i , j + 1 - u i , j = - ( v i + 1 , j - v i , j ) ;
Can coordinates computed smoothness constraint energy function by above formula:
E s=Σ((u i+1,j-u i,j)-(v i,j+1-v i,j)) 2+Σ((v i+1,j-v i,j)+(u i,j+1-u i,j)) 2
Step C5: structure world coordinates uniform restraint energy function.By Laplace operator discretize, the energy function of definable world coordinates uniform restraint is
E u = Σ || u i + 1 , j + u i - 1 , j + u i , j + 1 + u i , j - 1 - 4 u i , j v i + 1 , j + v i - 1 , j + v i , j + 1 + v i , j - 1 - 4 v i , j || 2 ;
Step D: linear least-squares solves.For each energy function adds weight coefficient and each energy function addition is obtained total energy function be:
E = w h 2 E h + w h c 2 E h c + w l 2 E l + w s 2 E s + w u 2 E u
Make E=0, then E h, E hc, E l, E s, E uall be required to be 0, can system of linear equations be constructed thus
Ax=b
Wherein A is constraint matrix, comprises the u in bound energy function i,jeach front coefficient.X is for comprising unknown quantity u to be asked i,jand v i,jcolumn vector, b comprises the constant term of separate equation.
Solve x with linear least square, solution formula is
x=(A TA) -1A Tb
Step e: solve net point coordinate u i,jand v i,jafter, the coordinate adopting bilinear map to calculate except net point after arbitrfary point (x, y) correction is
(u,v)=(1-x)(1-y)p1+x(1-y)p2+(1-x)yp3+xyp4。
Wherein, p1, p2, p3, p4 are respectively 4 net point coordinates of point (x, y) place grid, and p1 is upper left corner net point coordinate, and p2 is upper right corner net point coordinate, and p3 is lower left corner net point coordinate, and p4 is lower right corner net point coordinate.
Step F: after calculating calibration coordinate (u, v).By from input coordinate value (x, y) remapping and interpolation to the coordinate figure (u, v) calculated, obtain correcting image.
CN201510354230.2A 2015-06-23 2015-06-23 A kind of image stretch distortion self-adapting correction method Expired - Fee Related CN105046657B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201510354230.2A CN105046657B (en) 2015-06-23 2015-06-23 A kind of image stretch distortion self-adapting correction method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201510354230.2A CN105046657B (en) 2015-06-23 2015-06-23 A kind of image stretch distortion self-adapting correction method

Publications (2)

Publication Number Publication Date
CN105046657A true CN105046657A (en) 2015-11-11
CN105046657B CN105046657B (en) 2018-02-09

Family

ID=54453177

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201510354230.2A Expired - Fee Related CN105046657B (en) 2015-06-23 2015-06-23 A kind of image stretch distortion self-adapting correction method

Country Status (1)

Country Link
CN (1) CN105046657B (en)

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105528758A (en) * 2016-01-12 2016-04-27 武汉精测电子技术股份有限公司 Image remapping method and device based on programmable logic device
CN106506970A (en) * 2016-11-30 2017-03-15 宇龙计算机通信科技(深圳)有限公司 A kind of image pickup method and terminal
CN107155017A (en) * 2017-06-30 2017-09-12 上海兆芯集成电路有限公司 Camera bearing calibration and the device using this method
CN107665477A (en) * 2016-07-28 2018-02-06 三星电子株式会社 The method of electronic equipment and control electronics
GB2559639A (en) * 2017-09-08 2018-08-15 Anthropics Tech Limited Image manipulation
CN109146808A (en) * 2018-08-01 2019-01-04 成都品果科技有限公司 A kind of portrait U.S. type method and system
CN109544460A (en) * 2017-09-22 2019-03-29 宝沃汽车(中国)有限公司 Image correction method, device and vehicle
CN110232667A (en) * 2019-06-17 2019-09-13 厦门美图之家科技有限公司 Pattern distortion modification method, device, electronic equipment and readable storage medium storing program for executing
CN110276734A (en) * 2019-06-24 2019-09-24 Oppo广东移动通信有限公司 Image distortion correction method and apparatus
CN110689501A (en) * 2019-09-29 2020-01-14 京东方科技集团股份有限公司 Distortion correction method and device, electronic equipment and computer readable storage medium
CN111008947A (en) * 2019-12-09 2020-04-14 Oppo广东移动通信有限公司 Image processing method and device, terminal device and storage medium
CN111008605A (en) * 2019-12-09 2020-04-14 Oppo广东移动通信有限公司 Method and device for processing straight line in face image, terminal equipment and storage medium
CN111091507A (en) * 2019-12-09 2020-05-01 Oppo广东移动通信有限公司 Image processing method, image processing apparatus, electronic device, and storage medium
KR20210006900A (en) * 2018-05-07 2021-01-19 구글 엘엘씨 Correcting Perspective Distortion (PD) of the face
CN112529784A (en) * 2019-09-18 2021-03-19 华为技术有限公司 Image distortion correction method and device
CN112686824A (en) * 2020-12-30 2021-04-20 北京迈格威科技有限公司 Image correction method, image correction device, electronic equipment and computer readable medium
CN113052900A (en) * 2021-04-23 2021-06-29 深圳市商汤科技有限公司 Position determination method and device, electronic equipment and storage medium
CN114049281A (en) * 2021-12-23 2022-02-15 厦门大学 Wide-angle portrait photo distortion correction method based on self-adaptive grid
WO2024078233A1 (en) * 2022-10-10 2024-04-18 杭州睿胜软件有限公司 Text-containing image processing method and system, and storage medium

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101131435A (en) * 2006-08-23 2008-02-27 中国石油集团东方地球物理勘探有限责任公司 NMO correction stacking method preventing NMO stretching
US8447078B2 (en) * 2006-05-08 2013-05-21 Siemens Aktiengesellschaft X-ray diagnostic device
CN103258328A (en) * 2013-04-27 2013-08-21 浙江大学 Method for locating distorted center of wide-field lens
CN103283214A (en) * 2011-01-06 2013-09-04 松下电器产业株式会社 Camera, distortion correction device and distortion correction method

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8447078B2 (en) * 2006-05-08 2013-05-21 Siemens Aktiengesellschaft X-ray diagnostic device
CN101131435A (en) * 2006-08-23 2008-02-27 中国石油集团东方地球物理勘探有限责任公司 NMO correction stacking method preventing NMO stretching
CN103283214A (en) * 2011-01-06 2013-09-04 松下电器产业株式会社 Camera, distortion correction device and distortion correction method
CN103258328A (en) * 2013-04-27 2013-08-21 浙江大学 Method for locating distorted center of wide-field lens

Cited By (40)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105528758B (en) * 2016-01-12 2018-12-14 武汉精测电子集团股份有限公司 Image based on programmable logic device remaps method and device
CN105528758A (en) * 2016-01-12 2016-04-27 武汉精测电子技术股份有限公司 Image remapping method and device based on programmable logic device
CN107665477A (en) * 2016-07-28 2018-02-06 三星电子株式会社 The method of electronic equipment and control electronics
CN107665477B (en) * 2016-07-28 2023-08-04 三星电子株式会社 Electronic apparatus and method of controlling the same
CN106506970A (en) * 2016-11-30 2017-03-15 宇龙计算机通信科技(深圳)有限公司 A kind of image pickup method and terminal
CN106506970B (en) * 2016-11-30 2019-10-11 宇龙计算机通信科技(深圳)有限公司 A kind of image pickup method and terminal
CN107155017A (en) * 2017-06-30 2017-09-12 上海兆芯集成电路有限公司 Camera bearing calibration and the device using this method
CN107155017B (en) * 2017-06-30 2021-01-22 上海兆芯集成电路有限公司 Image acquisition method and device
GB2559639B (en) * 2017-09-08 2021-01-06 Anthropics Tech Limited Image manipulation
GB2559639A (en) * 2017-09-08 2018-08-15 Anthropics Tech Limited Image manipulation
CN109544460A (en) * 2017-09-22 2019-03-29 宝沃汽车(中国)有限公司 Image correction method, device and vehicle
JP7441917B2 (en) 2018-05-07 2024-03-01 グーグル エルエルシー Projection distortion correction for faces
JP2021523455A (en) * 2018-05-07 2021-09-02 グーグル エルエルシーGoogle LLC Projection distortion correction for the face
US11922720B2 (en) 2018-05-07 2024-03-05 Google Llc Perspective distortion correction on faces
JP7158499B2 (en) 2018-05-07 2022-10-21 グーグル エルエルシー Perspective distortion correction for faces
KR102528516B1 (en) * 2018-05-07 2023-05-04 구글 엘엘씨 Face PD (perspective distortion) correction
KR20210006900A (en) * 2018-05-07 2021-01-19 구글 엘엘씨 Correcting Perspective Distortion (PD) of the face
CN109146808A (en) * 2018-08-01 2019-01-04 成都品果科技有限公司 A kind of portrait U.S. type method and system
CN109146808B (en) * 2018-08-01 2022-02-18 成都品果科技有限公司 Portrait beauty method and system
CN110232667B (en) * 2019-06-17 2021-06-04 厦门美图之家科技有限公司 Image distortion correction method, device, electronic equipment and readable storage medium
CN110232667A (en) * 2019-06-17 2019-09-13 厦门美图之家科技有限公司 Pattern distortion modification method, device, electronic equipment and readable storage medium storing program for executing
CN110276734A (en) * 2019-06-24 2019-09-24 Oppo广东移动通信有限公司 Image distortion correction method and apparatus
US11861813B2 (en) 2019-06-24 2024-01-02 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Image distortion correction method and apparatus
CN112529784A (en) * 2019-09-18 2021-03-19 华为技术有限公司 Image distortion correction method and device
WO2021052236A1 (en) * 2019-09-18 2021-03-25 华为技术有限公司 Image distortion correction method and device
CN112529784B (en) * 2019-09-18 2024-05-28 华为技术有限公司 Image distortion correction method and device
CN110689501A (en) * 2019-09-29 2020-01-14 京东方科技集团股份有限公司 Distortion correction method and device, electronic equipment and computer readable storage medium
US11295419B2 (en) 2019-09-29 2022-04-05 Boe Technology Group Co., Ltd. Distortion correction method and apparatus, electronic device, and computer-readable storage medium
CN110689501B (en) * 2019-09-29 2022-07-22 京东方科技集团股份有限公司 Distortion correction method and device, electronic equipment and computer readable storage medium
EP4068151A4 (en) * 2019-12-09 2023-04-12 Guangdong Oppo Mobile Telecommunications Corp., Ltd. Linear processing method and apparatus in face image, terminal device, and storage medium
WO2021114991A1 (en) * 2019-12-09 2021-06-17 Oppo广东移动通信有限公司 Linear processing method and apparatus in face image, terminal device, and storage medium
CN111008605B (en) * 2019-12-09 2023-08-11 Oppo广东移动通信有限公司 Linear processing method and device in face image, terminal equipment and storage medium
CN111091507A (en) * 2019-12-09 2020-05-01 Oppo广东移动通信有限公司 Image processing method, image processing apparatus, electronic device, and storage medium
CN111008605A (en) * 2019-12-09 2020-04-14 Oppo广东移动通信有限公司 Method and device for processing straight line in face image, terminal equipment and storage medium
CN111008947B (en) * 2019-12-09 2024-05-07 Oppo广东移动通信有限公司 Image processing method and device, terminal equipment and storage medium
CN111008947A (en) * 2019-12-09 2020-04-14 Oppo广东移动通信有限公司 Image processing method and device, terminal device and storage medium
CN112686824A (en) * 2020-12-30 2021-04-20 北京迈格威科技有限公司 Image correction method, image correction device, electronic equipment and computer readable medium
CN113052900A (en) * 2021-04-23 2021-06-29 深圳市商汤科技有限公司 Position determination method and device, electronic equipment and storage medium
CN114049281A (en) * 2021-12-23 2022-02-15 厦门大学 Wide-angle portrait photo distortion correction method based on self-adaptive grid
WO2024078233A1 (en) * 2022-10-10 2024-04-18 杭州睿胜软件有限公司 Text-containing image processing method and system, and storage medium

Also Published As

Publication number Publication date
CN105046657B (en) 2018-02-09

Similar Documents

Publication Publication Date Title
CN105046657A (en) Image stretching distortion adaptive correction method
US20210183040A1 (en) Method and system for selecting an image acquisition device
CN103226830B (en) The Auto-matching bearing calibration of video texture projection in three-dimensional virtual reality fusion environment
US10643300B2 (en) Image display method, custom method of shaped cambered curtain, and head-mounted display device
Wei et al. Fisheye video correction
CN102984453B (en) Single camera is utilized to generate the method and system of hemisphere full-view video image in real time
US20150131924A1 (en) Creation of Rectangular Images from Input Images
CN106507077A (en) Projecting apparatus picture based on graphical analysis is corrected and blocks preventing collision method
US20120121204A1 (en) Importance filtering for image retargeting
CN104574339A (en) Multi-scale cylindrical projection panorama image generating method for video monitoring
CN104574419B (en) Lens distortion parameter calibration method and system
CN103218786B (en) A kind of serious barrel distortion method for correcting image mapping mechanism based on nonlinear inverse
CN103559737A (en) Object panorama modeling method
CN102393951A (en) Deformation method of human face model
CN103902730B (en) Thumbnail generation method and system
CN104881866A (en) Fisheye camera rectification and calibration method for expanding pin-hole imaging model
CN108022223A (en) A kind of tone mapping method based on the processing fusion of logarithmic mapping function piecemeal
CN106997579A (en) The method and apparatus of image mosaic
CN102521586A (en) High-resolution three-dimensional face scanning method for camera phone
CN103824296B (en) Fisheye image correction method of vehicle panoramic display system based on unit square
TWI443604B (en) Image correction method and image correction apparatus
CN111105347A (en) Method, device and storage medium for generating panoramic image with depth information
CN114049464A (en) Reconstruction method and device of three-dimensional model
JP2003091720A (en) View point converting device, view point converting program and image processor for vehicle
CN114708375A (en) Texture mapping method, system, computer and readable storage medium

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant
CF01 Termination of patent right due to non-payment of annual fee

Granted publication date: 20180209

Termination date: 20210623

CF01 Termination of patent right due to non-payment of annual fee