The present invention relates to an image processing device and method for correcting a distorted image, obtained by photography with a super-wide angle optical system such as a fisheye lens or an omnidirectional mirror to obtain an image of a perspective projection method, and to a coordinate computation device and method used in such image processing device and method.
Super-wide angle optical systems such as fisheye lenses and omnidirectional mirrors can project an image with an angle of view of 180 degrees or more, onto a single image plane, and is used in various areas in which a wide photographic field of view is required.
In an image obtained toy photography using a super-wide angle optical system, the shapes of the captured objects appear distorted by barrel distortion, in comparison with an image of a normal perspective projection, so that the captured image (distorted image) gives an odd impression if it is displayed without alteration. Therefore, when a video obtained using a super-wide angle optical system is displayed, a region of interest, which is a part of the image, is extracted, and the extracted image is transformed to an image of a normal perspective projection method, before the display.
In this transformation, a projection surface (a projection sphere) on a hemispherical surface on one side of the image plane is assumed, and a projection is made from the projection sphere to the image plane. This projection includes a process of determining the position on the image plane corresponding to a point of interest on the projection sphere. Patent Reference 1 shows use of the zenith angle for the computation of the image height (distance from the optical axis) on the image plane, in this process (column 7). If the zenith angle is used, it is necessary to determine a trigonometric function of the zenith angle, when, for example, the projection is performed by orthographic projection, stereographic projection, or equisolid angle projection. Patent Reference 1 discloses the use of a lookup table for simplifying the process of determining the trigonometric function.
Use of the position in the direction of the optical axis (height) instead of the zenith angle may also be considered. When the height is used, the computation of the trigonometric function becomes unnecessary and the amount of computation can be reduced. However, in the vicinity of the zenith of the projection sphere, the variation in the height for a given variation in the zenith angle becomes small, and it is necessary to increase the number of bits of the data representing the height in the vicinity of the zenith, in order to perform the computation with the desired precision.
Use of the distance from the optical axis can also be considered. In this case as well, the computation of the trigonometric function becomes unnecessary, and the amount of computation can be reduced. However, in the vicinity of the rim of the projection sphere, the variation in the distance from the optical axis for a given variation in the zenith angle becomes small, and it is necessary to increase the number of bits of the data representing the distance from the optical axis in the vicinity of the rim, in order to perform the computation with the desired precision. p The present invention addresses the problems described above, and its object is to enable projection from the projection sphere to the image plane, that is, computation of the coordinates, on the coordinate plane, with high precision, while restricting the amount of the computation.
A coordinate computation device according to the present invention transforms three-dimensional coordinates on a projection sphere to two-dimensional coordinates on a distorted image, and comprises:
a composite index computation unit tor computing a composite index which is a combination of a height of a point of interest on the project ion sphere and a distance of the point of interest from an optical axis which are obtained from said three-dimensional coordinate;
a distance computation unit for computing a distance from an origin in said distorted image, of a point in said distorted image corresponding to said point of interest, from said composite index; and
a coordinate computation unit for computing the two-dimensional coordinates in said distorted image, from the distance from said origin in said distorted image.
According to the present invention, the composite index, which is a combination of the height on the projection sphere and the distance from the optical axis, is used, so that the computation of the coordinates can be made with high precision, with a small number of bits.
The fisheye lens 101 optically captures an image with a wide angle of view, and, for example, a circular distorted image like the one shown in
Imaging with a fisheye lens will be described below with reference to
It will be assumed that there are an image plane F perpendicular to the optical axis AL of the fisheye lens 101, and a projection surface (projection sphere) S on a hemisphere centered at the point of intersection O of the image plane F and the optical axis AL, and positioned on the object side (photographed space side) of the image plane F, with its bottom surface coinciding with the image plane.
It can be considered that all light from the object propagates toward the above-mentioned center O, and is projected onto the projection sphere S, and is then projected from the projection sphere S onto the image plane F.
The projection from the projection sphere S to the image plane F is carried out by one of the orthographic projection method, the stereographic projection method, the equidistance projection method, the equisolid angle projection method and so on. The method by which the projection is carried out differs depending on the fisheye lens 101 that is used.
The position of the point Pf on the image plane F is represented by two-dimensional coordinates (p, q). These two-dimensional coordinates represent the positions in the directions of the two coordinate axes, that is, a P axis and a Q axis of the image plane F, that extend in two directions which are perpendicular to each other.
The position of the point Ps on the projection sphere S is represented by three-dimensional coordinates (x, y, z). These three-dimensional coordinates have their origin at the point of intersection O of the image plane F and the optical axis AL (accordingly, the center of the bottom surface of the above-mentioned hemisphere), and represent positions in the directions of a Z axis, which is a coordinate axis extending in the direction of the optical axis AL, and an X axis and a Y axis which are coordinate axes respectively coinciding with the P axis and the Q axis on the image plane P. In
The position of the point Ps can also be represented by a zenith angle θ and an azimuth angle ∂.
The zenith angle θ of the point Ps is an angle of inclination from the optical axis AL, or in other words, the angle formed by the straight line connecting the point Ps and the origin O, and the optical axis AL.
The azimuth angle ∂ of the point Ps is an angle in the direction of rotation about the optical axis, and is referenced to the direction of the X axis, for example.
The projection from the projection sphere S to the image plane F is carried out in such a way that the azimuth aegis does not change. The azimuth angle of the point Pf is therefore identical, to the azimuth angle of the point Ps, and is denoted by the reference character ∂.
The relationship between the distance Rf from the optical axis AL to the point Pf (accordingly, the distance from the origin O to the point Pf), and the distance r from the optical axis AL to the point Ps differs depending on the projection method.
That is, the relationship between the zenith angle θ of the point Ps and the distance Rf from the optical axis AL to the point Pf differs depending on the projection method as follows. For example, in the case of the orthographic projection method, there is a relationship:
Rf=Rb×sin θ (1)
In the above-mentioned formulas, Rb is the radius of the projection sphere S. The radius Rb of the circular fisheye image shown in
Also, the relation between the zenith angle θ and the distance r from the optical axis AL to the point Ps is:
r=Rb ×sin θ (3)
The imaging signal generation unit 102 includes an imaging element formed, for example of a CCD, having the image plane F as shown in
The video memory 103 stores the image signal generated toy the imaging signal generation unit 102 in units of frames.
The image correction processing unit 104 reads the image signal stored in the video memory 103, corrects the fisheye image represented by the image signal, and outputs the corrected image. In the correction, a partial region of the fisheye image, that is, a region including a position in the fisheye image, corresponding to a direction of view DOV shown in
The output image is an image obtained by a perspective projection of the image on the projection sphere S to a plane (output image plane) H, as shown in
The plane H is tangent to the projection sphere S at the point of intersection G of the straight line indicating the direction of view DOV and the projection sphere s. The position of a point Ph on the plane (output image plane) H is represented by coordinates (u, v) having their origin at the point of tangency G with the projection sphere S. The coordinates (u, v) represent the positions in the directions the U axis and the V axis which are mutually perpendicular coordinate axes on the output image plane H.
The U axis forms an angle φ with the rotation reference axis J. The rotation reference axis J passes through the origin G, is parallel to the XY plane, and perpendicular to the straight line OG (the straight line connecting the origin O and the origin G). The angle φ will be referred to as a plane inclination angle or a rotation angle.
The azimuth angle ∂ of the origin G will be referred to as a pan angle, and is denoted by a reference character α. The zenith angle θ of the origin G will be referred to as a tilt angle, and denoted by a reference character β. The size of the output image, that is, the angle of view of the output image (electronic zoom angle of view) can be varied by a magnification factor (zoom magnification factor) m. The change in the size of the output image according to the change in the zoom magnification factor is conceptually illustrated in
In the projection of the image from the projection sphere S to the output image plane H, the point Ps(x, y, z) on the projection, sphere S is projected to the point Ph(u, v) at which the straight line passing through the point Ps and the origin O intersects the output image plane H.
To generate the above mentioned output image (the image projected to the output image plane H), the image correction processing unit 104 computes the position in the fisheye image corresponding to the position of each pixel (pixel of interest) in the output image, computes the pixel value of the above-mentioned pixel of interest in the output imago based on the pixel value of the pixel at the computed position in the fisheye image, or the pixel value or values of the pixel or pixels in the neighborhood of the above-mentioned pixel of interest, and generates the image by an array of pixels having the computed pixel values.
The corrected video output circuit 105 outputs the signal of the corrected image in the form of a normal television video signal, such as a video signal of an NTSC format. Incidentally, this signal may be encoded by an encoding device, and transmitted to a remote location, at which a video display may be made.
The image correction processing unit 104 has, for example, an output range selection unit 201, a spherical coordinate computation unit 202, a fisheye image coordinate computation unit 203, and a pixel value computation unit 204, as shown in
The image correction process carried cut by the image correction processing unit 104 will be described with reference to
The output range selection unit 201 selects the range of the output image by selecting the desired direction of view DOV, that is, the desired pan angle α and the desired tilt angle β, and also selecting the desired plane inclination angle φ, and the desired size of the output image, that is, the desired zoom magnification factor m. The selection is made according to, for example, user operations. Alternatively, the range of the output image may be automatically varied over time.
The selection of the output range by the output range selection unit 201 (
The spherical coordinate computation unit 202 projects the output image H having its range selected by the output range selection unit 201, onto the projection sphere S, as shown in
The fisheye image coordinate computation unit 203 projects the image (the image on the projection sphere) in the range Sh shown in
The method by which rise projection from the projection sphere S to the fisheye image can be made by any of various methods such as those of the orthographic projection, the equidistance projection, the stereographic projection, the equisolid angle projection, and so on, and is determined depending on the projection method of the fisheye lens.
The pixel value confutation unit 204 computes the pixel value of each pixel in the output image in
When the projection from the projection sphere S to the image plane F is carried out in the projection fisheye image coordinate computation unit 203, a composite index obtained by combining the height with the distance from the optical axis is used, according to the present invention. The reason for using the above-mentioned composite index will be explained, after explaining the problems regarding this point.
In general, for determining the image height in the fisheye image F in this projection, use of the zenith angle, use of a value (height) representing the position in the direction of the optical axis, and use of the distance from the optical axis may be considered.
For example, the zenith angle is used in Patent Reference 1 (
It may also be considered to use, in place of the zenith angle, the position (height) to the direction of the optical axis, that is, the coordinate value x, shown in
It may also be considered to use the distance from the optical axis, as shown in
The coordinate computation device of the present invention has been made in an attempt to solve the problems described above, and has a feature that the precision of the computation does not vary greatly, even if the bit width of the data is not changed in the vicinity of the zenith or the rim.
The coordinate computation device 203a in
The three-dimensional coordinates (x, y, z) representing the position on the projection sphere corresponding to the position of the pixel of interest in the output image are input to the coordinate computation device 203a. The three-dimensional coordinates (x, y, z) are obtained by selection, by means of the output range selection unit 201, of the range of extraction according to the pan angle α, the tilt angle β and the plane inclination angle φ, and the room magnification factor, and projection by means of the spherical coordinate computation unit 202, onto the projection sphere.
The three-dimensional coordinates (x, y, z) are input to the composite index computation unit 301.
The composite index computation unit 301 computes the composite index Rn which is a combination of the distance r from the optical axis:
r=√{square root over ( )}(x2+y2) (6)
z is equal to or greater than √{square root over ( )}(x2+y2) in the range in which the zenith angle θ is equal to or less than 45 degrees, so that the formulas (7a) and (8a) can be rewritten as the following formulas (7c) and (8c):
z≧Rb/√{square root over ( )}2 (7c)
z<Rb/√{square root over ( )}2 (8c)
In
The composite index Rn, the height z, and the distance r from the optical axis are shown on the vertical axis.
As shown in
Also, the slope of the distance r from the optical axis becomes zero when the zenith angle θ is 90 degrees, so that the variation in the value of the distance r from the opt teal axis with respect to the zenith angle θ is small in the vicinity of 90 degrees, and a large bit width becomes necessary to carry out the computation with high precision by using the distance r from the optical axis.
In contrast, the slope of the composite index Rn does not vary so much, throughout the whole range of the zenith angle, so that the bit width need not be large.
Also, at the point where the height z and the distance r from the optical axis are equal (the boundary between the range within which the formula (7a) is satisfied and the range within which the formula (8a) is satisfied), Rn given by the formula (7b) and Rn given by the formula (8b) are equal, and the slope of Rn given by the formula (7b) and the slope of Rn given by the formula (8b), that is, the slope of −z, and the slope of r (=√{square root over ( )}(x2+y2) are equal, so that the composite index Rn obtained by combining the two different parameters (z and r) varies continuously and smoothly.
The composite index Rn is sent to the distance computation unit 302.
The distance computation unit 302 determines the distance (image height) Rf of the point Pf from the origin in the fisheye image based on the composite index Rn, by computation represented by the following formulas. That is, if the image height Rf is represented by:
Rf=Rb·R(θ) (9)
whereas in the range in which
z<√{square root over ( )}(x2+y2) (8a)
is satisfied, the distance computation unit 302 determines Rf by:
The reason, why Rf is determined by the formula (10) and the formula (11) will be described below.
When the point Ps on the sphere is projected to the point Pf in the fisheye image, the image height Rf of the point Pf is represented as a function of Rb and the zenith angle θ;
Rf=Rb·F(θ) (12)
θ in the formula (12) is represented by:
θ=cos−1(z/Rb) (13)
From the formula (12) and the formula (13),
is obtained.
Rb is related to x, y and z by:
Rb2=x2+y2+z2 (15)
Accordingly,
z2=Rb2−(x2+y2) (16)
Also, the formula (7b) holds in the range in which the formula (7a) is satisfied, so that
Rn2=(x2+y2) (17)
From the formula (17) and the formula (16),
z2=Rb2−Rn2 (18)
Accordingly,
z=√{square root over ( )}(Rb2−Rn2) (19)
From the formula (14) and the formula (19),
is obtained.
In the range in which the formula (8a) as satisfied, the formula (8b) holds, so that,
z=√{square root over ( )}2×Rb−Rn (20)
From the formula (14) and the formula (20),
is obtained,
From the above, it can be seen that Rf is given by the formula (10) when the formula (7a) is satisfied, and by the formula (11) when the formula (8a) is satisfied.
In the case of the orthographic projection, that is, when Rf is given by the formula (12a),
Rf=Rb·sin(cos−1(z/Rb)) (14a)
from the formula (12a) and the formula (13).
From the formula (14a) and the formula (19).
From the formula (14a) and the formula (20),
In the case of the stereographic projection, that is, when Rf is given by the formula (12b),
Rf=2Rb·tan(cos−1(z/Rb)) (14b)
from the formula (12b) and the formula (13).
From the formula (14b) and the formula (19),
From the formula (14b) and the formula (20),
The coordinate computation unit 303 computes the two-dimensional coordinates (p, q) on the fisheye image, from the image height Rf computed by the formula (10) and the formula (11), and the three-dimensional coordinates (x, y, z) on the projection sphere. The formulas for the computation are as follows:
If
Rf≠0 (21Aa),
then
p=x×Rf/r (21Ab)
q=y×Rf/r (21Ac)
If
Rf=0 (21Ba),
then
p=0 (21Bb)
q=0 (21Bc)
The case in which the image height Rf is determined by the computation represented by the formula (10) and the formula (11), in the distance computation unit 302 has been described above, but Rf may also be determined by using a lookup table storing the relationship between Rn and Rf.
In this case, if values of Rf were to be stored for all the values of Rn, a lookup table of a large capacity would be necessary. To avoid this, a lookup table storing values DF[0] to DF[N−1] of Rf corresponding to a plurality of, namely, N discrete representative values DN[0] to DN[N−1] of Rn may be provided, and Rf corresponding to Rn may be determined by interpolation computation using the value of Rn, the nearest representative value DN[n] which is not greater than Rn, the nearest representative value DN[n+1] which is greater than Rn, and output values DF[n], DF[n+1] read out when DN[n], DN[n+1] are input. The computational formula used in that case is shown as the formula (22).
Here, the input values DN[0] to DN[N−1] are such that they monotonically increase with respect to increase in n (n=0 to N−1) That is, DN[0] to DN[N−1] are mutually interrelated by the formula below.
DN[n]≦DN[n+1] (23)
(where, n is any value from 0 to N−2).
n in the formula (22) satisfies the condition represented by the following formula (24).
DN[n]≦Rn<DN[n+1] (24)
Incidentally, when Rn is equal to or greater than DN[N−1] then DF[N−1] is output as Rf.
In general, the N values of the above-mentioned DN[n] and DF[n] are set within the range of values that can be taken by Rn and Rf in such a way that the relationship between Rn and Rf can be approximated by a polyline, using the formula (10) in the range in which the condition of the formula (7a) is satisfied and using the formula (11) in the range in which the condition of the formula (8a) is satisfied, and in such a way that, for example, the differences between DN[n] and DN[n+1] are constant.
When the orthographic projection is used, the formula (10a) and the formula (11a) are used as the formula (10) and the formula (11), whereas when the stereographic projection is used, the formula (10b) and the formula (10b) are used as the formula (10) and the formula (11).
Incidentally, when the relationship between Rn and Rf cannot be expressed by a computational formula, the relationship between Rn and Rf is determined by measurement. For example, the relationship between Rn and Rf can be determined by photographing a two-dimensional square grid chart, or the like by use of the fisheye lens, and investigating the amount of distortion of the square grid on the photographed image.
The present invention has been described above as a coordinate computation device and an image processing device equipped with the coordinate computation device, but a coordinate computation method and an image processing method implemented by these devices also form part of the present invention.
In a step ST1 in
Next, in a step ST2, the distance Rf from the origin in the fisheye image is computed from the composite index Rn.
This process may implemented by performing the computation represented by the formula (10) and the formula (11), or may be implemented by use of a lookup table.
Next, in a step ST3, the two-dimensional coordinates (p, q) on the fisheye image are computed from the distance Rf from the origin in the fisheye image, and the three-dimensional coordinates (x, y, z) on the projection sphere, according to the formulas (21Aa) to (21Bc) shown in the first embodiment.
By transforming the three-dimensional coordinates on the projection sphere to the two-dimensional coordinates on the fisheye image, using the above-described method, the transformation can be made with high precision and with a small bit width.
The coordinate computation method, shown in
The present invention has been described above for the case in which part of a fisheye image is selected and transformed to an image of a perspective projection method, but the invention may be applied to processes other than that described above, for example, the present invention may be applied to a process for obtaining a panoramic image from a fisheye image.
The case in which a circular distorted image is obtained by use of a fisheye lens has been described above, but the present invention may also be applied where an annular distorted image is obtained.
The coordinate computation device according to the present invention or the image processing device equipped with the coordinate computation device may be utilized in a surveillance system.
201 output range selection unit; 202 spherical coordinate-computation unit; 203 fisheye image coordinate computation unit; 203a coordinate computation device; 204 pixel value computation unit; 301 Composite index computation unit 302 distance computation unit; 303 coordinate computation unit.
Number | Date | Country | Kind |
---|---|---|---|
2013-131439 | Jun 2013 | JP | national |
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP2014/063663 | 5/23/2014 | WO | 00 |
Publishing Document | Publishing Date | Country | Kind |
---|---|---|---|
WO2014/208230 | 12/31/2014 | WO | A |
Number | Name | Date | Kind |
---|---|---|---|
6574376 | Shiota | Jun 2003 | B1 |
20030103063 | Mojaver | Jun 2003 | A1 |
20050265619 | Ozaki | Dec 2005 | A1 |
20090167886 | Tonomura | Jul 2009 | A1 |
20120098926 | Kweon | Apr 2012 | A1 |
20140314336 | Yagi | Oct 2014 | A1 |
Number | Date | Country |
---|---|---|
2000-235645 | Aug 2000 | JP |
3126955 | Jan 2001 | JP |
2005-339313 | Dec 2005 | JP |
2008-48443 | Feb 2008 | JP |
2008-52589 | Mar 2008 | JP |
2008-301052 | Dec 2008 | JP |
2009-64225 | Mar 2009 | JP |
Number | Date | Country | |
---|---|---|---|
20160078590 A1 | Mar 2016 | US |