JP2005260467A - Image processor - Google Patents

Image processor Download PDF

Info

Publication number
JP2005260467A
JP2005260467A JP2004067433A JP2004067433A JP2005260467A JP 2005260467 A JP2005260467 A JP 2005260467A JP 2004067433 A JP2004067433 A JP 2004067433A JP 2004067433 A JP2004067433 A JP 2004067433A JP 2005260467 A JP2005260467 A JP 2005260467A
Authority
JP
Japan
Prior art keywords
compression
compression rate
image data
flat pixel
rate
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.)
Pending
Application number
JP2004067433A
Other languages
Japanese (ja)
Other versions
JP2005260467A5 (en
Inventor
Etsuko Rokutanda
悦子 六反田
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.)
Konica Minolta Opto Inc
Original Assignee
Konica Minolta Opto 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 Konica Minolta Opto Inc filed Critical Konica Minolta Opto Inc
Priority to JP2004067433A priority Critical patent/JP2005260467A/en
Publication of JP2005260467A publication Critical patent/JP2005260467A/en
Publication of JP2005260467A5 publication Critical patent/JP2005260467A5/ja
Pending legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To compress image data at an optimum compression rate so that block noise does not occur irrespective of a characteristic of image data. <P>SOLUTION: An image processor (100) having a compression processing means (13) compressing image data is provided with a flat pixel region rate calculating means (10) calculating a rate that the number of pixels in a flat pixel region having a feature amount in a prescribed range occupies with respect to the whole number of pixels on image data, a compression rate deciding means (10) deciding a compression rate of image data based on a flat pixel region rate calculated by the flat pixel region rate calculating means and a compression processing control means (10) causing the compression processing means to compress image data by the compression rate decided by the compression rate deciding means. <P>COPYRIGHT: (C)2005,JPO&NCIPI

Description

本発明は、デジタルカメラ等に設けられる画像処理装置に関する。   The present invention relates to an image processing apparatus provided in a digital camera or the like.

従来、デジタルカメラで撮像された画像データは、その情報量を軽減するために、JPEG等の画像圧縮処理が施される。JPEGによる画像圧縮処理は、画像を8×8のブロックに分割し、DCT(離散コサイン変換)によってDCT係数を求め、DCT係数を量子化テーブルによって量子化し、量子化した値をエントロピ符号化してハフマン符号で表すことによって行われる。
上記のようなJPEGによる画像圧縮処理においては、画像の圧縮サイズを所定の範囲内に収めるために高圧縮率で圧縮処理が行われることがあり、このような場合には画像データにブロックノイズが発生する。
そこで、ブロックノイズを抑制するために、DC成分の量子化ステップとAC成分の量子化ステップとの比率を考慮しながら、画像の圧縮率を目標とする圧縮率の範囲内に収める画像処理装置が提案されている(例えば、特許文献1参照。)。この画像処理装置は、画像データを初期設定された量子化テーブルでテスト圧縮し、圧縮された画像データに基づいて、目標とする圧縮率を得るうえで適切な量子化テーブルを求めるものである。
特開2001−57636号公報
Conventionally, image data captured by a digital camera is subjected to image compression processing such as JPEG in order to reduce the amount of information. In the image compression processing by JPEG, an image is divided into 8 × 8 blocks, DCT coefficients are obtained by DCT (discrete cosine transform), the DCT coefficients are quantized by a quantization table, and the quantized values are entropy-encoded to be Huffman. This is done by representing with a code.
In the image compression processing by JPEG as described above, compression processing may be performed at a high compression rate in order to keep the compression size of the image within a predetermined range. In such a case, block noise is included in the image data. Occur.
Therefore, in order to suppress block noise, there is an image processing apparatus in which the compression ratio of an image falls within the target compression ratio range while considering the ratio between the DC component quantization step and the AC component quantization step. It has been proposed (see, for example, Patent Document 1). This image processing apparatus test-compresses image data with an initially set quantization table, and obtains an appropriate quantization table for obtaining a target compression rate based on the compressed image data.
JP 2001-57636 A

しかし、特許文献1に記載の画像処理装置においては、目標とする圧縮率に向かって量子化テーブルを更新していくものであり、圧縮の対象となる画像データの特性について考慮されることがなかった。そのため、画像データの特性によっては、目標とする圧縮値が常に最適であることはなく、画像データを最適な圧縮率で圧縮することが困難であった。   However, in the image processing apparatus described in Patent Document 1, the quantization table is updated toward the target compression rate, and characteristics of image data to be compressed are not considered. It was. Therefore, depending on the characteristics of the image data, the target compression value is not always optimal, and it is difficult to compress the image data at an optimal compression rate.

そこで、本発明の課題は、画像データの特性にかかわらず、ブロックノイズが発生しないように最適な圧縮率で画像データの圧縮処理を行うことができる画像処理装置を提供することである。   Therefore, an object of the present invention is to provide an image processing apparatus capable of performing compression processing of image data at an optimal compression rate so that block noise does not occur regardless of the characteristics of the image data.

以上の課題を解決するため、請求項1に記載の発明は、画像データを圧縮処理する圧縮処理手段を有する画像処理装置であって、前記画像データから画素の特徴量が一定範囲内にある平坦画素領域を検出する平坦画素領域検出手段と、前記平坦画素領域検出手段により検出された平坦画素領域の画素数が前記画像データの全画素数に対して占める割合を算出する平坦画素領域率算出手段と、前記平坦画素領域率算出手段により算出された平坦画素領域率に基づいて前記画像データの圧縮率を決定する圧縮率決定手段と、前記圧縮率決定手段により決定された圧縮率で前記圧縮処理手段に前記画像データを圧縮処理させる圧縮処理制御手段と、を備えることを特徴とする。   In order to solve the above-described problems, the invention described in claim 1 is an image processing apparatus having a compression processing means for compressing image data, wherein the feature amount of pixels is within a certain range from the image data. Flat pixel area detecting means for detecting a pixel area, and flat pixel area ratio calculating means for calculating the ratio of the number of pixels in the flat pixel area detected by the flat pixel area detecting means to the total number of pixels in the image data A compression rate determining unit that determines a compression rate of the image data based on the flat pixel region rate calculated by the flat pixel region rate calculating unit, and the compression processing at a compression rate determined by the compression rate determining unit Compression processing control means for causing the means to compress the image data.

請求項2に記載の発明は、画像データを圧縮する圧縮率が複数記憶された圧縮率記憶手段と、前記圧縮率記憶手段に記憶された複数の圧縮率の中から前記画像データを圧縮する圧縮率を選択して入力する圧縮率入力手段と、前記圧縮率入力手段により入力された圧縮率で画像データを圧縮処理する圧縮処理手段と、を有する画像処理装置であって、前記画像データから画素の特徴量が一定範囲内にある平坦画素領域を検出する平坦画素領域検出手段と、所定範囲内の特徴量を有する平坦画素領域の画素数が前記画像データの全画素数に対して占める割合を算出する平坦画素領域率算出手段と、前記平坦画素領域率算出手段により算出された平坦画素領域率に基づいて前記画像データの圧縮率を決定する圧縮率決定手段と、前記圧縮率入力手段により入力された圧縮率が前記圧縮率決定手段により決定された圧縮率よりも高い場合に、前記圧縮率決定手段により決定された圧縮率で前記圧縮処理手段に前記画像データを圧縮処理させる圧縮処理制御手段と、を備えることを特徴とする。   According to a second aspect of the present invention, there is provided a compression rate storage means for storing a plurality of compression rates for compressing image data, and a compression for compressing the image data from a plurality of compression rates stored in the compression rate storage means. An image processing apparatus comprising: a compression rate input unit that selects and inputs a rate; and a compression processing unit that compresses image data at a compression rate that is input by the compression rate input unit. A flat pixel region detecting means for detecting a flat pixel region having a feature amount within a certain range, and a ratio of the number of pixels of the flat pixel region having a feature amount within a predetermined range to the total number of pixels of the image data A flat pixel area ratio calculating means for calculating; a compression ratio determining means for determining a compression ratio of the image data based on the flat pixel area ratio calculated by the flat pixel area ratio calculating means; and the compression ratio input means. A compression process for causing the compression processing unit to compress the image data at a compression rate determined by the compression rate determination unit when the input compression rate is higher than the compression rate determined by the compression rate determination unit; And a control means.

請求項3に記載の発明は、画像データを圧縮する圧縮率が複数記憶された圧縮率記憶手段と、前記圧縮率記憶手段に記憶された複数の圧縮率の中から前記画像データを圧縮する圧縮率を選択して入力する圧縮率入力手段と、前記圧縮率入力手段により入力された圧縮率で画像データを圧縮処理する圧縮処理手段と、を有する画像処理装置であって、前記画像データから画素の特徴量が一定範囲内にある平坦画素領域を検出する平坦画素領域検出手段と、所定範囲内の特徴量を有する平坦画素領域の画素数が前記画像データの全画素数に対して占める割合を算出する平坦画素領域率算出手段と、前記平坦画素領域率算出手段により算出された平坦画素領域率に基づいて前記画像データの圧縮率を決定する圧縮率決定手段と、前記圧縮率入力手段により入力された圧縮率が前記圧縮率決定手段により決定された圧縮率よりも高い場合に、前記圧縮率決定手段により決定された圧縮率で前記圧縮処理手段に前記平坦画素領域を圧縮処理させ、前記圧縮率入力手段により入力された圧縮率で前記圧縮処理手段に前記画像データにおける前記平坦画素領域外の領域を圧縮処理させる圧縮処理制御手段と、を備えることを特徴とする。   According to a third aspect of the present invention, there is provided a compression rate storage means for storing a plurality of compression rates for compressing image data, and a compression for compressing the image data from a plurality of compression rates stored in the compression rate storage means. An image processing apparatus comprising: a compression rate input unit that selects and inputs a rate; and a compression processing unit that compresses image data at a compression rate that is input by the compression rate input unit. A flat pixel region detecting means for detecting a flat pixel region having a feature amount within a certain range, and a ratio of the number of pixels of the flat pixel region having a feature amount within a predetermined range to the total number of pixels of the image data A flat pixel area ratio calculating means for calculating; a compression ratio determining means for determining a compression ratio of the image data based on the flat pixel area ratio calculated by the flat pixel area ratio calculating means; and the compression ratio input means. When the input compression rate is higher than the compression rate determined by the compression rate determination unit, the compression processing unit compresses the flat pixel region at the compression rate determined by the compression rate determination unit, Compression processing control means for causing the compression processing means to compress the area outside the flat pixel area in the image data at the compression rate input by the compression rate input means.

請求項1に記載の発明によれば、平坦画素領域検出手段が平坦画素領域を検出すると、平坦画素領域率算出手段が平坦画素領域の画素数が画像データの全画素数に対して占める割合を算出する。そして、圧縮率決定手段が算出された平坦画素領域率に基づいて画像データの圧縮率を決定し、圧縮処理制御手段は、圧縮率決定手段により決定された圧縮率で圧縮処理手段に画像データを圧縮処理させる。よって、画像データは、平坦画素領域率に応じて変化する圧縮率に基づいて圧縮処理されるので、画像データの特性にかかわらず、ブロックノイズが発生しない最適な圧縮率で画像データの画像処理を行うことができる。   According to the first aspect of the present invention, when the flat pixel region detecting unit detects the flat pixel region, the flat pixel region rate calculating unit calculates the ratio of the number of pixels in the flat pixel region to the total number of pixels in the image data. calculate. Then, the compression rate determination means determines the compression rate of the image data based on the calculated flat pixel area ratio, and the compression processing control means sends the image data to the compression processing means at the compression rate determined by the compression ratio determination means. Let the compression process. Therefore, since the image data is compressed based on a compression rate that changes in accordance with the flat pixel area rate, the image data is processed at an optimal compression rate that does not cause block noise regardless of the characteristics of the image data. It can be carried out.

請求項2に記載の発明によれば、平坦画素領域検出手段が平坦画素領域を検出すると、平坦画素領域率算出手段が所定範囲内の特徴量を有する平坦画素領域の画素数が画像データの全画素数に対して占める割合を算出する。そして、圧縮率決定手段が平坦画素領域率算出手段により算出された平坦画素領域率に基づいて画像データの圧縮率を決定し、圧縮処理制御手段は、圧縮率入力手段により入力された圧縮率が圧縮率決定手段により決定された圧縮率よりも高い場合に、圧縮率決定手段により決定された圧縮率で圧縮処理手段に画像データを圧縮処理させる。よって、画像データは、決定された圧縮率以上で圧縮処理されることがないので、画像データの特性にかかわらず、ブロックノイズが発生しない最適な圧縮率で画像データの画像処理を行うことができる。   According to the second aspect of the present invention, when the flat pixel area detecting means detects the flat pixel area, the flat pixel area ratio calculating means determines that the number of pixels of the flat pixel area having the feature amount within the predetermined range is the total number of image data. The proportion of the number of pixels is calculated. The compression rate determining means determines the compression rate of the image data based on the flat pixel area ratio calculated by the flat pixel area ratio calculating means, and the compression processing control means determines that the compression rate input by the compression ratio input means is When the compression rate is higher than the compression rate determined by the compression rate determination unit, the compression processing unit causes the compression processing unit to compress the image data at the compression rate determined by the compression rate determination unit. Therefore, the image data is not compressed at a compression rate higher than the determined compression rate, so that the image data can be processed at an optimal compression rate that does not cause block noise regardless of the characteristics of the image data. .

請求項3に記載の発明によれば、平坦画素領域検出手段が平坦画素領域を検出すると、平坦画素領域率算出手段が所定範囲内の特徴量を有する平坦画素領域の画素数が画像データの全画素数に対して占める割合を算出する。そして、圧縮率決定手段が平坦画素領域率算出手段により算出された平坦画素領域率に基づいて画像データの圧縮率を決定し、圧縮処理制御手段は、圧縮率入力手段により入力された圧縮率が圧縮率決定手段により決定された圧縮率よりも高い場合に、圧縮率決定手段により決定された圧縮率で圧縮処理手段に平坦画素領域を圧縮処理させ、圧縮率入力手段により入力された圧縮率で圧縮処理手段に画像データにおける平坦画素領域外の領域を圧縮処理させる。
これにより、ブロックノイズの目立つ平坦画素領域は、圧縮率入力手段により入力された圧縮率と圧縮率決定手段により決定された圧縮率のうち、低い方の圧縮率で圧縮され、ブロックノイズの目立たない領域については、高い方の圧縮率で圧縮される。
よって、圧縮率入力手段から比較的高い圧縮率を入力しても、平坦画素領域は決定された圧縮率以上で圧縮処理されることがないので、画像データの特性にかかわらず、ブロックノイズが発生しない最適な圧縮率で平坦画素領域の画像処理を行うことができる。従って、ファイルサイズを必要以上に大きくすることなく、ブロックノイズを抑制することができる。
According to the third aspect of the present invention, when the flat pixel area detecting means detects the flat pixel area, the flat pixel area ratio calculating means determines that the number of pixels of the flat pixel area having the feature amount within the predetermined range is the total number of image data. The proportion of the number of pixels is calculated. The compression rate determining means determines the compression rate of the image data based on the flat pixel area ratio calculated by the flat pixel area ratio calculating means, and the compression processing control means determines that the compression rate input by the compression ratio input means is When the compression rate is higher than the compression rate determined by the compression rate determination unit, the compression processing unit compresses the flat pixel region with the compression rate determined by the compression rate determination unit, and the compression rate input by the compression rate input unit The compression processing means compresses an area outside the flat pixel area in the image data.
Thereby, the flat pixel region where block noise is conspicuous is compressed at the lower compression rate of the compression rate input by the compression rate input unit and the compression rate determined by the compression rate determination unit, and block noise is not noticeable. The area is compressed at the higher compression rate.
Therefore, even if a relatively high compression rate is input from the compression rate input means, the flat pixel region is not compressed at a compression rate higher than the determined compression rate, so block noise occurs regardless of the characteristics of the image data. It is possible to perform image processing of a flat pixel region with an optimal compression ratio that is not performed. Therefore, block noise can be suppressed without increasing the file size more than necessary.

以下、図面を参照して、本発明に係る画像処理装置の最良の形態について詳細に説明する。なお、本実施の形態においては、画像処理装置としてデジタルカメラを例に挙げ、画像データはJPEG方式により圧縮処理するものとして説明する。
(実施形態1)
<デジタルカメラの構成>
図1は、デジタルカメラの構成を示すブロック図である。図1に示すように、撮像光学系としてのレンズ1及び開口絞り2を介して得られた光は、撮像素子としてのCCD3の受光面に結像される。この時、CCD3の入力部には、R,G,Bフィルタ(図示略)が設けられており、R,G,B毎に画像信号が取り込まれる。また、このとき、レンズ1はレンズ駆動回路4により当該レンズ1の光軸に沿って移動され、開口絞り2は、それぞれ露出制御回路5により駆動される。
ここで、CCD3は、受光面に結像された結像画像を電荷量に光電変換し、タイミング発生回路6から信号を受けるCCD駆動回路7の転送パルスによってアナログの画像信号を出力する。
CCD3から出力されたアナログの画像信号は、プリプロセス回路8においてCDS(相関二重サンプリング)処理でノイズが低減され、またAGC(自動ゲイン制御)により利得の調整が行われ、さらにダイナミックレンジ拡大のための処理などが行われる。
The best mode of an image processing apparatus according to the present invention will be described below in detail with reference to the drawings. In the present embodiment, a digital camera is taken as an example of the image processing apparatus, and image data is described as being compressed by the JPEG method.
(Embodiment 1)
<Configuration of digital camera>
FIG. 1 is a block diagram illustrating a configuration of a digital camera. As shown in FIG. 1, light obtained through a lens 1 and an aperture stop 2 as an imaging optical system forms an image on a light receiving surface of a CCD 3 as an imaging element. At this time, the input portion of the CCD 3 is provided with R, G, B filters (not shown), and image signals are taken in for each of R, G, B. At this time, the lens 1 is moved along the optical axis of the lens 1 by the lens driving circuit 4, and the aperture stop 2 is driven by the exposure control circuit 5.
Here, the CCD 3 photoelectrically converts the image formed on the light receiving surface into a charge amount, and outputs an analog image signal by a transfer pulse of the CCD drive circuit 7 that receives a signal from the timing generation circuit 6.
The analog image signal output from the CCD 3 is reduced in noise by CDS (correlated double sampling) processing in the pre-process circuit 8 and gain is adjusted by AGC (automatic gain control) to further expand the dynamic range. Processing is performed.

そして、各R,G,B画像信号は、A/D変換器9によってデジタル画像信号に変換された後、圧縮処理手段としての画像圧縮回路13で画像データの圧縮処理が行われる。ここで、画像に関する情報はパラメータ記憶用メモリ11に記憶されている。制御部10は、パラメータ記憶用メモリ11からパラメータ(画像に関する情報)を受け取って、あるレンズ1の固定絞りに対応して読み込んだ画像データに付加して出力することができる。或いは、レンズ1の絞り毎にパラメータを付加して出力することができる。得られた画像に関する情報は、画像記録部12に記憶され、必要に応じて外部に読み出される。また、制御部10は、カメラ本体の操作スイッチや液晶表示等のマンマシン・インタフェースを制御し、必要に応じて情報伝達を行うものである。また、時計機能も組み込まれており、オートデートの制御も行う。   Each R, G, B image signal is converted into a digital image signal by the A / D converter 9, and then the image data is compressed by the image compression circuit 13 as compression processing means. Here, information on the image is stored in the parameter storage memory 11. The control unit 10 can receive a parameter (information about an image) from the parameter storage memory 11, add it to the image data read corresponding to the fixed aperture of a certain lens 1, and output it. Alternatively, a parameter can be added and output for each aperture of the lens 1. Information about the obtained image is stored in the image recording unit 12 and read out to the outside as necessary. The control unit 10 controls a man-machine interface such as an operation switch of the camera body and a liquid crystal display, and transmits information as necessary. It also has a built-in clock function that controls the auto date.

また、制御部10には、各種処理を実行するプログラムや画像データの圧縮処理に必要なデータ等を記憶する圧縮率記憶手段としてのメモリ20が備えられている。
メモリ20には、各種機能を実現させるための各プログラムが記憶されたプログラムエリア21、画像データの圧縮率、量子化テーブル、スケールファクタ、符号化テーブル等が記憶されたデータエリア22が形成されている。具体的に、プログラムエリア21には、画像データの全画素数に対するエッジ成分(高周波成分)が検出されなかった画素を検出する平坦画素領域検出プログラム21aが記憶されている。また、プログラムエリア21には、画像データの全画素数に対するエッジ成分(高周波成分)が検出されなかった画素数の割合、すなわち、平坦画素領域率を算出する平坦画素領域率算出プログラム21bが記憶されている。また、プログラムエリア21には、算出された平坦画素領域率に基づいて画像データの圧縮率を決定する圧縮率決定プログラム21cが記憶されている。さらに、プログラムエリア21には、決定された圧縮率で画像圧縮回路13に画像データを圧縮処理させる圧縮処理制御プログラム21dが記憶されている。
Further, the control unit 10 is provided with a memory 20 as a compression rate storage means for storing programs for executing various processes, data necessary for image data compression processing, and the like.
The memory 20 includes a program area 21 in which programs for realizing various functions are stored, and a data area 22 in which image data compression rates, quantization tables, scale factors, encoding tables, and the like are stored. Yes. Specifically, the program area 21 stores a flat pixel region detection program 21a for detecting pixels in which edge components (high frequency components) with respect to the total number of pixels of the image data are not detected. The program area 21 stores a ratio of the number of pixels in which the edge component (high frequency component) is not detected with respect to the total number of pixels of the image data, that is, a flat pixel area ratio calculation program 21b for calculating a flat pixel area ratio. ing. The program area 21 stores a compression rate determination program 21c that determines the compression rate of the image data based on the calculated flat pixel area rate. Further, the program area 21 stores a compression processing control program 21d that causes the image compression circuit 13 to compress the image data at the determined compression rate.

また、データエリア22には、画像データを圧縮する複数の圧縮率データ22aが記憶されている。データエリア22には、図2に示すように、画像記録部12に記録可能な三種類の画素数に対して、それぞれ低圧縮率で圧縮した場合の画像データのサイズ、高圧縮率で圧縮した場合の画像データのサイズが記憶されており、ユーザによって選択された画素数及び圧縮率によって圧縮後の画像データのサイズが異なるようになっている。例えば、画素数1600×1200からなる画像データを低圧縮率で圧縮すると、約800KB(キロバイト)の画像データに圧縮されることがわかる。   The data area 22 stores a plurality of compression rate data 22a for compressing image data. In the data area 22, as shown in FIG. 2, the three types of pixels that can be recorded in the image recording unit 12 are compressed with the image data size and the high compression rate when compressed at a low compression rate, respectively. The size of the image data in this case is stored, and the size of the image data after compression differs depending on the number of pixels selected by the user and the compression rate. For example, it can be seen that when image data composed of 1600 × 1200 pixels is compressed at a low compression rate, the image data is compressed to about 800 KB (kilobytes).

また、データエリア22には、図3に示すように、輝度成分と色差成分の量子化テーブルデータ22bが記憶されている。さらに、データエリア22には、図4に示すように、平坦画素領域率に対応するスケールファクタデータ22cが記憶されている。スケールファクタデータ22cは、平坦画素領域率の値によって三段階に分類されており、例えば、平坦画素領域率が65%以上である場合には、輝度成分のスケールファクタは0.08で圧縮処理を行うように設定され、平坦画素領域率が50%以上65%未満である場合には、輝度成分のスケールファクタは0.10で圧縮処理を行うように設定され、平坦画素領域率が50%未満である場合には、輝度成分のスケールファクタが0.13で圧縮処理を行うように設定されている。なお、色差成分については、ブロックノイズへの影響が少ないため、どの画像についてもスケールファクタは0.10で圧縮処理を行う。   Further, as shown in FIG. 3, the data area 22 stores quantization table data 22b of luminance components and color difference components. Furthermore, as shown in FIG. 4, the data area 22 stores scale factor data 22c corresponding to the flat pixel area ratio. The scale factor data 22c is classified into three stages according to the value of the flat pixel area ratio. For example, when the flat pixel area ratio is 65% or more, the scale factor data 22c is compressed with a scale factor of 0.08. When the flat pixel area ratio is 50% or more and less than 65%, the luminance component scale factor is set to 0.10 and the flat pixel area ratio is less than 50%. Is set to perform compression processing with a luminance component scale factor of 0.13. Since the color difference component has little influence on the block noise, the compression process is performed with a scale factor of 0.10 for any image.

具体的に、制御部10は、平坦画素領域検出プログラム21aを実行することにより、画像データの平坦画素領域を検出する平坦画素領域検出手段として機能する。制御部10は、平坦画素領域率算出プログラム21bを実行することにより、画像データの平坦画素領域率を算出する平坦画素領域率算出手段として機能する。また、制御部10は、圧縮率決定プログラム21cを実行することにより、算出された平坦画素領域率に基づいて画像データの圧縮率を決定する圧縮率決定手段として機能する。さらに、制御部10は、圧縮処理制御プログラム21dを実行することにより、決定された圧縮率で画像圧縮回路13に画像データを圧縮させる圧縮処理制御手段として機能する。   Specifically, the control unit 10 functions as a flat pixel region detection unit that detects a flat pixel region of image data by executing the flat pixel region detection program 21a. The control unit 10 functions as a flat pixel area ratio calculation unit that calculates the flat pixel area ratio of the image data by executing the flat pixel area ratio calculation program 21b. The control unit 10 also functions as a compression rate determination unit that determines the compression rate of the image data based on the calculated flat pixel area rate by executing the compression rate determination program 21c. Furthermore, the control unit 10 functions as a compression processing control unit that causes the image compression circuit 13 to compress the image data at the determined compression rate by executing the compression processing control program 21d.

画像圧縮回路13は、制御部10が圧縮処理制御プログラム21dを実行することによって起動し、画像用メモリ14に記憶された画像データを読み出して圧縮処理を行い、圧縮した画像データを液晶表示部15に表示して画像記録部12に記録する。
露出制御回路5は、例えば、オートアイリス等によって構成され、制御部10の制御によって光学的な開口絞り2の絞り値を変化させる。図1において、タイミング発生回路6は、CCD駆動回路7、プリプロセス回路8、A/D変換器9及び制御部10にタイミング信号を与え、同期した動作ができるようにしている。また、入力部17は、メモリ20内のデータエリア22に記憶された複数の圧縮率データ22aの中から画像データを圧縮する圧縮率を選択して入力する圧縮率入力手段として機能する。なお、ユーザによって入力部17から入力された圧縮率はパラメータ記憶用メモリ11に一時的に記憶される。
The image compression circuit 13 is activated when the control unit 10 executes the compression processing control program 21d, reads the image data stored in the image memory 14 and performs compression processing, and the compressed image data is displayed on the liquid crystal display unit 15. And recorded in the image recording unit 12.
The exposure control circuit 5 is configured by, for example, an auto iris or the like, and changes the aperture value of the optical aperture stop 2 under the control of the control unit 10. In FIG. 1, a timing generation circuit 6 gives a timing signal to a CCD drive circuit 7, a preprocess circuit 8, an A / D converter 9, and a control unit 10 so that they can operate in synchronization. The input unit 17 also functions as a compression rate input unit that selects and inputs a compression rate for compressing image data from among a plurality of compression rate data 22 a stored in the data area 22 in the memory 20. The compression rate input from the input unit 17 by the user is temporarily stored in the parameter storage memory 11.

<画像圧縮処理方法>
次に、デジタルカメラ100による画像圧縮処理方法について、図5に示すフローチャートを用いて説明する。
ユーザがデジタルカメラ100の電源をONにすると、制御部10は、露出制御回路5、タイミング発生回路6等の各部を起動させて撮像可能な状態にする。このとき、制御部10は、CCD3で結像した結像画像を液晶表示部15に表示させる(ステップS1)。次いで、制御部10は、被写体の撮像がなされたか否かを判断する(ステップS2)。ここで、制御部10が被写体の撮像がなされたと判断した場合(ステップS2:YES)、制御部10は、撮像時の画像データを一時的に画像用メモリ14に記憶させる(ステップS3)。一方、制御部10が被写体の撮像がなされていないと判断した場合(ステップS2:NO)、制御部10は、ステップS2の判断処理を繰り返す。
<Image compression processing method>
Next, an image compression processing method by the digital camera 100 will be described using the flowchart shown in FIG.
When the user turns on the power supply of the digital camera 100, the control unit 10 activates each unit such as the exposure control circuit 5, the timing generation circuit 6 and the like so that imaging can be performed. At this time, the control unit 10 displays the image formed by the CCD 3 on the liquid crystal display unit 15 (step S1). Next, the control unit 10 determines whether or not the subject has been imaged (step S2). If the control unit 10 determines that the subject has been imaged (step S2: YES), the control unit 10 temporarily stores the image data at the time of imaging in the image memory 14 (step S3). On the other hand, when the control unit 10 determines that the subject is not imaged (step S2: NO), the control unit 10 repeats the determination process of step S2.

ステップS3において、制御部10が撮像した画像データを画像用メモリ14に記憶させた後、制御部10は、画像用メモリ14に記憶された画像データを読み込み、プログラムエリア21に記憶された平坦画素領域検出プログラム21aを実行することにより、画像データの平坦画素領域を検出する(ステップS4)。次いで、制御部10は、プログラムエリア21に記憶された平坦画素領域率算出プログラム21bを実行することにより、画像データの全画素数に対するエッジ成分(高周波成分)が検出されなかった画素数、換言すれば、平坦画素領域率を算出する(ステップS5)。次いで、制御部10は、プログラムエリア21に記憶された圧縮率決定プログラム21cを実行することにより、データエリア22からスケールファクタデータ22cを読み込み(ステップS6)、ステップS4で算出した平坦画素領域率に対応するスケールファクタデータを画像データの圧縮処理に用いるデータとして決定し、パラメータ記憶用メモリ11に記憶させる(ステップS7)。   In step S <b> 3, after the image data captured by the control unit 10 is stored in the image memory 14, the control unit 10 reads the image data stored in the image memory 14 and stores the flat pixels stored in the program area 21. By executing the area detection program 21a, a flat pixel area of the image data is detected (step S4). Next, the control unit 10 executes the flat pixel area ratio calculation program 21b stored in the program area 21, thereby the number of pixels in which the edge component (high frequency component) with respect to the total number of pixels of the image data is not detected, in other words, For example, the flat pixel area ratio is calculated (step S5). Next, the control unit 10 reads the scale factor data 22c from the data area 22 by executing the compression rate determination program 21c stored in the program area 21 (step S6), and sets the flat pixel area ratio calculated in step S4. Corresponding scale factor data is determined as data to be used for image data compression processing and stored in the parameter storage memory 11 (step S7).

次いで、制御部10は、プログラムエリア21に記憶された圧縮処理制御プログラム21dを実行することにより、制御部10は、画像データを8×8のブロックに分割する(ステップS8)。次いで、制御部10は、画像データの各画素における(0〜255)の画素値を(−128〜127)の信号に変換する(ステップS9)。次いで、制御部10は、DCTによりDCT係数を算出し(ステップS10)、データエリア22に記憶された量子化テーブルデータ22bを読み込むとともに、ステップS7でパラメータ記憶用メモリ11に記憶させたスケールファクタデータを読み込む(ステップS11)。次いで、制御部10は、量子化テーブルデータ及びスケールファクタデータを用いてDCT係数を量子化する(ステップS12)。次いで、制御部10は、符号化テーブルを用いて、量子化したDCT係数をエントロピ符号化してハフマン符号で表し(ステップS13)、符号化信号(圧縮画像データ)を得ることができる。そして、制御部10は、圧縮された画像データを画像記録部12に記録させ(ステップS14)、これをもって本処理を終了させる。   Next, the control unit 10 executes the compression processing control program 21d stored in the program area 21, whereby the control unit 10 divides the image data into 8 × 8 blocks (step S8). Next, the control unit 10 converts the pixel value of (0 to 255) in each pixel of the image data into a signal of (−128 to 127) (step S9). Next, the control unit 10 calculates DCT coefficients by DCT (step S10), reads the quantization table data 22b stored in the data area 22, and scale factor data stored in the parameter storage memory 11 in step S7. Is read (step S11). Next, the control unit 10 quantizes the DCT coefficient using the quantization table data and the scale factor data (step S12). Next, the control unit 10 can entropy-encode the quantized DCT coefficient using the encoding table and express it as a Huffman code (step S13) to obtain an encoded signal (compressed image data). Then, the control unit 10 causes the image recording unit 12 to record the compressed image data (step S14), and this processing is terminated.

実施形態1におけるデジタルカメラ100によれば、制御部10は、平坦画素領域検出プログラム21aを実行することにより、画像データの平坦画素領域を検出し、平坦画素領域率算出プログラム21bを実行することにより、平坦画素領域率を算出する。そして、制御部10は、圧縮率決定プログラム21cを実行することにより、算出された平坦画素領域率に基づいて画像データの圧縮率を決定し、制御部10は、圧縮処理制御プログラム21dを実行することにより、決定された圧縮率で画像データを圧縮処理する。よって、画像データは、平坦画素領域率に応じて変化する圧縮率に基づいて圧縮処理されるので、画像データの特性にかかわらず、ブロックノイズが発生しない最適な圧縮率で画像データの画像処理を行うことができる。   According to the digital camera 100 in the first embodiment, the control unit 10 detects the flat pixel region of the image data by executing the flat pixel region detection program 21a, and executes the flat pixel region rate calculation program 21b. The flat pixel area ratio is calculated. Then, the control unit 10 executes the compression rate determination program 21c to determine the compression rate of the image data based on the calculated flat pixel area rate, and the control unit 10 executes the compression processing control program 21d. Thus, the image data is compressed at the determined compression rate. Therefore, since the image data is compressed based on a compression rate that changes in accordance with the flat pixel area rate, the image data is processed at an optimal compression rate that does not cause block noise regardless of the characteristics of the image data. It can be carried out.

(実施形態2)
次に、本発明に係る画像処理装置の実施形態2について詳細に説明する。なお、実施形態2の特徴は、実施形態1における画像データの圧縮処理が異なる点であるため、実施形態1と同様の構成要素には同一符号を付して説明を省略する。
<デジタルカメラの構成>
データエリア22には、図1及び図6に示すように、平坦画素領域率に基づいた輝度成分と色差成分の量子化テーブルデータ22fが記憶されている。量子化テーブルデータ22fは、平坦画素領域率の値によって三種類に分類されており、平坦画素領域率が65%以上である場合には、輝度成分の量子化テーブルデータとして、図6(a)の量子化テーブルデータを用いて画像データの圧縮処理を行うように設定され、平坦画素領域率が50%以上65%未満である場合には、輝度成分の量子化テーブルデータとして、図6(b)の量子化テーブルデータを用いて画像データの圧縮処理を行うように設定され、平坦画素領域率が50%未満である場合には、輝度成分の量子化テーブルデータとして、図6(c)の量子化テーブルデータを用いて画像データの圧縮処理を行うように設定されている。なお、色差成分については、ブロックノイズへの影響が少ないため、どの画像についても色差成分の量子化テーブルデータとして、図7の量子化テーブルデータ22fを用いて画像データの圧縮処理を行う。
なお、スケールファクタデータ22gは、平坦画素領域率がいかなる値であっても、輝度成分、色差成分ともに1.00に設定されている。
さらに、データエリア22には、図8に示すように、スケールファクタデータ22gが記憶されている。
(Embodiment 2)
Next, Embodiment 2 of the image processing apparatus according to the present invention will be described in detail. Note that the feature of the second embodiment is that the image data compression process in the first embodiment is different. Therefore, the same components as those in the first embodiment are denoted by the same reference numerals and description thereof is omitted.
<Configuration of digital camera>
As shown in FIGS. 1 and 6, the data area 22 stores quantization table data 22 f of luminance components and color difference components based on the flat pixel area ratio. The quantization table data 22f is classified into three types according to the value of the flat pixel area ratio. When the flat pixel area ratio is 65% or more, the quantization table data of the luminance component is shown in FIG. When the flat pixel area ratio is 50% or more and less than 65%, the luminance component quantization table data is shown in FIG. ) Quantization table data is set so as to be compressed, and when the flat pixel area ratio is less than 50%, the luminance component quantization table data shown in FIG. It is set to compress the image data using the quantization table data. Since the color difference component has little influence on block noise, image data compression processing is performed using the quantization table data 22f of FIG. 7 as the color difference component quantization table data for any image.
Note that the scale factor data 22g is set to 1.00 for both the luminance component and the color difference component regardless of the flat pixel area ratio.
Further, scale factor data 22g is stored in the data area 22 as shown in FIG.

<画像圧縮処理方法>
次に、デジタルカメラ100による画像圧縮処理方法について、図9に示すフローチャートを用いて説明する。
ユーザがデジタルカメラ100の電源をONにすると、制御部10は、露出制御回路5、タイミング発生回路6等の各部を起動させて撮像可能な状態にする。このとき、制御部10は、CCD3で結像した結像画像を液晶表示部15に表示させる(ステップS21)。次いで、制御部10は、被写体の撮像がなされたか否かを判断する(ステップS22)。ここで、制御部10が被写体の撮像がなされたと判断した場合(ステップS22:YES)、制御部10は、撮像時の画像データを一時的に画像用メモリ14に記憶させる(ステップS23)。一方、制御部10が被写体の撮像がなされていないと判断した場合(ステップS22:NO)、制御部10は、ステップS22の判断処理を繰り返す。
<Image compression processing method>
Next, an image compression processing method by the digital camera 100 will be described using the flowchart shown in FIG.
When the user turns on the power supply of the digital camera 100, the control unit 10 activates each unit such as the exposure control circuit 5, the timing generation circuit 6 and the like so that imaging can be performed. At this time, the control unit 10 displays the image formed by the CCD 3 on the liquid crystal display unit 15 (step S21). Next, the control unit 10 determines whether or not the subject has been imaged (step S22). If the control unit 10 determines that the subject has been imaged (step S22: YES), the control unit 10 temporarily stores the image data at the time of imaging in the image memory 14 (step S23). On the other hand, when the control unit 10 determines that the subject is not imaged (step S22: NO), the control unit 10 repeats the determination process of step S22.

ステップS23において、制御部10が撮像した画像データを画像用メモリ14に記憶させた後、制御部10は、画像用メモリ14に記憶された画像データを読み込み、プログラムエリア21に記憶された平坦画素領域検出プログラム21aを実行することにより、画像データの平坦画素領域を検出する(ステップS24)。次いで、制御部10は、プログラムエリア21に記憶された平坦画素領域率算出プログラム21bを実行することにより、画像データの全画素数に対するエッジ成分(高周波成分)が検出されなかった画素数、換言すれば、平坦画素領域率を算出する(ステップS25)。次いで、制御部10は、プログラムエリア21に記憶された圧縮率決定プログラム21cを実行することにより、データエリア22から量子化テーブルデータ22fを読み込み(ステップS26)、ステップS24で算出した平坦画素領域率に対応する量子化テーブルデータを画像データの圧縮処理に用いるデータとして決定し、パラメータ記憶用メモリ11に記憶させる(ステップS27)。   In step S <b> 23, after the image data captured by the control unit 10 is stored in the image memory 14, the control unit 10 reads the image data stored in the image memory 14 and stores the flat pixels stored in the program area 21. By executing the area detection program 21a, a flat pixel area of the image data is detected (step S24). Next, the control unit 10 executes the flat pixel area ratio calculation program 21b stored in the program area 21, thereby the number of pixels in which the edge component (high frequency component) with respect to the total number of pixels of the image data is not detected, in other words, For example, the flat pixel area ratio is calculated (step S25). Next, the control unit 10 executes the compression rate determination program 21c stored in the program area 21, thereby reading the quantization table data 22f from the data area 22 (step S26), and the flat pixel area ratio calculated in step S24. Is determined as data used for the compression processing of the image data, and is stored in the parameter storage memory 11 (step S27).

次いで、制御部10は、プログラムエリア21に記憶された圧縮処理制御プログラム21dを実行することにより、制御部10は、画像データを8×8のブロックに分割する(ステップS28)。次いで、制御部10は、画像データの各画素における(0〜255)の画素値を(−128〜127)の信号に変換する(ステップS29)。次いで、制御部10は、DCTによりDCT係数を算出し(ステップS30)、データエリア22に記憶されたスケールファクタデータ22gを読み込むとともに、ステップS27でパラメータ記憶用メモリ11に記憶させた量子化テーブルデータ22fを読み込む(ステップS31)。次いで、制御部10は、量子化テーブルデータ及びスケールファクタデータを用いてDCT係数を量子化する(ステップS32)。次いで、制御部10は、符号化テーブルを用いて、量子化したDCT係数をエントロピ符号化してハフマン符号で表し(ステップS33)、符号化信号(圧縮画像データ)を得ることができる。そして、制御部10は、圧縮された画像データを画像記録部12に記録させ(ステップS34)、これをもって本処理を終了させる。   Next, the control unit 10 executes the compression processing control program 21d stored in the program area 21, whereby the control unit 10 divides the image data into 8 × 8 blocks (step S28). Next, the control unit 10 converts the pixel value of (0 to 255) in each pixel of the image data into a signal of (−128 to 127) (step S29). Next, the control unit 10 calculates DCT coefficients by DCT (step S30), reads the scale factor data 22g stored in the data area 22, and stores the quantization table data stored in the parameter storage memory 11 in step S27. 22f is read (step S31). Next, the control unit 10 quantizes the DCT coefficient using the quantization table data and the scale factor data (step S32). Next, the control unit 10 can entropy-encode the quantized DCT coefficient using the encoding table and express it as a Huffman code (step S33) to obtain an encoded signal (compressed image data). Then, the control unit 10 records the compressed image data in the image recording unit 12 (step S34), and terminates the present process.

実施形態2におけるデジタルカメラ100によれば、制御部10は、平坦画素領域検出プログラム21aを実行することにより、画像データの平坦画素領域を検出し、制御部10は、平坦画素領域率算出プログラム21bを実行することにより、平坦画素領域率を算出する。そして、制御部10は、圧縮率決定プログラム21cを実行することにより、算出された平坦画素領域率に基づいて画像データの圧縮率を決定する。そして、制御部10は、圧縮処理制御プログラム21dを実行することにより、決定された圧縮率で画像データを圧縮処理する。よって、画像データは、平坦画素領域率に応じて変化する圧縮率に基づいて圧縮処理されるので、画像データの特性にかかわらず、ブロックノイズが発生しない最適な圧縮率で画像データの画像処理を行うことができる。   According to the digital camera 100 in the second embodiment, the control unit 10 detects the flat pixel region of the image data by executing the flat pixel region detection program 21a, and the control unit 10 detects the flat pixel region rate calculation program 21b. Is executed to calculate the flat pixel area ratio. And the control part 10 determines the compression rate of image data based on the calculated flat pixel area ratio by running the compression rate determination program 21c. Then, the control unit 10 executes the compression processing control program 21d to compress the image data at the determined compression rate. Therefore, since the image data is compressed based on a compression rate that changes in accordance with the flat pixel area rate, the image data is processed at an optimal compression rate that does not cause block noise regardless of the characteristics of the image data. It can be carried out.

(実施形態3)
次に、本発明に係る画像処理装置の実施形態3について詳細に説明する。なお、実施形態3の特徴は、実施形態1における画像データの圧縮処理が異なる点であるため、実施形態1と同様の構成要素には同一符号を付して説明を省略する。
<デジタルカメラの構成>
デジタルカメラ300の制御部10には、各種処理を実行するプログラムや画像データの圧縮処理に必要なデータ等を記憶する圧縮率記憶手段としてのメモリ20が備えられている。
メモリ20には、各種機能を実現させるための各プログラムが記憶されたプログラムエリア21、画像データの圧縮率、量子化テーブル、スケールファクタ、符号化テーブル等が記憶されたデータエリア22が形成されている。具体的に、プログラムエリア21には、画像データの全画素数に対するエッジ成分(高周波成分)が検出されなかった画素を検出する平坦画素領域検出プログラム21aが記憶されている。また、プログラムエリア21には、画像データの全画素数に対するエッジ成分(高周波成分)が検出されなかった画素数の割合、すなわち、平坦画素領域率を算出する平坦画素領域率算出プログラム21bが記憶されている。また、プログラムエリア21には、算出された平坦画素領域率に基づいて画像データの圧縮率を決定する圧縮率決定プログラム21cが記憶されている。さらに、プログラムエリア21には、入力部17により入力された圧縮率が決定された圧縮率よりも高い場合に、決定された圧縮率で画像データを圧縮処理させる圧縮処理制御プログラム21fが記憶されている。
(Embodiment 3)
Next, Embodiment 3 of the image processing apparatus according to the present invention will be described in detail. Note that the feature of the third embodiment is that the image data compression process in the first embodiment is different. Therefore, the same components as those in the first embodiment are denoted by the same reference numerals, and description thereof is omitted.
<Configuration of digital camera>
The control unit 10 of the digital camera 300 includes a memory 20 as a compression rate storage unit that stores programs for executing various processes, data necessary for image data compression processing, and the like.
The memory 20 includes a program area 21 in which programs for realizing various functions are stored, and a data area 22 in which image data compression rates, quantization tables, scale factors, encoding tables, and the like are stored. Yes. Specifically, the program area 21 stores a flat pixel region detection program 21a for detecting pixels in which edge components (high frequency components) with respect to the total number of pixels of the image data are not detected. The program area 21 stores a ratio of the number of pixels in which the edge component (high frequency component) is not detected with respect to the total number of pixels of the image data, that is, a flat pixel area ratio calculation program 21b for calculating a flat pixel area ratio. ing. The program area 21 stores a compression rate determination program 21c that determines the compression rate of the image data based on the calculated flat pixel area rate. Further, the program area 21 stores a compression processing control program 21f that compresses image data at the determined compression rate when the compression rate input by the input unit 17 is higher than the determined compression rate. Yes.

具体的に、制御部10は、平坦画素領域検出プログラム21aを実行することにより、画像データの平坦画素領域を検出する平坦画素領域検出手段として機能する。制御部10は平坦画素領域率算出プログラム21bを実行することにより、画像データの平坦画素領域率を算出する平坦画素領域率算出手段として機能する。また、制御部10は、圧縮率決定プログラム21cを実行することにより、算出された平坦画素領域率に基づいて画像領域データの圧縮率を決定する圧縮率決定手段として機能する。さらに、制御部10は、圧縮処理制御プログラム21fを実行することにより、入力部17により入力された圧縮率が圧縮率決定プログラム21cによって決定された圧縮率よりも高い場合に、圧縮率決定プログラム21cによって決定された圧縮率で画像データを圧縮処理させる圧縮処理制御手段として機能する。   Specifically, the control unit 10 functions as a flat pixel region detection unit that detects a flat pixel region of image data by executing the flat pixel region detection program 21a. The control unit 10 functions as a flat pixel area ratio calculation unit that calculates the flat pixel area ratio of the image data by executing the flat pixel area ratio calculation program 21b. Further, the control unit 10 functions as a compression rate determination unit that determines the compression rate of the image area data based on the calculated flat pixel area rate by executing the compression rate determination program 21c. Furthermore, the control unit 10 executes the compression processing control program 21f, and when the compression rate input by the input unit 17 is higher than the compression rate determined by the compression rate determination program 21c, the compression rate determination program 21c. It functions as a compression processing control means for compressing image data at the compression rate determined by.

<画像圧縮処理方法>
次に、デジタルカメラ100による画像圧縮処理方法について、図10に示すフローチャートを用いて説明する。
ユーザがデジタルカメラ300の電源をONにすると、制御部10は、露出制御回路5、タイミング発生回路6等の各部を起動させて撮像可能な状態にする。このとき、制御部10は、CCD3で結像した結像画像を液晶表示部15に表示させる(ステップS41)。次いで、制御部10は、被写体の撮像がなされたか否かを判断する(ステップS42)。ここで、制御部10が被写体の撮像がなされたと判断した場合(ステップS42:YES)、制御部10は、撮像時の画像データを一時的に画像用メモリ14に記憶させる(ステップS43)。一方、制御部10が被写体の撮像がなされていないと判断した場合(ステップS42:NO)、制御部10は、ステップS42の判断処理を繰り返す。
<Image compression processing method>
Next, an image compression processing method by the digital camera 100 will be described using the flowchart shown in FIG.
When the user turns on the power of the digital camera 300, the control unit 10 activates each unit such as the exposure control circuit 5, the timing generation circuit 6, and the like so that imaging can be performed. At this time, the control unit 10 displays the image formed by the CCD 3 on the liquid crystal display unit 15 (step S41). Next, the control unit 10 determines whether or not the subject has been imaged (step S42). If the control unit 10 determines that the subject has been imaged (step S42: YES), the control unit 10 temporarily stores the image data at the time of imaging in the image memory 14 (step S43). On the other hand, when the control unit 10 determines that the subject is not imaged (step S42: NO), the control unit 10 repeats the determination process of step S42.

ステップS43において、制御部10が撮像した画像データを画像用メモリ14に記憶させた後、制御部10は、画像用メモリ14に記憶された画像データを読み込み、プログラムエリア21に記憶された平坦画素領域検出プログラム21aを実行することにより、画像データの平坦画素領域を検出する(ステップS44)。次いで、制御部10は、プログラムエリア21に記憶された平坦画素領域率算出プログラム21bを実行することにより、画像データの全画素数に対するエッジ成分(高周波成分)が検出されなかった画素数、換言すれば、平坦画素領域率を算出する(ステップS45)。次いで、制御部10は、プログラムエリア21に記憶された圧縮率決定プログラム21cを実行することにより、データエリア22からスケールファクタデータ22cを読み込み(ステップS46)、ステップS44で算出した平坦画素領域率に対応するスケールファクタデータを画像データの圧縮処理に用いるスケールファクタデータの候補として決定し、パラメータ記憶用メモリ11に記憶させる(ステップS47)。   In step S43, the image data captured by the control unit 10 is stored in the image memory 14, and then the control unit 10 reads the image data stored in the image memory 14 and stores the flat pixels stored in the program area 21. By executing the area detection program 21a, a flat pixel area of the image data is detected (step S44). Next, the control unit 10 executes the flat pixel area ratio calculation program 21b stored in the program area 21, thereby the number of pixels in which the edge component (high frequency component) with respect to the total number of pixels of the image data is not detected, in other words, For example, the flat pixel area ratio is calculated (step S45). Next, the control unit 10 reads the scale factor data 22c from the data area 22 by executing the compression rate determination program 21c stored in the program area 21 (step S46), and sets the flat pixel area ratio calculated in step S44. Corresponding scale factor data is determined as a candidate of scale factor data to be used for image data compression processing, and stored in the parameter storage memory 11 (step S47).

次いで、制御部10は、プログラムエリア21に記憶された圧縮処理制御プログラム21fを実行することにより、ステップS47で決定した平坦画素領域率に対応するスケールファクタデータと入力部17により入力されたスケールファクタデータとを比較する(ステップS48)。
ここで、制御部10が入力部17により入力されたスケールファクタデータが決定されたスケールファクタデータよりも高いと判断した場合(ステップS48:YES)、制御部10は、平坦画素領域率に対応するスケールファクタデータを画像データの圧縮処理に用いるスケールファクタデータとして決定し、パラメータ記憶用メモリ11に記憶させる(ステップS49)。一方、制御部10が入力部17により入力されたスケールファクタデータが平坦画素領域率に対応するスケールファクタデータよりも低い又は同じであると判断した場合(ステップS48:NO)、制御部10は、入力部17より入力されたスケールファクタデータを画像データの圧縮処理に用いるデータとして決定し、パラメータ記憶用メモリ11に記憶させる(ステップS50)。
Next, the control unit 10 executes the compression processing control program 21f stored in the program area 21, thereby the scale factor data corresponding to the flat pixel area ratio determined in step S47 and the scale factor input by the input unit 17. The data is compared (step S48).
Here, when the control unit 10 determines that the scale factor data input by the input unit 17 is higher than the determined scale factor data (step S48: YES), the control unit 10 corresponds to the flat pixel area ratio. The scale factor data is determined as the scale factor data used for the image data compression process, and is stored in the parameter storage memory 11 (step S49). On the other hand, when the control unit 10 determines that the scale factor data input by the input unit 17 is lower or the same as the scale factor data corresponding to the flat pixel area ratio (step S48: NO), the control unit 10 The scale factor data input from the input unit 17 is determined as data used for image data compression processing and stored in the parameter storage memory 11 (step S50).

次いで、制御部10は、画像データを8×8のブロックに分割する(ステップS51)。次いで、制御部10は、画像データの各画素における(0〜255)の画素値を(−128〜127)の信号に変換する(ステップS52)。次いで、制御部10は、DCTによりDCT係数を算出し(ステップS52)、データエリア22に記憶された量子化テーブルデータ22bを読み込むとともに、ステップS49又はステップS50でパラメータ記憶用メモリ11に記憶させたスケールファクタデータを読み込む(ステップS54)。次いで、制御部10は、量子化テーブルデータ及びスケールファクタデータを用いてDCT係数を量子化する(ステップS55)。次いで、制御部10は、符号化テーブルを用いて、量子化したDCT係数をエントロピ符号化してハフマン符号で表し(ステップS56)、符号化信号(圧縮画像データ)を得ることができる。そして、制御部10は、圧縮された画像データを画像記録部12に記録させ(ステップS57)、これをもって本処理を終了させる。   Next, the control unit 10 divides the image data into 8 × 8 blocks (step S51). Next, the control unit 10 converts the pixel value of (0 to 255) in each pixel of the image data into a signal of (−128 to 127) (step S52). Next, the control unit 10 calculates a DCT coefficient by DCT (step S52), reads the quantization table data 22b stored in the data area 22, and stores it in the parameter storage memory 11 in step S49 or step S50. Scale factor data is read (step S54). Next, the control unit 10 quantizes the DCT coefficient using the quantization table data and the scale factor data (step S55). Next, the control unit 10 can entropy-encode the quantized DCT coefficient using the encoding table and express it as a Huffman code (step S56) to obtain an encoded signal (compressed image data). Then, the control unit 10 records the compressed image data in the image recording unit 12 (step S57), and this processing is terminated.

実施形態3におけるデジタルカメラ300によれば、制御部10は、平坦画素領域検出プログラム21aを実行することにより、画像データの平坦画素領域を検出し、平坦画素領域率算出プログラム21bを実行することにより、平坦画素領域率を算出する。そして、制御部10は、圧縮率決定プログラム21cを実行することにより、算出された平坦画素領域率に基づいて画像データの圧縮率を決定する。そして、制御部10は、圧縮処理制御プログラム21fを実行することにより、入力部17により入力された圧縮率が決定された圧縮率よりも高い場合に、決定された圧縮率で画像データを圧縮処理する。よって、画像データは、決定された圧縮率以上で圧縮処理されることがないので、画像データの特性にかかわらず、ブロックノイズが発生しない最適な圧縮率で画像データの画像処理を行うことができる。   According to the digital camera 300 in the third embodiment, the control unit 10 detects the flat pixel region of the image data by executing the flat pixel region detection program 21a, and executes the flat pixel region rate calculation program 21b. The flat pixel area ratio is calculated. And the control part 10 determines the compression rate of image data based on the calculated flat pixel area ratio by running the compression rate determination program 21c. Then, by executing the compression processing control program 21f, the control unit 10 compresses the image data at the determined compression rate when the compression rate input by the input unit 17 is higher than the determined compression rate. To do. Therefore, the image data is not compressed at a compression rate higher than the determined compression rate, so that the image data can be processed at an optimal compression rate that does not cause block noise regardless of the characteristics of the image data. .

なお、本発明は、上記実施の形態に限定されるものではない。例えば、画像データの平坦画素領域率の算出にあたり、像面AFにおいて抽出した高周波成分を積算し、その積算値の大きさで平坦画素領域率を算出してもよい。また、圧縮処理の際のDCT処理において算出されたDCT係数を積算し、その積算値の大きさで平坦画素領域率を算出してもよい。さらに、画像を任意のブロックに分割し、ブロック毎に輝度ヒストグラムを作成し、この輝度ヒストグラムの形状から各ブロックのコントラストを判断し、低コントラストと判断されたブロック数により、平坦画素領域率を算出してもよい。ここで、コントラストの判断は、ブロック内の各画素の輝度値が似たような値を持つ場合には低コントラストと判断し、各画素の輝度値にばらつきがある場合には高コントラストとする。また、輝度情報に替えて、色情報を用いてもよい。
また、上記実施形態においては、圧縮率をユーザが入力するように構成したが、デジタルカメラ100に設定されていてもよい。
また、スケールファクタ、量子化テーブルの分類においても、65%以上、50%以上65%未満、50%未満の三段階に分類する場合に限らず、10%毎にスケールファクタ、量子化テーブルを分類してもよい。
さらに、上記実施形態においては、設定された圧縮率で画像データ全体、すなわち、全画素領域を圧縮していたが、入力部17により入力された圧縮率が圧縮率決定プログラム21cを実行することにより決定された圧縮率よりも高い場合に、平坦画素領域を決定された圧縮率で圧縮し、画像データにおける平坦画素領域外の領域を入力された圧縮率で圧縮するようにしてもよい。これにより、平坦画素領域で発生しやすいブロックノイズの発生を抑制することができる効果に加えて、平坦画素領域以外の画素は圧縮率を低下させることなく圧縮処理を行うことができるので、ブロックノイズ画像を最小限のサイズに圧縮することができる。その他、本発明は、発明の要旨を逸脱しない範囲内で自由に変更、改良が可能である。
The present invention is not limited to the above embodiment. For example, in calculating the flat pixel area ratio of the image data, high frequency components extracted in the image plane AF may be integrated, and the flat pixel area ratio may be calculated based on the integrated value. Alternatively, the DCT coefficients calculated in the DCT process at the time of the compression process may be integrated, and the flat pixel area ratio may be calculated by the magnitude of the integrated value. Furthermore, the image is divided into arbitrary blocks, a luminance histogram is created for each block, the contrast of each block is judged from the shape of this luminance histogram, and the flat pixel area ratio is calculated based on the number of blocks judged to be low contrast May be. Here, the contrast is determined as low contrast when the luminance value of each pixel in the block has a similar value, and as high contrast when the luminance value of each pixel varies. Further, color information may be used instead of the luminance information.
In the above embodiment, the user inputs the compression rate. However, the compression rate may be set in the digital camera 100.
In addition, the scale factor and quantization table are classified not only in three stages of 65% or more, 50% or more but less than 65%, or less than 50%. May be.
Further, in the above embodiment, the entire image data, that is, the entire pixel area is compressed with the set compression rate, but the compression rate input by the input unit 17 executes the compression rate determination program 21c. When the compression rate is higher than the determined compression rate, the flat pixel region may be compressed with the determined compression rate, and the region outside the flat pixel region in the image data may be compressed with the input compression rate. As a result, in addition to the effect of suppressing the occurrence of block noise that is likely to occur in the flat pixel region, the pixels other than the flat pixel region can perform compression processing without reducing the compression rate. Images can be compressed to a minimum size. In addition, the present invention can be freely changed and improved without departing from the gist of the invention.

本発明に係るデジタルカメラの概略構成を示すブロック図である。It is a block diagram which shows schematic structure of the digital camera which concerns on this invention. 実施形態1におけるメモリに記憶されている圧縮率データである。It is the compression rate data memorize | stored in the memory in Embodiment 1. FIG. 実施形態1におけるメモリに記憶されている量子化テーブルデータである。It is the quantization table data memorize | stored in the memory in Embodiment 1. FIG. 実施形態1におけるメモリに記憶されているスケールファクタデータである。It is the scale factor data memorize | stored in the memory in Embodiment 1. FIG. 実施形態1における画像圧縮処理の流れを示すフローチャートである。4 is a flowchart illustrating a flow of image compression processing in the first embodiment. 実施形態2におけるメモリに記憶されている輝度成分の量子化テーブルデータである。It is the quantization table data of the luminance component memorize | stored in the memory in Embodiment 2. FIG. 実施形態2におけるメモリに記憶されている色差成分の量子化テーブルデータである。4 is a quantization table data of color difference components stored in a memory according to the second embodiment. 実施形態2におけるメモリに記憶されているスケールファクタデータである。It is the scale factor data memorize | stored in the memory in Embodiment 2. FIG. 実施形態2における画像圧縮処理の流れを示すフローチャートである。10 is a flowchart illustrating a flow of image compression processing in the second embodiment. 実施形態3における画像圧縮処理の流れを示すフローチャートである。14 is a flowchart illustrating a flow of image compression processing in the third embodiment.

符号の説明Explanation of symbols

10 制御部(平坦画素領域検出手段、平坦画素領域率算出手段、圧縮率決定手段、圧縮処理制御手段)
13 画像圧縮回路(圧縮処理手段)
17 入力部(圧縮率入力手段)
20 メモリ(圧縮率記憶手段)
100,200,300 デジタルカメラ(画像処理装置)
10 control unit (flat pixel area detection means, flat pixel area ratio calculation means, compression rate determination means, compression processing control means)
13 Image compression circuit (compression processing means)
17 Input section (compression rate input means)
20 memory (compression rate storage means)
100, 200, 300 Digital camera (image processing device)

Claims (3)

画像データを圧縮処理する圧縮処理手段を有する画像処理装置であって、
前記画像データから画素の特徴量が一定範囲内にある平坦画素領域を検出する平坦画素領域検出手段と、
前記平坦画素領域検出手段により検出された平坦画素領域の画素数が前記画像データの全画素数に対して占める割合を算出する平坦画素領域率算出手段と、
前記平坦画素領域率算出手段により算出された平坦画素領域率に基づいて前記画像データの圧縮率を決定する圧縮率決定手段と、
前記圧縮率決定手段により決定された圧縮率で前記圧縮処理手段に前記画像データを圧縮処理させる圧縮処理制御手段と、
を備えることを特徴とする画像処理装置。
An image processing apparatus having compression processing means for compressing image data,
Flat pixel region detecting means for detecting a flat pixel region having a pixel feature amount within a certain range from the image data;
Flat pixel area ratio calculating means for calculating the ratio of the number of pixels of the flat pixel area detected by the flat pixel area detecting means to the total number of pixels of the image data;
A compression rate determining unit that determines a compression rate of the image data based on the flat pixel region rate calculated by the flat pixel region rate calculating unit;
Compression processing control means for causing the compression processing means to compress the image data at the compression rate determined by the compression rate determination means;
An image processing apparatus comprising:
画像データを圧縮する圧縮率が複数記憶された圧縮率記憶手段と、前記圧縮率記憶手段に記憶された複数の圧縮率の中から前記画像データを圧縮する圧縮率を選択して入力する圧縮率入力手段と、前記圧縮率入力手段により入力された圧縮率で画像データを圧縮処理する圧縮処理手段と、を有する画像処理装置であって、
前記画像データから画素の特徴量が一定範囲内にある平坦画素領域を検出する平坦画素領域検出手段と、
所定範囲内の特徴量を有する平坦画素領域の画素数が前記画像データの全画素数に対して占める割合を算出する平坦画素領域率算出手段と、
前記平坦画素領域率算出手段により算出された平坦画素領域率に基づいて前記画像データの圧縮率を決定する圧縮率決定手段と、
前記圧縮率入力手段により入力された圧縮率が前記圧縮率決定手段により決定された圧縮率よりも高い場合に、前記圧縮率決定手段により決定された圧縮率で前記圧縮処理手段に前記画像データを圧縮処理させる圧縮処理制御手段と、
を備えることを特徴とする画像処理装置。
Compression rate storage means for storing a plurality of compression rates for compressing image data, and a compression rate for selecting and inputting the compression rate for compressing the image data from among the plurality of compression rates stored in the compression rate storage means An image processing apparatus comprising: input means; and compression processing means for compressing image data at a compression rate input by the compression rate input means,
Flat pixel region detecting means for detecting a flat pixel region having a pixel feature amount within a certain range from the image data;
Flat pixel area ratio calculating means for calculating a ratio of the number of pixels of the flat pixel area having a feature amount within a predetermined range to the total number of pixels of the image data;
A compression rate determining unit that determines a compression rate of the image data based on the flat pixel region rate calculated by the flat pixel region rate calculating unit;
When the compression rate input by the compression rate input unit is higher than the compression rate determined by the compression rate determination unit, the image data is sent to the compression processing unit at the compression rate determined by the compression rate determination unit. Compression processing control means for performing compression processing;
An image processing apparatus comprising:
画像データを圧縮する圧縮率が複数記憶された圧縮率記憶手段と、前記圧縮率記憶手段に記憶された複数の圧縮率の中から前記画像データを圧縮する圧縮率を選択して入力する圧縮率入力手段と、前記圧縮率入力手段により入力された圧縮率で画像データを圧縮処理する圧縮処理手段と、を有する画像処理装置であって、
前記画像データから画素の特徴量が一定範囲内にある平坦画素領域を検出する平坦画素領域検出手段と、
所定範囲内の特徴量を有する平坦画素領域の画素数が前記画像データの全画素数に対して占める割合を算出する平坦画素領域率算出手段と、
前記平坦画素領域率算出手段により算出された平坦画素領域率に基づいて前記画像データの圧縮率を決定する圧縮率決定手段と、
前記圧縮率入力手段により入力された圧縮率が前記圧縮率決定手段により決定された圧縮率よりも高い場合に、前記圧縮率決定手段により決定された圧縮率で前記圧縮処理手段に前記平坦画素領域を圧縮処理させ、前記圧縮率入力手段により入力された圧縮率で前記圧縮処理手段に前記画像データにおける前記平坦画素領域外の領域を圧縮処理させる圧縮処理制御手段と、
を備えることを特徴とする画像処理装置。
Compression rate storage means for storing a plurality of compression rates for compressing image data, and a compression rate for selecting and inputting the compression rate for compressing the image data from among the plurality of compression rates stored in the compression rate storage means An image processing apparatus comprising: input means; and compression processing means for compressing image data at a compression rate input by the compression rate input means,
Flat pixel region detecting means for detecting a flat pixel region having a pixel feature amount within a certain range from the image data;
Flat pixel area ratio calculating means for calculating a ratio of the number of pixels of the flat pixel area having a feature amount within a predetermined range to the total number of pixels of the image data;
A compression rate determining unit that determines a compression rate of the image data based on the flat pixel region rate calculated by the flat pixel region rate calculating unit;
When the compression rate input by the compression rate input unit is higher than the compression rate determined by the compression rate determination unit, the flat pixel region is input to the compression processing unit at the compression rate determined by the compression rate determination unit. Compression processing control means for causing the compression processing means to compress the area outside the flat pixel area in the image data at the compression rate input by the compression rate input means,
An image processing apparatus comprising:
JP2004067433A 2004-03-10 2004-03-10 Image processor Pending JP2005260467A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004067433A JP2005260467A (en) 2004-03-10 2004-03-10 Image processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004067433A JP2005260467A (en) 2004-03-10 2004-03-10 Image processor

Publications (2)

Publication Number Publication Date
JP2005260467A true JP2005260467A (en) 2005-09-22
JP2005260467A5 JP2005260467A5 (en) 2007-03-15

Family

ID=35085789

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004067433A Pending JP2005260467A (en) 2004-03-10 2004-03-10 Image processor

Country Status (1)

Country Link
JP (1) JP2005260467A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2009533900A (en) * 2006-04-07 2009-09-17 マイクロソフト コーポレーション Quantization adjustment based on texture level
US8442337B2 (en) 2007-04-18 2013-05-14 Microsoft Corporation Encoding adjustments for animation content
US8498335B2 (en) 2007-03-26 2013-07-30 Microsoft Corporation Adaptive deadzone size adjustment in quantization
US8503536B2 (en) 2006-04-07 2013-08-06 Microsoft Corporation Quantization adjustments for DC shift artifacts
US8576908B2 (en) 2007-03-30 2013-11-05 Microsoft Corporation Regions of interest for quality adjustments
US8588298B2 (en) 2006-05-05 2013-11-19 Microsoft Corporation Harmonic quantizer scale
US9185418B2 (en) 2008-06-03 2015-11-10 Microsoft Technology Licensing, Llc Adaptive quantization for enhancement layer video coding
CN111260739A (en) * 2018-11-30 2020-06-09 中移(杭州)信息技术有限公司 Picture processing method and device

Cited By (14)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8503536B2 (en) 2006-04-07 2013-08-06 Microsoft Corporation Quantization adjustments for DC shift artifacts
US8767822B2 (en) 2006-04-07 2014-07-01 Microsoft Corporation Quantization adjustment based on texture level
JP2009533900A (en) * 2006-04-07 2009-09-17 マイクロソフト コーポレーション Quantization adjustment based on texture level
US8711925B2 (en) 2006-05-05 2014-04-29 Microsoft Corporation Flexible quantization
US8588298B2 (en) 2006-05-05 2013-11-19 Microsoft Corporation Harmonic quantizer scale
US9967561B2 (en) 2006-05-05 2018-05-08 Microsoft Technology Licensing, Llc Flexible quantization
US8498335B2 (en) 2007-03-26 2013-07-30 Microsoft Corporation Adaptive deadzone size adjustment in quantization
US8576908B2 (en) 2007-03-30 2013-11-05 Microsoft Corporation Regions of interest for quality adjustments
US8442337B2 (en) 2007-04-18 2013-05-14 Microsoft Corporation Encoding adjustments for animation content
US9185418B2 (en) 2008-06-03 2015-11-10 Microsoft Technology Licensing, Llc Adaptive quantization for enhancement layer video coding
US9571840B2 (en) 2008-06-03 2017-02-14 Microsoft Technology Licensing, Llc Adaptive quantization for enhancement layer video coding
US10306227B2 (en) 2008-06-03 2019-05-28 Microsoft Technology Licensing, Llc Adaptive quantization for enhancement layer video coding
CN111260739A (en) * 2018-11-30 2020-06-09 中移(杭州)信息技术有限公司 Picture processing method and device
CN111260739B (en) * 2018-11-30 2023-07-21 中移(杭州)信息技术有限公司 Picture processing method and device

Similar Documents

Publication Publication Date Title
US8538174B2 (en) Image processing device
JP5352191B2 (en) Noise reduction apparatus, noise reduction method, and program
US9894270B2 (en) Image processing apparatus and image processing method for handling a raw image, of a moving image or a still image
JP2005295379A (en) Image coding method, imaging apparatus, and computer program
WO2009060970A1 (en) Signal processing apparatus and signal processing program
US9723169B2 (en) Imaging apparatus and imaging apparatus control method
JP6406949B2 (en) Image processing apparatus and image processing method
JP2015195582A (en) Image processing device, control method thereof, imaging apparatus, control method thereof, and recording medium
JP5092536B2 (en) Image processing apparatus and program thereof
JP2005260467A (en) Image processor
JP2008109305A (en) Image processing device, and control method of image processing device
JP6871727B2 (en) Imaging equipment, image processing methods, and programs
JP6700798B2 (en) Imaging device and control method thereof
JP4638392B2 (en) Image recording device
JP6741532B2 (en) Imaging device and recording method
US9392169B2 (en) Image processing apparatus, image processing method, program, and imaging apparatus
JP5111317B2 (en) Digital camera
JP2006197005A (en) Image coding apparatus and method of coding
JP2010074373A (en) Imaging apparatus
JP2006115483A (en) Electronic camera and program for image processing
JP2016005103A (en) Imaging apparatus and control method therefor
JP6452362B2 (en) Imaging apparatus and imaging method
JP4785698B2 (en) Imaging device
CN112752019B (en) Image pickup apparatus, image processing apparatus, and storage medium
JP2008227876A (en) Imaging apparatus

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20070130

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20070130

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20081107

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20081118

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20090310