JP4292219B2 - Image processing apparatus and image processing program - Google Patents
Image processing apparatus and image processing program Download PDFInfo
- Publication number
- JP4292219B2 JP4292219B2 JP2007105259A JP2007105259A JP4292219B2 JP 4292219 B2 JP4292219 B2 JP 4292219B2 JP 2007105259 A JP2007105259 A JP 2007105259A JP 2007105259 A JP2007105259 A JP 2007105259A JP 4292219 B2 JP4292219 B2 JP 4292219B2
- Authority
- JP
- Japan
- Prior art keywords
- luminance
- value
- gradation
- sum
- histogram
- 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.)
- Active
Links
Images
Landscapes
- Image Processing (AREA)
- Facsimile Image Signal Circuits (AREA)
Description
本発明は、カメラで撮影した画像を入力画像として扱う、線形変換による輝度伸張処理機能をもつ画像処理装置および画像処理プログラムに関する。 The present invention relates to an image processing apparatus and an image processing program having a luminance expansion function function based on linear conversion, in which an image captured by a camera is handled as an input image.
カメラ映像において、照明がない場合など照度が不足している状況において、画面が真っ黒になる場合がある。また逆に西日など強い光が差し込んだ場合など、画面が真っ白になる場合がある。このように局所的な階調に輝度が集まり、画面全体のコントラストがなくなり、監視や画像処理に不向きとなる映像となる場合がある。 In a camera image, when the illumination is insufficient, such as when there is no illumination, the screen may be black. On the other hand, the screen may be completely white, such as when a strong light such as a western sun is inserted. In this way, luminance is concentrated in local gradations, the contrast of the entire screen is lost, and there is a case where the video becomes unsuitable for monitoring or image processing.
一般的には、モノクロの入力画像に対して、暗い輝度が多いと判断した場合には、低階調部分に多くの階調を割り当て、逆に白い部分が多いと判断した場合には、高階調部分に多くの階調を割り当てる。この種の階調変換技術として、従来では、例えば下記特許文献1に示されるような「線形変換」を利用した画像処理装置が存在した。
Generally, when it is determined that there is a lot of dark luminance for a monochrome input image, many gradations are assigned to the low gradation part, and conversely, when it is determined that there are many white parts, Allocate many gradations to the key part. Conventionally, as this type of gradation conversion technique, there has been an image processing apparatus using “linear conversion” as disclosed in, for example,
この種、従来の「線形変換」においては、入力画像の階調の最大値と最小値をもとに伸張するため、局所的な階調部分に全ての輝度が集まっている場合は有効であるが、局所的な階調部分に多くの輝度が集中しているものの階調の全範囲に亘って分散している場合、輝度伸張が実施されないという問題があった。
上述したように、従来の「線形変換」による輝度伸張処理においては、局所的な階調部分に多くの輝度が集中しているものの階調の全範囲に亘って分散している場合、輝度伸張が実施されないという問題があった。 As described above, in the conventional luminance expansion processing by “linear conversion”, when a large amount of luminance is concentrated in a local gradation portion, but is distributed over the entire gradation range, luminance expansion is performed. There was a problem that was not implemented.
本発明は上記実情に鑑みなされたもので、「線形変換」による輝度伸張処理において、入力画像の輝度分布の偏りに関係なく常に適正な階調による輝度伸張処理を実施できる画像処理装置および画像処理プログラムを提供することを目的とする。 The present invention has been made in view of the above circumstances, and an image processing apparatus and an image processing that can always perform luminance expansion processing with an appropriate gradation regardless of bias of luminance distribution of an input image in luminance expansion processing by “linear conversion” The purpose is to provide a program.
本発明は、線形変換により輝度伸張処理を行う画像処理装置であって、線形変換により輝度伸張処理を行う画像処理装置であって、前記輝度伸張処理の対象となる入力画像の注目エリアにおける平均輝度を算出する平均輝度算出手段と、前記入力画像の前記注目エリアにおける階調のヒストグラムを作成するヒストグラム作成手段と、前記ヒストグラム作成手段が作成した前記ヒストグラムを低階調部分と高階調部分と中間階調部分とに分け、前記低階調部分の輝度値の和と前記高階調部分の輝度値の和を算出するとともに、算出した前記低階調部分の輝度値の和と前記高階調部分の輝度値の和を比較し、輝度値の和が大きい方を輝度伸張する階調部分と判定する輝度伸張判定手段と、前記輝度伸張判定手段によって前記低階調部分の輝度値の和が前記高階調部分の輝度値の和より大きいと判定したとき、前記ヒストグラムの最大階調値側から最小階調値側に向けて各階調値を単位に順次輝度値の和を算出し、当該輝度値の和が前記平均輝度値に達した階調値を前記ヒストグラムの輝度伸張最大階調値とし、この輝度伸張最大階調値から最小階調値までを第1輝度伸張範囲として算出する前記第1の伸張範囲算出手段と、前記輝度伸張判定手段によって前記高階調部分の輝度値の和が前記低階調部分の輝度値の和より大きいと判定したとき、前記ヒストグラムの最小階調値側から最大階調値側に向けて各階調値を単位に順次輝度値の和を算出し、当該輝度値の和が前記平均輝度値に達した階調値を前記ヒストグラムの輝度伸張最小階調値とし、この輝度伸張最小階調値から最大階調値までを第2輝度伸張範囲として算出する第2の伸張範囲算出手段と、前記第1の伸張範囲算出手段が算出した前記第1輝度伸張範囲、若しくは前記第2の伸張範囲算出手段が算出した前記第2輝度伸張範囲において線形変換を実施し、入力輝度に対する輝度伸張画像を作成する輝度伸張画像作成手段と、を具備したことを特徴とする。 The present invention is an image processing apparatus that performs luminance expansion processing by linear conversion, and that performs luminance expansion processing by linear conversion, and is an average luminance in an attention area of an input image to be subjected to the luminance expansion processing and average luminance calculating means for calculating said histogram creating means for creating a histogram of the gradation in the area of interest of the input image, the histogram said histogram producing means low gradation portions and high gray portion and the intermediate floor divided into a tone part, the calculates the sum of the luminance values of the sum and the high gradation part of the luminance value in the low gradation part, the luminance of the sum and the high gradation part of the luminance value of the calculated the low gradation portion comparing the sum of the values, the gradation portion and determines luminance expansion determination means for luminance stretching towards sum of luminance values is large, the luminance decompression judging means thus luminance value of the low gradation portion When the sum is determined as the sum is greater than the luminance value of the high gradation part, sequentially calculates the sum of the luminance values of each gradation value in the unit toward the minimum tone value side from the maximum tone value side of the histogram , calculated grayscale value sum of the luminance value reaches said average luminance value and the luminance stretch maximum gradation value of the histogram, as a first luminance expansion range to the minimum tone value from the luminance decompression maximum tone value said first extension range calculation means for, when the sum of the luminance values of Thus the high gradation part on the luminance decompression judging means determines that the sum is greater than the luminance value of the low gradation part, the minimum floor of the histogram successively calculating the sum of brightness values of each gradation value in the unit toward the maximum tone value side from the tone value side, the luminance stretch of said tone value sum reaches said average luminance value of the luminance value histogram the minimum tone value, the maximum gradation from the luminance decompression minimum tone value A second decompression range calculation means for calculating the up as the second luminance expansion range, the first expansion range calculation means and the first luminance expansion ranges calculated, or the second decompression range calculation means has calculated the the linear transformation performed in the second luminance expansion range, is characterized by comprising a luminance expanded image generating means for generating luminance expanded image, the against the input luminance.
また、本発明は、線形変換により輝度伸張処理を行う画像処理プログラムであって、線形変換により輝度伸張処理を行う画像処理装置に、前記輝度伸張処理の対象となる入力画像の注目エリアにおける平均輝度を算出する平均輝度算出機能と、前記入力画像の前記注目エリアにおける階調のヒストグラムを作成するヒストグラム作成機能と、前記ヒストグラム作成機能により作成された前記ヒストグラムを低階調部分と高階調部分と中間階調部分とに分け、前記低階調部分の輝度値の和と前記高階調部分の輝度値の和を算出するとともに、前記低階調部分の輝度値の和と前記高階調部分の輝度値の和を比較し、輝度値の和が大きい方を輝度伸張する階調部分と判定する輝度伸張判定機能と、前記輝度伸張判定機能によって前記低階調部分の輝度値の和が前記高階調部分の輝度値の和より大きいと判定したとき、前記ヒストグラムの最大階調値側から最小階調値側に向けて各階調値を単位に順次輝度値の和を算出し、当該輝度値の和が前記平均輝度値に達した階調値を前記ヒストグラムの輝度伸張最大階調値とし、この輝度伸張最大階調値から前記最小階調値までを第1輝度伸張範囲として算出する第1の伸張範囲算出機能と、前記輝度伸張判定機能によって前記高階調部分の輝度値の和が前記低階調部分の輝度値の和より大きいと判定したとき、前記ヒストグラムの最小階調値側から最大階調値側に向けて各階調値を単位に順次輝度値の和を算出し、当該輝度値の和が前記平均輝度値に達した階調値を前記ヒストグラム輝度伸張最小階調値とし、この輝度伸張最小階調値から前記最大階調値までを第2輝度伸張範囲として算出する第2の伸張範囲算出機能と、前記第1の伸張範囲算出機能が算出した前記第1輝度伸張範囲、若しくは前記第2の伸張範囲算出機能が算出した前記第2輝度伸張範囲において線形変換を実施し、入力輝度に対する輝度伸張画像を作成する輝度伸張画像作成機能と、を実現させることを特徴とする。 Further, the present invention is an image processing program for performing luminance expansion processing by linear conversion, and an image processing apparatus for performing luminance expansion processing by linear conversion has an average luminance in an attention area of an input image to be subjected to the luminance expansion processing. an average luminance calculation function for calculating a histogram creation function to create a histogram of the gradation in the area of interest of the input image, the low gradation portion of the histogram created by the histogram creation function and high gray portion and the intermediate divided into a gradation portion, said calculates the sum of the luminance values of the sum and the high gradation part of the luminance value in the low gradation part, the luminance value of the sum and the high gradation part of the luminance values of the low gradation portion bright sum compares the luminance decompression judging function judges that the gradation portion of the luminance stretch towards sum of luminance values is large, the low gradation portion I by the luminance decompression judging function When the sum of the values is determined as the sum is greater than the luminance value of the high gradation part, the sum of the sequential luminance values of each gradation value in the unit toward the minimum tone value side from the maximum tone value side of the histogram calculated, the tone value sum of the luminance value reaches said average luminance value and the luminance stretch maximum gradation value of the histogram, the minimum tone value to a first luminance extending from the luminance decompression maximum tone value first and decompression range calculation function for calculating a range, when the sum of the luminance values of the high gradation part I by the luminance decompression determining function determines that the sum is greater than the luminance value of the low gradation part, the successively calculating the sum of brightness values of each gradation value toward the maximum tone value side from the minimum tone value side of the histogram in units, the tone values of the sum of the luminance value reaches the average luminance value a histogram luminance stretching minimum tone value, from said luminance decompression minimum tone value most A second decompression range calculation function for calculating the up gradation value as the second luminance expansion range, the first stretch the first luminance decompression range range calculation function is calculated, or the second decompression range calculation function in the calculated second luminance decompression range by performing a linear transformation, characterized in that to realize a luminance expanded image creation function to create a luminance expanded image, the against the input luminance.
本発明によれば、「線形変換」による輝度伸張処理において、入力画像の輝度分布の偏りに関係なく常に適正な階調による輝度伸張処理を実施でき、局所的な階調部分に多くの輝度が集中しているものの階調の全範囲に亘って分散している場合においても適正階調による輝度伸張処理を実施できる。 According to the present invention, in the luminance expansion processing by “linear transformation”, the luminance expansion processing can always be performed with an appropriate gradation regardless of the deviation of the luminance distribution of the input image, and a large amount of luminance can be obtained in the local gradation portion. Even when the concentration is concentrated, the luminance expansion processing with an appropriate gradation can be performed even when the gradation is dispersed over the entire range.
以下図面を参照して本発明の実施形態を説明する。
本発明の実施形態に係る画像処理装置の要部の構成要素を図1に示す。図1に示す輝度伸張処理部1は、単眼カメラで撮影した画像を入力画像として、当該入力画像について「線形変換」により輝度伸張処理を施し、上記入力画像を当該入力画像の輝度値の分布状態から最適な階調に変換する。ここでは、QVGA(320画素×240画素)の0〜255階調の画像を対象に、注目エリアの平均輝度と全階調の中心輝度とをもとに入力画像を輝度伸張処理する。
Embodiments of the present invention will be described below with reference to the drawings.
The components of the main part of the image processing apparatus according to the embodiment of the present invention are shown in FIG. The luminance
この輝度伸張処理部1における輝度伸張処理では、輝度伸張処理の対象となる入力画像に対して予め設定した注目エリアの画像の平均輝度を求めるとともに、上記入力画像の注目エリアにおける階調のヒストグラム(輝度値ヒストグラム)を作成し、階調を3分割したときの低階調部分の輝度値の和と高階調部分の輝度値の和とをそれぞれ求めて、低階調部分と高階調部分の輝度値の和を比較し、輝度値の和が大きい(輝度分布量の多い)階調側を輝度伸張する階調側と判定する。そして輝度分布量の多い階調側を輝度伸張するために、輝度分布量の少ない階調側より輝度分布量の多い階調側に向かって、順に輝度値の和を算出して行き、その輝度値の和が、上記平均輝度に達した階調を求める。ここで求めた階調値と輝度分布量の多い階調側の階調範囲とに跨る全階調範囲を輝度伸張の対象範囲として、当該階調範囲に「線形変換」を実施する。
In the luminance expansion processing in the luminance
このように、輝度伸張処理部1は、線形変換での輝度伸張範囲の算出において、輝度伸張の方法自体は線形変換を参考にしているが、伸張する範囲を輝度値の頻度分布をもとに、階調の和を利用して算出している。このような輝度伸張処理部1における、線形変換での輝度伸張処理により、局所的な階調部分に多くの輝度が集中しているものの階調の全範囲に亘って分散している場合においても適正階調による輝度伸張画像を取得できる。また、注目エリアの指定および線形変換による輝度伸張について、注目すべき(輝度伸張対象とすべき)画面上の領域を設定することで、その領域に適した線形変換での最適な輝度伸張画像が取得できる。
As described above, the luminance
図1に示す輝度伸張処理部1の輝度伸張処理動作について、図2および図3に示す動作説明図と、図4乃至図7に示す階調のヒストグラム(輝度値ヒストグラム)を参照して説明する。
The luminance expansion processing operation of the luminance
輝度伸張処理部1は、カメラで撮影した画像を入力する度に以下の(1)〜(5)に示す処理を実行する。
The luminance
(1).単眼カメラで撮影した入力画像(320画素×240画素)2の注目エリア3において、階調(0〜255)のヒストグラム(輝度値ヒストグラム)を作成し、当該注目エリア3の平均輝度を求める。
(1). In the
(2).上記ヒストグラムにおいて、階調(0〜255)を、低階調部分(S1)と、高階調部分(S3)と、中間階調部分(S2)とに3分割し、低階調部分(S1)の輝度値の和と高階調部分(S3)の輝度値の和をそれぞれ求める。この際、入力画像(モノクロ画像)2において、低階調部分(S1)の最小階調値「0」を含む一部特定階調領域(例えば0〜4の階調領域)と、高階調部分(S3)の最大階調値「255」を含む一部特定階調領域(例えば251〜255の階調領域)に、局所的に階調が集まる場合があるため、ヒストグラム両端の上記各一部特定階調領域を上記輝度値の和を求める階調から除外する。 (2). In the histogram, the gradation (0 to 255) is divided into three parts, a low gradation part (S1), a high gradation part (S3), and an intermediate gradation part (S2). obtaining a luminance value of the sum and the sum of the luminance values of the high gradation part (S3), respectively. At this time, in the input image (monochrome image) 2, a partial specific gradation region (for example, a gradation region of 0 to 4) including the minimum gradation value “0” of the low gradation portion (S1) and a high gradation portion. Since the gradation may locally gather in a part specific gradation region (for example, the gradation region of 251 to 255 ) including the maximum gradation value “255” in (S3), each of the above-mentioned parts at both ends of the histogram. The specific gradation area is excluded from the gradation for which the sum of the luminance values is obtained.
(3).低階調部分(S1)の輝度値の和と高階調部分(S3)の輝度値の和を比較し、等しいときは線形変換処理を実施せず、輝度値の和の大きい(輝度分布量の多い)側の階調部分を伸張することとする。図3に示すように、低階調部分(S1)の輝度値の和と高階調部分(S3)の輝度値の和が等しいとき(S1=S3)は線形変換処理を実施せず、低階調部分(S1)の輝度値の和が高階調部分(S3)の輝度値の和より大きいとき(S1>S3)は、線形変換処理範囲の最大階調値(Max=(c))を求める処理を実施し、低階調部分(S1)の輝度値の和が高階調部分(S3)の輝度値の和より小さいとき(S1<S3)は、線形変換処理範囲の最小階調値(Min=(b))を求める処理を実施する。 (3). Comparing the sum of the luminance values of the sum and high gradation part of the luminance value of low gradation portion (S1) (S3), without performing a linear conversion process when equal, the sum of luminance values larger (luminance distribution amount The gradation portion on the (most) side is expanded. As shown in FIG. 3, when the sum of the luminance values of the sum and high gradation part of the luminance value of low gradation portion (S1) (S3) is equal to (S1 = S3) is not performing a linear conversion process, Teikai When the sum of the luminance values of the key portion (S1) is larger than the sum of the luminance values of the high gradation portion (S3) (S1> S3), the maximum gradation value (Max = (c)) of the linear conversion processing range is obtained. When the processing is performed and the sum of the luminance values of the low gradation portion (S1) is smaller than the sum of the luminance values of the high gradation portion (S3) (S1 <S3), the minimum gradation value (Min) of the linear conversion processing range = (B)) is performed.
(4).上記(3)の比較において、低階調部分(S1)の輝度値の和が高階調部分(S3)の輝度値の和より大きい場合、すなわち高階調部分(S3)の輝度分布量に比し低階調部分(S1)の輝度分布量が多い場合、高階調部分(S3)の最大階調値側から低階調部分(S1)の最小階調値側に向かって、各階調値を単位に、順に、輝度値の和を算出する。この際、上記特定階調領域(251〜255)に局所的に階調が集まる場合があるため、階調値「250」からの和を算出する。この輝度値の和が上記平均輝度となる階調値を、伸張範囲の最大階調値(Max)として求める。この場合の伸張範囲の最小階調値(Min)はヒストグラムの最小値(階調値0)である(図3に示す、S1>S3参照)。この際の高階調部分(S3)の輝度分布量に比し低階調部分(S1)の輝度分布量が多い場合のヒストグラム例を図4に示し、伸張範囲の最大階調値(Max)を求めるための輝度値の和の算出方向、並びに輝度値の和が平均輝度値に達した階調値(Pu)を図5に示している。 (4). In the comparison of (3) above, when the sum of the luminance values of the low gradation portion (S1) is larger than the sum of the luminance values of the high gradation portion (S3), that is, compared to the luminance distribution amount of the high gradation portion (S3). when the luminance distribution of the low gradation part (S1) is larger, toward the maximum tone value side of the high gradation part (S3) to the minimum tone value side of the low gradation part (S1), each gradation value The sum of luminance values is calculated in order for each unit. At this time, since the gradation may be locally collected in the specific gradation region (251 to 255), the sum from the gradation value “ 250 ” is calculated. The gradation value at which the sum of the luminance values becomes the average luminance is obtained as the maximum gradation value (Max) of the expansion range. In this case, the minimum gradation value (Min) of the expansion range is the minimum value (gradation value 0) of the histogram (see S1> S3 shown in FIG. 3). FIG. 4 shows a histogram example when the luminance distribution amount of the low gradation portion (S1) is larger than the luminance distribution amount of the high gradation portion (S3) at this time, and shows the maximum gradation value (Max) of the expansion range. calculating the direction of the sum of the brightness values for determining and shows gradation value sum of luminance values reached an average luminance value (Pu) in FIG.
(5).上記(3)の比較において、高階調部分(S3)の輝度値の和が低階調部分(S1)の輝度値の和より大きい場合、すなわち低階調部分(S1)の輝度分布量に比し高階調部分(S3)の輝度分布量が多い場合、低階調部分(S1)の最小階調値側から高階調部分(S3)の最大階調値側に向かって、各階調値を単位に、順に、輝度値の和を算出する。この際、上記特定階調領域(0〜4)に局所的に階調が集まる場合があるため、階調値「5」からの和を算出する。この輝度値の和が上記平均輝度となる階調値を、伸張範囲の最小階調値(Min)として求める。この場合の伸張範囲の最大階調値(Max)はヒストグラムの最大値(階調値255)である(図3に示す、S1<S3参照)。この際の低階調部分(S3)の輝度分布量に比し高階調部分(S1)の輝度分布量が多い場合のヒストグラム例を図6に示し、伸張範囲の最小階調値(Min)を求めるための輝度値の和の算出方向、並びに輝度値の和が平均輝度値に達した階調値(Pu)を図7に示している。 (5). In the comparison of (3) above, when the sum of the luminance values of the high gradation portion (S3) is larger than the sum of the luminance values of the low gradation portion (S1), that is, compared with the luminance distribution amount of the low gradation portion (S1). If you brightness distribution of high gradation portions (S3) it is larger, toward the minimum tone value side of the low gradation part (S1) to the maximum tone value side of the high gradation part (S3), each gradation value The sum of luminance values is calculated in order for each unit. At this time, since the gradation may locally gather in the specific gradation area (0 to 4), the sum from the gradation value “ 5 ” is calculated. The gradation value at which the sum of the luminance values becomes the average luminance is obtained as the minimum gradation value (Min) of the expansion range. In this case, the maximum gradation value (Max) of the expansion range is the maximum value (gradation value 255) of the histogram (see S1 <S3 shown in FIG. 3). FIG. 6 shows a histogram example when the luminance distribution amount of the high gradation portion (S1) is larger than the luminance distribution amount of the low gradation portion (S3) at this time, and the minimum gradation value (Min) of the expansion range is shown. calculating the direction of the sum of the brightness values for determining and shows gradation value sum of luminance values reached an average luminance value (Pu) in FIG.
(6).上記(4)または(5)の処理によって求めた範囲において、入力画像に対して線形変換を実施し、入力輝度に対する変換後の輝度にした輝度伸張画像を作成する。 (6). In the range obtained by the process (4) or (5), linear conversion is performed on the input image, and a luminance expanded image having the converted luminance with respect to the input luminance is created.
このように、輝度伸張処理部1は、入力画像の輝度値の頻度分布をもとに、線形変換の範囲を算出し、入力輝度に対する変換後の輝度にした輝度伸張画像を作成する。
As described above, the luminance
上記実施形態をより具現化した一例を図8乃至図10に示している。図8は本発明の実施形態に係る画像処理装置の構成を示すブロック図、図9は同実施形態に係る前置画像処理部に設けられた輝度伸張処理部の構成を示すブロック図、図10は上記輝度伸張処理部の処理手順を示すフローチャートである。なお、ここでは、画像処理装置の前置画像処理部に、本発明の要旨とするところの輝度伸張処理機能部を設けた構成を例示するが、上記輝度伸張処理機能部は図8に示す構成の画像処理装置に限らず、例えば、単にカメラ映像に対して輝度伸張処理を施す画像処理装置等、種々の画像処理装置に適用可能である。 An example that further embodies the above embodiment is shown in FIGS. FIG. 8 is a block diagram showing the configuration of the image processing apparatus according to the embodiment of the present invention, FIG. 9 is a block diagram showing the configuration of the luminance expansion processing unit provided in the front image processing unit according to the embodiment, and FIG. These are the flowcharts which show the process sequence of the said brightness | luminance expansion process part. Here, the configuration in which the luminance expansion processing function unit as the gist of the present invention is provided in the front image processing unit of the image processing apparatus is illustrated, but the luminance expansion processing function unit is configured as shown in FIG. For example, the present invention can be applied to various image processing apparatuses such as an image processing apparatus that simply performs luminance expansion processing on camera video.
本発明の実施形態に係る画像処理装置は、図8に示すように、カメラ(単眼カメラ)11と、キャプチャ部12と、前置画像処理部13と、画像処理部14と、表示部15とを具備して構成される。
As shown in FIG. 8, the image processing apparatus according to the embodiment of the present invention includes a camera (monocular camera) 11, a
カメラ11は、レンズユニットとレンズユニットの結像位置に設けられた撮像素子(例えばCCD固体撮像素子、若しくはCMOSイメージセンサ)とを具備して、屋外若しくは屋内の動きを伴う被写体(動物体)を対象に、撮像した一画面分の画像を所定の画素単位(例えば1フレーム320×240画素=QVGA)で出力する。 The camera 11 includes a lens unit and an image pickup device (for example, a CCD solid-state image pickup device or a CMOS image sensor) provided at an image forming position of the lens unit, so that a subject (animal body) that moves outdoors or indoors can be used. A captured image for one screen is output to a target in a predetermined pixel unit (for example, one frame 320 × 240 pixels = QVGA).
キャプチャ部12は、カメラ11が撮像したフレーム単位の画像を取り込み、前置画像処理部13内の画像バッファ21に保持する処理機能をもつ。
The
前置画像処理部13は、キャプチャ部12がカメラ11から取り込んだフレーム単位の画像を輝度伸張処理の対象となる入力画像として保持する画像バッファ21と、上述した図1乃至図3に示す機能構成の輝度伸張処理部1と同様の処理機能をもつ輝度伸張処理部22とを具備して構成される。この前置画像処理部13に設けられた輝度伸張処理部22の内部構成要素については図9を参照して後述する。
The
画像処理部14は、前置画像処理部13の画像バッファ21に保持された輝度伸張処理(線形変換)後の画像を取り込み、例えば時間差をもつ画像の差分二値化処理、ノイズ除去、変化画素を含む矩形領域の抽出および変化画素領域の追跡処理等の一連の画像処理を行う。表示部15は上記画像処理部14で処理した、例えば動物体領域の画像を表示出力する。
The
上記図8に示す前置画像処理部13に設けられた輝度伸張処理部22の構成要素を図9に示す。図9に示す輝度伸張処理部22は、ヒストグラム作成処理部221と、輝度伸張実施判定処理部222と、輝度範囲算出処理部223と、輝度伸張画像作成処理部224とを有する。
FIG. 9 shows components of the luminance
ヒストグラム作成処理部221は、画像バッファ21に保持された、輝度伸張処理の対象となる入力画像から、予め設定された注目エリアの画像を取得し、注目エリアにおける階調のヒストグラムを作成するとともに、注目エリアにおける平均輝度を算出する。
The histogram
輝度伸張実施判定処理部222は、ヒストグラム作成処理部221が作成したヒストグラムを、上記図2乃至図7に示すように、低階調部分(S1)と高階調部分(S3)と中間階調部分(S2)とに3分割し、低階調部分(S1)の輝度値の和と、高階調部分(S3)の輝度値の和をそれぞれ算出して、低階調部分(S1)の輝度値の和(輝度分布量)と、高階調部分(S3)の輝度値の和(輝度分布量)を比較し、その輝度値の頻度分布の大小により、輝度伸張する側の階調部分を判定する。
The luminance expansion execution
輝度範囲算出処理部223は、輝度伸張実施判定処理部222による比較の結果、低階調部分(S1)の輝度値の和が高階調部分(S3)の輝度値の和より大きいとき、高階調部分(S3)の最大階調値側から低階調部分(S1)の最小階調値側に向けて各階調値を単位に順次輝度値の和を算出し、当該輝度値の和が上記平均輝度値に達した階調値を上記ヒストグラムにおける輝度伸張範囲の最大階調値(Max)として算出する。また、輝度伸張実施判定処理部222による比較の結果、高階調部分(S3)の輝度値の和が低階調部分(S1)の輝度値の和より大きいとき、低階調部分(S1)の最小階調値側から高階調部分(S3)の最大階調値側に向けて各階調値を単位に順次輝度値の和を算出し、当該輝度値の和が上記平均輝度値に達した階調値を上記ヒストグラムにおける輝度伸張範囲の最小階調値(Min)として算出する。
As a result of the comparison by the luminance expansion execution
輝度伸張画像作成処理部224は、輝度範囲算出処理部223が算出した輝度伸張範囲において線形変換を実施し、入力輝度に対する変換後の輝度にした輝度伸張画像を作成する。
The luminance extension image
上記した輝度伸張処理部22の処理手順を図10に示している。
FIG. 10 shows a processing procedure of the luminance
輝度伸張処理部22は、カメラ11が撮像したフレーム単位の入力画像がキャプチャ部12を介して画像バッファ21に保持される毎に図10に示す処理を実行する。
The luminance
画像バッファ21に輝度伸張(線形変換)処理の対象となる入力画像が保持されると、ヒストグラム作成処理部221は、上記入力画像から、予め設定された注目エリアの対象画像を取得し、注目エリアにおける階調のヒストグラムを作成するとともに、注目エリアにおける平均輝度を算出する(ステップS11)。
When an input image to be subjected to luminance expansion (linear conversion) processing is held in the
ヒストグラム作成処理部221により注目エリアの対象画像についてヒストグラムが作成され、当該画像の平均輝度が算出されると、輝度伸張実施判定処理部222は、ヒストグラム作成処理部221が作成したヒストグラムを、上記図2乃至図7に示すように、低階調部分(S1)と高階調部分(S3)と中間階調部分(S2)とに3分割し、低階調部分(S1)の輝度値の和と、高階調部分(S3)の輝度値の和をそれぞれ算出する(ステップS12)。そして、低階調部分(S1)の輝度値の和(輝度分布量)と、高階調部分(S3)の輝度値の和(輝度分布量)を比較し(ステップS13)、その輝度値の頻度分布の大小により、輝度伸張する側の階調部分を判定する。
When a histogram is created for the target image in the area of interest by the histogram
ここで、低階調部分(S1)の輝度値の和と高階調部分(S3)の輝度値の和が等しいとき(S1=S3)は、線形変換処理を実施せず、処理を終了する(ステップS13 No)。 Here, when the sum of the luminance values of the sum and high gradation part of the luminance value of low gradation portion (S1) (S3) is equal to (S1 = S3) is not performing a linear conversion process, and ends the process ( Step S13 No).
また、低階調部分(S1)の輝度値の和が高階調部分(S3)の輝度値の和より大きいとき(S1>S3)は(ステップS14 Yes)、線形変換処理範囲(輝度伸張範囲)の最大値(Max=(c))を求める処理を実施する(ステップS15)。 When the sum of the luminance values of the low gradation portion (S1) is larger than the sum of the luminance values of the high gradation portion (S3) (S1> S3) (Yes in step S14), the linear conversion processing range (luminance expansion range) A process for obtaining the maximum value (Max = (c)) is performed (step S15).
また、低階調部分(S1)の輝度値の和が高階調部分(S3)の輝度値の和より小さいとき(S1<S3)は(ステップS14 No)、線形変換処理範囲の最小値(Min=(b))を求める処理を実施する(ステップS17)。 When the sum of the luminance values of the low gradation part (S1) is smaller than the sum of the luminance values of the high gradation part (S3) (S1 <S3) (No in step S14), the minimum value (Min) of the linear conversion processing range = (B)) is performed (step S17).
上記線形変換処理範囲の最大階調値(Max)を求めた際(ステップS15)は、ヒストグラムの最小値「0」を線形変換処理範囲の最小階調値(Min)とし(ステップS16)、この線形変換処理範囲について、輝度伸張画像作成処理部224が線形変換を実施し、入力輝度に対する変換後の輝度にした輝度伸張画像を作成する(ステップS19)。
When the maximum gradation value (Max) of the linear conversion processing range is obtained (step S15), the minimum value “0” of the histogram is set as the minimum gradation value (Min) of the linear conversion processing range (step S16). With respect to the linear conversion processing range, the luminance expanded image
また、上記線形変換処理範囲の最小階調値(Min)を求めた際(ステップS17)は、ヒストグラムの最大値「255」を線形変換処理範囲の最大階調値(Max)とし(ステップS18)、この線形変換処理範囲について、輝度伸張画像作成処理部224が線形変換を実施し、入力輝度に対する変換後の輝度にした輝度伸張画像を作成する(ステップS19)。
When the minimum gradation value (Min) of the linear conversion processing range is obtained (step S17), the maximum value “255” of the histogram is set as the maximum gradation value (Max) of the linear conversion processing range (step S18). In this linear conversion processing range, the luminance expanded image
このように、輝度伸張処理部22による、線形変換での輝度伸張処理により、局所的な階調部分に多くの輝度が集中しているものの階調値の全範囲に亘って分散している場合においても適正階調による輝度伸張画像を取得できる。また、注目エリアの指定および線形変換による輝度伸張について、注目すべき(輝度伸張対象とすべき)画面上の領域を設定することで、その領域に適した線形変換での最適な輝度伸張画像が取得できる。
As described above, when the luminance expansion processing by the linear expansion by the luminance
なお、上記した実施形態では、QVGA(320画素×240画素)の0〜255階調のカメラ映像を輝度伸張処理の対象となる入力画像としたが、これに限らず、例えばVGA等の画像を扱う画像処理装置に於いても本発明に係る輝度伸張処理機能部を適用することができる。また、上記実施形態において、輝度伸張処理(線形変換)機能を実現する輝度伸張処理部22の各構成要素について、その一部若しくはすべての要素機能をソフトウェア処理により実現可能である。
In the above-described embodiment, the camera image of 0 to 255 gradations of QVGA (320 pixels × 240 pixels) is used as the input image to be subjected to the luminance expansion processing. However, the present invention is not limited to this, and an image such as VGA is used. The luminance expansion processing function unit according to the present invention can also be applied to an image processing apparatus to be handled. In the above-described embodiment, part or all of the element functions of each component of the luminance
1…輝度伸張処理部、2…単眼カメラで撮影した画像(入力画像)、3…注目エリア、5…輝度伸張画像、11…カメラ、12…キャプチャ部、13…前置画像処理部、14…画像処理部、15…表示部、21…画像バッファ、22…輝度伸張処理部、221…ヒストグラム作成処理部、222…輝度伸張実施判定処理部、223…輝度範囲算出処理部、224…輝度伸張画像作成処理部。
DESCRIPTION OF
Claims (4)
前記輝度伸張処理の対象となる入力画像の注目エリアにおける平均輝度を算出する平均輝度算出手段と、
前記入力画像の前記注目エリアにおける階調のヒストグラムを作成するヒストグラム作成手段と、
前記ヒストグラム作成手段が作成した前記ヒストグラムを低階調部分と高階調部分と中間階調部分とに分け、前記低階調部分の輝度値の和と前記高階調部分の輝度値の和を算出するとともに、算出した前記低階調部分の輝度値の和と前記高階調部分の輝度値の和を比較し、輝度値の和が大きい方を輝度伸張する階調部分と判定する輝度伸張判定手段と、
前記輝度伸張判定手段によって前記低階調部分の輝度値の和が前記高階調部分の輝度値の和より大きいと判定したとき、前記ヒストグラムの最大階調値側から最小階調値側に向けて各階調値を単位に順次輝度値の和を算出し、当該輝度値の和が前記平均輝度値に達した階調値を前記ヒストグラムの輝度伸張最大階調値とし、この輝度伸張最大階調値から最小階調値までを第1輝度伸張範囲として算出する前記第1の伸張範囲算出手段と、
前記輝度伸張判定手段によって前記高階調部分の輝度値の和が前記低階調部分の輝度値の和より大きいと判定したとき、前記ヒストグラムの最小階調値側から最大階調値側に向けて各階調値を単位に順次輝度値の和を算出し、当該輝度値の和が前記平均輝度値に達した階調値を前記ヒストグラムの輝度伸張最小階調値とし、この輝度伸張最小階調値から最大階調値までを第2輝度伸張範囲として算出する第2の伸張範囲算出手段と、
前記第1の伸張範囲算出手段が算出した前記第1輝度伸張範囲、若しくは前記第2の伸張範囲算出手段が算出した前記第2輝度伸張範囲において線形変換を実施し、入力輝度に対する輝度伸張画像を作成する輝度伸張画像作成手段と、
を具備したことを特徴とする画像処理装置。 An image processing apparatus that performs luminance expansion processing by linear conversion,
Average luminance calculating means for calculating an average luminance in an attention area of the input image to be subjected to the luminance expansion processing;
A histogram creation means for creating a histogram of the gradation in the area of interest of the input image,
Dividing the histogram said histogram producing means into a low-gradation portion and high gray portion and a halftone portion, and calculates the sum of the luminance values of the sum and the high gradation part of the luminance values of the low gradation portion with the sum of the luminance value of the calculated the low gradation part to compare the sum of the luminance values of the high gradation part, the tone portion and determines luminance expansion determination means for luminance decompressing the larger sum of luminance values ,
When the sum of the luminance values of Thus the low gradation part on the luminance decompression judging means determines that the sum is greater than the luminance value of the high gradation part, towards the minimum tone value side from the maximum tone value side of the histogram successively calculating the sum of brightness values of each gradation value in units Te, the tone value sum reaches said average luminance value of the luminance value as the luminance stretch maximum gradation value of the histogram, the maximum gray luminance expansion The first extension range calculating means for calculating from the tone value to the minimum gradation value as the first luminance extension range ;
When the sum of the luminance values of Thus the high gradation part on the luminance decompression judging means determines that the sum is greater than the luminance value of the low gradation part, towards the maximum tone value side from the minimum tone value side of the histogram successively calculating the sum of brightness values of each gradation value in units Te, the gradation value sum of the luminance value reaches said average luminance value and the luminance stretch minimum tone value of the histogram, minimum floor luminance expansion Second expansion range calculation means for calculating from the tone value to the maximum gradation value as the second luminance expansion range ;
Said first extension range calculation means and the first luminance expansion ranges calculated, or a linear transformation performed in the second luminance expansion range in which the second decompression range calculation means has calculated, the luminance expanded image against the input luminance Brightness extension image creation means for creating
An image processing apparatus comprising:
前記輝度伸張処理の対象となる入力画像の注目エリアにおける平均輝度を算出する平均輝度算出機能と、
前記入力画像の前記注目エリアにおける階調のヒストグラムを作成するヒストグラム作成機能と、
前記ヒストグラム作成機能により作成された前記ヒストグラムを低階調部分と高階調部分と中間階調部分とに分け、前記低階調部分の輝度値の和と前記高階調部分の輝度値の和を算出するとともに、前記低階調部分の輝度値の和と前記高階調部分の輝度値の和を比較し、輝度値の和が大きい方を輝度伸張する階調部分と判定する輝度伸張判定機能と、
前記輝度伸張判定機能によって前記低階調部分の輝度値の和が前記高階調部分の輝度値の和より大きいと判定したとき、前記ヒストグラムの最大階調値側から最小階調値側に向けて各階調値を単位に順次輝度値の和を算出し、当該輝度値の和が前記平均輝度値に達した階調値を前記ヒストグラムの輝度伸張最大階調値とし、この輝度伸張最大階調値から前記最小階調値までを第1輝度伸張範囲として算出する第1の伸張範囲算出機能と、
前記輝度伸張判定機能によって前記高階調部分の輝度値の和が前記低階調部分の輝度値の和より大きいと判定したとき、前記ヒストグラムの最小階調値側から最大階調値側に向けて各階調値を単位に順次輝度値の和を算出し、当該輝度値の和が前記平均輝度値に達した階調値を前記ヒストグラム輝度伸張最小階調値とし、この輝度伸張最小階調値から前記最大階調値までを第2輝度伸張範囲として算出する第2の伸張範囲算出機能と、
前記第1の伸張範囲算出機能が算出した前記第1輝度伸張範囲、若しくは前記第2の伸張範囲算出機能が算出した前記第2輝度伸張範囲において線形変換を実施し、入力輝度に対する輝度伸張画像を作成する輝度伸張画像作成機能と、
を実現させるための画像処理プログラム。 In an image processing device that performs luminance expansion processing by linear conversion,
An average luminance calculation function for calculating an average luminance in an attention area of the input image to be subjected to the luminance expansion processing;
A histogram creation function to create a histogram of the gradation in the area of interest of the input image,
Dividing the histogram created by said histogram creating function in the low gradation part and high gradation part and a halftone portion, calculates the sum of the luminance values of the sum and the high gradation part of the luminance values of the low gradation portion as well as, with said low the sum of the luminance values of the gradation portion by comparing the sum of the luminance values of the high gradation part, sums determines luminance decompression judging function and gradation portion which luminance decompressing a larger luminance value,
When the sum of the luminance values of the low gradation part I by the luminance decompression determining function determines that the sum is greater than the luminance value of the high gradation part, the minimum tone value side from the maximum tone value side of the histogram successively calculating the sum of the luminance values, the tone values the sum of the luminance value reaches said average luminance value and the luminance stretch maximum gradation value of the histogram in units of each tone value towards, the luminance stretch A first extension range calculation function for calculating from the maximum gradation value to the minimum gradation value as a first luminance extension range ;
When the sum of the luminance values of the high gradation part I by the luminance decompression determining function determines that the sum is greater than the luminance value of the low gradation part, the maximum tone value side from the minimum tone value side of the histogram each tone value sequentially calculated the sum of luminance values in units of tone values the sum of the luminance value reaches said average luminance value and the histogram luminance stretching minimum tone value, the minimum luminance stretch towards A second expansion range calculation function for calculating from the gradation value to the maximum gradation value as a second luminance expansion range ;
The first stretch the first luminance decompression range range calculation function is calculated, or the second decompression range calculation function a linear transformation performed in the second luminance expansion ranges calculated, brightness expanded image against the input luminance Brightness expansion image creation function to create
An image processing program for realizing
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007105259A JP4292219B2 (en) | 2007-04-12 | 2007-04-12 | Image processing apparatus and image processing program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2007105259A JP4292219B2 (en) | 2007-04-12 | 2007-04-12 | Image processing apparatus and image processing program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2008263453A JP2008263453A (en) | 2008-10-30 |
| JP4292219B2 true JP4292219B2 (en) | 2009-07-08 |
Family
ID=39985608
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2007105259A Active JP4292219B2 (en) | 2007-04-12 | 2007-04-12 | Image processing apparatus and image processing program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP4292219B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP5472576B2 (en) * | 2009-03-09 | 2014-04-16 | セイコーエプソン株式会社 | Display device, program, and information storage medium |
-
2007
- 2007-04-12 JP JP2007105259A patent/JP4292219B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2008263453A (en) | 2008-10-30 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US10021313B1 (en) | Image adjustment techniques for multiple-frame images | |
| JP5901667B2 (en) | Image processing apparatus and method, image processing program, and imaging apparatus | |
| US20120019686A1 (en) | Image synthesizing device, image synthesizing method and computer readable medium | |
| US20120127336A1 (en) | Imaging apparatus, imaging method and computer program | |
| JP6352547B2 (en) | Image processing apparatus and image processing method | |
| JP2022036179A (en) | Image processing equipment and its control method and program | |
| JP2008512051A (en) | Apparatus and method for processing images | |
| CN106575434A (en) | Image processing device, image capturing device, image processing method, and program | |
| WO2010089836A1 (en) | Image processing device | |
| JP4340303B2 (en) | Image processing apparatus and image processing program | |
| JP2009200743A (en) | Image processor, image processing method, image processing program and imaging apparatus | |
| KR101442149B1 (en) | Expert knowledge-based image acquisition device and method | |
| US9013605B2 (en) | Apparatus and method for processing intensity of image in digital camera | |
| KR100624862B1 (en) | Image processing apparatus and method | |
| JP6543787B2 (en) | Image processing apparatus and image processing method | |
| JP4292219B2 (en) | Image processing apparatus and image processing program | |
| JP5537995B2 (en) | Image processing apparatus and image processing program | |
| JP5486963B2 (en) | Image processing apparatus and image processing program | |
| JP5038190B2 (en) | Image capturing apparatus and setting method thereof | |
| KR20050077116A (en) | Image processing device and method thereof | |
| JP2013062689A (en) | Imaging apparatus, control method thereof and program | |
| JP6826472B2 (en) | Image processing device and its control method | |
| JP2019215661A (en) | Image quality adjustment system and image quality adjustment method | |
| US9154716B2 (en) | Image processing apparatus and method for smoothing pixel values according to a divergence of pixel candidates | |
| JP2007336258A (en) | Video signal processing apparatus and video signal processing method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20081202 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090123 |
|
| 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: 20090310 |
|
| 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: 20090406 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 4292219 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120410 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120410 Year of fee payment: 3 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130410 Year of fee payment: 4 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130410 Year of fee payment: 4 |
|
| FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20140410 Year of fee payment: 5 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
| R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |