JP2008118209A - Image processing program and image processor - Google Patents
Image processing program and image processor Download PDFInfo
- Publication number
- JP2008118209A JP2008118209A JP2006297073A JP2006297073A JP2008118209A JP 2008118209 A JP2008118209 A JP 2008118209A JP 2006297073 A JP2006297073 A JP 2006297073A JP 2006297073 A JP2006297073 A JP 2006297073A JP 2008118209 A JP2008118209 A JP 2008118209A
- Authority
- JP
- Japan
- Prior art keywords
- image
- original image
- pixel
- reduced
- reduced image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
Links
- 238000012545 processing Methods 0.000 claims abstract description 104
- 238000002360 preparation method Methods 0.000 claims abstract description 44
- 238000004364 calculation method Methods 0.000 claims description 54
- 230000009467 reduction Effects 0.000 claims description 53
- 230000002093 peripheral effect Effects 0.000 claims description 52
- 238000010606 normalization Methods 0.000 claims description 48
- 238000012937 correction Methods 0.000 claims description 14
- 238000003702 image correction Methods 0.000 claims description 5
- 239000000284 extract Substances 0.000 claims description 4
- 238000009826 distribution Methods 0.000 abstract description 4
- 238000002310 reflectometry Methods 0.000 abstract description 4
- 238000000034 method Methods 0.000 description 116
- 230000008569 process Effects 0.000 description 60
- 230000000694 effects Effects 0.000 description 14
- 238000010586 diagram Methods 0.000 description 9
- 230000004048 modification Effects 0.000 description 6
- 238000012986 modification Methods 0.000 description 6
- 238000007781 pre-processing Methods 0.000 description 5
- 238000003860 storage Methods 0.000 description 5
- 230000015572 biosynthetic process Effects 0.000 description 4
- 230000006870 function Effects 0.000 description 4
- 239000003086 colorant Substances 0.000 description 3
- 230000008901 benefit Effects 0.000 description 2
- 238000006243 chemical reaction Methods 0.000 description 2
- 238000012805 post-processing Methods 0.000 description 2
- 238000004891 communication Methods 0.000 description 1
- 230000006835 compression Effects 0.000 description 1
- 238000007906 compression Methods 0.000 description 1
- 239000000470 constituent Substances 0.000 description 1
- 230000007423 decrease Effects 0.000 description 1
- 230000003247 decreasing effect Effects 0.000 description 1
- 238000012217 deletion Methods 0.000 description 1
- 230000037430 deletion Effects 0.000 description 1
- 238000004519 manufacturing process Methods 0.000 description 1
- 238000005457 optimization Methods 0.000 description 1
- 230000000717 retained effect Effects 0.000 description 1
Images
Abstract
Description
本発明は、画像処理プログラムおよび画像処理装置に関し、特にレティネックス処理を高速且つ高精度に行うことができる画像処理プログラムおよび画像処理装置に関するものである。 The present invention relates to an image processing program and an image processing apparatus, and more particularly to an image processing program and an image processing apparatus that can perform Retinex processing at high speed and with high accuracy.
逆光条件下で被写体が撮像された場合、被写体部分の画像は、詳細な態様が判別困難となるほど明度やコントラストの低い不明瞭な逆光画像となる。かかる逆光画像のみならず、露光の過不足や、撮像時のぶれやぼけ、ノイズ、光量不足などによる劣悪な画像を、画像処理によって明度やコントラストを向上させて画質を改良することが行われている。かかる画像処理の1手法として、レティネックス処理(Retinex処理)が知られている。 When a subject is imaged under backlight conditions, the image of the subject portion becomes an unclear backlight image with low brightness and contrast as the detailed mode becomes difficult to distinguish. In addition to such backlit images, poor images due to overexposure or underexposure, blurring or blurring during shooting, noise, insufficient light quantity, etc. are being used to improve image quality by improving brightness and contrast through image processing. Yes. As one method of such image processing, Retinex processing (Retinex processing) is known.
レティネックス処理は、高画質部分については元画像データを保持し、主に低画質部分の画質改良を行うものである。このレティネックス処理では、ガウスフィルタにより、元の画像の各画素データを周辺画素の画素データを反映させた値に補正し、その補正された画素データの自然対数から元の画像の反射率(リフレクタンス)成分データを算出し、元画像の画素成分で元の画像の画素データを除してイルミナンス成分データを算出する。つまり、元の画像を、反射率成分とイルミナンス成分との2の構成成分に分けるのである。そして、イルミナンス成分に対してガンマ補正等の明度や階調(コントラスト)を補正する処理を行った後、その補正されたイルミナンス成分と、反射率成分とを合成することにより、元の画像に対し逆光画像部分などの低画質部分の画質が改良された画像データを生成することができる。反射率成分を求めるには、反射率R(x,y)の正規化を行う。 In the Retinex process, the original image data is retained for the high-quality part, and the image quality is mainly improved for the low-quality part. In this Retinex processing, each pixel data of the original image is corrected to a value reflecting the pixel data of the peripheral pixels by a Gaussian filter, and the reflectance (reflectance of the original image) is calculated from the natural logarithm of the corrected pixel data. Luminance) component data is calculated, and the pixel component of the original image is divided by the pixel component of the original image to calculate the illuminance component data. That is, the original image is divided into two components, a reflectance component and an illuminance component. Then, after performing processing for correcting the brightness and gradation (contrast) such as gamma correction for the illuminance component, the corrected illuminance component and the reflectance component are combined to produce an original image. Image data in which the image quality of the low image quality portion such as the backlight image portion is improved can be generated. In order to obtain the reflectance component, the reflectance R (x, y) is normalized.
ここで、図18を参照して、反射率R(x,y)の正規化について説明する。反射率R(x,y)は、次式により算出される。 Here, the normalization of the reflectance R (x, y) will be described with reference to FIG. The reflectance R (x, y) is calculated by the following equation.
ここで、xは、横方向の座標を、yは、縦方向の座標を、I(x,y)は、座標(x,y)における強度値を、F(x,y)は、座標(x,y)のフィルタ係数を、*は、畳み込み演算(コンボリューション)をそれぞれ示し、この畳み込み演算により周辺平均輝度(周辺平均値)が求められる。なお、logは、eを底とする自然対数である。また、畳み込み演算では、マスクを構成する複数のフィルタ係数と画像を構成する画素値とが乗算され、その積が累算される。
Here, x is a coordinate in the horizontal direction, y is a coordinate in the vertical direction, I (x, y) is an intensity value at the coordinate (x, y), and F (x, y) is a coordinate ( The filter coefficient of x, y), * indicates a convolution operation (convolution), and the peripheral average luminance (peripheral average value) is obtained by this convolution operation. Note that log is a natural logarithm with e as the base. In the convolution operation, a plurality of filter coefficients constituting the mask are multiplied by the pixel values constituting the image, and the product is accumulated.
図18は、ある静止画像について、上式により求められた反射率R(x,y)の最小値を0、最大値を255とする0から255の範囲の整数値に正規化し、各整数の出現頻度を集計したヒストグラムである。 FIG. 18 shows the normalization of an integer value in the range of 0 to 255, where the minimum value of the reflectance R (x, y) obtained by the above equation is 0 and the maximum value is 255 for a certain still image. It is the histogram which totaled appearance frequency.
このヒストグラムからメディアン値Mを求め、メディアン値から大きい側へ45%の画素数を含む範囲の上限値をU、メディアン値から小さい側へ45%の画素数を含む範囲の下限値をDとする。 The median value M is obtained from this histogram, the upper limit value of the range including 45% of pixels from the median value to the larger side is U, and the lower limit value of the range including 45% of pixels from the median value to the smaller side is D. .
UおよびDの値に対応するR(x,y)の値を、UpR、DownRとし、正規化反射率refle(x,y)は、R(x,y)の値がDownR以下の場合は、0.0とし、R(x,y)の値がUpR以上の場合は、1.0とし、R(x,y)の値がDownRより大きくUpRより小さい場合は、 The values of R (x, y) corresponding to the values of U and D are UpR and DownR, and the normalized reflectivity refle (x, y) is as follows when the value of R (x, y) is equal to or less than DownR: 0.0, when the value of R (x, y) is equal to or higher than UpR, 1.0, and when the value of R (x, y) is larger than DownR and smaller than UpR,
このようにしてrefle(x,y)が求められるので、クリップされる範囲(UpRとDownRとの間)を求めるため、R(x,y)を全画素分記憶しなければならない。尚かつ、R(x,y)は、対数演算により求まる数値であるので、小数点を用いて記録する必要があり、浮動小数点では、4バイト、倍精度実数の場合には8バイトで画素毎に記憶するため膨大な記憶容量が必要である。 Since refle (x, y) is obtained in this way, R (x, y) must be stored for all pixels in order to obtain the clipped range (between UpR and DownR). Moreover, R (x, y) is a numerical value obtained by logarithmic calculation, so it must be recorded using a decimal point. For floating point, it is 4 bytes, and for double precision real numbers, 8 bytes for each pixel. In order to memorize | store, a huge memory capacity is required.
特開2001−69525号公報(特許文献1)には、このレティネックス処理をRGBの各プレーンで独立に行った場合に、カラーバランスが崩れたり色ずれが発生するという問題点を解決するために、RGB値をYCbCrやYIQという輝度成分と色成分により構成される座標空間に変換し、輝度成分Yに対してのみレティネックス処理を施し、色成分を維持したまま、RGBに戻すという方法が開示されている。この方法を用いると輝度成分のみが調整され、色成分は調整されないのでカラーバランスが崩れたり色ずれが発生することがない。また、この方法では、輝度成分のみにレティネックス処理を行うので、RGBの各プレーンそれぞれにレティネックス処理を行う場合に比べ、計算量が少なく、高速で処理を実行することができとともに、R(x,y)を正規化するために、RGBそれぞれについて記憶する必要がなく、輝度のみについて記憶すればよいので、必要な記憶容量は少なくなる。 Japanese Patent Laid-Open No. 2001-69525 (Patent Document 1) discloses a solution to the problem that color balance is lost or color misregistration occurs when this Retinex process is performed independently for each of the RGB planes. Discloses a method of converting RGB values into a coordinate space composed of luminance components and color components such as YCbCr and YIQ, performing Retinex processing only on the luminance component Y, and returning to RGB while maintaining the color components. Has been. When this method is used, only the luminance component is adjusted, and the color component is not adjusted, so that the color balance is not lost and color shift does not occur. Further, in this method, since the Retinex process is performed only on the luminance component, the calculation amount is small and the process can be executed at a high speed as compared with the case where the Retinex process is performed on each of the RGB planes. In order to normalize x, y), it is not necessary to store each of RGB, and only the luminance needs to be stored, so that the necessary storage capacity is reduced.
また、特許3731577号(特許文献2)には、このレティネックス処理の処理速度を高速にする方法が開示されている。この方法は、元画像を平均画素法などの方法により縮小画像(解像度が低い)を形成し、その縮小画像の各画素について周辺平均輝度を求めた周辺平均輝度画像(ボケ画像)を形成し、そのボケ画像を拡大した画像と元画像からレティネックス処理画像を形成し、更に、そのレティネックス処理画像と元画像とから出力画像を形成している。
しかしながら、従来の文献に開示された処理では、元画像の全画素について、それぞれ反射率を演算して記憶し、全画素分の反射率を得た後に正規化パラメータを決定し、その後、反射率を正規化して得られるレティネックス値によって画素値を補正し出力していたから、処理を開始してから画素値の出力開始までの時間が長いという問題点があった。 However, in the processing disclosed in the conventional literature, the reflectance is calculated and stored for all the pixels of the original image, the normalization parameter is determined after obtaining the reflectance for all the pixels, and then the reflectance is calculated. Since the pixel value is corrected and output by the Retinex value obtained by normalizing the above, there is a problem that it takes a long time from the start of processing to the start of output of the pixel value.
本発明は、上記問題点を解決するためになされたものであり、レティネックス処理を高速且つ高精度に行うことができる画像処理プログラムおよび画像処理装置を提供することを目的としている。 SUMMARY An advantage of some aspects of the invention is that it provides an image processing program and an image processing apparatus that can perform Retinex processing at high speed and with high accuracy.
本発明者は、上記問題点を解決するために鋭意検討した結果、元画像の反射率を演算するのに先立って、縮小画像の反射率を取得し、その縮小画像の反射率を用いて正規化パラメータを決定することを想到した。正規化パラメータを求めるために、縮小画像を用いた方が、反射率を演算すべき画素の数を低減することができるので、高速で処理を行うことができる。また、正規化パラメータを事前に決定しておくことにより、元画像について演算された反射率は、他の画素の反射率の演算終了を待たずに、正規化して直ぐに出力することができるという点からも、画像の出力開始までの時間が短縮し、処理を高速化することができる。 As a result of intensive studies to solve the above problems, the present inventor obtained the reflectance of the reduced image prior to calculating the reflectance of the original image, and normalized using the reflectance of the reduced image. It was conceived to determine the optimization parameters. In order to obtain the normalization parameter, using the reduced image can reduce the number of pixels for which the reflectance is to be calculated, so that processing can be performed at high speed. In addition, by determining the normalization parameters in advance, the reflectance calculated for the original image can be normalized and output immediately without waiting for the calculation of the reflectance of other pixels. Therefore, the time until the start of image output can be shortened, and the processing speed can be increased.
このように、縮小画像から正規化パラメータを導出する場合、縮小画像を用いて得られる正規化パラメータと、元画像を用いて得られる正規化パラメータの差が大きいと画質が劣化するおそれがあるため、これらの値の差は小さいことが望ましい。 As described above, when deriving the normalization parameter from the reduced image, there is a possibility that the image quality may deteriorate if the difference between the normalization parameter obtained using the reduced image and the normalization parameter obtained using the original image is large. It is desirable that the difference between these values is small.
本発明者は、さらに検討を重ねた結果、縮小画像用マスクのカバー率と、元画像用マスクのカバー率を等しくすることで、縮小画像を用いた場合でも好適な正規化パラメータ(すなわち、元画像の反射率から得た正規化パラメータにより近い値)が得られ、高精度の出力結果が得られることを知見した。 As a result of further studies, the present inventor has made the normalization parameter (that is, the original image) suitable even when the reduced image is used by equalizing the coverage of the reduced image mask and the coverage of the original image mask. It was found that a value closer to the normalization parameter obtained from the reflectance of the image was obtained, and a highly accurate output result was obtained.
図19を参照してより詳細に説明する。図19は、縮小画像用マスクと元画像用マスクとを模式的に示す図である。マスクとは、注目画素の周辺平均輝度を求める際に、その画素の周辺の各画素に対し、画像処理フィルタを適用する領域であり、その領域の大きさが、マスクのサイズとなる。上述したように、各画素について反射率を求める際には、注目画素周辺の画素の値の平均値である周辺平均輝度を求めるのであるが、その際に、「周辺画素」として周辺平均輝度に値を反映させる領域は、マスクのサイズにより定められる。また、マスクのカバー率とは、マスクのサイズと、マスクの対象となる画像のサイズとの比のことで、例えば、元画像の各辺の長さが100であるとき、元画像用マスクの各辺の長さも100であれば元画像用マスクのカバー率は1となる。 This will be described in more detail with reference to FIG. FIG. 19 is a diagram schematically showing a reduced image mask and an original image mask. The mask is a region where an image processing filter is applied to each pixel around the pixel when the peripheral average luminance of the pixel of interest is obtained, and the size of the region is the size of the mask. As described above, when calculating the reflectance for each pixel, the peripheral average luminance, which is the average value of the pixels around the target pixel, is calculated. At that time, the peripheral average luminance is set as the “peripheral pixel”. The area where the value is reflected is determined by the size of the mask. The mask coverage is the ratio of the mask size to the size of the image to be masked. For example, when the length of each side of the original image is 100, the mask of the original image mask If the length of each side is also 100, the coverage of the original image mask is 1.
カバー率を等しくするとは、図19に示すように、縮小画像のサイズに対する縮小画像用マスクのサイズの比を、元画像のサイズに対する元画像用マスクのサイズの比に等しくすることをいう。 As shown in FIG. 19, making the coverage ratio equal means that the ratio of the size of the reduced image mask to the size of the reduced image is made equal to the ratio of the size of the original image mask to the size of the original image.
例えば、元画像用マスクが、元画像の64(8×8)個の画素を覆うサイズを有する場合、縮小率1/2で縮小した縮小画像には、縮小画像における16(4×4)個の画素を覆うサイズの縮小画像用マスクを用いることにより、カバー率を等しくすることができる。このようにカバー率を等しくすることにより、1つの注目画素の反射率を演算する際に参照される範囲が一致するので、縮小画像の反射率を用いた場合でも好適な正規化パラメータが得られるのである。 For example, when the original image mask has a size that covers 64 (8 × 8) pixels of the original image, the reduced image reduced at the reduction ratio of 1/2 includes 16 (4 × 4) pieces in the reduced image. By using a reduced image mask of a size that covers these pixels, the coverage can be made equal. By making the coverage ratios equal in this way, the ranges that are referred to when calculating the reflectance of one pixel of interest match, so that a suitable normalization parameter can be obtained even when the reflectance of the reduced image is used. It is.
上記目的を達成するために、請求項1記載の画像処理プログラムは、画像の補正処理を行う画像処理装置により実行されるプログラムであって、元画像を縮小した縮小画像の各画素について、縮小画像用マスクを用いて周辺平均値を求め、その周辺平均値と縮小画像の各画素の値とから反射率を求める縮小画像反射率取得ステップと、その縮小画像反射率取得ステップにより求められた反射率が取る値の全範囲における各値の頻度を集計し、正規化を行う際のパラメータ値を設定する正規化パラメータ設定ステップと、元画像の各画素について、元画像用マスクを用いて周辺平均値を求め、その周辺平均値と元画像の画素値とから反射率を求める元画像反射率取得ステップと、その元画像反射率取得ステップにより取得した反射率を前記正規化パラメータ設定ステップにより設定されたパラメータ値に基づいて正規化した正規化レティネックス値を求め、その正規化レティネックス値と、元画像の画素値とに基づいて補正を行う補正ステップとを備え、前記縮小画像のサイズと前記縮小画像用フィルタのサイズとの比は、前記元画像のサイズと前記元画像用フィルタのサイズとの比と同じであることを特徴とする。
In order to achieve the above object, an image processing program according to
請求項2記載の画像処理プログラムは、請求項1記載の画像処理プログラムにおいて、前記縮小画像用フィルタは、縮小画像における周辺平均値の演算領域を定めると共に、その演算領域内のp行q列の画素を、周辺平均値に値が反映される参照画素と、周辺平均値に値を反映しない間引き画素とに区分するものであって、元画像を、k行k列の画素毎に複数ブロックに分割し、各ブロックをそれぞれ1の画素に集約して縮小画像を形成する縮小画像形成ステップと、前記縮小画像用フィルタの演算領域により定められる縮小画像のp行q列の画素が、前記元画像用フィルタの演算領域により定められる元画像のk・p行k・q列の画素を縮小した関係にあるとき、前記縮小画像における各参照画素の元となった元画像の各ブロックに、少なくとも1の参照画素が含まれるように、参照画素と間引き画素とを区分する元画像用フィルタを準備する元画像用フィルタ準備ステップとを備えるものである。
The image processing program according to
請求項3記載の画像処理プログラムは、請求項2記載の画像処理プログラムにおいて、前記元画像用フィルタ準備ステップは、前記縮小画像用フィルタの演算領域により定められる縮小画像のp行q列の画素が、前記元画像用フィルタの演算領域により定められる元画像のk・p行k・q列の画素を縮小した関係にあるとき、前記縮小画像における各間引き画素の元となった元画像の各ブロック内の画素が間引き画素となるように、参照画素と間引画素とを区分する元画像用フィルタを準備するものである。 According to a third aspect of the present invention, there is provided the image processing program according to the second aspect, wherein in the original image filter preparation step, pixels of p rows and q columns of the reduced image determined by the calculation area of the reduced image filter are calculated. , Each block of the original image that is the source of each thinned pixel in the reduced image when the pixels of k, p rows, k, and q columns of the original image defined by the calculation area of the original image filter are reduced An original image filter for distinguishing the reference pixel and the thinned pixel is prepared so that the inner pixel becomes the thinned pixel.
請求項4記載の画像処理プログラムは、請求項2または3に記載の画像処理プログラムにおいて、前記縮小画像形成ステップは、各ブロックからそれぞれn個の画素を抽出し(nは1以上の整数)、その抽出されたn個の画素に基づいて1の画素を生成し、縮小画像を形成するものであり、前記元画像用フィルタ準備ステップは、前記縮小画像用フィルタにより定められる縮小画像のp行q列の画素が、前記元画像用フィルタにより定められる元画像のk・p行k・q列の画素を縮小した関係にあるとき、前記縮小画像の各参照画素の元となった元画像の各ブロック内のn個の抽出画素のうち、少なくとも1の画素が参照画素となるように、参照画素と間引画素とを区分する元画像用フィルタを準備するものである。
The image processing program according to claim 4 is the image processing program according to
請求項5記載の画像処理プログラムは、請求項2から4のいずれかに記載の画像処理プログラムにおいて、前記縮小画像用フィルタを準備する縮小画像用フィルタ準備ステップを備え、前記元画像用フィルタ準備ステップは、前記縮小画像用フィルタ準備ステップにより準備された縮小画像用フィルタに基づいて、元画像用フィルタを生成するものである。
The image processing program according to
請求項6記載の画像処理装置は、画像の補正処理を行うものであって、元画像を縮小した縮小画像の各画素について、縮小画像用フィルタを用いて周辺平均値を求め、その周辺平均値と縮小画像の各画素の値とから反射率を求める縮小画像反射率取得手段と、その縮小画像反射率取得手段により求められた反射率が取る値の全範囲における各値の頻度を集計し、正規化を行う際のパラメータ値を設定する正規化パラメータ設定手段と、元画像の各画素について、元画像用フィルタを用いて周辺平均値を求め、その周辺平均値と元画像の画素値とから反射率を求める元画像反射率取得手段と、その元画像反射率取得手段により取得した反射率を前記正規化パラメータ設定手段により設定されたパラメータ値に基づいて正規化した正規化レティネックス値を求め、その正規化レティネックス値と、元画像の画素値とに基づいて補正を行う補正手段とを備え、前記縮小画像のサイズと前記縮小画像用フィルタのサイズとの比は、前記元画像のサイズと前記元画像用フィルタのサイズとの比と同じである。
The image processing apparatus according to
請求項7記載の画像処理装置は、請求項6記載の画像処理装置において、前記縮小画像用フィルタは、縮小画像における周辺平均値の演算領域を定めると共に、その演算領域内のp行q列の画素を、周辺平均値に値が反映される参照画素と、周辺平均値に値を反映しない間引き画素とに区分するものであって、元画像を、k行k列の画素毎に複数ブロックに分割し、各ブロックをそれぞれ1の画素に集約して縮小画像を形成する縮小画像形成手段と、前記縮小画像用フィルタの演算領域により定められる縮小画像のp行q列の画素が、前記元画像用フィルタの演算領域により定められる元画像のk・p行k・q列の画素を縮小した関係にあるとき、前記縮小画像における各参照画素の元となった元画像の各ブロックに、少なくとも1の参照画素が含まれるように、参照画素と間引き画素とを区分する元画像用フィルタを準備する元画像用フィルタ準備手段とを備えるものである。
The image processing apparatus according to
請求項8記載の画像処理装置は、請求項7記載の画像処理装置において、前記元画像用フィルタ準備手段は、前記縮小画像用フィルタの演算領域により定められる縮小画像のp行q列の画素が、前記元画像用フィルタの演算領域により定められる元画像のk・p行k・q列の画素を縮小した関係にあるとき、前記縮小画像における各間引き画素の元となった元画像の各ブロック内の画素が間引き画素となるように、参照画素と間引画素とを区分する元画像用フィルタを準備するものである。
The image processing device according to claim 8 is the image processing device according to
請求項9記載の画像処理装置は、請求項7または8に記載の画像処理装置において、前記縮小画像形成手段は、各ブロックからそれぞれn個の画素を抽出し(nは1以上の整数)、その抽出されたn個の画素に基づいて1の画素を生成し、縮小画像を形成するものであり、前記元画像用フィルタ準備手段は、前記縮小画像用フィルタにより定められる縮小画像のp行q列の画素が、前記元画像用フィルタにより定められる元画像のk・p行k・q列の画素を縮小した関係にあるとき、前記縮小画像の各参照画素の元となった元画像の各ブロック内のn個の抽出画素のうち、少なくとも1の画素が参照画素となるように、参照画素と間引画素とを区分する元画像用フィルタを準備するものである。
The image processing device according to
請求項10記載の画像処理装置は、請求項7から9のいずれかに記載の画像処理装置において、前記縮小画像用フィルタを準備する縮小画像用フィルタ準備手段を備え、前記元画像用フィルタ準備手段は、前記縮小画像用フィルタ準備手段により準備された縮小画像用フィルタに基づいて、元画像用フィルタを生成するものである。
The image processing apparatus according to claim 10, wherein the image processing apparatus according to
請求項1記載の画像処理プログラムによれば、縮小画像反射率取得ステップにより、元画像を縮小した縮小画像の各画素について、縮小画像用フィルタを用いて周辺平均値が求められ、その周辺平均値と縮小画像の各画素の値とから反射率が求められる。そして、正規化パラメータ設定ステップにより、縮小画像反射率取得ステップにより求められた反射率が取る値の全範囲における各値の頻度が集計され、正規化を行う際のパラメータ値が設定される。そして、元画像反射率取得ステップにより、元画像の各画素について、元画像用フィルタを用いて周辺平均値が求められ、その周辺平均値と元画像の画素値とから反射率が求められる。そして、補正ステップにより、元画像反射率取得ステップにより取得した反射率を、前記正規化パラメータ設定ステップにより設定されたパラメータ値に基づいて正規化した正規化レティネックス値が求められ、その正規化レティネックス値と、元画像の画素値とに基づいて補正が行われる。よって、正規化パラメータを求める際の演算数が少なく、処理を高速で行うことができるという効果がある。
According to the image processing program of
また、縮小画像のサイズと縮小画像用フィルタのサイズとの比が、元画像のサイズと元画像用フィルタのサイズとの比と同じにされているので、縮小画像の反射率を用いた場合でも好適な正規化パラメータを得ることができ、レティネックス処理を高精度に行うことができるという効果がある。 In addition, since the ratio between the size of the reduced image and the size of the reduced image filter is the same as the ratio between the size of the original image and the size of the original image filter, even when the reflectance of the reduced image is used. A suitable normalization parameter can be obtained, and the Retinex processing can be performed with high accuracy.
請求項2記載の画像処理プログラムによれば、請求項1記載の画像処理プログラムの奏する効果に加え、縮小画像用フィルタの演算領域により定められる縮小画像のp行q列の画素が、元画像用フィルタの演算領域により定められる元画像のk・p行k・q列の画素を縮小した関係にあるとき、縮小画像における各参照画素の元となった元画像の各ブロックに、少なくとも1の参照画素が含まれるので、縮小画像の反射率に反映される画素値と、元画像の反射率に反映される画素値とが近似する。よって、縮小画像の反射率を用いた場合でも好適な正規化パラメータを得ることができ、レティネックス処理を高精度に行うことができるという効果がある。なお、「・」は、乗算を意味する。
According to the image processing program of
請求項3記載の画像処理プログラムによれば、請求項2記載の画像処理プログラムの奏する効果に加え、縮小画像用フィルタの演算領域により定められる縮小画像のp行q列の画素が、元画像用フィルタの演算領域により定められる元画像のk・p行k・q列の画素を縮小した関係にあるとき、縮小画像における各間引き画素の元となった元画像の各ブロック内の画素が間引き画素となるので、縮小画像の反射率を演算される際に間引かれる画素値と、元画像の反射率を演算する際に間引かれる画素値とが近似する。換言すれば、縮小画像の反射率に反映される画素値と、元画像の反射率に反映される画素値とが近似する。よって、縮小画像の反射率を用いた場合でも好適な正規化パラメータを得ることができ、レティネックス処理を高精度に行うことができるという効果がある。 According to the image processing program of the third aspect, in addition to the effect produced by the image processing program of the second aspect, the pixels in the p rows and q columns of the reduced image defined by the calculation area of the reduced image filter are used for the original image. When pixels in k, p rows, k, and q columns of the original image defined by the calculation area of the filter are reduced, the pixels in each block of the original image that is the source of each thinned pixel in the reduced image are thinned pixels Therefore, the pixel value that is thinned out when the reflectance of the reduced image is calculated approximates the pixel value that is thinned out when the reflectance of the original image is calculated. In other words, the pixel value reflected in the reflectance of the reduced image approximates the pixel value reflected in the reflectance of the original image. Therefore, even when the reflectance of the reduced image is used, a suitable normalization parameter can be obtained, and there is an effect that the Retinex process can be performed with high accuracy.
請求項4記載の画像処理プログラムによれば、請求項2または3に記載の画像処理プログラムの奏する効果に加え、縮小画像用フィルタにより定められる縮小画像のp行q列の画素が、元画像用フィルタにより定められる元画像のk・p行k・q列の画素を縮小した関係にあるとき、縮小画像の各参照画素の元となった元画像の各ブロック内のn個の抽出画素のうち、少なくとも1の画素が参照画素となるので、縮小画像の反射率に反映される画素値と、元画像の反射率に反映される画素値とが、より近似し、縮小画像の反射率を用いた場合でも好適な正規化パラメータを得ることができ、より高精度にレティネックス処理を行うことができるという効果がある。 According to the image processing program of the fourth aspect, in addition to the effect produced by the image processing program according to the second or third aspect, pixels of p rows and q columns of the reduced image determined by the reduced image filter are used for the original image. Of the n extracted pixels in each block of the original image that is the source of each reference pixel of the reduced image when the pixels of k, p rows, k, and q columns of the original image defined by the filter are reduced Since at least one pixel serves as a reference pixel, the pixel value reflected in the reflectance of the reduced image is more approximate to the pixel value reflected in the reflectance of the original image, and the reflectance of the reduced image is used. In this case, a suitable normalization parameter can be obtained, and the Retinex process can be performed with higher accuracy.
請求項5記載の画像処理プログラムによれば、請求項2から4のいずれかに記載の画像処理プログラムの奏する効果に加え、縮小画像用フィルタ準備ステップにより準備された縮小画像用フィルタに基づいて、元画像用フィルタが生成されるので、縮小率に拘わらず、元画像用フィルタと縮小画像用フィルタの対応関係を保ち、適切な正規化パラメータが得られるという効果がある。これとは逆に、元画像用フィルタを縮小して縮小画像用フィルタを生成することとすると、縮小率が極めて大きい場合、すなわち、元画像に対し縮小画像が極めて小さい場合、縮小画像用フィルタが小さくなり過ぎて、縮小画像の反射率を適切に演算できなくなるという問題が生じるのである。
According to the image processing program of
請求項6記載の画像処理装置によれば、縮小画像反射率取得手段により、元画像を縮小した縮小画像の各画素について、縮小画像用フィルタを用いて周辺平均値が求められ、その周辺平均値と縮小画像の各画素の値とから反射率が求められる。そして、正規化パラメータ設定手段により、縮小画像反射率取得手段により求められた反射率が取る値の全範囲における各値の頻度が集計され、正規化を行う際のパラメータ値が設定される。そして、元画像反射率取得手段により、元画像の各画素について、元画像用フィルタを用いて周辺平均値が求められ、その周辺平均値と元画像の画素値とから反射率が求められる。そして、補正手段により、元画像反射率取得手段により取得した反射率を前記正規化パラメータ設定手段により設定されたパラメータ値に基づいて正規化した正規化レティネックス値が求められ、その正規化レティネックス値と、元画像の画素値とに基づいて補正が行われる。よって、正規化パラメータを求める際の演算数が少なく、処理を高速で行うことができるという効果がある。
According to the image processing device of
また、縮小画像のサイズと縮小画像用フィルタのサイズとの比が、元画像のサイズと元画像用フィルタのサイズとの比と同じにされているので、縮小画像の反射率を用いた場合でも好適な正規化パラメータを得ることができ、レティネックス処理を高精度に行うことができるという効果がある。 In addition, since the ratio between the size of the reduced image and the size of the reduced image filter is the same as the ratio between the size of the original image and the size of the original image filter, even when the reflectance of the reduced image is used. A suitable normalization parameter can be obtained, and the Retinex processing can be performed with high accuracy.
請求項7記載の画像処理装置によれば、請求項6記載の画像処理装置の奏する効果に加え、縮小画像用フィルタの演算領域により定められる縮小画像のp行q列の画素が、元画像用フィルタの演算領域により定められる元画像のk・p行k・q列の画素を縮小した関係にあるとき、縮小画像における各参照画素の元となった元画像の各ブロックに、少なくとも1の参照画素が含まれるので、縮小画像の反射率に反映される画素値と、元画像の反射率に反映される画素値とが近似する。よって、縮小画像の反射率を用いた場合でも好適な正規化パラメータを得ることができ、レティネックス処理を高精度に行うことができるという効果がある。 According to the image processing apparatus of the seventh aspect, in addition to the effect produced by the image processing apparatus of the sixth aspect, the pixels of p rows and q columns of the reduced image defined by the calculation area of the reduced image filter are used for the original image. At least one reference is made to each block of the original image that is the source of each reference pixel in the reduced image when the pixels of k, p rows, k, and q columns of the original image defined by the calculation area of the filter are reduced. Since pixels are included, the pixel value reflected in the reflectance of the reduced image approximates the pixel value reflected in the reflectance of the original image. Therefore, even when the reflectance of the reduced image is used, a suitable normalization parameter can be obtained, and there is an effect that the Retinex process can be performed with high accuracy.
請求項8記載の画像処理装置によれば、請求項7記載の画像処理装置の奏する効果に加え、縮小画像用フィルタの演算領域により定められる縮小画像のp行q列の画素が、元画像用フィルタの演算領域により定められる元画像のk・p行k・q列の画素を縮小した関係にあるとき、縮小画像における各間引き画素の元となった元画像の各ブロック内の画素が間引き画素となるので、縮小画像の反射率を演算される際に間引かれる画素値と、元画像の反射率を演算する際に間引かれる画素値とが近似する。換言すれば、縮小画像の反射率に反映される画素値と、元画像の反射率に反映される画素値とが近似する。よって、縮小画像の反射率を用いた場合でも好適な正規化パラメータを得ることができ、レティネックス処理を高精度に行うことができるという効果がある。 According to the image processing apparatus of the eighth aspect, in addition to the effect produced by the image processing apparatus of the seventh aspect, the pixels in the p rows and q columns of the reduced image defined by the calculation area of the reduced image filter are used for the original image. When pixels in k, p rows, k, and q columns of the original image defined by the calculation area of the filter are reduced, the pixels in each block of the original image that is the source of each thinned pixel in the reduced image are thinned pixels Therefore, the pixel value that is thinned out when the reflectance of the reduced image is calculated approximates the pixel value that is thinned out when the reflectance of the original image is calculated. In other words, the pixel value reflected in the reflectance of the reduced image approximates the pixel value reflected in the reflectance of the original image. Therefore, even when the reflectance of the reduced image is used, a suitable normalization parameter can be obtained, and there is an effect that the Retinex process can be performed with high accuracy.
請求項9記載の画像処理装置によれば、請求項7または8に記載の画像処理装置の奏する効果に加え、縮小画像用フィルタにより定められる縮小画像のp行q列の画素が、元画像用フィルタにより定められる元画像のk・p行k・q列の画素を縮小した関係にあるとき、縮小画像の各参照画素の元となった元画像の各ブロック内のn個の抽出画素のうち、少なくとも1の画素が参照画素となるので、縮小画像の反射率に反映される画素値と、元画像の反射率に反映される画素値とが、より近似し、縮小画像の反射率を用いた場合でも好適な正規化パラメータを得ることができ、より高精度にレティネックス処理を行うことができるという効果がある。 According to the image processing device of the ninth aspect, in addition to the effect produced by the image processing device according to the seventh or eighth aspect, the pixels of p rows and q columns of the reduced image defined by the reduced image filter are used for the original image. Of the n extracted pixels in each block of the original image that is the source of each reference pixel of the reduced image when the pixels of k, p rows, k, and q columns of the original image defined by the filter are reduced Since at least one pixel serves as a reference pixel, the pixel value reflected in the reflectance of the reduced image is more approximate to the pixel value reflected in the reflectance of the original image, and the reflectance of the reduced image is used. In this case, a suitable normalization parameter can be obtained, and the Retinex process can be performed with higher accuracy.
請求項10記載の画像処理装置によれば、請求項7から9のいずれかに記載の画像処理装置の奏する効果に加え、縮小画像用フィルタ準備手段により準備された縮小画像用フィルタに基づいて、元画像用フィルタが生成されるので、縮小率に拘わらず、元画像用フィルタと縮小画像用フィルタの対応関係を保ち、適切な正規化パラメータが得られるという効果がある。これとは逆に、元画像用フィルタを縮小して縮小画像用フィルタを生成することとすると、縮小率が極めて大きい場合、すなわち、元画像に対して縮小画像が極めて小さい場合、縮小画像用フィルタが小さくなり過ぎて、縮小画像の反射率を適切に演算できなくなるという問題が生じるのである。
According to the image processing device of claim 10, in addition to the effect produced by the image processing device according to any of
以下、本発明の好ましい実施形態について添付図面を参照して説明する。図1は、本実施形態の画像処理を行う機能を有するプリンタ1の電気的な構成を示したブロック図である。本実施形態においては、プリンタ1に搭載された画像処理プログラムは、パーソナルコンピュータ(以下「PC」と称する)2や、デジタルカメラ21や、外部メディア20から入力された画像データ(元画像データ)に対しレティネックス処理(Retinex処理)などを実行して、画像データの逆光画像部分などの低画質領域の補正を実行するように構成されている。
Hereinafter, preferred embodiments of the present invention will be described with reference to the accompanying drawings. FIG. 1 is a block diagram illustrating an electrical configuration of a
図1に示すように、プリンタ1には、CPU11、ROM12、RAM13、印刷ヘッドなどから構成され、印刷媒体(例えば、紙媒体など)への印刷(出力)を行う印刷部15、出力画像サイズなどの入力値をユーザが入力可能なユーザ操作部(例えば、テンキーなど)を有する操作パネル16とを備えている。
As shown in FIG. 1, the
また、プリンタ1は、ケーブル5を介してPC2と接続可能なインターフェイス(以下「I/F」と称する)17と、ケーブル6を介してデジタルカメラ21と接続可能なI/F18と、外部メディア20(例えば、SDメモリカード、メモリスティックなどのフラッシュメモリにより構成される)を着脱自在に装着可能な外部メディアスロット19とを備えている。これらのI/F17、18により行われる通信方法としてUSB(Universal Serial Bus)が使用される。
The
よって、プリンタ1は、PC2に記憶されている画像データをケーブル5及びI/F17を介して入力することが可能であると共に、デジタルカメラ21によって撮影された画像データをケーブル6及びI/F18を介して入力することが可能である。さらに、外部メディアスロット19に装着された外部メディア20から、その外部メディア20に記憶されている画像データを入力することが可能である。
Therefore, the
CPU11は、プリンタ1全体を制御する演算処理装置である。ROM12は、CPU11により実行される各種制御プログラムやそのプログラムを実行する際に用いられる固定値などを記憶するものであり、レティネックス処理などの画像の処理を行う画像処理プログラムを記憶する画像処理プログラムメモリ12aや、印刷を行うための印刷制御プログラムを記憶する印刷制御プログラムメモリ12b、ルックアップテーブルメモリ(LUTメモリ)12c等が備えられている。
The
RAM13は、制御プログラムがCPU11により実行される際に必要な各種レジスタ群などが記憶されるワーキングエリアや、処理中のデータを一時的に格納するテンポラリエリア等を有しランダムにアクセスできる書き換え可能なメモリであり、元画像データを記憶する元画像メモリ13aと、元画像を縮小し、縮小した画像のレティネックス処理において求められる反射率を記憶する縮小レティネックス画像メモリ13bと、ヒストグラム処理において各画素値の頻度が記憶されるヒストグラムメモリ13cと、元画像のサイズを記憶する元画像サイズメモリ13dと、使用者などにより設定される印刷を行う際の印刷パラメータを記憶する印刷パラメータメモリ13eと、印刷パラメータなどに基づいて決定される縮小画像サイズと縮小アルゴリズムがそれぞれ記憶される縮小画像サイズメモリ13fと縮小アルゴリズムメモリ13gと、注目画素の周辺平均輝度を求める際に用いられるマスク(フィルタ)を記憶するマスクメモリ13h等を備えている。
The
元画像データメモリ13aは、PC2、デジタルカメラ21、及び外部メディア20から、それぞれ、I/F17、I/F18、及び外部メディアスロット19を介して入力した画像データを記憶するものである。元画像データを1ライン単位で記憶し、縮小画像を形成することができるライン数のデータを読み込むと、縮小画像を形成する。なお、本実施形態では、元画像データ及び出力画像データはいずれも、RGB値から構成され、これらの各RGB値は、8ビット(1バイト)のデータサイズにより表され、10進数では、「0」〜「255」の範囲の値をとる。
The original
RGB値は、光の3原色である赤を表すR値と、緑を表すG値と、青を示すB値とを構成成分とする値である。光の3原色の混色により各種の色は生成されるので、元画像の各画素の色は、R値とG値とB値との組合せ(RGB値)により1の色(色相や階調など)が示される。このRGB値の値が大きいほど、輝度(明度)は高くなる。 The RGB value is a value having as constituent components an R value representing red, which is the three primary colors of light, a G value representing green, and a B value representing blue. Since various colors are generated by mixing the three primary colors of light, the color of each pixel of the original image is one color (hue, gradation, etc.) by a combination of R value, G value, and B value (RGB value). ) Is displayed. The luminance (lightness) increases as the RGB value increases.
縮小レティネックス画像メモリ13bは、元画像を縮小し、その縮小した画像の輝度信号のみについてレティネックス処理において求められる反射率Rs(x,y)を記憶するメモリである。元画像を縮小する方法としては、縮小する画像の画素に対応する元画像の位置に最も近い1の画素の値をサンプリング(抽出)し、そのサンプリングした画素の値をそのまま用いる最近傍(ニアレストネイバー)法や、縮小する画像の画素に対応する元画像の位置の周囲の4画素の値をサンプリングし、そのサンプリングした画素の値を用いて補間演算を行うバイリニア法、縮小率に応じた数の画素の値をサンプリングし、その平均値を縮小画像の1画素の値とする平均画素法、16個の画素の値をサンプリングし、その値を補間して縮小画像の1画素の値とするバイキュービック法などが知られている。画質より処理速度を優先する場合は、最近傍法が用いられ、処理速度より画質を優先する場合は、バイキュービック法や、平均画素法が用いられる。
The reduced
これらいずれかの方法により元画像が縮小され、その縮小された画像の各画素(ピクセル)について反射率が上述の数式1を用いて演算され、この縮小レティネックス画像メモリ13bに記憶される。
The original image is reduced by any one of these methods, and the reflectance is calculated for each pixel (pixel) of the reduced
ヒストグラムメモリ13cは、縮小画像の各画素の反射率Rs(x,y)の頻度を集計してヒストグラムを形成するためのメモリである。ヒストグラムが作成されると、そのヒストグラムに基づいて、正規化を行うためのパラメータである上限値および下限値(クリップ範囲)が定められる。 The histogram memory 13c is a memory for forming a histogram by summing up the frequencies of the reflectances Rs (x, y) of each pixel of the reduced image. When a histogram is created, an upper limit value and a lower limit value (clip range), which are parameters for performing normalization, are determined based on the histogram.
元画像サイズメモリ13dは、元画像のサイズを記憶するもので、元画像データをPC2などから読み込む際に、元画像データに付随して読み込まれ、この元画像サイズメモリ13dに記憶される。縮小画像のサイズおよび縮小アルゴリズムを決定する際には、この元画像サイズメモリ13dに記憶された元画像サイズが参照される。
The original
印刷パラメータメモリ13eは、印刷を行う際の印刷モードを高画質の写真モードとするか、普通画質の普通モードとするか、また、記録媒体の種類を光沢紙、インクジェット紙、普通紙のいずれにするか、また、記録媒体のサイズをA4,B5、レターなどのいずれにするかなどを使用者が設定し、その設定されたパラメータを記憶する。印刷モードが選択されると、選択された印刷モードに設定された印刷の解像度や液滴サイズなどがパラメータとして記憶され、印刷が実行される際には、これらのパラメータに従って印刷が行われる。
The
これらの印刷パラメータや、元画像のサイズに基づいて、縮小画像のサイズと縮小するアルゴリズムが決定され、縮小画像サイズメモリ13fと縮小アルゴリズメモリ13gにそれぞれ記憶される。主として、処理速度より画質が優先される場合は、縮小画像サイズとして大きいサイズが設定され、画質より処理速度が優先される場合は、縮小画像サイズとして小さいサイズが設定される。縮小アルゴリズムとしては、上記、最近傍法、バイリニア法、平均画素法などの中から選択される。
Based on these print parameters and the size of the original image, the size of the reduced image and the algorithm to be reduced are determined and stored in the reduced
これらの印刷パラメータは、PC2において使用者により設定され、プリンタ1に入力されるとともに、操作パネル16に備えられる操作子によっても設定することができる。
These print parameters are set by the user in the
マスクメモリ13hは、各画素の周辺平均輝度を求める際に用いられるマスク(フィルタ)を記憶するメモリであり、縮小画像に適用する縮小画像用マスクと、元画像に適用する元画像用マスク(図8参照)とをそれぞれを記憶する。なお、本実施形態では、縮小画像用マスクは、予めROM12に格納されているものであって、必要に応じてマスクメモリ13hに読み出されるものとして説明する。一方、元画像用マスクは、ROM12から読み出した縮小画像用マスクに基づいて動的に生成され、マスクメモリ13hに格納されるものとして説明する。
The
操作パネル16には、印刷パラメータなどを表示するLCDと、印刷パラメータや画像処理に関するパラメータを設定したり、画像処理や印刷処理の実行を指示する各種操作子が備えられている。
The
次に、図2を参照してプリンタ1に接続されたPC2おいて設定される種々の印刷パラメータについて説明する。図2は、PC2において、印刷パラメータの設定を選択した際に表示器に表示される印刷パラメータ設定画面28である。
Next, various printing parameters set in the
印刷パラメータ設定画面28には、印刷を行う記録媒体である印刷用紙を選択設定する用紙種類選択ボックス28aと、印刷用紙のサイズを選択設定する用紙サイズ設定ボックス28bと、印刷モードを設定する印刷モード設定ボックス28cと、印刷を行う部数を設定する部数設定ボックス28dなどが表示される。
On the print
用紙種類選択ボックス28aは、選択された用紙種類を表示する表示エリアと、そのエリアの右端に下方に向いた三角形が描かれたアイコンとを有し、このアイコンにマウスを操作してカーソル合わせ、クリックすると図2に示すようにプルダウンメニューが表示される。つぎに表示されたプルダウンメニューのいずれかの項目にカーソルを移動し、マウスに備えられたスイッチをクリックすると、カーソルにより指定される項目が選択される。
The paper
この実施形態では、印刷用紙の種類として、普通紙、光沢紙のいずれかを選択することができ、図2に示す例では、普通紙が選択された状態を示している。 In this embodiment, either plain paper or glossy paper can be selected as the type of printing paper, and the example shown in FIG. 2 shows a state in which plain paper is selected.
同様に、用紙サイズ設定ボックス28bは、選択された用紙のサイズを表示するエリアと、選択を行うためのプルダウンメニューの表示を指示するアイコンとを有し、用紙のサイズとしては、A4,レター,5”×7”および4”×6”のいずれかを選択することができる。
Similarly, the paper
印刷モード設定ボックス28cも同様に、選択された印刷モードを表示するエリアと、選択を行うためのプルダウンメニューの表示を指示するアイコンとを有し、印刷モードとして、写真モードと普通モードのいずれかを選択することができる。写真モードは、普通モードに比べ、高画質で印刷を行うモードであり、高解像度で印刷が行われる。例えば、写真モードの解像度は、1200×1200dpiであり、普通モードの解像度は、低解像度であって、600×600dpiである。なお、インクジェット方式のプリンタでは解像度に応じて液滴サイズや、使用されるインクの種類が異なるようにしてもよい。
Similarly, the print
印刷部数設定ボックス28dは、設定された部数を数値で表示するエリアからなり、そのエリアの右側に、数値を増加させるための上向きの三角形を表示したインクリメントアイコンと、数値を減少させるための下向きの三角形を表示したデクリメントアイコンを備え、これらのアイコンにカーソルを移動してマウスを操作することにより、印刷部数を設定することができる。
The number of
この印刷パラメータ設定画面28には、上記アイコン以外に、用紙に対する印刷の向きを設定するラジオボタンや、設定を有効にして設定画面の消去を指示するOKボタンや、設定を無効にして設定画面の消去を指示するキャンセルボタンや設定の説明画面の表示を指示するヘルプボタンが表示される。
In addition to the above icons, the print
このようにしてPC2により設定された印刷パラメータは、ケーブル5およびI/F17を介してプリンタ1に入力され、印刷パラメータメモリ13eに記憶される。
The print parameters set by the
次に、図3および図4を参照してCPU11により実行される画像処理について説明する。図3および図4は、画像処理を示すフローチャートである。図3に示す処理は、前処理と呼ばれる処理であり、この処理では、元画像を縮小し、縮小した画像に基づいて反射率Rの正規化を行うためのクリップ範囲が設定される。
Next, image processing executed by the
この前処理では、まず、元画像データに付随している元画像のサイズを示すデータを元画像サイズメモリ13dに記憶する(S1)。この画像のサイズを示すデータは、通常長方形の画像を構成する縦と横のピクセル数により表される値である。
In this preprocessing, first, data indicating the size of the original image attached to the original image data is stored in the original
次に、印刷パラメータメモリ13eに記憶された印刷パラメータの中から縮小画像サイズと縮小アルゴリズムを設定する際に必要なパラメータを読み出す(S2)。この、実施形態では、印刷パラメータのうち、印刷モード、用紙種類、用紙サイズが必要なパラメータである。
Next, parameters necessary for setting the reduced image size and the reduction algorithm are read out from the print parameters stored in the
次に、これらのパラメータなどに基づいて縮小画像サイズと縮小アルゴリズムを決定し、決定した縮小画像サイズを縮小画像サイズメモリ13f、縮小アルゴリズムを13gにそれぞれ記憶する(S3)。この処理については、図5〜7を参照して後述する。
Next, the reduced image size and the reduction algorithm are determined based on these parameters and the like, and the determined reduced image size is stored in the reduced
次に、縮小画像用マスクを準備する(S4)。具体的には、ROM12から縮小画像用マスクを読み出し、マスクメモリ13hに記憶する。
Next, a reduced image mask is prepared (S4). Specifically, the reduced image mask is read from the
次に、縮小画像を形成する。縮小画像を形成する処理では、まず、元画像を記憶しているPC2などから、1ライン単位で読み込み、RAM13の元画像メモリ13aに記憶する(S6)。デジタルカメラなどにより形成された画像データは、JPEGなどの圧縮法により圧縮されて記憶され、長方形の画像の横方向のピクセルのライン順に記憶されている。
Next, a reduced image is formed. In the process of forming a reduced image, first, it is read in units of one line from the
次に、元画像メモリ13aに記憶された画像データのライン数が、縮小画像アルゴリズムメモリ13gに記憶された縮小アルゴリズムにより縮小することができるライン数のデータが記憶されたか否かを判断し(S7)、縮小できるライン数が記憶されていない場合は(S7:No)、S4の処理に戻り、縮小できるライン数が記憶されている場合は(S7:Yes)、その縮小アルゴリズムに従って縮小画像データを形成し(S8)、その縮小画像をRAMに記憶する(S9)。なお、縮小アルゴリズムが、最近傍法である場合には1ライン、バイリニア法である場合には2ライン、バイキュービック法である場合には3ライン、平均画素法の場合は、縮小率に応じたライン数の元画像データが、「縮小できるライン数」に相当する。縮小画像データをRAMに記憶し、次に1ライン分の元画像を読み込んで元画像メモリ13aに記憶する場合は、先に記憶したデータに上書きする。このことにより、元画像メモリ13aの記憶容量を削減することができる。
Next, it is determined whether or not the number of lines of image data stored in the
次に、元画像の全てのラインについて走査を行って縮小画像を形成したか否かを判断し(S10)、まだ、未処理のラインが残っている場合は(S10:No)、S4の処理に戻り、全ラインについて処理を終了した場合は(S10:Yes)、縮小画像の各画素について輝度信号Yと色信号Cb,Crに変換する(S11)。 Next, it is determined whether or not all the lines of the original image have been scanned to form a reduced image (S10). If unprocessed lines still remain (S10: No), the process of S4 is performed. Returning to FIG. 5, when the processing is completed for all lines (S10: Yes), each pixel of the reduced image is converted into a luminance signal Y and color signals Cb and Cr (S11).
輝度信号Yおよび色信号Cb,Crは、元の画素のRGB値から次式により演算される。 The luminance signal Y and the color signals Cb and Cr are calculated from the RGB values of the original pixels by the following formula.
次に、上式により演算された輝度信号Yについて、反射率Rs(x,y)を算出する(S12)。なお、「s」は、縮小画像についての接尾辞であり、元画像については、接尾辞を付さないものとする。反射率Rsは、縮小画像の各画素の輝度値をIs(x,y)、縮小画像用のフィルタをFs(x,y)として、次式により演算される。 Next, the reflectance Rs (x, y) is calculated for the luminance signal Y calculated by the above equation (S12). Note that “s” is a suffix for the reduced image, and no suffix is added to the original image. The reflectance Rs is calculated by the following equation, assuming that the luminance value of each pixel of the reduced image is Is (x, y) and the filter for the reduced image is Fs (x, y).
なお、「*」は、畳み込み演算(コンボリューション)を示し、この畳み込み演算により周辺平均輝度(周辺平均値)が求められる。なお、logは、eを底とする自然対数である。
Note that “*” indicates a convolution operation (convolution), and the peripheral average luminance (peripheral average value) is obtained by this convolution operation. Note that log is a natural logarithm with e as the base.
次に、上記演算により求められた反射率Rs(x,y)をRAM13の縮小レティネックス画像メモリ13bに記憶する(S13)。
Next, the reflectance Rs (x, y) obtained by the above calculation is stored in the reduced
次に、Rs(x,y)を最大値および最小値と比較する(S14)。詳細には、最初の座標について求めた反射率Rs(x,y)を最大値および最小値とし、そのつぎから求めた反射率Rs(x,y)と最大値および最小値とをそれぞれ比較し、今回求めた反射率Rs(x,y)が、最大値より大きい場合は、今回求めた反射率Rs(x,y)を新たな最大値とし、今回求めた反射率Rs(x,y)が、最小値より小さい場合は、今回求めた反射率Rs(x,y)を新たな最小値とし、今回求めた反射率Rs(x,y)が、最大値より小さく、最小値より大きい場合は、最大値、最小値を変更しないという処理である。 Next, Rs (x, y) is compared with the maximum value and the minimum value (S14). Specifically, the reflectance Rs (x, y) obtained for the first coordinate is set as the maximum value and the minimum value, and the reflectance Rs (x, y) obtained from the next is compared with the maximum value and the minimum value, respectively. When the reflectance Rs (x, y) obtained this time is larger than the maximum value, the reflectance Rs (x, y) obtained this time is set as a new maximum value, and the reflectance Rs (x, y) obtained this time is obtained. Is smaller than the minimum value, the reflectance Rs (x, y) obtained this time is set as a new minimum value, and the reflectance Rs (x, y) obtained this time is smaller than the maximum value and larger than the minimum value. Is a process of not changing the maximum value and the minimum value.
次に、縮小画像の全ての座標についてS12〜S14の処理を行ったか否かを判断し(S15)、まだ、未処理の座標がある場合は(S15:No)、S12の処理に戻り、全ての座標についての処理を終了した場合は(S15:Yes)、S14の処理により求めた最大値と最小値に基づいて、反射率Rs(x,y)を正規化し、ヒストグラムを形成する(S16)。 Next, it is determined whether or not the processing of S12 to S14 has been performed for all coordinates of the reduced image (S15). If there are still unprocessed coordinates (S15: No), the processing returns to S12 and all of them are performed. When the process for the coordinates of (1) is finished (S15: Yes), the reflectance Rs (x, y) is normalized based on the maximum value and the minimum value obtained by the process of S14, and a histogram is formed (S16). .
次に、その形成されたヒストグラムからメディアン値を求め(S17)、そのメディアン値とヒストグラムとから反射率Rs(x,y)のクリップされる範囲(クリップ範囲)を定める(S18)。このクリップ範囲は、例えば、メディアン値より大きい値で、全標本の45%の標本が含まれる上限値をクリップ範囲の上限値とし、メディアン値より小さい値で、全標本の45%が含まれる下限値をクリップ範囲の下限値とするものである。 Next, a median value is obtained from the formed histogram (S17), and a clipped range (clip range) of the reflectance Rs (x, y) is determined from the median value and the histogram (S18). This clip range is, for example, a value larger than the median value, and an upper limit value that includes 45% of all samples is the upper limit value of the clip range, and a lower value that is less than the median value and includes 45% of all samples. The value is the lower limit value of the clip range.
以上の前処理により、元画像を縮小した縮小画像の反射率により構成される縮小レティネックス画像を形成し、その縮小レティネックス画像から、元画像の反射率を正規化する際のクリップ範囲が求められる。このことにより、クリップ範囲を求めるための演算の回数が、元画像について求める演算の回数より非常に少なくすることができ、処理速度が速くなる。また、縮小された画像のレティネックス画像を記憶するので、元画像のレティネックス画像を記憶する場合に比べ、少ない記憶容量で処理することができるという利点がある。また、縮小画像を用いて求めたクリップ範囲と、元画像を用いて求めたクリップ範囲とは、大差がない。次表は、縮小画像により求めたクリップ範囲(上限値と下限値)と元画像により求めたクリップ範囲との差異を示すものである。 Through the above pre-processing, a reduced Retinex image composed of the reduced image reflectance obtained by reducing the original image is formed, and the clip range for normalizing the reflectance of the original image is obtained from the reduced Retinex image. It is done. As a result, the number of calculations for obtaining the clip range can be made much smaller than the number of calculations for the original image, and the processing speed is increased. Further, since the Retinex image of the reduced image is stored, there is an advantage that the processing can be performed with a small storage capacity compared with the case of storing the Retinex image of the original image. Further, there is no large difference between the clip range obtained using the reduced image and the clip range obtained using the original image. The following table shows the difference between the clip range (upper limit and lower limit) obtained from the reduced image and the clip range obtained from the original image.
この表が示すように、元画像により求めた最大値は、2.712、最小値は、−4.063であり、縮小画像により求めた最大値は、1.729、最小値は、−2.607である。よって、元画像により求めた最大値と縮小画像により求めた最大値との差は、0.983であり、元画像により求めた最小値と縮小画像により求めた最小値との差は、1.456であって、かなり大きな差が認められる。
As shown in this table, the maximum value obtained from the original image is 2.712, the minimum value is −4.063, the maximum value obtained from the reduced image is 1.729, and the minimum value is −2 .607. Therefore, the difference between the maximum value obtained from the original image and the maximum value obtained from the reduced image is 0.983, and the difference between the minimum value obtained from the original image and the minimum value obtained from the reduced image is 1. 456, and a considerable difference is recognized.
一方、元画像により求めたクリップ範囲の上限値は、0.825、下限値は、−0.822であり、縮小画像により求めた上限値は、0.742、下限値は、−0.755である。よって、元画像により求めた上限値と縮小画像により求めた上限値との差は、0.083であり、元画像により求めた下限値と縮小画像により求めた下限値との差は、0.067であって、これらの差が小さいことが分かる。 On the other hand, the upper limit value of the clip range obtained from the original image is 0.825, the lower limit value is −0.822, the upper limit value obtained from the reduced image is 0.742, and the lower limit value is −0.755. It is. Therefore, the difference between the upper limit value obtained from the original image and the upper limit value obtained from the reduced image is 0.083, and the difference between the lower limit value obtained from the original image and the lower limit value obtained from the reduced image is 0. 0. 067, and it can be seen that these differences are small.
次に、図3に示す処理により求められたクリップ範囲に基づいて行う後処理である元画像のレティネックス処理について説明する。 Next, the Retinex process of the original image, which is a post process performed based on the clip range obtained by the process shown in FIG. 3, will be described.
図4は、元画像のレティネックス処理を示すフローチャートである。なお、この後処理では、元画像の各画素について処理が行われ、処理された画素値は、順次印刷部15に出力される。
FIG. 4 is a flowchart showing the original image Retinex processing. In this post-processing, each pixel of the original image is processed, and the processed pixel value is sequentially output to the
まず、元画像用マスクを準備する(S20)。なお、この元画像用マスク準備処理の詳細は、図8から図15を参照して後述する。次に、元画像について、反射率R(x,y)を数式1を用いて算出する(S21)。この演算において、フィルタF(x,y)は、マスクメモリ13hに記憶された元画像用のマスクである。
First, an original image mask is prepared (S20). The details of the original image mask preparation processing will be described later with reference to FIGS. Next, the reflectance R (x, y) is calculated for the original image using Equation 1 (S21). In this calculation, the filter F (x, y) is a mask for the original image stored in the
次に、縮小画像を用いて求めたクリップ範囲に基づいて、R(x,y)を正規化し、正規化反射率refle(x,y)を得る(S22)。 Next, based on the clip range obtained using the reduced image, R (x, y) is normalized to obtain a normalized reflectivity refle (x, y) (S22).
次に、このrefle(x,y)を用いて、次式により輝度についてレティネックス処理を行った画素の値Out(x,y)を得る(S23)。なお、数5の項のうち、I(x,y)/refle(x,y)が、正規化レティネックス値に相当する。
Next, using this refle (x, y), a pixel value Out (x, y) subjected to Retinex processing for luminance is obtained by the following equation (S23). Of the terms in
以上の処理により元画像の輝度信号にレティネックス処理が施され、色信号に基づいてRGB値に戻した画素値が求められる。次に、この処理された画素値を印刷部15に出力する(S25)。よって、前処理により、正規化を行うクリップ範囲が特定されているので、後処理では、順次各画素について処理を行い印刷部15に出力することができる。その結果、処理を開始してから、印刷が開始されるまでの時間を短縮することができる。
Through the above processing, the Retinex process is performed on the luminance signal of the original image, and the pixel value returned to the RGB value based on the color signal is obtained. Next, the processed pixel value is output to the printing unit 15 (S25). Therefore, since the clip range to be normalized is specified by the preprocessing, each pixel can be sequentially processed and output to the
次に、元画像の全画素について処理を終了したか否かを判断し(S26)、まだ処理を終了していない画素がある場合は(S26:No)、S21の処理に戻り、全ての画素について処理を終了した場合は(S26:Yes)、この後処理を終了する。 Next, it is determined whether or not the process has been completed for all the pixels of the original image (S26). If there is a pixel that has not been processed yet (S26: No), the process returns to the process of S21 and all the pixels are processed. When the process is finished for (S26: Yes), the process is finished.
次に、図5、図6および図7を参照して、S3の処理である縮小画像サイズと縮小アルゴリズムを決定する処理について説明する。元画像を縮小し、その縮小画像を用いてクリップ範囲を決定し、そのクリップ範囲に基づいて元画像の各画素について補正処理を行うので、クリップ範囲を速く決定することができるとともに、少ない記憶容量で処理することができる。しかしながら、縮小画像のサイズが小さい場合や、縮小された画像の画質の劣化が大きい場合には、適切なクリップ範囲を設定できない場合がある。また、縮小画像サイズを必要以上に大きくしたり、縮小画像の画質を必要以上に高くすれば、処理時間が長くかかり、処理速度が低下する。従って、使用者が設定する印刷パラメータなどに応じた適切な縮小画像のサイズや縮小アルゴリズムを選択する必要がある。 Next, the process of determining the reduced image size and the reduction algorithm, which is the process of S3, will be described with reference to FIGS. The original image is reduced, the clip range is determined using the reduced image, and each pixel of the original image is corrected based on the clip range, so that the clip range can be determined quickly and the storage capacity is small. Can be processed. However, when the size of the reduced image is small or the image quality of the reduced image is greatly deteriorated, an appropriate clip range may not be set. Further, if the reduced image size is increased more than necessary or the image quality of the reduced image is increased more than necessary, the processing time takes longer and the processing speed decreases. Accordingly, it is necessary to select an appropriate reduced image size and reduction algorithm according to the print parameters set by the user.
図5および図6は、印刷モード、用紙種類、用紙サイズ、元画像のサイズに応じて縮小画像サイズと縮小アルゴリズムを設定するためのルックアップテーブルであり、図5は、写真モード用のもの、図6は、普通モード用のものである。これらのテーブルは、ROM12のテーブルメモリ12cに記憶され、図7に示すフローチャートの処理において参照される。
5 and 6 are look-up tables for setting a reduced image size and a reduction algorithm in accordance with the print mode, paper type, paper size, and original image size. FIG. FIG. 6 is for the normal mode. These tables are stored in the
図5は、印刷モードが写真モードである場合に選択されるテーブルであって、まず、用紙の種類により分類される。この実施形態では、光沢紙と普通紙の2種類で分類しているが、これら以外に、インクジェット紙などにより分類してもよい。 FIG. 5 is a table selected when the print mode is the photo mode, and is first classified according to the type of paper. In this embodiment, the paper is classified into two types, glossy paper and plain paper, but in addition to these, the paper may be classified according to inkjet paper or the like.
用紙種類の次に、用紙サイズにより分類される。用紙サイズは、用紙サイズが小さい方から順に、4”×6”、5”×7”、レター、A4の4種類に分類され、さらに、各用紙サイズについて元画像サイズにより分類される。元画像のサイズとしては、600×800、1200×1600、2400×3200(ピクセル)の3種類に分類され、それぞれのサイズについて、縮小画像サイズと縮小アルゴリズムとが設定される。 Next to the paper type, it is classified by the paper size. The paper sizes are classified into four types of 4 ″ × 6 ″, 5 ″ × 7 ″, letter, and A4 in order from the smallest paper size, and further classified according to the original image size for each paper size. The size of the original image is classified into three types of 600 × 800, 1200 × 1600, and 2400 × 3200 (pixels), and a reduced image size and a reduction algorithm are set for each size.
この実施形態では、縮小画像サイズは、150×200、300×400、450×600の3種類、縮小アルゴリズムは、平均画素法(ME)、バイリニア法(BL)、最近傍法(NN)の3類のいずれかが設定される。図6は、印刷モードが普通モードである場合に選択されるテーブルであって、写真モードと同様に、用紙種類、用紙サイズ、元画像サイズにより分類され、縮小画像サイズと縮小アルゴリズムとが設定される。 In this embodiment, there are three types of reduced image sizes of 150 × 200, 300 × 400, and 450 × 600, and three reduction algorithms are the average pixel method (ME), the bilinear method (BL), and the nearest neighbor method (NN). One of the classes is set. FIG. 6 is a table that is selected when the print mode is the normal mode. Like the photo mode, the table is classified according to the paper type, paper size, and original image size, and the reduced image size and the reduction algorithm are set. The
図7は、図3に示すフローチャートのS3の処理の詳細を示すフローチャートである。この処理では、まず印刷パラメータとして選択された印刷モードが写真モードであるか普通モードであるかを判定する(S31)。印刷モードが、写真モードである場合は、写真モード用のテーブルを選択し(S32)、印刷モードが、普通モードである場合は、写真モード用のテーブルを選択し(S33)、印刷パラメータとして設定されている用紙種類、用紙サイズ、および元画像サイズメモリ13dに記憶されている元画像サイズとから、設定されている縮小画像サイズと縮小アルゴリズムとを読み出し、縮小画像サイズメモリ13fと縮小アルゴリズムメモリ13gとにそれぞれ記憶する(S34)。
FIG. 7 is a flowchart showing details of the process of S3 in the flowchart shown in FIG. In this process, it is first determined whether the print mode selected as the print parameter is a photo mode or a normal mode (S31). If the print mode is the photo mode, a table for the photo mode is selected (S32). If the print mode is the normal mode, the table for the photo mode is selected (S33) and set as a print parameter. The set reduced image size and the reduction algorithm are read out from the set paper type, the paper size, and the original image size stored in the original
次に、図8から図15を参照して、元画像用マスク準備処理(S20)について説明する。 Next, the original image mask preparation processing (S20) will be described with reference to FIGS.
まず、図8を参照して、元画像用マスク準備処理(S20)で生成する元画像用マスクのサイズについて説明する。図8(a)は、元画像サイズと、縮小画像サイズの関係を示す模式図であり、図8(b)は、元画像用マスクのサイズと、縮小画像用マスクのサイズとの関係を示す模式図である。なお、「元画像のサイズ」、または「縮小画像のサイズ」は、それぞれの画像を構成する画素数に相当し、本実施形態では横方向の画素数×縦方向の画素数で表記する。 First, the size of the original image mask generated in the original image mask preparation process (S20) will be described with reference to FIG. FIG. 8A is a schematic diagram showing the relationship between the original image size and the reduced image size, and FIG. 8B shows the relationship between the size of the original image mask and the size of the reduced image mask. It is a schematic diagram. The “original image size” or “reduced image size” corresponds to the number of pixels constituting each image, and in the present embodiment, it is represented by the number of pixels in the horizontal direction × the number of pixels in the vertical direction.
また、「元画像用マスクのサイズ」または「縮小画像用マスクのサイズ」は、周辺平均輝度を演算する際の演算領域の大きさであり、本実施形態では、演算領域に含まれる横方向の画素数×縦方向の画素数で、各マスクのサイズを表記する。ここで、マスクの形状は矩形には限られず、円など、矩形以外の形状であっても良いが、その場合、そのマスクを内接する矩形領域の大きさを、マスクのサイズと称することとする。 The “original image mask size” or “reduced image mask size” is the size of the calculation area when calculating the peripheral average luminance. In this embodiment, the horizontal direction included in the calculation area The size of each mask is expressed by the number of pixels × the number of pixels in the vertical direction. Here, the shape of the mask is not limited to a rectangle, but may be a shape other than a rectangle such as a circle. In this case, the size of a rectangular area inscribed in the mask is referred to as a mask size. .
図8(a)に示すように、縮小画像が、元画像を1/2の縮小率で縮小したものである場合(即ち、元画像を2×2の画素毎に複数ブロックに分割し、各ブロックから縮小画像の1画素を形成する場合)、後述する元画像用マスク準備処理(S20)では、縮小画像マスクに比べて、マスクサイズを2倍(縮小率の逆数倍)した、元画像用マスクを生成する。すなわち、縮小画像のサイズと前記縮小画像用マスクのサイズとの比が、元画像のサイズと元画像用マスクのサイズとの比と同じとなるように、元画像用マスクを生成する。このようにすれば、周辺平均輝度を演算する際の演算領域が一致するので、縮小画像の反射率を用いた場合でも好適な正規化パラメータが得られるのである。 As shown in FIG. 8A, when the reduced image is the original image reduced by a reduction ratio of 1/2 (that is, the original image is divided into a plurality of blocks every 2 × 2 pixels, In the case of forming one pixel of the reduced image from the block), in the original image mask preparation process (S20) described later, the original image obtained by doubling the mask size (reciprocal of the reduction ratio) compared to the reduced image mask A mask is generated. That is, the original image mask is generated so that the ratio between the size of the reduced image and the size of the reduced image mask is the same as the ratio between the size of the original image and the size of the original image mask. In this way, since the calculation areas for calculating the peripheral average luminance coincide with each other, a preferable normalization parameter can be obtained even when the reflectance of the reduced image is used.
このように、縮小画像用マスクおよび元画像用マスクは、それぞれ、周辺平均輝度を算出する際の演算領域を定めるものであるが、その領域に含まれる全ての画素について、フィルタ係数を有し、畳み込み演算を行うこととすると、計算量が膨大になる。そこで、縮小画像用マスクおよび元画像用マスクは、それぞれが定める演算領域内の画素を、参照画素と、間引き画素とに区分し、参照画素の値のみ周辺平均輝度に値を反映させることにより、計算量を削減することが行われている。 As described above, each of the reduced image mask and the original image mask defines a calculation area when calculating the peripheral average luminance, and has a filter coefficient for all pixels included in the area, If the convolution operation is performed, the amount of calculation becomes enormous. Therefore, the reduced image mask and the original image mask divide the pixels in the calculation region determined by each into reference pixels and thinned pixels, and reflect only the value of the reference pixels in the peripheral average luminance, Reducing the amount of calculation has been done.
図9から図11を参照して、縮小画像用マスクおよび元画像用マスクにおける間引きのパターンについて説明する。図9から図11は、縮小画像用マスクおよび元画像用マスクを模式的に示す図であり、フィルタ係数を間引いた要素(間引きポイント)を白色で示し、フィルタ係数を有する要素(参照ポイント)をグレイ色で示した図である。図9から図11を参照して説明する縮小画像用マスクおよび元画像用マスクは、元画像を1/4に縮小し、縮小画像を形成した場合に適用されるマスクの一例である。上述したように、マスクサイズの比率は、縮小画像と元画像との比率に等しいので、縮小画像用マスクは、元画像用マスクのサイズ(例えば、16×16画素)の1/4のサイズ(例えば、4×4画素)を有する。 The thinning pattern in the reduced image mask and the original image mask will be described with reference to FIGS. 9 to 11 are diagrams schematically showing a reduced image mask and an original image mask, in which elements (thinning points) obtained by thinning out filter coefficients are shown in white, and elements (reference points) having filter coefficients are shown. It is the figure shown in the gray color. The reduced image mask and the original image mask described with reference to FIGS. 9 to 11 are examples of masks applied when the original image is reduced to ¼ to form a reduced image. As described above, since the ratio of the mask size is equal to the ratio between the reduced image and the original image, the reduced image mask has a size (1/4) of the size of the original image mask (for example, 16 × 16 pixels) ( For example, 4 × 4 pixels).
本実施形態では、縮小画像用マスクおよび元画像用マスクの最左かつ最上の要素を(0,0)とし、横方向をX軸方向、縦方向をY軸方向として、マスク上の各要素を座標で表すこととする。例えば、(0,0)からX軸方向に2個目かつY軸方向に3個目の要素は(2,3)と表す。 In the present embodiment, the leftmost and uppermost elements of the reduced image mask and the original image mask are (0, 0), the horizontal direction is the X-axis direction, and the vertical direction is the Y-axis direction. It shall be expressed in coordinates. For example, the second element in the X-axis direction and the third element in the Y-axis direction from (0, 0) is represented as (2, 3).
まず、図9を参照して、縮小画像用マスクについて説明する。縮小画像に対し、縮小画像用マスクをずらしつつ畳み込み演算を行うことにより、縮小画像の各画素について反射率が取得される。1の反射率を取得する際には、4×4画素のサイズを有する縮小画像用マスクを、縮小画像の4×4画素に対応させ、参照ポイントに対応する画素(以下、参照画素という)の値には、その参照ポイントのフィルタ係数が乗算され、反射率に値が反映される。一方、間引きポイントに対応する画素(以下、間引き画素という)の値は間引かれ、反射率の演算の際に値が反映されない。このように、一部の画素の値を間引くことにより演算処理を軽減することができる。 First, the reduced image mask will be described with reference to FIG. By performing a convolution operation on the reduced image while shifting the reduced image mask, the reflectance is obtained for each pixel of the reduced image. When a reflectance of 1 is obtained, a reduced image mask having a size of 4 × 4 pixels is associated with 4 × 4 pixels of the reduced image, and a pixel corresponding to a reference point (hereinafter referred to as a reference pixel). The value is multiplied by the filter coefficient of the reference point, and the value is reflected in the reflectance. On the other hand, the values of pixels corresponding to the thinning points (hereinafter referred to as thinning pixels) are thinned out, and the values are not reflected when calculating the reflectance. In this way, arithmetic processing can be reduced by thinning out values of some pixels.
また、元画像用マスクも同様に、元画像に対し、元画像用マスクをずらしつつ畳み込み演算を行うことにより、元画像の各画素について反射率が取得される。1の反射率を取得する際には、16×16画素のサイズを有する元画像用マスクを、元画像の16×16画素に対応させ、参照ポイントに対応する参照画素の値には、その参照ポイントのフィルタ係数が乗算され、間引きポイントに対応する間引き画素の値は間引かれる。 Similarly, with respect to the original image mask, by performing a convolution operation on the original image while shifting the original image mask, the reflectance is obtained for each pixel of the original image. When obtaining a reflectance of 1, an original image mask having a size of 16 × 16 pixels is made to correspond to 16 × 16 pixels of the original image, and the reference pixel value corresponding to the reference point is referred to by the reference The point filter coefficient is multiplied, and the value of the thinned pixel corresponding to the thinned point is thinned.
ここで、縮小画像から得られる反射率と、元画像から得られる反射率とを可及的に近似させるために、元画像用マスクにおける参照ポイントのパターンを、縮小画像用マスクにおける参照ポイントのパターンに対応させたものとする。 Here, in order to approximate the reflectance obtained from the reduced image and the reflectance obtained from the original image as much as possible, the reference point pattern in the original image mask is changed to the reference point pattern in the reduced image mask. It is assumed that it corresponds to.
図9に示す元画像用マスクは、縮小画像形成時に、縮小アルゴリズムとして平均画素法が選択された場合に生成される元画像用マスクである。1/4の縮小率で縮小画像を形成する場合、元画像を4×4の画素毎に複数ブロックに分割し、各ブロック毎に、縮小画像の1の画素が形成される。ここで、平均画素法により縮小画像が形成される場合、元画像の1のブロックを構成する4×4の画素の全てが抽出され、その抽出された画素の値から、縮小画像の1画素が形成される。 The original image mask shown in FIG. 9 is an original image mask generated when the average pixel method is selected as a reduction algorithm when forming a reduced image. When a reduced image is formed at a reduction ratio of 1/4, the original image is divided into a plurality of blocks for each 4 × 4 pixel, and one pixel of the reduced image is formed for each block. Here, when a reduced image is formed by the average pixel method, all 4 × 4 pixels constituting one block of the original image are extracted, and one pixel of the reduced image is extracted from the extracted pixel values. It is formed.
よって、縮小画像用マスクの演算領域により定められる縮小画像の4×4の画素が、元画像用フィルタの演算領域により定められる元画像の16×16の画素を縮小した関係にあるとき、縮小画像における参照画素形成の際に抽出された、元画像の4×4の画素が参照画素とされるように、元画像用マスクの参照ポイントを決定する。このようにすれば、縮小画像の反射率に反映される画素値と、元画像の反射率に反映される画素値とが近似する。その結果、縮小画像の反射率を用いた場合でも好適な正規化パラメータを得ることができ、レティネックス処理を高精度に行うことができる。 Therefore, when the 4 × 4 pixels of the reduced image determined by the calculation area of the reduced image mask are in a relationship in which the 16 × 16 pixels of the original image determined by the calculation area of the original image filter are reduced, the reduced image The reference point of the mask for the original image is determined so that the 4 × 4 pixels of the original image extracted at the time of forming the reference pixel in FIG. In this way, the pixel value reflected in the reflectance of the reduced image approximates the pixel value reflected in the reflectance of the original image. As a result, a suitable normalization parameter can be obtained even when the reflectance of the reduced image is used, and the Retinex process can be performed with high accuracy.
図10に示す元画像用マスクは、縮小アルゴリズムとしてバイリニア法(BL法)が選択された場合の元画像用マスクである。バイリニア法により1/4の縮小率で縮小画像が形成される場合、元画像を4×4の画素毎に複数ブロックに分割し、各ブロックから互いに隣接する4画素が抽出され、それら4画素の値を補間して縮小画像の1画素が形成される。 The original image mask shown in FIG. 10 is an original image mask when the bilinear method (BL method) is selected as the reduction algorithm. When a reduced image is formed at a reduction ratio of 1/4 by the bilinear method, the original image is divided into a plurality of blocks for every 4 × 4 pixels, and 4 pixels adjacent to each other are extracted from each block. One pixel of the reduced image is formed by interpolating the values.
よって、縮小画像用マスクの演算領域により定められる縮小画像の4×4の画素が、元画像用フィルタの演算領域により定められる元画像の16×16の画素を縮小した関係にあるとき、縮小画像における参照画素の元となった、元画像の4×4の画素のうち、縮小画像形成の際に抽出された4画素が、元画像の参照画素となるように、元画像用マスクの参照ポイントを決定する。このようにすれば、縮小画像の反射率に反映される画素値と、元画像の反射率に反映される画素値とを近似させることができ、縮小画像の反射率を用いた場合でも好適な正規化パラメータを得ることができる。 Therefore, when the 4 × 4 pixels of the reduced image determined by the calculation area of the reduced image mask are in a relationship in which the 16 × 16 pixels of the original image determined by the calculation area of the original image filter are reduced, the reduced image The reference point of the mask for the original image so that four pixels extracted at the time of forming the reduced image among the 4 × 4 pixels of the original image that are the source of the reference pixel in FIG. To decide. In this way, the pixel value reflected in the reflectance of the reduced image and the pixel value reflected in the reflectance of the original image can be approximated, which is preferable even when the reflectance of the reduced image is used. Normalization parameters can be obtained.
図11に示す元画像用マスクは、縮小アルゴリズムとして最近傍法(NN法)が選択された場合の元画像用マスクである。最近傍法により1/4の縮小率で縮小画像が形成される場合、元画像を4×4の画素毎に複数ブロックに分割し、各ブロックから1画素が抽出され、その1画素の値が、そのまま縮小画像の1画素とされる。 The original image mask shown in FIG. 11 is an original image mask when the nearest neighbor method (NN method) is selected as the reduction algorithm. When a reduced image is formed at a reduction ratio of 1/4 by the nearest neighbor method, the original image is divided into a plurality of blocks every 4 × 4 pixels, and one pixel is extracted from each block, and the value of the one pixel is This is used as one pixel of the reduced image as it is.
よって、縮小画像における参照画素に対応する4×4の画素のうち、縮小画像における参照画素の元となった1画素が、元画像の参照画素となるように、元画像用マスクの参照ポイントを決定する。このようにすれば、縮小画像の反射率に反映される画素値と、元画像の反射率に反映される画素値とを近似させることができ、縮小画像の反射率を用いた場合でも好適な正規化パラメータを得ることができる。 Therefore, the reference point of the mask for the original image is set so that one of the 4 × 4 pixels corresponding to the reference pixel in the reduced image becomes the reference pixel of the original image. decide. In this way, the pixel value reflected in the reflectance of the reduced image and the pixel value reflected in the reflectance of the original image can be approximated, which is preferable even when the reflectance of the reduced image is used. Normalization parameters can be obtained.
図12を参照して、元画像用マスク準備処理(S20)について説明する。図12は、元画像用マスク準備処理を示すフローチャートである。この元画像用マスク準備処理は、縮小画像形成時に選択された縮小アルゴリズムに基づいて、元画像用マスクを準備する処理である。 The original image mask preparation process (S20) will be described with reference to FIG. FIG. 12 is a flowchart showing the original image mask preparation processing. This original image mask preparation process is a process for preparing an original image mask based on a reduction algorithm selected when a reduced image is formed.
まず、縮小画像形成時に選択された縮小アルゴリズムを、縮小アルゴリズムメモリ13g(図1参照)から読み出す(S201)。次に、縮小率を読み出す(S202)。ここで、縮小率とは、元画像の片辺長に対する縮小画像の片辺長の比に相当する値である。
First, the reduction algorithm selected at the time of reduced image formation is read from the
次に、縮小画像用マスクのサイズを、マスクメモリ13h(図1参照)から読み出す(S203)。そして、縮小画像用マスクのサイズと、縮小率とから、元画像用マスクのサイズを決定する(S204)。具体的には、縮小画像用マスクのサイズに、縮小率の逆数を乗算した値を、元画像用マスクのサイズとする。このようにすれば、縮小画像のサイズと縮小画像用フィルタのサイズとの比が、元画像のサイズと元画像用マスクのサイズとの比と同じとなるように、元画像用マスクのサイズを決定することができる(図8参照)。
Next, the size of the reduced image mask is read from the
次に、S201の処理において読み込んだ縮小アルゴリズムに基づいて処理が分岐する(S205)。縮小アルゴリズムが平均画素法であった場合(S205:平均画素法)、サブルーチンA(S206)に進み、図9を参照して説明した元画像用マスクの参照ポイントを決定する。縮小アルゴリズムがバイリニア法であった場合(S205:バイリニア法)、サブルーチンB(S208)に進み、図10を参照して説明した元画像用マスクの参照ポイントを決定する。縮小アルゴリズムが最近傍法であった場合(S205:最近傍法)、サブルーチンC(S210)に進み、図11を参照して説明した元画像用マスクの参照ポイントを決定する。 Next, the process branches based on the reduction algorithm read in the process of S201 (S205). When the reduction algorithm is the average pixel method (S205: average pixel method), the process proceeds to subroutine A (S206), and the reference point of the original image mask described with reference to FIG. 9 is determined. When the reduction algorithm is the bilinear method (S205: bilinear method), the process proceeds to subroutine B (S208) to determine the reference point of the original image mask described with reference to FIG. When the reduction algorithm is the nearest neighbor method (S205: nearest neighbor method), the process proceeds to subroutine C (S210), and the reference point of the original image mask described with reference to FIG. 11 is determined.
次に、生成された元画像用マスクを、マスクメモリ13h(図1参照)に記憶し(S212)、元画像用マスク準備処理を終了する。
Next, the generated original image mask is stored in the
図13を参照して、サブルーチンA(S206)について説明する。図13は、サブルーチンAを示すフローチャートである。サブルーチンA(S206)は、縮小アルゴリズムとして平均画素法が選択された場合に実行される処理である。 The subroutine A (S206) will be described with reference to FIG. FIG. 13 is a flowchart showing the subroutine A. Subroutine A (S206) is a process executed when the average pixel method is selected as the reduction algorithm.
サブルーチンAでは、まず、S204の処理(図12参照)で決定した元画像用マスクのサイズを読み出す(S2061)。次に、縮小画像用マスクサイズに対する元画像用マスクサイズの倍率BRを算出する(S2062)。なお、倍率BRは、下記(1)の式で算出され、小数点以下を切り上げた値である。
BR=元画像用マスク縦方向のサイズ/縮小画像用マスク縦方向のサイズ ・・・(1)
次に、下記の式(2)より、元画像用マスクの参照ポイント数Mを算出する(S2063)。
元画像用マスク参照ポイント数M=縮小画像用マスク参照ポイント数m×(縮小画像の1画素の形成時に抽出された元画像の画素数) ・・・(2)
平均画素法により縮小画像が形成される場合、元画像の(BR)2個の画素から縮小画素の1画素が形成されるから、サブルーチンAにおいて、(2)の式の(縮小画像の1画素形成に抽出された元画像の画素数)は、(BR)2である。
In the subroutine A, first, the size of the original image mask determined in the process of S204 (see FIG. 12) is read (S2061). Next, the magnification BR of the original image mask size with respect to the reduced image mask size is calculated (S2062). The magnification BR is a value calculated by the following equation (1) and rounded up after the decimal point.
BR = original image mask vertical size / reduced image mask vertical size (1)
Next, the reference point number M of the original image mask is calculated from the following equation (2) (S2063).
Number of mask reference points for original image M = number of mask reference points for reduced image m × (number of pixels of original image extracted when one pixel of reduced image is formed) (2)
When the reduced image is formed by the average pixel method, one pixel of the reduced pixel is formed from the two (BR) pixels of the original image. Therefore, in the subroutine A, (one pixel of the reduced image) in the expression (2) The number of pixels of the original image extracted for formation) is (BR) 2 .
次に、変数i=1とし(S2064)、縮小画像用マスクにおけるi番目の参照ポイント(Xsi,Ysi)を読み出す(S2065)。そして、読み出した参照ポイント(Xsi,Ysi)から、元画像用マスクの基準参照ポイントMainPointを求める(S2066)。この演算は、下記式(3)で表される。
MainPoint(x)=Xsi・BR
MainPoint(y)=Ysi・BR ・・・(3)
Next, the variable i is set to 1 (S2064), and the i-th reference point (Xsi, Ysi) in the reduced image mask is read (S2065). Then, a reference reference point MainPoint of the original image mask is obtained from the read reference points (Xsi, Ysi) (S2066). This calculation is represented by the following formula (3).
MainPoint (x) = Xsi · BR
MainPoint (y) = Ysi · BR (3)
次に、カウンタCountX=0とし、カウンタCountY=0とする(S2067)。そして、下記(4)式に従って、元画像用マスクの参照ポイント(XL,YL)を求める(S2068)。
XL=MainPoint(x)+CountX
YL=MainPoint(y)+CountY ・・・(4)
Next, the counter CountX = 0 and the counter CountY = 0 are set (S2067). Then, the reference point (X L , Y L ) of the original image mask is obtained according to the following equation (4) (S2068).
X L = MainPoint (x) + CountX
Y L = MainPoint (y) + CountY (4)
そして、得られた参照ポイント(XL,YL)について、ガウス関数によりフィルタ係数を演算し(S2069)、RAM13に格納する(S2070)。 Then, with respect to the obtained reference point (X L , Y L ), a filter coefficient is calculated by a Gaussian function (S2069) and stored in the RAM 13 (S2070).
次に、カウンタCountXの値に「1」を加算し(S2071)、カウンタCountX≧BRとなったか否かを判断する(S2072)。カウンタCountXがBRより小である間は(S2072:No)、S2068の処理に戻り、X軸方向に隣接するポイントが、参照ポイントとして求められる。 Next, “1” is added to the value of the counter CountX (S2071), and it is determined whether or not the counter CountX ≧ BR is satisfied (S2072). While the counter CountX is smaller than BR (S2072: No), the processing returns to S2068 and a point adjacent in the X-axis direction is obtained as a reference point.
このようにして処理を繰り返す内に、カウンタCountX=BRとなると(S2072:Yes)、次に、カウンタCountX=0とし、カウンタCountYの値に「1」を加算する(S2073)。カウンタCountY≧BRとなったか否かを判断する(S2074)。カウンタCountYがBRより小である間は(S2074:No)、S2068の処理に戻り、次の参照ポイントを算出する。 If the counter CountX = BR is satisfied while the processing is repeated in this way (S2072: Yes), then the counter CountX = 0 and “1” is added to the value of the counter CountY (S2073). It is determined whether or not the counter CountY ≧ BR is satisfied (S2074). While the counter CountY is smaller than BR (S2074: No), the processing returns to S2068 to calculate the next reference point.
このようにして処理を繰り返す内に、カウンタCountY=BRとなると(S2074:Yes)、すなわち、縮小画像用マスクの1の参照ポイントについて、元画像用マスクのBR2個の参照ポイントが決定されると、次に、変数iに「1」を加算し(S2075)、変数iが、縮小画像用マスクの参照ポイント数mより大となったか否かを判断する(S2076)。変数iが、m以下である間は(S2076:No)、S2065の処理に戻り、縮小画像用マスクの次の参照ポイントを読み出す。 If the counter CountY = BR is satisfied while the processing is repeated in this way (S2074: Yes), that is, two reference points of the original image mask BR are determined for one reference point of the reduced image mask. Then, “1” is added to the variable i (S2075), and it is determined whether or not the variable i is larger than the reference point number m of the reduced image mask (S2076). While the variable i is equal to or less than m (S2076: No), the process returns to S2065, and the next reference point of the reduced image mask is read.
このようにして処理を繰り返す内に、変数i=mとなった場合(S2076:Yes)、すなわち、縮小画像用マスクの全ての参照ポイントについて、対応する元画像用マスクの参照ポイントが算出された場合、サブルーチンAを終了する。サブルーチンAによれば、図9を参照して説明したように、元画像用マスクの参照ポイントとそのフィルタ係数とが決定される。 When the variable i becomes equal to m while repeating the process in this manner (S2076: Yes), that is, for all the reference points of the reduced image mask, the corresponding reference points of the original image mask are calculated. If so, the subroutine A is terminated. According to the subroutine A, as described with reference to FIG. 9, the reference point of the original image mask and its filter coefficient are determined.
図14を参照して、サブルーチンB(S208)について説明する。図14は、サブルーチンBを示すフローチャートである。サブルーチンB(S208)は、バイリニア法により縮小画像が形成された場合に実行される処理である。なお、図14に示すフローチャートに示すステップのうち、図13のフローチャートに示したステップと同一のものは、同一の符号を付して簡略に説明する。 The subroutine B (S208) will be described with reference to FIG. FIG. 14 is a flowchart showing the subroutine B. Subroutine B (S208) is a process executed when a reduced image is formed by the bilinear method. Of the steps shown in the flowchart shown in FIG. 14, the same steps as those shown in the flowchart of FIG.
サブルーチンBでは、まず、元画像用マスクのサイズを読み出し(S2061)、縮小画像用マスクサイズに対する元画像用マスクサイズの倍率BRを算出する(S2062)。 In the subroutine B, first, the size of the original image mask is read (S2061), and the magnification BR of the original image mask size with respect to the reduced image mask size is calculated (S2062).
次に、元画像用マスクの参照ポイント数Mを算出する(S2063)。バイリニア法で縮小画像が形成される場合、元画像の4画素から縮小画像の1画素が形成されるから、上記(2)の式の(縮小画像の1画素形成に抽出された元画像の画素数)に、「4」が代入される。 Next, the reference point number M of the original image mask is calculated (S2063). When the reduced image is formed by the bilinear method, one pixel of the reduced image is formed from the four pixels of the original image. Therefore, the pixel of the original image extracted in the formation of one pixel of the reduced image in the above formula (2) “4” is assigned to (number).
次に、変数i=1とし(S2064)、縮小画像用マスクにおけるi番目の参照ポイント(Xsi,Ysi)を読み出す(S2065)。そして、読み出した参照ポイント(Xsi,Ysi)から、元画像用マスクの基準参照ポイントMainPointを求める(S2066)。 Next, the variable i is set to 1 (S2064), and the i-th reference point (Xsi, Ysi) in the reduced image mask is read (S2065). Then, a reference reference point MainPoint of the original image mask is obtained from the read reference points (Xsi, Ysi) (S2066).
次に、カウンタCountX=0とし、カウンタCountY=0とする(S2067)。そして、上記(4)の式に従って、元画像用マスクの参照ポイント(XL,YL)を算出する(S2068)。そして、算出した参照ポイント(XL,YL)について、ガウス関数によりフィルタ係数を演算し(S2069)、RAM13に格納する(S2070)。 Next, the counter CountX = 0 and the counter CountY = 0 are set (S2067). Then, the reference point (X L , Y L ) of the original image mask is calculated according to the equation (4) (S2068). Then, for the calculated reference point (X L , Y L ), a filter coefficient is calculated by a Gaussian function (S2069) and stored in the RAM 13 (S2070).
次に、カウンタCountXの値に「1」を加算し(S2081)、カウンタCountX≧2となったか否かを判断する(S2082)。カウンタCountXが2より小である間は(S2082:No)、S2068の処理に戻り、X軸方向に隣接するポイントが、参照ポイントとして算出される。 Next, “1” is added to the value of the counter CountX (S2081), and it is determined whether or not the counter CountX ≧ 2 is satisfied (S2082). While the counter CountX is smaller than 2 (S2082: No), the process returns to S2068, and a point adjacent in the X-axis direction is calculated as a reference point.
このようにして処理を繰り返す内に、カウンタCountX=2となると(S2082:Yes)、次に、カウンタCountX=0とし、カウンタCountYの値に「1」を加算する(S2083)。そして、カウンタCountY≧2となったか否かを判断する(S2084)。カウンタCountYが2より小である間は(S2084:No)、S2068の処理に戻り、次の参照ポイントを算出する。 If the counter CountX = 2 is reached while the processing is repeated in this way (S2082: Yes), then the counter CountX = 0 and “1” is added to the value of the counter CountY (S2083). Then, it is determined whether or not the counter CountY ≧ 2 is satisfied (S2084). While the counter CountY is smaller than 2 (S2084: No), the processing returns to S2068 to calculate the next reference point.
このようにして処理を繰り返す内に、カウンタCountY=2となると(S2084:Yes)、すなわち、縮小画像用マスクの1の参照ポイントに対し、元画像用マスクの4個の参照ポイントが決定されると、次に、変数iに「1」を加算し(S2085)、変数i=mとなるまで、すなわち、縮小画像用マスクの全ての参照ポイントについて、対応する元画像用マスクの参照ポイントが算出されるまで処理を繰り返し、サブルーチンBを終了する。サブルーチンBによれば、図10を参照して説明したように、元画像用マスクの参照ポイントとそのフィルタ係数とが決定される。 When the counter CountY = 2 is reached while repeating the processing in this way (S2084: Yes), that is, four reference points of the original image mask are determined with respect to one reference point of the reduced image mask. Then, “1” is added to the variable i (S2085), and the reference point of the corresponding original image mask is calculated until the variable i = m, that is, for all the reference points of the reduced image mask. The process is repeated until the subroutine B is completed. According to the subroutine B, as described with reference to FIG. 10, the reference point of the original image mask and its filter coefficient are determined.
図15を参照して、サブルーチンC(S210)について説明する。図15は、サブルーチンCを示すフローチャートである。サブルーチンC(S210)は、最近傍法により縮小画像が形成された場合に実行される処理である。なお、図15に示すフローチャートに示すステップのうち、図13のフローチャートに示したステップと同一のステップについては、同一の符号を付して簡略に説明する。 The subroutine C (S210) will be described with reference to FIG. FIG. 15 is a flowchart showing the subroutine C. Subroutine C (S210) is a process executed when a reduced image is formed by the nearest neighbor method. Of the steps shown in the flowchart shown in FIG. 15, the same steps as those shown in the flowchart of FIG.
サブルーチンCでは、まず、元画像用マスクのサイズを読み出し(S2061)、縮小画像用マスクサイズに対する元画像用マスクサイズの倍率BRを算出する(S2062)。 In the subroutine C, first, the size of the original image mask is read (S2061), and the magnification BR of the original image mask size with respect to the reduced image mask size is calculated (S2062).
次に、元画像用マスクの参照ポイント数Mを算出する(S2063)。最近傍法で縮小画像が形成される場合、元画像の1画素から縮小画像の1画素が形成されるから、上記(2)の式の(縮小画像の1画素形成に抽出された元画像の画素数)に、「1」が代入される。 Next, the reference point number M of the original image mask is calculated (S2063). When a reduced image is formed by the nearest neighbor method, one pixel of the reduced image is formed from one pixel of the original image. Therefore, the original image extracted in (one pixel formation of the reduced image) in the above formula (2) is used. “1” is substituted into the number of pixels).
次に、変数i=1とし(S2064)、縮小画像用マスクにおけるi番目の参照ポイント(Xsi,Ysi)を読み出す(S2065)。そして、読み出した参照ポイント(Xsi,Ysi)から、元画像用マスクの基準参照ポイントMainPointを求める(S2066)。 Next, the variable i is set to 1 (S2064), and the i-th reference point (Xsi, Ysi) in the reduced image mask is read (S2065). Then, a reference reference point MainPoint of the original image mask is obtained from the read reference points (Xsi, Ysi) (S2066).
次に、元画像用マスクの参照ポイント(XL,YL)を求める(S2108)。ここでは、縮小画像用マスクの1の参照ポイントに対応する、元画像用マスクの参照ポイントは基準参照ポイントMainPointのみであるので、S2066の処理で算出した基準参照ポイントMainPointを、参照ポイント(XL,YL)とする。 Next, the reference point (X L , Y L ) of the original image mask is obtained (S2108). Here, since the reference point of the original image mask corresponding to one reference point of the reduced image mask is only the reference reference point MainPoint, the reference reference point MainPoint calculated in the processing of S2066 is used as the reference point (XL ). , Y L ).
そして、参照ポイント(XL,YL)について、ガウス関数によりフィルタ係数を演算し(S2069)、RAM13に格納する(S2070)。 Then, for the reference point (X L , Y L ), a filter coefficient is calculated by a Gaussian function (S2069) and stored in the RAM 13 (S2070).
次に、変数iに「1」を加算し(S2075)、変数i=mとなるまで、すなわち、縮小画像用マスクの全ての参照ポイントについて、対応する元画像用マスクの参照ポイントが算出されるまで処理を繰り返し、サブルーチンCを終了する。サブルーチンCによれば、図11を参照して説明したように、元画像用マスクの参照ポイントとそのフィルタ係数とが決定される。 Next, “1” is added to the variable i (S2075), and the reference point of the corresponding original image mask is calculated until the variable i = m, that is, for all the reference points of the reduced image mask. The process is repeated until the subroutine C is completed. According to the subroutine C, as described with reference to FIG. 11, the reference point of the original image mask and its filter coefficient are determined.
本実施形態の元画像マスク準備処理により準備された元画像用マスクによれば、図9から図11に示したように、元画像用マスクにおける参照ポイントのパターンと、縮小画像用マスクにおける参照ポイントのパターンとが対応しているので、縮小画像から得られる反射率の分布が、元画像から得られる反射率の分布と極めて近くなる。その結果、適切なクリップ範囲(元画像から得られるクリップ範囲と極めて近似するクリップ範囲)を、縮小画像から得ることができ、高速且つ高精度にレティネックス処理を行うことができるのである。 According to the original image mask prepared by the original image mask preparation processing of the present embodiment, as shown in FIGS. 9 to 11, the reference point pattern in the original image mask and the reference point in the reduced image mask Therefore, the reflectance distribution obtained from the reduced image is very close to the reflectance distribution obtained from the original image. As a result, an appropriate clip range (a clip range that is very close to the clip range obtained from the original image) can be obtained from the reduced image, and the Retinex process can be performed at high speed and with high accuracy.
なお、請求項に記載の縮小画像反射率取得ステップと縮小画像反射率取得手段は、図3に示すフローチャートのS12の処理が該当し、正規化パラメータ設定ステップと正規化パラメータ設定手段は、図3に示すフローチャートのS16〜S18の処理が該当し、元画像反射率取得ステップと元画像反射率取得手段は、図4に示すフローチャートのS21の処理が該当し、補正ステップと補正手段は、図4に示す後処理が該当し、縮小画像形成ステップおよび縮小画像形成手段は、図3に示すフローチャートのS8の処理が該当し、元画像用フィルタ準備ステップおよび元画像用フィルタ準備手段は、図3に示すフローチャートのS20の処理が該当し、縮小画像用フィルタ準備ステップおよび縮小画像用フィルタ準備手段は、図3に示すフローチャートのS4の処理が該当する。 Note that the reduced image reflectance acquisition step and the reduced image reflectance acquisition means described in the claims correspond to the processing of S12 in the flowchart shown in FIG. 3, and the normalization parameter setting step and the normalization parameter setting means are the same as those in FIG. 4 corresponds to the process of S16 to S18 of the flowchart shown in FIG. 4, the original image reflectance acquisition step and the original image reflectance acquisition means correspond to the process of S21 of the flowchart shown in FIG. 4, and the correction step and the correction means correspond to FIG. 3, the reduced image forming step and the reduced image forming unit correspond to the process of S8 in the flowchart shown in FIG. 3, and the original image filter preparing step and the original image filter preparing unit are shown in FIG. 3 corresponds to the processing shown in the flowchart shown in FIG. 3, and the reduced image filter preparation step and the reduced image filter preparation means are shown in FIG. S4 processing of over chart are true.
以上、実施形態に基づいて本発明を説明したが、本発明は上記各実施形態に何ら限定されるものでなく、本発明の趣旨を逸脱しない範囲内で種々の改良変形が可能であることは容易に推察できるものである。 As described above, the present invention has been described based on the embodiments. However, the present invention is not limited to the above embodiments, and various improvements and modifications can be made without departing from the spirit of the present invention. It can be easily guessed.
例えば、上記実施形態の元画像用マスク準備処理(S20)では、縮小アルゴリズムに応じて、元画像用マスクの参照ポイントを決定していたが、参照ポイントの決定処理は、これに限られない。 For example, in the original image mask preparation process (S20) of the above embodiment, the reference point of the original image mask is determined according to the reduction algorithm, but the reference point determination process is not limited to this.
図16は、元画像用マスク準備処理(S20)の変形例を示すフローチャートである。なお、図16に示すフローチャートにおいて、図12を参照して説明した実施形態の元画像用マスク準備処理(S20)と同一のステップについては同一の符号を付して説明を省略する。図16に示す変形例の元画像用マスク準備処理(S20)によれば、サブルーチンC(S210)により元画像用マスクの参照ポイントが決定されるので、縮小アルゴリズムに拘わらず、図11に示す元画像用マスクが生成される。 FIG. 16 is a flowchart showing a modification of the original image mask preparation process (S20). In the flowchart shown in FIG. 16, the same steps as those in the original image mask preparation process (S20) of the embodiment described with reference to FIG. According to the original image mask preparation process (S20) of the modification shown in FIG. 16, the reference point of the original image mask is determined by the subroutine C (S210), so that the original shown in FIG. An image mask is generated.
このようにして生成した元画像用マスクによれば、縮小画像用マスクの演算領域により定められる縮小画像のp×qの画素が、元画像用マスクの演算領域により定められる元画像のk・p×k・qの画素を縮小した関係にあるとき、縮小画像における各参照画素の元となった元画像の各ブロックに、少なくとも1の参照画素が含まれる。また、縮小画像における各間引き画素の元となった元画像の各ブロック内の画素が間引き画素となる。 According to the original image mask generated in this way, the p × q pixels of the reduced image determined by the calculation area of the reduced image mask are k · p of the original image determined by the calculation area of the original image mask. When the relationship of × k · q pixels is reduced, at least one reference pixel is included in each block of the original image that is the source of each reference pixel in the reduced image. Further, the pixels in each block of the original image that are the sources of the thinned pixels in the reduced image are thinned pixels.
よって、縮小画像の反射率に反映される画素値と、元画像の反射率に反映される画素値とが近似する。その結果、縮小画像の反射率を用いた場合でも好適な正規化パラメータを得ることができ、レティネックス処理を高精度に行うことができる。また、参照画素の個数が少なくすることができるので、反射率の演算を高速で行うことができる。 Therefore, the pixel value reflected in the reflectance of the reduced image approximates the pixel value reflected in the reflectance of the original image. As a result, a suitable normalization parameter can be obtained even when the reflectance of the reduced image is used, and the Retinex process can be performed with high accuracy. In addition, since the number of reference pixels can be reduced, the reflectance can be calculated at high speed.
図17は、元画像用マスクの変形例を模式的に示す図である。図17に示すように、縮小画像における参照画素の元となった元画像の各ブロック内の画素から、ランダムに1ずつ画素を選択し、その画素を参照画素とする場合でも、高精度の出力結果を得ることができる。 FIG. 17 is a diagram schematically showing a modification of the original image mask. As shown in FIG. 17, even when one pixel is randomly selected from the pixels in each block of the original image that is the source of the reference pixel in the reduced image and the pixel is used as the reference pixel, high-precision output The result can be obtained.
なお、図9から図11および図17に示した縮小画像用マスクにおける参照ポイントの配置は任意であり、適宜変更され得る。 The arrangement of the reference points in the reduced image masks shown in FIGS. 9 to 11 and 17 is arbitrary and can be changed as appropriate.
また、上記実施形態では、色表現系はRGB形式としたが、RGB形式以外の他の色表現系、例えば、CMY形式などに本発明を適用してもよい。 In the above embodiment, the color expression system is the RGB format, but the present invention may be applied to other color expression systems other than the RGB format, for example, the CMY format.
また、上記実施形態では、本発明の画像処理プログラムは、プリンタ1に組み込まれたCPU11により実行されるものとしたが、パーソナルコンピュータにアプリケーションとして供給され、パーソナルコンピュータに組み込まれたCPUなどにより実行されるようにしてもよい。
In the above embodiment, the image processing program of the present invention is executed by the
また、レティネックス処理は、SSR(シングルスケール法)であってもMSR(マルチスケール法)であってもよい。 The Retinex process may be SSR (single scale method) or MSR (multiscale method).
また、上記実施形態の画像処理では、CPU11によりレティネックス処理などを行うものとしたが、DSP(Digital
Signal Processor)により行ってもよい。DSPを用いると、より高速に積和演算などの処理を実行することができる。
In the image processing of the above embodiment, the Retinex processing is performed by the
(Signal Processor). When a DSP is used, processing such as product-sum operation can be executed at higher speed.
1 プリンタ(画像処理装置)
2 パーソナルコンピュータ
11 CPU
12 ROM
12a 画像処理プログラムメモリ
13 RAM
13a 元画像メモリ
13b レティネックス画像メモリ
13h マスクメモリ
1 Printer (image processing device)
2
12 ROM
12a Image
13a
Claims (10)
元画像を縮小した縮小画像の各画素について、縮小画像用フィルタを用いて周辺平均値を求め、その周辺平均値と縮小画像の各画素の値とから反射率を求める縮小画像反射率取得ステップと、
その縮小画像反射率取得ステップにより求められた反射率が取る値の全範囲における各値の頻度を集計し、正規化を行う際のパラメータ値を設定する正規化パラメータ設定ステップと、
元画像の各画素について、元画像用フィルタを用いて周辺平均値を求め、その周辺平均値と元画像の画素値とから反射率を求める元画像反射率取得ステップと、
その元画像反射率取得ステップにより取得した反射率を前記正規化パラメータ設定ステップにより設定されたパラメータ値に基づいて正規化した正規化レティネックス値を求め、その正規化レティネックス値と、元画像の画素値とに基づいて補正を行う補正ステップとを備え、
前記縮小画像のサイズと前記縮小画像用フィルタのサイズとの比は、前記元画像のサイズと前記元画像用フィルタのサイズとの比と同じであることを特徴とする画像処理プログラム。 In an image processing program executed by an image processing apparatus that performs image correction processing,
A reduced image reflectance acquisition step for obtaining a peripheral average value for each pixel of the reduced image obtained by reducing the original image using a reduced image filter, and obtaining a reflectance from the peripheral average value and the value of each pixel of the reduced image; ,
A normalization parameter setting step for setting the parameter values when performing normalization by totalizing the frequency of each value in the entire range of values taken by the reflectance obtained by the reduced image reflectance acquisition step;
For each pixel of the original image, a peripheral average value is obtained using a filter for the original image, and an original image reflectance acquisition step for obtaining a reflectance from the peripheral average value and the pixel value of the original image;
A normalized Retinex value obtained by normalizing the reflectance acquired in the original image reflectance acquisition step based on the parameter value set in the normalization parameter setting step is obtained, and the normalized Retinex value and the original image A correction step for performing correction based on the pixel value,
An image processing program characterized in that a ratio between the size of the reduced image and the size of the reduced image filter is the same as a ratio between the size of the original image and the size of the original image filter.
元画像を、k行k列の画素毎に複数ブロックに分割し、各ブロックをそれぞれ1の画素に集約して縮小画像を形成する縮小画像形成ステップと、
前記縮小画像用フィルタの演算領域により定められる縮小画像のp行q列の画素が、前記元画像用フィルタの演算領域により定められる元画像のk・p行k・q列の画素を縮小した関係にあるとき、前記縮小画像における各参照画素の元となった元画像の各ブロックに、少なくとも1の参照画素が含まれるように、参照画素と間引き画素とを区分する元画像用フィルタを準備する元画像用フィルタ準備ステップとを備えるものであることを特徴とする請求項1記載の画像処理プログラム。 The reduced image filter defines a calculation area of the peripheral average value in the reduced image, and the pixels of p rows and q columns in the calculation area are referred to as a reference pixel whose value is reflected in the peripheral average value and a peripheral average value. It is divided into thinned pixels that do not reflect the value,
A reduced image forming step in which the original image is divided into a plurality of blocks for each pixel in k rows and k columns, and each block is aggregated into one pixel to form a reduced image;
Relationship in which pixels in p rows and q columns of the reduced image determined by the calculation region of the reduced image filter are reduced in pixels of k, p rows and k and q columns of the original image determined by the calculation region of the original image filter The original image filter for dividing the reference pixel and the thinned-out pixel is prepared so that at least one reference pixel is included in each block of the original image that is the source of each reference pixel in the reduced image. The image processing program according to claim 1, further comprising an original image filter preparation step.
前記縮小画像用フィルタの演算領域により定められる縮小画像のp行q列の画素が、前記元画像用フィルタの演算領域により定められる元画像のk・p行k・q列の画素を縮小した関係にあるとき、前記縮小画像における各間引き画素の元となった元画像の各ブロック内の画素が間引き画素となるように、参照画素と間引画素とを区分する元画像用フィルタを準備するものであることを特徴とする請求項2記載の画像処理プログラム。 The original image filter preparation step includes:
Relationship in which pixels in p rows and q columns of the reduced image determined by the calculation region of the reduced image filter are reduced in pixels of k, p rows and k and q columns of the original image determined by the calculation region of the original image filter A filter for an original image for dividing a reference pixel and a thinned pixel so that a pixel in each block of the original image that is a source of each thinned pixel in the reduced image becomes a thinned pixel The image processing program according to claim 2, wherein:
前記元画像用フィルタ準備ステップは、
前記縮小画像用フィルタにより定められる縮小画像のp行q列の画素が、前記元画像用フィルタにより定められる元画像のk・p行k・q列の画素を縮小した関係にあるとき、前記縮小画像の各参照画素の元となった元画像の各ブロック内のn個の抽出画素のうち、少なくとも1の画素が参照画素となるように、参照画素と間引画素とを区分する元画像用フィルタを準備するものであることを特徴とする請求項2または3に記載の画像処理プログラム。 In the reduced image forming step, n pixels are extracted from each block (n is an integer equal to or greater than 1), one pixel is generated based on the extracted n pixels, and a reduced image is formed. Is,
The original image filter preparation step includes:
When the pixels of p rows and q columns of the reduced image determined by the reduced image filter are in a relation obtained by reducing the pixels of k, p rows and k and q columns of the original image determined by the original image filter, the reduction For an original image that classifies reference pixels and thinned pixels so that at least one of the n extracted pixels in each block of the original image that is the source of each reference pixel of the image is a reference pixel The image processing program according to claim 2, wherein a filter is prepared.
前記元画像用フィルタ準備ステップは、前記縮小画像用フィルタ準備ステップにより準備された縮小画像用フィルタに基づいて、元画像用フィルタを生成するものであることを特徴とする請求項2から4のいずれかに記載の画像処理プログラム。 A reduced image filter preparation step of preparing the reduced image filter;
5. The original image filter preparation step generates an original image filter based on the reduced image filter prepared in the reduced image filter preparation step. 5. An image processing program according to any one of the above.
元画像を縮小した縮小画像の各画素について、縮小画像用フィルタを用いて周辺平均値を求め、その周辺平均値と縮小画像の各画素の値とから反射率を求める縮小画像反射率取得手段と、
その縮小画像反射率取得手段により求められた反射率が取る値の全範囲における各値の頻度を集計し、正規化を行う際のパラメータ値を設定する正規化パラメータ設定手段と、
元画像の各画素について、元画像用フィルタを用いて周辺平均値を求め、その周辺平均値と元画像の画素値とから反射率を求める元画像反射率取得手段と、
その元画像反射率取得手段により取得した反射率を前記正規化パラメータ設定手段により設定されたパラメータ値に基づいて正規化した正規化レティネックス値を求め、その正規化レティネックス値と、元画像の画素値とに基づいて補正を行う補正手段とを備え、
前記縮小画像のサイズと前記縮小画像用フィルタのサイズとの比は、前記元画像のサイズと前記元画像用フィルタのサイズとの比と同じであることを特徴とする画像処理装置。 In an image processing apparatus that performs image correction processing,
Reduced image reflectance acquisition means for obtaining a peripheral average value for each pixel of the reduced image obtained by reducing the original image using a reduced image filter, and obtaining a reflectance from the peripheral average value and the value of each pixel of the reduced image; ,
A normalization parameter setting means for summing up the frequency of each value in the entire range of values taken by the reflectance obtained by the reduced image reflectance acquisition means, and setting a parameter value for normalization;
For each pixel of the original image, a peripheral average value is obtained using a filter for the original image, and an original image reflectance acquisition means for obtaining a reflectance from the peripheral average value and the pixel value of the original image;
A normalized Retinex value obtained by normalizing the reflectance acquired by the original image reflectance acquisition unit based on the parameter value set by the normalization parameter setting unit is obtained, and the normalized Retinex value and the original image Correction means for performing correction based on the pixel value,
The image processing apparatus according to claim 1, wherein a ratio between the size of the reduced image and the size of the reduced image filter is the same as a ratio between the size of the original image and the size of the original image filter.
元画像を、k行k列の画素毎に複数ブロックに分割し、各ブロックをそれぞれ1の画素に集約して縮小画像を形成する縮小画像形成手段と、
前記縮小画像用フィルタの演算領域により定められる縮小画像のp行q列の画素が、前記元画像用フィルタの演算領域により定められる元画像のk・p行k・q列の画素を縮小した関係にあるとき、前記縮小画像における各参照画素の元となった元画像の各ブロックに、少なくとも1の参照画素が含まれるように、参照画素と間引き画素とを区分する元画像用フィルタを準備する元画像用フィルタ準備手段とを備えるものであることを特徴とする請求項6記載の画像処理装置。 The reduced image filter defines a calculation area of the peripheral average value in the reduced image, and the pixels of p rows and q columns in the calculation area are referred to as a reference pixel whose value is reflected in the peripheral average value and a peripheral average value. It is divided into thinned pixels that do not reflect the value,
A reduced image forming unit that divides an original image into a plurality of blocks for each pixel of k rows and k columns and aggregates each block into one pixel to form a reduced image;
Relationship in which pixels in p rows and q columns of the reduced image determined by the calculation region of the reduced image filter are reduced in pixels of k, p rows and k and q columns of the original image determined by the calculation region of the original image filter The original image filter for dividing the reference pixel and the thinned-out pixel is prepared so that at least one reference pixel is included in each block of the original image that is the source of each reference pixel in the reduced image. The image processing apparatus according to claim 6, further comprising original image filter preparation means.
前記縮小画像用フィルタの演算領域により定められる縮小画像のp行q列の画素が、前記元画像用フィルタの演算領域により定められる元画像のk・p行k・q列の画素を縮小した関係にあるとき、前記縮小画像における各間引き画素の元となった元画像の各ブロック内の画素が間引き画素となるように、参照画素と間引画素とを区分する元画像用フィルタを準備するものであることを特徴とする請求項7記載の画像処理装置。 The original image filter preparation means includes
Relationship in which pixels in p rows and q columns of the reduced image determined by the calculation region of the reduced image filter are reduced in pixels of k, p rows and k and q columns of the original image determined by the calculation region of the original image filter A filter for an original image for dividing a reference pixel and a thinned pixel so that a pixel in each block of the original image that is a source of each thinned pixel in the reduced image becomes a thinned pixel The image processing apparatus according to claim 7, wherein:
前記元画像用フィルタ準備手段は、
前記縮小画像用フィルタにより定められる縮小画像のp行q列の画素が、前記元画像用フィルタにより定められる元画像のk・p行k・q列の画素を縮小した関係にあるとき、前記縮小画像の各参照画素の元となった元画像の各ブロック内のn個の抽出画素のうち、少なくとも1の画素が参照画素となるように、参照画素と間引画素とを区分する元画像用フィルタを準備するものであることを特徴とする請求項7または8に記載の画像処理装置。 The reduced image forming unit extracts n pixels from each block (n is an integer of 1 or more), generates one pixel based on the extracted n pixels, and forms a reduced image. Is,
The original image filter preparation means includes
When the pixels of p rows and q columns of the reduced image determined by the reduced image filter are in a relation obtained by reducing the pixels of k, p rows and k and q columns of the original image determined by the original image filter, the reduction For an original image that classifies reference pixels and thinned pixels so that at least one of the n extracted pixels in each block of the original image that is the source of each reference pixel of the image is a reference pixel The image processing apparatus according to claim 7, wherein a filter is prepared.
前記元画像用フィルタ準備手段は、前記縮小画像用フィルタ準備手段により準備された縮小画像用フィルタに基づいて、元画像用フィルタを生成するものであることを特徴とする請求項7から9のいずれかに記載の画像処理装置。 A reduced image filter preparation means for preparing the reduced image filter;
10. The original image filter preparation means generates an original image filter based on the reduced image filter prepared by the reduced image filter preparation means. An image processing apparatus according to claim 1.
Priority Applications (2)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006297073A JP4345027B2 (en) | 2006-10-31 | 2006-10-31 | Image processing program and image processing apparatus |
US11/864,251 US8081839B2 (en) | 2006-08-31 | 2007-09-28 | Image processor |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2006297073A JP4345027B2 (en) | 2006-10-31 | 2006-10-31 | Image processing program and image processing apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2008118209A true JP2008118209A (en) | 2008-05-22 |
JP4345027B2 JP4345027B2 (en) | 2009-10-14 |
Family
ID=39503830
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2006297073A Expired - Fee Related JP4345027B2 (en) | 2006-08-31 | 2006-10-31 | Image processing program and image processing apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP4345027B2 (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010193199A (en) * | 2009-02-18 | 2010-09-02 | Victor Co Of Japan Ltd | Image processor and image processing method |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN110264411A (en) * | 2019-05-13 | 2019-09-20 | 北京中科晶上科技股份有限公司 | Illumination correction method for image |
-
2006
- 2006-10-31 JP JP2006297073A patent/JP4345027B2/en not_active Expired - Fee Related
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2010193199A (en) * | 2009-02-18 | 2010-09-02 | Victor Co Of Japan Ltd | Image processor and image processing method |
Also Published As
Publication number | Publication date |
---|---|
JP4345027B2 (en) | 2009-10-14 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US6075926A (en) | Computerized method for improving data resolution | |
JP2008059287A (en) | Image processor and image processing program | |
JP4867529B2 (en) | Image processing program and image processing apparatus | |
US8081839B2 (en) | Image processor | |
US6760489B1 (en) | Apparatus and method for image data interpolation and medium on which image data interpolation program is recorded | |
JP2004005694A (en) | Image processing method, digital image processor, digital camera, digital photograph finishing system, and program | |
JP2008118216A (en) | Image processor and image processing program | |
JP4862554B2 (en) | Image processing program and image processing apparatus | |
JP2008011286A (en) | Image processing program and image processor | |
JP4387907B2 (en) | Image processing method and apparatus | |
JP4345027B2 (en) | Image processing program and image processing apparatus | |
JP4353233B2 (en) | Image processing program and image processing apparatus | |
JP4661754B2 (en) | Image processing apparatus and image processing program | |
JP4353234B2 (en) | Image processing program and image processing apparatus | |
JP4687667B2 (en) | Image processing program and image processing apparatus | |
JP4345026B2 (en) | Image processing program and image processing apparatus | |
JP2008245024A (en) | Generation of lookup table | |
JP2008059307A (en) | Image processor and image processing program | |
JP4281786B2 (en) | Image processing program and image processing apparatus | |
JP4265363B2 (en) | Image processing device | |
JP4793166B2 (en) | Image processing program and image processing apparatus | |
JP2007233433A (en) | Image processing program and image processor | |
JP4793175B2 (en) | Image processing program and image processing apparatus | |
JP2008060944A (en) | Image processor | |
JP4710761B2 (en) | Image processing program and image processing apparatus |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20081105 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20081111 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20090113 |
|
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: 20090618 |
|
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: 20090701 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 4345027 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120724 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20120724 Year of fee payment: 3 |
|
FPAY | Renewal fee payment (event date is renewal date of database) |
Free format text: PAYMENT UNTIL: 20130724 Year of fee payment: 4 |
|
LAPS | Cancellation because of no payment of annual fees |