JP4631629B2 - Electronic camera and image processing program - Google Patents

Electronic camera and image processing program Download PDF

Info

Publication number
JP4631629B2
JP4631629B2 JP2005267177A JP2005267177A JP4631629B2 JP 4631629 B2 JP4631629 B2 JP 4631629B2 JP 2005267177 A JP2005267177 A JP 2005267177A JP 2005267177 A JP2005267177 A JP 2005267177A JP 4631629 B2 JP4631629 B2 JP 4631629B2
Authority
JP
Japan
Prior art keywords
compression
image data
processing unit
image
scale factor
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.)
Expired - Fee Related
Application number
JP2005267177A
Other languages
Japanese (ja)
Other versions
JP2006115483A (en
Inventor
和敬 高橋
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.)
Nikon Corp
Original Assignee
Nikon Corp
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 Nikon Corp filed Critical Nikon Corp
Priority to JP2005267177A priority Critical patent/JP4631629B2/en
Publication of JP2006115483A publication Critical patent/JP2006115483A/en
Application granted granted Critical
Publication of JP4631629B2 publication Critical patent/JP4631629B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Television Signal Processing For Recording (AREA)
  • Studio Devices (AREA)
  • Compression Or Coding Systems Of Tv Signals (AREA)
  • Compression Of Band Width Or Redundancy In Fax (AREA)

Description

本発明は、画像圧縮機能を有する電子カメラおよび画像処理プログラムに関する。特に、本発明は、情報量が欠如しているなどの特殊な画像データに配慮した圧縮モード(画質一定モード)を、その他の圧縮モード(サイズ一定モード)と併用するための技術に関する。   The present invention relates to an electronic camera having an image compression function and an image processing program. In particular, the present invention relates to a technique for using a compression mode (constant image quality mode) in consideration of special image data such as lack of information amount in combination with other compression modes (constant size mode).

従来より、電子カメラでは、ユーザによる画質設定(例えば、FINE/NORMAL/BASICなどの切り替え)に合わせて、画像データの目標圧縮率を決定する技術が知られている。このような電子カメラでは、テスト圧縮を繰り返しながらスケールファクタなどを徐々に調整し、画像データの圧縮符号量を目標圧縮率の範囲内に収めている。
このような処理では、すべての画像を略一定のデータ量に圧縮する。そのため、画像の種類によって画質にばらつきがでる場合がある。そこで、均質な画像を生成することができる電子カメラが考えられている(例えば、特許文献1参照)。このような電子カメラでは、画質重視またはサイズ重視のいずれかを選択可能であり、画質重視では、均質な画像を生成する圧縮が行われ、サイズ重視では、固定長化の圧縮が行われる。
特開2001−54115号公報
2. Description of the Related Art Conventionally, in an electronic camera, a technique for determining a target compression rate of image data in accordance with image quality setting by a user (for example, switching between FINE / NORMAL / BASIC) is known. In such an electronic camera, the scale factor and the like are gradually adjusted while repeating the test compression, and the compression code amount of the image data is kept within the range of the target compression rate.
In such processing, all images are compressed to a substantially constant data amount. Therefore, the image quality may vary depending on the type of image. Thus, an electronic camera that can generate a homogeneous image has been considered (see, for example, Patent Document 1). In such an electronic camera, it is possible to select either image quality or size emphasis. When image quality is important, compression for generating a homogeneous image is performed, and when emphasis is placed on size, fixed length compression is performed.
JP 2001-54115 A

しかし、画質重視においては、均質な画像を生成する結果として、画像データの圧縮符号量が非常に大きくなることが予想される。これにより、各種記憶領域の残量の保証が困難になるという問題があった。
本発明は、均質な画像を生成するための圧縮を行う際にも、各種記憶領域の残量の保証が可能な電子カメラおよび画像処理プログラムを提供することを目的とする
However, in the emphasis on image quality, it is expected that the amount of compression code of image data will become very large as a result of generating a homogeneous image. As a result, there is a problem that it is difficult to guarantee the remaining amount of various storage areas.
An object of the present invention is to provide an electronic camera and an image processing program capable of guaranteeing the remaining amounts of various storage areas even when compression is performed to generate a homogeneous image.

本発明の電子カメラは、被写体を撮像して画像データを生成する撮像手段と、スケールファクタが固定である第1の圧縮アルゴリズムと、スケールファクタが調整可能である第2の圧縮アルゴリズムとのいずれかによって、前記撮像手段により生成された前記画像データを圧縮する圧縮手段と、前記圧縮手段により圧縮された画像データの符号量が所定の範囲内であるか否かを判定する判定手段と、均質な画像を生成する第1の圧縮モードと、略一定の符号量の画像データを生成する第2の圧縮モードとのいずれかを、ユーザ操作に基づいて選択する選択手段とを備え、前記圧縮手段は、前記選択手段により前記第1の圧縮モードが選択された場合に前記スケールファクタを調整する際の下限値を、前記選択手段により前記第2の圧縮モードが選択された場合に前記スケールファクタを調整する際の下限値よりも小さく設定し、前記選択手段により前記第1の圧縮モードが選択されると、前記圧縮手段は、前記第1の圧縮アルゴリズムによって圧縮を行い、前記判定手段が、前記第1の圧縮アルゴリズムによって圧縮された画像の符号量が所定の範囲内でないと判定した場合には、前記圧縮手段は、前記第2の圧縮アルゴリズムによって圧縮を行い、前記選択手段により前記第2の圧縮モードが選択されると、前記圧縮手段は、前記第2の圧縮アルゴリズムによって圧縮を行うことを特徴とする。 The electronic camera of the present invention is any one of imaging means for capturing an image of a subject and generating image data, a first compression algorithm with a fixed scale factor, and a second compression algorithm with an adjustable scale factor. A compression unit that compresses the image data generated by the imaging unit, a determination unit that determines whether the code amount of the image data compressed by the compression unit is within a predetermined range, and a homogeneous a first compression mode for generating an image, either the second compression mode for generating image data of a substantially constant amount of codes, and selecting means for selecting based on a user operation, wherein the compression means When the first compression mode is selected by the selection unit, a lower limit value for adjusting the scale factor is set by the selection unit by the second compression mode. Is set to be smaller than the lower limit value in adjusting the scale factor if it is selected, when the first compression mode is selected by said selecting means, said compression means, the compression by the first compression algorithm And when the determination unit determines that the code amount of the image compressed by the first compression algorithm is not within a predetermined range, the compression unit performs compression by the second compression algorithm. When the second compression mode is selected by the selection unit, the compression unit performs compression by the second compression algorithm.

また、前記判定手段は、判定を行う際の前記符号量の下限値を、前記選択手段により前記第1の圧縮モードが選択された場合と、前記選択手段により前記第2の圧縮モードが選択された場合とで等しく設定することを特徴とする。 In addition, the determination unit selects the lower limit value of the code amount for the determination when the selection unit selects the first compression mode and the selection unit selects the second compression mode. It is characterized in that it is set equal in the case of the case.

また、本発明の画像処理プログラムは、コンピュータを、上記に記載の圧縮手段、判定手段、選択手段として機能させることを特徴とする。 The image processing program of the present invention causes a computer to function as the compression means, determination means, and selection means described above .

本発明によれば、均質な画像を生成するための圧縮を行う際にも、各種記憶領域の残量の保証が可能な電子カメラおよび画像処理プログラムを提供することができる。   According to the present invention, it is possible to provide an electronic camera and an image processing program capable of guaranteeing the remaining amounts of various storage areas even when performing compression for generating a homogeneous image.

〈第1実施形態〉
以下、図面を用いて本発明の第1実施形態について説明する。
図1は、電子カメラ10の構成を説明する概略ブロック図である。図1において、電子カメラ10には、撮影レンズ11が装着される。この撮影レンズ11の像空間には、撮像素子13が配置される。この撮像素子13において生成される画像データは、信号処理部15、A/D変換部16、画像処理部17を順に介して処理された後、デジタルの画像データとして圧縮処理部18に与えられる。圧縮処理部18は、この画像データをJPEG圧縮して、記録部19に出力する。記録部19は、圧縮された画像データを、メモリカードなどの記録媒体(図示せず)に記録する。また、電子カメラ10には、システムコントロール用の制御部21、カメラ操作やモード設定を行うための操作釦群24などが設けられる。また、画像処理部17は、不図示のバッファを内部に備え、画像処理後の画像データを一時保存する。この画像データは、制御部21の指示にしたがって、圧縮処理部18に出力される。
<First Embodiment>
Hereinafter, a first embodiment of the present invention will be described with reference to the drawings.
FIG. 1 is a schematic block diagram illustrating the configuration of the electronic camera 10. In FIG. 1, a photographing lens 11 is attached to the electronic camera 10. An image sensor 13 is disposed in the image space of the photographic lens 11. The image data generated by the image pickup device 13 is processed through the signal processing unit 15, the A / D conversion unit 16, and the image processing unit 17 in this order, and then given to the compression processing unit 18 as digital image data. The compression processing unit 18 performs JPEG compression on the image data and outputs it to the recording unit 19. The recording unit 19 records the compressed image data on a recording medium (not shown) such as a memory card. Further, the electronic camera 10 is provided with a control unit 21 for system control, an operation button group 24 for performing camera operation and mode setting, and the like. Further, the image processing unit 17 includes a buffer (not shown) therein, and temporarily stores image data after image processing. This image data is output to the compression processing unit 18 in accordance with an instruction from the control unit 21.

また、電子カメラ10は、略一定の符号量の画像データを生成するサイズ一定モードと均質な画像を生成する画質一定モードとを備え、これらのモードは、前述した操作釦群24を介したユーザ操作により設定される。また、電子カメラ10は、ユーザによる画質設定(例えば、FINE/NORMAL/BASICなどの切り替え)が可能であり、この設定も操作釦群24を介したユーザ操作により行われる。なお、画質設定ごとに目標圧縮率が予め定められる。   In addition, the electronic camera 10 includes a constant size mode for generating image data having a substantially constant code amount and a constant image quality mode for generating a homogeneous image. These modes are selected by the user via the operation button group 24 described above. Set by operation. In addition, the electronic camera 10 can be set by the user for image quality (for example, switching between FINE / NORMAL / BASIC), and this setting is also performed by a user operation via the operation button group 24. A target compression rate is determined in advance for each image quality setting.

なお、撮影レンズ11、撮像素子13、信号処理部15、A/D変換部16、画像処理部17、制御部21は、請求項の「撮像手段」に対応し、圧縮処理部18、制御部21は、請求項の「圧縮手段」および「判定手段」に対応する。また、制御部21、操作釦群24は、請求項の「選択手段」に対応する。
以下、本発明の特徴である圧縮処理部18の動作について、図2に示すフローチャートを参照して説明する。
The photographing lens 11, the image sensor 13, the signal processing unit 15, the A / D conversion unit 16, the image processing unit 17, and the control unit 21 correspond to the “imaging unit” in the claims, and the compression processing unit 18 and the control unit. 21 corresponds to “compression unit” and “determination unit” in the claims. The control unit 21 and the operation button group 24 correspond to “selecting means” in the claims.
Hereinafter, the operation of the compression processing unit 18, which is a feature of the present invention, will be described with reference to the flowchart shown in FIG.

ステップS1において、圧縮処理部18は、制御部21と交信して、操作釦群24による圧縮モード設定を取得する。このときサイズ一定モードが設定されていた場合、圧縮処理部18は、ステップS2に動作を移行する。一方、画質一定モードが設定されていた場合、圧縮処理部18は、ステップS7に動作を移行する。このときに、圧縮処理部18は、操作釦群24による画質設定に基づく目標圧縮率も取得する。   In step S <b> 1, the compression processing unit 18 communicates with the control unit 21 and acquires the compression mode setting by the operation button group 24. If the constant size mode is set at this time, the compression processing unit 18 shifts the operation to step S2. On the other hand, when the constant image quality mode is set, the compression processing unit 18 shifts the operation to step S7. At this time, the compression processing unit 18 also acquires a target compression rate based on the image quality setting by the operation button group 24.

ステップS2において、圧縮処理部18は、ステップS1で取得した目標圧縮率に基づいて、初期スケールファクタSF0を決定する。なお、初期スケールファクタSF0は、目標圧縮率ごとに、テーブルの形で予め定められている。
ステップS3において、圧縮処理部18は、画像処理部17の不図示のバッファから画像データを読み出し、初期スケールファクタSF0でテスト圧縮する。
In step S2, the compression processing unit 18 determines an initial scale factor SF 0 based on the target compression rate acquired in step S1. The initial scale factor SF 0 is predetermined in the form of a table for each target compression rate.
In step S3, the compression processing section 18 reads the image data from the buffer (not shown) of the image processing unit 17, to test the compression in the initial scale factor SF 0.

ステップS4において、圧縮処理部18は、テスト圧縮による画像データサイズSaが、目標範囲内であるか否かを判定する。目標範囲は、目標圧縮率ごとに、テーブルの形で予め定められている。
画像データサイズSaが、目標範囲内から外れていた場合、圧縮処理部18はステップS5に動作を移行する。一方、画像データサイズSaが目標範囲内である場合、圧縮処理部18は、サイズ一定モードの画像圧縮が完了したと判断して、圧縮動作を終了する。
In step S4, the compression processing section 18, the image data size S a by the test compression, it determines whether it is within the target range. The target range is predetermined in the form of a table for each target compression rate.
If the image data size Sa is not within the target range, the compression processing unit 18 proceeds to step S5. On the other hand, when the image data size Sa is within the target range, the compression processing unit 18 determines that the image compression in the constant size mode has been completed, and ends the compression operation.

ステップS5において、圧縮処理部18は、前回の圧縮結果に基づいて、スケールファクタSFaを調整する。
ステップS6において、圧縮処理部18は、画像処理部17の不図示のバッファから画像データを読み出し、調整後したスケールファクタSFaで圧縮する。このような圧縮完了後、圧縮処理部18は、画像データサイズを改めて判定するため、ステップS4に動作を戻す。
In step S5, the compression processing unit 18 on the basis of the previous compression result, to adjust the scale factor SF a.
In step S6, the compression processing section 18 reads the image data from the buffer (not shown) of the image processing unit 17, compresses the scale factor SF a was adjusted. After completion of such compression, the compression processing unit 18 returns the operation to step S4 in order to determine again the image data size.

一方、ステップS1において、画質一定モードが設定されていた場合、ステップS7において、圧縮処理部18は、ステップS1で取得した目標圧縮率に基づいて、固定スケールファクタSFfixを決定する。なお、固定スケールファクタSFfixは、目標圧縮率ごとに、テーブルの形で予め定められている。
ステップS8において、圧縮処理部18は、画像処理部17の不図示のバッファから画像データを読み出し、固定スケールファクタSFfixで圧縮する。まず、圧縮処理部18は、画像データを8×8の画素ブロックに分割し、各画素ブロックごとにDCT変換(離散コサイン変換)を実行する。次に、圧縮処理部18は、固定スケールファクタSFfixを基準量子化テーブルに乗じて、画質一定モード用の量子化テーブルを作成する。圧縮処理部18は、DCT変換で得た変換係数をこの量子化テーブルにしたがって量子化する。圧縮処理部18は、この量子化後の変換係数をジグザグスキャンの順に並べ替えた後、可変長符号化などを施して符号量を圧縮する。
On the other hand, if the constant image quality mode is set in step S1, the compression processing unit 18 determines a fixed scale factor SF fix based on the target compression rate acquired in step S1 in step S7. The fixed scale factor SF fix is predetermined in the form of a table for each target compression rate.
In step S8, the compression processing unit 18 reads the image data from a buffer (not shown) of the image processing unit 17, and compresses it with a fixed scale factor SF fix . First, the compression processing unit 18 divides the image data into 8 × 8 pixel blocks, and performs DCT transform (discrete cosine transform) for each pixel block. Next, the compression processing unit 18 multiplies the reference quantization table by the fixed scale factor SF fix to create a quantization table for the constant image quality mode. The compression processing unit 18 quantizes the transform coefficient obtained by the DCT transform according to this quantization table. The compression processing unit 18 rearranges the quantized transform coefficients in the zigzag scan order, and then performs variable-length coding or the like to compress the code amount.

ステップS9において、圧縮処理部18は、圧縮による画像データサイズSbが、目標範囲内であるか否かを判定する。目標範囲は、目標圧縮率ごとに、テーブルの形で予め定められている。
画像データサイズSbが、目標範囲内から外れていた場合、圧縮処理部18はステップS10に動作を移行する。一方、画像データサイズSbが目標範囲内である場合、圧縮処理部18は、画質一定モードの画像圧縮が完了したと判断して、圧縮動作を終了する。
In step S9, the compression processing section 18, the image data size S b by compression is equal to or within the target range. The target range is predetermined in the form of a table for each target compression rate.
If the image data size Sb is not within the target range, the compression processing unit 18 proceeds to step S10. On the other hand, when the image data size Sb is within the target range, the compression processing unit 18 determines that the image compression in the constant image quality mode has been completed, and ends the compression operation.

ステップS10において、圧縮処理部18は、前回の圧縮結果に基づいて、スケールファクタSFbを調整する。
ステップS11において、圧縮処理部18は、画像処理部17の不図示のバッファから画像データを読み出し、調整後したスケールファクタSFbで圧縮する。このような圧縮完了後、圧縮処理部18は、画像データサイズを改めて判定するため、ステップS9に動作を戻す。
In step S10, the compression processing unit 18 on the basis of the previous compression result, to adjust the scale factor SF b.
In step S11, the compression processing section 18 reads the image data from the buffer (not shown) of the image processing unit 17, compresses the scale factor SF b was adjusted. After completion of such compression, the compression processing unit 18 returns the operation to step S9 in order to determine again the image data size.

以上説明したように、第1実施形態によれば、スケールファクタが固定である第1の圧縮アルゴリズムと、スケールファクタが調整可能である第2の圧縮アルゴリズムとのいずれかによって圧縮を行う電子カメラにおいて、画質一定モード(均質な画像を生成する第1の圧縮モード)が選択されると、まず、第1の圧縮アルゴリズムによって圧縮を行い、第1の圧縮アルゴリズムによって圧縮された画像の符号量が所定の範囲内でないと判定した場合には、第2の圧縮アルゴリズムによって圧縮を行う(固定長化の圧縮に変更する)。一方、サイズ一定モード(略一定の符号量の画像データを生成する第2の圧縮モード)が選択されると、第2の圧縮アルゴリズムによって圧縮を行う。   As described above, according to the first embodiment, in the electronic camera that performs compression using either the first compression algorithm with a fixed scale factor or the second compression algorithm with an adjustable scale factor. When the constant image quality mode (first compression mode for generating a homogeneous image) is selected, compression is first performed by the first compression algorithm, and the code amount of the image compressed by the first compression algorithm is predetermined. If it is determined that it is not within the range, compression is performed by the second compression algorithm (change to fixed length compression). On the other hand, when the constant size mode (second compression mode for generating image data having a substantially constant code amount) is selected, compression is performed by the second compression algorithm.

すなわち、画質一定モードにおいても、基本的には均質画像を生成する圧縮を行うが、画像データサイズが所定の範囲に収まらない場合はサイズ一定モードに準ずる圧縮を行う。したがって、画質一定モードにおいても、画像データの圧縮符号量が非常に大きくなることを回避し、各種記憶領域の残量を保証することが可能である。そのため、連続撮影時や動画撮影時の残り枚数の保証や、メモリ残量の保証も可能になる。   That is, in the constant image quality mode, basically, compression for generating a homogeneous image is performed, but when the image data size does not fall within a predetermined range, compression according to the constant size mode is performed. Therefore, even in the constant image quality mode, it is possible to avoid a very large compression code amount of image data and to guarantee the remaining amount of various storage areas. Therefore, it is possible to guarantee the remaining number of images during continuous shooting or movie shooting, and also to guarantee the remaining memory capacity.

〈第2実施形態〉
以下、図面を用いて本発明の第2実施形態について説明する。第2実施形態の電子カメラは、第1実施形態の電子カメラ10と同様の構成であるため、図示および構成の説明を省略し、以下では第1実施形態と同様の符号を用いて説明を行う。
第2実施形態は、第1実施形態の図2のフローチャートのステップS5およびステップS10で説明したスケールファクタの調整の一例を具体的に示す実施形態である。
Second Embodiment
The second embodiment of the present invention will be described below with reference to the drawings. Since the electronic camera of the second embodiment has the same configuration as that of the electronic camera 10 of the first embodiment, the illustration and description of the configuration are omitted, and the following description is made using the same reference numerals as those of the first embodiment. .
The second embodiment is an embodiment showing an example of an adjustment of the scale factor described in step S5 and step S 10 in the flowchart of FIG. 2 of the first embodiment in detail.

まず、第1実施形態の図2のフローチャートのステップS2からステップS6で説明したサイズ一定モードを行う際の圧縮処理部18の動作について、図3に示すフローチャートを参照して説明する。
ステップS21において、圧縮処理部18は、圧縮モードとともに取得した目標圧縮率に基づいて、初期条件を決定する。なお、初期条件は、目標圧縮率ごとにテーブルの形で予め定められている。サイズ一定モードの初期条件には、以下のものが含まれる。
・初期スケールファクタSF0
・スケールファクタの下限値SFamin
・画像データサイズの上限値Samax
・画像データサイズの下限値Samin
・打ち切りスケールファクタSFae
ステップS22において、圧縮処理部18は、画像処理部17の不図示のバッファから画像データを読み出し、初期スケールファクタSF0でテスト圧縮する。
First, the operation of the compression processing unit 18 when performing the constant size mode described in steps S2 to S6 of the flowchart of FIG. 2 of the first embodiment will be described with reference to the flowchart shown in FIG.
In step S21, the compression processing unit 18 determines initial conditions based on the target compression rate acquired together with the compression mode. The initial conditions are determined in advance in the form of a table for each target compression rate. The initial conditions for the constant size mode include:
-Initial scale factor SF 0
・ Scale factor lower limit SF amin
・ Maximum value of image data size Samax
-Lower limit of image data size Samin
・ Censored scale factor SF ae
In step S22, the compression processing section 18 reads the image data from the buffer (not shown) of the image processing unit 17, to test the compression in the initial scale factor SF 0.

ステップS23において、圧縮処理部18は、ステップS22で行ったテスト圧縮結果を、予め記憶しておいた統計データに当てはめて、目標圧縮率を得る上で適切なスケールファクタSFa1を推定する。
ステップS24において、圧縮処理部18は、ステップS23で推定したスケールファクタSFa1がスケールファクタの下限値SFaminより小さいか判定し、スケールファクタSFa1がスケールファクタの下限値SFaminより小さい場合、スケールファクタSFa1を下限値SFaminに制限する。
In step S23, the compression processing unit 18 applies the test compression result performed in step S22 to statistical data stored in advance, and estimates an appropriate scale factor SF a1 for obtaining the target compression rate.
In step S24, the compression processing unit 18 determines whether the scale factor SF a1 estimated in step S23 is smaller than the lower limit value SF amin of the scale factor. If the scale factor SF a1 is smaller than the lower limit value SF amin of the scale factor, The factor SF a1 is limited to the lower limit SF amin .

ステップS25において、圧縮処理部18は、画像処理部17の不図示のバッファから画像データを読み出し、スケールファクタSFa1で圧縮する。
ステップS26において、圧縮処理部18は、ステップS25における圧縮による画像データサイズSa1が、目標範囲内であるか否かを判定する。目標範囲は、前述した画像データサイズの上限値Samaxと画像データサイズの下限値Saminとの間である。
In step S25, the compression processing unit 18 reads the image data from a buffer (not shown) of the image processing unit 17, and compresses it with the scale factor SF a1 .
In step S26, the compression processing unit 18 determines whether or not the image data size S a1 obtained by the compression in step S25 is within the target range. The target range is between the above-described upper limit value S amax of the image data size and the lower limit value S amin of the image data size.

画像データサイズSa1が、目標範囲内から外れていた場合、圧縮処理部18はステップS27に動作を移行する。一方、画像データサイズSa1が目標範囲内である場合、圧縮処理部18は、サイズ一定モードの画像圧縮が完了したと判断して、圧縮動作を終了する。
ステップS27において、圧縮処理部18は、画像データサイズSa1が画像データサイズの下限値Samin以下であり、かつ、スケールファクタSFa1=SFaminであるか否かを判定する。画像データサイズSa1が画像データサイズの下限値Samin以下であるということは、ステップS25における圧縮が目標圧縮率に比して高圧縮であるため画像データサイズが小さいということを示し、スケールファクタSFa1=SFaminであるということは、スケールファクタSFa1が制限されたということを意味する。上記条件がすべて成立した場合、圧縮対象の画像データは、情報量の極端に少ない特殊なものであると推測できる。そこで、圧縮処理部18は、画像圧縮を打ち切って終了する。
If the image data size S a1 is out of the target range, the compression processing unit 18 proceeds to step S27. On the other hand, when the image data size S a1 is within the target range, the compression processing unit 18 determines that the image compression in the constant size mode is completed, and ends the compression operation.
In step S27, the compression processing unit 18 determines whether or not the image data size S a1 is equal to or smaller than the lower limit value S amin of the image data size and the scale factor SF a1 = SF amin . The fact that the image data size S a1 is less than or equal to the lower limit value S amin of the image data size indicates that the image data size is small because the compression in step S25 is higher than the target compression rate, and the scale factor SF a1 = SF amin means that the scale factor SF a1 is limited. When all of the above conditions are satisfied, it can be estimated that the image data to be compressed is special with extremely small amount of information. Therefore, the compression processing unit 18 ends the image compression and ends.

一方、上記条件が成立しなかった場合、圧縮処理部18は、ステップS28に動作を移行する。
ステップS28において、圧縮処理部18は、ステップS22およびステップS25で行った圧縮結果を、予め記憶しておいた統計データに当てはめて、目標圧縮率を得る上で適切なスケールファクタSFa2を推定する。このとき、圧縮処理部18は、ステップS23の推定よりも精度の高い方法で推定を行う。
On the other hand, if the above condition is not satisfied, the compression processing unit 18 proceeds to step S28.
In step S28, the compression processing unit 18 applies the compression results obtained in steps S22 and S25 to statistical data stored in advance, and estimates an appropriate scale factor SF a2 for obtaining the target compression ratio. . At this time, the compression processing unit 18 performs estimation by a method with higher accuracy than the estimation in step S23.

ステップS29において、圧縮処理部18は、ステップS28で推定したスケールファクタSFa2がスケールファクタの下限値SFaminより小さいか判定し、スケールファクタSFa2がスケールファクタの下限値SFaminより小さい場合、スケールファクタSFa2を下限値SFaminに制限する。
ステップS30において、圧縮処理部18は、画像処理部17の不図示のバッファから画像データを読み出し、スケールファクタSFa2で圧縮する。
In step S29, the compression processing unit 18 determines whether the scale factor SF a2 estimated in step S28 is smaller than the lower limit value SF amin of the scale factor. If the scale factor SF a2 is smaller than the lower limit value SF amin of the scale factor, The factor SF a2 is limited to the lower limit SF amin .
In step S30, the compression processing unit 18 reads the image data from a buffer (not shown) of the image processing unit 17, and compresses it with the scale factor SF a2 .

ステップS31において、圧縮処理部18は、ステップS30における圧縮による画像データサイズSa2が、目標範囲内であるか否かを判定する。目標範囲は、ステップS26と同様に、画像データサイズの上限値Samaxと画像データサイズの下限値Saminとの間である。
画像データサイズSa2が、目標範囲内から外れていた場合、圧縮処理部18はステップS32に動作を移行する。一方、画像データサイズSa2が目標範囲内である場合、圧縮処理部18は、サイズ一定モードの画像圧縮が完了したと判断して、圧縮動作を終了する。
In step S31, the compression processing unit 18 determines whether or not the image data size S a2 obtained by the compression in step S30 is within the target range. Similar to step S26, the target range is between the upper limit value S amax of the image data size and the lower limit value S amin of the image data size.
When the image data size S a2 is out of the target range, the compression processing unit 18 proceeds to step S32. On the other hand, when the image data size S a2 is within the target range, the compression processing unit 18 determines that the image compression in the constant size mode is completed, and ends the compression operation.

ステップS32において、圧縮処理部18は、画像データサイズSa2が画像データサイズの下限値Samin以下であり、かつ、スケールファクタSFa2=SFaminであるか否かを判定する。上記条件がすべて成立した場合、圧縮対象の画像データは、情報量の極端に少ない特殊なものであると推測できる。そこで、圧縮処理部18は、画像圧縮を打ち切って終了する。この場合は、スケールファクタの下限値SFaminによるサイズ一定モードの画像圧縮が結果的に実行されたこととなる。一方、上記条件が成立しなかった場合、圧縮処理部18は、ステップS33に動作を移行する。 In step S32, the compression processing unit 18 determines whether or not the image data size S a2 is equal to or smaller than the lower limit value S amin of the image data size and the scale factor SF a2 = SF amin . When all of the above conditions are satisfied, it can be estimated that the image data to be compressed is special with extremely small amount of information. Therefore, the compression processing unit 18 ends the image compression and ends. In this case, the image compression in the constant size mode by the lower limit value SF amin of the scale factor is consequently executed. On the other hand, if the above condition is not satisfied, the compression processing unit 18 proceeds to step S33.

ステップS33において、圧縮処理部18は、画像処理部17の不図示のバッファから画像データを読み出し、ステップS21で決定した打ち切りスケールファクタSFaeで圧縮する。
ステップS34において、圧縮処理部18は、ステップS33における圧縮による画像データサイズSaeが、画像データサイズの上限値Samaxよりも小さいか否かを判定する。ここで、画像データサイズSaeが、画像データサイズの上限値Samaxよりも大きい場合、圧縮処理部18はステップS35に動作を移行する。一方、画像データサイズSaeが、画像データサイズの上限値Samaxよりも小さいという緩い条件を満たした場合、圧縮処理部18は、サイズ一定モードの画像圧縮が一応完了したと判断して、圧縮動作を終了する。
In step S33, the compression processing unit 18 reads the image data from a buffer (not shown) of the image processing unit 17, and compresses it with the censor scale factor SF ae determined in step S21.
In step S34, the compression processing unit 18 determines whether or not the image data size Sae obtained by the compression in step S33 is smaller than the upper limit value Samax of the image data size. Here, the image data size S ae is larger than the upper limit value S amax of the image data size, the compression processing unit 18 shifts the operation to step S35. On the other hand, the image data size S ae is, if it meets the loose condition that less than the upper limit value S amax of the image data size, the compression processing unit 18 determines that the image compression size constant mode is once completed, the compression End the operation.

ステップS35において、圧縮処理部18は、ここまでの圧縮試行回数が制限回数を超えたか否かを判定する。ここまでの圧縮試行回数が制限回数を超えていた場合、圧縮処理部18は、最終の圧縮結果をもって、圧縮処理を打ち切る。一方、ここまでの圧縮試行回数が制限回数をまだ超えていない場合、圧縮処理部18は、ステップS36に動作を移行する。   In step S <b> 35, the compression processing unit 18 determines whether or not the number of compression attempts so far exceeds the limit number. If the number of compression attempts so far exceeds the limit number, the compression processing unit 18 terminates the compression process with the final compression result. On the other hand, if the number of compression attempts so far has not yet exceeded the limit number, the compression processing unit 18 moves the operation to step S36.

ステップS36において、圧縮処理部18は、現在の打ち切りスケールファクタSFaeを所定倍(例えば1.5倍)して、動作をステップS33に戻す。
次に、第1実施形態の図2のフローチャートのステップS7からステップS11で説明した画質一定モードを行う際の圧縮処理部18の動作について、図4に示すフローチャートを参照して説明する。
In step S36, the compression processing unit 18 multiplies the current censoring scale factor SF ae by a predetermined value (for example, 1.5 times), and returns the operation to step S33.
Next, the operation of the compression processing unit 18 when performing the constant image quality mode described in steps S7 to S11 in the flowchart of FIG. 2 of the first embodiment will be described with reference to the flowchart shown in FIG.

ステップS41において、圧縮処理部18は、圧縮処理部18は、圧縮モードとともに取得した目標圧縮率に基づいて、初期条件を決定する。なお、初期条件は、目標圧縮率ごとにテーブルの形で予め定められている。画質一定モードの初期条件には、以下のものが含まれる。
・固定スケールファクタSFfix
・スケールファクタの下限値SFbmin
・画像データサイズの上限値Sbmax
・画像データサイズの下限値Sbmin
・打ち切りスケールファクタSFbe
ここで、画質一定モードの初期条件とサイズ一定モードの初期条件との相違について、図5を用いて説明する。図5の横軸はスケールファクタを示し、縦軸は画像データサイズを示す。なお、図5は、同一の画質設定における画質一定モードの初期条件とサイズ一定モードの初期条件との関係を示す。
In step S41, the compression processing unit 18 determines an initial condition based on the target compression rate acquired together with the compression mode. The initial conditions are determined in advance in the form of a table for each target compression rate. The initial conditions of the constant image quality mode include the following.
・ Fixed scale factor SF fix
・ Scale factor lower limit SF bmin
・ Upper limit value of image data size S bmax
Lower limit Sbmin of image data size
-Censoring scale factor SF be
Here, the difference between the initial condition of the constant image quality mode and the initial condition of the constant size mode will be described with reference to FIG. The horizontal axis in FIG. 5 indicates the scale factor, and the vertical axis indicates the image data size. FIG. 5 shows the relationship between the initial condition of the constant image quality mode and the initial condition of the constant size mode at the same image quality setting.

まず、画像データサイズの上限値は、画質一定モード(Sbmax)≧サイズ一定モード(Samax)であり、画像データサイズの下限値は、画質一定モード(Sbmin)=サイズ一定モード(Samin)である。また、スケールファクタの下限値は、画質一定モード(SFbmin)≦サイズ一定モード(SFamin)である。なお、打ち切りスケールファクタは、画質一定モード(SFbe)=サイズ一定モード(SFae)である。 First, the upper limit value of the image data size is the constant image quality mode (S bmax ) ≧ the constant size mode (S amax ), and the lower limit value of the image data size is the fixed image quality mode (S bmin ) = the constant size mode (S amin). ). The lower limit value of the scale factor is the constant image quality mode (SF bmin ) ≦ the constant size mode (SF amin ). The cutoff scale factor is constant image quality mode (SF be ) = constant size mode (SF ae ).

ステップS42において、圧縮処理部18は、画像処理部17の不図示のバッファから画像データを読み出し、固定スケールファクタSFfixで圧縮する。
ステップS43において、圧縮処理部18は、ステップS42における圧縮による画像データサイズSfixが、目標範囲内であるか否かを判定する。目標範囲は、前述した画像データサイズの上限値Sbmaxと画像データサイズの下限値Sbminとの間である。
In step S42, the compression processing unit 18 reads the image data from a buffer (not shown) of the image processing unit 17, and compresses it with a fixed scale factor SF fix .
In step S43, the compression processing unit 18 determines whether or not the image data size S fix resulting from the compression in step S42 is within the target range. The target range is between the above-described upper limit value S bmax of the image data size and the lower limit value S bmin of the image data size.

画像データサイズSfixが、目標範囲内から外れていた場合、圧縮処理部18はステップS44に動作を移行する。一方、画像データサイズSfixが目標範囲内である場合、圧縮処理部18は、画質一定モードの画像圧縮が完了したと判断して、圧縮動作を終了する。
ステップS44において、圧縮処理部18は、ステップS42で行った圧縮結果を、予め記憶しておいた統計データに当てはめて、目標圧縮率を得る上で適切なスケールファクタSFb1を推定する。なお、この推定は、サイズ一定モードのフローチャートのステップS23と同様の条件で行われる。
If the image data size S fix is out of the target range, the compression processing unit 18 proceeds to step S44. On the other hand, when the image data size S fix is within the target range, the compression processing unit 18 determines that the image compression in the constant image quality mode is completed, and ends the compression operation.
In step S44, the compression processing unit 18 applies a result of the compression performed in step S42 to statistical data stored in advance, and estimates an appropriate scale factor SF b1 for obtaining a target compression rate. Note that this estimation is performed in the same conditions as in step S 23 of the flowchart in size constant mode.

ステップS45において、圧縮処理部18は、ステップS44で推定したスケールファクタSFb1がスケールファクタの下限値SFbminより小さいか判定し、スケールファクタSFb1がスケールファクタの下限値SFbminより小さい場合、スケールファクタSFb1を下限値SFbminに制限する。
ステップS46において、圧縮処理部18は、画像処理部17の不図示のバッファから画像データを読み出し、スケールファクタSFb1で圧縮する。
In step S45, the compression processing unit 18 determines whether the scale factor SF b1 estimated in step S44 is smaller than the lower limit value SF bmin of the scale factor. If the scale factor SF b1 is smaller than the lower limit value SF bmin of the scale factor, The factor SF b1 is limited to the lower limit value SF bmin .
In step S46, the compression processing unit 18 reads the image data from a buffer (not shown) of the image processing unit 17, and compresses it with the scale factor SF b1 .

ステップS47において、圧縮処理部18は、ステップS46における圧縮による画像データサイズSb1が、目標範囲内であるか否かを判定する。目標範囲は、ステップS43と同様に、画像データサイズの上限値Sbmaxと画像データサイズの下限値Sbminとの間である。
画像データサイズSb1が、目標範囲内から外れていた場合、圧縮処理部18はステップS48に動作を移行する。一方、画像データサイズSb1が目標範囲内である場合、圧縮処理部18は、画質一定モードの画像圧縮が完了したと判断して、圧縮動作を終了する。
In step S47, the compression processing unit 18 determines whether or not the image data size S b1 obtained by the compression in step S46 is within the target range. Similar to step S43, the target range is between the upper limit value S bmax of the image data size and the lower limit value S bmin of the image data size.
If the image data size S b1 is out of the target range, the compression processing unit 18 proceeds to step S48. On the other hand, when the image data size S b1 is within the target range, the compression processing unit 18 determines that the image compression in the constant image quality mode is completed, and ends the compression operation.

ステップS48において、圧縮処理部18は、画像データサイズSb1が画像データサイズの下限値Sbmin以下であり、かつ、スケールファクタSFb1=SFbminであるか否かを判定する。画像データサイズSb1が画像データサイズの下限値Sbmin以下であるということは、ステップS46における圧縮が目標圧縮率に比して高圧縮であるため画像データサイズが小さいということを示し、スケールファクタSFb1=SFbminであるということは、スケールファクタSFb1が制限されたということを意味する。上記条件がすべて成立した場合、圧縮対象の画像データは、情報量の極端に少ない特殊なものであると推測できる。そこで、圧縮処理部18は、画像圧縮を打ち切って終了する。この場合は、スケールファクタの下限値SFbminによる画質一定モードの画像圧縮が結果的に実行されたこととなる。 In step S48, the compression processing unit 18 determines whether or not the image data size S b1 is equal to or smaller than the lower limit value S bmin of the image data size and the scale factor SF b1 = SF bmin . The fact that the image data size S b1 is less than or equal to the lower limit value S bmin of the image data size indicates that the image data size is small because the compression in step S46 is higher than the target compression rate, and the scale factor SF b1 = SF bmin means that the scale factor SF b1 is limited. When all of the above conditions are satisfied, it can be estimated that the image data to be compressed is special with extremely small amount of information. Therefore, the compression processing unit 18 ends the image compression and ends. In this case, image compression in the constant image quality mode using the lower limit value SF bmin of the scale factor is consequently executed.

一方、上記条件が成立しなかった場合、圧縮処理部18は、ステップS49に動作を移行する。
ステップS49において、圧縮処理部18は、ステップS42およびステップS46で行った圧縮結果を、予め記憶しておいた統計データに当てはめて、目標圧縮率を得る上で適切なスケールファクタSFb2を推定する。このとき、圧縮処理部18は、ステップS44の推定よりも条件を厳しくして推定を行う。
On the other hand, if the above condition is not satisfied, the compression processing unit 18 proceeds to step S49.
In step S49, the compression processing unit 18 applies a result of the compression performed in steps S42 and S46 to statistical data stored in advance, and estimates an appropriate scale factor SF b2 for obtaining a target compression ratio. . At this time, the compression processing unit 18 performs the estimation with stricter conditions than the estimation in step S44.

ステップS50において、圧縮処理部18は、ステップS49で推定したスケールファクタSFb2がスケールファクタの下限値SFbminより小さいか判定し、スケールファクタSFb2がスケールファクタの下限値SFbminより小さい場合、スケールファクタSFb2を下限値SFbminに制限する。
ステップS51において、圧縮処理部18は、画像処理部17の不図示のバッファから画像データを読み出し、スケールファクタSFb2で圧縮する。
In step S50, the compression processing unit 18 determines whether the scale factor SF b2 estimated in step S49 is smaller than the lower limit value SF bmin of the scale factor. If the scale factor SF b2 is smaller than the lower limit value SF bmin of the scale factor, The factor SF b2 is limited to the lower limit value SF bmin .
In step S51, the compression processing unit 18 reads the image data from a buffer (not shown) of the image processing unit 17 and compresses it with the scale factor SF b2 .

ステップS52において、圧縮処理部18は、ステップS51における圧縮による画像データサイズSb2が、目標範囲内であるか否かを判定する。ステップS43およびステップS47と同様に、画像データサイズの上限値Sbmaxと画像データサイズの下限値Sbminとの間である。
画像データサイズSb2が、目標範囲内から外れていた場合、圧縮処理部18はステップS53に動作を移行する。一方、画像データサイズSb2が目標範囲内である場合、圧縮処理部18は、画質一定モードの画像圧縮が完了したと判断して、圧縮動作を終了する。
In step S52, the compression processing unit 18 determines whether or not the image data size S b2 obtained by the compression in step S51 is within the target range. Similar to step S43 and step S47, it is between the upper limit value S bmax of the image data size and the lower limit value S bmin of the image data size.
If the image data size S b2 is out of the target range, the compression processing unit 18 proceeds to step S53. On the other hand, when the image data size S b2 is within the target range, the compression processing unit 18 determines that the image compression in the constant image quality mode has been completed, and ends the compression operation.

ステップS53において、圧縮処理部18は、画像データサイズSb2が画像データサイズの下限値Sbmin以下であり、かつ、スケールファクタSFb2=SFbminであるか否かを判定する。上記条件がすべて成立した場合、圧縮対象の画像データは、情報量の極端に少ない特殊なものであると推測できる。そこで、圧縮処理部18は、画像圧縮を打ち切って終了する。この場合は、スケールファクタの下限値SFbminによる画質一定モードの画像圧縮が結果的に実行されたこととなる。一方、上記条件が成立しなかった場合、圧縮処理部18は、ステップS54に動作を移行する。 In step S53, the compression processing unit 18 determines whether or not the image data size S b2 is equal to or smaller than the lower limit value S bmin of the image data size and the scale factor SF b2 = SF bmin . When all of the above conditions are satisfied, it can be estimated that the image data to be compressed is special with extremely small amount of information. Therefore, the compression processing unit 18 ends the image compression and ends. In this case, image compression in the constant image quality mode using the lower limit value SF bmin of the scale factor is consequently executed. On the other hand, if the above condition is not satisfied, the compression processing unit 18 proceeds to step S54.

ステップS54において、圧縮処理部18は、画像処理部17の不図示のバッファから画像データを読み出し、ステップS41で決定した打ち切りスケールファクタSFbeで圧縮する。
ステップS55において、圧縮処理部18は、ステップS54における圧縮による画像データサイズSbeが、画像データサイズの上限値Sbmaxよりも小さいか否かを判定する。ここで、画像データサイズSbeが、画像データサイズの上限値Sbmaxよりも大きい場合、圧縮処理部18はステップS56に動作を移行する。一方、画像データサイズSbeが、画像データサイズの上限値Sbmaxよりも小さいという緩い条件を満たした場合、圧縮処理部18は、画質一定モードの画像圧縮が一応完了したと判断して、圧縮動作を終了する。
In step S54, the compression processing unit 18 reads the image data from a buffer (not shown) of the image processing unit 17, and compresses it with the censoring scale factor SF be determined in step S41.
In step S55, the compression processing unit 18 determines whether or not the image data size S be obtained by the compression in step S54 is smaller than the upper limit value S bmax of the image data size. If the image data size S be is larger than the upper limit value S bmax of the image data size, the compression processing unit 18 shifts the operation to step S56. On the other hand, when the loose condition that the image data size S be is smaller than the upper limit value S bmax of the image data size is satisfied, the compression processing unit 18 determines that the image compression in the constant image quality mode has been completed, and performs compression. End the operation.

ステップS56において、圧縮処理部18は、ここまでの圧縮試行回数が制限回数を超えたか否かを判定する。ここまでの圧縮試行回数が制限回数を超えていた場合、圧縮処理部18は、最終の圧縮結果をもって、圧縮処理を打ち切る。一方、ここまでの圧縮試行回数が制限回数をまだ超えていない場合、圧縮処理部18は、ステップS27に動作を移行する。   In step S56, the compression processing unit 18 determines whether or not the number of compression attempts so far exceeds the limit number. If the number of compression attempts so far exceeds the limit number, the compression processing unit 18 terminates the compression process with the final compression result. On the other hand, if the number of compression attempts so far has not yet exceeded the limit number, the compression processing unit 18 proceeds to step S27.

ステップS57において、圧縮処理部18は、現在の打ち切りスケールファクタSFbeを所定倍(例えば1.5倍)して、動作をステップS54に戻す。
以上説明したように、第2実施形態によれば、画質一定モード(均質な画像を生成する第1の圧縮モード)が選択された場合にスケールファクタを調整する際の下限値(SFbmin)を、サイズ一定モード(略一定の符号量の画像データを生成する第2の圧縮モード)が選択された場合にスケールファクタを調整する際の下限値(SFamin)よりも小さく設定する。
In step S57, the compression processing unit 18 multiplies the current censoring scale factor SF be by a predetermined value (for example, 1.5 times), and returns the operation to step S54.
As described above, according to the second embodiment, when the constant image quality mode (first compression mode for generating a homogeneous image) is selected, the lower limit value (SF bmin ) for adjusting the scale factor is set. When the constant size mode (second compression mode for generating image data having a substantially constant code amount) is selected, the scale factor is set to be smaller than the lower limit (SF amin ) when adjusting the scale factor.

また、第2実施形態によれば、判定を行う際の画像データサイズ(符号量)の下限値を、画質一定モード(均質な画像を生成する第1の圧縮モード)が選択された場合と、サイズ一定モード(略一定の符号量の画像データを生成する第2の圧縮モード)が選択された場合とで等しく設定する(Samin=Sbmin)。
したがって、画質一定モードのほうが、サイズ一定モードよりも常に画質の良い画像を生成するように管理することができる。そのため、ユーザの意図(画質優先/サイズ優先)に沿った撮影を行うことができる。また、画質一定モードにおける画質の低下問題も解消される。
Further, according to the second embodiment, the lower limit value of the image data size (code amount) at the time of determination is selected as the constant image quality mode (first compression mode for generating a homogeneous image), and It is set equal to the case where the constant size mode (second compression mode for generating image data having a substantially constant code amount) is selected (S amin = S bmin ).
Therefore, the constant image quality mode can be managed so as to always generate an image with better image quality than the constant size mode. Therefore, it is possible to perform shooting according to the user's intention (image quality priority / size priority). Also, the image quality degradation problem in the constant image quality mode is solved.

また、サイズ一定モードにおいても、圧縮した結果、画像データサイズが小さい場合には適切にスケールファクタを固定(スケールファクタの下限値SFamin)に切り替えて、圧縮動作を終了するので、圧縮演算の繰り返し等を防ぎ、処理時間を短縮することができる。
また、上述した実施形態では、固定スケールファクタSFfixを、図5に示した条件において決定する例を示したが、本発明はこの例に限定されるものではない。例えば、図6に示すように、固定スケールファクタSFfixを、サイズ一定モードの目標範囲の略中間となる上限値Samaxと下限値Saminとの間に決定する条件としても良いし、またその他の任意の条件において決定しても良い。
Even in the constant size mode, if the image data size is small as a result of compression, the scale factor is appropriately fixed (scale factor lower limit SF amin ) and the compression operation is terminated. The processing time can be shortened.
In the above-described embodiment, an example in which the fixed scale factor SF fix is determined under the conditions shown in FIG. 5 is shown, but the present invention is not limited to this example. For example, as shown in FIG. 6, the fixed scale factor SF fix may be a condition for determining between an upper limit value S amax and a lower limit value S amin that are substantially in the middle of the target range of the constant size mode. It may be determined under any condition.

また、上述した実施形態では、電子カメラとしての実施形態を説明したが、コンピュータに本発明を適用しても良い。すなわち、図7に示すように、制御部101、画像処理部102、圧縮処理部103、操作部104、外部インタフェース部105を備えたコンピュータ100の制御部101に、上述した実施形態の図2〜図4のフローチャートの一部または全部を記録し、各部を介して同様の動作を実行させるようにしても良い。なお、圧縮の対象となる画像は、外部インタフェース部105を介して、電子カメラやスキャナなどの外部機器から取得するようにしても良いし、メモリカードなどの媒体を介して取得するようにしても良い。   In the above-described embodiment, the embodiment as an electronic camera has been described. However, the present invention may be applied to a computer. That is, as illustrated in FIG. 7, the control unit 101 of the computer 100 including the control unit 101, the image processing unit 102, the compression processing unit 103, the operation unit 104, and the external interface unit 105 is connected to FIGS. A part or all of the flowchart of FIG. 4 may be recorded, and the same operation may be executed via each unit. The image to be compressed may be acquired from an external device such as an electronic camera or a scanner via the external interface unit 105, or may be acquired via a medium such as a memory card. good.

電子カメラ10の構成を示すブロック図である。1 is a block diagram showing a configuration of an electronic camera 10. FIG. 第1実施形態の電子カメラ10の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the electronic camera 10 of 1st Embodiment. 第2実施形態の電子カメラ10の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the electronic camera 10 of 2nd Embodiment. 第2実施形態の電子カメラ10の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the electronic camera 10 of 2nd Embodiment. 各種条件について説明する図である。It is a figure explaining various conditions. 各種条件について説明する図である。It is a figure explaining various conditions. コンピュータ100の構成を示すブロック図である。FIG. 2 is a block diagram showing a configuration of a computer 100.

符号の説明Explanation of symbols

10 電子カメラ
11 撮影レンズ
13 撮像素子
15 信号処理部
16 A/D変換部
17,102 画像処理部
18,103 圧縮処理部
19 記録部
21,101 制御部
24 操作釦群
100 コンピュータ
104 操作部
105 外部インタフェース部
DESCRIPTION OF SYMBOLS 10 Electronic camera 11 Shooting lens 13 Image pick-up element 15 Signal processing part 16 A / D conversion part 17,102 Image processing part 18,103 Compression processing part 19 Recording part 21,101 Control part 24 Operation button group 100 Computer 104 Operation part 105 External Interface part

Claims (3)

被写体を撮像して画像データを生成する撮像手段と、
スケールファクタが固定である第1の圧縮アルゴリズムと、スケールファクタが調整可能である第2の圧縮アルゴリズムとのいずれかによって、前記撮像手段により生成された前記画像データを圧縮する圧縮手段と、
前記圧縮手段により圧縮された画像データの符号量が所定の範囲内であるか否かを判定する判定手段と、
均質な画像を生成する第1の圧縮モードと、略一定の符号量の画像データを生成する第2の圧縮モードとのいずれかを、ユーザ操作に基づいて選択する選択手段とを備え、
前記圧縮手段は、前記選択手段により前記第1の圧縮モードが選択された場合に前記スケールファクタを調整する際の下限値を、前記選択手段により前記第2の圧縮モードが選択された場合に前記スケールファクタを調整する際の下限値よりも小さく設定し、
前記選択手段により前記第1の圧縮モードが選択されると、前記圧縮手段は、前記第1の圧縮アルゴリズムによって圧縮を行い、前記判定手段が、前記第1の圧縮アルゴリズムによって圧縮された画像の符号量が所定の範囲内でないと判定した場合には、前記圧縮手段は、前記第2の圧縮アルゴリズムによって圧縮を行い、
前記選択手段により前記第2の圧縮モードが選択されると、前記圧縮手段は、前記第2の圧縮アルゴリズムによって圧縮を行う
ことを特徴とする電子カメラ。
Imaging means for imaging a subject and generating image data;
Compression means for compressing the image data generated by the imaging means by any one of a first compression algorithm having a fixed scale factor and a second compression algorithm having an adjustable scale factor;
Determination means for determining whether or not the code amount of the image data compressed by the compression means is within a predetermined range;
Selecting means for selecting one of a first compression mode for generating a homogeneous image and a second compression mode for generating image data having a substantially constant code amount based on a user operation;
The compression means sets a lower limit value for adjusting the scale factor when the first compression mode is selected by the selection means, and the compression means when the second compression mode is selected by the selection means. Set smaller than the lower limit when adjusting the scale factor,
When the first compression mode is selected by the selection unit, the compression unit performs compression using the first compression algorithm, and the determination unit encodes an image code compressed by the first compression algorithm. If it is determined that the amount is not within the predetermined range, the compression means performs compression by the second compression algorithm;
When the second compression mode is selected by the selection unit, the compression unit performs compression using the second compression algorithm.
請求項1に記載の電子カメラにおいて、
前記判定手段は、判定を行う際の前記符号量の下限値を、前記選択手段により前記第1の圧縮モードが選択された場合と、前記選択手段により前記第2の圧縮モードが選択された場合とで等しく設定する
ことを特徴とする電子カメラ。
The electronic camera according to claim 1,
The determination means sets the lower limit value of the code amount used for the determination when the selection means selects the first compression mode and when the selection means selects the second compression mode. An electronic camera characterized by being set equal to each other.
コンピュータを、請求項1又は請求項2に記載の圧縮手段、判定手段、選択手段として機能させるための画像処理プログラム。An image processing program for causing a computer to function as the compression unit, the determination unit, and the selection unit according to claim 1.
JP2005267177A 2004-09-15 2005-09-14 Electronic camera and image processing program Expired - Fee Related JP4631629B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005267177A JP4631629B2 (en) 2004-09-15 2005-09-14 Electronic camera and image processing program

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2004268520 2004-09-15
JP2005267177A JP4631629B2 (en) 2004-09-15 2005-09-14 Electronic camera and image processing program

Publications (2)

Publication Number Publication Date
JP2006115483A JP2006115483A (en) 2006-04-27
JP4631629B2 true JP4631629B2 (en) 2011-02-16

Family

ID=36383542

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005267177A Expired - Fee Related JP4631629B2 (en) 2004-09-15 2005-09-14 Electronic camera and image processing program

Country Status (1)

Country Link
JP (1) JP4631629B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP4795160B2 (en) * 2006-08-08 2011-10-19 キヤノン株式会社 Image processing apparatus, control method therefor, computer program, and computer-readable storage medium
JP4795161B2 (en) * 2006-08-08 2011-10-19 キヤノン株式会社 Image processing apparatus, control method therefor, computer program, and computer-readable storage medium
JP2015053590A (en) 2013-09-06 2015-03-19 三星ディスプレイ株式會社Samsung Display Co.,Ltd. Image encoding device and image encoding method

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000324449A (en) * 1999-05-14 2000-11-24 Canon Inc Picture recording device, picture recording method and computer readable storage medium
JP2001054115A (en) * 1999-08-17 2001-02-23 Nikon Corp Electronic camera and recording medium recording image processing program

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2000324449A (en) * 1999-05-14 2000-11-24 Canon Inc Picture recording device, picture recording method and computer readable storage medium
JP2001054115A (en) * 1999-08-17 2001-02-23 Nikon Corp Electronic camera and recording medium recording image processing program

Also Published As

Publication number Publication date
JP2006115483A (en) 2006-04-27

Similar Documents

Publication Publication Date Title
US5384644A (en) Image processing method and apparatus for encoding variable-length data
US8363717B2 (en) Image processing apparatus
EP0888010A2 (en) Image encoding method and apparatus
US8587683B2 (en) Imaging apparatus having improved usability when moving images and still images are recorded
JP4682990B2 (en) Camera image compression processing apparatus and compression processing method
JP5153674B2 (en) Moving picture coding apparatus and moving picture coding method
JP4359773B2 (en) Image compression processing apparatus, image compression processing method, and image compression processing program
JP2008113070A (en) Imaging device and imaging method
JP4631629B2 (en) Electronic camera and image processing program
JP2002247518A (en) Electronic camera and image processing program
CN107509019A (en) Picture pick-up device, image capture method and non-transient computer-readable media
JP4407055B2 (en) Electronic camera
JPH09247675A (en) Image compression method and image compression system
JP2005260467A (en) Image processor
JP3858528B2 (en) Electronic camera and recording medium on which image processing program is recorded
JP4375662B2 (en) Image processing apparatus, image processing method, program, information recording medium, and imaging apparatus
JPH10271498A (en) Compression data conversion method, information quantity conversion method for image compression data, and image recorder adopting the method
KR100792247B1 (en) System for processing image data and method therefor
JP4430731B2 (en) Digital camera and photographing method
JP2006101153A (en) Image generating device and method therefor
JP4706567B2 (en) Image processing method, image processing method program, recording medium storing image processing method program, and image processing apparatus
JP4273586B2 (en) Electronic camera and recording medium on which image processing program is recorded
JP3121044B2 (en) Imaging device
JP4200609B2 (en) Electronic camera and recording medium on which image processing program is recorded
US7120304B2 (en) Image data compressing apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20080822

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20100311

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20100406

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20100602

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: 20101019

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: 20101101

R150 Certificate of patent or registration of utility model

Ref document number: 4631629

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20131126

Year of fee payment: 3

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

Free format text: PAYMENT UNTIL: 20131126

Year of fee payment: 3

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees