JP4701065B2 - Image processing apparatus and image processing method - Google Patents

Image processing apparatus and image processing method Download PDF

Info

Publication number
JP4701065B2
JP4701065B2 JP2005302160A JP2005302160A JP4701065B2 JP 4701065 B2 JP4701065 B2 JP 4701065B2 JP 2005302160 A JP2005302160 A JP 2005302160A JP 2005302160 A JP2005302160 A JP 2005302160A JP 4701065 B2 JP4701065 B2 JP 4701065B2
Authority
JP
Japan
Prior art keywords
image data
compression
histogram
decompression
image
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
JP2005302160A
Other languages
Japanese (ja)
Other versions
JP2007110652A (en
JP2007110652A5 (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.)
Canon Inc
Original Assignee
Canon Inc
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 Canon Inc filed Critical Canon Inc
Priority to JP2005302160A priority Critical patent/JP4701065B2/en
Publication of JP2007110652A publication Critical patent/JP2007110652A/en
Publication of JP2007110652A5 publication Critical patent/JP2007110652A5/ja
Application granted granted Critical
Publication of JP4701065B2 publication Critical patent/JP4701065B2/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)
  • Compression, Expansion, Code Conversion, And Decoders (AREA)

Description

本発明は画像処理装置及び画像処理方法に関し、特に、画像を非可逆圧縮する画像処理装置及び画像処理方法に関する。   The present invention relates to an image processing apparatus and an image processing method, and more particularly to an image processing apparatus and an image processing method for irreversibly compressing an image.

画像処理装置であるデジタルカメラは、一般的に、撮像した画像(以下、「撮像画像」と呼ぶ)に輝度補正やホワイトバランス処理などを施した後、JPEG符号化などの非可逆圧縮を施し、記憶媒体に記録する。   A digital camera that is an image processing apparatus generally performs brightness correction, white balance processing, and the like on a captured image (hereinafter referred to as “captured image”), and then performs irreversible compression such as JPEG encoding. Record on a storage medium.

撮像画像を非可逆圧縮すると、撮像画像のデータサイズは小さくなるが、画像品質(以下、「画質」と呼ぶ)は低下する。さらに、圧縮率を高くすればするほどデータサイズはさらに小さくなるが、画質はさらに低下する。したがって、データサイズを小さくすることと画質を向上させることの間にはトレードオフの関係がある。JPEG符号化に際して、データサイズと画質を決定するパラメータ(以下、「圧縮パラメータ」と呼ぶ)として、量子化テーブルが用いられる。しかし、データサイズを極力小さくしつつ、ユーザの満足する画質を得るために適切な圧縮パラメータをユーザ自身が決定することは、困難である。   When the captured image is irreversibly compressed, the data size of the captured image is reduced, but the image quality (hereinafter referred to as “image quality”) is degraded. Furthermore, the higher the compression ratio, the smaller the data size, but the image quality further decreases. Therefore, there is a trade-off relationship between reducing the data size and improving the image quality. In JPEG encoding, a quantization table is used as a parameter for determining data size and image quality (hereinafter referred to as “compression parameter”). However, it is difficult for the user himself / herself to determine appropriate compression parameters in order to obtain image quality that satisfies the user while minimizing the data size.

この問題に関して、特許文献1は、サイズ一定モードと画質一定モードの2つの符号化モードを備えるデジタルカメラを開示する。特許文献1のデジタルカメラによれば、符号化モードがサイズ一定モードの場合、JPEG符号化に際して、撮像画像が一定の範囲内のデータサイズとなるような圧縮パラメータが使用される。一方、符号化モードが画質一定モードの場合、JPEG符号化に際して、撮像画像の画質が一定の範囲内の品質になるような圧縮パラメータが使用される。
特開2001−54115号公報
Regarding this problem, Patent Document 1 discloses a digital camera having two encoding modes, a constant size mode and a constant image quality mode. According to the digital camera of Patent Document 1, when the encoding mode is the constant size mode, compression parameters are used so that the captured image has a data size within a predetermined range during JPEG encoding. On the other hand, when the encoding mode is the constant image quality mode, compression parameters are used so that the image quality of the captured image becomes a quality within a certain range during JPEG encoding.
JP 2001-54115 A

しかしながら、特許文献1のデジタルカメラは、撮像画像を画質一定モードでJPEG符号化する場合、固定された特定の圧縮パラメータを使用するが、符号化後の撮像画像の画質を定量的に評価することができない。そのため、撮像画像の画質が実際にユーザの望む水準以上であることが保証されない。   However, the digital camera of Patent Document 1 uses a fixed specific compression parameter when JPEG encoding a captured image in the constant image quality mode, but quantitatively evaluates the image quality of the captured image after encoding. I can't. Therefore, it is not guaranteed that the image quality of the captured image is actually higher than the level desired by the user.

本発明はこのような状況に鑑みてなされたものであり、ユーザが圧縮パラメータを決定する必要無しに、画質が一定水準以上となるように画像を非可逆圧縮する技術を提供することを目的とする。   The present invention has been made in view of such a situation, and an object of the present invention is to provide a technique for irreversibly compressing an image so that the image quality becomes a certain level or more without the need for a user to determine a compression parameter. To do.

上記課題を解決するために、本発明の画像処理装置は、圧縮パラメータに基づいて所定の圧縮率で第1の画像データを非可逆圧縮して第2の画像データを生成する圧縮手段と、前記第2の画像データを伸長して第3の画像データを生成する伸長手段と、前記第3の画像データから、輝度成分及び複数の色成分のうち少なくともいずれか1成分に対応するヒストグラムを生成する生成手段と、前記生成手段によりヒストグラムが生成されると、当該ヒストグラムの各階級について隣接する階級からの度数の変化の割合が所定の割合を超える階級の数が所定の数より大である場合に、前記圧縮率を変更する変更手段と、を備え、前記変更手段により前記圧縮率が変更された場合、変更された圧縮率での前記圧縮手段による非可逆圧縮、当該非可逆圧縮により生成された画像データの前記伸長手段による伸長、及び当該伸長により生成された画像データに関する前記生成手段によるヒストグラムの生成を再度行うことを特徴とする。 In order to solve the above problems, an image processing apparatus according to the present invention includes: a compression unit configured to generate second image data by irreversibly compressing first image data at a predetermined compression rate based on a compression parameter; A decompression unit that decompresses the second image data to generate third image data, and generates a histogram corresponding to at least one of a luminance component and a plurality of color components from the third image data. When the histogram is generated by the generation unit and the generation unit, the number of classes whose frequency change rate from the adjacent class exceeds a predetermined ratio for each class of the histogram is greater than a predetermined number. , and a changing means for changing the compression ratio, when the compression ratio is changed by the changing means, lossy compression by the compression means in the modified compression ratio, the irreversible Extended by the extension means of the image data generated by condensation, and is characterized in that for generating a histogram again by the generating means to an image data generated by the extension.

また、本発明の画像処理方法は、圧縮パラメータに基づいて所定の圧縮率で第1の画像データを非可逆圧縮して第2の画像データを生成する圧縮工程と、前記第2の画像データを伸長して第3の画像データを生成する伸長工程と、前記第3の画像データから、輝度成分及び複数の色成分のうち少なくともいずれか1成分に対応するヒストグラムを生成する生成工程と、前記生成工程によりヒストグラムが生成されると、当該ヒストグラムの各階級について隣接する階級からの度数の変化の割合が所定の割合を超える階級の数が所定の数より大である場合に、前記圧縮率を変更する変更工程と、を備え、前記変更工程により前記圧縮率が変更された場合、変更された圧縮率での前記圧縮工程による非可逆圧縮、当該非可逆圧縮により生成された画像データの前記伸長工程による伸長、及び当該伸長により生成された画像データに関する前記生成工程によるヒストグラムの生成を再度行うことを特徴とする。 The image processing method of the present invention includes a compression step of irreversibly compressing the first image data at a predetermined compression rate based on a compression parameter to generate the second image data, and the second image data Decompression step of decompressing and generating third image data, generation step of generating a histogram corresponding to at least one of a luminance component and a plurality of color components from the third image data, and the generation When a histogram is generated by the process, the compression ratio is changed when the number of classes whose frequency change from an adjacent class exceeds a predetermined ratio is greater than a predetermined number for each class of the histogram. comprising a changing step of, the, if the compression ratio by said changing step is changed, the non-reversible compression by the compression process in the modified compression ratio, generated by the lossy compression And performing elongation by the stretching process of the image data, and the generation of the histogram by the generating step to an image data generated by the extension again.

なお、その他の本発明の特徴は、添付図面及び以下の発明を実施するための最良の形態の記載によっていっそう明らかになるものである。   Other features of the present invention will become more apparent from the accompanying drawings and the following description of the best mode for carrying out the invention.

以上の構成により、本発明によれば、ユーザが圧縮パラメータを決定する必要無しに、画質が一定水準以上となるように画像を非可逆圧縮することが可能となる。   With the above configuration, according to the present invention, it is possible to perform irreversible compression of an image so that the image quality becomes a certain level or more without the need for the user to determine a compression parameter.

以下、添付図面を参照して、本発明の上位概念、中位概念および下位概念の理解に役立つ実施形態を示す。なお、以下の実施形態に含まれる概念について、そのすべてが特許請求の範囲に記載されているとは限らない。ただし、これは特許発明の技術的範囲から意識的に除外したのではないことを理解していただきたい。   DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS Embodiments useful for understanding the general concept, intermediate concept, and subordinate concept of the present invention will be described below with reference to the accompanying drawings. Note that not all of the concepts included in the following embodiments are described in the claims. However, it should be understood that this is not intentionally excluded from the technical scope of the patented invention.

[第1の実施形態]
<デジタルカメラ100の構成>
図1は、本発明を適用する画像処理装置である、デジタルカメラ100の構成を示す機能ブロック図である。
[First Embodiment]
<Configuration of Digital Camera 100>
FIG. 1 is a functional block diagram showing a configuration of a digital camera 100 that is an image processing apparatus to which the present invention is applied.

レンズユニット10は、光学レンズ、ズーム機構、絞り機構などから構成され、入射
した光を撮像素子12に結像させる。
The lens unit 10 includes an optical lens, a zoom mechanism, a diaphragm mechanism, and the like, and forms incident light on the image sensor 12.

撮像素子12は、光信号をアナログ電気信号に変換するものであり、例えばCCD(電荷結合素子)である。   The image pickup device 12 converts an optical signal into an analog electric signal, and is, for example, a CCD (charge coupled device).

A/D変換器14は、撮像素子12が出力したアナログ電気信号をデジタル電気信号に変換するものである。このデジタル電気信号は、圧縮前の撮像画像データである。A/D変換器14から出力される画像データは、画像処理回路20およびメモリ制御回路18を介して、或いは画像処理回路20を介することなくメモリ制御回路18のみを介して、メモリ22又は記憶媒体24に記録される。   The A / D converter 14 converts the analog electric signal output from the image sensor 12 into a digital electric signal. This digital electrical signal is captured image data before compression. The image data output from the A / D converter 14 is sent to the memory 22 or the storage medium via the image processing circuit 20 and the memory control circuit 18 or only through the memory control circuit 18 without going through the image processing circuit 20. 24.

タイミング発生回路16は、撮像素子12、A/D変換器14、D/A変換器30にクロック信号や制御信号を供給するタイミング発生回路であり、システム制御部50により制御される。   The timing generation circuit 16 is a timing generation circuit that supplies a clock signal and a control signal to the image sensor 12, the A / D converter 14, and the D / A converter 30, and is controlled by the system control unit 50.

メモリ制御回路18は、A/D変換器14、画像処理回路20、メモリ22、記憶媒体24、圧縮・伸長回路26、ヒストグラム取得回路28、D/A変換器30の間におけるデータ転送の制御を行う。   The memory control circuit 18 controls data transfer among the A / D converter 14, the image processing circuit 20, the memory 22, the storage medium 24, the compression / decompression circuit 26, the histogram acquisition circuit 28, and the D / A converter 30. Do.

画像処理回路20は、A/D変換器14から出力される画像データ、又は、メモリ制御回路18から出力される画像データに対して、例えば、画像補間処理や色変換処理、変倍処理等の画像処理を施す。   The image processing circuit 20 performs, for example, image interpolation processing, color conversion processing, scaling processing, or the like on the image data output from the A / D converter 14 or the image data output from the memory control circuit 18. Apply image processing.

メモリ22は、撮像画像データに対する画像処理時や圧縮・伸長時の作業領域として使用したり、画像表示部32に表示する画像データを格納するために使用したりするメモリであり、デジタルカメラ100に内蔵されている。メモリ22は、所定枚数の静止画像や所定時間の動画像を格納するために十分な記憶容量を備えている。また、メモリ22は、システム制御部50の作業領域としても使用されうる。   The memory 22 is a memory that is used as a work area at the time of image processing or compression / decompression of captured image data, or used to store image data to be displayed on the image display unit 32. Built in. The memory 22 has a sufficient storage capacity for storing a predetermined number of still images and a moving image for a predetermined time. The memory 22 can also be used as a work area for the system control unit 50.

記憶媒体24は、画像データを記録するためのものである。記憶媒体24には、半導体メモリ(例えばメモリカード)や磁気ディスク(例えばハードディスク)などが使用され、デジタルカメラ100に内蔵されているものもあれば、着脱可能なものもある。   The storage medium 24 is for recording image data. As the storage medium 24, a semiconductor memory (for example, a memory card), a magnetic disk (for example, a hard disk), or the like is used, and there are a storage medium 24 built in the digital camera 100 and a removable medium.

圧縮・伸長回路26は、例えばJPEG符号化により画像データを圧縮したり、圧縮された画像データを伸長したりする。圧縮・伸長回路26は、メモリ22又は記憶媒体24に格納されている画像データを読み込んで、圧縮処理又は伸長処理を行い、処理済みの画像データをメモリ22及び記憶媒体24のうち少なくとも一方に書き込む。   The compression / decompression circuit 26 compresses image data by JPEG encoding, for example, or decompresses the compressed image data. The compression / decompression circuit 26 reads image data stored in the memory 22 or the storage medium 24, performs compression processing or expansion processing, and writes the processed image data to at least one of the memory 22 and the storage medium 24. .

ヒストグラム取得回路28は、圧縮・伸長回路26によって圧縮された後に再度伸長されてメモリ22に格納されている画像データを読み込み、画像データの輝度や所定色の度数分布を取得してヒストグラムを生成し、保持する。なお、ヒストグラム取得回路28が読み込む画像データは、圧縮・伸長回路26によって圧縮された後に再度伸長された画像データ(すなわち、画質がある程度低下している画像データ)である。ヒストグラム取得回路28の詳細は、図2を参照して後にさらに説明する。   The histogram acquisition circuit 28 reads the image data that has been compressed by the compression / decompression circuit 26 and then decompressed and stored in the memory 22, acquires the luminance of the image data and the frequency distribution of a predetermined color, and generates a histogram. ,Hold. The image data read by the histogram acquisition circuit 28 is image data that has been compressed by the compression / decompression circuit 26 and then expanded again (that is, image data whose image quality has deteriorated to some extent). Details of the histogram acquisition circuit 28 will be further described later with reference to FIG.

D/A変換器30は、デジタル電気信号(すなわち画像データ)をアナログ電気信号に変換する。   The D / A converter 30 converts a digital electric signal (that is, image data) into an analog electric signal.

画像表示部32は、例えば、TFT LCD等で構成される。メモリ22に書き込まれた表示用の画像データは、D/A変換器30を介して画像表示部32に供給され、画像表示部32によって表示される。   The image display unit 32 is configured by, for example, a TFT LCD or the like. The display image data written in the memory 22 is supplied to the image display unit 32 via the D / A converter 30 and displayed by the image display unit 32.

また、レンズユニット10が捉えた画像を画像表示部32に逐次表示することにより、電子ビューファインダ(EVF)機能を実現することができる。さらに、画像表示部32には、撮像に必要な情報表示、例えば合焦表示、手振れ警告表示、フラッシュ充電表示、シャッタースピード表示、絞り値表示、露出補正表示等を行うことができる。   In addition, by sequentially displaying images captured by the lens unit 10 on the image display unit 32, an electronic viewfinder (EVF) function can be realized. Further, the image display unit 32 can display information necessary for imaging, for example, focus display, camera shake warning display, flash charge display, shutter speed display, aperture value display, exposure correction display, and the like.

この他にも、画像表示部32は、撮像画像のいわゆるレックビュー表示を行ったり、画像データの撮像情報、輝度又は所定色のヒストグラム情報を画像データと同時に表示したりする、情報表示付き再生機能を実現可能に構成されてもよい。   In addition to this, the image display unit 32 performs a so-called rec view display of the captured image, or displays the image information of the image data, the luminance or the histogram information of a predetermined color at the same time as the image data. May be configured to be feasible.

また、画像表示部32には、圧縮処理された画像データの画質が所定の水準以下である場合に警告を表示したり、ユーザが圧縮パラメータを設定する為のメニューを表示したりすることもできる。   The image display unit 32 can display a warning when the image quality of the compressed image data is below a predetermined level, or can display a menu for the user to set compression parameters. .

光学ファインダ34は、画像表示部32によるEVF機能を使用することなしに撮像を行うことを可能にする。また、光学ファインダ34内には、画像表示部32による撮像に必要な情報表示(すなわち、合焦表示、手振れ警告表示、フラッシュ充電表示、シャッタースピード表示、絞り値表示、露出補正表示等)と同様の表示を行うための素子が設置されている。   The optical finder 34 enables imaging without using the EVF function of the image display unit 32. Further, in the optical viewfinder 34, the same information display as necessary for imaging by the image display unit 32 (that is, focus display, camera shake warning display, flash charge display, shutter speed display, aperture value display, exposure correction display, etc.) is performed. An element for performing the display is installed.

フラッシュ36は、暗所における撮像時に投光を行う。フラッシュ36はまた、AF(オートフォーカス)補助光の投光機能やフラッシュ調光機能も有する。   The flash 36 projects light during imaging in a dark place. The flash 36 also has an AF (autofocus) auxiliary light projecting function and a flash light control function.

レンズ制御部38はレンズユニット10の制御部であり、システム制御部50の指示に従ってレンズユニット10の焦点制御、ズーム制御、絞り値、シャッタースピードの制御等を行う。   The lens control unit 38 is a control unit of the lens unit 10 and performs focus control, zoom control, aperture value, shutter speed control, and the like of the lens unit 10 in accordance with instructions from the system control unit 50.

モードダイアル40は、ユーザがデジタルカメラ100の動作モードを選択するために使用される。これによりユーザは、電源オフ、自動撮像モード、マニュアル撮像モード、パノラマ撮像モード、再生モード、動画モード、等の各機能モードを選択することができる。   The mode dial 40 is used for the user to select an operation mode of the digital camera 100. Thereby, the user can select each function mode such as power-off, automatic imaging mode, manual imaging mode, panoramic imaging mode, playback mode, and moving image mode.

シャッタースイッチ42は、シャッターボタン44の操作途中(半押し)で、AF処理、AE(自動露出)処理、AWB(オートホワイトバランス)処理、EF(フラッシュプリ発光)処理等の動作の開始をシステム制御部50に指示する。   The shutter switch 42 controls the start of operations such as AF processing, AE (automatic exposure) processing, AWB (auto white balance) processing, and EF (flash pre-flash) processing while the shutter button 44 is being operated (halfway). The unit 50 is instructed.

また、シャッタースイッチ42は、シャッターボタン44の操作完了(全押し)で、一連の撮像・記録処理の開始をシステム制御部50に指示する。撮像・記録処理においては、まず、撮像素子12から出力されるアナログ信号がA/D変換器14によりデジタル信号すなわち画像データに変換される。この画像データは、メモリ制御回路18を介してメモリ22に格納され、メモリ制御回路18を介して画像処理回路20において画像処理され、メモリ制御回路18を介して圧縮・伸長回路26において圧縮処理される。次いで、圧縮処理された画像データは、メモリ制御回路18を介してメモリ22から読み出され、記憶媒体24へ書き込まれる。   The shutter switch 42 instructs the system control unit 50 to start a series of imaging / recording processes when the operation of the shutter button 44 is completed (fully pressed). In the imaging / recording process, first, an analog signal output from the imaging device 12 is converted into a digital signal, that is, image data by the A / D converter 14. This image data is stored in the memory 22 via the memory control circuit 18, subjected to image processing in the image processing circuit 20 via the memory control circuit 18, and compressed in the compression / decompression circuit 26 via the memory control circuit 18. The Next, the compressed image data is read from the memory 22 via the memory control circuit 18 and written to the storage medium 24.

表示切替スイッチ46は、画像表示部32の表示を制御するために使用される。撮像時においては、表示切替スイッチ46が押されると、画像表示部32を利用したEVF機能の、ON/OFFを切り替える指示がシステム制御部50になされる。再生時においては、表示切替スイッチ46が押されると、情報表示付き再生機能のON/OFFを切り替える指示がシステム制御部50になされる。   The display changeover switch 46 is used to control the display of the image display unit 32. At the time of imaging, when the display changeover switch 46 is pressed, an instruction to switch ON / OFF of the EVF function using the image display unit 32 is given to the system control unit 50. At the time of reproduction, when the display changeover switch 46 is pressed, the system control unit 50 is instructed to turn on / off the reproduction function with information display.

セレクトボタン48は、ユーザが画像表示部32に表示されるメニューに従って、圧縮パラメータの選択を行い、システム制御部50に選択された圧縮パラメータを通知するために使用される。   The select button 48 is used for the user to select a compression parameter according to a menu displayed on the image display unit 32 and to notify the system control unit 50 of the selected compression parameter.

システム制御部50は、メモリ52に格納されているプログラム(ファームウェア)を実行することにより、デジタルカメラ100全体を制御する。例えば、システム制御部50は、圧縮・伸長回路26に対して圧縮パラメータの指示を行う。また、ヒストグラム取得回路28で取得した画像データのヒストグラム解析情報を取得し、ヒストグラム解析情報に基づいてデジタルカメラ100の制御を行う。   The system control unit 50 controls the entire digital camera 100 by executing a program (firmware) stored in the memory 52. For example, the system control unit 50 instructs the compression / decompression circuit 26 to specify compression parameters. Further, histogram analysis information of the image data acquired by the histogram acquisition circuit 28 is acquired, and the digital camera 100 is controlled based on the histogram analysis information.

メモリ52は、システム制御部50が実行するファームウェアや、システム制御部50がファームウェアを実行する際に参照する定数、変数、圧縮パラメータ等を記憶する。   The memory 52 stores firmware executed by the system control unit 50, constants, variables, compression parameters, and the like referred to when the system control unit 50 executes the firmware.

電源制御部60は、例えば電池検出回路、DC−DCコンバータ、通電するブロックを切り替えるスイッチ回路等により構成される。電源制御部60は、電池装着の有無、電池の種類及び電池残量を検出し、その検出結果及びシステム制御部50の指示に基づいてDC−DCコンバータを制御して、必要な電圧を必要な期間だけデジタルカメラ100の各構成要素に供給する。   The power control unit 60 includes, for example, a battery detection circuit, a DC-DC converter, a switch circuit that switches a block to be energized, and the like. The power supply control unit 60 detects the presence / absence of a battery, the type of battery, and the remaining battery level, and controls the DC-DC converter based on the detection result and an instruction from the system control unit 50 to obtain a necessary voltage. It supplies to each component of the digital camera 100 only for a period.

コネクタ62は、電源制御部60と電源部64を接続する。   The connector 62 connects the power supply control unit 60 and the power supply unit 64.

電源部64は、例えばアルカリ電池やリチウム電池等の一次電池、Li電池等の二次電池、ACアダプタ等で構成され、デジタルカメラ100に電力を供給する。   The power supply unit 64 includes, for example, a primary battery such as an alkaline battery or a lithium battery, a secondary battery such as a Li battery, an AC adapter, and the like, and supplies power to the digital camera 100.

図2は、ヒストグラム取得回路28の詳細な構成を示す機能ブロック図である。   FIG. 2 is a functional block diagram showing a detailed configuration of the histogram acquisition circuit 28.

色空間変換回路202は、YUV色空間により表現される画像データ(以下、「YUVデータ」と呼ぶ)をRGB色空間により表現される画像データ(以下、「RGBデータ」と呼ぶ)に変換する。色空間変換回路202は、圧縮・伸長回路26によって伸長されてメモリ22に格納されているYUVデータを、メモリ制御回路18を介して取得し、システム制御部50から指示される変換式に従ってRGBデータへ変換する。   The color space conversion circuit 202 converts image data expressed in the YUV color space (hereinafter referred to as “YUV data”) into image data expressed in the RGB color space (hereinafter referred to as “RGB data”). The color space conversion circuit 202 acquires the YUV data decompressed by the compression / decompression circuit 26 and stored in the memory 22 via the memory control circuit 18, and the RGB data according to the conversion formula instructed from the system control unit 50. Convert to

セレクタ204は、システム制御回路50の指示に従い、メモリ制御回路18から入力されるYUVRGBの各成分から、ヒストグラムを生成する対象の成分を選択する。   The selector 204 selects a target component for generating a histogram from the YUVRGB components input from the memory control circuit 18 in accordance with an instruction from the system control circuit 50.

積分回路206は、セレクタ204からの入力に応じて、RAM208の読み出しアドレスを決定し、データの読み出しを行う。積分回路206は読み出した値をインクリメントし、積分回路206の同一アドレスへインクリメント後の値を書き戻す。   The integration circuit 206 determines the read address of the RAM 208 in accordance with the input from the selector 204 and reads the data. The integration circuit 206 increments the read value and writes the incremented value back to the same address of the integration circuit 206.

ここで、積分回路206は、画像データのすべての画素に対して上述の処理を行う。例えば、画像データが横1600画素×縦1200画素=約200万画素の場合を考える。積分回路206は、約200万のすべての画素について、以下の(1)〜(4)の処理を行う。
(1)輝度を判定する。
(2)RAM208の、(1)で判定された輝度に対応するアドレスから、度数を読み出す。
(3)(2)で読み出した度数をインクリメントする。
(4)(3)でインクリメントした値を、(2)で読み出したRAM208のアドレスに書き込む。
Here, the integration circuit 206 performs the above-described processing on all the pixels of the image data. For example, consider a case where the image data is 1600 pixels wide × 1200 pixels vertically = approximately 2 million pixels. The integration circuit 206 performs the following processes (1) to (4) for all about 2 million pixels.
(1) The brightness is determined.
(2) The frequency is read from the address of the RAM 208 corresponding to the luminance determined in (1).
(3) The frequency read in (2) is incremented.
(4) The value incremented in (3) is written to the address of the RAM 208 read out in (2).

RAM208は、メモリ制御回路18から入力されるYUVRGBの各成分のうち少なくともいずれかに関するヒストグラムを保持するためのものである。システム制御部50は、RAM208の保持するヒストグラムを読み出したり、消去したりすることができる。   The RAM 208 is for holding a histogram relating to at least one of the YUVRGB components input from the memory control circuit 18. The system control unit 50 can read or delete the histogram held in the RAM 208.

RAM208は、保持するヒストグラムの数及び分解能に応じたアドレス空間を必要とする。例えば、Y成分を256階調で表現する1個のヒストグラムを保持する場合には、8ビットのアドレス空間が必要となる(2の8乗は256であるため)。   The RAM 208 requires an address space corresponding to the number of histograms to be held and the resolution. For example, when holding one histogram expressing the Y component in 256 gradations, an 8-bit address space is required (since 2 8 is 256).

<ヒストグラムの解析と画質の判定>
図3及び図4を参照して、システム制御部50がヒストグラム取得回路28から取得したヒストグラムを元に、圧縮された画像データの画質が所定の水準以上であるか否かを判定する処理の概要を説明する。なお、以下では画像データの輝度(Y成分)にのみ注目して説明するが、RGBの各成分に関しても同様のことが言える。また、輝度を256階調として説明するが、これに限られず、例えば1024階調などでもよい。
<Histogram analysis and image quality determination>
Referring to FIGS. 3 and 4, an outline of processing for determining whether the image quality of the compressed image data is equal to or higher than a predetermined level based on the histogram acquired by the system control unit 50 from the histogram acquisition circuit 28. Will be explained. In the following description, only the luminance (Y component) of the image data will be described. However, the same applies to the RGB components. In addition, although the luminance is described as 256 gradations, the present invention is not limited to this, and may be, for example, 1024 gradations.

図3は、ヒストグラム取得回路28が、圧縮・伸長回路26により圧縮された後に再度伸長された画像データのY成分を元に生成したヒストグラムの一例を示す図である。   FIG. 3 is a diagram showing an example of a histogram generated by the histogram acquisition circuit 28 based on the Y component of the image data that has been compressed by the compression / decompression circuit 26 and then expanded again.

図3(a)は、画質劣化が小さく、画質が所定の水準以上である画像データから生成された、輝度のヒストグラムである。図3(b)は、画質劣化が大きく、画質が所定の水準未満の画像データから生成された、輝度のヒストグラムである。画質劣化が大きいということは、圧縮パラメータに含まれる量子化テーブルの値が大きすぎた、すなわち圧縮率が高すぎたということを意味する。   FIG. 3A is a luminance histogram generated from image data with small image quality deterioration and image quality of a predetermined level or higher. FIG. 3B is a luminance histogram generated from image data having a large image quality deterioration and an image quality less than a predetermined level. The large image quality degradation means that the value of the quantization table included in the compression parameter is too large, that is, the compression rate is too high.

本来の自然画像に近い、画質劣化の少ない画像データにおいては、輝度のヒストグラムは図3(a)に示すように緩やかに変化する。しかし、過度に高い圧縮率で圧縮したために画像品質が低下した画像データにおいては、輝度のヒストグラムは図3(b)に示すように急激に変化する。   In image data that is close to the original natural image and has little image quality deterioration, the luminance histogram changes gently as shown in FIG. However, in image data whose image quality has deteriorated due to compression at an excessively high compression rate, the luminance histogram changes abruptly as shown in FIG.

図4は、図3で示したヒストグラムの輝度に関する隣接度数変化の割合を示す図である。隣接度数変化の割合は、次式で定義される。

(隣接度数変化の割合)=ヒストグラム[n]/ヒストグラム[n−1]×100

ただし、nは輝度であり、n=1,2,3,...,255である。また、ヒストグラム[n]は、輝度nの度数を示す。
FIG. 4 is a diagram showing the ratio of the adjacent frequency change related to the luminance of the histogram shown in FIG. The ratio of the adjacent frequency change is defined by the following equation.

(Rate of adjacent frequency change) = Histogram [n] / Histogram [n−1] × 100

However, n is a brightness | luminance and n = 1, 2, 3,. . . , 255. The histogram [n] indicates the frequency of the brightness n.

図4(a)に示すように、ヒストグラムが緩やかに変化する場合(画質劣化が小さい場合)の隣接度数変化の割合は、ほぼ100%付近で緩やかに推移する。すなわち、隣接する輝度同士の度数が急激に変化することは少ない。一方、図4(b)に示すようにヒストグラムが激しく変化する場合(画質劣化が大きい場合)の隣接度数変化の割合は、大きく振動する。   As shown in FIG. 4A, the rate of change in the adjacent frequency when the histogram changes gently (when image quality deterioration is small) changes gently around approximately 100%. That is, the frequency between adjacent luminances rarely changes abruptly. On the other hand, as shown in FIG. 4B, when the histogram changes drastically (when image quality deterioration is large), the ratio of the adjacent frequency change greatly fluctuates.

システム制御部50は、所定の隣接度数変化の割合を超える階級のカウント(数え上げ)を行い、カウント数が、所定の閾値を超えた場合には、画質が所定の水準未満であると判定することができる。「所定の隣接度数変化の割合」及び「所定の閾値」は、メモリ52に事前に記録されていてもよいし、ユーザがセレクトボタン48等を操作して設定・変更可能なようにデジタルカメラ100を構成してもよい。 The system control unit 50 counts (counts up) a class exceeding a predetermined adjacent frequency change ratio, and determines that the image quality is below a predetermined level when the count exceeds a predetermined threshold. Can do. The “predetermined rate of change in the adjacent frequency” and the “predetermined threshold value” may be recorded in the memory 52 in advance, or may be set and changed by the user operating the select button 48 or the like. May be configured.

例えば、図4において、所定の隣接度数変化の割合を200%に設定した場合、200%を超える階級の数は、

図4(a)−−− 4個
図4(b)−−−38個

となり、カウント数の所定の閾値を30に設定した場合には、図4(b)に対応する画像データは、画質が所定の水準未満であると判定される。
For example, in FIG. 4, when the ratio of the predetermined adjacency frequency change is set to 200%, the number of classes exceeding 200% is

4 (a) --- 4 pieces Fig. 4 (b) --- 38 pieces

Thus, when the predetermined threshold value of the count number is set to 30, the image data corresponding to FIG. 4B is determined to have an image quality less than a predetermined level.

なお、輝度の階調数が大きくなるほど所定の閾値も大きく設定されることが好ましい。なぜなら、輝度が256階調の場合は例えば30という値は比較的大きな値であるが、輝度が1024階調の場合は30という値は極めて小さいからである。また、所定の閾値を輝度の階調数に対する割合に基づいて設定してもよい。割合を10%に設定すると、所定の閾値は256階調の10%、すなわち約26となる。   Note that it is preferable that the predetermined threshold value be set larger as the number of gradations of luminance increases. This is because, for example, a value of 30 is a relatively large value when the luminance is 256 gradations, but a value of 30 is extremely small when the luminance is 1024 gradations. Further, the predetermined threshold value may be set based on a ratio of luminance to the number of gradations. When the ratio is set to 10%, the predetermined threshold value is 10% of 256 gradations, that is, about 26.

また、前述のように、システム制御部50はY成分以外に基づいて画質の判定を行ってもよい。例えば、システム制御部50はG成分について上記と同様の処理を行ってもよいし、RGBの3成分について上記と同様の処理を行ってもよい。   Further, as described above, the system control unit 50 may determine the image quality based on other than the Y component. For example, the system control unit 50 may perform the same process as described above for the G component, or may perform the same process as described above for the three RGB components.

複数の成分について上記と同様の処理を行う場合、そのうち1つの成分について、隣接度数変化の割合が所定の割合を超える階級の数が所定の閾値を超える場合に、システム制御部50は画質が所定の水準未満であると判定できる。或いは、すべての成分について又は所定数以上の成分について、隣接度数変化の割合が所定の割合を超える階級の数が所定の閾値を超える場合に、システム制御部50は画質が所定の水準未満であると判定することとしてもよい。 When the same processing as described above is performed for a plurality of components, the system control unit 50 determines that the image quality is predetermined when one of the components has a number of classes whose adjacent frequency change rate exceeds a predetermined value exceeds a predetermined threshold value. It can be determined that it is less than the level of. Alternatively, for all components or for a predetermined number of components or more, when the number of classes in which the adjacent frequency change ratio exceeds a predetermined ratio exceeds a predetermined threshold, the system control unit 50 has an image quality less than a predetermined level. It is good also as determining.

<撮像・記録処理の流れ>
図5は、第1の実施形態における、デジタルカメラ100による撮像・記録処理の流れを示すフローチャートである。システム制御部50は、図5のフローチャートに従い、JPEG符号化した画像データの画質を確認し、画質が所定の水準未満の場合は圧縮パラメータを変更してJPEG符号化を繰り返すことにより、画質が所定の水準以上になるようにする。
<Flow of imaging / recording process>
FIG. 5 is a flowchart illustrating the flow of the imaging / recording process performed by the digital camera 100 in the first embodiment. The system control unit 50 checks the image quality of the JPEG-encoded image data according to the flowchart of FIG. 5, and if the image quality is less than a predetermined level, changes the compression parameter and repeats JPEG encoding so that the image quality is predetermined. To be above the level of.

ステップS501で、画像処理回路20は、A/D変換器14及びメモリ制御回路18を介してメモリ22に格納された画像データを、メモリ制御回路18を介して読み込む。   In step S <b> 501, the image processing circuit 20 reads the image data stored in the memory 22 via the A / D converter 14 and the memory control circuit 18 via the memory control circuit 18.

ステップS502で、画像処理回路20は、ステップS501で読み込んだ画像データに対して画像補間処理や色変換処理等の画像処理を行う。   In step S502, the image processing circuit 20 performs image processing such as image interpolation processing and color conversion processing on the image data read in step S501.

ステップS503で、画像処理回路20は、ステップS502で画像処理を施した画像データに対して、設定及び用途に応じた変倍処理を行う。設定及び用途とは、例えば撮像画像をラージサイズ/ミドルサイズ/スモールサイズのいずれのサイズで記録するかという設定や、サムネイル画像としての用途を意味する。   In step S503, the image processing circuit 20 performs a scaling process on the image data subjected to the image processing in step S502 according to the setting and application. The setting and use means, for example, a setting for recording a captured image in a large size / middle size / small size, or a use as a thumbnail image.

ステップS504で、画像処理回路20は、ステップS502及びS503で画像処理を施した画像データを、メモリ制御回路18を介してメモリ22に書き込む。   In step S504, the image processing circuit 20 writes the image data subjected to image processing in steps S502 and S503 into the memory 22 via the memory control circuit 18.

ステップS505で、圧縮・伸長回路26は、メモリ制御回路18を介してメモリ22からステップS504で書き込まれた画像データを読み込み、離散コサイン変換(DCT変換)及び量子化処理を行う。量子化処理に際して、圧縮・伸長回路26は、メモリ52に格納されている圧縮パラメータに含まれる量子化テーブルを使用する。   In step S505, the compression / decompression circuit 26 reads the image data written in step S504 from the memory 22 via the memory control circuit 18, and performs discrete cosine transform (DCT transform) and quantization processing. In the quantization process, the compression / decompression circuit 26 uses a quantization table included in the compression parameters stored in the memory 52.

ステップS506で、圧縮・伸長回路26は、ハフマン符号化処理を行う。   In step S506, the compression / decompression circuit 26 performs Huffman coding processing.

ステップS507で、圧縮・伸長回路26は、ステップS505及びS506で処理された(すなわちJPEG符号化された)画像データを、メモリ制御回路18を介してメモリ22に書き込む。   In step S507, the compression / decompression circuit 26 writes the image data processed in steps S505 and S506 (that is, JPEG encoded) into the memory 22 via the memory control circuit 18.

ステップS508で、圧縮・伸長回路26は、ステップS507で書き込まれた画像データを、メモリ制御回路18を介してメモリ22から読み込む。   In step S508, the compression / decompression circuit 26 reads the image data written in step S507 from the memory 22 via the memory control circuit 18.

ステップS509で、圧縮・伸長回路26は、ステップS508で読み込んだ画像データに対して逆量子化処理及び逆離散コサイン変換(逆DCT変換)を行い、伸長された画像データを得る。   In step S509, the compression / decompression circuit 26 performs inverse quantization processing and inverse discrete cosine transform (inverse DCT transform) on the image data read in step S508 to obtain decompressed image data.

ステップS510で、ヒストグラム取得回路28は、ステップS509で伸長された画像データの所定の成分(ここではY成分とする)からヒストグラムを生成する。   In step S510, the histogram acquisition circuit 28 generates a histogram from a predetermined component (here, Y component) of the image data expanded in step S509.

ステップS511で、システム制御部50は、ステップS510で生成されたヒストグラムの解析を行う。   In step S511, the system control unit 50 analyzes the histogram generated in step S510.

ステップS512で、システム制御部50は、ヒストグラムの解析結果に基づき、ステップS507でメモリ22に書き込まれた画像データの画質が所定の水準以上であるか否かを判定する。   In step S512, the system control unit 50 determines whether the image quality of the image data written in the memory 22 in step S507 is equal to or higher than a predetermined level based on the analysis result of the histogram.

ステップS511及びS512におけるヒストグラムの解析及び画質の判定は、図3及び図4を参照して前述したように行われる。   The histogram analysis and the image quality determination in steps S511 and S512 are performed as described above with reference to FIGS.

ステップS512において、画質が所定の水準以上であると判定された場合はステップS514に進み、そうでない場合はステップS513に進む。   If it is determined in step S512 that the image quality is equal to or higher than the predetermined level, the process proceeds to step S514, and if not, the process proceeds to step S513.

ステップS513で、システム制御部50は、圧縮パラメータを変更する。具体的には、圧縮率が下がるように量子化テーブルの値を小さくする。次いでステップS505に戻り、デジタルカメラ100は画質が所定の水準以上となるまで同様の処理を繰り返す。   In step S513, the system control unit 50 changes the compression parameter. Specifically, the value of the quantization table is reduced so that the compression rate is lowered. Next, returning to step S505, the digital camera 100 repeats the same processing until the image quality becomes equal to or higher than a predetermined level.

ステップS514で、システム制御部50は、ステップS507でメモリ22に書き込まれた画像データを、メモリ制御回路18を介して記憶媒体24に記録する。   In step S514, the system control unit 50 records the image data written in the memory 22 in step S507 on the storage medium 24 via the memory control circuit 18.

<第1の実施形態のまとめ>
以上説明したように、本実施形態によれば、デジタルカメラ100は撮像した画像データを所定の圧縮パラメータを用いて圧縮し、圧縮した画像データを伸長する。デジタルカメラ100は伸長した画像データの画質が所定の水準以上であるか否かを判定し、所定の水準以上でない場合は圧縮パラメータを変更して、画質が所定の水準以上になるまで圧縮処理を繰り返す。
<Summary of First Embodiment>
As described above, according to the present embodiment, the digital camera 100 compresses captured image data using a predetermined compression parameter, and decompresses the compressed image data. The digital camera 100 determines whether or not the image quality of the decompressed image data is equal to or higher than a predetermined level. If the image quality is not higher than the predetermined level, the compression parameter is changed and compression processing is performed until the image quality becomes higher than the predetermined level. repeat.

これにより、本実施形態のデジタルカメラ100によれば、ユーザが圧縮パラメータを決定する必要無しに、画質が一定水準以上となるように画像を非可逆圧縮(ここではJPEG符号化)することが可能となる。   As a result, according to the digital camera 100 of the present embodiment, it is possible to perform lossy compression (in this case, JPEG encoding) so that the image quality becomes a certain level or more without the need for the user to determine compression parameters. It becomes.

なお、本実施形態の説明において、RAM208の容量には言及してこなかったが、RAM208の1ワードあたりの容量は、メモリ制御回路18から入力される画像データのサイズに対して、十分な容量でなければならない。例えば、画像データが横1600画素×縦1200画素=約200万画素の場合、1つの階調に最大約200万の値が格納される可能性があるため、1アドレスが最大21ビットのデータを格納しなければならない。したがって、システム制御部50が21ビット以上のデータを一度に扱えない場合(例えば16ビットCPUである場合)は、Y成分を256階調で表現する1個のヒストグラムを保持するために8ビットよりも多くのアドレス空間が必要となる。   In the description of the present embodiment, the capacity of the RAM 208 has not been mentioned, but the capacity per word of the RAM 208 is sufficient for the size of the image data input from the memory control circuit 18. There must be. For example, if the image data is 1600 horizontal pixels × 1200 vertical pixels = about 2 million pixels, there is a possibility that a maximum of about 2 million values may be stored in one gradation. Must be stored. Therefore, when the system control unit 50 cannot handle data of 21 bits or more at a time (for example, in the case of a 16-bit CPU), it holds more than 8 bits in order to hold one histogram expressing the Y component in 256 gradations. Requires a lot of address space.

[第2の実施形態]
第1の実施形態では、デジタルカメラ100は、画質が必ず所定の水準以上となるまで圧縮パラメータの変更及び圧縮処理を繰り返した。これに対し、第2の実施形態では、画質が所定の水準未満の場合に、圧縮パラメータの変更及び再度の圧縮処理を行うか否かをユーザが選択可能なようにデジタルカメラ100を構成する。
[Second Embodiment]
In the first embodiment, the digital camera 100 repeats the compression parameter change and the compression process until the image quality always exceeds a predetermined level. In contrast, in the second embodiment, when the image quality is less than a predetermined level, the digital camera 100 is configured so that the user can select whether or not to change the compression parameter and perform the compression process again.

これにより、ユーザが画質よりも処理速度を優先したい場合に、圧縮パラメータの変更及び圧縮処理の繰り返しに伴う処理速度の低下を抑制することができる。   Thereby, when the user wants to prioritize the processing speed over the image quality, it is possible to suppress a decrease in the processing speed due to the compression parameter change and the compression process being repeated.

なお、本実施形態において、デジタルカメラ100の構成(ヒストグラム取得回路28の構成を含む)は第1の実施形態と同様でよいため、その説明を省略する。   In the present embodiment, the configuration of the digital camera 100 (including the configuration of the histogram acquisition circuit 28) may be the same as that of the first embodiment, and the description thereof is omitted.

図6は、第2の実施形態における、デジタルカメラ100による撮像・記録処理の流れを示すフローチャートである。図5と同一の処理を行うステップには同一の符号を付し、説明を省略する。   FIG. 6 is a flowchart illustrating the flow of the imaging / recording process performed by the digital camera 100 according to the second embodiment. Steps that perform the same processing as in FIG. 5 are given the same reference numerals, and descriptions thereof are omitted.

ステップS601は、ステップS512において画質が所定の水準以上ではないと判定された場合に実行される。ステップS601で、システム制御部50は、画像表示部32に画質が所定の水準未満である旨の警告を表示する。システム制御部50はまた、圧縮パラメータを変更して再度圧縮処理を行うか否かをユーザに選択させるメニュー画面を画像表示部32に表示する。   Step S601 is executed when it is determined in step S512 that the image quality is not higher than a predetermined level. In step S601, the system control unit 50 displays a warning that the image quality is less than a predetermined level on the image display unit 32. The system control unit 50 also displays a menu screen on the image display unit 32 that allows the user to select whether to perform compression processing again by changing the compression parameter.

ステップS602で、システム制御部50は、セレクトボタン48などを介してユーザから再度圧縮を行う旨の指示を受けたか否かを判定する。再度圧縮を行う旨の指示を受けた場合はステップS603に進み、再度圧縮しない旨の指示を受けた場合はステップS514に進む。   In step S602, the system control unit 50 determines whether or not an instruction to perform compression again is received from the user via the select button 48 or the like. If an instruction to perform compression again is received, the process proceeds to step S603, and if an instruction to not compress again is received, the process proceeds to step S514.

ステップS603で、システム制御部50は、圧縮パラメータの設定変更画面を画像表示部32に表示する。このとき、システム制御部50は、ステップS510で生成されたヒストグラムや、このヒストグラムから得られる隣接度数変化の割合を示すグラフを、画像表示部32に表示してもよい。   In step S <b> 603, the system control unit 50 displays a compression parameter setting change screen on the image display unit 32. At this time, the system control unit 50 may display on the image display unit 32 the histogram generated in step S510 and a graph indicating the ratio of the adjacent frequency change obtained from the histogram.

ステップS604で、システム制御部50は、セレクトボタン48などを介してユーザから変更後の圧縮パラメータを取得し、メモリ52などに記録する。次いで、ステップS505に戻り、同様の処理を繰り返す。   In step S604, the system control unit 50 acquires the changed compression parameter from the user via the select button 48 or the like, and records it in the memory 52 or the like. Next, the process returns to step S505, and the same processing is repeated.

なお、ステップS603及びS604の処理は、ステップS513と同様、ユーザの指示を受けることなく、システム制御部50が量子化テーブルの値を少しずつ小さくするようにしてもよい。   In steps S603 and S604, the system control unit 50 may decrease the value of the quantization table little by little without receiving a user instruction as in step S513.

<第2の実施形態のまとめ>
以上説明したように、本実施形態によれば、画質が所定の水準未満の場合であっても、ユーザの指示によっては、デジタルカメラ100は圧縮パラメータの変更及び再度の圧縮処理を行わない。
<Summary of Second Embodiment>
As described above, according to the present embodiment, even if the image quality is less than a predetermined level, the digital camera 100 does not change the compression parameter and perform the compression process again according to a user instruction.

これにより、ユーザが画質よりも処理速度を優先したい場合に、圧縮パラメータの変更及び圧縮処理の繰り返しに伴う処理速度の低下を抑制することができる。   Thereby, when the user wants to prioritize the processing speed over the image quality, it is possible to suppress a decrease in the processing speed due to the compression parameter change and the compression process being repeated.

[その他の実施形態]
上述した各実施の形態の処理は、各機能を具現化したソフトウェアのプログラムコードを記録した記憶媒体をシステム或は装置に提供してもよい。そして、そのシステム或は装置のコンピュータ(又はCPUやMPU)が記憶媒体に格納されたプログラムコードを読み出し実行することによって、前述した実施形態の機能を実現することができる。この場合、記憶媒体から読み出されたプログラムコード自体が前述した実施形態の機能を実現することになり、そのプログラムコードを記憶した記憶媒体は本発明を構成することになる。このようなプログラムコードを供給するための記憶媒体としては、例えば、フロッピィ(登録商標)ディスク、ハードディスク、光ディスク、光磁気ディスクなどを用いることができる。或いは、CD−ROM、CD−R、磁気テープ、不揮発性のメモリカード、ROMなどを用いることもできる。
[Other Embodiments]
The processing of each embodiment described above may provide a system or apparatus with a storage medium storing software program codes embodying each function. The functions of the above-described embodiments can be realized by the computer (or CPU or MPU) of the system or apparatus reading and executing the program code stored in the storage medium. In this case, the program code itself read from the storage medium realizes the functions of the above-described embodiments, and the storage medium storing the program code constitutes the present invention. As a storage medium for supplying such a program code, for example, a floppy (registered trademark) disk, a hard disk, an optical disk, a magneto-optical disk, or the like can be used. Alternatively, a CD-ROM, CD-R, magnetic tape, nonvolatile memory card, ROM, or the like can be used.

また、コンピュータが読み出したプログラムコードを実行することにより、前述した各実施の形態の機能が実現されるだけではない。そのプログラムコードの指示に基づき、コンピュータ上で稼動しているOS(オペレーティングシステム)などが実際の処理の一部又は全部を行い、その処理によって前述した各実施の形態の機能が実現される場合も含まれている。   The functions of the above-described embodiments are not only realized by executing the program code read by the computer. In some cases, an OS (operating system) running on the computer performs part or all of the actual processing based on the instruction of the program code, and the functions of the above-described embodiments are realized by the processing. include.

さらに、記憶媒体から読み出されたプログラムコードが、コンピュータに挿入された機能拡張ボードやコンピュータに接続された機能拡張ユニットに備わるメモリに書きこまれてもよい。その後、そのプログラムコードの指示に基づき、その機能拡張ボードや機能拡張ユニットに備わるCPUなどが実際の処理の一部又は全部を行い、その処理によって前述した各実施の形態の機能が実現される場合も含むものである。   Further, the program code read from the storage medium may be written in a memory provided in a function expansion board inserted into the computer or a function expansion unit connected to the computer. After that, the CPU of the function expansion board or function expansion unit performs part or all of the actual processing based on the instruction of the program code, and the functions of the above-described embodiments are realized by the processing. Is also included.

本発明を適用する画像処理装置である、デジタルカメラ100の構成を示す機能ブロック図である。1 is a functional block diagram illustrating a configuration of a digital camera 100 that is an image processing apparatus to which the present invention is applied. ヒストグラム取得回路28の詳細な構成を示す機能ブロック図である。3 is a functional block diagram showing a detailed configuration of a histogram acquisition circuit 28. FIG. ヒストグラム取得回路28が画像データのY成分を元に生成したヒストグラムの一例を示す図である。It is a figure which shows an example of the histogram which the histogram acquisition circuit produced | generated based on the Y component of image data. 図3で示したヒストグラムの輝度に関する隣接度数変化の割合を示す図である。It is a figure which shows the ratio of the adjacent frequency change regarding the brightness | luminance of the histogram shown in FIG. 第1の実施形態における、デジタルカメラ100による撮像・記録処理の流れを示すフローチャートである。3 is a flowchart illustrating a flow of imaging / recording processing by the digital camera 100 according to the first embodiment. 第2の実施形態における、デジタルカメラ100による撮像・記録処理の流れを示すフローチャートである。12 is a flowchart illustrating a flow of imaging / recording processing by the digital camera 100 in the second embodiment.

符号の説明Explanation of symbols

28 ヒストグラム取得回路
100 デジタルカメラ
28 Histogram Acquisition Circuit 100 Digital Camera

Claims (11)

圧縮パラメータに基づいて所定の圧縮率で第1の画像データを非可逆圧縮して第2の画像データを生成する圧縮手段と、
前記第2の画像データを伸長して第3の画像データを生成する伸長手段と、
前記第3の画像データから、輝度成分及び複数の色成分のうち少なくともいずれか1成分に対応するヒストグラムを生成する生成手段と、
前記生成手段によりヒストグラムが生成されると、当該ヒストグラムの各階級について隣接する階級からの度数の変化の割合が所定の割合を超える階級の数が所定の数より大である場合に、前記圧縮率を変更する変更手段と、
を備え、
前記変更手段により前記圧縮率が変更された場合、変更された圧縮率での前記圧縮手段による非可逆圧縮、当該非可逆圧縮により生成された画像データの前記伸長手段による伸長、及び当該伸長により生成された画像データに関する前記生成手段によるヒストグラムの生成を再度行うことを特徴とする画像処理装置。
Compression means for irreversibly compressing the first image data at a predetermined compression rate based on the compression parameter to generate the second image data;
Decompression means for decompressing the second image data to generate third image data;
Generating means for generating a histogram corresponding to at least one of a luminance component and a plurality of color components from the third image data;
When the histogram is generated by the generating means, the compression rate is calculated when the number of classes whose frequency change rate from an adjacent class exceeds a predetermined ratio is greater than a predetermined number for each class of the histogram. Change means to change
With
When the compression rate is changed by the changing unit, the lossy compression by the compression unit at the changed compression rate, the decompression by the decompression unit of the image data generated by the lossy compression, and the decompression An image processing apparatus characterized in that the generation of the generated image data by the generation means is performed again .
前記生成手段は、輝度成分及び複数の色成分のうち少なくともいずれか2成分に対応するヒストグラムを生成し、  The generation unit generates a histogram corresponding to at least any two of the luminance component and the plurality of color components,
前記変更手段は、前記生成手段が生成したヒストグラムのうちの少なくとも1つについて、隣接する階級からの度数の変化の割合が所定の割合を超える階級の数が所定の数より大である場合に、前記圧縮率を変更することを特徴とする請求項1に記載の画像処理装置。  The changing means, when at least one of the histograms generated by the generating means, when the number of classes whose frequency change rate from the adjacent class exceeds a predetermined ratio is greater than a predetermined number, The image processing apparatus according to claim 1, wherein the compression rate is changed.
前記生成手段は、輝度成分及び複数の色成分のうち少なくともいずれか2成分に対応するヒストグラムを生成し、  The generation unit generates a histogram corresponding to at least any two of the luminance component and the plurality of color components,
前記変更手段は、前記生成手段が生成したヒストグラムの全てについて、隣接する階級からの度数の変化の割合が所定の割合を超える階級の数が所定の数より大である場合に、前記圧縮率を変更することを特徴とする請求項1に記載の画像処理装置。  The changing means, for all of the histograms generated by the generating means, when the number of classes whose frequency change rate from an adjacent class exceeds a predetermined ratio is greater than a predetermined number, The image processing apparatus according to claim 1, wherein the image processing apparatus is changed.
さらに、前記変化の割合を示すグラフを表示する表示手段を備えることを特徴とする請求項1乃至3のいずれか1項に記載の画像処理装置。 Further, the image processing apparatus according to any one of claims 1 to 3, characterized in that it comprises display means for displaying a graph showing the ratio of the change. さらに、前記ヒストグラムを表示する表示手段を備えることを特徴とする請求項1乃至4のいずれか1項に記載の画像処理装置。 Further, the image processing apparatus according to any one of claims 1 to 4, characterized in that it comprises a display means for displaying the histogram. さらに、ユーザの指示に従い、前記変化の割合が所定の割合を超える階級の数が所定の数より大であることに応じて、前記変更手段により前記圧縮率の変更を行うか否かを選択する選択手段を備えることを特徴とする請求項1乃至のいずれか1項に記載の画像処理装置。 Furthermore, in accordance with an instruction Yu chromatography The, in response to the number of classes that the rate of the change exceeds a predetermined percentage is greater than a predetermined number, whether to change the compression ratio by said changing means the image processing apparatus according to any one of claims 1 to 5, characterized in that it comprises a selection means for selecting. さらに、画像データを記憶する記憶手段を備えることを特徴とする請求項1乃至のいずれか1項に記載の画像処理装置。 Further, the image processing apparatus according to any one of claims 1 to 6, characterized in that it comprises a storage means for storing image data. 前記圧縮パラメータは量子化テーブルであることを特徴とする請求項1乃至のいずれか1項に記載の画像処理装置。 The compression parameters are image processing apparatus according to any one of claims 1 to 7, characterized in that a quantization table. 圧縮パラメータに基づいて所定の圧縮率で第1の画像データを非可逆圧縮して第2の画像データを生成する圧縮工程と、
前記第2の画像データを伸長して第3の画像データを生成する伸長工程と、
前記第3の画像データから、輝度成分及び複数の色成分のうち少なくともいずれか1成分に対応するヒストグラムを生成する生成工程と、
前記生成工程によりヒストグラムが生成されると、当該ヒストグラムの各階級について隣接する階級からの度数の変化の割合が所定の割合を超える階級の数が所定の数より大である場合に、前記圧縮率を変更する変更工程と、
を備え、
前記変更工程により前記圧縮率が変更された場合、変更された圧縮率での前記圧縮工程による非可逆圧縮、当該非可逆圧縮により生成された画像データの前記伸長工程による伸長、及び当該伸長により生成された画像データに関する前記生成工程によるヒストグラムの生成を再度行うことを特徴とする画像処理方法。
A compression step of irreversibly compressing the first image data at a predetermined compression rate based on the compression parameter to generate the second image data;
A decompression step of decompressing the second image data to generate third image data;
Generating a histogram corresponding to at least one of a luminance component and a plurality of color components from the third image data;
When a histogram is generated by the generation step, the compression rate is calculated when the number of classes whose frequency change rate from an adjacent class exceeds a predetermined ratio is greater than a predetermined number for each class of the histogram. Change process to change,
With
When the compression rate is changed by the changing step, the lossy compression by the compression step at the changed compression rate, the decompression by the decompression step of the image data generated by the lossy compression, and the decompression An image processing method, characterized in that a histogram is generated again by the generating step for the processed image data .
コンピュータに、
圧縮パラメータに基づいて所定の圧縮率で第1の画像データを非可逆圧縮して第2の画像データを生成する圧縮工程と、
前記第2の画像データを伸長して第3の画像データを生成する伸長工程と、
前記第3の画像データから、輝度成分及び複数の色成分のうち少なくともいずれか1成分に対応するヒストグラムを生成する生成工程と、
前記生成工程によりヒストグラムが生成されると、当該ヒストグラムの各階級について隣接する階級からの度数の変化の割合が所定の割合を超える階級の数が所定の数より大である場合に、前記圧縮率を変更する変更工程と、
を備え、
前記変更工程により前記圧縮率が変更された場合、変更された圧縮率での前記圧縮工程による非可逆圧縮、当該非可逆圧縮により生成された画像データの前記伸長工程による伸長、及び当該伸長により生成された画像データに関する前記生成工程によるヒストグラムの生成を再度行うことを特徴とする画像処理方法を実行させるためのプログラム。
On the computer,
A compression step of irreversibly compressing the first image data at a predetermined compression rate based on the compression parameter to generate the second image data;
A decompression step of decompressing the second image data to generate third image data;
Generating a histogram corresponding to at least one of a luminance component and a plurality of color components from the third image data;
When a histogram is generated by the generation step, the compression rate is calculated when the number of classes whose frequency change rate from an adjacent class exceeds a predetermined ratio is greater than a predetermined number for each class of the histogram. Change process to change,
With
When the compression rate is changed by the changing step, the lossy compression by the compression step at the changed compression rate, the decompression by the decompression step of the image data generated by the lossy compression, and the decompression A program for executing an image processing method, wherein the generation of a histogram in the generation step relating to the image data is performed again .
コンピュータに、
圧縮パラメータに基づいて所定の圧縮率で第1の画像データを非可逆圧縮して第2の画像データを生成する圧縮工程と、
前記第2の画像データを伸長して第3の画像データを生成する伸長工程と、
前記第3の画像データから、輝度成分及び複数の色成分のうち少なくともいずれか1成分に対応するヒストグラムを生成する生成工程と、
前記生成工程によりヒストグラムが生成されると、当該ヒストグラムの各階級について隣接する階級からの度数の変化の割合が所定の割合を超える階級の数が所定の数より大である場合に、前記圧縮率を変更する変更工程と、
を備え、
前記変更工程により前記圧縮率が変更された場合、変更された圧縮率での前記圧縮工程による非可逆圧縮、当該非可逆圧縮により生成された画像データの前記伸長工程による伸長、及び当該伸長により生成された画像データに関する前記生成工程によるヒストグラムの生成を再度行うことを特徴とする画像処理方法を実行させるためのプログラムを記録したコンピュータ読み取り可能な記憶媒体。
On the computer,
A compression step of irreversibly compressing the first image data at a predetermined compression rate based on the compression parameter to generate the second image data;
A decompression step of decompressing the second image data to generate third image data;
Generating a histogram corresponding to at least one of a luminance component and a plurality of color components from the third image data;
When a histogram is generated by the generation step, the compression rate is calculated when the number of classes whose frequency change rate from an adjacent class exceeds a predetermined ratio is greater than a predetermined number for each class of the histogram. Change process to change,
With
When the compression rate is changed by the changing step, the lossy compression by the compression step at the changed compression rate, the decompression by the decompression step of the image data generated by the lossy compression, and the decompression The computer-readable storage medium which recorded the program for performing the image processing method characterized by performing again the production | generation of the histogram by the said production | generation process regarding the performed image data .
JP2005302160A 2005-10-17 2005-10-17 Image processing apparatus and image processing method Expired - Fee Related JP4701065B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005302160A JP4701065B2 (en) 2005-10-17 2005-10-17 Image processing apparatus and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005302160A JP4701065B2 (en) 2005-10-17 2005-10-17 Image processing apparatus and image processing method

Publications (3)

Publication Number Publication Date
JP2007110652A JP2007110652A (en) 2007-04-26
JP2007110652A5 JP2007110652A5 (en) 2008-11-27
JP4701065B2 true JP4701065B2 (en) 2011-06-15

Family

ID=38036122

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005302160A Expired - Fee Related JP4701065B2 (en) 2005-10-17 2005-10-17 Image processing apparatus and image processing method

Country Status (1)

Country Link
JP (1) JP4701065B2 (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP5179306B2 (en) * 2008-09-22 2013-04-10 Kddi株式会社 Moving picture coding method, moving picture coding apparatus, and moving picture coding program

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04175067A (en) * 1990-11-08 1992-06-23 Toshiba Corp Image compression/restoration device
JPH08129831A (en) * 1994-11-01 1996-05-21 Sony Corp Device and method for coding

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH04175067A (en) * 1990-11-08 1992-06-23 Toshiba Corp Image compression/restoration device
JPH08129831A (en) * 1994-11-01 1996-05-21 Sony Corp Device and method for coding

Also Published As

Publication number Publication date
JP2007110652A (en) 2007-04-26

Similar Documents

Publication Publication Date Title
JP4466261B2 (en) Imaging apparatus, brightness correction method, and program
EP1715671A1 (en) Image sensing apparatus and white balance correction method
JP4560422B2 (en) Imaging apparatus and control method thereof
JP5366584B2 (en) Imaging apparatus, image processing method, and program
JP2007097145A (en) Image coding device and image coding method
JP4359773B2 (en) Image compression processing apparatus, image compression processing method, and image compression processing program
JP4769567B2 (en) IMAGING DEVICE, IMAGING DEVICE CONTROL METHOD, COMPUTER PROGRAM, AND STORAGE MEDIUM
JP2010063036A (en) Imaging apparatus and image display method
US7756331B2 (en) Image processing apparatus and method for displaying images and corresponding histograms
US20170359471A1 (en) Imaging apparatus
JP2015195582A (en) Image processing device, control method thereof, imaging apparatus, control method thereof, and recording medium
JP2008109305A (en) Image processing device, and control method of image processing device
US6876768B1 (en) Image processing apparatus and method, and storage medium
JP2016019161A (en) Imaging device
JP4366485B2 (en) Imaging apparatus, image processing method, and program
US10341601B2 (en) Image processing apparatus, imaging apparatus, and image processing method
JP4701065B2 (en) Image processing apparatus and image processing method
JP6741532B2 (en) Imaging device and recording method
US8493462B2 (en) Image processing apparatus, photographing apparatus and control method for compressing images
JP4401882B2 (en) Image processing apparatus, image processing method, program, and storage medium
JP2016052081A (en) Imaging apparatus, and method and program for storing image
JP2004118018A (en) On-screen display device and digital camera
JP2006033088A (en) Image processing apparatus and method, imaging apparatus, program, and storage medium
JP2012129611A (en) Imaging apparatus
JP5610860B2 (en) Imaging apparatus and information processing apparatus

Legal Events

Date Code Title Description
A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20081010

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20081010

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20101224

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110210

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110228

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110307

LAPS Cancellation because of no payment of annual fees