Nothing Special   »   [go: up one dir, main page]

JP2006128986A - Image processing device - Google Patents

Image processing device Download PDF

Info

Publication number
JP2006128986A
JP2006128986A JP2004313587A JP2004313587A JP2006128986A JP 2006128986 A JP2006128986 A JP 2006128986A JP 2004313587 A JP2004313587 A JP 2004313587A JP 2004313587 A JP2004313587 A JP 2004313587A JP 2006128986 A JP2006128986 A JP 2006128986A
Authority
JP
Japan
Prior art keywords
gradation
value
correction
minimum value
maximum
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
JP2004313587A
Other languages
Japanese (ja)
Inventor
Fumio Fujimura
文男 藤村
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2004313587A priority Critical patent/JP2006128986A/en
Publication of JP2006128986A publication Critical patent/JP2006128986A/en
Pending legal-status Critical Current

Links

Landscapes

  • Facsimile Image Signal Circuits (AREA)
  • Color Image Communication Systems (AREA)
  • Image Processing (AREA)
  • Picture Signal Circuits (AREA)
  • Processing Of Color Television Signals (AREA)

Abstract

【課題】入力画像の階調分布が一部分に集中している場合や、分布の中心が高階調部や低階調部にある場合でも階調分布の形状を崩すことなく、また階調分布の中心が大きく変化しない階調補正をすることができる画像処理装置を提供する。
【解決手段】入力画像信号の色成分毎の階調ヒストグラムを算出し、階調ヒストグラムの最大値、及び最小値を算出し、算出した最大値から色成分毎の階調補正最大値を算出し、最小値から算出した最小値から色成分毎の階調補正最小値を算出し、最大値が調補正最大値に、また最小値が階調補正最小値になるように色成分毎に階調分布を広げることで階調補正を行う。
【選択図】図1
Even when the gradation distribution of an input image is concentrated in a part or the center of the distribution is in a high gradation part or a low gradation part, the shape of the gradation distribution is not destroyed and the gradation distribution Provided is an image processing apparatus capable of performing gradation correction in which the center does not change greatly.
A gradation histogram for each color component of an input image signal is calculated, a maximum value and a minimum value of the gradation histogram are calculated, and a gradation correction maximum value for each color component is calculated from the calculated maximum value. The tone correction minimum value for each color component is calculated from the minimum value calculated from the minimum value, and the tone for each color component is set so that the maximum value becomes the tone correction maximum value and the minimum value becomes the tone correction minimum value. Tone correction is performed by widening the distribution.
[Selection] Figure 1

Description

本発明は、ビデオカメラ、電子スチルカメラ、カメラ付き携帯電話、プリンターなどの画像機器に適応される技術であって、画像信号の階調性の制御に関するものである。   The present invention relates to a technique applicable to image equipment such as a video camera, an electronic still camera, a mobile phone with a camera, and a printer, and relates to control of gradation of an image signal.

従来から入力画像信号の階調を補正する方法として、入力画像信号の階調の最大値、及び最小値を検出し、検出された階調の最大値及び最小値が画像信号系のダイナミックレンジの最大値及び最小値になるように階調分布を広げることで階調補正を行う方法がある。この方法では階調の最大値と最小値の差が小さい場合、すなわち分布幅が小さい場合には階調補正量が大きくなりすぎるため、階調飛び、ノイズの増加等の画質低下が生じる場合がある。そこで分布幅に応じて最大値、最小値の補正を行うことで階調補正量を制限し、階調補正を行う方法がある(例えば特許文献1参照)。   Conventionally, as a method of correcting the gradation of the input image signal, the maximum value and the minimum value of the gradation of the input image signal are detected, and the detected maximum value and minimum value of the detected gradation are the dynamic range of the image signal system. There is a method of performing gradation correction by widening the gradation distribution so as to be the maximum value and the minimum value. In this method, when the difference between the maximum value and the minimum value of the gradation is small, that is, when the distribution width is small, the gradation correction amount becomes too large, and the image quality may be deteriorated such as gradation skip or noise increase. is there. Therefore, there is a method of performing gradation correction by limiting the amount of gradation correction by correcting the maximum value and the minimum value according to the distribution width (see, for example, Patent Document 1).

この従来例を図13に示し、その概要を以下に示す。従来例では、入力画像である多値画像の輝度ヒストグラムを作成し(S1302)、次に輝度ヒストグラム分布の上限値(Hiポイント)、下限値(Loポイント)、及び上限値と下限値の差である分布幅と演算し(S1303)、コントラスト過大対策(S1304)にて分布幅が所定の分布幅下限値を下回る場合には分布幅下限値に応じて上限値、及び下限値を再度設定し直し、設定した上限値、下限値が多値画像の最大分布幅になるような補正テーブルを生成し(S1305)、補正テーブルに基づいて画像補正を行う処理が行われていた(S1306)。
特開2001−148785号公報
This conventional example is shown in FIG. In the conventional example, a luminance histogram of a multi-valued image as an input image is created (S1302), and then the upper limit value (Hi point), lower limit value (Lo point) of the luminance histogram distribution, and the difference between the upper limit value and the lower limit value. A certain distribution width is calculated (S1303), and if the distribution width falls below a predetermined distribution width lower limit value in the contrast excessive measure (S1304), the upper limit value and the lower limit value are set again according to the distribution width lower limit value. Then, a correction table in which the set upper limit value and lower limit value are the maximum distribution width of the multi-valued image is generated (S1305), and image correction processing is performed based on the correction table (S1306).
JP 2001-148785 A

しかしながら従来例のように階調補正を行う場合、分布幅に応じて上限値と下限値を再設定するため、分布幅が小さく分布の中心が高階調部または低階調部にある場合には、階調の中心が大きく変化したり、階調分布の形状が大きく変化したりする場合があった。   However, when gradation correction is performed as in the conventional example, the upper limit value and the lower limit value are reset according to the distribution width. Therefore, when the distribution width is small and the center of the distribution is in the high gradation portion or the low gradation portion, In some cases, the center of the gradation changes greatly, or the shape of the gradation distribution changes greatly.

例えば図14(a)のように高階調部分に階調分布の中心がある場合と、図15(a)のように低階調部分に階調分布の中心がある場合、上限値(Hiポイント)及び下限値
(Loポイント)はそれぞれ新Hiポイント、新Loポイントに補正され、新Hiポイントが階調の最大値に、また新Loポイントが階調の最小値になるように階調分布を広げる処理が行われ、図14(a)は図14(b)に、図15(a)は図15(b)に示すように階調補正される。図14,15において点線は階調の中心を表す線であり、補正前と補正後の中心の差をΔTとしている。従来例では分布幅で階調補正量が決定されるため、図14のように高階調部分に階調の中心がある場合には、低階調側に大きく階調が広がりΔTの値が大きくなることから、階調の中心が大きく移動してしまうことがわかる。また分布形状も大きく変化してしまう。
For example, when the center of gradation distribution is in the high gradation part as shown in FIG. 14A and when the center of gradation distribution is in the low gradation part as shown in FIG. ) And lower limit (Lo point) are corrected to the new Hi point and the new Lo point, respectively, and the gradation distribution is adjusted so that the new Hi point becomes the maximum value of the gradation and the new Lo point becomes the minimum value of the gradation. A widening process is performed, and gradation correction is performed as shown in FIG. 14B in FIG. 14A and in FIG. 15B in FIG. 15A. 14 and 15, the dotted line is a line representing the center of gradation, and the difference between the center before correction and after correction is ΔT. In the conventional example, since the gradation correction amount is determined by the distribution width, when the center of the gradation is in the high gradation part as shown in FIG. 14, the gradation spreads greatly on the low gradation side and the value of ΔT is large. From this, it can be seen that the center of the gradation moves greatly. Also, the distribution shape changes greatly.

また図15のように低階調部分に階調の中心がある場合には、高階調側に大きく階調が広がりΔTの値が大きくなることから、分布の中心が高階調側に大きく移動してしまうことがわかる。また分布形状も大きく変化してしまう。   Further, when the center of the gradation is in the low gradation part as shown in FIG. 15, the gradation spreads greatly toward the high gradation side and the value of ΔT increases, so that the distribution center moves greatly to the high gradation side. You can see that Also, the distribution shape changes greatly.

階調補正により階調の中心が大きく移動すると画像の明るさが大きく変化してしまう現象が発生し、また階調の分布形状が大きく変化すると、階調飛び、ノイズ増加等の問題が発生するため、いずれも画質の低下が生じていた。   When the gradation center is moved greatly by gradation correction, the phenomenon that the brightness of the image changes greatly occurs, and when the gradation distribution shape changes greatly, problems such as gradation skip and noise increase occur. As a result, the image quality has deteriorated.

階調の分布幅が小さい値となる代表的な画像として例えば水中画像がある。水中画像の場合階調分布が色成分毎に大きく異なり、図16から図19に示すような特性となる。図16は水中画像の赤色成分階調分布、図17は水中画像の緑色成分階調分布、図18は水中画像の青色成分階調分布、図19は水中画像の輝度成分の階調分布をあらわしており、水中画像では赤色成分が水により吸収されるため、赤色成分が極端に低階調部に集中して分布していることがわかる。そのため従来例のように輝度分布から階調補正を行っても赤色成分に対して十分な階調補正ができない場合があった。   For example, there is an underwater image as a representative image having a small gradation distribution width. In the case of an underwater image, the gradation distribution differs greatly for each color component, and the characteristics shown in FIGS. 16 to 19 are obtained. 16 shows the red component gradation distribution of the underwater image, FIG. 17 shows the green component gradation distribution of the underwater image, FIG. 18 shows the blue component gradation distribution of the underwater image, and FIG. 19 shows the gradation distribution of the luminance component of the underwater image. In the underwater image, since the red component is absorbed by water, it can be seen that the red component is extremely concentrated and distributed in the low gradation portion. For this reason, even if gradation correction is performed from the luminance distribution as in the conventional example, there is a case where sufficient gradation correction cannot be performed for the red component.

本発明は上記課題を解決するためのものであり、色成分毎に入力画像の階調ヒストグラムの最大値、及び最小値を算出し、階調ヒストグラムの最大値から階調補正最大値を算出し、階調ヒストグラムの最小値から階調補正最小値を算出し、階調ヒストグラムの最大値が調補正最大値に、また階調ヒストグラムの最小値が階調補正最小値になるように階調分布を広げることで、階調分布が一部分に集中している場合でも最適な補正をすることができ、また入力画像が水中画像の場合でも最適な補正ができる階調補正装置を提供することを目的とする。   The present invention is for solving the above-described problems, and calculates the maximum value and the minimum value of the gradation histogram of the input image for each color component, and calculates the maximum gradation correction value from the maximum value of the gradation histogram. The tone distribution is calculated so that the tone correction minimum value is calculated from the tone histogram minimum value, the tone histogram maximum value becomes the tone correction maximum value, and the tone histogram minimum value becomes the tone correction minimum value. An object of the present invention is to provide a gradation correction device that can perform optimum correction even when the gradation distribution is concentrated in a part by widening the image, and can perform optimum correction even when the input image is an underwater image. And

前記従来の課題を解決するために、本発明の画像処理装置は、入力画像信号の色成分毎の階調分布情報を算出する階調ヒストグラム算出手段と、前記階調ヒストグラム算出手段により算出された色成分毎の階調ヒストグラムの最大値を算出する最大値算出手段と、前記階調ヒストグラム算出手段により算出された色成分毎の階調ヒストグラムの最小値を算出する最小値算出手段と、前記最大値算出手段から算出した最大値から色成分毎の階調補正最大値を算出する階調補正最大値算出手段と、前記最小値算出手段から算出した最小値から色成分毎の階調補正最小値を算出する階調補正最小値算出手段と、前記最大値算出手段から算出した最大値が調補正最大値に、また前記最小値算出手段から算出した最小値が階調補正最小値になるように色成分毎に階調分布を広げる階調補正手段と、を有することを特徴とする。   In order to solve the conventional problem, the image processing apparatus of the present invention is calculated by a gradation histogram calculation unit that calculates gradation distribution information for each color component of an input image signal and the gradation histogram calculation unit. Maximum value calculating means for calculating the maximum value of the gradation histogram for each color component, minimum value calculating means for calculating the minimum value of the gradation histogram for each color component calculated by the gradation histogram calculating means, and the maximum Gradation correction maximum value calculating means for calculating a gradation correction maximum value for each color component from the maximum value calculated from the value calculating means, and gradation correction minimum value for each color component from the minimum value calculated from the minimum value calculating means Gradation correction minimum value calculation means for calculating the maximum correction value, the maximum value calculated from the maximum value calculation means becomes the tone correction maximum value, and the minimum value calculated from the minimum value calculation means becomes the gradation correction minimum value. color And having a gradation correction means to broaden the gradation distribution, the per minute.

また本発明の画像処理装置の最大値算出手段は、階調ヒストグラムにおいて入力画像信号の取り得るダイナミックレンジの最大値から階調を順次減らして階調毎の画素数を累積加算し、その累積値が予め設定された画素数を越えた時の階調値を最大値として算出し、
前記最小値算出手段は、階調ヒストグラムにおいて入力画像信号の取り取り得るダイナミックレンジの最小値から階調を順次増やして階調毎の画素数を累積加算し、その累積値が予め設定された画素数を越えた時の階調値を最小値として算出する、
ことを特徴とする。
Further, the maximum value calculating means of the image processing apparatus of the present invention sequentially decreases the gradation from the maximum value of the dynamic range that can be taken by the input image signal in the gradation histogram, and cumulatively adds the number of pixels for each gradation. Is calculated as the maximum value when the number of pixels exceeds the preset number of pixels,
The minimum value calculation means sequentially increases the gradation from the minimum value of the dynamic range that can be taken by the input image signal in the gradation histogram, cumulatively adds the number of pixels for each gradation, and the cumulative value is a pixel in which the cumulative value is set in advance Calculate the gradation value when the number is exceeded as the minimum value,
It is characterized by that.

また本発明の画像処理装置の最大値算出手段は、入力画像信号の色成分毎の階調ヒストグラムの最大値を算出し、算出した色成分毎の階調ヒストグラムの最大値で最も大きな値を最大値とし、前記最小値算出手段が、入力画像信号の色成分毎の階調ヒストグラムの最小値を算出し、算出した色成分毎の階調ヒストグラムの最小値で最も小さな値を最小値とすることを特徴とする。   The maximum value calculation means of the image processing apparatus of the present invention calculates the maximum value of the gradation histogram for each color component of the input image signal, and maximizes the largest value of the calculated maximum values of the gradation histogram for each color component. The minimum value calculating means calculates a minimum value of the gradation histogram for each color component of the input image signal, and sets the smallest value of the calculated minimum values of the gradation histogram for each color component as the minimum value. It is characterized by.

また本発明の画像処理装置の階調補正最大値算出手段は、前記最大値算出手段から算出した階調ヒストグラムの最大値が予め定めた第1の閾値以上の場合には前記最大値を前記ダイナミックレンジの最大値とし、それ以外の場合には前記最大値から予め定めた変換式を用いて階調補正最大値を計算し、前記階調補正最小値算出手段は、前記最小値算出手段から算出した階調ヒストグラムの最小値が予め定めた第2の閾値以下の場合には前記最小値を前記ダイナミックレンジの最小値とし、それ以外の場合には前記最小値から予め定めた変換式を用いて階調補正最小値を計算する、ことを特徴とする。   Further, the gradation correction maximum value calculating means of the image processing apparatus of the present invention is configured to set the maximum value to the dynamic value when the maximum value of the gradation histogram calculated from the maximum value calculating means is equal to or greater than a predetermined first threshold value. The maximum value of the range is used. In other cases, the gradation correction maximum value is calculated from the maximum value using a predetermined conversion formula, and the gradation correction minimum value calculation means is calculated from the minimum value calculation means. When the minimum value of the gradation histogram is less than or equal to a predetermined second threshold value, the minimum value is set as the minimum value of the dynamic range. In other cases, a conversion equation determined from the minimum value is used. The minimum gradation correction value is calculated.

また本発明の画像処理装置は、入力画像信号の階調補正前の平均輝度値を算出する階調補正前平均輝度値算出手段と、階調補正後の平均輝度値を算出する階調補正後平均輝度算出手段と、前記階調補正前平均輝度値と前記階調補正後平均輝度値とから輝度補正量を算出する輝度補正量算出手段と、前記輝度補正量算出手段により階調補正後の画像信号の輝度を補正する輝度補正手段とを有し、階調補正後の平均輝度値を階調補正前の平均輝度値と同一にすることを特徴としたものである。   In addition, the image processing apparatus of the present invention includes an average luminance value calculation unit before calculating gradation that calculates an average luminance value before gradation correction of an input image signal, and after gradation correction that calculates an average luminance value after gradation correction. Average luminance calculation means, luminance correction amount calculation means for calculating a luminance correction amount from the average luminance value before gradation correction and the average luminance value after gradation correction, and after gradation correction by the luminance correction amount calculation means Brightness correction means for correcting the brightness of the image signal, and the average brightness value after gradation correction is made the same as the average brightness value before gradation correction.

また本発明の画像処理装置は、入力画像が水中画像かどうかを判断する水中画像判断手段を有し、前記水中画像判断手段により入力画像が水中画像と判断された場合にのみ、赤色成分の階調補正最大値をダイナミックレンジの最大値に近づけることを特徴としたものである。   The image processing apparatus of the present invention further includes an underwater image determination unit that determines whether or not the input image is an underwater image. Only when the input image is determined to be an underwater image by the underwater image determination unit, the red component level is determined. This is characterized in that the tone correction maximum value is brought close to the maximum value of the dynamic range.

また本発明の画像処理装置は、入力画像から色差信号を算出する色差信号算出手段と、色差信号の平均値を算出する色差平均値算出手段とを有し、色差信号の平均値により前記水中画像判断手段にて水中画像の判断を行うことを特徴としたものである。   The image processing apparatus of the present invention further includes a color difference signal calculating unit that calculates a color difference signal from an input image, and a color difference average value calculating unit that calculates an average value of the color difference signals, and the underwater image is calculated based on the average value of the color difference signals. It is characterized in that an underwater image is judged by the judging means.

本発明の画像処理装置によれば、階調分布が一部分に集中している場合や、分布の中心が高階調部や低階調部にある場合でも階調分布の形状を崩すことなく、また階調分布の中心が大きく変化することなく階調補正をすることができる。   According to the image processing apparatus of the present invention, even when the gradation distribution is concentrated in a part, or even when the center of the distribution is in the high gradation part or the low gradation part, the shape of the gradation distribution is not destroyed. Tone correction can be performed without significant change in the center of the tone distribution.

また本発明の画像処理装置によれば、入力画像にノイズがある場合でも正確に階調ヒストグラムの最大値及び最小値が算出できるため、正確な階調補正をすることができる。   According to the image processing apparatus of the present invention, the maximum value and the minimum value of the gradation histogram can be accurately calculated even when there is noise in the input image, so that accurate gradation correction can be performed.

また本発明の画像処理装置によれば、入力画像信号の色信号毎に階調の最大値、最小値を算出し、算出した色信号毎の最大値で最も大きな値を最大値とし、色信号毎の最小値で最も小さな値を最小値として補正を行うことにより、色成分毎の階調補正量が同一となるため、ホワイトバランスを崩すことなく階調補正をすることができる。   Further, according to the image processing apparatus of the present invention, the maximum value and the minimum value of the gradation are calculated for each color signal of the input image signal, and the largest value among the calculated maximum values for each color signal is set as the maximum value. By performing correction with the smallest value for each minimum value as the minimum value, the gradation correction amount for each color component becomes the same, so that gradation correction can be performed without losing white balance.

また本発明の画像処理装置によれば、階調補正最大値算出手段が階調の最大値に比例して階調補正最大値を算出し、また階調補正最小値算出手段が階調の最小値に比例して階調補正最小値を算出するため、入力画像の最大値、最小値に応じて階調補正を行うことができるため、階調分布が一部分に集中している場合や、分布の中心が高階調部や低階調部にある場合でも階調分布の中心が大きく変化することなく、また階調分布の形状を崩すことなく階調補正を行うことができる。   Further, according to the image processing apparatus of the present invention, the gradation correction maximum value calculating means calculates the gradation correction maximum value in proportion to the maximum gradation value, and the gradation correction minimum value calculating means is the minimum gradation correction value. Since the gradation correction minimum value is calculated in proportion to the value, gradation correction can be performed according to the maximum and minimum values of the input image. Even when the center of the gray level is in the high gray level portion or the low gray level portion, the gray level correction can be performed without greatly changing the center of the gray level distribution and without destroying the shape of the gray level distribution.

また本発明の画像処理装置によれば、階調補正前と階調補正後の輝度平均値を算出し、階調補正後の輝度値を階調補正前の輝度値と同一にすることができるので、階調補正により輝度が変化することを防止することができる。   Further, according to the image processing apparatus of the present invention, it is possible to calculate the average luminance value before and after gradation correction, and to make the luminance value after gradation correction the same as the luminance value before gradation correction. Therefore, it is possible to prevent the luminance from changing due to the gradation correction.

また本発明の画像処理装置によれば、入力画像が水中画像と判断された場合にのみ、赤色成分の階調補正最大値をダイナミックレンジの最大値に近づけることにより、赤色成分の階調補正量を大きくすることができるため、赤色成分が少ない水中画像に適した階調補正を行うことができる。   Further, according to the image processing apparatus of the present invention, only when the input image is determined to be an underwater image, the gradation correction amount of the red component is adjusted by bringing the gradation correction maximum value of the red component close to the maximum value of the dynamic range. Therefore, it is possible to perform gradation correction suitable for an underwater image with few red components.

また本発明の画像処理装置によれば、水中画像かどうかの判断を色差信号の平均値により算出するため、簡便な方法で水中画像の階調補正を行う。   In addition, according to the image processing apparatus of the present invention, the gradation correction of the underwater image is performed by a simple method in order to calculate whether the image is an underwater image based on the average value of the color difference signals.

以下に、本発明の画像処理装置の実施の形態を図面とともに詳細に説明する。   Embodiments of an image processing apparatus according to the present invention will be described below in detail with reference to the drawings.

図1は本発明の第1の実施例における画像処理装置の構成を示すブロック図を示すものである。   FIG. 1 is a block diagram showing the configuration of an image processing apparatus according to the first embodiment of the present invention.

図1において、101は入力画像信号の階調ヒストグラムを算出する階調ヒストグラム算出手段、102は階調ヒストグラムの最大値を算出する最大値算出手段、103は階調ヒストグラムの最小値を算出する最小値算出手段、104は最大値から階調補正最大値を算出する階調補正最大値算出手段、105は最小値から階調補正最小値を算出する階調補正最小値算出手段、106は階調補正手段である。以下入力画像が8ビットの場合についてその動作を説明する。   In FIG. 1, 101 is a gradation histogram calculating means for calculating a gradation histogram of an input image signal, 102 is a maximum value calculating means for calculating the maximum value of the gradation histogram, and 103 is a minimum for calculating the minimum value of the gradation histogram. A value calculation unit 104 is a gradation correction maximum value calculation unit 104 that calculates a gradation correction maximum value from the maximum value, 105 is a gradation correction minimum value calculation unit that calculates a gradation correction minimum value from the minimum value, and 106 is a gradation It is a correction means. Hereinafter, the operation in the case where the input image is 8 bits will be described.

まず入力画像信号から階調ヒストグラム算出手段101にて階調ヒストグラムを色成分毎に算出する。階調ヒストグラムは入力画像の階調分布をあらわし、例えば図2のようにあらわされる。図2において横軸は階調レベル、縦軸は階調毎の画素の分布数をあらわしている。またP1は階調分布の最小値、P2は階調分布の最大値をあらわしている。   First, a gradation histogram is calculated for each color component by the gradation histogram calculation means 101 from the input image signal. The gradation histogram represents the gradation distribution of the input image, for example, as shown in FIG. In FIG. 2, the horizontal axis represents the gradation level, and the vertical axis represents the number of pixel distributions for each gradation. P1 represents the minimum value of the gradation distribution, and P2 represents the maximum value of the gradation distribution.

次に最大値算出手段102及び最小値算出手段103にて階調分布の最大値、及び最小値を算出する。以下その算出方法について説明する。   Next, the maximum value calculation means 102 and the minimum value calculation means 103 calculate the maximum value and the minimum value of the gradation distribution. The calculation method will be described below.

最大値算出手段102では、階調分布の最大値を算出する。階調分布の最大値は、階調レベルの最大値である255から階調レベルの最小値である0に向かって階調分布数を調べ、最初に階調の分布がある階調レベルを最大値として算出する。なお最大値を算出する際に、図2のように高階調部にノイズがある場合にはノイズ部分を最大値と算出してしまい誤動作する場合があるため、階調レベルの255から0に向かって階調毎の分布数を累積加算し、その累積値が閾値を越える時の階調レベルを最大値として算出するようにしてもよい。ノイズ部分は分布数が少ないため、累積加算することによりノイズ部分を無視して真の最大値P2を算出することができる。なお閾値は全階調分布数の数%の数値とし、通常1%前後の値となるが、この値に限るものではない。   The maximum value calculation means 102 calculates the maximum value of the gradation distribution. For the maximum value of the gradation distribution, the number of gradation distributions is examined from 255, which is the maximum value of the gradation level, to 0, which is the minimum value of the gradation level, and the gradation level with the gradation distribution is first maximized. Calculate as a value. When the maximum value is calculated, if there is noise in the high gradation part as shown in FIG. 2, the noise part is calculated as the maximum value and malfunction may occur, so that the gradation level goes from 255 to 0. Alternatively, the number of distributions for each gradation may be cumulatively added, and the gradation level when the cumulative value exceeds the threshold value may be calculated as the maximum value. Since the noise part has a small number of distributions, it is possible to calculate the true maximum value P2 by ignoring the noise part by cumulative addition. The threshold value is a numerical value of several percent of the total number of gradation distributions, and is usually a value around 1%, but is not limited to this value.

最小値算出手段103では、階調分布の最小値を算出する。階調分布の最小値は、階調レベルの最小値である0から階調レベルの最大値である255に向かって階調分布数を調べ、最初に階調の分布がある階調レベルを最小値として算出する。なお最小値を算出する際に、図2のように低階調部にノイズがある場合にはノイズ部分を最小値と算出してしまい誤動作する場合があるため、階調レベルの0から255向かって階調毎の分布数を累積加算し、その累積値が閾値を越える時の階調レベルを最小値として算出するようにしてもよい。ノイズ部分は分布数が少ないため、累積加算することによりノイズ部分を無視して真の最小値P1を算出することができる。なお閾値は全階調分布数の数%の数値とし、通常1%前後の値となるが、この値に限るものではない。   The minimum value calculation means 103 calculates the minimum value of the gradation distribution. For the minimum value of the gradation distribution, the number of gradation distributions is examined from 0, which is the minimum value of the gradation level, to 255, which is the maximum value of the gradation level, and the gradation level with the gradation distribution is first minimized. Calculate as a value. When calculating the minimum value, if there is noise in the low gradation part as shown in FIG. 2, the noise part may be calculated as the minimum value and malfunction may occur. Alternatively, the number of distributions for each gradation may be cumulatively added, and the gradation level when the cumulative value exceeds the threshold value may be calculated as the minimum value. Since the noise part has a small number of distributions, the true minimum value P1 can be calculated by ignoring the noise part and ignoring the noise part. The threshold value is a numerical value of several percent of the total number of gradation distributions, and is usually a value around 1%, but is not limited to this value.

次に色成分毎に階調補正最大値算出手段104及び階調補正最小値算出手段105にて階調分布を広げるための目標値である階調補正最大値、階調補正最小値を算出する。階調補正により階調分布が階調補正最大値と階調補正最小値の間に分布するように広げられる。この階調補正最大値、階調補正最小値の算出方法が本発明の最も大きな特徴である。   Next, for each color component, the gradation correction maximum value calculation means 104 and the gradation correction minimum value calculation means 105 calculate the gradation correction maximum value and the gradation correction minimum value, which are target values for expanding the gradation distribution. . By gradation correction, the gradation distribution is expanded so as to be distributed between the maximum gradation correction value and the minimum gradation correction value. The method for calculating the maximum gradation correction value and the minimum gradation correction value is the greatest feature of the present invention.

階調の最小値をP1、最大値をP2、階調補正最小値をQ1、階調補正最大値をQ2とした場合、各々の関係は図3に示すようになる。階調補正により、最小値P1は階調補正最小値Q1に、最大値P2は階調補正最大値Q2となるように階調分布が広げられる。一般的に入力画像信号が8ビットの場合には、階調補正最小値Q1を0とし、階調補正最大値Q2を255とし階調補正を行うが、本発明では階調補正最大値Q2を、最大値算出手段102にて算出した階調の最大値P2により算出し、階調補正最小値Q1を最小値算出手段103にて算出した階調の最小値P1により算出するという特徴がある。従って従来技術のように高階調部分に階調分布の中心がある場合や(図14)、低階調部分に階調分布の中心がある場合(図15)に階調の中心が大きく移動したり、分布形状が大きく変化してしまう不具合は発生しない。階調補正最大値、及び階調補正最小値の算出方法について以下に説明する。   When the minimum gradation value is P1, the maximum value is P2, the gradation correction minimum value is Q1, and the gradation correction maximum value is Q2, the respective relationships are as shown in FIG. By gradation correction, the gradation distribution is expanded so that the minimum value P1 becomes the gradation correction minimum value Q1 and the maximum value P2 becomes the gradation correction maximum value Q2. In general, when the input image signal is 8 bits, gradation correction is performed by setting the gradation correction minimum value Q1 to 0 and the gradation correction maximum value Q2 to 255. In the present invention, the gradation correction maximum value Q2 is set to The maximum gradation calculation value P2 calculated by the maximum value calculation unit 102 is calculated, and the minimum gradation correction value Q1 is calculated by the minimum gradation value P1 calculated by the minimum value calculation unit 103. Therefore, when the center of the gradation distribution is in the high gradation part as in the prior art (FIG. 14), or when the center of the gradation distribution is in the low gradation part (FIG. 15), the gradation center moves greatly. Or a problem that the distribution shape changes greatly does not occur. A method for calculating the maximum gradation correction value and the minimum gradation correction value will be described below.

まず階調補正最大値の算出方法について説明する。階調補正最大値は階調の最大値に比例した値となる。階調の最大値がダイナミックレンジの最大値に近い場合には、階調補正最大値はダイナミックレンジの最大値、あるいは最大値に近い値を取り、階調の最大値が小さくなるにつれて小さな値を取るようにする。最大値と階調補正最大値との関係の一例を図4に示す。   First, a method for calculating the maximum gradation correction value will be described. The maximum gradation correction value is proportional to the maximum gradation value. When the maximum gradation value is close to the maximum value of the dynamic range, the maximum gradation correction value is the maximum value of the dynamic range or a value close to the maximum value, and decreases as the maximum gradation value decreases. Try to take. An example of the relationship between the maximum value and the gradation correction maximum value is shown in FIG.

図4において横軸は階調の最大値を表し、縦軸は階調補正最大値をあらわす。最大値が十分に大きい場合には階調補正最大値は入力画像が取り得るダイナミックレンジの最大値となる。図4の例では最大値が230を越える値の場合には階調補正最大値を255とする。最大値が小さくなるにつれ階調補正最大値も小さな値をとり、例えば最大値が100の時には階調補正最大値は175となる。なお図に示しているように、最大値がある値以下の場合には階調補正最大値も一定の値とするようにしてもよい。このようにすると最大値が極端に小さい値の場合に、過度の階調補正となるのを防止できる。図4の例では最大値が100以下の場合には階調補正最大値は175の固定値となる。また図4の場合には最大値に対する階調補正最大値が直線的に変化するようにしているが、二次曲線、三次曲線等の曲線にしてもよい。   In FIG. 4, the horizontal axis represents the maximum gradation value, and the vertical axis represents the maximum gradation correction value. When the maximum value is sufficiently large, the gradation correction maximum value is the maximum value of the dynamic range that can be taken by the input image. In the example of FIG. 4, when the maximum value exceeds 230, the maximum gradation correction value is set to 255. As the maximum value decreases, the gradation correction maximum value also decreases. For example, when the maximum value is 100, the gradation correction maximum value is 175. As shown in the drawing, when the maximum value is less than a certain value, the maximum gradation correction value may be set to a constant value. In this way, excessive gradation correction can be prevented when the maximum value is extremely small. In the example of FIG. 4, when the maximum value is 100 or less, the maximum gradation correction value is a fixed value of 175. In the case of FIG. 4, the maximum gradation correction value with respect to the maximum value changes linearly, but it may be a curve such as a quadratic curve or a cubic curve.

次に階調補正最小値の算出方法について説明する。階調補正最小値は階調の最小値に比例した値となる。階調の最小値がダイナミックレンジの最小値に近い場合には、階調補正最小値はダイナミックレンジの最小値、あるいは最小値に近い値を取り、階調の最小値が大きくなるにつれて大きな値を取るようにする。最小値と階調補正最小値との関係の一例を図5に示す。   Next, a method for calculating the gradation correction minimum value will be described. The minimum gradation correction value is proportional to the minimum gradation value. If the minimum value of gradation is close to the minimum value of dynamic range, the minimum value of gradation correction takes the minimum value of dynamic range or a value close to the minimum value, and increases as the minimum value of gradation increases. Try to take. An example of the relationship between the minimum value and the gradation correction minimum value is shown in FIG.

図5において横軸は最小値をあらわし、縦軸は階調補正最小値をあらわしている。最小値が十分に小さい場合には階調補正最小値はダイナミックレンジの最小値をとる。図5の例では最小値が20より小さい場合には階調補正最小値を0とする。最小値が大きくなるにつれ階調補正最小値も大きな値をとり、例えば最小値が150の時には階調補正最小値は75となる。なお階調補正最大値の算出と同様に、最小値がある値以上の場合には階調補正最小値も一定の値になるようにしてもよい。このようにすることで最小値が極端に大きい値の場合に、過度の階調補正となるのを防止できる。図5の場合には最小値が150を越えた場合、階調補正最小値は75の固定値となる。また図5の場合、最小値に対する階調補正最小値が直線的に変化するようにしているが、二次曲線、三次曲線等の曲線にしてもよい。   In FIG. 5, the horizontal axis represents the minimum value, and the vertical axis represents the gradation correction minimum value. When the minimum value is sufficiently small, the gradation correction minimum value takes the minimum value of the dynamic range. In the example of FIG. 5, when the minimum value is smaller than 20, the gradation correction minimum value is set to 0. As the minimum value increases, the gradation correction minimum value also increases. For example, when the minimum value is 150, the gradation correction minimum value is 75. Similar to the calculation of the maximum gradation correction value, the minimum gradation correction value may be a constant value when the minimum value is greater than a certain value. In this way, excessive gradation correction can be prevented when the minimum value is an extremely large value. In the case of FIG. 5, when the minimum value exceeds 150, the gradation correction minimum value is a fixed value of 75. In the case of FIG. 5, the gradation correction minimum value with respect to the minimum value changes linearly, but it may be a curve such as a quadratic curve or a cubic curve.

以上のように最小値P1とその階調補正目標値である階調補正最小値Q1、最大値P2とその階調補正目標値である階調補正最大値Q2とを算出できたので、次に補正前のP1からP2に分布する階調が、Q1からQ2に分布するように階調補正を階調補正手段106にて行う。階調補正手段106では階調の最小値P1、最大値P2、階調補正最小値Q1、階調補正最大値Q2の値から階調補正を次式にて行う。   As described above, the minimum value P1, the gradation correction target value that is the gradation correction target value Q1, the maximum value P2, and the gradation correction target value that is the gradation correction maximum value Q2 can be calculated. The gradation correction unit 106 performs gradation correction so that gradations distributed from P1 to P2 before correction are distributed from Q1 to Q2. In the gradation correction means 106, gradation correction is performed from the values of the minimum gradation value P1, the maximum value P2, the gradation correction minimum value Q1, and the gradation correction maximum value Q2 by the following equation.

Y=(Q2−Q1)/(P2−P1)*(X−P1)+Q1
ここでXは補正前の階調レベル、Yは補正後の階調レベルをあらわしており、補正前の階調レベルと補正後の階調レベルの関係は図6のようになる。
Y = (Q2-Q1) / (P2-P1) * (X-P1) + Q1
Here, X represents the gradation level before correction, Y represents the gradation level after correction, and the relationship between the gradation level before correction and the gradation level after correction is as shown in FIG.

このようにして階調補正を行った一例を図7,図8に示す。図7(a)は高階調部に分布が偏っている画像の階調補正前の階調分布を示しており、最小値P1から最大値P2にかけて階調が分布している。図7(b)は本発明にもとづいて階調補正を行った結果であり、階調補正最小値Q1から階調補正最大値Q2にかけて階調が分布している。点線は階調の中心を示しており、補正前の階調の中心と補正後の階調分布の中心との差をΔTとしている。図7を見てわかるようにΔTの値は従来例の図14で示した値より小さい値となっていることがわかる。このように低階調への伸長が制限されるため、分布の中心が低階調側に大きく移動するのを防止できると共に、分布形状が大きく変化することを防止することができる。   An example in which gradation correction is performed in this way is shown in FIGS. FIG. 7A shows a gradation distribution before gradation correction of an image whose distribution is biased in the high gradation part, and gradations are distributed from the minimum value P1 to the maximum value P2. FIG. 7B shows the result of the gradation correction according to the present invention. The gradation is distributed from the gradation correction minimum value Q1 to the gradation correction maximum value Q2. The dotted line indicates the center of the gradation, and ΔT is the difference between the center of the gradation before correction and the center of the gradation distribution after correction. As can be seen from FIG. 7, the value of ΔT is smaller than the value shown in FIG. Since expansion to the low gradation is thus limited, it is possible to prevent the center of the distribution from largely moving to the low gradation side and to prevent the distribution shape from changing greatly.

また図8は図7で示した例とは反対に低階調部に分布が偏っている画像の場合の補正結果を示している。図8(a)は階調補正前の階調分布、図8(b)は階調補正後の階調分布を示している。補正前の階調の中心と補正後の階調分布の中心との差ΔTを見てわかるように、ΔTの値は従来例の図15で示した値より小さい値となっていることがわかる。このように高階調への伸長が制限されるため、分布の中心が高階調側に大きく移動するのを防止できると共に、分布形状が大きく変化することを防止することができる。   Further, FIG. 8 shows a correction result in the case of an image whose distribution is biased in the low gradation part, contrary to the example shown in FIG. FIG. 8A shows the tone distribution before tone correction, and FIG. 8B shows the tone distribution after tone correction. As can be seen from the difference ΔT between the center of the gradation before correction and the center of the gradation distribution after correction, it can be seen that the value of ΔT is smaller than the value shown in FIG. . As described above, since the expansion to the high gradation is restricted, it is possible to prevent the center of the distribution from largely moving to the high gradation side and to prevent the distribution shape from changing greatly.

以上説明した方法により入力画像の色成分毎に階調補正を行うが、入力画像信号が赤色、緑色、青色のカラー信号である場合には、赤色、緑色、青色個別に階調の最大値、最小値、階調補正最大値、階調補正最小値を算出し、赤色、緑色、青色個別に階調を補正することになる。また色成分としてプリント系ではイエロー、マゼンタ、シアンが入力画像信号となるが、同様な処理により階調補正を行うことができる。   Although the gradation correction is performed for each color component of the input image by the method described above, when the input image signal is a color signal of red, green, and blue, the maximum value of the gradation for each of red, green, and blue, The minimum value, the maximum gradation correction value, and the minimum gradation correction value are calculated, and the gradation is corrected individually for red, green, and blue. In the printing system, yellow, magenta, and cyan are input image signals as color components, but gradation correction can be performed by the same processing.

また赤色、緑色、青色毎の階調補正量を同一にすることで、ホワイトバランスを維持したまま階調補正を行える。その場合の処理方法について図9のフローチャートを用いて説明する。   In addition, by making the gradation correction amounts for red, green, and blue the same, gradation correction can be performed while maintaining white balance. The processing method in that case will be described with reference to the flowchart of FIG.

まず赤色、緑色、青色信号毎に階調ヒストグラムを算出する(S902)。次に赤色、緑色、青色毎に最大値、最小値を算出する(S903,S904)。算出した赤色、緑色、青色の最大値で最も大きな値を最大値Aとして採用する(S905)。さらに算出した赤色、緑色、青色の最小値で最も小さな値を最小値Bとして採用する(S906)。   First, a gradation histogram is calculated for each of the red, green, and blue signals (S902). Next, the maximum value and the minimum value are calculated for each of red, green, and blue (S903, S904). The largest value among the calculated maximum values of red, green, and blue is adopted as the maximum value A (S905). Further, the smallest value of the calculated red, green and blue minimum values is adopted as the minimum value B (S906).

算出した最大値Aから階調補正最大値を算出し(S907)、さらに最小値Bから階調補正最小値を算出する(S908)。このようにして算出した、最大値、階調補正最大値、最小値、階調補正最小値から赤色、緑色、青色に階調補正を行う(S909)。このようにすると各色毎の階調補正量が同一となるため、ホワイトバランスを崩すことなく階調補正を行うことができる。   The maximum gradation correction value is calculated from the calculated maximum value A (S907), and the minimum gradation correction value is calculated from the minimum value B (S908). The gradation correction is performed from the maximum value, gradation correction maximum value, minimum value, and gradation correction minimum value calculated in this way to red, green, and blue (S909). In this way, since the gradation correction amount for each color becomes the same, the gradation correction can be performed without breaking the white balance.

また階調補正前後の輝度の平均値を算出し、階調補正により入力画像信号の輝度が変化した場合、輝度補正手段により入力画像信号の輝度の平均値と出力画像信号の輝度の平均値が一致するように補正してもよい。入力画像信号の階調ヒストグラムが低階調側、あるいは高階調側に偏っている場合、階調補正により画像信号の輝度の平均が大きく変化する場合がある。このような場合には階調補正により逆に画質が低下する場合がある。そこで階調補正により画像の輝度が変化した場合、階調補正前の輝度に戻すことにより画質の低下を防止することができる。この場合の処理方法について図10を用いて説明する。   Also, the average value of the luminance before and after the gradation correction is calculated, and when the luminance of the input image signal is changed by the gradation correction, the average value of the luminance of the input image signal and the average value of the luminance of the output image signal are calculated by the luminance correction means. You may correct | amend so that it may correspond. If the gradation histogram of the input image signal is biased toward the low gradation side or the high gradation side, the average luminance of the image signal may change greatly due to gradation correction. In such a case, the image quality may be reduced due to the gradation correction. Accordingly, when the luminance of the image changes due to the gradation correction, the image quality can be prevented from being lowered by returning to the luminance before the gradation correction. A processing method in this case will be described with reference to FIG.

図10において、階調補正前輝度平均値算出手段1001にて階調補正前の輝度の平均値を算出する。次に階調補正後輝度平均値算出手段1002にて階調補正後の輝度の平均値を算出する。輝度補正量算出手段1003では階調補正前の輝度の平均値と、階調補正後の輝度の平均値とが一致するような輝度の補正量を算出する。例えば階調補正前の平均輝度値をL、階調補正後の平均輝度値をMとし、輝度の補正をガンマ補正により行う場合には、
L=Mγ
となるようなガンマ補正係数γを算出し、ガンマ補正により輝度の補正を行う。この場合ガンマ補正係数は次式にて算出される。
In FIG. 10, the average luminance value before gradation correction is calculated by the luminance average value calculation means 1001 before gradation correction. Next, the average value of luminance after gradation correction is calculated by the luminance average value calculation means 1002 after gradation correction. The luminance correction amount calculation means 1003 calculates a luminance correction amount such that the average luminance value before gradation correction matches the average luminance value after gradation correction. For example, when the average luminance value before gradation correction is L, the average luminance value after gradation correction is M, and luminance correction is performed by gamma correction,
L =
Then, a gamma correction coefficient γ is calculated, and the brightness is corrected by gamma correction. In this case, the gamma correction coefficient is calculated by the following equation.

γ=logL/logM
輝度補正手段1004では、階調補正手段106で階調補正された信号から輝度成分を抽出し、その輝度成分に対して、算出したガンマ補正係数γにてガンマ補正を行う。
このように階調補正前の輝度値と階調補正後の輝度値とを同一にすることにより、輝度の低下による画質の低下を防止することができる。
γ = logL / logM
The luminance correction unit 1004 extracts a luminance component from the signal subjected to gradation correction by the gradation correction unit 106, and performs gamma correction on the luminance component with the calculated gamma correction coefficient γ.
In this way, by making the luminance value before gradation correction the same as the luminance value after gradation correction, it is possible to prevent a decrease in image quality due to a decrease in luminance.

また図11に示すように、入力画像が水中画像かどうかを判断し、水中画像である場合には赤色成分の階調補正最大値を大きい値に設定して階調補正を行うようにしてもよい。前述したように水中画像では、水により赤色成分が吸収され、赤色成分が小さい値となり、図16〜図19に示すような分布特性となる。図16は赤色成分の階調分布特性、図17は緑色成分の階調分布特性、図18は青色成分の階調分布特性の一例を示している。そこで赤色成分の階調補正最大値をより大きな値とすることにより、赤色成分に対して大きな階調補正量がかかるため、水中画像に対して最適な階調補正を行うことができる。   Also, as shown in FIG. 11, it is determined whether the input image is an underwater image. If the input image is an underwater image, the tone correction maximum value of the red component is set to a large value to perform tone correction. Good. As described above, in the underwater image, the red component is absorbed by water, and the red component has a small value, resulting in distribution characteristics as shown in FIGS. 16 shows an example of the gradation distribution characteristic of the red component, FIG. 17 shows an example of the gradation distribution characteristic of the green component, and FIG. 18 shows an example of the gradation distribution characteristic of the blue component. Therefore, by setting the maximum gradation correction value of the red component to a larger value, a large gradation correction amount is applied to the red component, so that optimal gradation correction can be performed on the underwater image.

図11において、1101は色差信号算出手段であり、1102は色差平均値算出手段、1103は水中画像判断手段である。水中画像の判断は、入力画像信号の色差信号の平均値を算出し、その平均値により行う。以下その判断方法について説明する。   In FIG. 11, reference numeral 1101 denotes a color difference signal calculation unit, 1102 denotes a color difference average value calculation unit, and 1103 denotes an underwater image determination unit. The underwater image is determined by calculating an average value of the color difference signals of the input image signal and using the average value. The determination method will be described below.

色差信号は画像信号の赤色成分をR、緑色成分をG、青色成分をBとしその輝度成分をYとしたとき、
Cr=R−Y
Cb=B−Y
であらわされるCr,Cbである。通常の画像の場合Cr,Cb共に0を中心として分布しているが、水中の場合には図12に示すように青色領域に分布する。図12において、斜線で示した領域は入力画像の色差信号の分布を示している。そこでCr,Cbの平均値を算出し、その平均値が青色領域の値ならば水中と判断する。例えばCr成分の平均値が−20より小さく、さらにCb成分の平均値が−20から20までの値の場合、水中と判断する。水中と判断した場合には赤色成分の階調補正最大値をダイナミックレンジの最大値に近づける処理を行う。例えば図4にて算出した階調補正最大値に30を加算したものを階調補正最大値とすることでダイナミックレンジの最大値に近づける。このようにすることで赤色成分をより大きく階調補正するため、より最適な階調補正を行うことができる。
The color difference signal has a red component of the image signal as R, a green component as G, a blue component as B, and a luminance component as Y.
Cr = R−Y
Cb = BY
Cr, Cb represented by In the case of a normal image, both Cr and Cb are distributed around 0, but in the case of underwater, they are distributed in a blue region as shown in FIG. In FIG. 12, the shaded area indicates the distribution of the color difference signal of the input image. Therefore, the average value of Cr and Cb is calculated. If the average value is a value in the blue region, it is determined that the water is underwater. For example, when the average value of the Cr component is smaller than −20 and the average value of the Cb component is a value from −20 to 20, it is determined that the water is underwater. When it is determined to be underwater, processing is performed to bring the maximum gradation correction value of the red component closer to the maximum value of the dynamic range. For example, a value obtained by adding 30 to the maximum gradation correction value calculated in FIG. 4 is used as the maximum gradation correction value to approximate the maximum value of the dynamic range. By doing so, the red component is more greatly corrected in gradation, and thus more optimal gradation correction can be performed.

以上のように、本実施の形態1においては 階調ヒストグラムの最大値及び最大値から算出した階調補正最大値と、階調ヒストグラムの最小値及び最小値から算出した階調補正最小値とから階調補正を行うため、入力画像の階調分布が一部分に集中している場合や、分布の中心が高階調部や低階調部にある場合でも階調分布の形状を崩すことなく、また階調分布の中心が大きく変化しない階調補正をすることができる。   As described above, in the first embodiment, the tone correction maximum value calculated from the maximum value and the maximum value of the tone histogram and the tone correction minimum value calculated from the minimum value and the minimum value of the tone histogram are used. In order to perform gradation correction, even if the gradation distribution of the input image is concentrated in a part or the center of the distribution is in the high gradation part or the low gradation part, the shape of the gradation distribution is not destroyed. It is possible to perform tone correction in which the center of the tone distribution does not change greatly.

本発明にかかる画像処理装置は、階調ヒストグラムの最大値及び最大値から算出した階調補正最大値と、階調ヒストグラムの最小値及び最小値から算出した階調補正最小値とから入力画像信号の特性に合わせて階調補正を行うことができるため、各種入力装置の画像処理装置として有用であり、特に水中画像のように入力画像信号の階調分布が一部分しか分布していない場合や、分布に偏りがある場合に適している。   An image processing apparatus according to the present invention provides an input image signal based on a maximum tone correction value calculated from a maximum value and a maximum value of a tone histogram, and a tone correction minimum value calculated from a minimum value and a minimum value of the tone histogram. Since it is possible to perform gradation correction in accordance with the characteristics of the image processing device, it is useful as an image processing device for various input devices, and particularly when the gradation distribution of the input image signal is only partially distributed like an underwater image, Suitable when the distribution is biased.

本発明の実施の形態1における画像処理装置のブロック図1 is a block diagram of an image processing apparatus according to Embodiment 1 of the present invention. 本発明の実施の形態1における階調ヒストグラムをあらわす図The figure showing the gradation histogram in Embodiment 1 of this invention 本発明の実施の形態1における階調補正方法の説明図Explanatory drawing of the gradation correction method in Embodiment 1 of this invention 本発明の実施の形態1における階調最大値と階調補正最大値の関係図FIG. 6 is a relationship diagram between the maximum gradation value and the maximum gradation correction value in Embodiment 1 of the present invention 本発明の実施の形態1における階調最小値と階調補正最小値の関係図FIG. 5 is a relationship diagram between the minimum gradation value and the minimum gradation correction value in Embodiment 1 of the present invention 本発明の実施の形態1における階調補正特性を示す図The figure which shows the gradation correction characteristic in Embodiment 1 of this invention 本発明の実施の形態1における階調補正結果を示す図The figure which shows the gradation correction result in Embodiment 1 of this invention 本発明の実施の形態1における階調補正結果を示す図The figure which shows the gradation correction result in Embodiment 1 of this invention 本発明の実施の形態1における同一補正量による階調補正方法のフローチャートFlowchart of gradation correction method using the same correction amount in Embodiment 1 of the present invention 本発明の実施の形態1における輝度補正を行う場合の画像処理装置のブロック図Block diagram of an image processing apparatus when performing luminance correction in Embodiment 1 of the present invention 本発明の実施の形態1における水中画像の階調補正を行う場合の画像処理装置のブロック図1 is a block diagram of an image processing apparatus when performing gradation correction of an underwater image in Embodiment 1 of the present invention. 本発明の実施の形態1における水中画像の色成分分布図Color component distribution chart of underwater image in Embodiment 1 of the present invention 従来の画像処理装置についてのフローチャートFlowchart for a conventional image processing apparatus 従来の画像処理装置についての説明図Explanatory drawing about a conventional image processing apparatus 従来の画像処理装置についての説明図Explanatory drawing about a conventional image processing apparatus 水中画像の階調特性図Gradation characteristics of underwater image 水中画像の階調特性図Gradation characteristics of underwater image 水中画像の階調特性図Gradation characteristics of underwater image 水中画像の階調特性図Gradation characteristics of underwater image

符号の説明Explanation of symbols

101 階調ヒストグラム算出手段
102 最大値算出手段
103 最小値算出手段
104 階調補正最大値算出手段
105 階調補正最小値算出手段
106 階調補正手段
1001 階調補正前輝度平均値算出手段
1002 階調補正後輝度平均値算出手段
1003 輝度補正量算出手段
1004 輝度補正手段
1101 色差信号算出手段
1102 色差平均値算出手段
1103 水中画像判断手段
101 gradation histogram calculation means 102 maximum value calculation means 103 minimum value calculation means 104 gradation correction maximum value calculation means 105 gradation correction minimum value calculation means 106 gradation correction means 1001 luminance average value calculation means 1001 before gradation correction After-correction brightness average value calculation means 1003 Brightness correction amount calculation means 1004 Brightness correction means 1101 Color difference signal calculation means 1102 Color difference average value calculation means 1103 Underwater image determination means

Claims (7)

入力画像信号の色成分毎の階調分布情報を算出する階調ヒストグラム算出手段と、
前記階調ヒストグラム算出手段により算出された色成分毎の階調ヒストグラムの最大値を算出する最大値算出手段と、前記階調ヒストグラム算出手段により算出された色成分毎の階調ヒストグラムの最小値を算出する最小値算出手段と、
前記最大値算出手段から算出した最大値から色成分毎の階調補正最大値を算出する階調補正最大値算出手段と、前記最小値算出手段から算出した最小値から色成分毎の階調補正最小値を算出する階調補正最小値算出手段と、
前記最大値算出手段から算出した最大値が調補正最大値に、また前記最小値算出手段から算出した最小値が階調補正最小値になるように色成分毎に階調分布を広げる階調補正手段と、
を有することを特徴とする画像処理装置。
A gradation histogram calculating means for calculating gradation distribution information for each color component of the input image signal;
The maximum value calculating means for calculating the maximum value of the gradation histogram for each color component calculated by the gradation histogram calculating means, and the minimum value of the gradation histogram for each color component calculated by the gradation histogram calculating means. A minimum value calculating means for calculating;
Tone correction maximum value calculation means for calculating the maximum gradation correction value for each color component from the maximum value calculated from the maximum value calculation means, and gradation correction for each color component from the minimum value calculated from the minimum value calculation means Gradation correction minimum value calculating means for calculating a minimum value;
Gradation correction that widens the gradation distribution for each color component so that the maximum value calculated from the maximum value calculation means becomes the maximum value of tone correction and the minimum value calculated from the minimum value calculation means becomes the minimum value of gradation correction Means,
An image processing apparatus comprising:
前記最大値算出手段は、階調ヒストグラムにおいて入力画像信号の取り得るダイナミックレンジの最大値から階調を順次減らして階調毎の画素数を累積加算し、その累積値が予め設定された画素数を越えた時の階調値を最大値として算出し、
前記最小値算出手段は、階調ヒストグラムにおいて入力画像信号の取り取り得るダイナミックレンジの最小値から階調を順次増やして階調毎の画素数を累積加算し、その累積値が予め設定された画素数を越えた時の階調値を最小値として算出する、
ことを特徴とする請求項1記載の画像処理装置。
The maximum value calculating means sequentially reduces the gradation from the maximum value of the dynamic range that can be taken by the input image signal in the gradation histogram, and cumulatively adds the number of pixels for each gradation, and the cumulative value is a preset number of pixels. The gradation value when exceeding the maximum value is calculated as the maximum value.
The minimum value calculation means sequentially increases the gradation from the minimum value of the dynamic range that can be taken by the input image signal in the gradation histogram, cumulatively adds the number of pixels for each gradation, and the cumulative value is a pixel in which the cumulative value is set in advance Calculate the gradation value when the number is exceeded as the minimum value,
The image processing apparatus according to claim 1.
前記最大値算出手段は、入力画像信号の色成分毎の階調ヒストグラムの最大値を算出し、算出した色成分毎の階調ヒストグラムの最大値で最も大きな値を最大値とし、前記最小値算出手段が、入力画像信号の色成分毎の階調ヒストグラムの最小値を算出し、算出した色成分毎の階調ヒストグラムの最小値で最も小さな値を最小値とすることを特徴とする請求項1記載の画像処理装置。 The maximum value calculating means calculates the maximum value of the gradation histogram for each color component of the input image signal, sets the maximum value of the calculated maximum values of the gradation histogram for each color component as the maximum value, and calculates the minimum value. The means calculates the minimum value of the gradation histogram for each color component of the input image signal, and sets the smallest value among the calculated minimum values of the gradation histogram for each color component as the minimum value. The image processing apparatus described. 前記階調補正最大値算出手段は、前記最大値算出手段から算出した階調ヒストグラムの最大値が予め定めた第1の閾値以上の場合には前記最大値を前記ダイナミックレンジの最大値とし、それ以外の場合には前記最大値から予め定めた変換式を用いて階調補正最大値を計算し、
前記階調補正最小値算出手段は、前記最小値算出手段から算出した階調ヒストグラムの最小値が予め定めた第2の閾値以下の場合には前記最小値を前記ダイナミックレンジの最小値とし、それ以外の場合には前記最小値から予め定めた変換式を用いて階調補正最小値を計算する、
ことを特徴とする請求項1記載の画像処理装置。
The gradation correction maximum value calculating means sets the maximum value as the maximum value of the dynamic range when the maximum value of the gradation histogram calculated from the maximum value calculating means is equal to or greater than a predetermined first threshold, In other cases, the maximum gradation correction value is calculated from the maximum value using a predetermined conversion formula,
The gradation correction minimum value calculation means sets the minimum value as the minimum value of the dynamic range when the minimum value of the gradation histogram calculated from the minimum value calculation means is equal to or less than a predetermined second threshold value. In other cases, the gradation correction minimum value is calculated from the minimum value using a predetermined conversion formula.
The image processing apparatus according to claim 1.
入力画像信号の階調補正前の平均輝度値を算出する階調補正前平均輝度値算出手段と、階調補正後の平均輝度値を算出する階調補正後平均輝度算出手段と、前記階調補正前平均輝度値と前記階調補正後平均輝度値とから輝度補正量を算出する輝度補正量算出手段と、前記輝度補正量算出手段により階調補正後の画像信号の輝度を補正する輝度補正手段とを有し、階調補正後の平均輝度値を階調補正前の平均輝度値と同一にすることを特徴とする請求項1記載の画像処理装置。 An average luminance value calculation means before gradation correction for calculating an average luminance value before gradation correction of the input image signal, an average luminance value after gradation correction for calculating an average luminance value after gradation correction, and the gradation Luminance correction amount calculation means for calculating a luminance correction amount from the average luminance value before correction and the average luminance value after gradation correction, and luminance correction for correcting the luminance of the image signal after gradation correction by the luminance correction amount calculation means The image processing apparatus according to claim 1, wherein an average luminance value after gradation correction is made equal to an average luminance value before gradation correction. 入力画像が水中画像かどうかを判断する水中画像判断手段を有し、前記水中画像判断手段により入力画像が水中画像と判断された場合にのみ、赤色成分の階調補正最大値をダイナミックレンジの最大値に近づけることを特徴とする請求項1記載の画像処理装置。 Underwater image determination means for determining whether the input image is an underwater image, and only when the input image is determined to be an underwater image by the underwater image determination means, the maximum gradation correction value of the red component is set to the maximum of the dynamic range. The image processing apparatus according to claim 1, wherein the image processing apparatus approaches the value. 入力画像から色差信号を算出する色差信号算出手段と、色差信号の平均値を算出する色差平均値算出手段とを有し、色差信号の平均値により前記水中画像判断手段にて水中画像の判断を行うことを特徴とする請求項6記載の画像処理装置。 A color difference signal calculating means for calculating a color difference signal from the input image; and a color difference average value calculating means for calculating an average value of the color difference signals. The underwater image determination means determines the underwater image based on the average value of the color difference signals. The image processing apparatus according to claim 6, wherein the image processing apparatus performs the processing.
JP2004313587A 2004-10-28 2004-10-28 Image processing device Pending JP2006128986A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004313587A JP2006128986A (en) 2004-10-28 2004-10-28 Image processing device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004313587A JP2006128986A (en) 2004-10-28 2004-10-28 Image processing device

Publications (1)

Publication Number Publication Date
JP2006128986A true JP2006128986A (en) 2006-05-18

Family

ID=36723206

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004313587A Pending JP2006128986A (en) 2004-10-28 2004-10-28 Image processing device

Country Status (1)

Country Link
JP (1) JP2006128986A (en)

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008156050A1 (en) * 2007-06-21 2008-12-24 Nikon Corporation Image processing method, image processing program, image processing device, image processing system, electronic camera and electronic apparatus
WO2009093386A1 (en) * 2008-01-21 2009-07-30 Olympus Corporation Image processing apparatus, image processing program, computer readable storage medium having image processing program stored therein, and image processing method
JP2009272865A (en) * 2008-05-07 2009-11-19 Nippon Telegr & Teleph Corp <Ntt> Video converter, video conversion method, and video conversion program
WO2014064916A1 (en) 2012-10-25 2014-05-01 三菱電機株式会社 Image processing device and image processing method
WO2014119060A1 (en) 2013-01-31 2014-08-07 三菱電機株式会社 Image processing device, image processing method, program, and recording medium
JP2016224983A (en) * 2013-01-25 2016-12-28 ドルビー ラボラトリーズ ライセンシング コーポレイション Global display management based light modulation
CN108109135A (en) * 2017-12-06 2018-06-01 贵阳朗玛信息技术股份有限公司 A kind of method and device for obtaining image gray levels distribution
JP2020009136A (en) * 2018-07-06 2020-01-16 キヤノン株式会社 Image processing system, control method, and program
CN111462001A (en) * 2020-03-18 2020-07-28 宁波江丰生物信息技术有限公司 Flat field correction method for fluorescence slice scanner
CN117853488A (en) * 2024-03-07 2024-04-09 咸阳黄河轮胎橡胶有限公司 Tire wear degree detection method

Cited By (19)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8964070B2 (en) 2007-06-21 2015-02-24 Nikon Corporation Image processing method, image processing program, image processing device, image processing system, electronic camera and electronic apparatus
JPWO2008156050A1 (en) * 2007-06-21 2010-08-26 株式会社ニコン Image processing method, image processing program, image processing apparatus, image processing system, electronic camera, and electronic apparatus
WO2008156050A1 (en) * 2007-06-21 2008-12-24 Nikon Corporation Image processing method, image processing program, image processing device, image processing system, electronic camera and electronic apparatus
WO2009093386A1 (en) * 2008-01-21 2009-07-30 Olympus Corporation Image processing apparatus, image processing program, computer readable storage medium having image processing program stored therein, and image processing method
JP2009272865A (en) * 2008-05-07 2009-11-19 Nippon Telegr & Teleph Corp <Ntt> Video converter, video conversion method, and video conversion program
US9619873B2 (en) 2012-10-25 2017-04-11 Mitsubishi Electric Corporation Image processing device and image processing method
WO2014064916A1 (en) 2012-10-25 2014-05-01 三菱電機株式会社 Image processing device and image processing method
JP5889431B2 (en) * 2012-10-25 2016-03-22 三菱電機株式会社 Image processing apparatus and image processing method
JP2016224983A (en) * 2013-01-25 2016-12-28 ドルビー ラボラトリーズ ライセンシング コーポレイション Global display management based light modulation
JP5847341B2 (en) * 2013-01-31 2016-01-20 三菱電機株式会社 Image processing apparatus, image processing method, program, and recording medium
US20150339808A1 (en) * 2013-01-31 2015-11-26 Mitsubishi Electric Corporation Image processing apparatus, image processing method, program, and recording medium
US9449375B2 (en) 2013-01-31 2016-09-20 Mitsubishi Electric Corporation Image processing apparatus, image processing method, program, and recording medium
WO2014119060A1 (en) 2013-01-31 2014-08-07 三菱電機株式会社 Image processing device, image processing method, program, and recording medium
CN108109135A (en) * 2017-12-06 2018-06-01 贵阳朗玛信息技术股份有限公司 A kind of method and device for obtaining image gray levels distribution
JP2020009136A (en) * 2018-07-06 2020-01-16 キヤノン株式会社 Image processing system, control method, and program
JP7280670B2 (en) 2018-07-06 2023-05-24 キヤノン株式会社 Image processing device, control method, and program
CN111462001A (en) * 2020-03-18 2020-07-28 宁波江丰生物信息技术有限公司 Flat field correction method for fluorescence slice scanner
CN111462001B (en) * 2020-03-18 2023-06-09 宁波江丰生物信息技术有限公司 Flat field correction method for fluorescence slice scanner
CN117853488A (en) * 2024-03-07 2024-04-09 咸阳黄河轮胎橡胶有限公司 Tire wear degree detection method

Similar Documents

Publication Publication Date Title
JP4277773B2 (en) Video display device
US8942475B2 (en) Image signal processing device to emphasize contrast
US8111915B2 (en) Apparatus and method of enhancing color of image
US7751644B2 (en) Generation of image quality adjustment information and image quality adjustment with image quality adjustment information
US7646393B2 (en) Apparatus and method for adjusting primary color component of image, and computer-readable recording media for storing computer program
US20080240605A1 (en) Image Processing Apparatus, Image Processing Method, and Image Processing Program
JP4648071B2 (en) Video display device and video signal color saturation control method
KR101090060B1 (en) Image forming apparatus and image forming method capable of correcting gray images
JP4393491B2 (en) Image processing apparatus and control method thereof
JP2006128986A (en) Image processing device
JP4575963B2 (en) Image processing device
JP2004328564A (en) Color correcting apparatus, color correcting method, color correcting program, and digital camera using color correcting apparatus
CN100401786C (en) Apparatus and method for reproducing skin color in video signal
US7426300B2 (en) Image processing apparatus, image processing method, program and image forming apparatus, for performing density adjustment on an image based on a highlight part and a shadow part of a histogram of the image
JP4626534B2 (en) Image processing apparatus and method, program, and recording medium
US20100328343A1 (en) Image signal processing device and image signal processing program
JPH06215128A (en) Picture processor
JP4455554B2 (en) Image processing apparatus and image processing method
JP4831173B2 (en) Video display device
JP4513961B2 (en) Color adjustment method and color adjustment apparatus
JP2000206756A (en) Image processor
JPH0580193B2 (en)
JPH10126619A (en) Gamma correction device
JP4470587B2 (en) Image display device
JP4228804B2 (en) Image processing apparatus, image forming apparatus, image processing method, program thereof, and recording medium recording the program