JP2006109231A - File format conversion device, file format conversion method, and program used for file format conversion device - Google Patents

File format conversion device, file format conversion method, and program used for file format conversion device Download PDF

Info

Publication number
JP2006109231A
JP2006109231A JP2004294893A JP2004294893A JP2006109231A JP 2006109231 A JP2006109231 A JP 2006109231A JP 2004294893 A JP2004294893 A JP 2004294893A JP 2004294893 A JP2004294893 A JP 2004294893A JP 2006109231 A JP2006109231 A JP 2006109231A
Authority
JP
Japan
Prior art keywords
image
exif
format conversion
jfif
file format
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2004294893A
Other languages
Japanese (ja)
Other versions
JP4401924B2 (en
Inventor
Yutaka Kobayashi
豊 小林
Daisuke Suzuki
大助 鈴木
Tomoyuki Koshio
朝行 小塩
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2004294893A priority Critical patent/JP4401924B2/en
Publication of JP2006109231A publication Critical patent/JP2006109231A/en
Application granted granted Critical
Publication of JP4401924B2 publication Critical patent/JP4401924B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide a file format conversion device, a file format conversion method, and a program used for the file format conversion device, which shorten a time necessary for converting a JFIF image, and creating an EXIF image, and at the same time, create the EXIF image to be certainly reproduced. <P>SOLUTION: The file format conversion device is provided with: a JPEG marker segment extraction part 102 which extracts a plurality of marker segments from inputted JFIF image file; a compression image data extraction part 103 which extracts compressed image data; a JPEG marker segment discrimination part 104 which discriminates whether the inputted JFIF image file is compressed again, according to a parameter stored in a plurality of the respective extracted marker segments; and an EXIF creation part 109 which again uses a plurality of the extracted marker segments, and the compressed image data when it is determined that recompression is not carried out, and creates an EXIF image file. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、ファイルフォーマットがJFIF(JPEG File Interchange Format)によって構成された画像をEXIF(Exchangeable image file format)によって構成された画像へ変換するファイルフォーマット変換装置、ファイルフォーマット変換方法、および、ファイルフォーマット変換装置に用いるプログラムに関するものである。   The present invention relates to a file format conversion apparatus, a file format conversion method, and a file format conversion for converting an image whose file format is configured by JFIF (JPEG File Interchange Format) into an image configured by EXIF (Exchangeable image file format) The present invention relates to a program used for the apparatus.

画像ファイルのフォーマットとして、JPEG(Joint Photographic Experts Group)画像としてパーソナルコンピュータで用いられることが多いJFIF(JPEG File Interchange Format)や、JPEG画像としてデジタルカメラで用いられることが多く、テレビ、ビデオなどの家電機器との相互互換を目的としたEXIF(Exchangeable image file format)などが挙げられる。JFIF画像からファイルフォーマットを変換してEXIF画像を生成する場合、一度JFIF画像を圧縮状態から展開し、EXIF画像へ再圧縮するのが一般的である。JFIF画像からEXIF画像を生成する技術は、パーソナルコンピュータや携帯端末といった、電子メールやWeb等からJFIF画像が入力される電子機器において特に要求されている。   As an image file format, JPEG (JPEG File Interchange Format), which is often used as a JPEG (Joint Photographic Experts Group) image in a personal computer, or JPEG image as a JPEG image, is often used in a digital camera. EXIF (Exchangeable image file format) for the purpose of mutual compatibility with equipment. When an EXIF image is generated by converting a file format from a JFIF image, it is general that the JFIF image is once decompressed from a compressed state and recompressed into an EXIF image. A technique for generating an EXIF image from a JFIF image is particularly required in an electronic device that inputs a JFIF image from an electronic mail, the Web, or the like, such as a personal computer or a portable terminal.

上述のファイルフォーマット変換方法によれば、ファイルフォーマット変換を実行する変換回路の回路設計が容易であるが、反面、EXIF画像への再圧縮に時間がかかり、パーソナルコンピュータなどの処理能力の高い機器ではなく、携帯電話などの処理能力の低い機器では、解像度の大きい画像をEXIF画像へ変換する際、再圧縮にかかる時間が特に問題となる。また、変換して生成したEXIF画像の画質はJFIF画像に比べて劣化してしまう。   According to the above-described file format conversion method, the circuit design of the conversion circuit for performing the file format conversion is easy. However, on the other hand, it takes time to re-compress to an EXIF image, and in a device with high processing capability such as a personal computer. On the other hand, in a device having a low processing capability such as a cellular phone, the time required for recompression is particularly a problem when converting a high-resolution image into an EXIF image. In addition, the image quality of the EXIF image generated by the conversion is deteriorated as compared with the JFIF image.

このような課題を解決するための画像ファイルのフォーマット変換装置が、特許文献1に記載されている。図7に、特許文献1の画像ファイルのフォーマット変換装置における変換画像ファイルの構成図を示す。JFIFの画像ファイル700は、APP0マーカ710と圧縮画像データ720とから構成される。一方、EXIFの画像ファイル750は、ヘッダ、タグ情報等から成るAPP1マーカ760と、圧縮画像データ720とから構成される。APP1マーカ760のタグ情報は、撮影日時や画像の大きさ、EXIFバージョン等、圧縮画像データに関する関連を有している。   An image file format conversion apparatus for solving such a problem is described in Patent Document 1. FIG. 7 shows a configuration diagram of a converted image file in the image file format conversion apparatus of Patent Document 1. The JFIF image file 700 includes an APP0 marker 710 and compressed image data 720. On the other hand, the EXIF image file 750 includes an APP1 marker 760 including a header, tag information, and the like, and compressed image data 720. The tag information of the APP1 marker 760 has a relationship with compressed image data such as the shooting date and time, the size of the image, and the EXIF version.

特許文献1の画像ファイルのフォーマット変換装置は、JFIFの画像ファイル700のAPP0マーカ710からEXIFの画像ファイル750のAPP1マーカ760のタグ情報に適用できるデータ711、712、713を抽出し、流用して、APP1マーカ760のタグ情報の生成を行なう。続いて、生成したタグ情報とヘッダとを結合し、APP1マーカ760を生成する。さらに、JFIFの画像ファイル700の圧縮画像データ720を取り込み、取り込んだ圧縮画像データ720とAPP1マーカとを結合し、EXIFの画像ファイル750を生成する。   The image file format conversion apparatus of Patent Document 1 extracts and diverts data 711, 712, and 713 applicable to the tag information of the APP1 marker 760 of the EXIF image file 750 from the APP0 marker 710 of the JFIF image file 700. The tag information of the APP1 marker 760 is generated. Subsequently, the generated tag information and the header are combined to generate an APP1 marker 760. Further, the compressed image data 720 of the JFIF image file 700 is captured, and the captured compressed image data 720 and the APP1 marker are combined to generate an EXIF image file 750.

このように特許文献1の画像ファイルのフォーマット変換装置によれば、JFIF画像からファイルフォーマットを変換してEXIF画像を生成する際、JFIF画像の圧縮画像データをそのまま取り込んでEXIF画像の画像圧縮データとして流用するため、JFIF画像からEXIF画像へのフォーマット変換に伴う画像の劣化が発生しない。   As described above, according to the image file format conversion device of Patent Document 1, when generating an EXIF image by converting a file format from a JFIF image, the compressed image data of the JFIF image is directly taken in as compressed image data of the EXIF image. Since this is used, there is no image degradation associated with format conversion from a JFIF image to an EXIF image.

特開2002−218402号公報JP 2002-218402 A

しかしながら、特許文献1の画像ファイルのフォーマット変換装置は、JFIF画像中に含まれる、APP0を除く複数のマーカセグメントに格納されたパラメータを考慮していないため、JFIF画像によっては、JFIF画像の圧縮画像データをそのままEXIF画像の圧縮画像データとして流用すると、正しくEXIF画像を生成することができず、生成したEXIF画像が正しく再生されない場合がある。   However, the image file format conversion apparatus disclosed in Patent Document 1 does not consider parameters stored in a plurality of marker segments other than APP0 included in the JFIF image, so depending on the JFIF image, a compressed image of the JFIF image may be used. If the data is directly used as compressed image data of an EXIF image, the EXIF image cannot be correctly generated, and the generated EXIF image may not be reproduced correctly.

本発明は、上記事情に鑑みてなされたもので、JFIF画像を変換してEXIF画像を生成するために要する時間を短縮しつつ、確実に再生されるEXIF画像を生成することができるファイルフォーマット変換装置、ファイルフォーマット変換方法、および、ファイルフォーマット変換装置に用いるプログラムを提供することを目的とする。   The present invention has been made in view of the above circumstances, and is a file format conversion capable of generating an EXIF image that is reliably reproduced while reducing the time required to generate an EXIF image by converting a JFIF image. An object is to provide a device, a file format conversion method, and a program used for the file format conversion device.

本発明のファイルフォーマット変換装置は、複数のマーカセグメントと、圧縮画像データとを含むJFIFの画像ファイルを、EXIFの画像ファイルに変換するファイルフォーマット変換装置であって、前記JFIFの画像ファイルを入力する入力手段と、前記入力したJFIFの画像ファイルから、前記複数のマーカセグメントと、前記圧縮画像データを抽出する抽出手段と、前記抽出した複数のマーカセグメント各々に格納されたパラメータに基づいて、前記入力したJFIFの画像ファイルを再圧縮するか否かを判定する判定手段と、再圧縮すると判定した場合、圧縮状態から展開した画像データを再圧縮して、EXIFの画像ファイルを生成し、再圧縮しないと判定した場合、前記抽出した複数のマーカセグメントと、前記抽出した圧縮画像データとを流用して、EXIFの画像ファイルを生成する生成手段と、前記生成したEXIFの画像ファイルを出力する出力手段と、を備えるものである。   The file format conversion apparatus of the present invention is a file format conversion apparatus that converts a JFIF image file including a plurality of marker segments and compressed image data into an EXIF image file, and inputs the JFIF image file. Based on input means, extraction means for extracting the plurality of marker segments and the compressed image data from the input JFIF image file, and parameters stored in each of the extracted marker segments, the input Determining means for determining whether or not to re-compress the JFIF image file, and if it is determined to re-compress, re-compress the image data expanded from the compressed state to generate an EXIF image file and do not re-compress The plurality of extracted marker segments and the extracted marker segments. By diverting the compressed image data, and comprises a generating means for generating an image file of the EXIF, and output means for outputting the image file of the EXIF that the generated, a.

本発明のファイルフォーマット変換方法は、複数のマーカセグメントと、圧縮画像データとを含むJFIFの画像ファイルを、EXIFの画像ファイルに変換するファイルフォーマット変換方法であって、前記JFIFの画像ファイルを入力する入力ステップと、
前記入力したJFIFの画像ファイルから、前記複数のマーカセグメントと、前記圧縮画像データを抽出する抽出ステップと、前記抽出した複数のマーカセグメント各々に格納されたパラメータに基づいて、前記入力したJFIFの画像ファイルを再圧縮するか否かを判定する判定ステップと、再圧縮すると判定した場合、圧縮状態から展開した画像データを再圧縮して、EXIFの画像ファイルを生成し、再圧縮しないと判定した場合、前記抽出した複数のマーカセグメントと、前記抽出した圧縮画像データとを流用して、EXIFの画像ファイルを生成する生成ステップと、前記生成したEXIFの画像ファイルを出力する出力ステップと、を備えるものである。
The file format conversion method of the present invention is a file format conversion method for converting a JFIF image file including a plurality of marker segments and compressed image data into an EXIF image file, and inputs the JFIF image file. An input step;
The input JFIF image is extracted based on an extraction step of extracting the plurality of marker segments and the compressed image data from the input JFIF image file, and parameters stored in each of the extracted marker segments. When determining whether to re-compress the file, and when determining to re-compress, when re-compressing the image data expanded from the compressed state to generate an EXIF image file and determining not to re-compress A generating step for generating an EXIF image file by diverting the extracted marker segments and the extracted compressed image data; and an output step for outputting the generated EXIF image file. It is.

本発明のファイルフォーマット変換装置に用いるプログラムは、コンピュータに、本発明のファイルフォーマット変換方法の各ステップを実行させるものである。   The program used in the file format conversion apparatus of the present invention causes a computer to execute each step of the file format conversion method of the present invention.

この構成によれば、JFIF画像を変換してEXIF画像を生成するために要する時間を短縮しつつ、確実に再生されるEXIF画像を生成することができる。   According to this configuration, it is possible to generate an EXIF image that is reliably reproduced while reducing the time required to convert the JFIF image to generate an EXIF image.

また、本発明のファイルフォーマット変換装置は、前記複数のマーカセグメントの中のDQTまたはDHTのマーカセグメントが複数存在する場合、前記複数存在するDQTまたはDHTのマーカセグメントをそれぞれ1つに合成するマーカセグメント合成手段を備えるものを含む。   The file format conversion apparatus according to the present invention, when there are a plurality of DQT or DHT marker segments in the plurality of marker segments, combines the plurality of DQT or DHT marker segments into one each. Including those equipped with synthesis means.

また、本発明のファイルフォーマット変換方法は、前記抽出ステップで前記複数のマーカセグメントを抽出した後、前記複数のマーカセグメントの中のDQTまたはDHTのマーカセグメントが複数存在する場合、前記複数存在するDQTまたはDHTのマーカセグメントをそれぞれ1つに合成するマーカセグメント合成ステップを有するものを含む。   In the file format conversion method of the present invention, when the plurality of marker segments are extracted in the extraction step and there are a plurality of DQT or DHT marker segments in the plurality of marker segments, the plurality of DQTs present Or it includes what has a marker segment synthesis | combination step which synthesize | combines each marker segment of DHT into one.

この構成によれば、JFIF画像の複数のマーカセグメント中に、あるマーカセグメントが複数存在していても、そのマーカセグメントが1つ存在する場合と同様に、JFIF画像をEXIF画像に変換することができる。   According to this configuration, even when there are a plurality of marker segments in a plurality of marker segments of a JFIF image, the JFIF image can be converted into an EXIF image as in the case where one marker segment exists. it can.

本発明のファイルフォーマット変換装置、ファイルフォーマット変換方法、および、ファイルフォーマット変換装置に用いるプログラムによれば、JFIF画像を変換してEXIF画像を生成するために要する時間を短縮しつつ、確実に再生されるEXIF画像を生成することができる。   According to the file format conversion apparatus, the file format conversion method, and the program used for the file format conversion apparatus of the present invention, the time required for converting the JFIF image and generating the EXIF image can be reliably reproduced. EXIF images can be generated.

以下、本発明の実施の形態のファイルフォーマット変換装置について、図面を参照して詳細に説明する。図1に、本発明の実施の形態のファイルフォーマット変換装置の構成図を、図2に、JFIF画像のフォーマット構成図(a)およびEXIF画像のフォーマット構成図(b)を示す。   Hereinafter, a file format conversion apparatus according to an embodiment of the present invention will be described in detail with reference to the drawings. FIG. 1 shows a configuration diagram of a file format conversion apparatus according to an embodiment of the present invention, and FIG. 2 shows a format configuration diagram (a) of a JFIF image and a format configuration diagram (b) of an EXIF image.

ファイルフォーマット変換装置の画像ファイル入力部101に、図2(a)に示す、圧縮画像データについての関連情報を有するAPP0と、量子化テーブルについての情報を有するDQTと、ハフマンテーブルについての情報を有するDHTと、リスタートインターバルについての情報を有するDRIと、フレームヘッダについての情報を有するSOFと、スキャンヘッダについての情報を有するSOSと、圧縮画像データと、から構成されるフォーマット構成のJFIF画像を入力すると、JPEGマーカセグメント抽出手段102は、入力したJFIF画像から、APP0を除く各マーカセグメントDQT、DHT、DRI、SOFおよびSOSに格納されたパラメータを抽出し、圧縮画像データ抽出部103は、入力したJFIF画像から圧縮画像データを抽出する。   The image file input unit 101 of the file format conversion apparatus has information about APP0 having related information about compressed image data, DQT having information about a quantization table, and Huffman table, as shown in FIG. Inputs a JFIF image having a format composed of DHT, DRI having information about a restart interval, SOF having information about a frame header, SOS having information about a scan header, and compressed image data Then, the JPEG marker segment extraction unit 102 extracts parameters stored in the marker segments DQT, DHT, DRI, SOF, and SOS except APP0 from the input JFIF image, and the compressed image data extraction unit 103 inputs the parameters. JFIF It extracts the compressed image data from.

JFIF画像のマーカセグメントのうちのDQTまたはDHTは、複数のマーカセグメントにより構成される場合がある(図3における、DQT(Option1)またはDHT(Option1)に該当)。このDQT(Option1)またはDHT(Option1)のマーカセグメント数は、ファイルフォーマット変換装置へJFIF画像を入力する前のJFIF画像生成時に、任意に設定される。JPEGマーカセグメント抽出手段102は、DQTまたはDHTが複数のマーカセグメントにより構成される場合、複数のマーカセグメントDQTまたは複数のマーカセグメントDHTそれぞれに格納されたパラメータを抽出する。また、JFIF画像のマーカセグメントのうちのDRI(Option2)は、JFIF画像によっては存在しない場合がある。このDRI(Option2)の有無は、ファイルフォーマット変換装置へJFIF画像を入力する前のJFIF画像生成時に、設定される。JPEGマーカセグメント抽出手段102は、DRIが存在すれば、DRIに格納されたパラメータを抽出する。   Of the marker segments of the JFIF image, DQT or DHT may be composed of a plurality of marker segments (corresponding to DQT (Option 1) or DHT (Option 1) in FIG. 3). The number of marker segments of DQT (Option 1) or DHT (Option 1) is arbitrarily set when generating a JFIF image before inputting the JFIF image to the file format conversion device. When the DQT or DHT is composed of a plurality of marker segments, the JPEG marker segment extraction unit 102 extracts parameters stored in the plurality of marker segments DQT or the plurality of marker segments DHT, respectively. Further, the DRI (Option 2) in the marker segment of the JFIF image may not exist depending on the JFIF image. The presence / absence of this DRI (Option 2) is set when a JFIF image is generated before the JFIF image is input to the file format conversion apparatus. If there is a DRI, the JPEG marker segment extraction unit 102 extracts a parameter stored in the DRI.

JPEGマーカセグメント判定部104は、JPEGマーカセグメント抽出部102が抽出した各マーカセグメントのパラメータに基づいて、画像ファイル入力部101に入力したJFIFの画像ファイルを再圧縮するか再圧縮しないかを判定する。このときの非再圧縮となる判定条件を、表1に示す。   The JPEG marker segment determination unit 104 determines whether to recompress or not recompress the JFIF image file input to the image file input unit 101 based on the parameter of each marker segment extracted by the JPEG marker segment extraction unit 102. . Table 1 shows determination conditions for non-recompression at this time.

Figure 2006109231
Figure 2006109231

JPEGマーカセグメント判定部104は、JFIF画像の各マーカセグメントのパラメータ毎に表1に示す判定条件に基づいて判定を行い、各マーカセグメントのパラメータの全てが非再圧縮条件を満たした場合に、画像ファイル入力部101に入力したJFIFの画像ファイルを再圧縮しないと判定する。   The JPEG marker segment determination unit 104 performs determination based on the determination conditions shown in Table 1 for each marker segment parameter of the JFIF image, and when all the parameters of each marker segment satisfy the non-recompression condition, It is determined that the JFIF image file input to the file input unit 101 is not recompressed.

APP1生成部108は、JFIF画像の圧縮画像データに関わるタグ情報、サムネイルおよびヘッダから構成される情報を基に、APP1を生成する。   The APP1 generation unit 108 generates APP1 based on the tag information related to the compressed image data of the JFIF image, information including the thumbnail, and the header.

DQTマーカセグメント合成手段106は、DQTが複数のマーカセグメントにより構成される場合、JPEGマーカセグメント判定部104から入力した複数のマーカセグメントのDQTを合成して1つのDQTのパラメータを生成する。また、DHTマーカセグメント合成手段107は、DHTが複数のマーカセグメントにより構成される場合、JPEGマーカセグメント判定部104から入力した複数のマーカセグメントのDHTを合成して1つのDHTのパラメータを生成する。   When the DQT is composed of a plurality of marker segments, the DQT marker segment combining unit 106 generates a single DQT parameter by combining the DQTs of the plurality of marker segments input from the JPEG marker segment determination unit 104. In addition, when the DHT is composed of a plurality of marker segments, the DHT marker segment synthesizing unit 107 synthesizes the DHT of the plurality of marker segments input from the JPEG marker segment determination unit 104 to generate one DHT parameter.

EXIF生成部109は、JPEGマーカセグメント判定部104が再圧縮しないと判定した場合で、DQTおよびDHTが1つのマーカセグメントで構成されていれば、JPEGマーカセグメント判定部104から入力した、JFIF画像のAPP0を除く各マーカセグメントのパラメータと、圧縮画像データ抽出部103から入力した圧縮画像データとを、図3に示す再圧縮しない場合のJFIF画像とEXIF画像とのフォーマット対応関係に従って流用し、さらにAPP1生成部108が生成したAPP1のパラメータを合成して、EXIF画像を生成する。EXIF生成部109は、JFIF画像にDRIが存在すれば、JFIF画像のDRIをEXIF画像のDRIに流用するが、JFIF画像にDRIが存在しなければ、EXIF画像にDRIを生成しない。   The EXIF generation unit 109 determines that the JPEG marker segment determination unit 104 determines not to recompress, and if the DQT and DHT are configured by one marker segment, the EXIF generation unit 109 inputs the JFIF image input from the JPEG marker segment determination unit 104. The parameters of each marker segment excluding APP0 and the compressed image data input from the compressed image data extraction unit 103 are diverted according to the format correspondence relationship between the JFIF image and the EXIF image without recompression shown in FIG. The APP1 parameters generated by the generation unit 108 are combined to generate an EXIF image. The EXIF generation unit 109 diverts the DRI of the JFIF image to the DRI of the EXIF image if the DRI exists in the JFIF image, but does not generate the DRI in the EXIF image if the DRI does not exist in the JFIF image.

また、EXIF生成部109は、JPEGマーカセグメント判定部104が再圧縮しないと判定した場合で、DQTまたはDHTが複数のマーカセグメントで構成されていれば、JPEGマーカセグメント判定部104から入力したJFIF画像のマーカセグメントのうちのDRI、SOFおよびSOSのパラメータ、JPEGマーカセグメント判定部104またはDQTマーカセグメント合成手段106から入力したDQTのパラメータ、JPEGマーカセグメント判定部104またはDHTマーカセグメント合成手段107から入力したDHTのパラメータと、圧縮画像データ抽出部103から入力した圧縮画像データとを流用し、さらにAPP1生成部108が生成したAPP1を合成して、EXIF画像を生成する。EXIF生成部109は、JFIF画像にDRIが存在すれば、JFIF画像のDRIをEXIF画像のDRIに流用するが、JFIF画像にDRIが存在しなければ、EXIF画像にDRIを生成しない。   If the JPEG marker segment determination unit 104 determines that the JPEG marker segment determination unit 104 does not recompress and the DQT or DHT is composed of a plurality of marker segments, the EXIF generation unit 109 inputs the JFIF image input from the JPEG marker segment determination unit 104 DRI, SOF, and SOS parameters among the marker segments, DQT parameters input from the JPEG marker segment determination unit 104 or DQT marker segment synthesis unit 106, and input from the JPEG marker segment determination unit 104 or DHT marker segment synthesis unit 107 The DHT parameters and the compressed image data input from the compressed image data extraction unit 103 are used, and the APP1 generated by the APP1 generation unit 108 is combined to generate an EXIF image. The EXIF generation unit 109 diverts the DRI of the JFIF image to the DRI of the EXIF image if the DRI exists in the JFIF image, but does not generate the DRI in the EXIF image if the DRI does not exist in the JFIF image.

図4に、再圧縮する場合のJFIF画像とEXIF画像とのフォーマット対応関係を示す。JPEGマーカセグメント判定部104が再圧縮すると判定した場合、JPEG再圧縮部105は、圧縮画像データ抽出部103から入力した圧縮画像データとJPEGマーカセグメント判定部104から入力したマーカセグメントとを用いて圧縮画像を展開し、JPEGマーカセグメント判定部104における非再圧縮条件を満たしたパラメータを持つ各マーカセグメントを用いて前記展開画像データを圧縮し、EXIF生成部109に出力する。EXIF生成部109は、APP1生成部108から入力したAPP1を合成して、EXIF画像を生成する。   FIG. 4 shows the format correspondence between the JFIF image and the EXIF image when recompressing. When the JPEG marker segment determination unit 104 determines to recompress, the JPEG recompression unit 105 performs compression using the compressed image data input from the compressed image data extraction unit 103 and the marker segment input from the JPEG marker segment determination unit 104. The image is expanded, the expanded image data is compressed using each marker segment having parameters satisfying the non-recompressing condition in the JPEG marker segment determination unit 104, and output to the EXIF generation unit 109. The EXIF generation unit 109 combines the APP1 input from the APP1 generation unit 108 to generate an EXIF image.

画像ファイル出力部110は、EXIF生成部109が生成したEXIF画像を外部に出力する。   The image file output unit 110 outputs the EXIF image generated by the EXIF generation unit 109 to the outside.

図5に、本発明の実施の形態のファイルフォーマット変換装置における、非再圧縮・再圧縮判定時の処理フローを示す。ファイルフォーマット変換装置の画像ファイル入力部101にJFIF画像を入力すると、JPEGマーカセグメント抽出部102は、入力したJFIF画像から、APP0を除く各マーカセグメントに格納されたパラメータを抽出する(S501)。JPEGマーカセグメント判定部104は、JFIF画像のAPP0を除くマーカセグメント、DQT、DHT、DRI、SOFおよびSOSのパラメータ毎に、表1に示す判定条件に基づいて判定を行い(S502からS506)、各マーカセグメントのパラメータの全てが非再圧縮条件を満たすと判定した場合(S502からS506、全てYES)に、画像ファイル入力部101に入力したJFIFの画像ファイルを再圧縮せずにEXIF画像を生成する処理に移行する(S507)。JPEGマーカセグメント判定部104は、一方、JFIF画像のマーカセグメント、DQT、DHT、DRI、SOFおよびSOSのうちの1つでも非再圧縮条件を満たさないと判定した場合(S502からS506、いずれかでNO)、画像ファイル入力部101に入力したJFIFの画像ファイルを再圧縮してEXIF画像を生成する処理に移行する(S508)。   FIG. 5 shows a processing flow at the time of non-recompression / recompression determination in the file format conversion apparatus according to the embodiment of the present invention. When a JFIF image is input to the image file input unit 101 of the file format conversion apparatus, the JPEG marker segment extraction unit 102 extracts parameters stored in each marker segment excluding APP0 from the input JFIF image (S501). The JPEG marker segment determination unit 104 performs determination based on the determination conditions shown in Table 1 for each of the marker segment excluding APP0 of the JFIF image, DQT, DHT, DRI, SOF, and SOS (S502 to S506). When it is determined that all the marker segment parameters satisfy the non-recompression condition (S502 to S506, all YES), an EXIF image is generated without recompressing the JFIF image file input to the image file input unit 101. The process proceeds to processing (S507). On the other hand, when the JPEG marker segment determination unit 104 determines that any one of the marker segments of the JFIF image, DQT, DHT, DRI, SOF, and SOS does not satisfy the non-recompression condition (S502 to S506, either NO), the process proceeds to a process of generating an EXIF image by recompressing the JFIF image file input to the image file input unit 101 (S508).

図6に、本発明の実施の形態のファイルフォーマット変換装置における、EXIF画像生成時の処理フローを示す。図6(a)は、図5のステップ507における、再圧縮せずにEXIF画像を生成する処理フローを、図6(b)は、図5のステップ508における、再圧縮してEXIF画像を生成する処理フローを、それぞれ示す。   FIG. 6 shows a processing flow when generating an EXIF image in the file format conversion apparatus according to the embodiment of the present invention. 6A shows a processing flow for generating an EXIF image without recompression in step 507 of FIG. 5, and FIG. 6B shows an EXIF image generated by recompression in step 508 of FIG. The processing flow to be performed is shown respectively.

図6(a)における、再圧縮せずにEXIF画像を生成する場合、EXIF画像の生成を開始すると、JPEGマーカセグメント判定部104は、JFIF画像のマーカセグメントDQTが複数のマーカセグメントに格納されていないかを判別し(S601)、複数のマーカセグメントに格納されていれば(S601、YES)、複数のマーカセグメントに格納されたDQTのパラメータをDQTマーカセグメント合成部106に入力する。DQTマーカセグメント合成部106は、複数のマーカセグメントに格納されたDQTのパラメータを1つのDQTのパラメータに合成して(S602)、EXIF生成部109に出力する。また、JPEGマーカセグメント判定部104は、JFIF画像のマーカセグメントDHTが複数のマーカセグメントに格納されていないかを判別し(S603)、複数のマーカセグメントに格納されていれば(S603、YES)、複数のマーカセグメントに格納されたDHTのパラメータをDHTマーカセグメント合成部107に入力する。DHTマーカセグメント合成部107は、複数のマーカセグメントに格納されたDHTのパラメータを1つのDHTのパラメータに合成して(S604)、EXIF生成部109に出力する。JPEGマーカセグメント判定部104は、JFIF画像のマーカセグメントDQTまたはDHTが1つのマーカセグメントに格納されていれば(S601またはS603、NO)、DQTのパラメータまたはDHTのパラメータをそのままEXIF生成部109に出力する。   In the case of generating an EXIF image without recompression in FIG. 6A, when the generation of the EXIF image is started, the JPEG marker segment determination unit 104 stores the marker segment DQT of the JFIF image in a plurality of marker segments. If it is stored in a plurality of marker segments (S601, YES), the DQT parameters stored in the plurality of marker segments are input to the DQT marker segment combining unit 106. The DQT marker segment synthesizing unit 106 synthesizes the DQT parameters stored in the plurality of marker segments into one DQT parameter (S602), and outputs it to the EXIF generating unit 109. Further, the JPEG marker segment determination unit 104 determines whether or not the marker segment DHT of the JFIF image is stored in a plurality of marker segments (S603), and if stored in the plurality of marker segments (S603, YES), The DHT parameters stored in the plurality of marker segments are input to the DHT marker segment combining unit 107. The DHT marker segment synthesizer 107 synthesizes the DHT parameters stored in the plurality of marker segments into one DHT parameter (S604), and outputs it to the EXIF generator 109. If the marker segment DQT or DHT of the JFIF image is stored in one marker segment (S601 or S603, NO), the JPEG marker segment determination unit 104 outputs the DQT parameter or the DHT parameter as it is to the EXIF generation unit 109. To do.

圧縮画像データ抽出部103は、JFIF画像から抽出した圧縮画像データをEXIF生成部109に出力し(S605)、APP1生成部108は、生成したAPP1パラメータをEXIF生成部109に出力する(S606)。   The compressed image data extraction unit 103 outputs the compressed image data extracted from the JFIF image to the EXIF generation unit 109 (S605), and the APP1 generation unit 108 outputs the generated APP1 parameter to the EXIF generation unit 109 (S606).

EXIF生成部109は、JPEGマーカセグメント判定部104から入力したDRI、SOFおよびSOSパラメータ、JPEGマーカセグメント判定部104またはDQTマーカセグメント合成手段106から入力したDQTパラメータ、JPEGマーカセグメント判定部104またはDHTマーカセグメント合成手段107から入力したDHTパラメータ、圧縮画像データ抽出部103から入力した圧縮画像データ、および、APP1生成部108から入力したAPP1パラメータを、合成しEXIF画像を生成することになる(S607)。   The EXIF generation unit 109 includes the DRI, SOF, and SOS parameters input from the JPEG marker segment determination unit 104, the DQT parameter input from the JPEG marker segment determination unit 104 or the DQT marker segment synthesis unit 106, the JPEG marker segment determination unit 104, or the DHT marker. The DHT parameter input from the segment combining means 107, the compressed image data input from the compressed image data extraction unit 103, and the APP1 parameter input from the APP1 generation unit 108 are combined to generate an EXIF image (S607).

次に、図6(b)における、再圧縮してEXIF画像を生成する場合、EXIF画像の生成を開始すると、JPEGマーカセグメント判定部104はAPP0を除く各マーカセグメントに格納されたパラメータを、圧縮画像データ抽出部103はJFIF画像の圧縮画像データを、JPEG再圧縮手段105にそれぞれ出力する。JPEG再圧縮手段105は、入力した圧縮画像データとJPEGマーカセグメント判定部104から入力したマーカセグメントとを用いて圧縮画像を展開し、JPEGマーカセグメント判定部104における非再圧縮条件を満たしたパラメータを持つ各マーカセグメントを用いて前記展開画像データを圧縮し、EXIF生成部109に出力する(S651)。APP1生成部108は、生成したAPP1パラメータをEXIF生成部109に出力する(S652)。   Next, in the case of generating an EXIF image by recompressing in FIG. 6B, when the generation of the EXIF image is started, the JPEG marker segment determination unit 104 compresses the parameters stored in each marker segment except APP0. The image data extraction unit 103 outputs the compressed image data of the JFIF image to the JPEG recompression unit 105, respectively. The JPEG recompression unit 105 expands a compressed image using the input compressed image data and the marker segment input from the JPEG marker segment determination unit 104, and sets parameters satisfying the non-recompression condition in the JPEG marker segment determination unit 104. The developed image data is compressed using each marker segment, and is output to the EXIF generation unit 109 (S651). The APP1 generation unit 108 outputs the generated APP1 parameter to the EXIF generation unit 109 (S652).

EXIF生成部109は、JPEG再圧縮部105から入力した再圧縮データおよびAPP1生成部108から入力したAPP1パラメータを合成し、EXIF画像を生成することになる(S653)。   The EXIF generation unit 109 combines the recompressed data input from the JPEG recompression unit 105 and the APP1 parameter input from the APP1 generation unit 108 to generate an EXIF image (S653).

以上、本発明の実施の形態のファイルフォーマット変換装置によれば、JFIF画像を変換してEXIF画像を生成するために要する時間を短縮しつつ、確実に再生されるEXIF画像を生成することができる。   As described above, according to the file format conversion apparatus of the embodiment of the present invention, it is possible to generate an EXIF image that is reliably reproduced while reducing the time required to convert the JFIF image to generate the EXIF image. .

本発明のファイルフォーマット変換装置、ファイルフォーマット変換方法、および、ファイルフォーマット変換装置に用いるプログラムは、JFIF画像を変換してEXIF画像を生成するために要する時間を短縮しつつ、確実に再生されるEXIF画像を生成することができるという効果を奏し、ファイルフォーマットがJFIFによって構成された画像をEXIFによって構成された画像へ変換する分野において有用である。   The file format conversion apparatus, the file format conversion method, and the program used in the file format conversion apparatus according to the present invention can be reliably reproduced while reducing the time required to convert the JFIF image and generate the EXIF image. This produces an effect that an image can be generated, and is useful in the field of converting an image whose file format is configured by JFIF into an image configured by EXIF.

本発明の実施の形態のファイルフォーマット変換装置の構成図Configuration diagram of a file format conversion apparatus according to an embodiment of the present invention JFIF画像のフォーマット構成図(a)およびEXIF画像のフォーマット構成図(b)Format configuration diagram of JFIF image (a) and format configuration diagram of EXIF image (b) 再圧縮しない場合のJFIF画像とEXIF画像とのフォーマット対応関係Format correspondence between JFIF images and EXIF images without recompression 再圧縮する場合のJFIF画像とEXIF画像とのフォーマット対応関係Format correspondence between JFIF images and EXIF images when recompressing 本発明の実施の形態のファイルフォーマット変換装置における、非再圧縮・再圧縮判定時の処理フローProcessing flow at the time of non-recompression / recompression determination in the file format conversion apparatus according to the embodiment of the present invention 本発明の実施の形態のファイルフォーマット変換装置における、再圧縮せずにEXIF画像を生成する場合の処理フロー(a)および再圧縮してEXIF画像を生成する場合の処理フロー(b)In the file format conversion apparatus according to the embodiment of the present invention, a processing flow (a) when generating an EXIF image without recompression and a processing flow (b) when generating an EXIF image by recompression 特許文献1の画像ファイルのフォーマット変換装置における変換画像ファイルの構成図Configuration diagram of converted image file in image file format conversion apparatus of Patent Document 1

符号の説明Explanation of symbols

101 画像ファイル入力部
102 JPEGマーカセグメント抽出部
103 圧縮画像データ抽出部
104 JPEGマーカセグメント判定部
105 JPEG再圧縮部
106 DQTマーカセグメント合成部
107 DHTマーカセグメント合成部
108 APP1生成部
109 EXIF生成部
110 画像ファイル出力部
DESCRIPTION OF SYMBOLS 101 Image file input part 102 JPEG marker segment extraction part 103 Compressed image data extraction part 104 JPEG marker segment determination part 105 JPEG recompression part 106 DQT marker segment composition part 107 DHT marker segment composition part 108 APP1 generation part 109 EXIF generation part 110 Image File output section

Claims (5)

複数のマーカセグメントと、圧縮画像データとを含むJFIFの画像ファイルを、EXIFの画像ファイルに変換するファイルフォーマット変換装置であって、
前記JFIFの画像ファイルを入力する入力手段と、
前記入力したJFIFの画像ファイルから、前記複数のマーカセグメントと、前記圧縮画像データを抽出する抽出手段と、
前記抽出した複数のマーカセグメント各々に格納されたパラメータに基づいて、前記入力したJFIFの画像ファイルを再圧縮するか否かを判定する判定手段と、
再圧縮すると判定した場合、圧縮状態から展開した画像データを再圧縮して、EXIFの画像ファイルを生成し、再圧縮しないと判定した場合、前記抽出した複数のマーカセグメントと、前記抽出した圧縮画像データとを流用して、EXIFの画像ファイルを生成する生成手段と、
前記生成したEXIFの画像ファイルを出力する出力手段と、
を備えるファイルフォーマット変換装置。
A file format conversion device for converting a JFIF image file including a plurality of marker segments and compressed image data into an EXIF image file,
An input means for inputting the JFIF image file;
Extraction means for extracting the plurality of marker segments and the compressed image data from the input JFIF image file;
Determining means for determining whether or not to recompress the input JFIF image file based on parameters stored in each of the extracted marker segments;
If it is determined to recompress, the image data expanded from the compressed state is recompressed to generate an EXIF image file. If it is determined not to recompress, the extracted marker segments and the extracted compressed image Generating means for generating an EXIF image file by diverting data;
An output means for outputting the generated EXIF image file;
A file format conversion device comprising:
請求項1記載のファイルフォーマット変換装置であって、
前記複数のマーカセグメントの中のDQTまたはDHTのマーカセグメントが複数存在する場合、前記複数存在するDQTまたはDHTのマーカセグメントをそれぞれ1つに合成するマーカセグメント合成手段を備えるファイルフォーマット変換装置。
The file format conversion device according to claim 1,
A file format conversion device comprising marker segment synthesizing means for synthesizing each of the plurality of DQT or DHT marker segments into one when there are a plurality of DQT or DHT marker segments in the plurality of marker segments.
複数のマーカセグメントと、圧縮画像データとを含むJFIFの画像ファイルを、EXIFの画像ファイルに変換するファイルフォーマット変換方法であって、
前記JFIFの画像ファイルを入力する入力ステップと、
前記入力したJFIFの画像ファイルから、前記複数のマーカセグメントと、前記圧縮画像データを抽出する抽出ステップと、
前記抽出した複数のマーカセグメント各々に格納されたパラメータに基づいて、前記入力したJFIFの画像ファイルを再圧縮するか否かを判定する判定ステップと、
再圧縮すると判定した場合、圧縮状態から展開した画像データを再圧縮して、EXIFの画像ファイルを生成し、再圧縮しないと判定した場合、前記抽出した複数のマーカセグメントと、前記抽出した圧縮画像データとを流用して、EXIFの画像ファイルを生成する生成ステップと、
前記生成したEXIFの画像ファイルを出力する出力ステップと、
を備えるファイルフォーマット変換方法。
A file format conversion method for converting a JFIF image file including a plurality of marker segments and compressed image data into an EXIF image file,
An input step of inputting the JFIF image file;
An extraction step of extracting the plurality of marker segments and the compressed image data from the input JFIF image file;
A determination step of determining whether to re-compress the input JFIF image file based on parameters stored in each of the extracted marker segments;
If it is determined to recompress, the image data expanded from the compressed state is recompressed to generate an EXIF image file. If it is determined not to recompress, the extracted marker segments and the extracted compressed image A generation step of generating an EXIF image file by using the data,
An output step of outputting the generated EXIF image file;
A file format conversion method comprising:
請求項3記載のファイルフォーマット変換方法であって、
前記抽出ステップで前記複数のマーカセグメントを抽出した後、前記複数のマーカセグメントの中のDQTまたはDHTのマーカセグメントが複数存在する場合、前記複数存在するDQTまたはDHTのマーカセグメントをそれぞれ1つに合成するマーカセグメント合成ステップを有するファイルフォーマット変換方法。
The file format conversion method according to claim 3, wherein
After extracting the plurality of marker segments in the extraction step, if there are a plurality of DQT or DHT marker segments in the plurality of marker segments, the plurality of DQT or DHT marker segments are combined into one each. A file format conversion method comprising a marker segment synthesis step.
コンピュータに、請求項3または4記載の各ステップを実行させるためのプログラム。   The program for making a computer perform each step of Claim 3 or 4.
JP2004294893A 2004-10-07 2004-10-07 File format conversion device, file format conversion method, and program used for file format conversion device Expired - Fee Related JP4401924B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004294893A JP4401924B2 (en) 2004-10-07 2004-10-07 File format conversion device, file format conversion method, and program used for file format conversion device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004294893A JP4401924B2 (en) 2004-10-07 2004-10-07 File format conversion device, file format conversion method, and program used for file format conversion device

Publications (2)

Publication Number Publication Date
JP2006109231A true JP2006109231A (en) 2006-04-20
JP4401924B2 JP4401924B2 (en) 2010-01-20

Family

ID=36378410

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004294893A Expired - Fee Related JP4401924B2 (en) 2004-10-07 2004-10-07 File format conversion device, file format conversion method, and program used for file format conversion device

Country Status (1)

Country Link
JP (1) JP4401924B2 (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010537493A (en) * 2007-08-16 2010-12-02 イーストマン コダック カンパニー Storage and presentation of auxiliary information obtained from scanned prints
WO2023102934A1 (en) * 2021-12-10 2023-06-15 深圳传音控股股份有限公司 Data processing method, intelligent terminal and storage medium

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2010537493A (en) * 2007-08-16 2010-12-02 イーストマン コダック カンパニー Storage and presentation of auxiliary information obtained from scanned prints
WO2023102934A1 (en) * 2021-12-10 2023-06-15 深圳传音控股股份有限公司 Data processing method, intelligent terminal and storage medium

Also Published As

Publication number Publication date
JP4401924B2 (en) 2010-01-20

Similar Documents

Publication Publication Date Title
JP4156631B2 (en) Image processing method and image processing apparatus
JP2004222253A (en) Electronic camera provided with electronic watermark function, and image processing program
JP2005341136A (en) Image processing apparatus
JP5605608B2 (en) Transmission apparatus and method, and program
JP4401924B2 (en) File format conversion device, file format conversion method, and program used for file format conversion device
JP2007006120A (en) Image reader, image processing method thereof, image forming apparatus, image processing system, and image processing method thereof
JP2006203270A (en) Image compression method and device
JP2001332976A (en) Device and method for processing image
JP5842357B2 (en) Image processing apparatus and image processing program
JP2006086649A (en) Equipment and method for image coding
JP2006050172A (en) Digital imaging apparatus
KR100826943B1 (en) Method and apparatus for processing jpeg image, and record media recored program for realizing the same
JP4601340B2 (en) Data synthesizing apparatus and data synthesizing method
JP4166399B2 (en) Data format converter
JP2007049245A (en) Photography instrument with voice input function
JPH09116759A (en) Image decoder and image coding decoding system
JP2000059612A (en) Image processing device and method therefor
JP2009288588A (en) Image display device
JP3600018B2 (en) Data embedding device and data generating device
JP2006333299A (en) Encoding apparatus, encoding method and image forming apparatus
AU2021427874A1 (en) Real-time data processing device
JPS5888970A (en) Facsimile data compressor
JP2004120529A (en) Image processor and image forming apparatus
JPH11284840A (en) Image forming device
JP2022063739A (en) Information processor and method for processing information

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070928

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20071113

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20071120

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20090916

TRDD Decision of grant or rejection written
A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20090929

A01 Written decision to grant a patent or to grant a registration (utility model)

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20091028

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121106

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20121106

Year of fee payment: 3

FPAY Renewal fee payment (event date is renewal date of database)

Free format text: PAYMENT UNTIL: 20131106

Year of fee payment: 4

LAPS Cancellation because of no payment of annual fees