The present invention relates to an image processing apparatus and an image processing method that create an image file having a plurality of images.
In recent years, the resolution of image input devices, such as digital cameras and scanners, has become higher, and the number of pixels in a generated image has increased. Additionally, image output devices that output an image generated by the above-mentioned image input devices have become widely popular. Examples thereof include mobile phones that display an image on an installed display panel and printers that print an image on printing paper. However, the data processing performance of image output devices has not caught up with the higher resolution of image input devices in recent years. As a consequence, it sometimes takes considerable time to output an image having a large number of pixels. For example, in a case where an image is to be displayed in such a manner that the reduction/expansion thereof is switched, an expansion process and a reduction process need to be repeated on a block to be displayed within a high-resolution image each time reduction/expansion of the image is performed. Accordingly, methods for displaying an image having a large number of pixels at a high speed have been proposed.
As such a method, in the method disclosed in Japanese Patent Laid-Open No. 11-88866, a plurality of files having a plurality of images each having a different resolution, which are generated from the original image, are prestored in a server. Then, when an image is to be expanded and displayed in a client, an area necessary for display within an image file having a resolution close to the display magnification ratio requested by the client is extracted and is provided from the server to the client. As a result, it is not necessary to perform an expansion process and a reduction process on a high-resolution image file each time the display magnification ratio is changed, thereby making it possible to speed up image output.
Furthermore, in Japanese Patent Laid-Open No. 11-312173, a method is disclosed in which a plurality of image files of different resolutions are stored in a predetermined storage device, such as the server disclosed in Japanese Patent Laid-Open No. 11-88866. In that document, it is described that an image of each resolution is divided into rectangular image blocks, each of the plurality of divided image blocks is compressed and encrypted, and furthermore, these image blocks are combined so as to be formed as a single file. As a result, even if an image is divided into blocks, the number of files can be made to fall within the number of resolutions.
However, in this method, although a plurality of image blocks can be managed as a single file in the apparatus that manages files, a plurality of files need to be managed in the long run, and this may become complex. For example, it is considered that the above-mentioned plurality of files are stored on an external storage medium, such as a memory card, the storage medium is loaded into another device, and a file is copied and then used. In this case, even in a case where a user wants to copy an image file regarding one object, there is a problem in that files of all the resolutions regarding the object need to be copied. Furthermore, in a case where an image regarding a plurality of objects has been put in one folder, a plurality of image files exist for each object. As a consequence, there is a possibility that the user cannot identify the appropriate file to be selected.
The present invention provides an image processing apparatus capable of accessing a high-resolution image at a high speed and capable of generating an image file that can be easily accessed.
The present invention provides an image processing apparatus that creates an image file, including: an input unit configured to input an image; a generation unit configured to generate a reduced image by reducing the input image and configured to generate a plurality of divided images by dividing the input image; and a creation unit configured to create an image file containing the reduced image and the plurality of divided images and containing, in one index area, a plurality of items of position information indicating a position to which each of the plurality of divided images corresponds in the input image.
Further features of the present invention will become apparent from the following description of exemplary embodiments with reference to the attached drawings.
The reading unit 103 includes reading sensors, such as CCDs. The reading sensors scan and read the document image, and output analog luminance data of red (R), green (G), and blue (B). For the reading sensors, in addition to CCDs, contact image sensors (CIS) may be used. An external storage medium, such as a memory card, is loaded into the card interface 102. An image read by the reading unit 103 under the control of the CPU 200 is stored on the loaded external storage medium. Furthermore, for example, in a case where an external storage medium on which images captured using a digital still camera have been stored is loaded, a function of reading these images under the control of the CPU 200 is provided. Image data stored via the card interface 102, and image data read via the interface can be subjected to desired image processing in an image processing unit 205 (to be described later).
In a compression/decompression unit 206, a compression/decompression process for an image read by the reading unit 103 and an image to be output by the printing unit 104 is performed. Examples thereof include a process for generating and decompressing a compressed image using JPEG or the like. In the image processing unit 205, a process for inputting an image read by the reading unit 103 and an image decompressed by the compression/decompression unit 206 is performed. Furthermore, a process for outputting an image in which the image read via the card interface 102 is decompressed by the compression/decompression unit 206 is also performed. In input image processing and output image processing, conversion between a color space (for example, YCbCr) used for a digital camera or the like and a standard RGB color space (for example, NTSC-RGB or sRGB) is performed. Functions of a process for converting the resolution of image data, a process for generating and analyzing header information contained in an image file including image data, an image analysis process and an image correction process, a process for generating and correcting thumbnail images, and the like are also provided. The image data obtained by these image processings is stored in the RAM 202, and in a case where the image data is to be stored in a memory card via the card interface 102, a storage process is performed when the image data reaches a necessary predetermined amount. Also, in a case where the image data is to be printed by the printing unit 104, when the image data reaches a necessary predetermined amount, a printing operation is performed by the printing unit 104.
The operation unit 101 has a direct photograph printing start key for selecting image data stored on the storage medium and starting printing. Furthermore, the operation unit 101 has a scan start key used to start reading a monochrome image or a color image, and a monochrome copy start key and a color copy start key used for copying. Furthermore, the operation unit 101 also includes a mode key for specifying a mode for the resolution, image quality, and the like of copying and scanning, a stop key for stopping the operation of copying and the like, a ten-key pad for inputting the number of copies and a registration key, cursor keys for specifying a unit for selecting an image file to be printed, and the like. When one of these keys is pressed, an instruction is input to the CPU 200. That is, the CPU 200 detects the pressed state of the key and controls each unit in response to the pressed state. A display unit 204 displays the content in response to the key pressed state of the operation unit 101. The display unit 204 also displays the content of the processing that is being currently performed by the MFP 100, and the like.
The printing unit 104 is constituted by an ink jet head of an ink jet method, general-purpose ICs, and the like. The printing unit 104 reads printing data stored in the RAM 202, and prints and outputs it as a hard copy under the control of the CPU 200. A driving unit 207 is constituted by a stepping motor for driving paper-feed/ejection rollers, gears for transferring the driving force of the stepping motor, a driver circuit for controlling the stepping motor, and the like in the operation of each of the reading unit 103 and the printing unit 104. A sensor unit 208 is constituted by a printing paper width sensor, a printing paper presence/absence sensor, a document width sensor, a document presence/absence sensor, a printing sheet detection sensor, and the like. The CPU 200 detects the statuses of the document and the printing paper on the basis of the information obtained from these sensors.
Next, file generation according to the present invention will be described. In the present invention, the original one image (hereinafter referred to as an original image) is reduced or divided so as to generate a plurality of images, so that an image file of a multi-image format in which the plurality of images are contained is created.
Furthermore, following the EOI marker of the first image, an SOI marker of a second image exists. Following that, the Exif belong information of the second image, the multi-image format attached information 403 of the second image, and the second image compressed with JPEG exist. Another information may exist between the EOI marker of the first image and the SOI marker of the second image.
Following the EOI marker of the second image, an SOI marker of the third image exists. Following that, the Exif belong information of the third image, the multi-image format attached information 403, and the third image compressed with JPEG exist. Another information may exist between the EOI marker of the second image and the SOI marker of the third image. The second image and the third image continue in a similar manner up to the n-th image.
On the other hand, the multi-image format attached information of the image of the first image shown in
The index IFD 404 contains the version of a multi-image format, the number of images contained in the file, an offset from the entry of a first image, a list of unique IDs from the first image to the n-th image, the total number of frames, and an offset value to the next IFD. Furthermore, as the values of the IFDs, the entry 406 of each of the first image to the n-th image and the unique IDs from the first image to the n-th image are stored. The entry 406 will be described later. As described above, the information contained inside the multi-image format attached information of the first image differs from the multi-image format attached information of the second and subsequent images.
The low-order image refers to an image having a subordinate relationship to the target image. The entry number of the low-order image 1 and the entry number of the low-order image 2 indicate the sequential position of the images that are low-order images in the file. In that case, the target image becomes a high-order image with respect to the low-order image.
The type 407 of the image shown in
In the type information in the figures, information indicating the relationship among a plurality of images in the present multi-image format is stored. The information indicating the relationship among the images contains the type of the function and detailed information, and is represented by the combination of the type of the function and the detailed information.
The above information will be described. As will be described later, in the present embodiment, a reduced image in which the original image is reduced and a plurality of divided images in which the original image is divided are generated as one file. Accordingly, as position information indicating the position in the original image of the divided images, the number of horizontal divisions, the number of vertical divisions, the horizontal block position, and the vertical block position are stored.
Furthermore, as the information on the original image, the horizontal resolution of the original image, the vertical resolution of the original image, the number of horizontal pixels of the original image, and the number of vertical pixels of the original image are stored.
Here, position information is attached, as the attached information of the image, to each image. However, the information may be collectively stored in an index area, such as the index IFD 404 or the header of the file, for making references to information regarding a plurality of images. In that case, for example, the position information of the image is stored in the type 407 of the image within the entry corresponding to each image.
Reference numeral 604 denotes a reduced image generation unit that reduces the input image information input by the image input unit 602 in accordance with the output resolution information input by the output resolution input unit 601. This output resolution information indicates the resolution of the image to be used when the entire image that is not divided is to be displayed, and the reduced image generation unit 604 reduces the image so that this resolution is reached. Usually, the resolution is a resolution smaller than the resolution of the original image. For this reason, in the reduced image generation unit 604, usually, an image reduction process is performed. Furthermore, in a case where the output resolution is greater than or equal to the resolution of the input image information, a variable-magnification process of the reduced image generation unit 604 may not be performed. Reference numeral 605 denotes an image dividing unit that divides input image information in accordance with the division size and that generates a plurality of divided images. Here, the image division size is usually a size smaller than the image size of the input image information. In a case where the division size is greater than or equal to the image size of the input image information, the image dividing unit 605 may not perform image division. Reference numeral 606 denotes a file creation unit that creates a file having the above-mentioned structure of a multi-image format on the basis of a reduced image output from the reduced image generation unit 604 and a divided image output from the image dividing unit 605. Reference numeral 607 denotes a file output unit that outputs a file created by the file creation unit.
A description will be given more specifically with reference to
The reduced image 802 is used when it is desired to roughly refer to the entire image. For example, in a case where a plurality of different objects exist, the entire image is displayed on the display unit or the like when the user selects a desired image. Furthermore, the divided images are used when, for example, a portion of the original image is to be enlarged and displayed by accessing the data in divided units.
Here, as described above, in the image file of a multi-image format, the input image is set as a main image, making it possible to distinguish it from the other images. Accordingly, the following file generation is considered. The main image flag of the type 407 of the image in the entry corresponding to the reduced image 802 shown in
As described above, it is possible to distinguish the reduced image 802 and the divided images 803 to 811 on the basis of the main image flag. However, in a case where a detailed display rather than the entire display is desired to be a basic display, there is a case in which the main image flag should be set to an image different from that of the above-described case. For example, a method is considered in which the left upper image of the divided image or the image corresponding to the basic display position of the divided images is set to a main image. However, in the above-described method, if the main image flag is switched, the types of the reduced image 802 and the divided images 803 to 811 are also switched in synchronization with each other. For this reason, the detailed information in the type information shown in
In a case where the reduced image 802 is used as a main image, the reduced image 802 is used for the user to select a desired image when, for example, a plurality of different objects exist. Therefore, it is preferable that the reduced image 802 can be displayed at a high speed. For this reason, it is preferable that the resolution of the reduced image 802 be minimized as much as possible. In the example of
In particular, in a case where a device in which the image file of the present invention is mainly used is presumed, the resolution of the reduced image 802 or the number of divisions of the divided images 803 to 811 may be determined in accordance with the performance possessed by the apparatus. For example, as a result of making the size of the reduced image or the divided images to be a size that easily fall within the RAM of the apparatus, it is possible to reduce the number of times of access to an external storage device whose access speed is slow, with the result that a high-speed display is made possible. Furthermore, by determining the size of the reduced image or the divided image on the basis of the resolution of the display unit of the apparatus or the printing resolution of the printing unit, it is possible to efficiently perform an output process, such as variable magnification, which is performed at the time of output.
Next, the output of a multi-image format file in the present embodiment will be described.
As described with reference to
First, the reduced image, which is a main image of each image file, is displayed on the display unit 204. Then, when the user operates the operation unit 101 so as to select an image file, an image file selected in response to the operation is determined. In that case, the file input unit 902 obtains an image file determined to have been selected by the user on the basis of the input from the operation unit 101.
Furthermore, the reduced image of the image file determined to have been selected by the user may be displayed on the display unit 204 so that the user operates the operation unit 101 so as to select a part area of the reduced image. In that case, on the basis of the input from the operation unit 101, the output condition input unit 901 obtains information indicating the area selected by the user.
Next, a process for generating an output image from the above-described image file of a multi-image format will be described.
Next, in step S1004, the output conditions for the original image, which are obtained in step S1002, are converted into selected image output conditions appropriate for the resolution of the image selected in step S1003. In step S1005, it is determined whether or not the selected image is a divided image. When the image has not been divided, the process proceeds to S1006, and when the image has been divided, the process proceeds to S1008. In a case where the image selected in step S1005 has not been divided, in step S1006, a extraction process is performed for extracting, from the selected image, a range appropriate for the selected image output conditions obtained in step S1004. Then, in step S1007, a variable-magnification process is performed on the extracted image at a variable magnification ratio appropriate for the selected image output conditions obtained in step S1004. Then, in step S1012, an image is output.
On the other hand, in a case where the selected image is a divided image, in step S1008, each of the selected divided images is compared with each of the selected image output conditions, and a extracted divided image is generated. This extracted divided image is an image in an area contained in the range indicated by the selected image output condition among the divided images. The details will be described later with reference to
The processing of S1006, S1008, and S1010 is performed by comparing the output area contained in the output conditions or the selected image output conditions with the information, such as the block position and the number of pixels, which is associated with each image described with reference to
Furthermore, in the example shown in
In the above-described description, the variable-magnification process in step S1011 of
Next, the selection and extraction of an image, which is described with reference to
Here, a typical usage of outputting a multi-image format file in the present embodiment will be described. First, the user selects a file to be used on a display device and then sets a position at which the image is desired to be expanded, causing an expansion display of a specific area to be performed. In this case, when the user selects a file, the image displayed first should be generated from the reduced image 802 indicating the overview. Alternatively, as described above, an image whose main image flag is set at 1 may be displayed. In this case, one of the divided images will be selected. It can be assumed that the resolution of the image whose main image flag is set at 1 has the most important meaning. Then, an image for an initial display may be generated from all the images having the same resolution as that of the image whose main image flag is 1. Furthermore, the divided images whose main image flag is 1 can be made to have the most important meaning in the entire area. In this case, an image for an initial display may be generated from only the divided images whose main image flag is 1 or from the divided image whose main image flag is 1 and divided images in the surroundings thereof. Then, after the initial display, when the user changes the display area, the output conditions are determined. In this case, the output conditions determined first become the output conditions for the display image at the time of change setting. For this reason, when the output conditions are to be input in step S1002, the output conditions should be temporarily converted to the output conditions for the original image, and should be converted once more to the output conditions for the image that has been selected in step S1004. Furthermore, the output conditions may not be temporarily converted into the output conditions for the original image, and in step S1004, the output conditions may be changed directly from the output conditions for the display image at the time of change setting to the output conditions for the image that has been performed selected in step S1003.
The image file of a multi-image format as has been described above is not limited to that described in the present embodiment. For example, the type of information contained in the individual image information IFD of a multi-image format of
Furthermore, in a case where an image is to be output in the embodiment, an image file to be output may be output and displayed on the display unit 204 or may be output to the printing unit 104, whereby printing is performed on a printing sheet.
As has been described above, according to the present embodiment, an image file is created using an image in which the original image is reduced and a plurality of divided images in which the original image is divided. Therefore, when an image is to be output, one of the reduced image and the divided images needs to be output in accordance with the resolution at the output. Furthermore, when a divided image is to be output, only the necessary divided image needs to be read. Therefore, even a high-resolution image can be accessed at a high speed. Furthermore, according to the present embodiment, since images having a plurality of different resolutions are contained in one image file, it is possible for the user to easily handle a case in which the image is stored on an external storage medium.
In the above-described first embodiment, a reduced image and a plurality of images formed from divided images at 1× magnification are generated from the input original image, and a file of a multi-image format is created from the generated images. In the present embodiment, an example is shown in which, furthermore, by generating divided images at a plurality of different resolutions, more efficient output of images is realized. Components which are the same as those of the first embodiment are designated with the same reference numerals, and descriptions thereof are omitted.
Depending on the configuration of the device to be used, in the case in which data to be used is consecutively stored in the storage device, it is possible to access the data at a higher speed than a case in which data is stored in a distributed manner. Additionally, in a case where an image is to be output, if the resolution of the image used is determined in step S1003, the images of the other resolutions are not used. For this reason, the reduced image 802, the reduced divided images 1501 to 1509, and the divided images 803 to 811 should be consecutively stored in the file for each resolution.
Next, a description will be given of a process for generating an output image from an image file of a multi-image format in the present embodiment. The software structure and the processing flow of portions that generate an output image in the present embodiment are the same as in
Selection of an image from divided images in the first embodiment has been described with reference to
In the present embodiment, an example has been described which contains a file of a multi-image format having, in addition to one reduced non-divided image and 1× magnification divided images, reduced divided images in which an image is reduced at one reduction ratio. However, the present invention is not limited to this. For example, the file may have reduced divided images that have been reduced at a plurality of different reduction ratios. Alternatively, one of a reduced non-divided image and a non-reduced 1× magnification image, or both of them need not be contained. Furthermore, a plurality of reduced images that have not been divided may exist at different resolutions. Furthermore, although the number of divisions of the reduced divided images 1501 to 1509 is the same as that of the divided images 803 to 811, the number of divisions may be changed for each resolution.
In the above-described first and second embodiments, a description has been given of a method in which one high-resolution image is input, and images having a plurality of resolutions and divided images are generated so as to create a file of a multi-image format. In the present embodiment, more specifically, a description will be given of a case in which a high-resolution image is input from the reading unit 103. For example, in a case where a document is to be read using the reading unit 103, when the entire document is read at a high resolution, one large image is obtained. However, in a case where the capacity of the RAM 202 is insufficient, the above-described processing cannot be performed, or the image needs to be temporarily stored in an external storage device with a slow access speed.
Therefore, in the present embodiment, a method will be described in which one high-resolution image is not input, but a reading operation is performed in a divided manner when a document is to be read, thereby creating a file of a multi-image format in which the size of a RAM to be used is reduced. It is assumed in the present embodiment that an external storage medium, such as a memory card, has been loaded into the card interface 102 in the MFP 100 or is connected to an external storage medium, such as a hard disk, which is connected to a server or the like through a communication unit (not shown). Then, it is assumed that the file of a multi-image format is created on the external storage medium.
In the present embodiment, the reading operation by the scanner is performed for a plurality of divided areas. For this purpose, the image reading condition determination unit 1603 outputs a plurality of reading conditions of different reading ranges. Reference numeral 1604 denotes an image reading unit that causes a scanner to operate so as to read a document on the basis of the reading conditions. Reference numeral 1605 denotes a reduced image generation unit that performs a reduction process on an image read from the image reading unit 1604 on the basis of the output resolution so as to generate reduced images. Reference numeral 1606 denotes an image combining unit that combines the reduced images generated by the reduced image generation unit 1605 so as to generate one combined image. Reference numeral 1607 denotes a file creation unit that creates a file of a multi-image format from the reduced images and the combined image. Reference numeral 1608 denotes a file output unit that outputs a file of a multi-image format.
Then, when part images having the same resolution as that of the part image 1805 having the lowest resolution image are generated for the entire area, a combining process shown in step S1709 is performed on the part image of the lowest resolution, thereby generating a low-resolution entire image 1806.
Here, the part image 1805 may be generated from the part image 1803, which is a higher resolution image, rather than being generated from the part image 1804. The above-described examples show that three resolution images are generated, but the present invention is not limited to this. Furthermore, in the above-described examples, the entire image is generated regarding a lowest resolution image. However, the entire image may be generated regarding another resolution, and a plurality of entire images may be generated at different resolutions.
Furthermore, when a file of a multi-image format is to be generated, the file may be created after all the necessary images are generated. However, in a case where the capacity of the RAM of the device is small, there is a case in which the image needs to be temporarily stored on an external storage medium with a slow access speed. Therefore, storage control of sequentially storing images that are no longer used in the reduction process in step S1706 or in the combining process in step S1709 in the external storage device should be performed, so that the images are sequentially output to the file. For example, output should be performed in the procedure in which immediately after the part image 1804 is generated, the image 1803 is stored in the file.
Furthermore, the total size of a document in the present embodiment is recommended to be specified by using a user interface installed in the scanner device. Alternatively, the entire surface of the document holder may be read beforehand at a low resolution in order to automatically detect the size of the document, and image processing may be performed on the obtained low-resolution image, thereby specifying the size of the document. Then, the division size may be determined in accordance with the detected size of the document. Furthermore, the obtained low-resolution image may be stored so that it is used in place of the low-resolution entire image 1806.
In the above-described first to third embodiments, a description has been given by assuming that processing is performed in the MFP 100, but the present invention is not limited to this. For example, the processing described in the first and second embodiments may be performed by a PC (Personal Computer). In this case, the high-resolution image which is the original image in the case of an MFP may be input from an external storage medium, such as a memory card in the manner described above or may be input from a hard disk possessed by the device. Furthermore, an image may be externally input via a network. In the case of the third embodiment, a high-resolution image may be input from a connected scanner device. In the case of the MFP, it is assumed that an instruction from the user is input through an operation on the operation unit. In the case of a PC, an instruction from the user may be input from an external operation device, such as a mouse or a keyboard. Furthermore, in a case where an image is to be output, it may be output to an external printing device and printed, may be output to an external display device and displayed, or may be output to a communication unit provided in the PC and transmitted via a network. Furthermore, in the present invention, processing may be performed by a portable information terminal, such as a mobile phone, in addition to a PC. For example, in a case where the processing of the third embodiment is performed by a portable information terminal, such a terminal is effective since the memory capacity thereof is smaller than the PC.
Aspects of the present invention can also be realized by a computer of a system or apparatus (or devices such as a CPU or MPU) that reads out and executes a program recorded on a memory device to perform the functions of the above-described embodiment(s), and by a method, the steps of which are performed by a computer of a system or apparatus by, for example, reading out and executing a program recorded on a memory device to perform the functions of the above-described embodiment(s). For this purpose, the program is provided to the computer for example via a network or from a recording medium of various types serving as the memory device (e.g., computer-readable medium).
While the present invention has been described with reference to exemplary embodiments, it is to be understood that the invention is not limited to the disclosed exemplary embodiments. The scope of the following claims is to be accorded the broadest interpretation so as to encompass all such modifications and equivalent structures and functions.
This application claims the benefit of Japanese Patent Application No. 2008-323643, filed Dec. 19, 2008, which is hereby incorporated by reference herein in its entirety.
Number | Date | Country | Kind |
---|---|---|---|
2008-323643 | Dec 2008 | JP | national |