JP4769332B2 - Image processing apparatus, image processing method, and program - Google Patents

Image processing apparatus, image processing method, and program Download PDF

Info

Publication number
JP4769332B2
JP4769332B2 JP2010194727A JP2010194727A JP4769332B2 JP 4769332 B2 JP4769332 B2 JP 4769332B2 JP 2010194727 A JP2010194727 A JP 2010194727A JP 2010194727 A JP2010194727 A JP 2010194727A JP 4769332 B2 JP4769332 B2 JP 4769332B2
Authority
JP
Japan
Prior art keywords
image
value
pixel
target pixel
contrast improvement
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
JP2010194727A
Other languages
Japanese (ja)
Other versions
JP2010277607A (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.)
Panasonic Corp
Panasonic Holdings Corp
Original Assignee
Panasonic Corp
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Panasonic Corp, Matsushita Electric Industrial Co Ltd filed Critical Panasonic Corp
Priority to JP2010194727A priority Critical patent/JP4769332B2/en
Publication of JP2010277607A publication Critical patent/JP2010277607A/en
Application granted granted Critical
Publication of JP4769332B2 publication Critical patent/JP4769332B2/en
Anticipated expiration legal-status Critical
Expired - Fee Related legal-status Critical Current

Links

Images

Landscapes

  • Image Processing (AREA)
  • Picture Signal Circuits (AREA)
  • Facsimile Image Signal Circuits (AREA)

Description

本発明は、デジタルカメラ等で得られたデジタル画像のコントラストを自動的に調整して、より鮮明な画像を高速に得ることができる画像処理装置及び画像処理方法に関するものである。   The present invention relates to an image processing apparatus and an image processing method capable of automatically adjusting the contrast of a digital image obtained by a digital camera or the like to obtain a clearer image at high speed.

デジタルカメラで撮影されたカラー画像は、撮像素子であるCCD素子で得られたアナログ値におけるノイズ割合を表すSNレベルやアナログ値をデジタル値に変換する際の変換精度等の影響で、実際に撮影された自然画像の持つ画素濃度のダイナミックレンジよりも狭いレンジに制限されるため、影がかかった細部での情報が損失する現象が発生する傾向がある。特に画像内に明るい領域と暗い領域が混在するようなサンプルを撮影しようとした場合にその傾向は大きい。その改善として、デジタル画像の輝度等の範囲をより輝度の高い画像部分からより輝度の低い画像部分までに拡げるように、コントラスト強調を行う手法がまず考えられる。そのコントラスト強調の従来手法としては、原画像を構成する全画素の輝度値の分布状態を示すヒストグラムを作成し、ヒストグラムの累積曲線を輝度変換曲線として原画像中の画素の輝度値を新な輝度値に変換し、画像のコントラストを強調するヒストグラム均等化手法がある。この手法は、原画像全領域の画素の輝度を同一の輝度変換曲線で新たな輝度に変換するために、部分的にはかえってコントラストが低下してしまう部分が生じることがある。このため、画像全体にわたってコントラスト強調を行いたい場合には、その領域に合ったコントラスト強調処理を行う必要がある。   A color image taken with a digital camera is actually taken due to the influence of the SN level that represents the noise ratio in the analog value obtained by the CCD element, which is an image sensor, and the conversion accuracy when the analog value is converted into a digital value. Since the natural image is limited to a range narrower than the dynamic range of the pixel density, there is a tendency that information in details with shadows is lost. This tendency is particularly significant when trying to photograph a sample in which a bright area and a dark area are mixed in the image. As an improvement, firstly, a method of performing contrast enhancement so as to expand the range of the luminance or the like of the digital image from a higher luminance image portion to a lower luminance image portion can be considered. As a conventional method of contrast enhancement, a histogram showing the distribution of the luminance values of all the pixels that make up the original image is created, and the luminance value of the pixels in the original image is set to a new luminance using the histogram's cumulative curve as the luminance conversion curve. There is a histogram equalization technique that converts to a value and enhances the contrast of the image. In this method, since the luminance of the pixels in the entire original image region is converted to a new luminance using the same luminance conversion curve, a portion where contrast is lowered may occur. For this reason, when it is desired to perform contrast enhancement over the entire image, it is necessary to perform contrast enhancement processing suitable for the region.

この手法のさらなる改善として、画像を複数の矩形領域に分割し、各々の領域毎に上記ヒストグラム均等手法を適用する局所的ヒストグラム均等化手法も多く提案されており(例えば、特許文献1参照)、その構成図は図22のようになる。図22はコントラスト改善部を表したものであり、画像を矩形に分割する画像データ分割部221、矩形ごとにヒストグラムを作成するヒストグラム作成部222、および矩形ごとにコントラストの伸張を行うコントラスト伸張部223よりなる。しかし、この手法を用いた場合、コントラストが強調されすぎる矩形領域が発生したり、隣接する矩形領域間の境界でコントラストが不連続になる可能性があるなどの問題点が指摘されている。   As a further improvement of this technique, many local histogram equalization techniques that divide an image into a plurality of rectangular areas and apply the above-described histogram equalization technique for each area have been proposed (for example, see Patent Document 1). The configuration diagram is as shown in FIG. FIG. 22 shows a contrast improving unit, an image data dividing unit 221 that divides an image into rectangles, a histogram creating unit 222 that creates a histogram for each rectangle, and a contrast expanding unit 223 that performs contrast expansion for each rectangle. It becomes more. However, when this method is used, problems have been pointed out, such as the occurrence of a rectangular region in which the contrast is too emphasized, or the contrast being discontinuous at the boundary between adjacent rectangular regions.

一方、ヒストグラムを利用しないで、このような問題の解決策として、フィールドごとにデジタルカメラのシャッタ時間や絞りを変えて、明るい部分と暗い部分を別々に撮像し、得られた各々の情報を1枚の画像に合成して中間調濃度を実現することで、実際に撮影された自然画像の持つ画素濃度度のダイナミックレンジに近づける手法も提案されている。その例として、特許文献2に参照されている例があり、その装置の構成図は図23のようになる。図23において、230は被写体の光電効果を行う撮像素子、231は画像信号を記録するメモリ、232は信号レベルを常数倍する乗算手段、233,238は画像信号のレベルに応じて重みを付加するレベル重み手段、234は信号を加算する加算手段、235は画像信号の速度を変換する速度変換手段、236は画像信号のレベルを圧縮するレベル圧縮手段、237は各ブロックのタイミングを制御するタイミング制御手段である。この発明装置は、撮像素子における電荷蓄積期間の異なる2枚以上の画像の信号レベルに応じて重み付け合成を行い、得られた合成画像出力を標準テレビ信号の速度に変換するとともに、テレビ信号での基準レベルに圧縮するテレビ撮像装置に関するものであるため、速度変換手段、レベル圧縮手段等を有する。そのため、デジタルカメラに当てはめる場合、速度変換手段やレベル圧縮手段は必要な構成要素ではない。しかし、この発明のように複数の電荷蓄積期間で得られた画像合成による手法の場合、合成された画像におけるコントラストの不連続性は生じにくいが、最低2枚の画像を続けて取るため、原理的に同じ画像を取ることができない。そのため、これらの画像を合成した場合、シャッタ速度にも影響されるが合成画像の細部がぼけたりずれたりする画像が作成される可能性がある。また、明るい部分を撮影する際の濃度レンジと暗い部分を撮影する際の濃度レンジで画像内の持つ濃度レンジ全域をカバーできていない場合、その2つの中間濃度レンジで不連続性が生じる危険もある。   On the other hand, without using a histogram, as a solution to such a problem, the shutter time and aperture of the digital camera are changed for each field, and a bright part and a dark part are imaged separately. A method has also been proposed in which a halftone density is realized by synthesizing with a single image so as to approach the dynamic range of the pixel density degree of a natural image actually taken. As an example, there is an example referred to in Patent Document 2, and the configuration diagram of the apparatus is as shown in FIG. In FIG. 23, reference numeral 230 denotes an image sensor for performing a photoelectric effect on a subject, 231 denotes a memory for recording an image signal, 232 denotes multiplication means for multiplying the signal level by a constant, and 233 and 238 add weights according to the level of the image signal. Level weighting means, 234 is an adding means for adding signals, 235 is a speed converting means for converting the speed of the image signal, 236 is a level compressing means for compressing the level of the image signal, and 237 is a timing control for controlling the timing of each block. Means. The inventive device performs weighted synthesis according to the signal level of two or more images having different charge accumulation periods in the image sensor, converts the resultant synthesized image output into the speed of a standard television signal, Since the present invention relates to a television imaging apparatus that compresses to a reference level, it has speed conversion means, level compression means, and the like. For this reason, when applied to a digital camera, speed conversion means and level compression means are not necessary components. However, in the case of the method by image synthesis obtained in a plurality of charge accumulation periods as in the present invention, contrast discontinuity does not easily occur in the synthesized image, but since at least two images are taken continuously, the principle Cannot take the same image. For this reason, when these images are combined, there is a possibility that an image in which the details of the combined image are blurred or shifted is generated although it is affected by the shutter speed. Also, if the density range when shooting a bright part and the density range when shooting a dark part do not cover the entire density range in the image, there is a risk of discontinuity between the two intermediate density ranges. is there.

ところで、このような影のかかった領域での細部及び色を人間が観察した場合、人間の視覚は上記のような問題を発生させることなく、画像の持つ広い濃度のダイナミクスや色を知覚することができる。このような人間の視覚を中心とした中央視野/周辺視野レティネックスの概念は、Edwin Landにより「An Alternative Technique for the Computation of the Designator in the RetinexTheory of Color Vision」、National Academy of Science、第84巻、pp.3078からpp.3080(1986)の中で紹介されている。この中では、人間の視覚のレティネックスの概念では、中央視野が2から4基礎単位分の直径を持ち、周辺視野が中央視野の約200から250倍の直径を有する逆2乗関数で記述されている。そして、中央視野、周辺視野各々の視野内での信号強度の空間的平均が知覚される強度に関係するとして定義されている。これらの原理に従い、上記のような暗部における色と明度表現を改善する手法が近年提案されている。この例は特許文献3で記述されており、図24はその構成を示す。なお、ここではグレースケール画像を例に説明するが、カラー画像に対しても拡張することができる。画像の(i,j)における画素値I(i,j)はプロセッサ241及びフィルタ242によって調整されフィルタリング処理が行われる。   By the way, when humans observe details and colors in such shadowed areas, human vision can perceive the wide density dynamics and colors of images without causing the above problems. Can do. The concept of central vision / peripheral vision Retinex centered on human vision is “An Alternative Technique for the Computation of the Designator in the Retinex Theory of Color Vision” by Edwin Land, National Academy of Science, Volume 84. Pp. 3078 to pp. 3080 (1986). In this, the Retinex concept of human vision is described by an inverse square function with a central visual field having a diameter of 2 to 4 basic units and a peripheral visual field having a diameter approximately 200 to 250 times the central visual field. ing. Then, the spatial average of the signal intensity in each of the central visual field and the peripheral visual field is defined as related to the perceived intensity. In recent years, methods for improving the color and lightness expression in the dark part as described above have been proposed in accordance with these principles. This example is described in Patent Document 3, and FIG. 24 shows its configuration. Although a gray scale image is described here as an example, it can be extended to a color image. The pixel value I (i, j) in (i, j) of the image is adjusted by the processor 241 and the filter 242, and the filtering process is performed.

画素ごとに、プロセッサ241は、次式(数1)のような調整画素値I'(i,j)を算出する。ここで、F(x,y)は周辺視野を表す周辺視野関数であり、「*」は畳み込み演算処理を示す。   For each pixel, the processor 241 calculates an adjusted pixel value I ′ (i, j) as in the following equation (Equation 1). Here, F (x, y) is a peripheral visual field function representing the peripheral visual field, and “*” indicates a convolution calculation process.

そして、F(x,y)が式(数2)の条件を満足するように正規化係数Kが決定されており、これにより式(数1)の第2項は、周辺視野における画素値の平均値に相当する。つまり、式(数1)は大きな領域における画素値平均値に対する各画素の画素値の比率を対数変換したものに相当する。周辺視野関数F(i,j)は、人間の視覚モデルとの対応から対象画素に近づくほど寄与する割合が高いように設計されており、式(数3)のようなガウス関数が適用される。ここでcは各画素値I(i,j)の調整画素値I'(i,j)をコントロールするための定数である。   Then, the normalization coefficient K is determined so that F (x, y) satisfies the condition of the equation (Equation 2), whereby the second term of the equation (Equation 1) is the pixel value in the peripheral visual field. Corresponds to the average value. That is, the equation (Equation 1) corresponds to a logarithmic conversion of the ratio of the pixel value of each pixel to the average pixel value in a large area. The peripheral visual field function F (i, j) is designed so that the contribution ratio increases as it approaches the target pixel from the correspondence with the human visual model, and a Gaussian function such as Expression (3) is applied. . Here, c is a constant for controlling the adjusted pixel value I ′ (i, j) of each pixel value I (i, j).

Figure 0004769332
Figure 0004769332

Figure 0004769332
Figure 0004769332

Figure 0004769332
Figure 0004769332

以上のように、この従来の発明では周辺視野での平均画素値に対する対象画素値を調整された画素値I'(i,j)として算出し、この値に対して、ディスプレイ243によって使用されるレティネックス出力R(i,j)を生成するためのフィルタ処理が242により行われる。242はI'(i,j)を対数領域からディスプレイ243で扱われるR(i,j)の画素値領域へ変換するものであり、処理の簡便化のために全ての画素に対して同一のオフセット及び利得変換関数を適用する処理が用いられる。   As described above, in the conventional invention, the target pixel value with respect to the average pixel value in the peripheral visual field is calculated as the adjusted pixel value I ′ (i, j), and this value is used by the display 243. Filter processing for generating Retinex output R (i, j) is performed by 242. Reference numeral 242 converts I ′ (i, j) from a logarithmic region to a pixel value region of R (i, j) handled by the display 243, and is the same for all pixels for the sake of simplification of processing. A process that applies an offset and gain conversion function is used.

しかしながら、この手法の場合、周辺視野関数を制御するcによる影響を大きく受ける。例えば、このcが大きな値になると対象画素に寄与する周辺視野が大きくなることで、大きな影における色の補償のみが可能となるが、一方、このcが小さい値の場合、対象画素近傍のみが影響を与えることとなり、小さな影領域での改善のみが見受けられる。このように扱う画像内の画素値のダイナミックスレンジに応じて適切なcを考慮する必要があり画像依存性の問題が挙げられる。その改善として、複数の周辺視野領域を設ける手法も同じ特許内に提案されているが、いくつ周辺視野領域を用意するかが明確になっていない。また、改善精度を向上されるために大きな周辺領域から小さい周辺領域を多く用意することにより、処理時間が膨大になってしまうという問題点がある。   However, this method is greatly influenced by c that controls the peripheral visual field function. For example, if c is a large value, the peripheral visual field that contributes to the target pixel is increased, so that only color compensation in a large shadow is possible, whereas if c is a small value, only the vicinity of the target pixel is detected. Only an improvement in small shadow areas can be seen. Appropriate c needs to be taken into account according to the dynamic range of pixel values in the image handled in this way, and there is a problem of image dependency. As an improvement, a method of providing a plurality of peripheral visual field areas has been proposed in the same patent, but it is not clear how many peripheral visual field areas are prepared. In addition, in order to improve the improvement accuracy, there is a problem that the processing time becomes enormous by preparing many small peripheral areas from large peripheral areas.

また、複数の定数cにより設定される最大の周辺視野内で画素値変動が非常に小さい場合、調整された画素値I'(i,j)は複数領域を用意してもI(i,j)に関係なく1.0近傍になる。このような場合、画素値変動の小さい対象画素でのI'(i,j)はその入力画像全体におけるI'(i,j)の平均近傍に位置する場合が多く、242におけるオフセット及び利得変換関数如何に問わず、実際の画素値における中央付近に向かいやすい傾向がある。特にハイライト輝度をもつ一様に広い画像領域では、調整後の輝度が下がる方向に調整されやすく視覚的に悪化する問題がある。一方、夜景等の輝度の低く広い領域では過剰に強調されることで撮影時に発生した色ノイズや圧縮ノイズが表れることがあった。   In addition, when the pixel value variation is extremely small within the maximum peripheral field of view set by a plurality of constants c, the adjusted pixel value I ′ (i, j) is I (i, j ) Regardless of (). In such a case, I ′ (i, j) at the target pixel with small pixel value variation is often located in the vicinity of the average of I ′ (i, j) in the entire input image, and offset and gain conversion at 242 Regardless of the function, there is a tendency to tend toward the center of the actual pixel value. In particular, in a uniformly wide image area having a highlight luminance, there is a problem that the luminance after adjustment is easily adjusted in a decreasing direction and visually deteriorates. On the other hand, color noise and compression noise generated at the time of photographing may appear due to excessive emphasis in a low luminance and wide area such as a night scene.

この課題を解決するための手法として、先行出願より入力画像と強調画像の適応的な合成画像を導出することでこれらを改善できることを示した。その一方で、画像の平坦化、特に輪郭部分における濃度差の減少が発生した。   As a technique for solving this problem, it was shown that these can be improved by deriving an adaptive composite image of the input image and the emphasized image from the prior application. On the other hand, flattening of the image, particularly a decrease in density difference at the contour portion, occurred.

特開2000−285230号公報JP 2000-285230 A 特開平6−141229号公報JP-A-6-141229 特表2000−511315号公報Special Table 2000-511315

このように、従来の人間の視覚モデルをもとにしたコントラスト改善技術では、その他の手法よりもより鮮明なコントラスト変換画像を得ることができたが、人間の周辺視野を規定するための定数や最終的に扱うための実際の画素値に変換する際のフィルタ処理の設計に経験的知識を多く含むという問題点を抱えている。その対応策として、複数の周辺視野を用意した多重解像度モデルも提案されているが、処理時間が膨大となってしまう。   In this way, the conventional contrast improvement technology based on the human visual model was able to obtain a clearer contrast-converted image than other methods. There is a problem that a lot of empirical knowledge is included in the design of the filter processing when converting into actual pixel values to be finally handled. As a countermeasure, a multi-resolution model with a plurality of peripheral fields of view has been proposed, but the processing time becomes enormous.

また、画像合成時により生じた合成画像の平坦化、特に輪郭部分のさらなる強調が必要になる。   Further, it is necessary to flatten the synthesized image generated by the image synthesis, particularly to further emphasize the contour portion.

本発明はかかる点に鑑みてなされたものであり、撮像された明暗部を持つ画像のみを用いてより鮮明かつ高速に撮像画像のコントラストを改善することができる画像処理装置及び画像処理方法を提供することを目的とする。   The present invention has been made in view of the above points, and provides an image processing apparatus and an image processing method capable of improving the contrast of a captured image more clearly and at high speed using only the captured image having a bright and dark part. The purpose is to do.

上記課題を解決するために本発明の第1の画像処理装置及び画像処理方法は、対象画素の画素値とその周辺領域における平均画素値の比較よりコントラスト改善量を求める。得られたコントラスト改善量を実際の画素値に変換する際に、対象画素の輝度に応じて制御することで、入力画像と強調画像の合成画像に生じる画像の平坦化や輪郭部分における濃度差の減少が改善することができるようにしたものである。   In order to solve the above problems, the first image processing apparatus and the image processing method of the present invention obtain the contrast improvement amount by comparing the pixel value of the target pixel and the average pixel value in the surrounding area. When converting the obtained contrast improvement amount into an actual pixel value, by controlling according to the luminance of the target pixel, the flattening of the image generated in the composite image of the input image and the emphasized image, or the density difference in the contour portion The reduction can be improved.

上記課題を解決するために本発明の第2の画像処理装置及び画像処理方法は、対象画素の画素値とその周辺領域における平均画素値の比較よりコントラスト改善量を求める際に、対象画素の輝度に応じて周辺領域の平均画素値である比較濃度を制御するものである。こうすることで、より対象画素の濃度とその周囲の比較濃度の差を強調することができ、入力画像と強調画像の合成画像に生じる画像の平坦化や輪郭部分における濃度差の減少が改善することができるようにしたものである。   In order to solve the above problems, the second image processing apparatus and the image processing method of the present invention provide the luminance of the target pixel when obtaining the contrast improvement amount by comparing the pixel value of the target pixel and the average pixel value in the surrounding area. Accordingly, the comparison density which is the average pixel value in the peripheral area is controlled. In this way, the difference between the density of the target pixel and the surrounding comparative density can be enhanced, and the flattening of the image generated in the composite image of the input image and the emphasized image and the reduction of the density difference in the contour portion are improved. It is something that can be done.

上記課題を解決するために本発明の第3の画像処理装置及び画像処理方法は、対象画素の画素値とその周辺領域における平均画素値の比較よりコントラスト改善量を求める。得られたコントラスト改善量を実際の画素値に変換する際に、対象画素の濃度と周囲画素の濃度の差分に応じて上記コントラスト改善量を補正することで、入力画像と強調画像の合成画像に生じる画像の平坦化や輪郭部分における濃度差の減少が改善することができるようにしたものである。   In order to solve the above problem, the third image processing apparatus and image processing method of the present invention obtains the contrast improvement amount by comparing the pixel value of the target pixel and the average pixel value in the surrounding area. When the obtained contrast improvement amount is converted into an actual pixel value, the contrast improvement amount is corrected according to the difference between the density of the target pixel and the density of the surrounding pixels, so that a composite image of the input image and the emphasized image is obtained. The flattening of the image and the reduction of the density difference in the contour portion can be improved.

上記課題を解決するために本発明の第4の画像処理装置及び画像処理方法は、対象画素の周辺領域における平均画素値を求める際に、まずコントラスト改善時に使用する画素の垂直方向位置を決定し、決定された画素を対象として、各水平画素位置ごとに垂直方向における画素濃度の加算値を求める。そして、得られた各水平画素位置における加算値より、対象画素の周囲画素として設定された領域内に含まれる水平画素位置の値を用いて、対象画素に対する比較濃度を算出することで処理の簡略化を実現するものである。   In order to solve the above-described problem, the fourth image processing apparatus and image processing method of the present invention first determines the vertical position of a pixel to be used for contrast improvement when obtaining an average pixel value in a peripheral region of the target pixel. Then, for the determined pixel, an addition value of pixel density in the vertical direction is obtained for each horizontal pixel position. Then, the comparison density for the target pixel is calculated by using the value of the horizontal pixel position included in the region set as the surrounding pixel of the target pixel from the obtained addition value at each horizontal pixel position, thereby simplifying the processing. Is to realize.

上記課題を解決するために本発明の第5の画像処理装置及び画像処理方法は、対象画素の周辺領域における平均画素値を求める際に、まずコントラスト改善時に使用する画素の垂直・水平方向位置を決定する。そして、決定された水平画素位置に対して、選択された垂直方向の画素濃度の加算値を求める。そして、対象画素の周囲画素として設定された領域内に選択された水平画素位置が含まれる場合には、その含まれる水平画素位置での加算値を用いる。対象画素の周囲画素として設定された領域内に選択された水平画素位置が含まれない場合にはその隣接する選択された水平画素位置における加算値を用いる。この手順をもとに、対象画素に対する比較濃度を高速に算出することで処理の簡略化を実現するものである。   In order to solve the above problems, the fifth image processing apparatus and image processing method of the present invention first determines the vertical and horizontal positions of pixels used for contrast improvement when obtaining the average pixel value in the peripheral region of the target pixel. decide. Then, an added value of the selected pixel density in the vertical direction is obtained for the determined horizontal pixel position. When the selected horizontal pixel position is included in the area set as the surrounding pixels of the target pixel, the added value at the included horizontal pixel position is used. When the selected horizontal pixel position is not included in the area set as the surrounding pixel of the target pixel, the added value at the adjacent selected horizontal pixel position is used. Based on this procedure, the process can be simplified by calculating the comparison density for the target pixel at high speed.

上記課題を解決するために本発明の第6の画像処理装置及び画像処理方法は、対象画素の画素値とその周辺領域における平均画素値の比較よりコントラスト改善量を求める。そして本発明の第1の画像処理装置及び方法と同様に得られたコントラスト改善量を実際の画素値に変換し、入力画像との合成処理を行う。その後、入力画像における対象画素の輝度・色成分と合成画像の輝度・色成分と比較して、輝度の低下をしないようにするとともに、入力画像の色成分に比例した値を用いることで、合成画像における色ずれを抑えることで最終的に出力される画像の高画質化を実現したものである。   In order to solve the above problem, the sixth image processing apparatus and image processing method of the present invention obtains the contrast improvement amount by comparing the pixel value of the target pixel and the average pixel value in the peripheral region. Then, the contrast improvement amount obtained in the same manner as in the first image processing apparatus and method of the present invention is converted into an actual pixel value, and a synthesis process with the input image is performed. Then, compared with the luminance / color component of the target pixel in the input image and the luminance / color component of the composite image, the luminance is not reduced, and the value proportional to the color component of the input image is used. By suppressing the color misregistration in the image, the image quality of the finally output image is improved.

以上のように、本発明の第1の画像処理装置及び画像処理方法は、対象画素の画素値とその周辺領域における平均画素値の比較よりコントラスト改善量を求める。得られたコントラスト改善量を実際の画素値に変換する際に、対象画素の輝度に応じて制御することで、入力画像と強調画像の合成画像に生じる画像の平坦化や輪郭部分における濃度差の減少が改善することができるようにしたものである。   As described above, the first image processing apparatus and the image processing method of the present invention obtain the contrast improvement amount by comparing the pixel value of the target pixel and the average pixel value in the surrounding area. When converting the obtained contrast improvement amount into an actual pixel value, by controlling according to the luminance of the target pixel, the flattening of the image generated in the composite image of the input image and the emphasized image, or the density difference in the contour portion The reduction can be improved.

以上のように、本発明の第2の画像処理装置及び画像処理方法は、対象画素の画素値とその周辺領域における平均画素値の比較よりコントラスト改善量を求める際に、対象画素の輝度に応じて周辺領域の平均画素値である比較濃度を制御するものである。こうすることで、より対象画素の濃度とその周囲の比較濃度の差を強調することができ、入力画像と強調画像の合成画像に生じる画像の平坦化や輪郭部分における濃度差の減少が改善することができるようにしたものである。   As described above, according to the second image processing apparatus and image processing method of the present invention, when the contrast improvement amount is obtained by comparing the pixel value of the target pixel and the average pixel value in the surrounding area, the second image processing apparatus and the image processing method according to the luminance of the target pixel. Thus, the comparison density which is an average pixel value in the peripheral region is controlled. In this way, the difference between the density of the target pixel and the surrounding comparative density can be enhanced, and the flattening of the image generated in the composite image of the input image and the emphasized image and the reduction of the density difference in the contour portion are improved. It is something that can be done.

以上のように、本発明の第3の画像処理装置及び画像処理方法は、対象画素の画素値とその周辺領域における平均画素値の比較よりコントラスト改善量を求める。得られたコントラスト改善量を実際の画素値に変換する際に、対象画素の濃度と周囲画素の濃度の差分に応じて上記コントラスト改善量を補正することで、入力画像と強調画像の合成画像に生じる画像の平坦化や輪郭部分における濃度差の減少が改善することができるようにしたものである。   As described above, the third image processing apparatus and the image processing method of the present invention obtain the contrast improvement amount by comparing the pixel value of the target pixel and the average pixel value in the peripheral area. When the obtained contrast improvement amount is converted into an actual pixel value, the contrast improvement amount is corrected according to the difference between the density of the target pixel and the density of the surrounding pixels, so that a composite image of the input image and the emphasized image is obtained. The flattening of the image and the reduction of the density difference in the contour portion can be improved.

以上のように、本発明の第4の画像処理装置及び画像処理方法は、対象画素の周辺領域における平均画素値を求める際に、まずコントラスト改善時に使用する画素の垂直方向位置を決定し、決定された画素を対象として、各水平画素位置ごとに垂直方向における画素濃度の加算値を求める。そして、得られた各水平画素位置における加算値より、対象画素の周囲画素として設定された領域内に含まれる水平画素位置の値を用いて、対象画素に対する比較濃度を算出することで処理の簡略化を実現するものである。   As described above, in the fourth image processing apparatus and image processing method of the present invention, when determining the average pixel value in the peripheral region of the target pixel, the vertical position of the pixel used for improving the contrast is first determined and determined. For the obtained pixel, an added value of pixel density in the vertical direction is obtained for each horizontal pixel position. Then, the comparison density for the target pixel is calculated by using the value of the horizontal pixel position included in the region set as the surrounding pixel of the target pixel from the obtained addition value at each horizontal pixel position, thereby simplifying the processing. Is to realize.

以上のように、本発明の第5の画像処理装置及び画像処理方法は、対象画素の周辺領域における平均画素値を求める際に、まずコントラスト改善時に使用する画素の垂直・水平方向位置を決定する。そして、決定された水平画素位置に対して、選択された垂直方向の画素濃度の加算値を求める。そして、対象画素の周囲画素として設定された領域内に選択された水平画素位置が含まれる場合には、その含まれる水平画素位置での加算値を用いる。対象画素の周囲画素として設定された領域内に選択された水平画素位置が含まれない場合にはその隣接する選択された水平画素位置における加算値を用いる。この手順をもとに、対象画素に対する比較濃度を高速に算出することで処理の簡略化を実現するものである。   As described above, in the fifth image processing apparatus and image processing method of the present invention, when obtaining the average pixel value in the peripheral region of the target pixel, first, the vertical and horizontal position of the pixel used for the contrast improvement is determined. . Then, an added value of the selected pixel density in the vertical direction is obtained for the determined horizontal pixel position. When the selected horizontal pixel position is included in the area set as the surrounding pixels of the target pixel, the added value at the included horizontal pixel position is used. When the selected horizontal pixel position is not included in the area set as the surrounding pixel of the target pixel, the added value at the adjacent selected horizontal pixel position is used. Based on this procedure, the process can be simplified by calculating the comparison density for the target pixel at high speed.

以上のように、本発明の第6の画像処理装置及び画像処理方法は、対象画素の画素値とその周辺領域における平均画素値の比較よりコントラスト改善量を求める。そして本発明の第1の画像処理装置及び方法と同様に得られたコントラスト改善量を実際の画素値に変換し、入力画像との合成処理を行う。その後、入力画像における対象画素の輝度・色成分と合成画像の輝度・色成分と比較して、輝度の低下をしないようにするとともに、入力画像の色成分に比例した値を用いることで、合成画像における色ずれを抑えることで最終的に出力される画像の高画質化を実現したものである。   As described above, the sixth image processing apparatus and image processing method of the present invention obtain the contrast improvement amount by comparing the pixel value of the target pixel and the average pixel value in the surrounding area. Then, the contrast improvement amount obtained in the same manner as in the first image processing apparatus and method of the present invention is converted into an actual pixel value, and a synthesis process with the input image is performed. Then, compared with the luminance / color component of the target pixel in the input image and the luminance / color component of the composite image, the luminance is not reduced, and the value proportional to the color component of the input image is used. By suppressing the color misregistration in the image, the image quality of the finally output image is improved.

本発明の第1の実施の形態である画像処理装置の構成を表すブロック図1 is a block diagram illustrating a configuration of an image processing apparatus according to a first embodiment of the present invention. 本発明の第1の実施の形態である画像処理装置におけるコントラスト改善手段の構成を表す図The figure showing the structure of the contrast improvement means in the image processing apparatus which is the 1st Embodiment of this invention 本発明の第1の実施の形態である画像処理装置における多重解像度でのコントラスト改善手段の構成を表すブロック図1 is a block diagram showing the configuration of contrast improving means at multiple resolutions in the image processing apparatus according to the first embodiment of the present invention. 本発明の第1の実施の形態である画像処理装置における画像合成手段の構成を表すブロック図1 is a block diagram showing the configuration of image composition means in an image processing apparatus according to a first embodiment of the present invention. 本発明の第1の実施の形態である画像処理装置における強調量算出手段の構成を表すブロック図1 is a block diagram showing a configuration of enhancement amount calculation means in an image processing apparatus according to a first embodiment of the present invention. 本発明の第2の実施の形態である画像処理装置における強調量算出手段の構成を表すブロック図The block diagram showing the structure of the emphasis amount calculation means in the image processing apparatus which is the 2nd Embodiment of this invention 本発明の第3の実施の形態である画像処理装置における強調量算出手段の構成を表すブロック図The block diagram showing the structure of the emphasis amount calculation means in the image processing apparatus which is the 3rd Embodiment of this invention. 本発明の第1,2,3,4,5の実施の形態である画像処理装置における前処理手段と後処理手段の例を表す模式図Schematic diagram showing examples of pre-processing means and post-processing means in the image processing apparatus according to the first, second, third, fourth, and fifth embodiments of the present invention. 本発明の第1の実施の形態である画像処理方法における全体のフローチャートFIG. 1 is an overall flowchart of the image processing method according to the first embodiment of the present invention. 本発明の第1の実施の形態である画像処理方法におけるコントラスト改善処理と画像合成処理のフローチャートFlowchart of contrast improvement processing and image composition processing in the image processing method according to the first embodiment of the present invention 本発明の第2の実施の形態である画像処理方法におけるコントラスト改善処理のフローチャートFlowchart of contrast improvement processing in the image processing method according to the second embodiment of the present invention 本発明の第2の実施の形態である画像処理方法におけるコントラスト改善処理のフローチャートFlowchart of contrast improvement processing in the image processing method according to the second embodiment of the present invention 本発明の第1から第6の実施の形態のいずれかに記載の画像処理方法におけるコントラスト改善処理に使用されている人間の視覚モデルの概念図Conceptual diagram of a human visual model used for contrast improvement processing in the image processing method according to any one of the first to sixth embodiments of the present invention. 本発明の第4の実施の形態である画像処理装置におけるコントラスト改善手段の構成を表すブロック図The block diagram showing the structure of the contrast improvement means in the image processing apparatus which is the 4th Embodiment of this invention 本発明の第4の実施の形態である画像処理装置における多重解像度でのコントラスト改善手段の構成を表すブロック図The block diagram showing the structure of the contrast improvement means in the multi-resolution in the image processing apparatus which is the 4th Embodiment of this invention 本発明の第4の実施の形態である画像処理方法におけるコントラスト改善処理のフローチャートFlowchart of contrast improvement processing in the image processing method according to the fourth embodiment of the present invention 本発明の第5の実施の形態である画像処理装置におけるコントラスト改善手段の構成を表すブロック図FIG. 7 is a block diagram showing the configuration of contrast improving means in an image processing apparatus according to a fifth embodiment of the present invention. 本発明の第5の実施の形態である画像処理方法におけるコントラスト改善処理の概要を表す図The figure showing the outline | summary of the contrast improvement process in the image processing method which is the 5th Embodiment of this invention 本発明の第6の実施の形態である画像処理装置における後処理手段の構成を表す図The figure showing the structure of the post-processing means in the image processing apparatus which is the 6th Embodiment of this invention 本発明の第6の実施の形態である画像処理方法におけるコントラスト改善処理と後処理手段のフローチャートFlowchart of contrast improvement processing and post-processing means in the image processing method according to the sixth embodiment of the present invention 本発明の第6の実施の形態である画像処理方法における後処理の概要を表す図The figure showing the outline | summary of the post-process in the image processing method which is the 6th Embodiment of this invention 従来例における画像処理装置の構成を表すブロック図The block diagram showing the structure of the image processing apparatus in a prior art example 従来例における画像処理装置の構成を表すブロック図The block diagram showing the structure of the image processing apparatus in a prior art example 従来例における画像処理装置の構成を表すブロック図The block diagram showing the structure of the image processing apparatus in a prior art example

以下、本発明の実施の形態について図面を参照しながら説明する。図1は本発明の第1から第6の実施の形態である画像処理装置の全体構成図を、図2は本発明の第1から第3の実施の形態である画像処置装置におけるコントラスト改善手段の構成を、図4は第1から第6の実施の形態である画像処置装置における画像合成手段の構成図を表す。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is an overall configuration diagram of an image processing apparatus according to the first to sixth embodiments of the present invention, and FIG. 2 is a contrast improvement means in the image treatment apparatus according to the first to third embodiments of the present invention. FIG. 4 shows a configuration diagram of image synthesizing means in the image processing apparatus according to the first to sixth embodiments.

図5は本発明の第1の実施の形態である画像処理装置における強調量導出善手段の構成図を表す。   FIG. 5 is a block diagram of enhancement amount deriving improvement means in the image processing apparatus according to the first embodiment of the present invention.

図6は本発明の第2の実施の形態である画像処理装置における強調量導出善手段の構成図を表す。   FIG. 6 is a block diagram of enhancement amount deriving improvement means in the image processing apparatus according to the second embodiment of the present invention.

図7は本発明の第3の実施の形態である画像処理装置における強調量導出善手段の構成図を表す。   FIG. 7 is a block diagram of enhancement amount deriving improvement means in the image processing apparatus according to the third embodiment of the present invention.

図14は本発明の第4の実施の形態である画像処理装置におけるコントラスト改善手段の構成図を表し、図17は本発明の第5の実施の形態である画像処理装置におけるコントラスト改善手段の構成図を表す。   FIG. 14 is a block diagram of the contrast improving means in the image processing apparatus according to the fourth embodiment of the present invention. FIG. 17 is a block diagram of the contrast improving means in the image processing apparatus according to the fifth embodiment of the present invention. Represents the figure.

図19は本発明の第6の実施の形態である画像処理装置における後処理手段の構成図を表す。   FIG. 19 is a configuration diagram of post-processing means in the image processing apparatus according to the sixth embodiment of the present invention.

また、図9は本発明の第1から第6の実施の形態である画像処理方法における全体のフローチャートを表す図である。   FIG. 9 is a diagram showing an overall flowchart in the image processing method according to the first to sixth embodiments of the present invention.

図10は本発明の第1の実施の形態である画像処理方法におけるコントラスト改善処理と画像合成処理のフローチャートを表す図である。   FIG. 10 is a diagram showing a flowchart of contrast improvement processing and image composition processing in the image processing method according to the first embodiment of the present invention.

図11は本発明の第2の実施の形態である画像処理方法におけるコントラスト改善処理のフローチャートを表す図である。   FIG. 11 is a diagram showing a flowchart of contrast improvement processing in the image processing method according to the second embodiment of the present invention.

図12は本発明の第3の実施の形態である画像処理方法におけるコントラスト改善処理のフローチャートを表し、図20は本発明の第6の実施の形態である画像処理方法におけるコントラスト改善処理と後処理手段のフローチャートを表す図である。   FIG. 12 shows a flowchart of contrast improvement processing in the image processing method according to the third embodiment of the present invention, and FIG. 20 shows contrast improvement processing and post-processing in the image processing method according to the sixth embodiment of the present invention. It is a figure showing the flowchart of a means.

なお、構成図の各図において、同一部には同じ番号を付している。また、なお、これ以降で、画素位置(i,j)の単位には全て画素単位が用いられることする。   Note that, in each drawing of the configuration diagram, the same number is assigned to the same part. In addition, hereinafter, pixel units are all used as the unit of the pixel position (i, j).

(第1の実施の形態)
まず、本発明の第1の実施の形態である画像処理装置及び画像処理方法について説明する。図1はその全体の構成を表す図であり、1は入力画像を、2は最終的に出力される出力画像を、3はコントラスト改善手段12で得られた強調処理後の画像を現す。そして、10は1の入力画像を得るためのCCD素子のような画像入力手段であり、11は入力画像に逆ガンマ変換等のような前処理を行う前処理手段、12は11で得られたデジタル入力画像の細部を強調するためのコントラスト改善処理を行うコントラスト改善処理手段、13はデジタル入力画像と12のコントラスト改善手段で得られた強調画像を合成する画像合成手段であり、14は13で得られた合成画像に入力画像にかかっていたガンマ変換のような後処理を行う後処理手段であり、15は13で得られた合成画像を最終処理後の画像として所望のデバイス(プリンタ、ディスプレイ等)で出力するための画像出力手段である。コントラスト改善手段は図2のような構成になる、図2において、20は対象画素Pijの周辺領域より比較対象にする周辺画素を決定する比較画素決定手段であり、21は対象画素Pijにおけるカラー3成分値VPij(r(i,j),g(i,j),b(i,j))を広さcのPij周囲領域より選択された比較対象画素との比較によりコントラスト改善量VRPij(Rr(i,j), Rg(i,j), Rb(i,j))を算出する強調量導出手段であり、22は強調量導出手段21で得られたコントラスト改善量VRPijを実際の画素値に変換する際の変換基準値VTc(rtc(i,j),gtc(i,j),btc(i,j))を求める変換基準値算出手段であり、23は22の変換基準値ともとに強調量導出手段21で得られたコントラスト改善量VRPijを実際の画素Pijにおけるコントラスト改善後の画素値に変換する画素値変換手段である。強調量導出手段21は図5のように、周囲平均手段50と改善量算出手段51より構成される。
(First embodiment)
First, an image processing apparatus and an image processing method according to the first embodiment of the present invention will be described. FIG. 1 is a diagram showing the overall configuration. 1 is an input image, 2 is an output image to be finally output, and 3 is an image after enhancement processing obtained by the contrast improving means 12. 10 is an image input means such as a CCD element for obtaining one input image, 11 is a preprocessing means for performing preprocessing such as inverse gamma conversion on the input image, and 12 is obtained by 11. Contrast improvement processing means for performing contrast improvement processing for enhancing details of the digital input image, 13 is an image composition means for synthesizing the digital input image and the enhanced image obtained by the 12 contrast improvement means, and 14 is 13. Post-processing means for performing post-processing such as gamma conversion applied to the input image on the obtained composite image. Reference numeral 15 denotes a desired device (printer, display, etc.) using the composite image obtained in 13 as an image after final processing. Etc.) is output. The contrast improving means is configured as shown in FIG. 2. In FIG. 2, 20 is a comparison pixel determining means for determining peripheral pixels to be compared from the peripheral area of the target pixel Pij, and 21 is a color 3 in the target pixel Pij. By comparing the component value VPij (r (i, j), g (i, j), b (i, j)) with the comparison target pixel selected from the Pij surrounding area of the width c, the contrast improvement amount VRPij (Rr (i, j), Rg (i, j), Rb (i, j)) is calculated as an enhancement amount deriving unit. Reference numeral 22 denotes a contrast improvement amount VRPij obtained by the enhancement amount deriving unit 21 as an actual pixel value. Is a conversion reference value calculation means for obtaining a conversion reference value VTc (rtc (i, j), gtc (i, j), btc (i, j)) at the time of conversion to 23. The pixel value conversion unit converts the contrast improvement amount VRPij obtained by the enhancement amount deriving unit 21 into a pixel value after contrast improvement in the actual pixel Pij. The enhancement amount deriving unit 21 includes a surrounding average unit 50 and an improvement amount calculating unit 51 as shown in FIG.

また、画像合成手段13は図4に示されるように、入力画像1内の輝度情報をもとに入力画像1とコントラスト改善手段で得られた強調画像3に掛かる結合係数ws(s=1,3;ここでw1は入力画像1に掛かる結合係数であり、w3は強調画像3に掛かる結合係数を示す)を決定する結合係数導出手段40と、結合係数導出手段40で得られた結合係数w0、w1を使って、入力画像1とコントラスト改善手段で得られた強調画像3の加重平均画像を生成する加重平均合成手段41、そして41で得られた加重平均合成画像と入力画像1、そして強調画像3を比較して出力画像の画素値を決定する出力値決定手段42より構成される。   Further, as shown in FIG. 4, the image synthesizing means 13 is based on the luminance information in the input image 1 and the coupling coefficient ws (s = 1, 3; where w1 is a coupling coefficient applied to the input image 1 and w3 represents a coupling coefficient applied to the enhanced image 3), and a coupling coefficient w0 obtained by the coupling coefficient derivation means 40. , W1 to generate a weighted average image 41 of the input image 1 and the weighted average image 3 obtained by the contrast improving means, and the weighted average composite image 41 obtained by 41, the input image 1, and the weighted image It comprises output value determining means 42 for comparing the image 3 and determining the pixel value of the output image.

以上のように構成された第1の実施の形態である画像処理装置の動作について図9、図10に従い説明する。   The operation of the image processing apparatus according to the first embodiment configured as described above will be described with reference to FIGS.

画像入力手段10を介して、カラー画像1がデジタル入力される。10ではカラー画像の場合、通常レッドr、グリーンg、ブルーbの成分データが入力手段の精度(8ビットならば0から255の値で)得られる。10ではこの値を0.0から1.0の値に正規化する。   The color image 1 is digitally input via the image input means 10. In the case of a color image, the component data of red, green g, and blue b can be obtained with the accuracy of the input means (a value from 0 to 255 for 8 bits). 10 normalizes this value from 0.0 to 1.0.

デジタル入力画像1に対して、図8のような前処理が行われる。近年、このようなコントラスト改善が行われる画像データはデジタルカメラ(DSC)で撮影されたものが増えている。通常、DSCで撮影された画像データをパソコン等でモニタ表示を行う場合、入力画像をより鮮明にするために図8上左図のような上に凸の形をしているガンマ関数を用いた変換処理が行われている。一般に使用されているsRGB空間ではこのガンマ変換におけるガンマγは2.2が使用される。プリンタで出力する場合にも、このガンマ関数が予め入力画像に掛けられていることを前提にして出力のための画像処理が実行される。そのため、CCD等の撮影素子で得られた画像データを正確に抽出するために、γ=2.2の効果を戻すための逆ガンマ関数による変換処理が必要になり、前処理手段11は図8上右図のような下に凸の逆ガンマ変換を行う。   Preprocessing as shown in FIG. 8 is performed on the digital input image 1. In recent years, image data that has undergone such contrast improvement has been photographed with a digital camera (DSC). Normally, when image data captured by DSC is displayed on a monitor on a personal computer or the like, a gamma function having a convex shape as shown in the upper left of FIG. 8 is used to make the input image clearer. Conversion processing is being performed. In the generally used sRGB space, 2.2 is used as the gamma γ in this gamma conversion. Even when output is performed by a printer, image processing for output is executed on the assumption that this gamma function is preliminarily applied to the input image. Therefore, in order to accurately extract image data obtained by a photographing element such as a CCD, a conversion process using an inverse gamma function is required to restore the effect of γ = 2.2. A downward convex gamma conversion as shown in the figure is performed.

次に、逆ガンマ変換されたデジタル入力画像1に対して、入力画像の暗部におけるコントラストを改善するためのコントラスト改善処理がコントラスト改善手段12で行われる。コントラスト改善手段12では図13のように行われる。人間の視覚では、図13に模式的に示されるように対象画素Pijに対して知覚された画素値のみでPijの画素情報(色、コントラストなど)を認知するのではなく、対象画素Pijをその周囲にある画素の情報との相対的な関係により、対象画素値Pijの画素値を調整することでPijの画素情報を知覚している。これは、従来例で説明したようにEdwin Landにより紹介されたレティネックス概念と呼ばれるものであり、このような知覚により一部だけ別の照明を受けているような不均一な照明光や極端に画素値の強度変化があるようなシーンでも、物体の色を精度よく認知することができる。本発明でも、この概念を利用することで影のような暗部における色や細部情報を明確にする。   Next, the contrast improving means 12 performs a contrast improving process for improving the contrast in the dark part of the input image on the digital input image 1 subjected to inverse gamma conversion. The contrast improving means 12 performs as shown in FIG. In human vision, as schematically shown in FIG. 13, the pixel information (color, contrast, etc.) of Pij is not recognized only by the pixel value perceived with respect to the target pixel Pij, but the target pixel Pij The pixel information of Pij is perceived by adjusting the pixel value of the target pixel value Pij based on the relative relationship with the information of surrounding pixels. This is called the Retinex concept introduced by Edwin Land, as explained in the previous example. Even in a scene where there is a change in the intensity of the pixel value, the color of the object can be accurately recognized. Even in the present invention, this concept is used to clarify the color and detail information in a dark part such as a shadow.

まず、対象画素Pijの画素値VPij (r(i,j),g(i,j),b(i,j))をLandにおける中心視野と見なし、その周囲にc画素の矩形領域に属する領域を周辺視野と見なす。そして、周辺視野における画素値の加重平均画素値VAPij(Ar(i,j),Ag(i,j),Ab(i,j))を求めるとともに、このVAPijとVPijの間の相対的関係につながるコントラスト改善量VRPij(Rr(i,j),Rg(i,j),Rb(i,j))を算出する。このVAPijとして、従来例のように式(数1)の第2項におけるc画素の周辺視野内における画素値VPij(r(i,j),g(i,j),b(i,j))と式(数2)、(数3)のようにガウス関数で定義された周辺視野関数F(x,y)の畳み込み積分値で定義することも可能であり、コントラスト改善量VRPijも式(数1)を3成分独立に定義することも可能であるが、本発明では処理の簡単化と高速化を考慮して定義をすることとした。その例として、式(数4)のようにVAPijはc画素の周辺視野内における画素値VPij(r(i,j),g(i,j),b(i,j))の平均値を定義し、コントラスト改善量VRPij(Rr(i,j),Rg(i,j),Rb(i,j))も式(数5)のように各成分ごとの画素値VPijの加重平均画素値VAPijに対する比として定義することができる。   First, a pixel value VPij (r (i, j), g (i, j), b (i, j))) of the target pixel Pij is regarded as a central visual field in Land, and an area belonging to a rectangular area of c pixels around it Is regarded as peripheral vision. Then, the weighted average pixel value VAPij (Ar (i, j), Ag (i, j), Ab (i, j)) of the pixel value in the peripheral visual field is obtained, and the relative relationship between VAPij and VPij is determined. The connected contrast improvement amount VRPij (Rr (i, j), Rg (i, j), Rb (i, j)) is calculated. As this VAPij, the pixel value VPij (r (i, j), g (i, j), b (i, j) in the peripheral visual field of the c pixel in the second term of the formula (Equation 1) as in the conventional example. ) And expressions (Equation 2) and (Equation 3) can be defined by the convolution integral value of the peripheral visual field function F (x, y) defined by the Gaussian function, and the contrast improvement amount VRPij is also expressed by the equation ( Although it is possible to define Equation 1) independently for the three components, in the present invention, the definition is made in consideration of simplification and speeding up of processing. As an example, VAPij is an average value of pixel values VPij (r (i, j), g (i, j), b (i, j)) in the peripheral visual field of c pixels as shown in Equation (4). The contrast improvement amount VRPij (Rr (i, j), Rg (i, j), Rb (i, j)) is also defined by the weighted average pixel value of the pixel value VPij for each component as shown in Equation (5) It can be defined as the ratio to VAPij.

Figure 0004769332
Figure 0004769332

Figure 0004769332
Figure 0004769332

また、式(数6)、(数7)のようにc画素の周辺視野内における輝度y(i,j)の平均値をVAPijの3成分として定義し、コントラスト改善量VRPij(Rr(i,j),Rg(i,j),Rb(i,j))は式(数7)のように画素Pijにおける各成分値の加重平均画素値VAPijに対する比として定義することも可能である。   Further, the average value of the luminance y (i, j) in the peripheral visual field of the c pixel is defined as three components of VAPij as in the equations (Equation 6) and (Equation 7), and the contrast improvement amount VRPij (Rr (i, j), Rg (i, j), Rb (i, j)) can also be defined as a ratio of each component value in the pixel Pij to the weighted average pixel value VAPij as shown in Expression (7).

Figure 0004769332
Figure 0004769332

Figure 0004769332
Figure 0004769332

こうすることで、式(数4)(数5)のように各成分独立でコントラスト改善量を算出するよりも得られたコントラスト改善量のバランスをよりうまく保持できると考える。そこで本発明では式(数6)、式(数7)による定義を採用することとした。   By doing so, it is considered that the balance of the obtained contrast improvement amounts can be maintained better than the calculation of the contrast improvement amount independently for each component as in the equations (4) and (5). Therefore, in the present invention, the definitions based on the equations (Equation 6) and (Equation 7) are adopted.

以上のような対象画素Pijに対するコントラスト改善量VRPijを入力画像内の全ての画像に対して行う。この処理を周囲平均手段50と改善量算出手段51が行う。   The contrast improvement amount VRPij for the target pixel Pij as described above is performed on all the images in the input image. This processing is performed by the surrounding average means 50 and the improvement amount calculation means 51.

次に、このコントラスト改善量VRPij(Rr(i,j),Rg(i,j),Rb(i,j))を実際の画素値に変換する必要がある。この処理としては、VRPijの各成分を0.0から1.0の範囲内の値に変換し、必要と思われる部分を抽出した実際の画素値に変換する方法等が考えられるが、ここではより簡易化のために、変換基準値VTc(trc,tgc,tbc)を算出してその変換基準値をVRPijの各成分に乗算して、強調画像3の画素Pijにおける画素値とする。この場合、通常扱われる8ビットの整数データである0から255に変換しても良いが、ここではその値を0.0から1.0の正規化した範囲内の実数データにまず変換基準値とコントラスト改善量VRPijを使って変換し、その後に0から255の8ビットデータの整数データに変換することとする。そのため、VTcの各成分が取りえる値は0.0から1.0の範囲になる。VTcの決定を変換基準値算出手段22が行うが、一律にVTc=(0.5,0.5,0.5)のように取りえる画素値の平均に設定することもできる。しかしながら、輝度が高いほど高めに、低いほど低めになるように変換する方が入力画像1からの急激な変化を抑制することができると思われる。つまり、このように入力画像1の対象画素Pijにおける輝度y(i,j)に応じてVTcの値を制御することで、シャドウ部の急激な輝度レベル上昇を抑制することが可能となる。よって、ここでもそのようにy(i,j)におうじてVTc(trc,tgc,tbc)を制御することとした。その一例は式(数8)のようになるが、このような線形関数ではなく、非線形関数を用いることも考えられる。   Next, it is necessary to convert this contrast improvement amount VRPij (Rr (i, j), Rg (i, j), Rb (i, j)) into an actual pixel value. As this processing, there is a method of converting each component of VRPij into a value within the range of 0.0 to 1.0 and converting it to an actual pixel value extracted from a necessary part. Therefore, the conversion reference value VTc (trc, tgc, tbc) is calculated, and the conversion reference value is multiplied by each component of VRPij to obtain the pixel value in the pixel Pij of the enhanced image 3. In this case, it may be converted from 0 to 255, which is normally handled 8-bit integer data, but here the conversion reference value and contrast improvement amount are first converted to real data within a normalized range of 0.0 to 1.0. The data is converted using VRPij, and then converted to 8-bit integer data from 0 to 255. Therefore, the value that each component of VTc can take is in the range of 0.0 to 1.0. Although the conversion reference value calculation means 22 determines VTc, it can be set to the average of the pixel values that can be uniformly taken as VTc = (0.5, 0.5, 0.5). However, it seems that it is possible to suppress a sudden change from the input image 1 by converting the brightness so that the brightness is higher and the brightness is lower. That is, by controlling the value of VTc according to the luminance y (i, j) at the target pixel Pij of the input image 1 in this way, it is possible to suppress a sudden increase in the luminance level of the shadow portion. Therefore, VTc (trc, tgc, tbc) is controlled according to y (i, j) as described above. An example of this is given by equation (Equation 8), but it is also conceivable to use a nonlinear function instead of such a linear function.

Figure 0004769332
Figure 0004769332

なお、この式(数8)における傾きを大きくしすぎると、暗部におけるコントラスト改善を抑制しすぎることで本来の特徴である、変動差がある部分を強調してコントラスト改善する特徴を損なうことがある。またVTcの取りうる範囲は0.0から1.0であるので、これらの条件をもとに式(数8)を設定する必要がある。   If the slope in the equation (Equation 8) is excessively large, the contrast improvement in the dark part is excessively suppressed, and the characteristic that enhances the contrast by emphasizing the part having a variation difference may be impaired. . Also, since the range that VTc can take is 0.0 to 1.0, it is necessary to set the equation (Equation 8) based on these conditions.

強調量導出手段21のVRPijと変換基準値算出手段22のVTcの結果を受けて、23の画素値変換手段が強調画像3の画素Pijにおける画素値を求める。   In response to the result of VRPij of the enhancement amount deriving unit 21 and the result of VTc of the conversion reference value calculation unit 22, the pixel value conversion unit 23 obtains a pixel value at the pixel Pij of the enhanced image 3.

一方、Retinex理論に基づくコントラスト改善手法の課題として、従来例で説明した非常に大きな領域で一律な色を持つハイライト部での輝度レベルの低下が生じる。同様に、非常に大きな領域で一律な色を持つシャドウ部では強調画像における輝度レベルが急激に上昇することで、CCD等で入力時発生したシャドウ部における色ノイズを際立たせる。本件特許出願の発明者らは、先の出願(日本国 特願2002−33658号)において、これらの問題を解決するために、入力画像1と視覚モデルで得られた強調画像3を適応的に合成することで入力画像1が本来持つ輝度レベルの低減や上昇を抑えることとした。本発明でもその手段を用いるが、上記示した強調量導出手段21からのVRPijを実際の画素値に変換する際の変換基準値VTcを対象画素Pijの輝度y(i,j)に応じて制御する処理と組み合わせてやることで、より入力画像1のもつ雰囲気を保ちながら、暗部の見えを改善することが可能となる。なお、画像合成手段15は図4のように構成されており、まず40で入力画像1に掛かる結合係数w1と強調画像3に掛かる結合係数w3を制御する。そして41において、このw1とw3を用いた加重平均合成画像4を生成する。最後に42において、入力画像1の対象画素Pijの輝度y(i,j)、色差cr(i,j),cb(i,j)を求めるとともに、合成画像4の対応する画素の輝度wy(i,j),色差wcr(i,j),wcb(i,j)を求める。そして、y(i,j)≧wy(i,j)の場合には、wy(i,j)=y(i,j)として、このwy(i,j),wcr(i,j),wcb(i,j)よりRGB空間におけるVWPij(wr(i,j),wg(i,j),wb(i,j))に変換することで最終的な出力画像2を生成する。   On the other hand, as a problem of the contrast improvement method based on the Retinex theory, a decrease in the luminance level occurs in a highlight portion having a uniform color in a very large area described in the conventional example. Similarly, in a shadow portion having a uniform color in a very large area, the luminance level in the emphasized image rapidly rises, so that the color noise in the shadow portion generated at the time of input by a CCD or the like is conspicuous. In order to solve these problems in the previous application (Japanese Patent Application No. 2002-33658), the inventors of the present patent application adaptively used the input image 1 and the enhanced image 3 obtained by the visual model. By combining, the reduction or increase in luminance level inherent in the input image 1 is suppressed. Although this means is also used in the present invention, the conversion reference value VTc for converting the VRPij from the above-described enhancement amount deriving means 21 into an actual pixel value is controlled according to the luminance y (i, j) of the target pixel Pij. By combining with the processing to be performed, it is possible to improve the appearance of the dark part while maintaining the atmosphere of the input image 1 more. The image synthesizing means 15 is configured as shown in FIG. 4. First, at 40, the coupling coefficient w1 applied to the input image 1 and the coupling coefficient w3 applied to the enhanced image 3 are controlled. In 41, a weighted average composite image 4 using w1 and w3 is generated. Finally, at 42, the luminance y (i, j) and the color differences cr (i, j), cb (i, j) of the target pixel Pij of the input image 1 are obtained, and the luminance wy ( i, j), color difference wcr (i, j), wcb (i, j) are obtained. If y (i, j) ≧ wy (i, j), then wy (i, j) = y (i, j) and this wy (i, j), wcr (i, j), The final output image 2 is generated by converting wcb (i, j) to VWPij (wr (i, j), wg (i, j), wb (i, j)) in the RGB space.

なお、40の時点で、入力画像1画素値VPijと強調画像3の画素値VRPijを比較して、VPijが3成分ともVRPijより大きい場合にはw1=1.0、w3=0.0とし、それ以外にはw1=w3=0.5として合成画像の画素値VWPijを求めることとしたが、前記した先行出願(日本国 特願2002-33658号)のように入力画像の対応する画素におけるエッジ情報で制御する手法や、輝度y(i,j)と予め決めたしきい値TH,THCombを用いて、式(数9)のように制御する手法も可能である。   At the time of 40, the pixel value VRPij of the input image 1 is compared with the pixel value VRPij of the emphasized image 3. If all three components are larger than VRPij, w1 = 1.0 and w3 = 0.0. The pixel value VWPij of the composite image is determined with w1 = w3 = 0.5. However, as described in the previous application (Japanese Patent Application No. 2002-33658), a method of controlling with edge information in the corresponding pixel of the input image Also, a method of controlling as in Expression (9) using the luminance y (i, j) and predetermined threshold values TH and THComb is also possible.

Figure 0004769332
Figure 0004769332

なお、式(数9)の場合、exp関数による処理のオーバーヘッドが考えられるが、予め設定した精度に応じたexp関数をテーブル化してそのテーブル参照することでこの処理のオーバーヘッドは抑えることができる。この式(数9)は暗部では極力強調画像3を優先するが、入力画像の輝度と強調画像の輝度の比をもとに、その改善が急激な場合にはw3を抑制することで暗部でのノイズ強調を抑制するように工夫したものである。   In the case of equation (Equation 9), the processing overhead due to the exp function can be considered, but the overhead of this processing can be suppressed by making a table of the exp function corresponding to the preset accuracy and referring to the table. This formula (Equation 9) gives priority to the emphasized image 3 as much as possible in the dark portion, but based on the ratio of the luminance of the input image and the luminance of the emphasized image, if the improvement is rapid, the w3 is suppressed in the dark portion. It is devised to suppress noise enhancement.

以上のような構成や処理を行うことで本発明の第1の実施の形態である画像処理装置及び画像処理方法は、従来例の視覚モデルの利点を有効に生かすことでハイライト部における輝度低下とシャドウ部における輝度の急激な上昇に対するノイズ強調を抑制したコントラスト改善を、簡易かつ高精度に行うことができる。また、先行出願やJobsonらの従来手法のように、21で得られたコントラスト改善量より有効を思われる領域を抽出する処理が不要となるため、処理量の削減にもつながるという利点も持つ。   By performing the configuration and processing as described above, the image processing apparatus and the image processing method according to the first embodiment of the present invention effectively reduce the luminance in the highlight portion by effectively utilizing the advantages of the visual model of the conventional example. In addition, it is possible to easily and accurately perform contrast improvement that suppresses noise enhancement against a sharp increase in luminance in the shadow portion. Further, unlike the prior application and the conventional method of Jobson et al., It is not necessary to extract a region that seems to be more effective than the contrast improvement amount obtained in 21, which has the advantage of reducing the processing amount.

さらに、本発明ではコントラスト改善手段12は図2のように1つの周辺領域cによる構成をしているが、この周辺領域cの大きさが改善される暗部の大きさに起因していると思われる。通常、自然画像の場合、さまざまな大きさを持つ影部分がありうることから、従来技術で説明したようなJobsonらのような複数の周辺領域サイズc[s]を持つ多重解像度モデルがより効果的である。そのような多重解像度モデルに本発明を適用すると、12のコントラスト改善手段は図3のような構成になる。   Further, in the present invention, the contrast improving means 12 is constituted by one peripheral region c as shown in FIG. 2, but it seems that the size of the peripheral region c is caused by the size of the dark part to be improved. It is. Usually, in the case of natural images, there can be shadows with various sizes, so a multi-resolution model with multiple peripheral area sizes c [s] such as Jobson et al. Is. When the present invention is applied to such a multi-resolution model, the twelve contrast improving means are configured as shown in FIG.

周辺範囲初期化手段30でまずc=c0というように、予め用意された複数の周辺視野領域サイズc[s](s=0,1,..,Cnum-1)のc0を周辺視野領域に設定する。この場合、c[s]は最小サイズ領域から昇順に用意しても構わないし、最大サイズから降順に用意しても構わないが、サイズの変更方向をそろえた方がよい。ここでは最大サイズから降順に用意されているとして、順に周辺視野領域を小さくしながら、入力画像における細部改善を行うこととする。20、21では、現在設定されているc=ckの矩形域の周辺視野に対して、周辺視野における画素値のコントラスト改善量VRPij[s] (Rr#s(i,j),Rg#s(i,j),Rb#s(i,j)) が算出される。そして、すべてのc[s]で21での画素Pij周辺視野におけるコントラスト改善量計算が終了したかどうかの判定を終了判定手段31で行う。終了していないと判定された場合には周辺範囲変更手段32へ処理が移り、現在設定されている周辺視野領域cをつぎの候補に変更し再び20、21での処理が行われる。一方、31で終了判定された場合には、各周辺視野領域c[s]に対するPijのコントラスト改善量VRPij[s](Rr#s(i,j),Rg#s(i,j),Rb#s(i,j))の重み付き平均値を求め、その値をPijのコントラスト改善量VRPij(Rr(i,j),Rg(i,j),Rb(i,j))と設定する。簡易化のために、各c[s]によるVRPij[s]の平均値をPijのコントラスト改善量VRPijとして採用する。これ以外にも、c[s]による値VRPij[s]を各成分別に比較して最大値となる値をPijのコントラスト改善量VRPijとすることも可能である。こうした場合、加算処理よりも比較処理により処理時間の増大が生じるが、強調画像3として生成された画像の画素値変動が緩やかとなり、エッジ部分における急激な上昇を抑えることができるという利点も持つ。   First, the peripheral range initialization means 30 sets c0 of a plurality of peripheral visual field region sizes c [s] (s = 0, 1,..., Cnum-1) prepared in advance as c = c0. Set. In this case, c [s] may be prepared in ascending order from the minimum size region, or may be prepared in descending order from the maximum size, but it is better to align the size change directions. Here, assuming that the images are prepared in descending order from the maximum size, it is assumed that the detail improvement in the input image is performed while sequentially reducing the peripheral visual field region. 20 and 21, the contrast improvement amount VRPij [s] (Rr # s (i, j), Rg # s () of the pixel value in the peripheral visual field is compared with the peripheral visual field in the rectangular area of c = ck that is currently set. i, j), Rb # s (i, j)) is calculated. Then, the end determination unit 31 determines whether or not the calculation of the contrast improvement amount in the peripheral visual field of the pixel Pij at 21 is completed for all c [s]. If it is determined that the process has not been completed, the process moves to the peripheral range changing means 32, the currently set peripheral visual field region c is changed to the next candidate, and the processes in steps 20 and 21 are performed again. On the other hand, if the end determination is made at 31, the Pij contrast improvement amount VRPij [s] (Rr # s (i, j), Rg # s (i, j), Rb) for each peripheral visual field region c [s]. #s (i, j)) Find the weighted average value and set the value as the Pij contrast improvement VRPij (Rr (i, j), Rg (i, j), Rb (i, j)) . For simplification, the average value of VRPij [s] by each c [s] is adopted as the contrast improvement amount VRPij of Pij. In addition to this, it is also possible to compare the value VRPij [s] based on c [s] for each component and set the maximum value as the contrast improvement amount VRPij of Pij. In such a case, the processing time is increased by the comparison process rather than the addition process, but the pixel value fluctuation of the image generated as the emphasized image 3 becomes moderate, and there is an advantage that a sharp rise at the edge portion can be suppressed.

これ以降の処理は1つの周辺範囲の場合と同様のため省略する。   The subsequent processing is the same as in the case of one peripheral range, and is therefore omitted.

なお、これらの処理は本発明の第1の実施の形態である画像処理方法に従いコンピュータ等に使用される中央演算処理装置(CPU)及びデジタルシグナルプロセッサ(DSP)等を使ったソフトウェア処理でも同様に実現することができる。   These processes are similarly performed by software processing using a central processing unit (CPU) and a digital signal processor (DSP) used in a computer or the like in accordance with the image processing method according to the first embodiment of the present invention. Can be realized.

また、本発明の第1の実施の形態である画像処理方法に従い生成されたLSIチップのような半導体チップを用いても同様に実現することができる。   The same can be realized by using a semiconductor chip such as an LSI chip generated according to the image processing method according to the first embodiment of the present invention.

(第2の実施の形態)
次に本発明の第2の実施の形態である画像処理装置及び画像処理方法について説明する。
(Second Embodiment)
Next, an image processing apparatus and an image processing method according to the second embodiment of the present invention will be described.

その全体の構成図は本発明の第1の実施の形態と同様に図1のように構成され、コントラスト改善手段は1つの周辺範囲cを持つ場合は図2のようになり、複数の周辺範囲c[s]を持つ場合には図3のような構成になる。同様に画像合成手段13は図4のようになる。そして、図2もしくは図3における強調量導出手段21は、図6のような構成になる。   The overall configuration diagram is configured as shown in FIG. 1 as in the first embodiment of the present invention, and the contrast improving means is as shown in FIG. When c [s] is provided, the configuration is as shown in FIG. Similarly, the image composition means 13 is as shown in FIG. The enhancement amount deriving means 21 in FIG. 2 or FIG. 3 is configured as shown in FIG.

強調量導出手段21は、対象画素Pij (r(i,j),g(i,j),b(i,j))の周囲より選択された比較対象画素の重み付き加重和VAPij(Ar(i,j),Ag(i,j),Ab(i,j))を計算する周囲平均手段50と、Pijにおける輝度のエッジ情報e(i,j)を求めるエッジ情報検出手段60と、60のe(i,j)をもとに50のVAPijを補正する係数VDAPij(dcr(i,j),dcg(i,j),dcb(i,j))を求める補正係数算出手段61と、61で得られた補正係数VDAPijをもとにVAPijを補正する比較量補正手段62と、62で得られたPijの局所的な特徴を表すVAPijと画素Pij (r(i,j),g(i,j),b(i,j))の比をもとにコントラスト強調量VRPij(Rr(i,j),Rg(i,j),Rb(i,j))を算出する改善量算出手段51より構成される。   The enhancement amount deriving means 21 is a weighted weighted sum VAPij (Ar () of the comparison target pixels selected from around the target pixel Pij (r (i, j), g (i, j), b (i, j)). i, j), Ag (i, j), Ab (i, j)), and an edge information detecting means 60 for obtaining edge information e (i, j) of luminance in Pij; Correction coefficient calculation means 61 for determining a coefficient VDAPij (dcr (i, j), dcg (i, j), dcb (i, j)) for correcting 50 VAPij based on e (i, j) of Comparison amount correction means 62 for correcting VAPij based on the correction coefficient VDAPij obtained in 61, VAPij representing the local feature of Pij obtained in 62, and pixel Pij (r (i, j), g ( (I, j), b (i, j)) based on the ratio of contrast enhancement VRPij (Rr (i, j), Rg (i, j), Rb (i, j)) Consists of means 51.

以上のように構成された第2の実施の形態である画像処理装置の動作について説明する。   The operation of the image processing apparatus according to the second embodiment configured as described above will be described.

画像入力手段10を介して、カラー画像1がデジタル入力される。10ではカラー画像の場合、通常レッドr、グリーンg、ブルーbの成分データが入力手段の精度(8ビットならば0から255の値で)得られる。10ではこの値を0.0から1.0の値に正規化する。次に、デジタル入力画像1に対して、入力画像のガンマ変換を元の線形に戻す前処理をま処理手段11が行う。そしてこの前処理後の入力画像1に対して、暗部におけるコントラストを改善するためのコントラスト改善処理がコントラスト改善手段12で行われる。コントラスト改善手段12では図2、または図3のように行われる。まず、対象画素の周囲範囲cもしくはc[s]内の周囲画素より比較濃度算出に使用する比較対象画素を選択し、この比較対象画素と対象画素よりコントラスト強調量VRPij(Rr(i,j),Rg(i,j),Rb(i,j))を算出する。そして、この値を変換基準値VTc(trc,tgc,tbc)を用いて実際の8ビット整数データである画素値に変換するのである。そして、得られた強調画像3と入力画像1の適応的な合成を図4で示された画像合成手段13が行い、得られた合成画像2に入力画像に元々付加されていたガンマ変換を改めて後処理手段14が行うことで画像出力手段15でプリンタやディスプレイ等のデバイス機器に出力する最終的な出力画像を生成するのである。   The color image 1 is digitally input via the image input means 10. In the case of a color image, the component data of red, green g, and blue b can be obtained with the accuracy of the input means (a value from 0 to 255 for 8 bits). 10 normalizes this value from 0.0 to 1.0. Next, the processing means 11 performs pre-processing for returning the gamma conversion of the input image to the original linearity for the digital input image 1. The contrast improving means 12 performs a contrast improving process for improving the contrast in the dark portion on the input image 1 after the preprocessing. The contrast improving means 12 is performed as shown in FIG. 2 or FIG. First, a comparison target pixel used for comparison density calculation is selected from surrounding pixels in the surrounding range c or c [s] of the target pixel, and a contrast enhancement amount VRPij (Rr (i, j) is calculated from the comparison target pixel and the target pixel. , Rg (i, j), Rb (i, j)). Then, this value is converted into a pixel value, which is actual 8-bit integer data, using the conversion reference value VTc (trc, tgc, tbc). Then, the image composition means 13 shown in FIG. 4 performs adaptive composition of the obtained enhanced image 3 and the input image 1, and the gamma conversion originally added to the input image on the obtained composite image 2 is performed again. When the post-processing unit 14 performs, the image output unit 15 generates a final output image to be output to a device device such as a printer or a display.

強調量導出手段21では、まず、入力画像内における画素Pijの画素値VPijをLandにおける中心視野と見なし、その周囲にc画素の矩形領域に属する領域を周辺視野と見なす。そして、比較画素決定手段20で選択された比較対象画素をもとに、その周囲範囲内の重み付き加重和VAPij(Ar(i,j),Ag(i,j),Ab(i,j))を算出する。それとともに、この値を補正する補正係数VDAPij(dcr(i,j),dcg(i,j),dcb(i,j))を求める。本発明の第1の実施例では、コントラスト改善量を実際の画素値に変換する際の変換基準値VTcを制御することで合成画像3で発生する出力画像2のエッジ付近での平坦化現象を抑制していたが、この輪郭付近での平坦化解消をするには、変換基準値VTcを制御するのではなく一律の中心値(ここでは、0.0から1.0での範囲で扱っているため0.5)に設定して、50で得られた周囲範囲Aij内の重み付き加重和VAPij(Ar(i,j),Ag(i,j),Ab(i,j))を制御することでも同じような効果が得られると思われる。よって、本発明では入力画像内の対象画素Pijの情報を使って、VAPijを補正する補正係数VDAPij(dcr(i,j),dcg(i,j),dcb(i,j))を求め、この値を61でVAPijに各成分ごとに乗算することで輪郭付近での強調程度を高めることとした。その補正係数制御としては、ここでは、対象画素Pijの輝度y(i,j)のエッジ情報e(i,j)をもとに式(数10)のように、線形的にエッジ情報の程度におうじて補正係数を抑制することとした。しかし、この制御方法は一義的に決まるものではなく、非線形関数による制御も可能である。なお、式(数10)においてave_eはe(i,j)の画像内平均を表すが簡略化のために0.5を設定することも可能である。式(数10)においては、ttt=dcr(i,j)=dcg(i,j)=dcb(i,j)、補正後の加重和を加重和VAPij'=(Ar'(i,j),Ag'(i,j),Ab'(i,j))としている。   The enhancement amount deriving means 21 first regards the pixel value VPij of the pixel Pij in the input image as the central visual field in Land, and regards the area belonging to the rectangular area of c pixels around it as the peripheral visual field. Then, based on the comparison target pixel selected by the comparison pixel determining means 20, a weighted weighted sum VAPij (Ar (i, j), Ag (i, j), Ab (i, j) within the surrounding range is obtained. ) Is calculated. At the same time, a correction coefficient VDAPij (dcr (i, j), dcg (i, j), dcb (i, j)) for correcting this value is obtained. In the first embodiment of the present invention, the flattening phenomenon near the edge of the output image 2 that occurs in the composite image 3 by controlling the conversion reference value VTc when converting the contrast improvement amount into the actual pixel value. Although it was suppressed, in order to cancel the flattening near this contour, instead of controlling the conversion reference value VTc, it is a uniform central value (here, it is handled in the range from 0.0 to 1.0, 0.5) It is also possible to control the weighted weighted sum VAPij (Ar (i, j), Ag (i, j), Ab (i, j)) in the surrounding range Aij obtained at 50 by setting It seems to be effective. Therefore, in the present invention, using the information of the target pixel Pij in the input image, a correction coefficient VDAPij (dcr (i, j), dcg (i, j), dcb (i, j)) for correcting VAPij is obtained, By multiplying this value by 61 for VAPij for each component, the degree of enhancement near the contour is increased. As the correction coefficient control, here, the degree of edge information is linearly expressed as in Expression (10) based on the edge information e (i, j) of the luminance y (i, j) of the target pixel Pij. Therefore, the correction coefficient was suppressed. However, this control method is not uniquely determined, and control using a nonlinear function is also possible. In Equation (Equation 10), ave_e represents the average of e (i, j) in the image, but 0.5 can be set for simplification. In the equation (Equation 10), ttt = dcr (i, j) = dcg (i, j) = dcb (i, j), and the weighted sum after correction is expressed as a weighted sum VAPij ′ = (Ar ′ (i, j) , Ag ′ (i, j), Ab ′ (i, j)).

Figure 0004769332
Figure 0004769332

しかし、本発明の第1の実施例と同様に入力画像内の対象画素Pijの輝度y(i,j)をもとに線形的に補正係数を制御することも可能であり、この場合には、輝度が高いほど補正係数を小さくするようにするものである。   However, as in the first embodiment of the present invention, it is possible to control the correction coefficient linearly based on the luminance y (i, j) of the target pixel Pij in the input image. The correction coefficient is decreased as the luminance increases.

このような手段を取り入れることで強調画像3およびその画像3と入力画像1の合成画像2のメリハリ程度をある程度保存するように、暗部でのコントラスト改善を行うことが可能となる。   By adopting such means, it is possible to improve the contrast in the dark part so as to preserve the sharpness of the emphasized image 3 and the composite image 2 of the image 3 and the input image 1 to some extent.

また、本発明の第1の実施例と同様に、図3のような多重解像度による構成も可能であり、こうすることで本発明の画像メリハリ保存の効果を生かしながら、入力画像における画素値のダイナミックレンジや影のような暗部サイズにあまり影響されることなく自動的に入力画像のコントラスト改善を行うことができ、画像のコントラスト調整の効率化につながる。   Similarly to the first embodiment of the present invention, a configuration with multiple resolutions as shown in FIG. 3 is also possible. By doing so, the pixel value of the input image can be changed while taking advantage of the image sharpness preservation of the present invention. The contrast of the input image can be automatically improved without being greatly affected by the size of the dark part such as the dynamic range and shadow, leading to efficient image contrast adjustment.

なお、これらの処理は本発明の第2の実施の形態である画像処理方法に従いコンピュータ等に使用される中央演算処理装置(CPU)及びデジタルシグナルプロセッサ(DSP)等を使ったソフトウェア処理でも同様に実現することができる。   These processes are similarly performed by software processing using a central processing unit (CPU) and a digital signal processor (DSP) used in a computer or the like in accordance with the image processing method according to the second embodiment of the present invention. Can be realized.

また、本発明の第2の実施の形態である画像処理方法に従い生成されたLSIチップのような半導体チップを用いても同様に実現することができる。   Also, the same can be realized by using a semiconductor chip such as an LSI chip generated according to the image processing method according to the second embodiment of the present invention.

(第3の実施の形態)
次に本発明の第3の実施の形態である画像処理装置及び画像処理方法について説明する。
(Third embodiment)
Next, an image processing apparatus and an image processing method according to a third embodiment of the present invention will be described.

その全体の構成図は本発明の第1の実施の形態と同様に図1のように構成され、コントラスト改善手段は1つの周辺範囲cを持つ場合は図2のようになり、複数の周辺範囲c[s]を持つ場合には図3のような構成になる。同様に画像合成手段13は図4のようになる。そして、図2もしくは図3における強調量導出手段21は、図7のような構成になる。   The overall configuration diagram is configured as shown in FIG. 1 as in the first embodiment of the present invention, and the contrast improving means is as shown in FIG. When c [s] is provided, the configuration is as shown in FIG. Similarly, the image composition means 13 is as shown in FIG. The enhancement amount deriving means 21 in FIG. 2 or FIG. 3 is configured as shown in FIG.

強調量導出手段21は、対象画素Pij (r(i,j),g(i,j),b(i,j))の周囲より選択された比較対象画素の重み付き加重和VAPij(Ar(i,j),Ag(i,j),Ab(i,j))を計算する周囲平均手段50と、Pijにおける輝度と、周囲領域内より選択された比較対象画素Qijの輝度の差分量の絶対値の重み付き加重和Ady(i,j)を求める輝度差分平均手段70と、Ady(i,j)をもとに51で得られたコントラスト強調量VRPij(Rr(i,j),Rg(i,j),Rb(i,j))を強調する強調成分VBRPij(BRr(i,j),BRg(i,j),BRb(i,j))を算出する強調成分算出手段71と、71で得られたVBRPij(BRr(i,j),BRg(i,j),BRb(i,j))をもとにコントラスト強調量VRPij(Rr(i,j),Rg(i,j),Rb(i,j))を補正する改善量補正手段72より構成される。   The enhancement amount deriving means 21 is a weighted weighted sum VAPij (Ar () of the comparison target pixels selected from around the target pixel Pij (r (i, j), g (i, j), b (i, j)). i, j), Ag (i, j), Ab (i, j)), and the difference between the luminance at Pij and the luminance of the comparison target pixel Qij selected from the surrounding area. Luminance difference averaging means 70 for obtaining weighted weighted sum Ady (i, j) of absolute values, and contrast enhancement amount VRPij (Rr (i, j), Rg obtained in 51 based on Ady (i, j) (i, j), Rb (i, j)) emphasis component VBRPij (BRr (i, j), BRg (i, j), BRb (i, j)) , 71 based on VBRPij (BRr (i, j), BRg (i, j), BRb (i, j)) obtained in 71, the contrast enhancement amount VRPij (Rr (i, j), Rg (i, j ), Rb (i, j)).

以上のように構成された第3の実施の形態である画像処理装置の動作について説明する。   The operation of the image processing apparatus according to the third embodiment configured as described above will be described.

画像入力手段10を介して、カラー画像1がデジタル入力される。10ではカラー画像の場合、通常レッドr、グリーンg、ブルーbの成分データが入力手段の精度(8ビットならば0から255の値で)得られる。10ではこの値を0.0から1.0の値に正規化する。次に、デジタル入力画像1に対して、入力画像のガンマ変換を元の線形に戻す前処理をま処理手段11が行う。そしてこの前処理後の入力画像1に対して、暗部におけるコントラストを改善するためのコントラスト改善処理がコントラスト改善手段12で行われる。コントラスト改善手段12では図2、または図3のように行われる。まず、対象画素の周囲範囲cもしくはc[s]内の周囲画素より比較濃度算出に使用する比較対象画素を選択し、この比較対象画素と対象画素よりコントラスト強調量VRPij(Rr(i,j),Rg(i,j),Rb(i,j))を算出する。そして、この値を変換基準値VTc(trc,tgc,tbc)を用いて実際の8ビット整数データである画素値に変換するのである。そして、得られた強調画像3と入力画像1の適応的な合成を図4で示された画像合成手段13が行い、得られた合成画像2に入力画像に元々付加されていたガンマ変換を改めて後処理手段14が行うことで画像出力手段15でプリンタやディスプレイ等のデバイス機器に出力する最終的な出力画像を生成するのである。   The color image 1 is digitally input via the image input means 10. In the case of a color image, the component data of red, green g, and blue b can be obtained with the accuracy of the input means (a value from 0 to 255 for 8 bits). 10 normalizes this value from 0.0 to 1.0. Next, the processing means 11 performs pre-processing for returning the gamma conversion of the input image to the original linearity for the digital input image 1. The contrast improving means 12 performs a contrast improving process for improving the contrast in the dark portion on the input image 1 after the preprocessing. The contrast improving means 12 is performed as shown in FIG. 2 or FIG. First, a comparison target pixel used for comparison density calculation is selected from surrounding pixels in the surrounding range c or c [s] of the target pixel, and a contrast enhancement amount VRPij (Rr (i, j) is calculated from the comparison target pixel and the target pixel. , Rg (i, j), Rb (i, j)). Then, this value is converted into a pixel value, which is actual 8-bit integer data, using the conversion reference value VTc (trc, tgc, tbc). Then, the image composition means 13 shown in FIG. 4 performs adaptive composition of the obtained enhanced image 3 and the input image 1, and the gamma conversion originally added to the input image on the obtained composite image 2 is performed again. When the post-processing unit 14 performs, the image output unit 15 generates a final output image to be output to a device device such as a printer or a display.

強調量導出手段21では、まず、入力画像内における画素Pijの画素値VPijをLandにおける中心視野と見なし、その周囲にc画素の矩形領域に属する領域を周辺視野と見なす。そして、比較画素決定手段20で選択された比較対象画素をもとに、その周囲範囲内の重み付き加重和VAPij(Ar(i,j),Ag(i,j),Ab(i,j))を算出する。   The enhancement amount deriving means 21 first regards the pixel value VPij of the pixel Pij in the input image as the central visual field in Land, and regards the area belonging to the rectangular area of c pixels around it as the peripheral visual field. Then, based on the comparison target pixel selected by the comparison pixel determining means 20, a weighted weighted sum VAPij (Ar (i, j), Ag (i, j), Ab (i, j) within the surrounding range is obtained. ) Is calculated.

本発明の第1の実施例では、コントラスト改善量を実際の画素値に変換する際の変換基準値VTcを制御することで合成画像3で発生する出力画像2のエッジ付近での平坦化現象を抑制していた。また、本発明の第2の実施例では、変換基準値VTcを制御するのではなく、Pijの輝度y(i,j)のエッジ情報e(i,j)をもとに周囲範囲内の重み付き加重和VAPijを制御することで合成画像3におけるエッジ付近での平坦化現象を抑制していた。   In the first embodiment of the present invention, the flattening phenomenon near the edge of the output image 2 that occurs in the composite image 3 by controlling the conversion reference value VTc when converting the contrast improvement amount into the actual pixel value. It was suppressed. In the second embodiment of the present invention, the weight in the surrounding range is not controlled based on the edge information e (i, j) of the luminance y (i, j) of Pij, instead of controlling the conversion reference value VTc. By controlling the weighted sum VAPij, the flattening phenomenon near the edge in the composite image 3 is suppressed.

この第3の実施例では、まず輝度差分平均算出手段70で、対象画素Pijにおける輝度y(i,j)とその周辺範囲より比較画素として選択されたQ(i,j)の輝度ys(i,j)間の差分量の絶対値の重み付き加重和Ady(i,j)を求める。そして、この値をもとに強調成分算出手段71が式(数11)に従い、強調成分VBRPij(BRr(i,j),BRg(i,j),BRb(i,j))を求めるのである。   In the third embodiment, first, the luminance difference average calculating means 70 uses the luminance y (i, j) in the target pixel Pij and the luminance ys (i) of Q (i, j) selected as a comparison pixel from the peripheral range. , j) is obtained a weighted weighted sum Ady (i, j) of the absolute value of the difference amount. Based on this value, the emphasis component calculating means 71 calculates the emphasis component VBRPij (BRr (i, j), BRg (i, j), BRb (i, j)) according to the equation (Equation 11). .

Figure 0004769332
Figure 0004769332

この式は、Ady(i,j)をPijにおける変位強調量と見なし、51で得られたVRPij(Rr(i,j),Rg(i,j),Rb(i,j))の1.0からの変位量をこのAdy(i,j)と予め設定された強調係数で強調する成分量を算出するものである。例えば、均一に輝度が変わらないところでは、強調成分は生じない。しかし、コントラスト改善量が1.0より大きい対象画素に対しては強調画像の画素値をより強調するような成分が算出され、逆にコントラスト改善量が1.0より小さい対象画素に対しては、強調画像の画素値を抑制するような成分が得られる。そのため、強調画像3においてよりエッジ付近等での画素値変化が大きいところにおけるメリハリ感がますこととなり、最終的に得られる合成画像2における画像のメリハリ感の保存を実現することができる。   This expression regards Ady (i, j) as the displacement enhancement amount in Pij, and from 1.0 of VRPij (Rr (i, j), Rg (i, j), Rb (i, j)) obtained in 51 The amount of component to be emphasized is calculated by this Ady (i, j) and a preset enhancement coefficient. For example, no emphasis component is generated where the luminance does not change uniformly. However, for a target pixel having a contrast improvement amount greater than 1.0, a component that enhances the pixel value of the enhanced image is calculated. Conversely, for a target pixel having a contrast improvement amount smaller than 1.0, A component that suppresses the pixel value is obtained. Therefore, the enhanced image 3 has a sharper feeling where the change in the pixel value near the edge or the like is larger, and it is possible to realize the sharpness of the image in the finally obtained composite image 2.

以上のように、本発明の第3の実施の形態例では、このような強調成分を算出する手段を取り入れることで強調画像3およびその画像3と入力画像1の合成画像2のメリハリ程度をある程度保存するように、暗部でのコントラスト改善を行うことが可能となる。   As described above, in the third embodiment of the present invention, the degree of sharpness of the emphasized image 3 and the composite image 2 of the image 3 and the input image 1 is reduced to some extent by incorporating such means for calculating the enhancement component. It is possible to improve the contrast in the dark part so as to preserve.

また、本発明の第1の実施例と同様に、図3のような多重解像度による構成も可能であり、こうすることで本発明の画像メリハリ保存の効果を生かしながら、入力画像における画素値のダイナミックレンジや影のような暗部サイズにあまり影響されることなく自動的に入力画像のコントラスト改善を行うことができ、画像のコントラスト調整の効率化につながる。   Similarly to the first embodiment of the present invention, a configuration with multiple resolutions as shown in FIG. 3 is also possible. By doing so, the pixel value of the input image can be changed while taking advantage of the image sharpness preservation of the present invention. The contrast of the input image can be automatically improved without being greatly affected by the size of the dark part such as the dynamic range and shadow, leading to efficient image contrast adjustment.

なお、これらの処理は本発明の第3の実施の形態である画像処理方法に従いコンピュータ等に使用される中央演算処理装置(CPU)及びデジタルシグナルプロセッサ(DSP)等を使ったソフトウェア処理でも同様に実現することができる。   These processes are similarly performed by software processing using a central processing unit (CPU) and a digital signal processor (DSP) used in a computer or the like according to the image processing method according to the third embodiment of the present invention. Can be realized.

また、本発明の第3の実施の形態である画像処理方法に従い生成されたLSIチップのような半導体チップを用いても同様に実現することができる。   The same can be realized by using a semiconductor chip such as an LSI chip generated according to the image processing method according to the third embodiment of the present invention.

(第4の実施の形態)
次に本発明の第4の実施の形態である画像処理装置及び画像処理方法について説明する。
(Fourth embodiment)
Next, an image processing apparatus and an image processing method according to a fourth embodiment of the present invention will be described.

その全体の構成図は本発明の第1の実施の形態と同様に図1のように構成され、コントラスト改善手段は1つの周辺範囲cを持つ場合は図14のような構成になる。同様に画像合成手段13は図4のようになる。コントラスト改善手段12は、対象画素Pijの周辺領域より比較対象にする周辺画素を決定する比較画素決定手段20と、各水平画素位置iに対して、選択された比較画素を対象とした垂直方向での加算値N[i]を求める垂直方向加算手段140と、140より対象画素Pijの周辺範囲に含まれる水平画素位置iの加算値N[i]より周辺範囲の加重和VAPij(Ar(i,j),Ag(i,j),Ab(i,j))を計算する簡易周囲平均手段141と、141で得られたPijの局所的な特徴を表すVAPijと画素Pij (r(i,j),g(i,j),b(i,j))の比をもとにコントラスト強調量VRPij(Rr(i,j),Rg(i,j),Rb(i,j))を算出する改善量算出手段51と、51で得られたコントラスト改善量VRPijを実際の画素値に変換する際の変換基準値VTc(rtc(i,j),gtc(i,j),btc(i,j))を求める変換基準値算出手段22と、22の変換基準値ともとに改善量補正手段72で得られたコントラスト改善量VRPijを実際の画素Pijにおけるコントラスト改善後の画素値に変換する画素値変換手段23より構成される。   The overall configuration diagram is configured as shown in FIG. 1 as in the first embodiment of the present invention, and the contrast improving means is configured as shown in FIG. 14 when having one peripheral range c. Similarly, the image composition means 13 is as shown in FIG. The contrast improving unit 12 includes a comparison pixel determining unit 20 that determines a peripheral pixel to be compared from a peripheral region of the target pixel Pij, and a vertical direction for the selected comparison pixel with respect to each horizontal pixel position i. The vertical direction addition means 140 for obtaining the addition value N [i] of the peripheral area, and the weighted sum VAPij (Ar (i, j), Ag (i, j), Ab (i, j)), a simple ambient averaging means 141, VAPij representing a local feature of Pij obtained in 141, and a pixel Pij (r (i, j ), g (i, j), b (i, j)) to calculate the contrast enhancement amount VRPij (Rr (i, j), Rg (i, j), Rb (i, j)) Improvement amount calculating means 51 for converting the contrast improvement amount VRPij obtained in 51 into an actual pixel value, VTc (rtc (i, j), gtc (i, j), btc (i, j)) for the conversion reference value calculation means 22 and the conversion reference value of 22 to improve the correction amount Composed of the pixel value converting means 23 for converting the pixel values after contrast improvement in the actual pixel Pij contrast improvement amount VRPij obtained in stage 72.

図14のように構成された第4の実施の形態である画像処理装置におけるコントラスト改善処理の処理の流れを説明する。   The flow of the contrast improvement process in the image processing apparatus according to the fourth embodiment configured as shown in FIG. 14 will be described.

画像入力手段10を介して、カラー画像1がデジタル入力される。10ではカラー画像の場合、通常レッドr、グリーンg、ブルーbの成分データが入力手段の精度(8ビットならば0から255の値で)得られる。10ではこの値を0.0から1.0の値に正規化する。次に、デジタル入力画像1に対して、入力画像のガンマ変換を元の線形に戻す前処理をま処理手段11が行う。そしてこの前処理後の入力画像1に対して、暗部におけるコントラストを改善するためのコントラスト改善処理がコントラスト改善手段12で行われる。コントラスト改善手段12では、まず周辺領域c内で比較対象画素を選択する。その場合、例えば図16の左図のように、ある間隔で垂直方向に間引いて比較対象画素Qijを決める。次に、垂直方向加算手段140が図16左図のように各水平画素位置iにおける垂直方向での輝度値の加算値N[i]を求める。そして、簡易周囲平均手段141では、このN[i]より対象画素Pijの周辺領域c内に含まれるN[k]の加重和Sを求め、その周辺範囲内に含まれる比較画素数mで除することで平均比較対象輝度Asy(i,j)を算出する。そして、この値と対象画素Pijの画素値(r(i.j),g(i,j),b(i,j))を各々比較することでコントラスト改善量VRPijを求める。さらに、対象画素Pijが図16右図のように水平画素位置iがi+1へ移った場合、図16のようにまずPijで得られた加重和Sより先頭のN[0]を減する。そして、それに新しく周辺範囲に含まれることとなったN[7]を加えることでPi+1jの周辺範囲内の比較画素の輝度の総和Sが得られる。この値を同じように比較対象画素数mで除することで平均比較対象輝度Asy(i+1,j)が得られる。このように、予め用意しておいた垂直方向での加算値N[k]を加減算することで簡易に平均比較対象輝度が得られる。これが、コントラスト改善量VRPij(Rr(i,j),Rg(i,j),Rb(i,j))の対象画素Pij(r(i,j),g(i,j),b(i,j))の比較対象濃度VAPijをなるのである。こうすることで、周辺範囲内のVAPijを求める際のフィルタリング処理を高速に行うことができる。   The color image 1 is digitally input via the image input means 10. In the case of a color image, the component data of red, green g, and blue b can be obtained with the accuracy of the input means (a value from 0 to 255 for 8 bits). 10 normalizes this value from 0.0 to 1.0. Next, the processing means 11 performs pre-processing for returning the gamma conversion of the input image to the original linearity for the digital input image 1. The contrast improving means 12 performs a contrast improving process for improving the contrast in the dark portion on the input image 1 after the preprocessing. The contrast improving means 12 first selects a comparison target pixel in the peripheral area c. In this case, for example, as shown in the left diagram of FIG. 16, the comparison target pixel Qij is determined by thinning out in the vertical direction at a certain interval. Next, the vertical direction adding means 140 obtains an addition value N [i] of luminance values in the vertical direction at each horizontal pixel position i as shown in the left diagram of FIG. Then, the simple surrounding average means 141 obtains a weighted sum S of N [k] included in the peripheral region c of the target pixel Pij from this N [i] and divides it by the number of comparison pixels m included in the peripheral range. Thus, the average comparison target luminance Asy (i, j) is calculated. Then, the contrast improvement amount VRPij is obtained by comparing this value with the pixel values (r (i.j), g (i, j), b (i, j)) of the target pixel Pij. Furthermore, when the horizontal pixel position i moves to i + 1 as shown in the right diagram of FIG. 16, the first N [0] is first reduced from the weighted sum S obtained by Pij as shown in FIG. . Then, by adding N [7] which is newly included in the peripheral range, the sum S of luminances of the comparison pixels in the peripheral range of Pi + 1j is obtained. Similarly, by dividing this value by the number m of comparison target pixels, an average comparison target brightness Asy (i + 1, j) is obtained. In this way, the average comparison target luminance can be easily obtained by adding and subtracting the previously prepared addition value N [k] in the vertical direction. This is the target pixel Pij (r (i, j), g (i, j), b (i) of the contrast improvement amount VRPij (Rr (i, j), Rg (i, j), Rb (i, j)). , j)) is the comparison target concentration VAPij. By doing so, it is possible to perform a filtering process when obtaining VAPij in the peripheral range at high speed.

Retinex処理によるコントラスト改善を行う場合、このVAPijを求める処理量の削減が大きなポイントになっていた。特に、図15のように複数の周辺範囲領域c[k]をもつ多重解像度処理をした場合、その処理量は非常に膨大となってします。しかしながら、本発明のように、重み付き加重和を単純な周辺範囲内の平均に簡略化しそして、そのための周辺範囲内の加重和計算手続きを工夫することで処理量の削減を実現することができる。   When performing contrast improvement by Retinex processing, the reduction of the processing amount for obtaining VAPij has been a major point. In particular, when multi-resolution processing with multiple peripheral range areas c [k] is performed as shown in Fig. 15, the amount of processing becomes very large. However, as in the present invention, the weighted weighted sum can be simplified to a simple average in the peripheral range, and the processing amount can be reduced by devising the weighted sum calculation procedure in the peripheral range. .

このコントラスト改善量VRPij(Rr(i,j),Rg(i,j),Rb(i,j))を実際の画素値に変換する場合には、本発明の第1の実施例と同じように入力画像1の対象画素Pijにおける輝度y(i,j)に応じて式(数8)のように変換基準値VTcの値を制御することで、シャドウ部の急激な輝度レベル上昇を抑制する。なお、この際に、本発明の第2の実施例における平均比較濃度VAPijの制御や第3の実施例のような強調成分VBRPijの制御する処理を加えることも可能である。   When this contrast improvement amount VRPij (Rr (i, j), Rg (i, j), Rb (i, j)) is converted into an actual pixel value, it is the same as in the first embodiment of the present invention. In addition, by controlling the value of the conversion reference value VTc as shown in Expression (8) according to the luminance y (i, j) at the target pixel Pij of the input image 1, a sudden increase in the luminance level of the shadow portion is suppressed. . At this time, it is also possible to add processing for controlling the average comparison density VAPij in the second embodiment of the present invention and controlling the emphasis component VBRPij as in the third embodiment.

さらに、本発明ではコントラスト改善手段12は図14のように1つの周辺領域cによる構成をしているが、この周辺領域cの大きさが改善される暗部の大きさに起因していると思われる。通常、自然画像の場合、さまざまな大きさを持つ影部分がありうることから、従来技術で説明したようなJobsonらのような複数の周辺領域サイズc[s]を持つ多重解像度モデルがより効果的である。そのような多重解像度モデルに本発明を適用すると、12のコントラスト改善手段は図15のような構成になる。   Further, in the present invention, the contrast improving means 12 is constituted by one peripheral region c as shown in FIG. 14, but it seems that the size of the peripheral region c is caused by the size of the dark part to be improved. It is. Usually, in the case of natural images, there can be shadows with various sizes, so a multi-resolution model with multiple peripheral area sizes c [s] such as Jobson et al. Is. When the present invention is applied to such a multi-resolution model, the twelve contrast improving means have the configuration shown in FIG.

こうした場合、強調画像3として生成された画像の画素値変動が緩やかとなり、エッジ部分における急激な上昇を抑えることができるという利点も持つ。   In such a case, the pixel value fluctuation of the image generated as the emphasized image 3 becomes moderate, and there is an advantage that a sharp rise in the edge portion can be suppressed.

以上のように本発明の第4の画像処理装置及び画像処理方法は、本発明の第1の実施の例においてもっとも処理量の多い対象画素周辺の平均比較画素濃度VAPijの算出過程を工夫・簡略化することで、エッジ保存しながらのコントラスト改善効果を保ちながら処理時間を短縮化することができる。特にこの高速化の効果は複数の周辺範囲c[k]を持つ場合ほどその効果は大きくなるものである。   As described above, the fourth image processing apparatus and the image processing method of the present invention devise and simplify the process of calculating the average comparison pixel density VAPij around the target pixel with the largest processing amount in the first embodiment of the present invention. As a result, the processing time can be shortened while maintaining the contrast improvement effect while preserving edges. In particular, this speed-up effect becomes greater as the peripheral area c [k] has a plurality of peripheral ranges.

さらに、これらの処理は本発明の第4の実施の形態であるカラー画像処理方法に従いコンピュータ等に使用される中央演算処理装置(CPU)及びデジタルシグナルプロセッサ(DSP)等を使ったソフトウェア処理でも同様に実現することができる。   Further, these processes are the same in software processing using a central processing unit (CPU) and a digital signal processor (DSP) used in a computer or the like according to the color image processing method according to the fourth embodiment of the present invention. Can be realized.

また、本発明の第4の実施の形態である画像処理方法に従い生成されたLSIチップのような半導体チップを用いても同様に実現することができる。   Further, the same can be realized by using a semiconductor chip such as an LSI chip generated according to the image processing method according to the fourth embodiment of the present invention.

(第5の実施の形態)
本発明の第5の実施の形態である画像処理装置及び画像処理方法について説明する。
(Fifth embodiment)
An image processing apparatus and an image processing method according to a fifth embodiment of the present invention will be described.

その全体の構成図は本発明の第1の実施の形態と同様に図1のように構成され、コントラスト改善手段は1つの周辺範囲cを持つ場合は図17のような構成になる。同様に画像合成手段13は図4のようになる。コントラスト改善手段12は、対象画素Pijの周辺領域より比較対象にする周辺画素を決定する比較画素決定手段20と、水平画素位置における選択されたiに対して、選択された比較画素を対象とした垂直方向での加算値N[i]を求める間引き垂直方向加算手段170と、170より対象画素Pijの周辺範囲に含まれる水平画素位置iの加算値N[i]より周辺範囲の加重和VAPij(Ar(i,j),Ag(i,j),Ab(i,j))を計算する簡易周囲平均手段141と、141で得られたPijの局所的な特徴を表すVAPijと画素Pij (r(i,j),g(i,j),b(i,j))の比をもとにコントラスト強調量VRPij(Rr(i,j),Rg(i,j),Rb(i,j))を算出する改善量算出手段51と、51で得られたコントラスト改善量VRPijを実際の画素値に変換する際の変換基準値VTc(rtc(i,j),gtc(i,j),btc(i,j))を求める変換基準値算出手段22と、22の変換基準値ともとに改善量補正手段72で得られたコントラスト改善量VRPijを実際の画素Pijにおけるコントラスト改善後の画素値に変換する画素値変換手段23より構成される。   The overall configuration diagram is configured as shown in FIG. 1 as in the first embodiment of the present invention, and the contrast improving means is configured as shown in FIG. 17 when it has one peripheral range c. Similarly, the image composition means 13 is as shown in FIG. The contrast improving unit 12 is a comparison pixel determining unit 20 that determines a peripheral pixel to be compared from the peripheral region of the target pixel Pij, and the selected comparison pixel is targeted for the selected i at the horizontal pixel position. The thinning-out vertical direction addition means 170 for obtaining the addition value N [i] in the vertical direction, and the weighted sum VAPij () of the peripheral range from the addition value N [i] of the horizontal pixel position i included in the peripheral range of the target pixel Pij. Ar (i, j), Ag (i, j), Ab (i, j)), a simple ambient averaging means 141, VAPij representing a local feature of Pij obtained by 141, and pixel Pij (r Based on the ratio of (i, j), g (i, j), b (i, j)), the contrast enhancement amount VRPij (Rr (i, j), Rg (i, j), Rb (i, j )) And a conversion reference value VTc (rtc (i, j), gtc (i, j), when converting the contrast improvement amount VRPij obtained in 51 into an actual pixel value. btc (i, j)), a conversion reference value calculation means 22, and 22 conversion bases Composed of the pixel value converting means 23 for converting the pixel values after contrast enhancement in value and based on improvement amount correction means 72 in the actual pixel Pij contrast improvement amount VRPij obtained.

この発明は、本発明の第4の実施の形態例と比較すると、水平画素位置i全てに対して、選択された比較対象画素のみを対象とした垂直方向での加算処理を行うのではなく、予め比較画素決定手段で水平画素位置も所定の間隔で間引いて選択を行う。そして、選択された水平画素位置iの垂直方向での加算処理を行うようにしたものである。   Compared with the fourth embodiment of the present invention, the present invention does not perform the addition process in the vertical direction only for the selected comparison target pixel for all the horizontal pixel positions i, The horizontal pixel position is also thinned out at a predetermined interval in advance by the comparison pixel determination means. Then, addition processing in the vertical direction of the selected horizontal pixel position i is performed.

図18はその処理の概要を表すが、図18の左図のように水平画素位置に間引いかれたとする。その場合、間引き垂直方向加算処理170では、i=0における垂直方向加算値N[0]を間引かれたi=1における垂直方向加算値N[1]=N[0]に振り分ける。同様に、N[3]=N[2]、N[5]=N[4]のように補間する。このようにすることで、全ての水平画素位置に対して垂直方向での加算処理を行うことがなく処理量の削減となる。また、つづく水平画素位置i+1に対する処理の場合は図17右図のようになり、先頭のN[0]が対象画素Pijの周辺領域c内に含まれるN[k]の加重和Sより減算される。その後、新しく周辺範囲に含まれることとなったN[7]が加えられることになるが、このi=7の水平画素位置における垂直方向加算処理は比較画素決定手段20で除かれているため、比較画素決定手段20で選択されi=7に最も隣接したi=6におけるN[6]でN[7]を補間した。そしてその補間されたN[7]を先ほどの加重和Sに加算する。その後、周辺範囲内に含まれる比較画素数mで除することで平均比較対象輝度Asy(i,j)が算出される。こうすることで、本発明の第4の実施の形態例よりも重み付き加重和の計算手続きを削減することができ、より処理量の削減を実現することができる。   FIG. 18 shows an outline of the processing, and it is assumed that the pixel is thinned out to the horizontal pixel position as shown in the left diagram of FIG. In that case, in the thinning-out vertical direction addition processing 170, the vertical direction addition value N [0] at i = 0 is distributed to the thinned vertical direction addition value N [1] = N [0]. Similarly, interpolation is performed such that N [3] = N [2] and N [5] = N [4]. In this way, the amount of processing is reduced without performing addition processing in the vertical direction for all horizontal pixel positions. Further, the processing for the subsequent horizontal pixel position i + 1 is as shown in the right diagram of FIG. 17, and the leading N [0] is obtained from the weighted sum S of N [k] included in the peripheral region c of the target pixel Pij. Subtracted. Thereafter, N [7] that is newly included in the peripheral range is added, but the vertical direction addition processing at the horizontal pixel position of i = 7 is excluded by the comparison pixel determining means 20, so N [7] was interpolated by N [6] at i = 6 selected by the comparison pixel determining means 20 and closest to i = 7. Then, the interpolated N [7] is added to the weighted sum S. Thereafter, the average comparison target luminance Asy (i, j) is calculated by dividing by the number of comparison pixels m included in the peripheral range. By doing so, the calculation procedure of the weighted weighted sum can be reduced as compared with the fourth embodiment of the present invention, and the processing amount can be further reduced.

なお、コントラスト改善量VRPij(Rr(i,j),Rg(i,j),Rb(i,j))を実際の画素値に変換する場合には、本発明の第1の実施例と同じように入力画像1の対象画素Pijにおける輝度y(i,j)に応じて式(数8)のように変換基準値VTcの値を制御することで、シャドウ部の急激な輝度レベル上昇を抑制しているが、本発明の第2の実施例における平均比較濃度VAPijの制御や第3の実施例のような強調成分VBRPijの制御する処理を加えることも可能である。   In the case where the contrast improvement amount VRPij (Rr (i, j), Rg (i, j), Rb (i, j)) is converted into an actual pixel value, the same as in the first embodiment of the present invention. In this way, by controlling the value of the conversion reference value VTc as shown in Equation (8) according to the luminance y (i, j) at the target pixel Pij of the input image 1, the sudden increase in the luminance level of the shadow portion is suppressed. However, it is also possible to add processing for controlling the average comparison density VAPij in the second embodiment of the present invention and controlling the emphasis component VBRPij as in the third embodiment.

さらに、本発明ではコントラスト改善手段12は図17のように1つの周辺領域cによる構成をしているが、この周辺領域cの大きさが改善される暗部の大きさに起因していると思われる。通常、自然画像の場合、さまざまな大きさを持つ影部分がありうることから、従来技術で説明したようなJobsonらのような複数の周辺領域サイズc[s]を持つ多重解像度モデルがより効果的であることも本発明の第1の実施例と同様である。   Further, in the present invention, the contrast improving means 12 is constituted by one peripheral region c as shown in FIG. 17, but it seems that the size of the peripheral region c is caused by the size of the dark part to be improved. It is. Usually, in the case of natural images, there can be shadows with various sizes, so a multi-resolution model with multiple peripheral area sizes c [s] such as Jobson et al. Similar to the first embodiment of the present invention.

さらに、これらの処理は本発明の第5の実施の形態である画像処理方法に従いコンピュータ等に使用される中央演算処理装置(CPU)及びデジタルシグナルプロセッサ(DSP)等を使ったソフトウェア処理でも同様に実現することができる。   Further, these processes are also performed by software processing using a central processing unit (CPU) and a digital signal processor (DSP) used in a computer or the like according to the image processing method according to the fifth embodiment of the present invention. Can be realized.

また、本発明の第5の実施の形態である画像処理方法に従い生成されたLSIチップのような半導体チップを用いても同様に実現することができる。   Also, the same can be realized by using a semiconductor chip such as an LSI chip generated according to the image processing method according to the fifth embodiment of the present invention.

(第6の実施の形態)
本発明の第6の実施の形態である画像処理装置及び画像処理方法について説明する。
(Sixth embodiment)
An image processing apparatus and an image processing method according to the sixth embodiment of the present invention will be described.

その全体の構成図は本発明の第1の実施の形態と同様に図1のように構成される。そして、コントラスト改善手段は本発明の第1から第5の実施例のいずかと同様の構成で組み立てられる。また、画像合成手段13も本発明の第1の実施例と同様に図4のようになる。この発明のポイントは、後処理手段が図19のように構成されていることであり、図19において、190は入力画像の輝度と色差を計算する入力輝度・色差算出手段であり、191は合成画像3のPijにおける輝度wy(i,j)と190で得られた輝度y(i,j)を比較し、その間の比Ratio(i,j)を算出する輝度比算出手段であり、192は得られた輝度比をもとに合成画像3の輝度wy(i,j)を調整する輝度調整手段であり、193は調整された輝度wy(i,j)とy(i,j)間のRatio(i,j)より入力画像の色差を修正する色差成分修正手段であり、194は修正された色差成分と輝度より合成画像3の画素値VWPij(wr(i,j),wg(i,j),wb(i,j))を再算出する画像再生成手段であり、195は所定のガンマ変換を行うガンマ変換手段である。   The overall configuration diagram is configured as shown in FIG. 1 as in the first embodiment of the present invention. The contrast improving means is assembled with the same structure as any one of the first to fifth embodiments of the present invention. The image composition means 13 is as shown in FIG. 4 as in the first embodiment of the present invention. The point of the present invention is that the post-processing means is configured as shown in FIG. 19. In FIG. 19, 190 is an input luminance / color difference calculating means for calculating the luminance and color difference of the input image, and 191 is a composition. Luminance ratio calculation means for comparing the luminance wy (i, j) in Pij of the image 3 with the luminance y (i, j) obtained in 190 and calculating the ratio Ratio (i, j) therebetween, 192 A luminance adjusting means for adjusting the luminance wy (i, j) of the composite image 3 based on the obtained luminance ratio. 193 is between the adjusted luminance wy (i, j) and y (i, j). Color difference component correcting means for correcting the color difference of the input image from Ratio (i, j). 194 is a pixel value VWPij (wr (i, j), wg (i, j), wb (i, j)) are image regenerating means for recalculating, and 195 is a gamma converting means for performing predetermined gamma conversion.

このように構成された、本発明の第6の実施の形態である画像処理方法の処理を背罪するが、コントラスト改善処理と後処理手段は図20のようになる。コントラスト改善処理は、本発明の第1の実施の例と同じように行われるが、第1の実施例の場合、コントラスト改善量VRPij(Rr(i,j),Rg(i,j),Rb(i,j))が成分ごとに式(数6)(数7)に従い算出されるのに対し、本発明では、式(数6)と式(数11)のように、周辺範囲内の平均比較輝度Ay(i,j)と対象画素Pijの輝度y(i,j)の比に示される改善輝度yRP(i,j)を算出する。   Contrary to the processing of the image processing method according to the sixth embodiment of the present invention configured as described above, the contrast improvement processing and post-processing means are as shown in FIG. The contrast improvement processing is performed in the same manner as in the first embodiment of the present invention. However, in the case of the first embodiment, the contrast improvement amount VRPij (Rr (i, j), Rg (i, j), Rb (i, j)) is calculated for each component according to the equations (Equation 6) and (Equation 7), but in the present invention, as in the equations (Equation 6) and (Equation 11), The improved luminance yRP (i, j) indicated by the ratio of the average comparison luminance Ay (i, j) and the luminance y (i, j) of the target pixel Pij is calculated.

そして、このyRP(i,j)を変換基準値算出手段22で得られたyTc(i,j)をもとに実際の画素値のもつ輝度yRP(i,j)に変換する。次に、画像合成手段13で強調画像3の輝度yRP(i,j)と入力画像1の輝度y(i,j)の合成輝度画像2を生成する。つまり、本発明の第1から第5の実施例で3成分ごとに扱ってきたのに対し、ここでは輝度のみで画像合成まで処理を行うのである。これは、本発明の第1の実施例の式(数6)(数7)のように平均比較輝度VAPijと入力画像VPijの各成分比を使う場合、入力画像1の色バランスはある程度保持されるが、その後で行われる強調・補正処理で図21左図のように入力画像1の色バランスが崩れることがありうる。そこで、本発明では図21の右図のように、合成後の改善輝度wy(i,j)とy(i,j)間の改善比Ratio(i,j)をもとに入力画像の色差cr(i,j),cb(i,j)を修正した改善色差wcr(i,j), wcb(i,j)を生成し、これらの値をもとに合成画像の画素値VWPijを算出することで色バランスの保持を図ったものである。   Then, yRP (i, j) is converted into luminance yRP (i, j) possessed by an actual pixel value based on yTc (i, j) obtained by the conversion reference value calculation means 22. Next, the combined luminance image 2 of the luminance yRP (i, j) of the enhanced image 3 and the luminance y (i, j) of the input image 1 is generated by the image synthesizing unit 13. In other words, in the first to fifth embodiments of the present invention, each of the three components has been handled, but here, only the luminance is processed up to the image composition. This is because the color balance of the input image 1 is maintained to some extent when the component ratios of the average comparison luminance VAPij and the input image VPij are used as in the equations (Equation 6) and (Equation 7) of the first embodiment of the present invention. However, the color balance of the input image 1 may be lost as shown in the left diagram of FIG. Therefore, in the present invention, as shown in the right diagram of FIG. 21, the color difference of the input image based on the improvement ratio Ratio (i, j) between the improved luminance wy (i, j) and y (i, j) after synthesis. Generate improved color difference wcr (i, j), wcb (i, j) by correcting cr (i, j), cb (i, j), and calculate pixel value VWPij of composite image based on these values By doing so, the color balance is maintained.

しかし、合成後の改善輝度wy(i,j)とy(i,j)間の比Ratio(i,j)をそのまま入力画像の色差cr(i,j),cb(i,j)に乗算して得られた色差wcr(i,j), wcb(i,j)が飽和する可能性があるため、この飽和判定を行う。そして、もしwcr(i,j)が飽和していた場合には、この色差に対する比dRatio(i,j)=wcr(i,j)/cr(i,j)を改めて合成後の改善輝度と入力画像の輝度による改善比Ratio(i,j)とする。この値をもとに合成後の改善輝度dwy(i,j)を計算する処理を192の輝度調整手段が行う。次に、193がRatio(i,j)を使って改めて、入力画像の色差cr(i,j),cb(i,j)を修正して合成後の色差dwcr(i,j),d wcb(i,j)を生成するのである。その後、実際の画素値に変換して合成画像3のPijにおける画素値VWPij(wr(i,j),wg(i,j),wb(i,j))を求め、ガンマ変換手段195が入力画像に本来加えられていたガンマ変換処理を行うことで最終的に画像出力手段15で出力する出力画像2を生成するのである。   However, the ratio (i, j) between the improved brightness wy (i, j) and y (i, j) after synthesis is directly multiplied by the color difference cr (i, j), cb (i, j) of the input image. Since the color differences wcr (i, j) and wcb (i, j) obtained in this way may be saturated, this saturation determination is performed. If wcr (i, j) is saturated, the ratio dRatio (i, j) = wcr (i, j) / cr (i, j) with respect to this color difference is changed to the improved luminance after synthesis. Let the improvement ratio Ratio (i, j) depending on the luminance of the input image. Based on this value, the luminance adjustment means 192 performs a process of calculating the improved luminance dwy (i, j) after synthesis. Next, 193 again uses the Ratio (i, j) to correct the color difference cr (i, j), cb (i, j) of the input image and combine the color difference dwcr (i, j), d wcb (i, j) is generated. Thereafter, the pixel value VWPij (wr (i, j), wg (i, j), wb (i, j)) in Pij of the composite image 3 is obtained by conversion into an actual pixel value, and the gamma conversion means 195 inputs it. By performing the gamma conversion processing originally added to the image, the output image 2 that is finally output by the image output means 15 is generated.

このように本発明では、入力画像における色のバランスを保つために、コントラスト改善処理時には輝度のみの改善を行い、その際の改善度合いを示す改善比をもとに入力画像の色差を修正することで合成画像の色バランス改善を図るものである。とくに、修正後の色差の飽和状態を考慮して改善度合いを図ることで、入力画像の色バランスを保持しながらコントラスト改善を行うことが可能となり、改めて色バランスを改善するための手段や仕組みを考慮する必要がないことが特徴である。   As described above, in the present invention, in order to maintain the color balance in the input image, only the luminance is improved during the contrast improvement process, and the color difference of the input image is corrected based on the improvement ratio indicating the degree of improvement at that time. Thus, the color balance of the composite image is improved. In particular, it is possible to improve the contrast while maintaining the color balance of the input image by considering the saturation state of the color difference after correction, and it is possible to improve the color balance. The feature is that there is no need to consider.

さらに、これらの処理は本発明の第6の実施の形態である画像処理方法に従いコンピュータ等に使用される中央演算処理装置(CPU)及びデジタルシグナルプロセッサ(DSP)等を使ったソフトウェア処理でも同様に実現することができる。   Further, these processes are also performed by software processing using a central processing unit (CPU) and a digital signal processor (DSP) used in a computer or the like according to the image processing method according to the sixth embodiment of the present invention. Can be realized.

また、本発明の第6の実施の形態である画像処理方法に従い生成されたLSIチップのような半導体チップを用いても同様に実現することができる。   Also, the same can be realized by using a semiconductor chip such as an LSI chip generated according to the image processing method according to the sixth embodiment of the present invention.

1 入力画像
2 出力画像
3 強調画像
10 画像入力手段
11 前処理手段
12 コントラスト改善手段
13 画像合成手段
14 後処理手段
15 画像出力手段
20 比較画素決定手段
21 強調量導出手段
22 変換基準値算出手段
23 画素値変換手段
30 周辺範囲初期化手段
31 終了判定手段
32 周辺範囲変更手段
40 結合係数導出手段
41 加重平均合成手段
42 出力値決定手段
50 周囲平均手段
51 改善量算出手段
60 エッジ情報検出手段
61 補正係数算出手段
62 比較量補正手段
70 輝度差分平均手段
71 強調成分算出手段
72 改善量補正手段
140 垂直方向加算手段
141 簡易周囲平均手段
170 間引き垂直方向加算手段
190 入力輝度・色差計算手段
191 輝度比算出手段
192 輝度調整手段
193 色差成分修正手段
194 画像再生成手段
195 ガンマ変換手段
220 画像データ入力手段
221 画像データ分割手段
222 ヒストグラム作成手段
223 コントラスト伸張手段
224 画像データ出力手段
230 CCD
231 メモリ
232 乗算手段
233 レベル重み付加手段H
234 加算手段
235 速度変換手段
236 レベル圧縮手段
237 タイミング制御手段
238 レベル重み付加手段L
239 画像合成部
240 ディジタル撮像装置
241 プロセッサ
242 フィルタ
243 ディスプレイ
DESCRIPTION OF SYMBOLS 1 Input image 2 Output image 3 Enhanced image 10 Image input means 11 Pre-processing means 12 Contrast improvement means 13 Image composition means 14 Post-processing means 15 Image output means 20 Comparison pixel determination means 21 Enhancement amount derivation means 22 Conversion reference value calculation means 23 Pixel value conversion means 30 Peripheral range initialization means 31 Completion determination means 32 Peripheral range change means 40 Coupling coefficient derivation means 41 Weighted average synthesis means 42 Output value determination means 50 Perimeter average means 51 Improvement amount calculation means 60 Edge information detection means 61 Correction Coefficient calculation means 62 Comparison amount correction means 70 Luminance difference averaging means 71 Enhanced component calculation means 72 Improvement amount correction means 140 Vertical direction addition means 141 Simple ambient averaging means 170 Thinning out vertical direction addition means 190 Input luminance / color difference calculation means 191 Brightness ratio calculation Means 192 Brightness adjustment means 193 Color Difference component correction means 194 Image regeneration means 195 Gamma conversion means 220 Image data input means 221 Image data division means 222 Histogram creation means 223 Contrast expansion means 224 Image data output means 230 CCD
231 Memory 232 Multiplication means 233 Level weight addition means H
234 Addition means 235 Speed conversion means 236 Level compression means 237 Timing control means 238 Level weight addition means L
239 Image composition unit 240 Digital imaging device 241 Processor 242 Filter 243 Display

Claims (4)

入力画像内の対象画素の周囲の周辺領域に属する比較対象画素の重み付き加重和の値を導出する周囲平均導出ステップと、
前記対象画素におけるエッジ情報を導出するエッジ情報検出ステップと、
前記エッジ情報に基づいて前記加重和の値を補正する補正係数を導出する補正係数導出ステップと、
前記補正係数に基づいて前記加重和の値を補正する補正ステップと、
前記補正された加重和の値と、前記対象画素の画素値との比較によって、対象画素のコントラスト改善量を導出するコントラスト改善ステップと、
前記コントラスト改善量に対する平均値と偏差量とを用いて、各画素のコントラスト改善量を、所定最小値から所定最大値までの値に正規化し、正規化されたコントラスト改善量を強調画像の画素値とし、前記強調画像と前記入力画像とを所定の優先度で合成する画像合成ステップと、
を備えることを特徴とする画像処理方法。
A surrounding average derivation step for deriving a weighted weighted sum of comparison target pixels belonging to a peripheral region around the target pixel in the input image;
An edge information detection step for deriving edge information in the target pixel;
A correction coefficient deriving step for deriving a correction coefficient for correcting the value of the weighted sum based on the edge information;
A correction step of correcting the value of the weighted sum based on the correction coefficient;
A contrast improvement step of deriving a contrast improvement amount of the target pixel by comparing the corrected weighted sum value and the pixel value of the target pixel;
Using the average value and the deviation amount with respect to the contrast improvement amount, the contrast improvement amount of each pixel is normalized to a value from a predetermined minimum value to a predetermined maximum value, and the normalized contrast improvement amount is the pixel value of the enhanced image And an image synthesis step for synthesizing the emphasized image and the input image with a predetermined priority,
An image processing method comprising:
前記補正係数導出ステップは、対象画素が輪郭付近にある場合の過剰強調を抑えるために、対象画素が平坦な領域にある場合には前記コントラスト改善量は大きな値となり、対象画素が輪郭付近にある場合には前記コントラスト改善量は小さな値となるように、
前記対象画素のエッジ情報に対して、対象画素のエッジ情報が高いほど高い値となり、前記対象画素のエッジ情報が低いほど低い値となるように、線形的に単調増加する補正係数を設定し、
前記補正ステップは、前記補正係数を、前記加重和の各成分の値に乗算することにより、前記加重和の値を補正する
ことを特徴とする請求項1に記載の画像処理方法。
In the correction coefficient deriving step, in order to suppress over-emphasis when the target pixel is near the contour, the contrast improvement amount becomes a large value when the target pixel is in a flat region, and the target pixel is near the contour. In some cases, the contrast improvement amount is small.
For the edge information of the target pixel, set a correction coefficient that increases linearly and monotonously so that the higher the edge information of the target pixel, the higher the value, and the lower the edge information of the target pixel, the lower the value.
The image processing method according to claim 1, wherein the correction step corrects the value of the weighted sum by multiplying the value of each component of the weighted sum by the correction coefficient.
入力画像内の対象画素の周囲の周辺領域に属する比較対象画素の重み付き加重和の値を導出する周囲平均導出手段と、
前記対象画素におけるエッジ情報を導出するエッジ情報検出手段と、
前記エッジ情報に基づいて前記加重和の値を補正する補正係数を導出する補正係数導出手段と、
前記補正係数に基づいて前記加重和の値を補正する補正手段と、
前記補正された加重和の値と、前記対象画素の画素値との比較によって、対象画素のコントラスト改善量を導出するコントラスト改善手段と、
前記コントラスト改善量に対する平均値と偏差量とを用いて、各画素のコントラスト改善量を、所定最小値から所定最大値までの値に正規化し、正規化されたコントラスト改善量を強調画像の画素値とし、前記強調画像と前記入力画像とを所定の優先度で合成する画像合成手段と、
を備えることを特徴とする画像処理装置。
A surrounding average deriving means for deriving a weighted weighted sum value of comparison target pixels belonging to a peripheral region around the target pixel in the input image;
Edge information detection means for deriving edge information in the target pixel;
Correction coefficient deriving means for deriving a correction coefficient for correcting the value of the weighted sum based on the edge information;
Correction means for correcting the value of the weighted sum based on the correction coefficient;
Contrast improvement means for deriving a contrast improvement amount of the target pixel by comparing the corrected weighted sum value and the pixel value of the target pixel;
Using the average value and the deviation amount with respect to the contrast improvement amount, the contrast improvement amount of each pixel is normalized to a value from a predetermined minimum value to a predetermined maximum value, and the normalized contrast improvement amount is the pixel value of the enhanced image Image combining means for combining the emphasized image and the input image with a predetermined priority;
An image processing apparatus comprising:
請求項1または2に記載の画像処理方法をコンピュータに実行させるためのプログラム A program for causing a computer to execute the image processing method according to claim 1.
JP2010194727A 2010-08-31 2010-08-31 Image processing apparatus, image processing method, and program Expired - Fee Related JP4769332B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2010194727A JP4769332B2 (en) 2010-08-31 2010-08-31 Image processing apparatus, image processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2010194727A JP4769332B2 (en) 2010-08-31 2010-08-31 Image processing apparatus, image processing method, and program

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2007090803A Division JP4664938B2 (en) 2007-03-30 2007-03-30 Image processing apparatus, image processing method, and program

Publications (2)

Publication Number Publication Date
JP2010277607A JP2010277607A (en) 2010-12-09
JP4769332B2 true JP4769332B2 (en) 2011-09-07

Family

ID=43424449

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2010194727A Expired - Fee Related JP4769332B2 (en) 2010-08-31 2010-08-31 Image processing apparatus, image processing method, and program

Country Status (1)

Country Link
JP (1) JP4769332B2 (en)

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014030083A (en) * 2012-07-31 2014-02-13 Mitsubishi Electric Corp Image processor, image display device and image processing method
JP6034155B2 (en) * 2012-11-27 2016-11-30 東芝メディカルシステムズ株式会社 Image processing apparatus and program
CN108198148B (en) * 2017-12-07 2022-08-05 北京小米移动软件有限公司 Image processing method and device

Family Cites Families (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH0935056A (en) * 1995-07-24 1997-02-07 Olympus Optical Co Ltd Image processor
JP2000050042A (en) * 1998-07-27 2000-02-18 Chuo Electronics Co Ltd Method and device for correcting definition of image
JP4076302B2 (en) * 1999-08-31 2008-04-16 シャープ株式会社 Image brightness correction method

Also Published As

Publication number Publication date
JP2010277607A (en) 2010-12-09

Similar Documents

Publication Publication Date Title
JP4021261B2 (en) Image processing device
JP5105209B2 (en) Image processing apparatus and method, program, and recording medium
EP2833317B1 (en) Image display device and/or method therefor
US8411991B2 (en) Image processing apparatus, image processing method, and program
EP2076013B1 (en) Method of high dynamic range compression
KR100879536B1 (en) Method And System For Image Enhancement
JP4870618B2 (en) Image data automatic mapping method and image processing device
US9390482B2 (en) Image processing apparatus and method of processing image
JP4526445B2 (en) Imaging device
US20150195441A1 (en) Image Processing Method and Apparatus
US7409083B2 (en) Image processing method and apparatus
US8391598B2 (en) Methods for performing local tone mapping
US8831372B2 (en) Image processing device, image processing method and storage medium storing image processing program
JP6097588B2 (en) Image processing apparatus and image processing method
JP5392560B2 (en) Image processing apparatus and image processing method
JP5901667B2 (en) Image processing apparatus and method, image processing program, and imaging apparatus
JP2002133409A (en) Digital image enhancement method based on pixel color
US8831346B2 (en) Image processing apparatus and method, and program
US20120189206A1 (en) Image dynamic range compression system, method and program
JP4096613B2 (en) Image processing method and image processing apparatus
JP4664938B2 (en) Image processing apparatus, image processing method, and program
JP2012108898A (en) Image processing device and image processing method
US8355597B2 (en) Image processing device including gradation conversion processor, noise reduction processor, and combining-raio calculator, and method and storage device storing progam for same
JP4769332B2 (en) Image processing apparatus, image processing method, and program
JP4013699B2 (en) Image processing apparatus and image processing method

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20100831

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20110112

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20110309

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

Effective date: 20110525

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

Free format text: JAPANESE INTERMEDIATE CODE: A01

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20110617

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 4769332

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

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

Free format text: PAYMENT UNTIL: 20140624

Year of fee payment: 3

S111 Request for change of ownership or part of ownership

Free format text: JAPANESE INTERMEDIATE CODE: R313113

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees