The disclosure of the following priority application is herein incorporated by reference: Japanese Patent Application No. 2007-202561 filed Aug. 3, 2007
1. Field of the Invention
The present invention relates to a device, a program product, and an image processing system for inputting an image from a digital camera or the like, and a camera.
2. Description of Related Art
In Japanese Laid-Open Patent Publication 2003-173625, there is disclosed the concept of, when creating a media file that includes media data including images and sound and also meta data followed by the media data, inserting free data that is followed by the media data and is following the meta data. During file conversion, the file conversion is performed without any shifting of the media data, by overwriting the meta data and the free data with new meta data before conversion.
However, the file into which the free data is inserted is different from the original file. Accordingly, a problem occurs, if serious emphasis is to be placed upon the originality of the file even if no modification is made to the media data.
An image inputting apparatus according to the first aspect of the present invention comprises: an input unit that inputs from externally an original image file including at least an image data region in which image data is stored, and an appended information region in which appended information related to the image data is stored; a decision unit that decides whether or not falsification of the original image file is prohibited, based upon the appended information; a file modification unit that modifies the original image file to create a new image file in which the appended information region is expanded; and a store control unit that disallows the file modification unit to modify the original image file to create the new image file and stores the original image file just as it is if the decision unit has decided that falsification of the inputted original image file is prohibited, and that makes the file modification unit modify the original image file to create the new image file and stores the new image file if the decision unit has decided that falsification of the inputted original image file is not prohibited.
In the second aspect of the present invention, the image inputting apparatus according to the first aspect is preferably configured such that the decision unit decides whether or not prohibition information indicating that falsification of the original image file is prohibited is present in the original image file.
In the third and fourth aspects of the present invention, a computer-readable computer program product contains an image inputting program that causes the image inputting device to perform instructions according to the first and the second aspects of the invention.
An image processing system according to the fifth aspect of the present invention comprises: a determination unit that determines whether or not it is allowed to set prohibition information indicating that falsification of an original image file is prohibited to the original image file including at least an image data region in which image data is stored and an appended information region in which appended information related to the image data is stored; a prohibition information setting unit that, sets the prohibition information to the original image file, according to the determination by the determination unit; an input unit that inputs the original image file; a decision unit that decides whether or not the prohibition information is set to the original image file, based upon the appended information; a file modification unit that modifies the original image file to create a new image file in which the appended information region is expanded; and a store control unit that disallows the file modification unit to modify the original image file to create the new image file and stores the original image file just as it is if the decision has been made that the prohibition information is set by the decision unit, and that makes the file modification unit modify the original image file to create the new image file and stores the new image file if the decision has been made that the prohibition information is not set by the decision unit.
In the sixth aspect of the present invention, the image processing system according to the fifth aspect is preferably configured to comprise at least a camera, and the camera includes the determination unit and the prohibition information setting unit.
A camera according to the seventh aspect of the present invention comprises: an output unit that outputs to externally an image file that includes at least an image data region in which image data is stored and an appended information region in which appended information related to the image data is stored; a determination unit that determines whether or not it is allowed to set prohibition information indicating that prohibits falsification of an original image file is prohibited; and a prohibition information setting unit that sets the prohibition information to the image file, according to determination by the determination unit.
An embodiment of the present invention will now be explained with reference to
The digital camera 200 (hereinafter termed a camera) is connected to the computer 100 via the serial bus 16. The CPU 11 of the computer 100 controls the camera 200 according to software for camera control that is stored in the disk storage device 31. In concrete terms, for example, based upon commands that the user has inputted with the keyboard 21 or the mouse 22, photographic commands are transmitted to the camera 200, and image files sent from the camera 200 are processed according to requirements and stored in the storage device 31.
The display unit 54 includes a display device such as a liquid crystal monitor or the like that can display images and menu screens and so on, and a drive circuit therefor. The actuation unit 55 includes various types of actuation members such as, for example, a release button, and various switches that are operated upon actuation of those members.
This appended information is made up of character information that is described in a predetermined format, and includes data that is generally termed meta data. The appended information in an image file F includes, for example, the name of the photographer, the place of photography, copyright information, and so on. The appended information region D3 in which the appended information is described is a header region of the file, and is followed by a binary region in the image data region D1. During photography, the CPU 51 of the camera writes various items of information as appended information into this appended information region D3. The size of the appended information region D3 at this time depends upon the amount of information that is thus written thereinto. Moreover, after the image file F has been transferred from the camera 200 to an external device (for example a computer 100), appended information may also be appended into the appended information region D3 using predetermined software.
In this embodiment, when reading in an image file F from the image recording medium 57 within the camera, a predetermined size of an appended information region D3 is ensured in the image file F in advance, in order to allow for increasing the speed of processing for subsequently adding to the appended information in the image file F; In other words, a new image file in which the appended information region D3 within the image file F is expanded is created by the computer 100.
This will now be explained in concrete terms using
Upon a command for image transfer, the CPU 11 that is installed in the computer 100 executes the software for camera control, and reads the main image data that is stored in the main image data region D4 of the original image file F1, and the appended information that is stored in the appended information region D3 from the recording medium 57 of the camera into the RAM 12. If the appended information region D3 does not fill up a region of the predetermined size, the CPU 11 builds up the appended information region D3 to the predetermined size by writing, for example, the sequence of “0”s that is following the appended information in the RAM 12. In other words, the CPU 11 modifies the appended information region D3. And the CPU 11 creates a new image file F2 in which a main image data region D2 is disposed so as to following this modified appended information region D3, and stores it upon the disk storage device 31. Accordingly, this new image file F2 contains at least a main image data region D4 in which the main image data is stored, and this appended information region D3 in which the appended information is stored and that has also been increased in size.
Generally it is considered that, even if data is subsequently added to the appended information, it does not usually exceed 4 kilobytes in size. Accordingly it will be supposed that, in this embodiment, the CPU 11 ensures an appended information region D3 of 4 kilobytes in size including the data originally written therein (i.e. the data written by the camera). If the amount of information written by the camera is large, it is desirable for the region that is ensured to be increased in correspondence thereto. Furthermore, it would also be acceptable to arrange for it to be possible for the user to set the size of the appended information region that is to be ensured.
By ensuring the appended information region D3 of a size that is determined in advance in the new image file F2 as described above, when subsequently rewriting and modifying the data in the appended information region D3, as for example shown in
Next, the detection of falsification of the original image file F1 will be explained.
Data for verifying the originality of the image is stored in the data region D2 for falsification detection included in the original image file F1 (see
Since it is difficult from the point of view of computational complexity to create two different sets of input data that have the same hash value, in practice it may be considered that sets of input data for which the hash value is the same are also the same. On the other hand, since if even only a portion of the input data changes the hash value also becomes a different value, it is possible to detect whether or not falsification has been performed, by comparing together the hash values. In other words, the hash value obtained from the image file F that it is desired to verify, and the hash value with the above described digital signature appended are compared together, and if they agree with one another then it may be decided that falsification has not been performed (they are original). On the other hand, if they do not agree with one another, it may be decided that one or the other, or both, of the main image data and the appended information has been falsified.
The problem is that the above described processing by the CPU 11 of the computer 100 to create the new image file F2 is considered to falsification of the image data. The hash value of the image data after the processing to ensure the appended information region D3 has been performed is different from the hash value before processing, in other words is different from the hash value used as data for detection of falsification that is recorded in the original image file F1. Due to this, it is not possible to verify the originality of the new image file F2; for example, it becomes impossible to use this file F2 in an application that requires originality, such as, for example, as a photograph that is to be used as testimony.
In order to prevent this type of inconvenience, in this embodiment, the camera 200 is endowed with a mode that prohibits falsification of the original image file F1. In this made, an “image genuineness verification function” is provided, and the user is able to set or to cancel this function by a menu setting on the camera 200.
When the release button included in the actuation unit 55 is actuated, this program is started by the CPU 51 of the camera, and first, in a step S1 image capture is performed, and the main image data is obtained.
In a step S2, a decision is made as to whether the “image genuineness verification function” is ON or OFF. If it is ON, in a step S3 the main image data and the appended information are combined together and image data is created. In this case, the item “verifying image genuineness” included in the appended information is set to ON so as to prohibit falsification of the image data. On the other hand, if it is decided in the step S2 that the image genuineness verification function is OFF, in a step S4 the image data is created. In this case, the item “verifying image genuineness” is set to OFF so as to permit falsification of the image data.
In a step S5, a hash value of the image data created in the step S3 or S4 is created using a hash function algorithm. In a step S6 a digital signature is appended to this hash value that has been created, and a new image file F2 is created in which this hash value with digital signature appended (that is equivalent to the above described data for detection of falsification) is combined with the image data described above. It should be understood that it is arranged to append this digital signature automatically based upon signature information that the user has inputted in advance. In a step S7 this new image file F2 that has been created is recorded upon the recording medium 57, and then this processing terminates.
As described above, during the transfer to the computer 100 of the original image file F1 that has been created and recorded by the camera 200, software for camera control that has been installed upon the computer 100 is used.
Referring to
On the other hand, if the item “image genuineness verification function” is OFF, in order to enhance the convenience of appending appended information, in a step S54 an appended information region D3 of a size that is determined in advance is expanded within the original image file F1, and processing is performed to create a new image file F2. The details of this processing are as described above. Next the flow of control proceeds to the step S55, and the new image file F2 after processing is stored in the storage device 31.
And, in a step S56, a decision is made as to whether or not any original image file F1 that must be transferred is still present. If an original image file F1 to be transmitted is still present, the flow of control returns to the step S51. If no file to be transmitted is present, this processing terminates.
According to the embodiment explained above, the following beneficial operational effects are obtained.
(1) It is arranged that if the CPU 11 of the computer 100 has decided that falsification of the original image file F1 that has been inputted is permitted, the CPU 11 modifies the original image file F1 to create a new image file F2 in which an appended information region D3 followed by the main image data region D4 of the original image file F1 is expanded, and to store it in the storage device 31. Furthermore, it is arranged for the CPU 11 to analyze the appended information in the original image file F1, and to store the original image file F1 just as it is in the storage device 31 if falsification of the original image file F1 is prohibited. Accordingly, when it is desired to place great emphasis upon the originality of the inputted image, since the appended information region D3 is not expanded undesirably, the original image file F1 is prevented from being falsified.
(2) When an appended information region D3 is already present in the original image file F1 that has been inputted, it is arranged for the CPU 11 of the computer 100 to increase the size of this appended information region D3 to the predetermined size. This appended information region D3 is located at the head end of the file. Accordingly, if for example the computer 100 appends the appended information to the original image file F1 and makes the size of this appended information region D3 increased, it would be necessary to shift the binary region of the image data D1 following the appended information region D3 rearwards. In other words it would be necessary to rewrite the file. The larger is the size of the original image file F1, the longer is the time period that rewriting this file would take. In particular, a correspondingly long time period would be required for rewriting of an image file whose size is expanded due to enhancement of its image quality. However, according to this embodiment, by creating a new image file F2 in which the appended information region D3 is extended to the size that is determined in advance, when subsequently writing further data into this appended information region D3, the requirement to shift the binary region of the image data region D1 rearwards is eliminated. Accordingly, it is possible to perform processing for writing additional data in an extremely short time period.
It should be understood that the computer 100 is not limited to being a personal computer; any device that is capable of inputting an image file would be acceptable. Moreover, it would also be possible to apply the present invention to the case of inputting an image file from some device other than a camera.
The program related to the control described above could also be supplied via a recording medium such as a CD-ROM or the like, or via a data signal such as the internet or the like.
The above described embodiments are examples, and various modifications can be made without departing from the scope of the invention.
Number | Date | Country | Kind |
---|---|---|---|
2007-202561 | Aug 2007 | JP | national |