1. Technical Field
The present invention relates to a technique for outputting, in an appropriate size, an image stored as digital data.
2. Related Art
In these days, images can be readily treated as digital data. For example, when a digital camera is used, photographs as high in quality as silver halide photographs can be easily taken. When photographed digital data is supplied to a printing apparatus such as an ink-jet printer, high-quality printed images can also be easily obtained.
Since images are digital data, it is also easy to changes sizes of the images when the images are outputted. For example, when the images are printed by the printing apparatus, the images are enlarged or reduced according to a sheet size. Alternatively, when the images are displayed on a display device or the like, the images can be enlarged or reduced according to a size of a display area.
However, when it is attempted to output the images in an excessively large size, roughness of pixels of the digital camera becomes conspicuous because the images are enlarged. As a result, a quality of output images may be deteriorated. Therefore, there is proposed a technique for obtaining the number of pixels of a digital camera used for photographing images and determining, according to the number of pixels, an appropriate output size for preventing roughness of the images from becoming conspicuous (JP-A-2006-217182).
However, even if the proposed technique is adopted, images cannot always be outputted in an appropriate size. In other words, even if images are photographed with the same number of pixels, the images cannot always withstand enlargement to the same size. In some case, an image with a small number of pixels can better withstand enlargement to a large size than an image with a large number of pixels. Therefore, an appropriate output size is unknown unless images are actually outputted.
An advantage of some aspects of the invention is to provide a technique for allowing a user to output, in an appropriate output size, images stored as digital data.
According to a first aspect of the invention, there is provided an image data analyzing device that analyzes image data, the image data analyzing device including a number-of-blurred-pixels detecting unit that detects the number of blurred pixels, which is the number of pixels indicating blur width of a contour in an image represented by the image data, a number-of-image-pixels acquiring unit that acquires the number of image pixels, which is the number of pixels related to a size of the image represented by the image data, and an upper-limit-output-size determining unit that determines, on the basis of the number of blurred pixels and the number of image pixels of the image data, an allowable upper limit output size of an image outputted by using the image data.
According to a second aspect of the invention, there is provided an image data analyzing method of analyzing image data, the image data analyzing method including a number-of-blurred-pixels detecting step of detecting the number of blurred pixels, which is the number of pixels indicating blur width of a contour in an image represented by the image data, a number-of-image-pixels acquiring step of acquiring the number of image pixels, which is the number of pixels related to a size of the image represented by the image data, and an upper-limit-output-size determining step of determining, on the basis of the number of blurred pixels and the number of image pixels of the image data, an allowable upper limit output size of an image outputted by using the image data.
In the image data analyzing device and the image data analyzing method according to the first and second aspects of the invention, when image data is read, the number of image pixels, which is the number of pixels related to a size of an image, is acquired. The number of image pixels may be any kind of number of pixels as long as the number of pixels is related to the size of the image. For example, the number of image pixels may be a total number of pixels of the image, may be the number of vertical pixels of the image or the number of horizontal pixels of the image, or may be the number of pixels on a diagonal. The number of image pixels may be acquired from the image data by analyzing the image data or may be acquired separately from the image data. In the image data analyzing device and the image data analyzing method according to the first and second aspects of the invention, the number of pixels representing blur width of a contour in an image (the number of blurred pixels) is acquired by analyzing the image data. If the number of image pixels related to the size of the image and the number of blurred pixels are known, it is possible to learn in which size the blur width is outputted when the image data is outputted in a certain image size. Therefore, it is possible to determine an upper limit output size that fits in allowable blur width.
The number of blurred pixels reflects a state of focusing and presence or absence of hand shake at the time when the image is photographed. Therefore, the upper limit output size determined on the basis of the number of image pixels and the number of blurred pixels of the image data represents a largest image size in which the image can be outputted at allowable levels of defocusing and hand shake. Consequently, if the image is outputted within a range of the upper limit output size acquired on the basis of the number of image pixels and the number of blurred pixels of the image data, it is possible to always output the image with a satisfactory image quality without making defocusing and hand shake conspicuous.
In the image data analyzing device according to the first aspect of the invention, when an image size in which the image is about to be outputted is set, image data having an upper limit output size larger than the set image size may be selected by determining an upper limit output size for each of the plural image data stored in advance.
When the upper limit output size of the image data is larger than the set image size, this means that, even if the image is outputted in the set size, it is possible to output the image without making defocusing and hand shake conspicuous. Therefore, if image data having an upper limit output size larger than the set image size is selected out of the plural image data, even if a large number of image data are stored, it is possible to easily select image data that can be outputted with a satisfactory image quality.
When the upper limit output size is determined in the image data analyzing device according to the first aspect of the invention, the upper limit output size may be determined as described below. Blur width at the time when the image is outputted in a certain image size is actually calculated on the basis of the number of image pixels and the number of blurred pixels of the image data. The upper limit output size may be determined by comparing the calculated blur width and a predetermined blur allowable width.
If the actual blur width is calculated on the basis of the number of image pixels and the number of blurred pixels and then the obtained blur width and the predetermined blur allowable width are compared in this way, it is possible to determine the upper limit output size. In such a method, even when blur allowable width is different for each of image sizes, it is possible to easily determine an appropriate upper limit output size. Alternatively, when blur allowable width is determined according to a situation in which a user enjoys an image such as a distance to the image in enjoying the image, it is also possible to easily determine an appropriate upper limit output size. For example, even if image data is the same, degrees of conspicuousness of defocusing and hand shake are different when the user enjoys an output image at a distance of 30 cm and when the user enjoys the output image at a distance of 1 m. Upper limit image sizes in which the image can be outputted without making defocusing and hand shake conspicuous are also different. However, even in such a case, since an appropriate upper limit output size can be determined, it is possible to always output high-quality images.
According to a third aspect of the invention, there is provided an image data analyzing device that analyzes image data, the image data analyzing device including a number-of-blurred-pixels detecting unit that detects the number of blurred pixels, which is the number of pixels indicating blur width of a contour in an image represented by the image data, a number-of-image-pixels acquiring unit that acquires the number of image pixels, which is the number of pixels related to a size of the image represented by the image data, an image-size setting unit that sets an image size, which is a size of an image about to be outputted by using the image data, and an output-possibility judging unit that judges whether the image data can be outputted in the image size by comparing a ratio of the number of blurred pixels to the number of image pixels of the image data and a reference value stored in advance in association with the image size.
According to a fourth aspect of the invention, there is provided an image data analyzing method of analyzing image data, the image data analyzing method including a number-of-blurred-pixels detecting step of detecting the number of blurred pixels, which is the number of pixels indicating blur width of a contour in an image represented by the image data, a number-of-image-pixels acquiring step of acquiring the number of image pixels, which is the number of pixels related to a size of the image represented by the image data, an image-size setting step of setting an image size, which is a size of an image about to be outputted by using the image data, and an output-possibility judging step of judging whether the image data can be outputted in the image size by comparing a ratio of the number of blurred pixels to the number of image pixels of the image data and a reference value stored in advance in association with the image size.
In the image data analyzing device and the image data analyzing method according to the third and fourth aspects of the invention, when image data is read, the number of pixels related to a size of an image (the number of image pixels) is acquired and the number of blurred pixels representing a degree of a blur of a contour in the image is detected by analyzing the image data. It is judged whether the image can be outputted in the image size by comparing a reference value stored in advance for each size of an image about to be outputted (image size) and a ratio of the number of blurred pixels to the number of image pixels.
As described above, if the number of image pixels and the number of blurred pixels of the image data are known, it is possible to determine blur width at the time when the image data is outputted in a certain image size. This relation between the number of image pixels and the number of blurred pixels and the blur width can be more simply defined by using an index obtained by dividing the number of blurred pixels by the number of image pixels. As a value of the index obtained by dividing the number of blurred pixels by the number of image pixels is larger, blur width at the time when the image data is outputted in a certain image size increases. If the index obtained by dividing the number of blurred pixels by the number of image pixels is substantially the same value, the blur width at the time when the image data is outputted in a certain image size is also substantially the same. On the other hand, blur width allowable at the time when an image is outputted in a certain image size is generally decided empirically. More strictly, allowable blur width is different for each of image sizes. However, in any case, once an image size to be outputted is determined, the allowable blur width is determined. As described above, blur width in a certain image size depends on the index obtained by dividing the number of blurred pixels by the number of image pixels. Therefore, a reference value of an index that just fits the blur width to the allowable blur width can be set for each of image sizes. If the reference value set for each of image sizes and the index obtained from the image data (a value obtained by dividing the number of blurred pixels by the number of image pixels) are compared, it is possible to easily judge whether a blur is conspicuous when the image data is outputted in a certain image size. Therefore, it is possible to easily select image data that can be outputted without making a blur conscious.
In the invention, it is also possible to realize the image data analyzing method according to the second or the fourth aspect by causing a computer to read a computer program included on a computer-readable medium, for realizing the image data analyzing method and execute a predetermined function. Therefore, the invention also includes an aspect as a computer program described below.
A computer program corresponding to the image data analyzing method according to the second aspect is a computer program for analyzing image data using a computer, the computer program causing the computer to realize a number-of-blurred-pixels detecting function of detecting the number of blurred pixels, which is the number of pixels indicating blur width of a contour in an image represented by the read image data, a number-of-image-pixels acquiring function of acquiring the number of image pixels, which is the number of pixels related to a size of the image represented by the image data, and an upper-limit-output-size determining function of determining, on the basis of the number of blurred pixels and the number of image pixels of the image data, an allowable upper limit output size of an image outputted by using the image data.
A computer program corresponding to the image data analyzing method according to the fourth aspect is a computer program for and analyzing image data using a computer, the computer program causing the computer to realize a number-of-blurred-pixels detecting function of detecting the number of blurred pixels, which is the number of pixels indicating blur width of a contour in an image represented by the image data, a number-of-image-pixels acquiring function of acquiring the number of image pixels, which is the number of pixels related to a size of the image represented by the image data, an image-size setting function of setting an image size, which is a size of an image about to be outputted by using the image data, and an output-possibility judging function of judging whether the image data can be outputted in the image size by comparing a ratio of the number of blurred pixels to the number of image pixels of the image data and a reference value stored in advance in association with the image size.
If the computer is caused to read these programs and realize the respective functions described above, it is possible to output an image in an appropriate size.
The invention will be described with reference to the accompanying drawings, wherein like numbers reference like elements.
Embodiments of the invention are explained according to order described below to clarify the contents of the invention described above.
A. Apparatus configuration
B. Image data analysis processing
C. Image data selection processing
D. Modification
The control unit 300 is mounted with a CPU, a ROM, a RAM, and the like and can execute various kinds of processing in addition to the control of the scanner unit 100 and the printer unit 200. For example, when a user sets a print size in printing an image, the printing apparatus 10 can print the image after enlarging or reducing the image according to the set print size. In setting a print size, if the user designates an excessively large size, roughness of the image may become conspicuous and deteriorate a quality of a printed image. Therefore, the printing apparatus 10 also has a function of displaying a maximum size in which the image can be outputted with a suitable quality (an upper limit output size) on a monitor screen by analyzing image data. Alternatively, if a print size is set, it is also possible to select, out of plural image data, image data that can be printed in the size while a quality is secured and display the image data on the monitor screen.
In
When the number of image pixels is acquired, subsequently, the control unit 300 performs processing for analyzing the image data and extracting edges in the image (step S104). The edges in the image can be extracted by various methods. As a simplest method, the edges in the image can be extracted by causing a two-dimensional filter such as a Sobel filter to act on the image data.
In extracting edges in the image, a method of extracting edges is not limited to the method of using the Sobel filters described above and other methods may be used. For example, when the image data is stored, the image data is converted into a JPEG format. Therefore, if this conversion of a format is utilized, edges can be relatively easily extracted as described below.
When the edges in the image are extracted as described above (step S104 in
When the number of blurred pixels is calculated, the control unit 300 performs, on the basis of the number of blurred pixels and the number of image pixels acquired earlier (see step S102), processing for determining a maximum size in which the image can be printed while a quality of the image is maintained (an upper limit output size) (step S108). In this processing, the control unit 300 compares a parameter decided from the number of blurred pixels and the number of image pixels with a parameter set for each of sheet sizes to thereby determine an upper limit output size. However, to facilitate understanding, first, a principle of determining an upper limit output size from blur width at the time when the image is actually printed is explained with reference to
In
As explained above, the judgment on whether it is possible to print the image without deteriorating a quality of the image eventually results in judgment on whether a formula shown in
A value of the parameter on the left side can also be calculated from the visibility limit and the width of the print sheet. The value of the parameter may be decided in advance by a so-called sensory evaluation experiment. For example, plural images having different values of the parameter on the right side of
As explained above, in step S108 in
In this way, in the image data analysis processing according to this embodiment, the upper limit output size is determined by comparing the parameters (the number of blurred pixels and the number of image pixels) extracted from the image data and the parameter of the sheet sizes. Therefore, it is possible to determine an appropriate output size corresponding to performance during photographing of an image. In other words, if the image is a focused preferable image, the upper limit output size is increased. Conversely, if the image is a blurred image, the upper limit output size is reduced to make the blur less conspicuous. Therefore, it is unlikely that defocusing and hand shake of a printed image become conspicuous and a quality is deteriorated. It goes without saying that the upper limit output size is determined by using not only the performance during photographing but also the number of pixels of the image data (the number of image pixels). Therefore, when an image is photographed by a digital camera with a large number of pixels, it is possible to determine a large size in association with the large number of pixels. Conversely, when an image is photographed by a digital camera with a relatively small number of pixels, it is possible to determine an appropriate size that does not make roughness of pixels conspicuous.
After the upper limit output size is determined in this way, it is possible to inform the user of a printable size by displaying the upper limit output size on the monitor screen.
After the upper limit output size is determined, in addition to the display of the recommended sheet sizes on the monitor screen, the upper limit output size may be recorded in a header portion of the image data. Alternatively, the upper limit output size may be recorded in a management file for managing a storage area (a directory, etc.) in which the image data is recorded. Consequently, when the image data is printed again, it is possible to more quickly determine a print size by reading out the recorded upper limit output size. Even when the image is outputted in other printing apparatuses and the like not mounted with the image data analyzing device according to this embodiment, an appropriate output size is known if the recorded upper limit output size is read out. Therefore, it is possible to obtain a preferable image by outputting the image in the size.
Moreover, in the printing apparatus 10 according to this embodiment, by determining upper limit output sizes for plural images, it is also possible to select image data that can be printed in a designated size. “Image data selection processing” for realizing such processing is explained below.
when the print size is set, subsequently, the control unit 300 performs processing for selecting one image data to be analyzed out of plural image data set as processing objects (step S202). The image data set as the processing objects may be image data recorded in a computer connected to the printing apparatus 10 or may be image data recorded in a recording medium inserted in the printing apparatus 10. All image data recorded in the computer or the recording medium may be set as processing objects or only image data recorded in a predetermined directory may be set as processing objects. Actually, the user does not need to perform operation for selecting image data. The control unit 300 selects image data in order according to a list of image data set as processing objects.
When one image data to be analyzed is selected, the control unit 300 executes the “image data analysis processing” on this image data and acquires an upper limit output size of the image data (step S204). When the upper limit output size is obtained for the one image data, the control unit 300 judges whether the analysis is finished for all the image data (step S206). When the analysis is not finished for all the image data (step S206: no), the control unit 300 returns to step S202, selects image data to be analyzed, and executes the image data analysis processing. When the analysis is finished for all the image data (step S206: yes), the control unit 300 selects image data having an acquired upper limit output size larger than the print size set earlier (i.e., image data that can be printed in the set print size), displays an image of the image data on the monitor screen (step S208), and finishes the image data selection processing.
After acquiring upper limit output sizes of the respective image data according to the image data selection processing, the image data may be classified on the basis of the upper limit output sizes of the respective image data. In other words, a storage area such as a directory is created for each of the various sheet sizes. Image data having upper limit output sizes larger than the sheet size (i.e., image data that can be printed in the sheet size) are stored in each of the directories. Consequently, in printing an image again, image data only has to be selected out of a directory of a sheet size in which the image is desired to be printed. Therefore, the user can more easily obtain a printed image of a preferable quality.
In the explanation of the embodiment described above, it is assumed that an upper limit output size in printing an entire image is determined (see step S108 in
Consequently, since the upper limit output size is determined from the number of blurred pixels and the number of image pixels of the portion selected by the user, it is possible to obtain an upper limit output size in printing only the selected portion. In this case, the upper limit output size is determined from only the portion selected by the user and other portions are not used. Therefore, it is possible to determine the upper limit output size without being affected by the image except the selected portion. In other words, if the portion desired to be printed is in focus, it is judged that the portion can be printed in a large size even if the other portions are out of focus. Conversely, if the portion desired to be printed is blurred, it is judged that portion can be printed only in a small size even if the other portions are in focus. In this way, since the upper limit output size is determined only from the selected portion, it is possible to learn an appropriate print size only for the selected portion regardless of a state of blurs in the other portions. If the selected portion is printed in the size, the user can obtain a printed image of a preferable quality.
In the explanation of the embodiment described above, since a visibility limit slightly fluctuates depending on a size of a print sheet, it is assumed that a value of the visibility limit is changed for each of sizes of print sheets to determine an upper limit output size (see
The image data analyzing device according to this embodiment has been explained. However, the invention is not limited to the embodiment. It is possible to carry out the invention in various forms without departing from the spirit of the invention.
For example, in this embodiment, the image data analyzing device is mounted on the printing apparatus. However, the image data analyzing device is not limited to be mounted on the printing apparatus. For example, it is also possible to mount the image data analyzing device on image display apparatuses such as a liquid crystal display and a CRT display and image photographing apparatuses such as a digital camera and a cellular phone with camera. Moreover, it is also possible to mount the image data analyzing device on unattended photography printing terminals set in towns and cities and in public places.
The entire disclosure of Japanese Patent Application No. 2007-228605, filed Sep. 4, 2007 is expressly incorporated by reference herein.
Number | Date | Country | Kind |
---|---|---|---|
2007-228605 | Sep 2007 | JP | national |