Summary of the invention
Embodiments provide geometry and brightness distortion bearing calibration in a kind of imaging system or optical projection system, eliminate geometry and the luminance deviation of the coloured image caused because of equipment self character.
According to an aspect of the present invention, provide a kind of geometric distortion correction method of imaging system, comprise step: described imaging system is taken subject, obtain the initial geometric distortion image of described subject; According to geometric distortion priori and the geometric distortion correction algorithm of the described imaging system prestored, geometric distortion correction is carried out to described initial geometric distortion image, obtain school abnormal after image.
Wherein, according to geometric distortion priori and the geometric distortion correction algorithm of the described imaging system prestored, carry out geometric distortion correction to described initial geometric distortion image to comprise: for each pixel of the abnormal rear image in the school in described imaging system, determine that each pixel of rear image abnormal with the school in described imaging system is corresponding according to the geometric distortion priori of the described imaging system prestored and geometric distortion correction algorithm, corresponding coordinate point in described initial fault image, and by the pixel value assignment of this corresponding coordinate point give described imaging system lieutenant colonel abnormal after image in each pixel.
Described geometric distortion priori is: RGB three-channel geometric distortion curve K
pr=f (θ
pr)=f (r
pr), K
pg=f (θ
pg)=f (r
pg), K
pb=f (θ
pb)=f (r
pb); Wherein θ
pr, θ
pg, θ
pbbe from the RGB triple channel chief ray of the camera lens outgoing of described imaging system respectively with the angle of described camera lens optical axis,
Wherein, (x
po, y
po) be the position coordinates of the orthoscopic image central point O in described initial fault image; (x
p, y
p) be the position coordinates of the imaging point of the abnormal rear image in school of described imaging system, its with the described O point polar coordinates that are true origin for (r
p, a); (x
qr, y
qr) carry out the Q after geometric distortion through the R passage of described imaging system for the P point in the abnormal rear image in school
rthe coordinate of R passage of point, its with the described O point polar coordinates that are true origin for (r
qr, a); (x
qg, y
qg) carry out the Q after geometric distortion through the G passage of described imaging system for the P point in the abnormal rear image in school
gthe coordinate of G passage of point, its with the O point polar coordinates that are true origin for (r
qg, a); (x
qb, y
qb) carry out the Q after geometric distortion through the channel B of system for the P point in the abnormal rear image in school
bthe coordinate of channel B of point, its with the O point polar coordinates that are true origin for (r
qb, a); F is equivalent image distance, and a is the polar angle of Q, P point, r
pr, r
pg, r
pb, r
qr, r
qg, r
qbbe real number with a.
Wherein, described RGB three-channel geometric distortion curve K
pr, K
pgand K
pbobtain during described imaging system design; Or,
Described RGB three-channel geometric distortion curve K
pr, K
pgand K
pbbe according to provide during described imaging system design or the three-channel geometric distortion parameter K of RGB of the described imaging system of measuring acquisition by experiment
pr, K
pgand K
pb, wherein, experiment measuring obtains K
pr, K
pgand K
pbby measuring and calculating footpath, the pole r of each distortional point of fault image
qr, r
qr, r
qrwith footpath, the pole r of corresponding metapole
qr, r
pr, r
prrelativity obtain.
Wherein, according to geometric distortion priori and the geometric distortion correction algorithm of the described imaging system prestored, geometric distortion correction is carried out to described initial geometric distortion image and comprises step:
Each pixel P in image after abnormal for the school of described imaging system, obtains the polar coordinates (r of its RGB tri-passages
pr, a), (r
pg, a) with (r
pb, a), wherein r
pr=r
pg=r
pb, and according to (r
pr, a), (r
pg, a) with (r
pb, a) and formula
determine described school abnormal after image in each corresponding rectangular coordinate (x as RGB tri-passages of several somes P
pr, y
pr), (x
pg, y
pg) and (x
pb, y
pb), wherein x
pr=x
pg=x
pb, y
pr=y
pg=y
pb;
Utilize geometric distortion correction formula K
pr(r)=(r
qr-r
pr)/r
pr, K
pg(r)=(r
qg-r
pg)/r
pg, K
pb(r)=(r
qb-r
pb) determine RGB tri-passage Q in the described initial fault image corresponding with described P point
r, Q
g, Q
bpolar coordinates (the r of point
qr, a), (r
qg, a) with (r
qb, a);
According to described Q
r, Q
g, Q
bpolar coordinates (the r of point
qr, a), (r
qg, a) with (r
qb, a) and formula
determine the corresponding rectangular coordinate (x of RGB tri-passages of the Q in described initial fault image respectively
qr, y
qr), (x
qg, y
qg) and (x
qb, y
qb);
According to the Q in described initial fault image
rthe coordinate of the most neighbor point of point and pixel value thereof, utilize interpolation algorithm to determine Q
rthe pixel value of point;
According to the Q in described initial fault image
gthe coordinate of the most neighbor point of point and pixel value thereof, utilize interpolation algorithm to determine Q
gthe pixel value of point;
According to the Q in described initial fault image
bthe coordinate of the most neighbor point of point and pixel value thereof, utilize interpolation algorithm to determine Q
bthe pixel value of point;
By described Q
r, Q
g, Q
bthe pixel value difference assignment of point gives described P
r, P
g, P
bpoint;
Wherein, (x
q0, y
q0) be fault image central point O
q0rectangular coordinate.O
q0(x
q0, y
q0) put and O (x
po, y
po) point be same point physically, be the intersection point of primary optical axis and image planes, and be metapole.
According to geometric distortion priori and the geometric distortion correction algorithm of the described imaging system prestored; carry out geometric distortion correction to described initial fault image to comprise further: the image after utilizing the school of interpolation algorithm to described imaging system abnormal carries out image scaling; make the image resolution ratio that exports from described imaging system identical with the resolution dimensions of described initial fault image, obtain the image of the distortionless and former collection image resolution ratio equal resolution exported.
According to another aspect of the present invention, provide a kind of brightness distortion bearing calibration of imaging system, comprise step: described imaging system is taken subject, obtain the original intensity fault image of described subject; According to brightness distortion priori and the brightness distortion correcting algorithm of the described imaging system prestored, brightness distortion correction is carried out to described original intensity fault image, obtain brightness school abnormal after image.
Wherein, the brightness distortion priori of described imaging system comprises the RGB three-channel brightness distortion curve L of described imaging system
r(x, y), L
g(x, y) and L
b(x, y), described brightness distortion curve L
r(x, y), L
g(x, y) and L
bobtain during (x, y) described imaging system design; According to brightness distortion priori and the brightness distortion correcting algorithm of the described imaging system prestored, brightness distortion correction is carried out to described original intensity fault image and comprises:
For each pixel M in described original intensity fault image, extract the distortion brightness value L a of RGB tri-passages
r(x, y), La
g(x, y) and La
b(x, y);
Brightness value L i after the school of RGB tri-passages of each pixel M described in determining according to following formula is abnormal
r(x, y), Li
g(x, y), Li
b(x, y)
Wherein, the brightness distortion priori of described imaging system obtains as follows:
To take pictures imaging to inhomogeneous intensity plate under even pure white smooth E50 illumination, wherein, when taking pictures, imaging system primary optical axis is perpendicular to inhomogeneous intensity plate, and makes inhomogeneous intensity plate be full of imaging system visual field completely;
From the image that described imaging system exports, obtain the three-channel brightness value R (x, y) of RGB of the actual measurement of each pixel in described image, G (x, y), B (x, y);
Calculate the average brightness value R of RGB tri-passages of all pixels in the image of described imaging system output
avg, G
avg, B
avg;
According to the RGB three-channel brightness distortion curve L that following formula is determined
r(x, y), L
g(x, y) and L
b(x, y) is as the brightness distortion priori of described imaging system
Wherein, according to brightness distortion priori and the brightness distortion correcting algorithm of the described imaging system prestored, brightness distortion correction is carried out to described original intensity fault image and comprises:
For each pixel in described original intensity fault image, extract the distortion brightness value L a of RGB tri-passages of this each pixel
r(x, y), La
g(x, y) and La
b(x, y);
Brightness value L i after the school of RGB tri-passages of each pixel described in determining according to following formula is abnormal
r(x, y), Li
g(x, y), Li
b(x, y)
According in one aspect of the present invention, provide the brightness distortion bearing calibration in a kind of optical projection system, comprise step: described optical projection system receives the view data of image to be projected; According to the brightness distortion priori of the described optical projection system prestored, brightness distortion correction is carried out to the view data received, obtain school abnormal after view data and export from described optical projection system.
Wherein, the brightness distortion priori of described optical projection system is the image data illumination distortion factor of each coordinate points of described optical projection system.
Wherein, the brightness distortion priori of described optical projection system is obtained as follows:
Arrange described optical projection system on curtain, project inhomogeneous intensity plate image, the three-channel undistorted brightness value of RGB of its each coordinate is R
tb(x, y), G
tb(x, y), B
tb(x, y) or R
tb(r), G
tb(r), B
tb(r), wherein, R
tb(r), G
tb(r), B
tbr () is respectively the symmetrical data irrelevant with polar angle a of circle, wherein
o (x
o, y
o) put as Projection Systems Image geometric center point;
Utilize and without brightness distortion with without the camera of geometric distortion, the projected image on described curtain taken pictures, when taking pictures the optical axis of described camera perpendicular to described curtain thus acquisition without the brightness distortion image of geometric distortion;
The brightness distortion brightness value R that each coordinate points described corresponds to inhomogeneous intensity plate is obtained from the brightness value of each coordinate points of the described brightness distortion image without geometric distortion
pko(x, y), G
pko(x, y), B
pko(x, y) or R
pko(r), G
pko(r), B
pko(r);
The brightness distortion COEFFICIENT K of each coordinate points of described optical projection system is determined according to following formula
r(x, y), K
g(x, y), K
b(x, y) or K
r(r), K
g(r), K
br () is as the brightness distortion priori of described optical projection system
Or
Wherein, the brightness distortion priori of described optical projection system is obtained as follows:
Arrange described optical projection system on curtain, project the even whiteboard images with coordinate frame bar, the three-channel undistorted brightness value of RGB of its each coordinate is R
tb(x, y), G
tb(x, y), B
tb(x, y) or R
tb(r), G
tb(r), B
tb(r), wherein
o (x
o, y
o) put as Projection Systems Image geometric center point;
Brightness measurer is utilized to carry out brightness measurement respectively in each coordinate lattice and the brightness data of enrollment measurement, as the brightness distortion data R of each coordinate lattice
pko(x, y), G
pko(x, y), B
pko(x, y) or R
pko(r), G
pko(r), B
pko(r);
According to brightness distortion data and its coordinate of each coordinate points, obtain the undistorted brightness value of each coordinate points of described even whiteboard images, and determine the brightness distortion coefficient of each coordinate points of described optical projection system according to following formula:
Or
Wherein, according to the brightness distortion priori of the described optical projection system prestored, brightness distortion correction is carried out to the view data received and comprises:
For each pixel of the view data of described image to be projected, extract the distortion brightness value R (x of RGB tri-passages of this each pixel, y), G (x, y) with B (x, y) or R (r), G (r) and B (r);
Brightness value R after the school of RGB tri-passages of each pixel described in determining according to following formula is abnormal
e(x, y), G
e(x, y), B
e(x, y) or (R
e(r), G
e(r), B
e(r)
R
e(x,y)=R(x,y)K
r(x,y)
G
e(x,y)=G(x,y)K
g(x,y)
B
e(x,y)=B(x,y)K
b(x,y)
Or
R
e(r)=R(r)K
r(r)
G
e(r)=G(r)K
g(r)
B
e(r)=B(r)K
b(r)
Wherein
o (x
o, y
o) put as Projection Systems Image geometric center point.
The embodiment of the present invention is owing to obtaining geometry or the brightness distortion priori of imaging system or optical projection system in advance, namely geometry or the brightness distortion characteristic of imaging system or optical projection system is recognized in advance, thus can according to the geometry of system or brightness distortion priori to the image of imaging system or optical projection system carry out geometry or brightness distortion corrects, to eliminate geometry or the luminance deviation of the coloured image introduced because of system equipment self character, realize the target of " What You See Is What You Get ".
In the present invention, with imaging system and optical projection system for the three-channel example of RGB is described, but know-why of the present invention is not limited only to the three-channel imaging system of RGB and optical projection system, for other multichannel imaging system and optical projection system, know-why of the present invention is also suitable for.
In the present invention, the distortion root of geometric distortion and brightness distortion is all the optical distortion characteristics based on imaging system or optical projection system, and features of these distortion are all distortion is for circle is symmetrical with primary optical axis or image geometry center.
Embodiment
For making object of the present invention, technical scheme and advantage clearly understand, enumerate preferred embodiment referring to accompanying drawing, the present invention is described in more detail.But it should be noted that, the many details listed in instructions are only used to make reader to have a thorough understanding, even if do not have these specific details also can realize these aspects of the present invention to one or more aspect of the present invention.
In the present invention, color photoelectric system comprises imaging system and output system.Imaging system comprises camera or video camera etc., and output system refers to optical projection system.
In the present invention, for imaging system, first obtain the geometry in imaging system or brightness distortion priori, and according to this color distortion priori, coloured image is corrected, thus obtain or export the coloured image without geometry or brightness distortion; For optical projection system, first obtain the brightness distortion priori in optical projection system, then according to this brightness distortion priori, coloured image to be output is corrected, the coloured image of output brightness distortion.Technical scheme of the present invention is described in detail below in conjunction with accompanying drawing.
Fig. 1 shows the process flow diagram of the geometric distortion correction of the image of imaging system of the present invention.In step 10, imaging system is taken subject, obtains the initial geometric distortion image of subject.In step 12, imaging system extracts the geometric distortion priori being stored in advance in imaging system inside.In step 14, imaging system utilizes geometric distortion priori and geometric distortion correction algorithm, carries out geometric distortion correction to initial geometric distortion image, obtain school abnormal after image.
In the present invention, it is RGB three-channel geometric distortion curve K that geometric distortion priori comprises geometric distortion priori
pr=f (θ
pr)=f (r
pr), K
pg=f (θ
pg)=f (r
pg), K
pb=f (θ
pb)=f (r
pb); Wherein θ
pr, θ
pg, θ
pbbe from the RGB triple channel chief ray of the camera lens outgoing of described imaging system respectively with the angle of described camera lens optical axis,
Wherein, (x
po, y
po) be the position coordinates of the orthoscopic image central point O in described initial fault image; (x
p, y
p) be the position coordinates of the imaging point of the abnormal rear image in school of described imaging system, its with the described O point polar coordinates that are true origin for (r
p, a); (x
qr, y
qr) to carry out the coordinate of the R passage of the Q point after geometric distortion through the R passage of described imaging system for the P point in the abnormal rear image in school, its with the described O point polar coordinates that are true origin for (r
qr, a); (x
qg, y
qg) to carry out the coordinate of the G passage of the Q point after geometric distortion through the G passage of described imaging system for the P point in the abnormal rear image in school, its with the O point polar coordinates that are true origin for (r
qg, a); (x
qb, y
qb) to carry out the coordinate of the channel B of the Q point after geometric distortion through the channel B of system for the P point in the abnormal rear image in school, its with the O point polar coordinates that are true origin for (r
qb, a); F is equivalent image distance, and a is the polar angle of Q, P point, r
pr, r
pg, r
pb, r
qr, r
qg, r
qbbe real number with a.The corresponding point on image in position of the primary optical axis of imaging system is undistorted central point.This primary optical axis position can be aimed in usual CCD center, makes true origin (namely image center position) be undistorted central point.
RGB three-channel geometric distortion curve K
pr, K
pgand K
pbobtain when being imaging system design.RGB three-channel geometric distortion curve K
pr, K
pgand K
pbalso can be according to provide during imaging system design or the three-channel geometric distortion parameter K of RGB of imaging system that obtains by experiment
pr, K
pgand K
pbrespectively with the RGB triple channel chief ray of camera lens outgoing respectively with the angle theta of described camera lens optical axis
pr, θ
pg, θ
pbcorresponding data, by what these data fittings were obtained.
Fig. 2 shows the particular flow sheet of the step 14 of Fig. 1.
For imaging system obtain the initial geometric distortion image of subject, all exist corresponding school abnormal after image.As shown in Figure 2, in step 202, choose school abnormal after image in a pixel P, obtain the polar coordinates (r of its RGB tri-passages
pr, a), (r
pg, a) with (r
pb, a), wherein r
pr=r
pg=r
pb.In step 204, according to the polar coordinates (r of RGB tri-passages
pr, a), (r
pg, a) with (r
pb, a) and formula
determine school abnormal after image in the corresponding rectangular coordinate (x of RGB tri-passages of each pixel P
pr, y
pr), (x
pg, y
pg) and (x
pb, y
pb), wherein x
pr=x
pg=x
pb, y
pr=y
pg=y
pb.In step 206, utilize geometric distortion correction formula K
pr(r)=(r
qr-r
pr)/r
pr, K
pg(r)=(r
qg-r
pg)/r
pg, K
pb(r)=(r
qb-r
pb) determine RGB tri-passage Q in the initial geometric distortion image corresponding with P point
r, Q
g, Q
bpolar coordinates (r
qr, a), (r
qg, a) with (r
qb, a).In step 208, according to RGB tri-passage Q
r, Q
g, Q
bpolar coordinates (r
qr, a), (r
qg, a) with (r
qb, a) and formula
determine RGB tri-the passage Q in initial geometric distortion image
r, Q
g, Q
bcorresponding rectangular coordinate (x
qr, y
qr), (x
qg, y
qg) and (x
qb, y
qb).In step 210, according to the Q in described initial fault image
rthe coordinate of the most neighbor point of point and pixel value thereof, utilize interpolation algorithm to determine Q
rthe pixel value of point; According to the Q in described initial fault image
gthe coordinate of the most neighbor point of point and pixel value thereof, utilize interpolation algorithm to determine Q
gthe pixel value of point; According to the Q in described initial fault image
bthe coordinate of the most neighbor point of point and pixel value thereof, utilize interpolation algorithm to determine Q
bthe pixel value of point.Such as, determine and Q in initial geometric distortion image
rpoint is the most contiguous and surround Q
rfour some Q1 of point
r, Q2
r, Q3
rand Q4
r, utilize Q1
r, Q2
r, Q3
rand Q4
rrectangular coordinate and pixel value and bilinear interpolation algorithm determine Q
rthe pixel value of point; Similarly, Q1 is utilized
g, Q2
g, Q3
gand Q4
grectangular coordinate and pixel value and bilinear interpolation algorithm determine Q
gthe pixel value of point; Utilize Q1
b, Q2
b, Q3
band Q4
brectangular coordinate and pixel value and bilinear interpolation algorithm determine Q
bthe pixel value of point.In step 212, by Q
r, Q
g, Q
bthe pixel value difference assignment of point is to P
r, P
g, P
bpoint.Wherein, (x
q0, y
q0) be fault image central point O
q0rectangular coordinate.O
q0(x
q0, y
q0) put and O (x
po, y
po) point be same point physically, be the intersection point of primary optical axis and image planes, and be metapole.
Next, in step 214, determine whether to have traveled through school abnormal after image in all pixels.If not yet traveled through school abnormal after image in all pixels, then choose school abnormal after image in one other pixel point, repeat step 202-214.If traveled through school abnormal after image in all pixels, then continue step 216.In step 216, the image after utilizing the school of interpolation algorithm to imaging system abnormal carries out image scale operation, makes the image resolution ratio that exports from imaging system identical with the resolution dimensions of described initial fault image, as the orthoscopic image exported.
Example 1
The geometric distortion curvilinear function that namely priori that the correction of the geometric distortion of imaging system is based upon geometric distortion comes from the optical design of camera lens or the geometric distortion curvilinear function that the geometric distortion parameter fitting obtaining imaging system by experiment obtains.In this example, suppose that the geometric distortion parameter of RGB tri-passages is identical, therefore can by K
pr, K
pgand K
punification is denoted as K
p, namely
K
p=f(θ
p)
Wherein, f is the common geometric distortion curvilinear function of RGB triple channel, θ
pthe deviation angle of current metapole P to orthoscopic image center.
As shown in table 1, utilize this group parameter, first take out school abnormal after image in each pixel coordinate P (x of image
p, y
p), utilize geometric distortion parameter K
pwith pixel coordinate P (x
p, y
p) and geometric distortion correction algorithm, try to achieve corresponding with pixel coordinate point P, distort after coordinate points position Q (x
q, y
q).Due to x
q, y
qmay be real number coordinate, therefore utilize the pixel value of each point adjacent with Q point to carry out interpolation and obtain Q point pixel value, and by the pixel value assignment of Q point to P point, complete and geometric distortion correction is done to output image.
Table 1
θ
p(degree)
|
K
p(%)
|
θ
p(degree)
|
K
p(%)
|
θ
p(degree)
|
K
p(%)
|
θ
p(degree)
|
K
p(%)
|
0.15 |
0.359 |
3.90 |
7.056 |
7.65 |
7.311 |
11.40 |
5.991 |
0.30 |
0.804 |
4.05 |
7.142 |
7.80 |
7.275 |
11.55 |
5.923 |
0.45 |
1.237 |
4.20 |
7.218 |
7.95 |
7.237 |
11.70 |
5.854 |
0.60 |
1.658 |
4.35 |
7.284 |
8.10 |
7.197 |
11.85 |
5.784 |
0.75 |
2.065 |
4.50 |
7.342 |
8.25 |
7.156 |
12.00 |
5.712 |
0.90 |
2.459 |
4.65 |
7.392 |
8.40 |
7.113 |
12.15 |
5.640 |
1.05 |
2.837 |
4.80 |
7.434 |
8.55 |
7.069 |
12.30 |
5.567 |
1.20 |
3.201 |
4.95 |
7.469 |
8.70 |
7.023 |
12.45 |
5.492 |
1.35 |
3.548 |
5.10 |
7.498 |
8.85 |
6.976 |
12.60 |
5.417 |
1.50 |
3.880 |
5.25 |
7.520 |
9.00 |
6.927 |
12.75 |
5.340 |
1.65 |
4.195 |
5.40 |
7.537 |
9.15 |
6.877 |
12.90 |
5.262 |
1.80 |
4.494 |
5.55 |
7.548 |
9.30 |
6.826 |
13.05 |
5.183 |
1.95 |
4.776 |
5.70 |
7.554 |
9.45 |
6.774 |
13.20 |
5.103 |
2.10 |
5.041 |
5.85 |
7.556 |
9.60 |
6.721 |
13.35 |
5.022 |
2.25 |
5.290 |
6.00 |
7.553 |
9.75 |
6.666 |
13.50 |
4.940 |
2.40 |
5.523 |
6.15 |
7.546 |
9.90 |
6.610 |
13.65 |
4.857 |
2.55 |
5.740 |
6.30 |
7.536 |
10.05 |
6.553 |
13.80 |
4.772 |
2.70 |
5.941 |
6.45 |
7.522 |
10.20 |
6.495 |
13.95 |
4.686 |
2.85 |
6.128 |
6.60 |
7.505 |
10.35 |
6.436 |
14.10 |
4.600 |
3.00 |
6.300 |
6.75 |
7.485 |
10.50 |
6.375 |
14.25 |
4.512 |
3.15 |
6.457 |
6.90 |
7.462 |
10.65 |
6.314 |
14.40 |
4.423 |
3.30 |
6.602 |
7.05 |
7.436 |
10.80 |
6.252 |
14.55 |
4.333 |
3.45 |
6.733 |
7.20 |
7.408 |
10.95 |
6.188 |
14.70 |
4.242 |
3.60 |
6.852 |
7.35 |
7.378 |
11.10 |
6.123 |
14.85 |
4.149 |
3.75 |
6.959 |
7.50 |
7.346 |
11.25 |
6.058 |
15.00 |
4.056 |
particularly, according to the discrete point shown in table 1, go out a θ->K by computer fitting
pcurve, to obtain the K under any θ
pvalue, namely
K
p(θ
p)=f(θ
p)=K
p(r
p)
In table 1, misalignment angle is the deviation angle of current point relative to image center, and following formula can be had to obtain:
Wherein O
p(x
po, y
po) be orthoscopic image center position, O
q(x
qo, y
qo) be fault image center position, P (x
p, y
p) be current point, F be equivalence apart, can be obtained by following formula:
Wherein, θ
maxbe the center of maximum fleet angle of color photoelectric system, W, H are the wide height of image image planes respectively.
In table 1, geometric distortion parameter physical significance is the distortion percentage of the misalignment angle at current point place, is shown below:
Wherein k is distortion geometric parameter, r
qcurrent point Q (x
q, y
q) to the distance of central point, r
pcurrent point P (x
p, y
p) under undistorted condition to the distance of central point.
Figure 6 shows that geometric distortion parametric line, wherein horizontal ordinate is geometric distortion parameter K (number percent, %), deviation angle θ centered by ordinate
p(unit: degree).
By geometric distortion priori, obtain the wide W of the orthoscopic image after cutting
p, high H
p, be shown below:
Orthoscopic image center position O can be obtained
p(x
po, y
po) as follows:
The each coordinate points of traversal orthoscopic image, calculates each orthoscopic image pixel P (x
p, y
p) pixel value, can obtain
Utilize θ
pcan table look-up and obtain corresponding geometric distortion priori K
p(θ
p), and calculate r
q.
r
q=(1+K
p(θ
p))r
p
Because optical distortion occurs over just on r direction, therefore there is following relational expression:
Utilize r
qand above-mentioned relation formula, Q (x can be obtained
q, y
q):
Usually (x
q, y
q) be a real number coordinate, therefore to obtain the pixel value of Q point, need to carry out interpolation operation to Q point.See Fig. 7, show and utilize four points contiguous with Q point to carry out bilinear interpolation to obtain the schematic diagram of Q point pixel value.
Suppose that Q point drops on Q1 (x
q1, y
q1), Q2 (x
q1, y
q2), Q3 (x
q2, y
q1), Q4 (x
q2, y
q2) in the middle of four four points nearest with Q point, as shown in figure 12.
So the pixel value V (Q) of Q point equals
To the orthoscopic image obtained, this image resolution ratio is W
p× H
p, application conventional images zoom technology does image scale operation, makes the image resolution ratio exported be defined as W × H identical with the resolution dimensions of original image, and using the orthoscopic image as finally output.
The process flow diagram that the brightness distortion that Fig. 3 shows imaging system of the present invention corrects.In step 30, imaging system is taken subject, obtains the original intensity fault image of described subject.In step 32, imaging system extracts the brightness distortion priori being stored in advance in imaging system inside.In step 34, imaging system utilizes brightness distortion priori and brightness distortion correcting algorithm, carries out brightness distortion correction to original intensity fault image, obtain school abnormal after image.
In the present invention, the brightness distortion priori of imaging system comprises the RGB three-channel brightness distortion curve L of imaging system
r(x, y), L
g(x, y) and L
b(x, y).Brightness distortion curve L
r(x, y), L
g(x, y) and L
bobtain when (x, y) is imaging system design, or by experiment method obtain.
At brightness distortion curve L
r(x, y), L
g(x, y) and L
bwhen obtaining when (x, y) is imaging system design, step 34 comprises:
For each pixel in original intensity fault image, extract the distortion brightness value L a of RGB tri-passages of this each pixel
r(x, y), La
g(x, y) and La
b(x, y);
Extract the brightness distortion priori L relevant to each pixel
r(x, y), L
g(x, y) and L
b(x, y);
Determine according to following formula the school of RGB tri-passages of each pixel abnormal after brightness value L i
r(x, y), Li
g(x, y), Li
b(x, y)
When method obtains brightness distortion priori by experiment, obtained the brightness distortion priori of imaging system by following steps:
To take pictures imaging to inhomogeneous intensity plate under even pure white smooth E50 illumination, obtain the image about inhomogeneous intensity plate, wherein, when taking pictures, imaging system primary optical axis is perpendicular to inhomogeneous intensity plate, and makes inhomogeneous intensity plate be full of imaging system visual field completely;
From imaging system takes pictures the image about inhomogeneous intensity plate that obtains, obtain about the three-channel brightness value R (x, y) of RGB of the actual measurement of each pixel in the image of inhomogeneous intensity plate, G (x, y), B (x, y);
Calculate imaging system to take pictures the average brightness value R of RGB tri-passages about all pixels in the image of inhomogeneous intensity plate obtained
avg, G
avg, B
avg;
For imaging system about each pixel in the image of inhomogeneous intensity plate, according to the RGB three-channel brightness distortion curve L that following formula is determined
r(x, y), L
g(x, y) and L
b(x, y) is as the brightness distortion priori of described imaging system
At brightness distortion curve L
r(x, y), L
g(x, y) and L
b(x, y) is when obtaining by experiment, and step 34 comprises:
For each pixel in original intensity fault image, extract the distortion brightness value L a of RGB tri-passages of this each pixel
r(x, y), La
g(x, y) and La
b(x, y);
Extract the brightness distortion priori L relevant to each pixel described
r(x, y), L
g(x, y) and L
b(x, y);
Brightness value L i after the school of RGB tri-passages of each pixel described in determining according to following formula is abnormal
r(x, y), Li
g(x, y), Li
b(x, y)
Fig. 4 shows the brightness distortion correcting process figure of optical projection system of the present invention.In step 40, optical projection system receives the view data of image to be projected.In step 42, optical projection system extracts the brightness distortion priori be stored in advance in optical projection system.In step 44, utilize brightness distortion priori and brightness distortion correcting algorithm to carry out brightness distortion correction to the view data received, obtain school abnormal after view data and export from optical projection system.
In the present invention, the brightness distortion priori of optical projection system is the image data illumination distortion factor of each coordinate points of described optical projection system.
In the present embodiment, the first method obtaining the brightness distortion priori of optical projection system comprises step: first, arrange optical projection system on curtain, project inhomogeneous intensity plate image, the three-channel undistorted brightness value of RGB of its each coordinate is R
tb(x, y), G
tb(x, y), B
tb(x, y) or R
tb(r), G
tb(r), B
tb(r), wherein, R
tb(r), G
tb(r), B
tbr () is respectively the symmetrical data irrelevant with polar angle a of circle, wherein
o (x
o, y
o) put as Projection Systems Image geometric center point; Next, utilize and without brightness distortion with without the camera of geometric distortion, the projected image on described curtain taken pictures, when taking pictures the optical axis of described camera perpendicular to described curtain thus acquisition without the brightness distortion image of geometric distortion; Afterwards, obtain from the brightness value of each coordinate points of the brightness distortion image without geometric distortion the brightness distortion brightness value R that each coordinate points described corresponds to inhomogeneous intensity plate
pko(x, y), G
pko(x, y), B
pko(x, y) or R
pko(r), G
pko(r), B
pko(r); Finally, the brightness distortion COEFFICIENT K of each coordinate points of described optical projection system is determined according to following formula
r(x, y), K
g(x, y), K
b(x, y) or K
r(r), K
g(r), K
br () is as the brightness distortion priori of described optical projection system
Or
In the present embodiment, the method that the second obtains the brightness distortion priori of optical projection system comprises step: first, arrange optical projection system on curtain, project the even whiteboard images with coordinate frame bar, the three-channel undistorted brightness value of RGB of its each coordinate is R
tb(x, y), G
tb(x, y), B
tb(x, y) or R
tb(r), G
tb(r), B
tb(r), wherein
o (x
o, y
o) put as Projection Systems Image geometric center point; Next, brightness measurer is utilized to carry out brightness measurement respectively in each coordinate lattice and the brightness data of enrollment measurement, as the brightness distortion data R of each coordinate lattice
pko(x, y), G
pko(x, y), B
pko(x, y) or R
pko(r), G
pko(r), B
pko(r); According to brightness distortion data and its coordinate of each coordinate points, obtain the undistorted brightness value of each coordinate points of described inhomogeneous intensity plate image, and determine the brightness distortion coefficient of each coordinate points of described optical projection system according to following formula:
Or
Wherein
o (x
o, y
o) put as Projection Systems Image geometric center point.
Fig. 5 shows the particular flow sheet of the step 44 shown in Fig. 4.In step 510, choose a pixel of the view data of image to be projected.In step 512, extract distortion brightness value R (x, y) of RGB tri-passages of this pixel, G (x, y) and B (x, y) or R (r), G (r) and B (r).In step 514, extract the brightness distortion COEFFICIENT K corresponding to this pixel
r(x, y), K
g(x, y), K
b(x, y) or K
r(r), K
g(r), K
b(r).In step 516, determine according to following formula the school of RGB tri-passages of a described pixel abnormal after brightness value R
e(x, y), G
e(x, y), B
e(x, y) or (R
e(r), G
e(r), B
e(r),
R
e(x,y)=R(x,y)K
r(x,y)
G
e(x,y)=G(x,y)K
g(x,y)
B
e(x,y)=B(x,y)K
b(x,y)
Or
R
e(r)=R(r)K
r(r)
G
e(r)=G(r)K
g(r)。
B
e(r)=B(r)K
b(r)
The brightness distortion correction example of example 2 optical projection system
The brightness distortion priori of optical projection system is obtained according to the method for the first the acquisition optical projection system brightness distortion priori provided in the present invention.That is, by experiment or optical design obtain a width inhomogeneous intensity flat thing at the image comprising brightness irregularities situation by optical projection system, obtain brightness of image distortion priori.In this example, suppose that the brightness distortion priori of RGB tri-passages is consistent, therefore do not do the three-channel division of RGB in the calculation.With reference to figure 5 process flow diagram, utilize brightness distortion priori corresponding relation, correction is made to the brightness distortion of optical projection system.Table 2 shows brightness distortion part original value and the brightness distortion priori that has the optical projection system of brightness distortion:
Table 2
According to the brightness distortion priori of table 2, this brightness distortion priori is obtained respectively to the pixel of all coordinate positions under experiment condition
(K
r,K
g,K
b)=(R
tb/R
pko,G
tb/G
pko,B
tb/B
pko)。
Utilize this group brightness distortion priori to do brightness distortion by the brightness of following formula to each point (R, G, B) to correct, obtain the pixel value (R of brightness distortion each pixel revised
e, G
e, B
e).
(R
e,G
e,B
e)=(K
r×R,K
g×G,K
b×B)
As shown in table 2, the data brightness distortion value as shown in table 2 that experiment obtains is (here with three-channel intensity R
pko, G
pko, B
pkorepresent), utilize the brightness distortion priori (K obtained
r, K
g, K
b), this group brightness distortion value can be done the product of respective channel brightness distortion value and brightness distortion priori, brightness distortion value is modified to gray scale plate pixel value as shown above.
One of ordinary skill in the art will appreciate that all or part of step realized in above-described embodiment method is that the hardware that can carry out instruction relevant by program has come, this program can be stored in a computer read/write memory medium, as: ROM/RAM, magnetic disc, CD etc.
The above is only the preferred embodiment of the present invention; it should be pointed out that for those skilled in the art, under the premise without departing from the principles of the invention; can also make some improvements and modifications, these improvements and modifications also should be considered as protection scope of the present invention.