The invention relates to image processing technologies, and more particularly to an image correction apparatus and a method for correcting images, and an image correction database creating method of that apparatus. The present invention also relates to an information data provision apparatus, an image processing apparatus, an information terminal, and an information database apparatus.
There are systems in which digital images having electronic watermarks embedded therein are printed on printing media, and the printed images are captured by a digital camera, a scanner, or the like and re-digitized to detect the embedded electronic watermarks. For example, when issuing tickets or cards to users, identification information on the issuers and/or the users is embedded into images in the form of electronic watermarks and printed on the tickets or cards so as not to be visually detectable. When the tickets or cards are used, the electronic watermarks can be detected to avoid counterfeiting, unauthorized acquisition, and other frauds. Besides, unauthorized duplication of copyrighted materials, securities, and the like can be precluded by embedding copyright information, device identification information, and the like as electronic watermarks when printing images with copy machines or printers.
In general, when printed images are captured and digitized by a digital camera or a scanner, lens distortion and perspective distortion occur in the captured images. Here, the lens distortion depends on the shape and focal length of the lens of the capturing device, and the perspective distortion is ascribable to a tilt of the optical axis at the time of capturing. As a result, the printed images and the captured images cause pixel deviation therebetween. This makes it difficult for electronic watermarks embedded in the printed images to be extracted from the captured images properly, and thus requires distortion correction on the captured images.
The patent document 1 discloses an image correction apparatus which performs the following processing: generating a mapping function pertaining to perspective distortion based on position deviations of feature points of a calibration pattern near a screen center; evaluating differences between ideal positions of the feature points and actual positions of the same on an image across the entire screen by using the mapping function; calculating a correction function for correcting lens distortion; and correcting image data.
Moreover, there are systems in which information embedded as electronic watermarks is extracted from digital image data transmitted from clients, and services (such as contents download services and product sales services) are provided to the clients based on the extracted information (for example, see patent document 2).
In such a product sales system 1200, when a client captures an illustration on the printed material 1203 with his/her camera-equipped cellular phone 1202, the data on the captured image generated by the camera-equipped cellular phone 1202 is transmitted to the server 1201. The server 1201 extracts the information embedded as an electronic watermark from data on the captured image, and determines from the extracted result the product the client wants to purchase. [Patent document 1] Japanese Patent Publication No. 2940736 [Patent document 2] Japanese Publication of PCT International Application No. 2002-544637
To correct image distortion ascribable to capturing, it is necessary to acquire information on the distortion characteristics of the capturing device and information on the tilt of the optical axis at the time of capturing, and apply geometric transform to the captured image. Fine distortion correction can be made by using profile data that shows the detailed distortion characteristics of the lens, whereas the profile data requires a large storage capacity and takes long to process.
In addition, how finely image distortion must be examined and corrected depends on the tolerance of watermarks to image distortion. When the watermarks have relatively high tolerance to image distortion, fine distortion correction is wasteful. With low tolerance to image distortion, on the other hand, the watermarks cannot be detected properly by rough distortion correction. A mismatch between the tolerance of watermarks when embedded and the precisions of image correction when extracting the watermarks can thus deteriorate the detection accuracy and the detection efficiency of the watermarks.
Moreover, when selling products of the same model but different colors in the foregoing product sales system 1200, the printed material 1203 must carry illustrations of the products of the same model as many as the number of color variations. This produces a problem of increased space of the printed material 1203.
The print space can be reduced by preparing product images separately from images in which only color information is embedded (for example, for eight color variations, eight images are prepared separately). For example, when purchasing a product in red, two images, i.e., the illustration of the product and an image for representing red are captured in succession. The number of images required here is only the number of products plus the number of types of color information, being smaller than with the method where color information is given to each individual product (the number of images required is the number of products multiplied by the number of colors). The print space thus decreases significantly. In this case, however, the server 1201 is put under high load since it must process both the product images and the color information images.
Then, instead of printing illustrations corresponding to the number of color variations on the printed material 1203, illustrations corresponding to the products alone may be printed on the printed material 1203 so that the client presses accompanying buttons on the capturing device to select desired product colors.
More specifically, the client initially captures the illustration of a desired product with the camera-equipped cellular phone 1202. Next, the client presses an accompanying button on the camera-equipped cellular phone 1202 to select the desired color of the product. The data on the captured image and the information selected by button depression are then transmitted from the camera-equipped cellular phone 1202 to the server 1201.
Such a method, however, requires that the client make a burdensome selecting operation by button depression after the capturing operation.
The present invention has been achieved in view of the foregoing. It is thus an object of the present invention to provide an image correction technology capable of correcting image distortion efficiently with high precision. Another object of the present invention is to provide an information processing technology of high convenience, using electronic watermarks.
To solve the foregoing problems, an image correction apparatus according to one of the aspects of the present invention comprises: a lens distortion calculation unit which calculates lens distortion correction information with respect to each zoom magnification, based on known images captured at respective different zoom magnifications; and a memory unit which stores the lens distortion correction information in association with the zoom magnifications.
As employed herein, “storing the lens distortion correction information in association with the zoom magnifications” shall not only refer to the cases where the lens distortion correction information is stored in association with the zoom magnifications themselves, but also cover the cases where it is stored substantially in association with the zoom magnifications. For example, given that the CCD (Charge-Coupled Device) surface or film surface for subject images to be formed on has a constant longitudinal length, the angle of view and the focal length both vary in accordance with the zoom magnification. Thus, the expression “storing . . . in association with the zoom magnifications” shall also cover the cases where the lens distortion correction information is stored in association with the angles of view or focal lengths.
Another aspect of the present invention also provides an image correction apparatus. This apparatus comprises: a memory unit which contains lens distortion correction information in association with zoom magnifications of a lens; a selector unit which selects lens distortion correction information corresponding to a zoom magnification employed at the time of capturing of an input captured image from the memory unit; and a distortion correction unit which corrects distortion of the captured image ascribable to capturing based on the lens distortion correction information selected.
The selector unit may select from the memory unit a plurality of candidate pieces of lens distortion correction information in accordance with the zoom magnification employed at the time of capturing, and correct a row of sample points forming a known shape in the captured image by using each of the plurality of pieces of lens distortion correction information for error pre-evaluation. Thereby, the selector unit may select one piece of lens distortion correction information from among the plurality of pieces of lens distortion correction information.
As employed herein, “a row of sample points forming a known shape” refers to the cases where the shape the row of sample points are supposed to form if without any capturing distortion is known. For example, a row of sample points assumed on the image frame of a captured image are known to fall on a straight line if there is no capturing distortion. In another example, a row of sample points assumed on the outline of a person's face captured are known to fall at least on a smooth curve.
Yet another aspect of the present invention also provides an image correction apparatus. This apparatus comprises: a lens distortion calculation unit which calculates based on known images captured at respective different zoom magnifications a lens distortion correction function for mapping points in a lens-distorted image onto points in an image having no lens distortion and a lens distortion function, or an approximate inverse function of the lens distortion correction function, with respect to each lens magnification; and a memory unit which stores the pairs of lens distortion correction functions and lens distortion functions in association with the zoom magnifications.
As employed herein, “storing the pairs of lens distortion correction functions and lens distortion functions in association with the zoom magnifications” is not limited to the cases of storing such information as functional expressions and coefficients. It also covers the cases where the correspondence between input values and output values of these functions are stored in the form of a table. For example, the correspondence between coordinate values in an image and coordinate values mapped by these functions may be stored as a table.
Yet another aspect of the present invention also provides an image correction apparatus. This apparatus comprises: a memory unit which contains pairs of lens distortion correction functions for mapping points in a lens-distorted image onto points in an image having no lens distortion and lens distortion functions, or approximate inverse functions of the lens distortion correction functions, in association with respective zoom magnifications of a lens; a selector unit which selects the lens distortion function corresponding to a zoom magnification employed at the time of capturing of an input captured image from the memory unit; and a distortion correction unit which corrects distortion of the captured image ascribable to capturing based on the lens distortion function selected. According to this configuration, it is possible to correct lens distortion ascribable to capturing.
Yet another aspect of the present invention also provides an image correction apparatus. This apparatus comprises: a memory unit which contains lens distortion functions for mapping points in an image having no lens distortion onto points in a lens-distorted image in association with respective zoom magnifications of a lens; a selector unit which selects the lens distortion function corresponding to a zoom magnification employed at the time of capturing of an input captured image from the memory unit; a perspective distortion calculation unit which calculates a perspective distortion function for mapping points in an image having no perspective distortion onto points in a perspective-distorted image, by using an image whose lens distortion is corrected by the lens distortion function selected; and a distortion correction unit which corrects distortion of the captured image ascribable to capturing based on the perspective distortion function calculated by the perspective distortion calculation unit. According to this configuration, it is possible to correct perspective distortion and lens distortion ascribable to capturing.
Yet another aspect of the present invention provides an image correction database creating method. This method comprises: calculating based on known images captured at respective different zoom magnifications a lens distortion correction function for mapping points in a lens-distorted image onto points in an image having no lens distortion and a lens distortion function, or an approximate inverse function of the lens distortion correction function, with respect to each lens magnification; and registering the pairs of lens distortion correction functions and lens distortion functions into a database in association with the zoom magnifications.
Yet another aspect of the present invention provides an image correction method. This method comprises: consulting a database in which pairs of lens distortion correction functions for mapping points in a lens-distorted image onto points in an image having no lens distortion and lens distortion functions, or approximate inverse functions of the lens distortion correction functions, are registered in association with respective zoom magnifications of a lens, and selecting the lens distortion function corresponding to a zoom magnification employed at the time of capturing of an input captured image; and correcting distortion of the captured image ascribable to capturing based on the lens distortion function selected.
Yet another aspect of the present invention also provides an image correction method. This method comprises: consulting a database in which lens distortion functions for mapping points in an image having no lens distortion onto points in a lens-distorted image are registered in association with respective zoom magnifications of a lens, and selecting the lens distortion function corresponding to a zoom magnification employed at the time of capturing of an input captured image; calculating a perspective distortion function for mapping points in an image having no perspective distortion onto points in a perspective-distorted image, by using an image whose lens distortion is corrected by the lens distortion function selected; and correcting distortion of the captured image ascribable to capturing based on the perspective distortion function calculated.
An information provision apparatus according to yet another aspect of the present invention comprises: an electronic watermark extraction unit which extracts information embedded by electronic watermark technology from imaging data obtained by an imaging device; a distortion detection unit which detects image distortion from the imaging data; an information data storing unit which stores information data; a selector unit which selects information data stored in the information data storing unit based on the information embedded by the electronic watermark technology, extracted by the electronic watermark extraction unit, and the image distortion detected by the distortion detection unit; and an output unit which outputs the information data selected by the selector unit to exterior.
The foregoing information data refers to text data, image data, moving image data, voice data, etc.
An information provision apparatus according to yet another aspect of the present invention comprises: an electronic watermark extraction unit which extracts information embedded by electronic watermark technology from imaging data obtained by an imaging device; a distortion detection unit which detects image distortion from the imaging data; an information data storing unit which stores information data; a selector unit which selects information data stored in the information data storing unit based on the information embedded by the electronic watermark technology, extracted by the electronic watermark extraction unit, and the image distortion detected by the distortion detection unit; and a display unit which displays contents of the information data selected by the selector unit.
An image processing apparatus according to yet another aspect of the present invention comprises: an electronic watermark extraction unit which extracts information embedded by electronic watermark technology from imaging data obtained by an imaging device; a distortion detection unit which detects image distortion from the imaging data; an image data storing unit which stores image data; and a selector unit which selects image data stored in the image data storing unit based on the information embedded by the electronic watermark technology, extracted by the electronic watermark extraction unit, and the image distortion detected by the distortion detection unit.
An image processing apparatus according to yet another aspect of the present invention comprises: a distortion detection unit which detects image distortion from imaging data obtained by an imaging device; a distortion correction unit which corrects the image distortion of the imaging data based on the image distortion detected by the distortion detection unit; an electronic watermark extraction unit which extracts information embedded by electronic watermark technology from the imaging data whose image distortion is corrected by the distortion correction unit; an image data storing unit which stores image data; and a selector unit which selects image data stored in the image data storing unit based on the information embedded by the electronic watermark technology, extracted by the electronic watermark extraction unit, and the image distortion detected by the distortion detection unit.
An information terminal according to yet another aspect of the present invention comprises: an imaging unit; a distortion detection unit which detects image distortion from imaging data obtained by the imaging unit; a distortion correction unit which corrects the image distortion of the imaging data based on the image distortion detected by the distortion detection unit; and a transmission unit which transmits the imaging data whose image distortion is corrected by the distortion correction unit and information on the image distortion detected by the distortion detection unit to exterior.
An image processing apparatus according to yet another aspect of the present invention comprises: a reception unit which receives imaging data and information on image distortion transmitted from an information terminal; an electronic watermark extraction unit which extracts information embedded by electronic watermark technology from the imaging data; an information data storing unit which stores information data; and a selector unit which selects information data stored in the information data storing unit based on the information embedded by the electronic watermark technology, extracted by the electronic watermark extraction unit, and the information on the image distortion received by the reception unit.
An information terminal according to yet another aspect of the present invention comprises: an imaging unit; a distortion detection unit which detects image distortion from imaging data obtained by the imaging unit; a distortion correction unit which corrects the image distortion of the imaging data based on the image distortion detected by the distortion detection unit; an electronic watermark extraction unit which extracts information embedded by electronic watermark technology from the imaging data whose image distortion is corrected by the distortion correction unit; and a transmission unit which transmits the information embedded by the electronic watermark technology, extracted by the electronic watermark extraction unit, and information on the image distortion detected by the distortion detection unit to exterior.
An information database apparatus according to yet another aspect of the present invention comprises: a distortion detection unit which detects image distortion from imaging data obtained by an imaging device; an information data storing unit which stores information data; and a selector unit which selects information data stored in the information data storing unit based on the image distortion detected by the distortion detection unit.
A data structure according to yet another aspect of the present invention is one to be transmitted from an information terminal having an imaging unit, the data structure containing information on image distortion detected from imaging data obtained by the imaging unit.
It should be appreciated that any combinations of the foregoing components, and any conversions of expressions of the present invention from/into methods, apparatuses, systems, recording media, computer programs, and the like are also intended to constitute applicable aspects of the present invention.
An electronic watermark system according to a first embodiment of the present invention includes an electronic watermark embedding apparatus 100 as shown in
An image forming unit 10 converts an input digital image I into a printing resolution of W pixels in the horizontal direction (also referred to as x-axis direction) and H pixels in the vertical direction (also referred to as y-axis direction). For example, the image sizes W=640 and H=480.
A block embedding unit 12 embeds watermark information X into the digital image I having the printing resolution, converted by the image forming unit 10. Here, the block embedding unit 12 divides the digital image I into square blocks of predetermined size, and embeds identical watermark bits into some blocks redundantly. This method of embedding the watermark information X into the digital image I is referred to as “block embedding method.” The blocks of the digital image I where the watermark bits are embedded are referred to as “embedded blocks.” For example, the block size N is four.
The block embedding unit 12 selects embedded blocks 22 of the digital image I for respective watermark bits constituting the watermark information X to be embedded into. The block embedding unit 12 embeds identical watermark bits into the respective embedded blocks 22 redundantly.
A printing unit 14 prints the digital image I having the watermark information X embedded by the block embedding unit 12 onto a printing medium, thereby generating a printed image P. It should be noted that while the diagram shows the printing unit 14 as being one of the components of the electronic watermark embedding apparatus 100, the printing unit 14 may be configured as a printer which lies outside the electronic watermark embedding apparatus 100. In that case, the electronic watermark embedding apparatus 100 and the printer are connected with a peripheral connection cable or over a network.
The profile creation unit 38, the image correction unit 34, and the profile database 40 of the electronic watermark extracting apparatus 200 constitute an example of the image correction apparatus according to the present invention.
The capturing unit 30 captures printed images P generated by the electronic watermark embedding apparatus 100, and digitizes the printed images P. While the diagram shows the capturing unit 30 as being one of the components of the electronic watermark extracting apparatus 200, the capturing unit 30 may be configured as a digital camera or scanner which lies outside the electronic watermark extracting apparatus 200. In that case, the electronic watermark extracting apparatus 200 and the digital camera or scanner are connected with a peripheral connection cable or over a network. When the digital camera has wireless communication facilities in particular, images captured by the digital camera are transmitted to the electronic watermark extracting apparatus 200 by wireless.
The image correction unit 34 performs a distortion correction on the entire captured image. When the printed image P is captured by the capturing unit 30, a lens distortion and a perspective distortion can occur in the captured image. The image correction unit 34 corrects the distortions occurring in the image so that the embedded electronic watermark can be extracted properly. The distortion correction uses functions intended for correcting distortion, which are stored in the profile database 40.
The image area determination unit 32 applies edge extraction and other processing to the captured image whose distortion is corrected by the image correction unit 34, and determines the area of the original image. This cuts out the original image area 20, removing the margins from the captured area 26 of
The watermark extraction unit 36 divides the original image area 20 determined by the image area determination unit 32 into blocks of N×N pixels, and detects watermark bits from respective blocks to extract the watermark information X. When detecting the watermark bits embedded by the block embedding method, distortion of the embedded blocks, if any, can make the watermark detection difficult. Since the distortion is corrected by the image correction unit 34, however, the accuracy of the watermark detection is guaranteed. Moreover, even if some pixel deviation remains after the distortion correction, it is possible to detect correct watermark bits since the watermark bits are embedded redundantly in the respective blocks.
Initially, description will be given of how correction information is registered into the profile database 40. To measure lens distortion, the capturing unit 30 captures the lattice pattern image R, and supplies it to the profile creation unit 38. When a zoom lens is used for capturing, the zoom magnification is changed to capture the lattice pattern image R with a plurality of angles of view θi. The perspective distortion function calculation unit 80 of the profile creation unit 38 accepts input of the image area of the lattice pattern image R, and detects position deviations of the intersections in the pattern of the lattice pattern image R ascribable to perspective distortion. The perspective distortion function calculation unit 80 thereby calculates a perspective distortion function g for mapping points in an image having no perspective distortion onto points in a perspective-distorted image.
The lens distortion function pair calculation unit 82 accepts input of the perspective distortion function g calculated by the perspective distortion function calculation unit 80, and detects position deviations of the intersections in the pattern of the lattice pattern image R in consideration of the perspective distortion. The lens distortion function pair calculation unit 82 thereby calculates a lens distortion correction function fi and a lens distortion function fi−1 at an angle of view θi. Here, the lens distortion correction function fi is one for mapping points in a lens-distorted image onto points in an image having no lens distortion. The lens distortion function fi−1 is an approximate inverse function of the lens distortion correction function fi, and maps points in an image having no lens distortion onto points in a lens-distorted image. The pair of the lens distortion correction function fi and the lens distortion function fi−1 will be referred to as a lens distortion function pair (fi, fi−1).
The lens distortion function pair registration unit 84 registers the lens distortion function pair (fi, fi−1) calculated by the lens distortion function pair calculation unit 82 into the profile database 40 in association with the angle of view θi.
Next, description will be given of the image correction using the foregoing profile database 40. The capturing unit 30 supplies a captured printed image P to the image correction unit 34. The lens distortion function pair selection unit 86 of the image correction unit 34 accepts the input of the captured image of the printed image P, and determines the angle of view θ employed at the time of capturing from image information. The lens distortion function pair selection unit 86 then selects a lens distortion function pair (F, F−1) corresponding to the angle of view θ employed at the time of capturing from the profile database 40, and supplies the lens distortion function F−1 to the lens distortion correction processing unit 88. The lens distortion correction processing unit 88 corrects the lens distortion of the entire captured image by using the lens distortion function F−1, and supplies the corrected captured image to the image area determination unit 32.
The height of the subject 90 to be focused will be referred to as Y, and the height of the subject image on the imaging area of the CCD 96 as y. The magnification m is the ratio of the height y of the subject image formed on the CCD 96 with respect to the actual height Y of the subject 90, and is given by m=y/Y. Here, a perfect in-focus state will be defined as follows:
Definition 1: A Subject is in Perfect Focus
That a subject is in perfect focus refers to situations where the straight line that connects the vertex of the subject and the vertex of the subject image formed on the CCD surface passes the principle point, and the distance from the principle point to the CCD surface in the normal direction of the lens is equal to the focal length.
Under the perfect in-focus state in terms of definition 1, the point at which the optical axis 92 and the imaging area of the CCD 96 cross each other will be referred to as a focus center 98.
Lenses are broadly classified into two types, or single-focus lenses and zoom lenses. Single-focus lenses are incapable of changing their focal length f. In contrast, zoom lenses are composed of a combination of two or more lenses each, and can change the focal length f, the principle point, and the like freely by adjusting the distances between the lenses and the distances from the respective lenses to the imaging area of the CCD 96. Description will now be given of how to change the magnification of a subject by using a zoom lens. Initially, a change in magnification will be defined as follows:
Definition 2: A Change in Magnification
A change in magnification shall refer to changing the height of the subject image formed on the CCD surface without changing the distance between the subject plane and the CCD surface, while maintaining the perfect in-focus state.
What are significant are “without changing the distance between the subject plane and the CCD surface” and “while maintaining the perfect in-focus state.” For example, a person who holds a camera can move away from a subject to make the image formed on the CCD surface smaller, whereas this does not apply to a change in magnification since the distance between the subject plane and the CCD surface varies.
Here, the height of the subject image formed on the imaging area of the CCD 96 varies from y to y′ (>y), so that the magnification is changed into m=y′/Y. The angle of view is also changed from ω to ω′ (>ω). It should be noted that in actual cameras, a zoom lens is composed of a combination of two or more lenses. The distances between the lenses and the distances from the respective lenses to the CCD surface are adjusted to adjust the focal length and the position of the principle point, thereby changing the magnification.
It is known that lens distortion or distortion aberration to be corrected depends on the angle of view ω. This property is described in “KOGAKU NYUMON (User Engineer's Guide to Optics)” KISHIKAWA Toshio, Optronics Books, 1990. For a single-focus lens which is incapable of changing its focal length and thus makes no change in the angle of view, it is only necessary that a single lens distortion function pair be prepared and registered in the profile database 40. With a zoom lens, on the other hand, it is necessary to determine lens distortion function pairs (fi, fi−1) at various angles of view θi by changing the magnification while maintaining the perfect in-focus state, and register them in the profile database 40.
The lens distortion function pair table 46 is one for situations where the zoom lens of the camera having the model name A is changed in magnification. Labeling the angles of view with i, the lens distortion function pair table 46 contains labels i, the angles of view θi, and lens distortion function pairs (fi, fi−1) in association with one another. This lens distortion function pair table 46 may contain the lens distortion function pairs (fi, fi−1) in association with focal lengths or zoom magnifications instead of the angles of view. In that case, the diagonal lengths d of the CCDs need not be stored in the database since a lens distortion function can be selected uniquely based on the focal length even without arithmetically calculating θi to select the lens distortion function pairs.
The profile creation unit 38 initializes a variable i to 0, and determines the value of a constant M by the equation M=(Max−Min)/r (S200). Here, Min and Max are the minimum magnification and maximum magnification of the zoom lens, respectively, and r is the minimum unit of change in magnification. For a single-focus lens, M=0.
The capturing unit 30 captures a lattice pattern image R (S202).
The lattice pattern image R is captured under the following condition:
[Capturing Condition]
When capturing the lattice pattern image R with a camera, it is difficult to capture the image from exactly right above. There occurs some perspective distortion due to deviations of the optical axis. Then, processing for correcting the perspective distortion is performed initially.
The perspective distortion function calculation unit 80 detects the imaging positions of the intersections in the lattice pattern of the captured image of the lattice pattern image R (S204). Suppose that the number of intersections in the lattice pattern detected is N, and the coordinates of the respective intersections are (Xk, Yk) (k=0, . . . , N−1).
Next, the perspective distortion function calculation unit 80 determines pattern positions (mk, nk) on the lattice pattern image R (k=0, . . . , N−1) corresponding to the detected intersections (Xk, Yk) (k=0, . . . , N−1), respectively (S206). The pattern positions (mk, nk) show the coordinates of the intersections in the lattice pattern on the distortion-free lattice pattern image R. Since the lattice arrangement of the lattice pattern image R is known in advance, it is easily possible to determine the pattern positions (mk, nk) corresponding to the coordinates (Xk, Yk) of the intersections on the captured image of the lattice pattern image R.
The perspective distortion function calculation unit 80 calculates a perspective distortion function g based on the relationship between the positions (Xk, Yk) of the intersections on the captured image of the lattice pattern image R and the corresponding pattern positions (mk, nk) (S208). Here, the perspective distortion function g is determined not by using all the intersections but by using only intersections lying near the center of the captured image of the lattice pattern image R. For example, a fourth of all the intersections are used as the intersections lying near the center. The reason for this is that the areas closer to the center are less susceptible to lens distortion, and the perspective distortion function g can thus be determined more accurately.
It is known that the imaging positions (Xk, Yk) of the intersections on the captured image of the lattice pattern image R and the corresponding pattern positions (mk, nk) have the following relationship. This property is described in “GAZO RIKAI, 3JIGEN-NINSHIKI NO SURI (Image Understanding: A Mathematical Approach to 3D Recognition)” KANAYA Ken'ichi, Morikita Shuppan, 1990.
Xk=(cmk+dnk+e)/(amk+bnk+1), and
Yk=(fmk+gnk+h)/(amk+bnk+1).
Given pairs of corresponding points {(Xk, Yk)} and {(mk, nk)}, where k=0, . . . , (N−1)/4, the coefficients a to h in the foregoing equations are determined by using a least-square method as follows:
J=Σk=0(N−1)/4[(Xk(amk+bnk+1)−(cmk+dnk+e))2+(Yk(amk+bnk+1)−(fmk+gnk+h))2]→min.
The coefficients a to h that minimize J can be determined by solving the foregoing equation for ∂J/∂a=0, . . . , ∂J/∂h=0.
Consequently, the perspective distortion function g for mapping the pattern positions (mk, nk) onto the reference positions (Xk′, Yk′) of the intersections on the captured image of the lattice pattern image R is determined:
(Xk′, Yk′)=g(mk, nk), where k=0, . . . , N−1.
Next, processing for determining a lens distortion function pair is performed based on the perspective distortion function g calculated. The lens distortion function pair calculation unit 82 maps all the pattern positions (mk, nk) (k=0, . . . , N−1) by using the calculated perspective distortion function g, thereby determining the reference positions (Xk′, Yk′) (k=0, . . . , N−1).
The imaging positions (Xk, Yk) of the intersections on the captured image of the lattice pattern image R are off the original positions due to both perspective distortion and lens distortion. Meanwhile, the reference positions (Xk′, Yk′) onto which the pattern positions (mk, nk) are mapped by using the perspective distortion function g are off the original positions due to the perspective distortion alone. That is, the deviations between the reference positions (Xk′, Yk′) and the imaging positions (Xk, Yk) of the intersections on the captured image are ascribable to the lens distortion. The relationship therebetween can thus be examined to determine the lens distortion correction function fi for resolving the lens distortion.
Based on the pairs of corresponding points {(Xk′, Yk′)} and {(Xk, Yk)} (k=0, . . . , N−1), the lens distortion function pair calculation unit 82 calculates the lens distortion correction function fi (S210) by the following polynominal equations:
Xk′=a1Xk4+b1Xk3Yk+c1Xk2Yk2+d1XkYk3+e1Yk4+g1Xk3+h1Xk2Yk+i1XkYk2+j1Yk3+k1Xk2+l1XkYk+m1Yk2+n1Xk+o1Yk+p1,
and
Yk′=a2Xk4+b2Xk3Yk+c2Xk2Yk2+d2XkYk3+e2Yk4+g2Xk3+h2Xk2Yk+i2XkYk2+j2Yk3+k2Xk2+l2XkYk+m2Yk2+n2Xk+o2Yk+p2.
Here, the coefficients a1 to p1 and a2 to p2 are calculated by a least-square method as follows:
J=Σk=0N−1[(Xk′−a1Xk4+b1Xk3Yk+c1Xk2Yk2+d1XkYk3+e1Yk4+g1Xk3+h1Xk2Yk+i1XkYk2+j1Yk3+k1Xk2+l1XkYk+m1Yk2+n1Xk+o1Yk+p1))2+(Yk′−a2Xk4+b2Xk3Yk+c2Xk2Yk2+d2XkYk3+e2Yk4+g2Xk3+h2Xk2Yk+i2XkYk2+j2Yk3+k2Xk2+l2XkYk+m2Yk2+n2Xk+o2Yk+p2))2]→min.
Consequently, the lens distortion correction function fi for expressing the relationship between the positions (Xk, Yk) of the intersections on the captured image and the reference positions (Xk′, Yk′) is obtained. Then, since the image correction requires two-way calculations, the lens distortion function fi−1, or an approximate inverse function of the lens distortion correction function fi, is also determined. As is the case with the lens distortion correction function fi, the lens distortion function fi−1 is calculated by using a least-square method:
(Xk′, Yk′)=fi(Xk, Yk), where k=0, . . . , N−1, and
(Xk, Yk)=fi−1(Xk′, Yk′), where k=0, . . . , N−1.
Return now to
θi=tan−1(d/2fi).
The lens distortion function pair registration unit 84 registers the lens distortion function pair (fi, fi−1) into the profile database 40 (S214) in association with the angle of view θi (S214).
The variable i is incremented by one (S216). If the variable is smaller than M (Y at S218), the processing returns to step S202. The lattice pattern image R is captured again with a zoom magnification of the next level, followed by the processing of calculating the perspective distortion function g and the lens distortion function pairs (fi, fi−1). If the variable i is not smaller than M (N at S218), the processing for creating the profile database 40 ends.
Consequently, in the case of a single-focus lens, a single lens distortion function pair (f, fi−1) is registered in the profile database 40. With a zoom lens, the angles of view θi and the lens distortion function pairs (fi, fi−1) at respective magnifications are registered in the profile database 40 in association with each other.
Description will now be given of the steps by which the electronic watermark extracting apparatus 200 having the foregoing configuration extracts an electronic watermark.
The image correction unit 34 performs image correction processing to be detailed later on the image of the printed image P captured by the capturing unit 30 (S14). Hereinafter, distorted images to be corrected will be referred to as “correction object images.” Distortion-free images to be the targets of the correction will be referred to as “correction target images.” In the image correction processing S14, coordinates (i, j) on the correction target image are transformed into coordinates (xij, Yij) on the correction object image by using a lens distortion function stored in the profile database 40. Luminance values in the respective coordinates (xij, yij) are then determined by bi-linear interpolation or the like, and set as the luminance values in the original coordinates (i, j) on the correction target image.
The image area determination unit 32 determines the original image area 20 in the captured image whose distortion is corrected by the image correction unit 34 (S15). The watermark extraction unit 36 performs processing for detecting watermark information X from the original image area determined by the image area determination unit 32 (S16). This watermark detection processing is performed by detecting watermark bits from the original image area 20 in units of blocks. The watermark extraction unit 36 checks if significant watermark information X is obtained, thereby determining whether a watermark is detected successfully or not (S18).
If a watermark is detected successfully (Y at S18), the processing ends. If the watermark detection fails (N at S18), the number of corrections counter is incremented by one (S20). The processing returns to step S14 to repeat the image correction processing and try watermark detection again. Here, thresholds and other parameters are adjusted to select a lens distortion function from the profile database 40 again before the image correction processing is performed to retry the watermark detection. The number of corrections counter is incremented while the image correction processing and the watermark detection processing are repeated until a watermark is detected successfully.
The lens distortion function pair selection unit 86 of the image correction unit 34 makes an inquiry to the profile database 40, thereby acquiring the lens distortion function pair corresponding to the angle of view employed at the time of capturing (S34). The lens distortion correction processing unit 88 performs image correction main processing by using the lens distortion function acquired by the lens distortion function pair selection unit 86 (S38).
If not a zoom lens (N at S50), the lens distortion function pair selection unit 86 acquires the model name of the camera used for capturing from the EXIF information on the correction object image. The lens distortion function pair selection unit 86 makes an inquiry to the profile database 40 with the model name as a key, acquires the lens distortion function pair associated with the model name (S52), and ends the processing.
If a zoom lens (Y at S50), the lens distortion function pair selection unit 86 calculates the angle of view θ from the EXIF information included in the correction object image (S54). The angle of view θ is calculated on the assumption that the following precondition holds:
[Precondition]
The subject is in perfect focus.
That is, pictures out of focus can cause errors when corrected. Under the foregoing precondition, the lens distortion function pair selection unit 86 acquires the diagonal length d of the CCD of the camera from the profile database 40, and acquires the capturing focal length f from the EXIF information of the correction object image. The lens distortion function pair selection unit 86 then calculates the angle of view θ by the following equation:
θ=tan−1(d/2f).
The lens distortion function pair selection unit 86 searches the profile database 40 with the model name obtained from the EXIF information and the angle of view θ calculated at step S54 as a key. The lens distortion function pair selection unit 86 thereby selects the lens distortion function pair (fi, fi−1) corresponding to a label i that minimizes the difference |θ−θi| between the angle of view θi registered in the profile database 40 and the angle of view θ calculated (S58), and ends the processing.
Hereinafter, a lens distortion function pair that the lens distortion function pair selection unit 86 thus acquires from the profile database 40 will be denoted as (F, F−1).
The lens distortion correction processing unit 88 maps a point P(i, j) in the correction target image onto a point Q(xij, yij) in the correction object image (S86) by using the lens distortion function F−1:
(xij, yij)=F−1(i, j).
The lens distortion correction processing unit 88 calculates the luminance value L(xij, yij) at the point Q(xij, yij) by interpolating the luminance values of peripheral pixels by using a bi-linear interpolation method or the like. The luminance value L(xij, yij) calculated is set as the luminance value at the point P(i, j) of the correction target image (S88).
The point Q is one that divides the segment ef at an internal division ratio of v:(1−v), and divides the segment gh at an internal division ratio of w:(1−w). The luminance value L(xij, yij) at the point Q is determined from the luminance values L(x′, y′), L(x′, y′+1), L(x′+1, y′), and L(x′+1, y′+1) at the four points p, q, r, and s by bi-linear interpolation as shown by the following equation:
L(xij, yij)=(1−v)×{(1−w)×L(x′, y′)+w×L(x′+1, y′)}+v×{(1−w)×L(x′, y′+1)+w×L(x′+1, y′+1)}.
While the luminance value at the point Q is determined by interpolating the luminance values of four pixels nearby, the method of interpolation is not limited thereto. More than four pixel points may be also used for interpolation.
Referring to
If the x-coordinate value i reaches or exceeds the width W′ of the correction object image (Y at S92), it means that the luminance values of the pixels at the current y-coordinate value j are obtained through the x-axis direction. The y-coordinate value j is then incremented by one (S94). If the y-coordinate value j reaches or exceeds the height H′ of the correction object image (Y at S96), the processing ends since the luminance values are obtained of all the pixels of the correction target image. If the y-coordinate value j is smaller than the height H′ of the correction object image (N at S96), the processing returns to step S82. The x-coordinate value is thus initialized to zero again, and the processing for determining the luminance value of a pixel is repeated while the coordinate value is increased in the x-axis direction under the new y-coordinate value j.
w=x2−x0=x3−x1, and
h=y1−y0=y3−y2.
The image area determination unit 32 initializes the y-coordinate value j of the correction target image to 0 (S122). Next, it initializes the x-coordinate value i of the correction target image to 0 (S124).
The image area determination unit 32 maps a point P(i, j) in the correction target image onto a point Q(xij, yij) in the lens distortion corrected image as shown in
xij=i×w/(W−1)+x0, and
yij=j×h/(H−1)+y0.
The image area determination unit 32 calculates the luminance value L(xij, yij) at the point Q(xij, yij) by interpolating the luminance values of peripheral pixels by using a bi-linear interpolation method or the like. The luminance value L(xij, yij) calculated is set as the luminance value at the point P(i, j) of the correction target image (S128).
The image area determination unit 32 increments the x-coordinate value i by one (S130). If the x-coordinate value i is smaller than the width W of the correction target image (N at S132), the image area determination unit 32 returns to step S126. The processing for determining the luminance value of a pixel is thus repeated while increasing the coordinate value in the x-axis direction.
If the x-coordinate value i reaches or exceeds the width W of the correction target image (Y at S132), it means that the luminance values of the pixels at the current y-coordinate value j are obtained through the x-axis direction. The y-coordinate value j is then incremented by one (S134). If the y-coordinate value j reaches or exceeds the height H of the correction target image (Y at S136), the processing ends since the luminance values are obtained of all the pixels of the correction target image. If the y-coordinate value j is smaller than the height H of the correction target image (N at S136), the processing returns to step S124. The x-coordinate value is thus initialized to zero again, and the processing for determining the luminance value of a pixel is repeated while the coordinate value is increased in the x-axis direction under the new y-coordinate value j.
Description will now be given of a modification of the present embodiment. When selecting a lens distortion function pair at S34 of
[Method of Selection for a Speed-Priority System]
This method applies when the foregoing system errors are allowable. To give priority to the processing speed, simply select the lens distortion function pair (fi, fi−1) corresponding to a label i that minimizes the difference |θ−θi| between the angle of view θi registered in the profile database 40 and the angle of view θ calculated, similarly to step S58 shown in
[Method of Selection for a Precision-Priority System]
This method applies when the system errors are not allowable. With reference to the angle of view θ calculated, acquire a plurality of lens distortion function pairs as candidates from the profile database 40. Pre-evaluate which of the lens distortion function pairs can best correct the image, and then select the lens distortion function pair of the highest evaluation.
For example, the method of selection for a speed-priority system is used when the size N of the watermark embedded blocks is large and the system errors have only a small impact. The method of selection for a speed-priority system is used when the size N of the watermark embedded blocks is small and the system errors have a significant impact. Alternatively, either of the methods may be specified depending on the characteristics of applications to which the present invention is applied. For example, in entertainment applications, the speed-priority method is selected since the response rate has a higher priority than the watermark detection rate. In the meantime, examples of applications for which the precision-priority method is selected include a ticket authentication system.
If priority is given to speed (Y at S56), step S58 is executed as in
M feature points are defined on the correction object image, and a row of P sample points (Xm, Ym) (m=0, 1, . . . , P−1) are acquired between the feature points of the correction object image (S64). For example, when the correction object image is an oblong rectangular in shape, the feature points are the vertexes at the four corners. The row of sample points includes points sampled on each of the sides which connect the adjoining vertexes. Here, the row of sample points shall include the feature points lying on both ends. That is, both (X0, Y0) and (XP−1, YP−1) are feature points. In another example, a row of points on the edge of an object in the correction object image, such as a personal figure, may be acquired as the row of sample points. For example, a row of sample points may be defined on the outline of a person's face or eye.
The number of sample points P is determined with reference to the lattice size L of such a lattice pattern image R as a checker pattern. For example, L takes on such values as 16 and 32. Since a row of sample points is determined between two feature points selected from among M feature points, the maximum possible number of combinations of feature points is MC2. These combinations are not applicable unless the lines connecting the feature points form a known shape.
The variable j is initialized to zero (S66). The row of sample points (Xm, Ym) (m=0, 1, . . . , P−1) are mapped by the lens distortion correction function fj (S68). The row of sample points mapped by the lens distortion correction function fj shall be denoted as (Xmj, Ymj) (m=0, 1, . . . , P−1):
(Xmj, Ymj)=fj(Xm, Ym), where m=0, 1, . . . , P−1.
Next, a Bezier curve H′ of qth order is calculated with the row of mapped sample points (Xmj, Ymj) (m=0, 1, . . . , P−1) as control points (S70). The order q is determined depending on what kind of line the row of sample points between the feature points are supposed to fall on if without lens distortion. When the correction target image is an oblong rectangular and the feature points are the vertexes at the four corners, the row of sample points between the feature points are supposed to fall on the sides of the oblong rectangular. In this case, the order is determined to be q=1. By the definition of Bezier curves, a Bezier curve of first order forms a straight line which connects between feature points.
The sum Dj of errors between the calculated Bezier curve and the control points is calculated (S72) by the following equation:
Dj=Σm=0P−1[(Ymj−(H′(Xmj)))2].
The foregoing equation is one for evaluating approximation errors of the Bezier curve when sampled in the x direction.
Return now to
Initially, at step S40, a threshold T intended for edge determination is set. Here, the threshold T is given by T=T0−counter×Δ. As can be seen from the flowchart of
For example, suppose that a pixel A lying at the end of a margin has a luminance value of 200, a pixel B lying at the end of the original image area 20 next to the foregoing pixel A has a luminance value of 90, T0 is 115, and Δ is 10. When a difference between the luminance values of the pixels A and B is greater than the threshold T, the pixels A and B shall be determined to have an edge therebetween. In the first correction (counter=0), the pixels A and B are determined not to have an edge therebetween since the difference between the luminance values is 110 and the threshold T is 115. In the second correction (counter=1), however, the pixels A and B are determined to have an edge therebetween since the threshold T falls to 105.
Next, at step S42, the image correction unit 34 performs edge detection processing. Here, the luminance difference between adjoining pixels is compared with the threshold T set at step S40, and if the difference is greater, the corresponding pixel is considered as an edge.
Vertical edges are also detected likewise. Starting from a point F(0, (Y0+Y1)/2) on the y-axis, pixels are scanned in the x-axis direction. Locations where a difference between the luminance values of two pixels adjoining in the x-axis direction exceeds the threshold T are thus searched for, thereby detecting vertical edges of the original image area 20.
It should be noted that the foregoing has dealt with the case where the vertical or horizontal edges of the original image area 20 are detected based on a difference between the luminance values of two pixels adjoining in the y-axis or x-axis direction. Instead, edges may be detected by using edge detection templates. For example, edges may be detected based on the results of comparison between matching calculations obtained by using a Prewitt edge detector and a threshold T.
Note that the threshold T decreases from the initial value T0 as the number of corrections counter increases in value. The criterion for edge detection thus relaxes gradually with the increasing number of corrections. Extracting edges by using higher thresholds T can sometimes fail to detect edges properly due to noise in the captured image. In such cases, the value of the threshold T is lowered to detect edges with a relaxed criterion.
Returning to
As has been described, according to the electronic watermark extracting apparatus 200 of the present embodiment, lens distortion function pairs for respective angles of view are prepared in the database in advance. Then, lens distortion is corrected by using a lens distortion function pair corresponding to the angle of view employed at the time of capturing. The distortion occurring in the image can thus be corrected with high precision, which can increase the frequency of detection of electronic watermarks.
The angle of view calculated and the lens distortion correction functions registered contain some errors, whereas the lens distortion correction functions can be pre-evaluated to select more suitable lens distortion correction functions. Moreover, whether or not to make a pre-evaluation on the lens distortion correction functions can be determined depending on the size of the embedded blocks of electronic watermarks. Since image distortion can thus be corrected with precision suited to the tolerance of the electronic watermarks for image distortion, it is possible to avoid needless distortion correction processing while maintaining the detection accuracy of the watermarks.
The first embodiment has been dealt with the case of performing a lens distortion correction alone, on the assumption that the correction object image has no perspective distortion or the effect of perspective distortion is as small as negligible. In the second embodiment, in contrast, the perspective distortion of the correction object image will also be corrected. Since the rest of the configuration and operation are the same as in the first embodiment, description will be given only of differences from the first embodiment.
The image correction unit 34 according to the present embodiment includes a lens distortion function pair selection unit 86, a lens distortion correction processing unit 88, a perspective distortion function calculation unit 87, and a perspective distortion correction processing unit 89.
The capturing unit 30 supplies a captured printed image P to the image correction unit 34. The lens distortion function pair selection unit 86 of the image correction unit 34 accepts the input of the captured image of the printed image P, and determines from the image information the angle of view θ employed at the time of capturing. The lens distortion function pair selection unit 86 then selects a lens distortion function pair (F, F−1) corresponding to the angle of view θ from the profile database 40, and supplies the lens distortion correction function F to the lens distortion correction processing unit 88.
The lens distortion correction processing unit 88 corrects lens distortion occurring in the captured image by using the lens distortion function F−1, and supplies the lens-distortion-corrected image to the perspective distortion function calculation unit 87. Using the lens-distortion-corrected image, the perspective distortion function calculation unit 87 calculates a perspective distortion function G which expresses the perspective distortion of the original image area 20 in the captured image, and then supplies the calculated perspective distortion function G to the perspective distortion correction processing unit 89.
The perspective distortion correction processing unit 89 corrects the perspective distortion of the original image area 20 by using the perspective distortion function G, and supplies the corrected original image area 20 to the watermark extraction unit 36.
Description will now be given of the step for correcting lens distortion at S35. As in the procedure described in
Based on the information on the feature points set at step S100, the perspective distortion function calculation unit 87 performs processing for detecting corresponding feature points in the correction object image whose lens distortion is corrected. The perspective distortion function calculation unit 87 thereby determines the imaging positions (CXk, CYk) (k=0, 1, . . . , M−1) of the feature points in the correction object image (S104). Take, for example, the case of detecting vertexes at the four corners of the correction object image, or original image area 20, as feature points. Here, the vertexes of the original image area 20 are found by tracing the edges of the original image area 20 by using an edge filter or other techniques. Pixels near the vertexes are then Fourier-transformed to detect the phase angles for accurate positioning of the vertexes. When feature points consist of points on each side of the correction object image, the perspective distortion function calculation unit 87 performs processing for detection marks lying on the image frame of the original image area 20.
The perspective distortion function calculation unit 87 calculates a perspective distortion function G from the relationship between the feature points (CXk, CYk) detected at step S104 and the corresponding pattern positions (cmk, cnk) in the correction target image by using a least-square method (S106). This perspective distortion function G is calculated by the same steps as with the calculation of the perspective distortion function g at S208 of
The perspective distortion correction processing unit 89 maps a point P(i, j) of the correction target image by using the perspective distortion function G (S84). The point mapped by the perspective distortion function G will be denoted as Q(xij, yij):
(xij, yij)=G(i, j)
At step S84 of
The perspective distortion correction unit 89 calculates the luminance value L(xij, yij) at the point Q(xij, yij) by interpolating the luminance values of peripheral pixels by a bi-linear interpolation method or the like. The luminance value L(xij, yij) calculated is set as the luminance value at the point P(i, j) of the correction target image (S88).
The x-coordinate value i is incremented by one (S90). If the x-coordinate value i is smaller than the width W of the correction target image (N at S92), the processing returns to step S84. The processing for determining the luminance value of a pixel is thus repeated while increasing the coordinate value in the x-axis direction.
If the x-coordinate value i reaches or exceeds the width W of the correction target image (Y at S92), it means that the luminance values of the pixels at the current y-coordinate value j are obtained through the x-axis direction. The y-coordinate value j is then incremented by one (S94). If the y-coordinate value j reaches or exceeds the height H of the correction target image (Y at S96), the processing ends since the luminance values are obtained of all the pixels of the correction target image. If the y-coordinate value j is smaller than the height H of the correction target image (N at S96), the processing returns to step S82. The x-coordinate value is initialized to zero again, and the processing for determining the luminance value of a pixel is repeated while the coordinate value is increased in the x-axis direction under the new y-coordinate value j.
As described above, the electronic watermark extracting apparatus 200 according to the present embodiment can utilize lens distortion correction functions to detect the position deviations of feature points ascribable to perspective distortion, and determine the perspective distortion function accurately upon each capturing. Consequently, even when an image has perspective distortion aside from lens distortion, the lens distortion and the perspective distortion can be processed separately for accurate distortion correction.
Up to this point, the present invention has been described in conjunction with an embodiment thereof. The foregoing embodiment has been given solely by way of illustration. It will be understood by those skilled in the art that various modifications may be made to combinations of the foregoing components and processes, and all such modifications are also intended to fall within the scope of the present invention.
The foregoing embodiment has deal with the case where a perspective distortion function is calculated for the purpose of correcting perspective distortion. Instead, in one modification, profile data on lattice configurations that show several patterns of perspective distortion may be stored in the profile database 40 in advance. For example, when capturing the lattice pattern image R, the optical axis is tilted in various directions and angles so that a plurality of lattice patterns having perspective distortion are captured and stored in the profile database 40 in advance. Then, during image correction, perspective distortion is corrected by using the most suitable one of the lattice patterns.
The foregoing description has dealt with the case where the lens distortion function pairs are registered in the profile database 40. Nevertheless, the correspondence between the points in the correction target image and the points in the correction object image may be stored in the profile database 40 in the form of tables, not functions. In this case, the correction target image may be sectioned into lattices according to the size of the embedded blocks of the watermark. The correspondence between the lattice points alone is then stored into the profile database 40 as profile data on lens distortion.
In the foregoing steps of detecting a watermark, if watermark detection fails, the threshold and other parameters are adjusted and the image correction processing is repeated to retry the watermark detection. Nevertheless, if watermark detection fails or if the number of corrections exceeds a predetermined number, the image correction unit 34 may request the capturing unit 30 to capture the printed image P again.
The data on the lens distortion function pairs may be stored in the profile database 40 as classified by the models of capturing devices including digital cameras and scanners. The electronic watermark extracting apparatus 200 may acquire model information on the capturing device, and select and use the data on lens distortion function pairs suited to the model that is used when capturing the printed image P.
The foregoing embodiment has dealt with the case where image correction is performed on the original image area 20 of an image in which an electronic watermark is embedded by the “block embedding method.” Nevertheless, this is just an example of embodiment of the image correction technology of the present invention. According to the configuration and processing steps described in the foregoing embodiment, it is possible to correct images in which electronic watermarks are embedded by other methods. Moreover, according to the configurations and processing steps of image correction described in the foregoing embodiment, it is possible to correct ordinary images having no electronic watermark embedded therein. For example, the image correction technology of the present invention is not limited to the correction of captured images of printed images, but may also be applied to the correction of images obtained by photographing actual subjects such as a personal figure and a landscape with a camera.
The product image data provision system 1100 comprises a server 1001, a camera-equipped cellular phone 1002, and a printed material 1003. A watermarked product image 1007 is printed on the printed material 1003.
In the following description of the present embodiment, as shown in the diagram, the horizontal direction of the watermarked product image 1007 will be referred to as x direction and the vertical direction of the watermarked product image 1007 as y direction. The direction perpendicular to the watermarked product image 1007, piercing the image from the back to the front, will be referred to as z direction.
A client captures the watermarked product image 1007 with the camera (camera-equipped cellular phone 1002) tilted according to the desired point of view of a two-dimensional image of the product. The digital image data obtained by this capturing is transmitted to the server 1001.
Receiving this image data, the server 1001 corrects perspective distortion that occurs in the image data since the camera is tilted by the client when capturing. Next, the information embedded by the electronic watermark technology is detected from the corrected image data. Based on the information embedded by the electronic watermark technology and perspective distortion information obtained during correction, two-dimensional image data on the corresponding product, taken from a point of view (such as obliquely above and obliquely sideways), is selected from an image database of the server 1001. The two-dimensional image data selected from the image database is returned to the camera-equipped cellular phone 1002.
For example, as shown in
When the client captures the watermarked product image 1007 from top right (“+z, +x” side) as shown in
When the client captures the watermarked product image 1007 from directly above (“+z” side) as shown in
Imaging data on a captured image 1006 (see
The transmitter-receiver unit 1025 performs data communication processing with exterior. Specifically, it transmits the digital image data to the server 1001 and receives data transmitted from the server 1001.
The LCD 1024 displays the digital image data and data transmitted from exterior.
The operation unit 1026 has buttons for making a call, as well as a shutter button and the like necessary for capturing.
The image processing circuit 1022, the LCD 1024, the transmitter-receiver unit 1025, and the operation unit 1026 are connected with the control circuit 1023.
The transmitter-receiver unit 1011 performs transmission and reception processing with exterior. Specifically, it receives digital image data transmitted from the camera-equipped cellular phone 1002, and transmits information data to the camera-equipped cellular phone 1002.
The feature point detection unit 1012 performs processing for detecting feature points from the digital image data received by the transmitter-receiver unit 1011. Here, the feature points are ones intended for cutting out the area of the watermarked product image 1007 (for example, four feature points lying at the four corners of the frame of the watermarked product image 1007). The method for detecting these feature points is described, for example, in the specification of a patent application filed by the applicant (Japanese Patent Application No. 2003-418272).
The feature point detection unit 1012 also performs image decoding processing, if necessary, before the feature point detection processing. For example, when the digital image data is JPEG image data, the feature point detection processing must be preceded by decoding processing for converting the JPEG image data into a two-dimensional array of data that expresses level values at respective coordinates.
The perspective distortion detection unit 1013 detects perspective distortion from the digital image data transmitted from the camera-equipped cellular phone 1002. Then, based on this perspective distortion, it estimates the capturing direction in which the image is captured by the camera-equipped cellular phone 1002. Now, the method of estimating the capturing direction will be described below.
Referring to
Referring to
Referring to
Referring to
It should be appreciated that the perspective distortion detection unit 1013 need not necessarily make determinations as mentioned above, or:
if d13=d24, the image is captured from above;
if d13<d24, the image is captured from top right; and
if d13>d24, the image is captured from top left.
Instead, the perspective distortion detection unit 1013 may assume a certain positive value a and make determinations as follows:
if |d13−d24|<α, the image is captured from above;
if d24−d13≧α, the image is captured from top right; and
if d13−d24≧α, the image is captured from top left.
Here, α is a parameter for allowing deviations in perspective distortion occurring at the time of capturing.
The perspective distortion detection unit 1013 may also assume a certain positive value β (where β>α), so that
if |d13−d24|>β,
it aborts the subsequent processing of the digital image data, determining that the subsequent correction of the perspective distortion or the detection of a watermark is impossible.
The perspective distortion correction unit 1014 corrects the perspective distortion of the digital image data detected by the perspective distortion detection unit 1013. The method of correcting perspective distortion is described, for example, in the specification of a patent application filed by the applicant (Japanese Patent Application No. 2003-397502).
From the digital image data whose perspective distortion is corrected by the perspective distortion correction unit 1014, the watermark extraction unit 1015 extracts information embedded by the electronic watermark technology. The method of extracting this electronic watermark information is described, for example, in the publication of an unexamined patent application filed by the applicant (Japanese Patent Laid-Open Publication No. 2003-244419).
The image database 1016 contains two-dimensional image data obtained by capturing a variety of products, or three-dimensional objects, from various angles.
The image data indexing unit 1017 contains index information on the two-dimensional image data stored in the image database 1016. More specifically, referring to
The perspective distortion information corresponds to the perspective distortion detected by the perspective distortion detection unit 1013, i.e., the capturing direction at the time of capturing by the client. When the client captures the watermarked product image 1007 from directly above, the perspective distortion information will be “0.” When the client captures the watermarked product image 1007 from top left, the perspective distortion information will be “1.”
When the client captures the watermarked product image 1007 from top right, the perspective distortion information will be “2.”
The control unit 1018 controls the components of the server 1001.
It should be noted that in terms of hardware, these components can be achieved by an arbitrary computer CPU, a memory, and other LSIs. In terms of software, they can be achieved by programs or the like that are loaded on a memory and have the functions for processing images and embedding electronic watermarks. The functional blocks shown here are achieved by the cooperation of these. It will thus be understood by those skilled in the art that these functional blocks may be achieved in various forms including hardware alone, software alone, and a combination of these.
At step S1001, the transmitter-receiver unit 1011 receives digital image data transmitted from the camera-equipped cellular phone 1002. At step S1002, the feature point detection unit 1012 performs processing for detecting feature points intended for cutting out the area of the watermarked product image 1007 (for example, four feature points lying at the four corners of the frame of the watermarked product image 1007) from the digital image data received by the transmitter-receiver unit 1011. If necessary, the feature point detection unit 1012 performs image decoding processing before the feature point detection processing.
At step S1003, the perspective distortion detection unit 1013 detects perspective distortion of the digital image data transmitted from the camera-equipped cellular phone 1002. The method of detecting the perspective distortion is as described above.
At step S1004, the perspective distortion correction unit 1014 corrects the perspective distortion detected by the perspective distortion detection unit 1013.
At step 1005, the watermark extraction unit 1015 extracts information embedded by the electronic watermark technology, from the digital image data whose perspective distortion is corrected by the perspective distortion correction unit 1014.
At step S1006, the image data indexing unit 1017 is consulted with the information extracted by the watermark extraction unit 1015 and the perspective distortion information detected by the perspective distortion detection unit 1013 as index keys. In consequence, the type of two-dimensional image data requested by the user is identified.
At step S1007, the image database 1016 is consulted to acquire the two-dimensional image data identified at the foregoing step S1006.
At step S1008, the transmitter-receiver unit 1011 performs the processing of transmitting the two-dimensional image data acquired from the image database 1016 to the camera-equipped cellular phone 1002.
According to the present embodiment, the client can transfer a plurality of pieces of information (the product to view and the desired point of view) to the server of the image database by a single capturing operation. Conventionally, the client had to select the desired point of view by pressing a button down after capturing the watermarked image of the product to view. Otherwise, the administrator of the image database had to provide a number of watermarked images corresponding to the combinations of products and the points of view.
According to the present embodiment, it is therefore possible to reduce the operation burden on the client and improve the economic efficiency for the administrator of the image database as well.
The third embodiment has dealt with the case where the watermarked product image 1007 is captured with the camera tilted according to the desired point of view of the two-dimensional image of the product, a three-dimensional object. The capturing directions, however, are not limited to the three directions in the foregoing example.
Suppose, for example, that the client wants to view an image of the product taken from the top (the ceiling side). Then, the client can acquire the image taken from the ceiling side from the server 1001 by capturing the watermarked product image 1007 from the “+z, +y” side of
Suppose also that the client wants to view an image of the product taken from the bottom (the floor side). Then, the client can acquire the image taken from the floor side from the server 1001 by capturing the watermarked product image 1007 from the “+z, −y” side.
In such cases, referring to
More specifically:
i) if d12>d34, the server 1001 recognizes that the image is captured from the “+z, +y” side, and that the client wants the image of the product taken from the top (the ceiling side); and
ii) if d12<d34, the server 1001 recognizes that the image is captured from the “+z, −y” side, and that the client wants the image of the product taken from the bottom (the floor side).
As shown in
In such cases:
iii) if d12>d34 and d13<d24, the server 1001 recognizes that the image is captured from the “+z, +ζ” side; and
iv) if d12<d34 and d13<d24, the server 1001 recognizes that the image is captured from the “+z, +η” side.
The foregoing examples have dealt with a system for providing images of a digital camera, a three-dimensional object, taken from respective points of view to clients. Nevertheless, the present invention may also be applied to a system for providing images of a passenger vehicle, a three-dimensional object, taken from respective points of view to clients.
A system having the same configuration as that of the image data provision system 1100 described in the third embodiment was constructed and subjected to an experiment. In this experiment, the diagonal length of a subject image (corresponding to the watermarked product image 1007 of the third embodiment) was 70.0 mm, the diagonal length of the CCD was 8.86 mm ( 1/1.8 inch), the focal length of the camera lens was 7.7 mm, and the distance from the subject to the lens center was set to range from 70 to 100 mm.
As a result, even if the subject image was captured with perspective distortion, it was possible to correct the perspective distortion and extract the information embedded by the electronic watermark technology unless the angle formed between the normal to the subject image and the optical axis of the camera exceeded 20°.
The present invention would have poor practicability if information embedded by the electronic watermark technology could not be extracted from images that were captured at angles considerably off from directly above. In fact, as shown from the foregoing experimental result, the information embedded by the electronic watermark technology can be extracted even when the images are captured at angles off from directly above as largely as 20°. The present invention thus has high practicability.
In this experiment, the testing system was set to make the following determinations: if the angle formed between the normal to the subject image and the optical axis of the camera was below 5°, the subject image was captured from directly above; and if the angle formed between the normal to the subject image and the optical axis of the camera reaches or exceeds 5°, the subject image was captured obliquely . In this experiment, misrecognition of the capturing direction was not observed at all.
The third embodiment has dealt with the case where the perspective distortion of the digital image transmitted from the camera-equipped cellular phone 1002 is detected and corrected by the server 1001.
In the present embodiment, on the other hand, the camera-equipped cellular phone 1002 performs perspective distortion detection and correction before transmitting digital image data to the server 1001. The information on the perspective distortion detected is stored in a header area of the digital image data. The data area of the digital image data contains the image data whose perspective distortion is corrected.
The camera-equipped cellular phone 1002 includes a CCD 1021, an image processing circuit 1022, a control circuit 1023, an LCD 1024, a transmitter-receiver unit 1025, an operation unit 1026, a feature point detection unit 1027, a perspective distortion detection unit 1028, a perspective distortion correction unit 1029, a header adding unit 1030, etc. It should be noted that the diagram shows only those components of the camera-equipped cellular phone 1002 that are necessary for camera facilities, perspective distortion correcting functions, and communications with the server 1001. The rest of the configuration is omitted from the diagram.
The CCD 1021, the image processing circuit 1022, the control circuit 1023, the LCD 1024, and the operation unit 1026 are the same as those of the camera-equipped cellular phone 1002 according to the third embodiment. Detailed description thereof will thus be omitted.
The feature point detection unit 1027 performs processing for detecting feature points of the area of the watermarked product image 1007 from the digital image data generated by the image processing circuit 1022. As employed here, the feature points shall refer to four feature points lying at the four corners of the frame of the watermarked product image 1007.
The perspective distortion detection unit 1028 detects perspective distortion of the digital image data. The method of detecting the perspective distortion is the same as with the perspective distortion detection unit 1013 of the server 1001 according to the third embodiment. Detailed description will thus be omitted.
The perspective distortion correction unit 1029 corrects the perspective distortion detected by the perspective distortion detection unit 1028. As with the perspective distortion correction unit 1014 of the server 1001 according to the third embodiment, the examples of the correction method include the technology described in the specification of Japanese Patent Application No. 2003-397502.
The header adding unit 1030 adds the information on the perspective distortion detected by the perspective distortion detection unit 1028 to the header area of the digital image data.
The digital image data accompanied with the information on the perspective distortion is transmitted from the transmitter-receiver unit 22 to the server 1001.
It should be appreciated that the information on the perspective distortion detected by the perspective distortion detection unit 1028 may be displayed on the LCD 1024. This makes it possible for the client to check if his/her own choice is reflected on his/her capturing operation before transmitting the digital image data to the server 1001.
It should be noted that in terms of hardware, these components can be achieved by an arbitrary computer CPU, a memory, and other LSIs. In terms of software, they can be achieved by programs or the like that are loaded on a memory and have the functions for processing images and embedding electronic watermarks. The functional blocks shown here are achieved by the cooperation of these. It will thus be understood by those skilled in the art that these functional blocks may be achieved in various forms including hardware alone, software alone, and a combination of these.
As in the server 1001 of the third embodiment, the transmitter-receiver unit 1011 performs data transmission and reception processing.
The watermark extraction unit 1015 extracts information embedded by the electronic watermark technology from digital image data received by the transmitter-receiver unit 1011.
The header information detection unit 1019 detects perspective distortion information stored in the header area of the digital image data transmitted from the camera-equipped cellular phone 1002.
As in the server 1001 of the third embodiment, the image database 1016 contains two-dimensional image data obtained by capturing a variety of products, or three-dimensional objects, from various angles.
The image data indexing unit 1017 also contains index data on the two-dimensional image data stored in the image database 1016 as in the server 1001 of the third embodiment (see
It should be noted that in terms of hardware, these components can also be achieved by an arbitrary computer CPU, a memory, and other LSIs. In terms of software, they can be achieved by programs or the like that are loaded on a memory and have the functions for processing images and embedding electronic watermarks. The functional blocks shown here are achieved by the cooperation of these. It will thus be understood by those skilled in the art that these functional blocks may be achieved in various forms including hardware alone, software alone, and a combination of these.
When the client presses down a shutter button on the operation unit 1026, the CCD 1021 performs imaging processing (step S1011). At step S1012, the image processing circuit 1022 performs digital conversion processing on the imaging data.
At step S1013, the feature point detection unit 1027 performs processing for detecting feature points of the area of the watermarked product image 1007 (here, four feature points lying at the four corners of the frame of the watermarked product image 1007) from the digital image data generated by the image processing circuit 1022.
At step S1014, the perspective distortion detection unit 1028 detects perspective distortion of the digital image data. At step S1015, the perspective distortion correction unit 1029 corrects the perspective distortion of the digital image data detected by the perspective distortion detection unit 1028.
At step S1016, the header adding unit 1030 adds the information on the perspective distortion detected by the perspective distortion detection unit 1028 to the header area of the digital image data whose perspective distortion is corrected by the perspective distortion correction unit 1029.
At step S1017, the transmitter-receiver unit 1025 performs processing for transmitting the digital image data having the information on the perspective distortion added by the header adding unit 1030 to the server 1001.
At step S1021, the transmitter-receiver unit 1011 receives digital image data transmitted from the camera-equipped cellular phone 1002. At step S1022, the header information detection unit 1019 detects perspective distortion information stored in the header area of the digital image data transmitted from the camera-equipped cellular phone 1002.
At step S1023, the watermark extraction unit 1015 extracts information embedded by the electronic watermark technology from the digital image data received by the transmitter-receiver unit 1011.
At step S1024, the image data indexing unit 1017 is consulted with the information extracted by the watermark extraction unit 1015 and the information perspective distortion information detected by the header information detection unit 1019 as index keys. In consequence, the type of two-dimensional image data requested by the user is identified.
At step S1025, the image database 1016 is consulted to acquire the two-dimensional image data identified at the foregoing step S1024.
At step S1026, the transmitter-receiver unit 1011 performs the processing for transmitting the two-dimensional image data acquired from the image database 1016 to the camera-equipped cellular phone 1002.
According to the present embodiment, perspective distortion is detected and corrected by the client terminal. As compared to the third embodiment, this can reduce the load on the server which is in charge of watermark detection.
In the fourth embodiment, the client terminal performs both detection and correction of perspective distortion. Instead, the client terminal may perform detection of perspective distortion alone, so that the correction is committed to the server side. In such cases, when the terminal determines that the perspective distortion included in the digital image data is too high, it may display a message on the LCD, requesting the client to recapture, instead of transmitting the image data to the server.
In the fourth embodiment, perspective distortion is detected and corrected by the client terminal while electronic watermarks are extracted on the server side. Instead, the extraction of electronic watermarks may also be performed by the client terminal. Here, the information embedded by the electronic watermark technology (product identification information) and the information on the detected perspective distortion (information corresponding to the desired point of view of the client) are transmitted from the client terminal to the server. The server determines the type of two-dimensional image data to provide to the client based on the product identification information and the information on the desired point of view of the client which are transmitted from the client terminal.
The client terminal according to the foregoing modification 2 of the fourth embodiment may further comprise an image database. Then, based on the information embedded by the electronic watermark technology (product identification information) and the information on the detected perspective distortion (information corresponding to the desired point of view of the client), the client terminal may select an image from the image database and display the selected image on its display unit. Alternatively, a thumbnail of the selected image may be displayed on the display unit.
In the third and fourth embodiments, the client can acquire two-dimensional image data on a product as viewed from a desired point of view by capturing a watermarked product image while tilting the camera according to the point of view.
In the present embodiment, the client can select optional features of a product to purchase (the type of wrapping paper) by capturing a watermarked product image.
Referring to
When the client who wants to purchase the product wants the product wrapped in black wrapping paper, the client captures the watermarked product image 1008 from top right (“+x, +z” side) by using the camera-equipped cellular phone 1002 (see
The captured image is subjected to digital conversion processing, and the resulting digital image data is transmitted to the server 1001 (see
In this way, the product purchase system 1300 according to the present embodiment makes it possible for clients to select the colors of wrapping paper for products by means of the capturing angles.
In the foregoing embodiment, the client selects the color of the wrapping paper for the product, whether black or white, by capturing the printed mater 1003 from obliquely above (in either one of two directions). The client who uses the product purchase system 1300 may also select the color of the wrapping paper other than black and white by capturing the printed material 1003 in directions other than described in the foregoing embodiment.
For example, when the client who wants to purchase the product wants the product wrapped in blue wrapping paper, he/she captures the watermarked product image 1008 from “+z, −y” side by using the camera-equipped cellular phone 1002 (see
In these cases, the capturing direction can be detected by the same method as in modification 1 of the third embodiment, described with reference to
The capturing angle of a camera may be utilized as a means for indicating client's intention in an interactive system.
The client changes the capturing angle of the camera-equipped cellular phone 1002 when capturing the question card 1009, thereby answering the quiz printed on the question card 1009. The question cars 1009 has quiz questions printed thereon, and is divided into sections corresponding to the questions. For example, question 1 is printed on the section Q1 of the question card 1009. Question 2 is printed on the section Q2 of the question card 1009. In each of the sections Q1, Q2, . . . , the identification number of the question card 1009 and the number of the quiz question are embedded in the form of electronic watermarks. For example, the identification number of the question card 1009 and the information indicating that the quiz question number is 1 are embedded in the section Q1 in the form of electronic watermarks.
Each section of the question card is bordered with a thick frame, so that the server 1010 can detect perspective distortion of the captured image from the distortion of the frame appearing on the captured image.
Description will now be given of an example of client operations in such a quiz answering system 1400. For question 1 of the question card 1009 in
The digital image data on the question card 1009, captured by the camera-equipped cellular phone 1002, is transmitted to the server 1010. The server 1010 corrects perspective distortion of the digital image data, and stores the direction of distortion (the number of the answer selected by the client) that is detected during this distortion correction. Then, the server 1010 extracts the identification number of the question card 1009 and the quiz question number embedded in the form of electronic watermarks from the distortion-corrected digital image data.
Furthermore, the server 1010 consults a database (a database that contains question numbers and the numbers of the corresponding right answers) based on the quiz question number extracted and the answer number detected, thereby determining if the answer from the client is correct.
Note that the foregoing example has dealt with the case where the question card 1009, a printed material, contains both text information for showing quiz questions and electronic watermark information including quiz question numbers. Instead, the text information for showing quiz questions and the electronic watermark information such as quiz question numbers may appear not on a printed material but on a TV broadcasting screen. According to such an embodiment, it is possible to realize an online quiz show of audience participation type. Moreover, such an embodiment may be applied to telephone polling questionnaires in TV programs.
Other possible modifications include the following:
(1) Application for a restaurant menu: Watermark information is embedded in the pictures of dishes and provisions. The restaurant menu can be captured to display detailed information on dishes, guest reviews, etc. Other information such as the scent of the dishes is also applicable.
(2) Application for a museum guidebook: A museum guidebook can be captured to provide voice or visual descriptions on collections.
In both of the foregoing applications (1) and (2), description languages such as English, Japanese, and French can be switched depending on the capturing angle. For example, an identical watermarked image can be captured obliquely from the front to show Japanese description, and obliquely from behind to show English description. This has the advantage that menus and pamphlets need not be prepared for each individual language.
The foregoing embodiments disclosed herein are to be considered in all respects as illustrative and not restrictive. The scope of the invention is indicated by the appended claims rather than by the foregoing description of the embodiments, and all changes which come within the meaning and range of equivalency of the claims are therefore intended to be embraced therein.
The foregoing embodiments have dealt with the cases where the client captures a watermarked product image obliquely. Nevertheless, the client may put the camera directly above a watermarked image and capture the image with the camera tilted. For example, suppose that the client captures the image while holding the camera as tilted the left side up and the right side down. Then, in the captured image, the left edge of the area of the watermarked image (in
The foregoing embodiments have dealt with the cases where the client captures in oblique directions an image in which product information is embedded by the electronic watermark technology. Instead, the client may obliquely capture a printed material in which product information is embedded in the form of a one- or two-dimensional barcode. In this case, the electronic watermark extraction unit of the present invention is replaced with a one- or two-dimensional barcode reader.
An information database apparatus may also be provided, comprising: a distortion detection unit for detecting image distortion from imaging data obtained by an imaging device; an information data storing unit for storing information data; and a selector unit for selecting information data stored in the information data storing unit based on the image distortion detected by the distortion detection unit.
The present invention is applicable to the field of image processing.
Number | Date | Country | Kind |
---|---|---|---|
2004-089684 | Mar 2004 | JP | national |
2004-185659 | Jun 2004 | JP | national |
2004-329826 | Nov 2004 | JP | national |
Filing Document | Filing Date | Country | Kind | 371c Date |
---|---|---|---|---|
PCT/JP05/03398 | 3/1/2005 | WO | 9/25/2006 |