JP2005303705A - Image processing device and image processing method - Google Patents

Image processing device and image processing method Download PDF

Info

Publication number
JP2005303705A
JP2005303705A JP2004117699A JP2004117699A JP2005303705A JP 2005303705 A JP2005303705 A JP 2005303705A JP 2004117699 A JP2004117699 A JP 2004117699A JP 2004117699 A JP2004117699 A JP 2004117699A JP 2005303705 A JP2005303705 A JP 2005303705A
Authority
JP
Japan
Prior art keywords
image
luminance
brightness
unevenness
replacement
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.)
Withdrawn
Application number
JP2004117699A
Other languages
Japanese (ja)
Inventor
Takashi Yoshihara
隆史 吉原
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Olympus Corp
Original Assignee
Olympus Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Olympus Corp filed Critical Olympus Corp
Priority to JP2004117699A priority Critical patent/JP2005303705A/en
Publication of JP2005303705A publication Critical patent/JP2005303705A/en
Withdrawn legal-status Critical Current

Links

Images

Abstract

<P>PROBLEM TO BE SOLVED: To eliminate or reduce luminance unevenness at a high speed and with simple algorithms, without generating noise, such as pseudo-edges, regardless of the existence/absence of periodicity of luminance unevenness in an image processing device and image processing method. <P>SOLUTION: A luminance information calculating means 102 calculates average luminance and luminance deviation representative value of an input image, and a luminance replaced image preparing means 103 replaces singular luminance data, the deviation from the average luminance of which is larger than a prescribed value with replacement luminance data to prepare a replaced image. A luminance smoothing means 108 smoothes the replaced image, and a luminance unevenness image preparing means 104 prepares a luminance unevenness image. Then, a luminance unevenness elimination image preparing means 106 calculates the input image, average luminance and luminance unevenness image to be able to eliminate the luminance unevenness. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、画像処理装置および方法に関する。例えば、照明ムラや、撮像光学系のシェーディング特性などにより撮像画像に発生する輝度ムラを除去もしくは低減するための画像処理装置および方法に関する。   The present invention relates to an image processing apparatus and method. For example, the present invention relates to an image processing apparatus and method for removing or reducing luminance unevenness generated in a captured image due to illumination unevenness and shading characteristics of an imaging optical system.

従来、撮像素子などを用いて撮像対象を撮像し光電変換して画像データを得る撮像装置などでは、照明ムラや、撮像光学系のシェーディング特性などにより、輝度ムラが生じて画質が劣化する場合があった。そのため、画質劣化の原因となるこのような輝度ムラを画像処理により除去もしくは低減することが行われている。
このような画像処理装置および方法の例として、例えば、特許文献1には、オリジナル画像を間引きしてからフーリエ変換を施し、フィルタ処理により低周波成分を除去した後、逆フーリエ変換を行い、その処理後の画像を、間引き前の画像サイズに拡大して、オリジナル画像との差分処理などにより輝度ムラを除去する画像処理方式が記載されている。
また、特許文献2には、撮像画像を2次元フーリエ変換し、そのパワースペクトラムからパターンセルや、ノイズに対応する周波数成分を除去し、2次元逆フーリエ変換することにより、周期パターン情報が除去された濃淡ムラ画像データを取得し閾値処理することで、欠陥検査を行うマクロ検査方法が記載されている。
特開平06−189134号公報(第3−5頁、図2) 特開平11−339040号公報(第3−5頁、図1)
Conventionally, in an imaging apparatus that captures an image of an imaging target using an imaging device and obtains image data by photoelectric conversion, luminance unevenness may occur due to uneven illumination or shading characteristics of the imaging optical system, and image quality may deteriorate. there were. Therefore, such luminance unevenness that causes image quality degradation is removed or reduced by image processing.
As an example of such an image processing apparatus and method, for example, in Patent Document 1, the original image is thinned and subjected to Fourier transform, and after removing low-frequency components by filtering, inverse Fourier transform is performed. An image processing method is described in which a processed image is enlarged to an image size before thinning, and luminance unevenness is removed by differential processing with the original image.
In Patent Document 2, the periodic pattern information is removed by performing two-dimensional Fourier transform on the captured image, removing pattern cells and frequency components corresponding to noise from the power spectrum, and performing two-dimensional inverse Fourier transform. In addition, there is described a macro inspection method for performing defect inspection by acquiring uneven gray image data and performing threshold processing.
Japanese Patent Laid-Open No. 06-189134 (page 3-5, FIG. 2) Japanese Patent Laid-Open No. 11-339040 (page 3-5, FIG. 1)

しかしながら、上記のような従来の画像処理装置および方法には以下のような問題があった。
特許文献1、2に記載の技術では、画像をフーリエ変換して、周波数分析により、輝度ムラと正常画像とを分離し、輝度ムラの周波数成分をカットすることにより輝度ムラを低減している。
そのため、輝度ムラの周波数成分と正常画像の周波数成分とが明確に分かれている画像でないと、十分な輝度ムラの除去ができないという問題がある。すなわち、正常画像に周期パターンを含まない画像では、輝度ムラの除去が困難となるという問題がある。
また、正常画像が周期パターンを含む場合でも、輝度ムラの周波数成分と近接する場合には、カットする周波数を適切に設定しないと、正常画像にある周期パターンの周波数成分や、エッジ領域の近傍の高調波まで周波数カットしてしまうことになる結果、例えばモスキートノイズ状の疑似エッジ領域などのノイズが発生する、といった問題がある。
また、フーリエ変換、逆フーリエ変換はデータ数が増えると演算に時間がかかるため、実用的には、画像データの大きさが制限されてしまうという問題がある。したがって、製造ラインなどで高速の検査タクトが要求される検査装置などには利用できないという問題がある。
However, the conventional image processing apparatus and method as described above have the following problems.
In the techniques described in Patent Documents 1 and 2, luminance unevenness is reduced by Fourier transforming an image, separating luminance unevenness and a normal image by frequency analysis, and cutting a frequency component of the luminance unevenness.
Therefore, there is a problem that sufficient luminance unevenness cannot be removed unless the frequency component of luminance unevenness and the frequency component of a normal image are clearly separated. That is, there is a problem that it is difficult to remove luminance unevenness in an image that does not include a periodic pattern in a normal image.
Even if the normal image includes a periodic pattern, if it is close to the frequency component of uneven brightness, the frequency component of the periodic pattern in the normal image or the vicinity of the edge region must be set unless the frequency to be cut is set appropriately. As a result of cutting the frequency up to the harmonics, there is a problem that noise such as a mosquito noise-like pseudo edge region is generated.
In addition, the Fourier transform and inverse Fourier transform have a problem that the size of image data is practically limited because the calculation takes time when the number of data increases. Therefore, there is a problem that it cannot be used for an inspection apparatus that requires a high-speed inspection tact on a production line or the like.

本発明は、上記の問題に鑑みてなされたものであって、周期パターンを有する入力画像であっても、例えばモスキートノイズ状の疑似エッジなどのノイズを発生させることなく、高速かつ簡単なアルゴリズムにより輝度ムラを除去もしくは低減することができ、さらに周期パターンを含まない入力画像でも同様に輝度ムラを除去もしくは低減できる画像処理装置および方法を提供することを目的とする。   The present invention has been made in view of the above problems, and even with an input image having a periodic pattern, for example, without generating noise such as a mosquito noise-like pseudo edge, a high-speed and simple algorithm is used. An object of the present invention is to provide an image processing apparatus and method that can remove or reduce luminance unevenness, and can similarly remove or reduce luminance unevenness even in an input image that does not include a periodic pattern.

上記の課題を解決するために、請求項1に記載の発明では、入力画像の輝度ムラを除去するための画像処理装置であって、所定領域内の前記入力画像の平均輝度および輝度偏差代表値を算出する輝度情報算出手段と、前記所定領域内の入力画像の輝度データのうち、前記輝度情報算出手段で算出した平均輝度からの偏差が所定値より大きい特異輝度データを、前記平均輝度からの偏差がより小さくなる置換輝度データに置換した置換画像を作成する置換画像作成手段と、前記所定領域内の注目画素近傍の輝度値により前記注目画素の輝度を平滑化処理する輝度平滑化手段と、前記置換画像作成手段により作成された置換画像に対して、前記輝度平滑化手段による輝度平滑化を行って輝度ムラ画像を作成する輝度ムラ画像作成手段と、前記入力画像に対して、前記輝度情報算出手段により算出された平均輝度、および前記輝度ムラ画像作成手段により作成された輝度ムラ画像を演算して、輝度ムラを除去した出力画像を作成する輝度ムラ除去手段とを備える構成とする。
この発明によれば、輝度情報算出手段により、所定領域内の入力画像の平均輝度および輝度偏差代表値を算出し、入力画像の輝度データの平均輝度からの偏差を算出して輝度偏差代表値と比較し、所定値より大きい場合には特異輝度データと判断する。
そして、置換画像作成手段により、平均輝度からの偏差を低減する置換輝度データに置換した置換画像を作成する。
また、輝度ムラ画像作成手段により、置換画像中の各注目画素の輝度を輝度平滑化手段で平滑化して、輝度ムラ以外のノイズを除去した輝度ムラ画像を作成する。
そして、輝度ムラ除去手段で、入力画像、平均輝度、輝度ムラ画像を演算して輝度ムラを除去した出力画像を作成する。輝度ムラの除去は、輝度ムラ画像から平均輝度を差し引いて、輝度ムラ成分を抽出し、輝度ムラ成分を入力画像から差し引くことにより、輝度ムラを除去もしくは低減した出力画像が得られる。
In order to solve the above-described problem, according to the first aspect of the present invention, there is provided an image processing apparatus for removing luminance unevenness of an input image, wherein the average luminance and luminance deviation representative values of the input image in a predetermined area Brightness information calculating means for calculating the brightness information of the input image in the predetermined area, and the specific brightness data having a deviation from the average brightness calculated by the brightness information calculating means greater than a predetermined value from the average brightness A replacement image creating means for creating a replacement image replaced with replacement brightness data having a smaller deviation; a brightness smoothing means for smoothing the brightness of the target pixel by a brightness value in the vicinity of the target pixel in the predetermined area; Luminance unevenness image creating means for creating a brightness unevenness image by performing brightness smoothing by the brightness smoothing means on the replacement image created by the replacement image creating means, and the input Brightness unevenness removing means for calculating an average brightness calculated by the brightness information calculating means and a brightness unevenness image created by the brightness unevenness image creating means for an image to create an output image from which the brightness unevenness has been removed It is set as the structure provided with.
According to this invention, the luminance information calculating means calculates the average luminance and the luminance deviation representative value of the input image in the predetermined area, calculates the deviation from the average luminance of the luminance data of the input image, In comparison, if it is larger than the predetermined value, it is determined as specific luminance data.
Then, the replacement image creating means creates a replacement image replaced with replacement luminance data that reduces the deviation from the average luminance.
Further, the luminance unevenness image creating means smoothes the luminance of each pixel of interest in the replacement image by the luminance smoothing means, and creates a luminance unevenness image from which noise other than the luminance unevenness has been removed.
Then, the luminance unevenness removing means calculates the input image, the average luminance, and the luminance unevenness image to create an output image from which the luminance unevenness is removed. The luminance unevenness is removed by subtracting the average luminance from the luminance unevenness image, extracting the luminance unevenness component, and subtracting the luminance unevenness component from the input image, thereby obtaining an output image in which the luminance unevenness is removed or reduced.

ここで、輝度偏差代表値は、平均輝度からの偏差の代表値であり、例えば、標準偏差や標準偏差に適宜の係数を乗じたものなどを採用できる。
また、輝度平滑化手段による平滑化処理は、注目画素近傍のブロック平均輝度を注目画素の輝度とする処理や、その他、近傍周辺の輝度に重み付けするなどした適宜の平滑フィルタ処理などが採用できる。
Here, the luminance deviation representative value is a representative value of deviation from the average luminance, and for example, a standard deviation or a value obtained by multiplying the standard deviation by an appropriate coefficient can be adopted.
As the smoothing process by the brightness smoothing means, a process of setting the block average brightness near the target pixel as the brightness of the target pixel, or an appropriate smoothing filter process such as weighting the brightness around the vicinity can be adopted.

請求項2に記載の発明では、請求項1に記載の画像処理装置において、前記置換画像作成手段が、前記特異輝度データを注目画素として前記輝度平滑化手段により平滑化された輝度を、前記特異輝度データに対する前記置換輝度データとする構成とする。
この発明によれば、特異輝度データと判断された画素を注目画素として、輝度平滑化手段で輝度平滑化して置換輝度データとするので、特異輝度データの近傍の輝度に応じて、平均輝度からの偏差を低減できる。
According to a second aspect of the present invention, in the image processing apparatus according to the first aspect of the present invention, the replacement image creating unit uses the singular luminance data as a pixel of interest to obtain the luminance smoothed by the luminance smoothing unit. The replacement luminance data for luminance data is used.
According to the present invention, the pixel determined to be the specific luminance data is used as the target pixel, and the luminance smoothing unit performs the luminance smoothing to obtain the replacement luminance data. Deviation can be reduced.

請求項3に記載の発明では、請求項1または2に記載の画像処理装置において、前記置換画像作成手段が、前記特異輝度データを判断する所定値として、前記平均輝度に前記輝度偏差代表値だけ加減した境界輝度値を用い、前記置換画像作成手段が、前記特異輝度データに対する前記置換輝度データとして、前記特異輝度データ近傍の前記境界輝度値を用いるようにした構成とする。
この発明によれば、特異輝度データの代わりに境界輝度値で置換するので、きわめて簡単な処理により確実に平均輝度からの偏差を低減した置換画像を作成することができる。
According to a third aspect of the present invention, in the image processing device according to the first or second aspect, the replacement image creating means includes, as a predetermined value for determining the specific luminance data, only the luminance deviation representative value in the average luminance. Using the adjusted boundary luminance value, the replacement image creating means uses the boundary luminance value in the vicinity of the specific luminance data as the replacement luminance data for the specific luminance data.
According to the present invention, since the replacement is performed with the boundary luminance value instead of the specific luminance data, it is possible to create a replacement image in which the deviation from the average luminance is reliably reduced by an extremely simple process.

請求項4に記載の発明では、請求項1〜3のいずれに記載の画像処理装置において、前記輝度ムラ画像作成手段が、前記置換画像中の互いに離れた注目画素に対して前記輝度平滑化手段により輝度平滑化を行い、前記互いに離れた注目画素の間の画素の輝度を、輝度平滑化後の前記注目画素の輝度を補間して求めることにより前記輝度ムラ画像を作成する構成とする。
この発明によれば、置換画像中の互いに離れた注目画素に対して輝度平滑化手段を用い、注目画像以外の画素に対しては、輝度平滑化後の注目画素の輝度を補間して求めるので、輝度平滑化手段による演算回数を低減できる。その結果、画像処理の高速化が可能となる。
According to a fourth aspect of the present invention, in the image processing apparatus according to any one of the first to third aspects, the luminance unevenness image creating unit is configured to perform the luminance smoothing unit with respect to target pixels separated from each other in the replacement image. The luminance unevenness image is created by interpolating the luminance of the pixel of interest between the pixels of interest separated from each other by interpolating the luminance of the pixel of interest after luminance smoothing.
According to the present invention, the luminance smoothing means is used for the target pixels separated from each other in the replacement image, and the luminance of the target pixel after the luminance smoothing is obtained for the pixels other than the target image by interpolation. The number of operations by the brightness smoothing means can be reduced. As a result, it is possible to speed up image processing.

請求項5に記載の発明では、請求項1〜4のいずれかに記載の画像処理装置において、前記輝度平滑化手段が、前記入力画像に所定ピッチの繰り返しパターンが存在する場合に、前記輝度平滑化を行う近傍周辺のブロックの大きさを前記所定ピッチの整数倍とする構成とする。
この発明によれば、入力画像に所定ピッチの繰り返しパターンが存在する場合に、輝度平滑化手段で輝度平滑化を行う近傍周辺のブロックの大きさを所定ピッチの整数倍とするので、繰り返しパターンの繰り返し周期に対応するブロック内で輝度平滑化が行われる。したがって繰り返しパターンの影響を輝度ムラから排除できる。その結果、輝度ムラの除去精度を向上することができる。
According to a fifth aspect of the present invention, in the image processing apparatus according to any one of the first to fourth aspects, the luminance smoothing means performs the luminance smoothing when a repetitive pattern having a predetermined pitch exists in the input image. The size of the block in the vicinity of the area to be converted is set to an integral multiple of the predetermined pitch.
According to the present invention, when a repetitive pattern with a predetermined pitch exists in the input image, the size of the neighboring peripheral block subjected to luminance smoothing by the luminance smoothing means is set to an integral multiple of the predetermined pitch. Luminance smoothing is performed in the block corresponding to the repetition period. Therefore, the influence of the repeated pattern can be eliminated from the luminance unevenness. As a result, the luminance unevenness removal accuracy can be improved.

請求項6に記載の発明では、請求項1〜5のいずれかに記載の画像処理装置において、入力画像を間引いて所定画像サイズの縮小入力画像を作成する画像縮小手段と、前記所定画像サイズの画像を前記入力画像の画像サイズに拡大する画像サイズ拡大手段とを備え、前記縮小入力画像を前記所定領域内の入力画像として、前記輝度情報算出手段、前記置換画像作成手段、前記輝度平滑化手段、および前記輝度ムラ画像作成手段により、前記輝度ムラ画像を作成し、該輝度ムラ画像の画像サイズを前記画像サイズ拡大手段により拡大し、前記縮小入力画像の平均輝度、画像サイズが拡大された輝度ムラ画像および前記入力画像から、前記輝度ムラ除去手段により輝度ムラを除去した出力画像が作成できるようにした構成とする。
この発明によれば、画像縮小手段により入力画像を間引いて、画像サイズを縮小した縮小入力画像に対して、輝度情報算出手段、置換画像作成手段、輝度平滑化手段、および輝度ムラ作成手段の演算を行い、画像サイズ拡大手段により、輝度ムラ画像を入力画像と同じ画像サイズに拡大して、輝度ムラ除去を行う。そのため、縮小画像を用いない場合に比べて、輝度情報算出手段、置換画像作成手段、輝度平滑化手段、および輝度ムラ作成手段の演算量を格段に低減できるので、高速な画像処理を行うことができ、大きな画像サイズでも迅速に輝度ムラの除去ができる。
そして
According to a sixth aspect of the present invention, in the image processing apparatus according to any one of the first to fifth aspects, an image reduction unit that thins out an input image to create a reduced input image having a predetermined image size; Image size enlarging means for enlarging the image to the image size of the input image, and using the reduced input image as the input image in the predetermined area, the luminance information calculating means, the replacement image creating means, and the luminance smoothing means The brightness unevenness image creating means creates the brightness unevenness image, the image size of the brightness unevenness image is enlarged by the image size enlargement means, and the average brightness and the brightness of the reduced input image are enlarged. From the unevenness image and the input image, an output image from which the unevenness in brightness is removed by the unevenness in brightness removal unit can be created.
According to this invention, the calculation of the luminance information calculation unit, the replacement image generation unit, the luminance smoothing unit, and the luminance unevenness generation unit is performed on the reduced input image obtained by thinning the input image by the image reduction unit and reducing the image size. The luminance unevenness image is enlarged to the same image size as the input image by the image size enlargement means, and the luminance unevenness is removed. Therefore, the amount of calculation of the luminance information calculation unit, the replacement image generation unit, the luminance smoothing unit, and the luminance unevenness generation unit can be significantly reduced as compared with the case where the reduced image is not used, so that high-speed image processing can be performed. The brightness unevenness can be quickly removed even with a large image size.
And

請求項7に記載の発明では、入力画像の輝度ムラを除去するための画像処理方法であって、所定領域内の前記入力画像の平均輝度および輝度偏差代表値を算出する輝度情報算出工程と、前記所定領域内の入力画像の輝度データのうち、前記輝度情報算出工程で算出した平均輝度からの偏差が所定値より大きい特異輝度データを、前記平均輝度からの偏差がより小さくなる置換輝度データに置換して置換画像を作成する置換画像作成工程と、前記所定領域内の注目画素近傍の輝度値により前記注目画素の輝度を平滑化処理する輝度平滑化工程と、前記置換画像作成工程により作成された置換画像に対して、前記輝度平滑化工程によりブロック平均輝度を求めて輝度ムラ画像を作成する輝度ムラ画像作成工程と、前記入力画像に対して、前記輝度情報算出工程により算出された平均輝度、および前記輝度ムラ画像作成工程により作成された輝度ムラ画像を演算して、輝度ムラを除去した出力画像を作成する輝度ムラ除去工程とを備える方法とする。
この発明によれば、輝度情報算出工程により入力画像の平均輝度および輝度偏差代表値を算出し、置換画像作成工程により特異輝度データを平均輝度からの偏差が小さくなる置換輝度データで置換した置換画像を作成し、輝度ムラ画像作成工程により置換画像を平滑化して輝度ムラ画像を作成し、輝度ムラ除去工程により入力画像、平均輝度、輝度ムラ画像を演算して輝度ムラを除去した出力画像を作成することができる。
また、請求項1に記載の画像処理装置を用いるのに好適な方法となっており、請求項1に記載の発明と同様の作用効果を備える。
The invention according to claim 7 is an image processing method for removing luminance unevenness of an input image, a luminance information calculation step of calculating an average luminance and a luminance deviation representative value of the input image in a predetermined region; Among the luminance data of the input image in the predetermined area, the specific luminance data whose deviation from the average luminance calculated in the luminance information calculation step is larger than a predetermined value is replaced with the replacement luminance data whose deviation from the average luminance is smaller. A replacement image creation step of creating a replacement image by replacement, a luminance smoothing step of smoothing the luminance of the target pixel by a luminance value in the vicinity of the target pixel in the predetermined region, and a replacement image generation step For the replacement image, the luminance unevenness image creation step for obtaining the block average luminance by the luminance smoothing step to create the luminance unevenness image, and for the input image, the luminance The average luminance calculated by the distribution calculating step, and the calculates the luminance unevenness image created by uneven brightness image generation step, a method and a luminance unevenness removing step of creating an output image obtained by removing the luminance unevenness.
According to this invention, the replacement image in which the average luminance and the luminance deviation representative value of the input image are calculated in the luminance information calculation step and the specific luminance data is replaced with the replacement luminance data in which the deviation from the average luminance is small in the replacement image creation step. The brightness unevenness image creation process smooths the replacement image to create a brightness unevenness image, and the brightness unevenness removal process creates the output image with the brightness unevenness removed by calculating the input image, average brightness, and brightness unevenness image. can do.
Further, the method is suitable for using the image processing apparatus according to claim 1, and has the same effects as the invention according to claim 1.

本発明の画像処理装置および方法によれば、入力画像のうち、平均輝度からの偏差が所定値より大きい特異輝度データを、より偏差が小さくなる輝度置換データに置換して置換画像を形成し、それを平滑化することにより、精度よく輝度ムラ画像が作成でき、入力情報、平均輝度、および輝度ムラ画像を演算することで、輝度ムラを除去もしくは低減した出力画像が得られるから、周波数領域の演算に起因する疑似エッジなどを発生させることなく、高速かつ簡単なアルゴリズムにより輝度ムラを除去もしくは低減することができ、さらに周期パターンを含まない入力画像でも同様に輝度ムラを除去もしくは低減できるという効果を奏する。   According to the image processing apparatus and method of the present invention, the substitution image is formed by replacing the singular luminance data in which the deviation from the average luminance is larger than the predetermined value among the input images with the luminance substitution data in which the deviation is smaller, By smoothing it, a brightness unevenness image can be created with high accuracy, and by calculating the input information, average brightness, and brightness unevenness image, an output image with reduced or reduced brightness unevenness can be obtained. It is possible to remove or reduce luminance unevenness with a fast and simple algorithm without generating pseudo edges due to computations, and to eliminate or reduce luminance unevenness in an input image that does not contain a periodic pattern as well. Play.

以下では、本発明の実施の形態を、添付図面を参照して説明する。すべての図面において、実施形態が異なる場合であっても、同一または相当する部材には同一符号を付し、重複する説明は省略する。
[第1の実施形態]
本発明の第1の実施形態に係る画像処理装置について説明する。
図1は、本発明の第1の実施形態に係る画像処理装置が用いられた基板検査システムの概略構成について説明するための機能ブロック図である。図2は、本発明の第1の実施形態に係る画像処理装置の画像ムラ除去部の構成について説明するための機能ブロック図である。
Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In all the drawings, even if the embodiments are different, the same or corresponding members are denoted by the same reference numerals, and redundant description is omitted.
[First Embodiment]
An image processing apparatus according to a first embodiment of the present invention will be described.
FIG. 1 is a functional block diagram for explaining a schematic configuration of a substrate inspection system using the image processing apparatus according to the first embodiment of the present invention. FIG. 2 is a functional block diagram for explaining the configuration of the image unevenness removal unit of the image processing apparatus according to the first embodiment of the present invention.

本実施形態の画像処理装置は、画像信号の輝度ムラを除去するために、単体または画像処理システムの一部として用いることができるものである。以下では、図1に示した半導体ウエハや液晶基板などの欠陥検査を行うための基板検査システム1に組み込まれた画像ムラ除去部11を例にとって説明する。   The image processing apparatus of the present embodiment can be used alone or as a part of an image processing system in order to remove luminance unevenness of an image signal. In the following, the image unevenness removing unit 11 incorporated in the substrate inspection system 1 for performing the defect inspection of the semiconductor wafer and the liquid crystal substrate shown in FIG. 1 will be described as an example.

基板検査システム1について簡単に説明する。
基板検査システム1は、不図示のステージに固定された被検体に照明光を照射し、被検体から射出される反射光、散乱光、回折光などをCCDカメラ4により撮像し、そのようにして取得された画像をメインコンピュータ12により画像処理して、欠陥検査を行うものである。
メインコンピュータ12は、CCDカメラ4で撮像した画像を取り込んで画像データを形成する画像取込み回路2、画像記憶部8、240、CCDカメラ4やステージなどの駆動を制御する駆動制御部13、画像データを画像処理して欠陥抽出する欠陥抽出アルゴリズム部40、41、および欠陥辞書31を参照して抽出された欠陥の種類を判定する欠陥判定部32を備える。なお、欠陥抽出アルゴリズム部40、41は、同一構成を有し、2つの画像処理を並行処理することができるようになっている。
メインコンピュータ12には、外部から制御を行うための操作入力部43、入力画像や検査結果を表示するための表示部29が接続されている。
The board inspection system 1 will be briefly described.
The substrate inspection system 1 irradiates a subject fixed to a stage (not shown) with illumination light, images reflected light, scattered light, diffracted light, and the like emitted from the subject with the CCD camera 4, and so on. The acquired image is subjected to image processing by the main computer 12 to perform defect inspection.
The main computer 12 includes an image capturing circuit 2 that captures an image captured by the CCD camera 4 and forms image data, an image storage unit 8 and 240, a drive control unit 13 that controls driving of the CCD camera 4 and the stage, and image data. Defect extraction algorithm units 40 and 41 for extracting defects by performing image processing, and a defect determination unit 32 for determining the type of defect extracted with reference to the defect dictionary 31. The defect extraction algorithm units 40 and 41 have the same configuration, and can perform two image processes in parallel.
Connected to the main computer 12 are an operation input unit 43 for external control and a display unit 29 for displaying input images and inspection results.

欠陥抽出アルゴリズム部40(41)は、画像の輝度ムラを除去する画像ムラ除去部11(画像処理装置)、輝度ムラを除去後の画像データにおける位置検出用パターンを検出するための特徴部分抽出部17、検出された位置検出用パターンの位置情報に基づき画像の位置補正を行う画像位置補正部20、位置補正後の画像から欠陥を抽出する欠陥抽出部24、抽出された欠陥の座標抽出を行う欠陥座標抽出部28とから構成される。
画像ムラ除去部11には、除去するために抽出した画像ムラを必要に応じて記憶する画像ムラ記憶部16が接続される。
特徴部分抽出部17には、特徴抽出するための比較パターンを記憶する特徴記憶部21が接続されている。
欠陥抽出部24には、抽出された欠陥の画像を記憶するための画像記憶部240が接続されている。
The defect extraction algorithm unit 40 (41) includes an image unevenness removing unit 11 (image processing apparatus) that removes unevenness in brightness of an image, and a feature portion extracting unit that detects a position detection pattern in the image data after removing unevenness in brightness. 17. Image position correction unit 20 that performs image position correction based on the position information of the detected position detection pattern, defect extraction unit 24 that extracts defects from the image after position correction, and coordinates extraction of the extracted defects. And a defect coordinate extraction unit 28.
The image unevenness removal unit 11 is connected to an image unevenness storage unit 16 that stores the image unevenness extracted for removal as necessary.
A feature storage unit 21 that stores a comparison pattern for extracting features is connected to the feature portion extraction unit 17.
The defect extraction unit 24 is connected to an image storage unit 240 for storing an image of the extracted defect.

画像ムラ除去部11の概略構成は、図2に示すように、画像入力手段100、画像縮小手段101、輝度情報算出手段102、輝度置換画像作成手段103(置換画像作成手段)、輝度ムラ画像作成手段104、輝度ムラ画像拡大手段105(画像サイズ拡大手段)、輝度ムラ除去画像作成手段106、画像出力手段107、および輝度平滑化手段108からなる。   As shown in FIG. 2, the schematic configuration of the image unevenness removing unit 11 includes an image input unit 100, an image reduction unit 101, a luminance information calculation unit 102, a luminance replacement image generation unit 103 (substitution image generation unit), and a luminance unevenness image generation. The image forming apparatus includes means 104, luminance unevenness image enlargement means 105 (image size enlargement means), luminance unevenness removal image creation means 106, image output means 107, and luminance smoothing means 108.

画像入力手段100は、画像記憶部8からCCDカメラ4の各画素に対応する入力画像(画像サイズ(M×N)。ただしM,Nは整数)を取得し、画素位置(i,j)の輝度データを2次元配列Iin(i,j)(i,jは、1≦i≦M、1≦j≦Nの整数)に格納するための手段である。以下、Iin(i,j)を単に入力画像と称する。 The image input unit 100 obtains an input image (image size (M × N), where M and N are integers) corresponding to each pixel of the CCD camera 4 from the image storage unit 8, and sets the pixel position (i, j). This is means for storing luminance data in a two-dimensional array I in (i, j) (where i, j is an integer of 1 ≦ i ≦ M and 1 ≦ j ≦ N). Hereinafter, I in (i, j) is simply referred to as an input image.

なお、画像サイズは、画像入力手段100により入力された画像サイズであり、CCDカメラ4によって撮像された全画像範囲であってもよいし、その一部でもよい。
画像範囲の一部を選ぶ場合、画像処理を複数に分けることにより全画像範囲を画像処理することができることは言うまでもない。
The image size is the image size input by the image input means 100, and may be the entire image range captured by the CCD camera 4 or a part thereof.
When selecting a part of the image range, it goes without saying that the entire image range can be processed by dividing the image processing into a plurality of parts.

画像縮小手段101は、入力画像Iin(i,j)に格納された輝度データを間引いて、画像サイズ(m×n)に縮小して、縮小画像I(i,j)(i,jは、1≦i≦m、1≦j≦nの整数)を形成するための手段である。
間引き間隔は、縮小する画像サイズの大きさにより適宜決めるが、本実施形態では等間隔に間引き、整数分の一の縮小倍率としている。
The image reduction means 101 thins out the luminance data stored in the input image I in (i, j), reduces it to the image size (m × n), and reduces the reduced image I r (i, j) (i, j Is a means for forming 1 ≦ i ≦ m and an integer of 1 ≦ j ≦ n.
The thinning interval is determined as appropriate depending on the size of the image to be reduced. In the present embodiment, the thinning interval is thinned at equal intervals, and the reduction ratio is an integer.

輝度情報算出手段102は、縮小画像I(i,j)の平均輝度I、輝度偏差代表値sを算出し、平均輝度Iからの偏差が大きい特異輝度データが存在する画素領域Qを求めるための手段である。
輝度偏差代表値は、輝度データの平均輝度Iからの偏差を代表する数値で、種々の統計的代表値およびそれを適宜演算した値を採用することができる。例えば、kを適宜の定数、σを標準偏差として、次式を輝度偏差代表値として採用することができる。
s=k・σ ・・・(1)
ここで、kの値は、2〜3程度が好ましい。
特異輝度データおよびその画素領域Qの抽出は、縮小画像I(i,j)が、それぞれ次式を満たすかどうか判断できるようになっている。
|I(i,j)−I|>s ・・・(2)
式(2)を満たすすべての画素位置(i,j)の集合が画素領域Qとなる。以下では、(i,j)が画素領域Qに属することを強調する場合には(I,J)と表す。
ここで、輝度情報算出手段102で求められる輝度値(I±s)は、特異輝度データを判定するための境界輝度値となっている。
The luminance information calculation unit 102 calculates the average luminance I A and the luminance deviation representative value s of the reduced image I r (i, j), and determines the pixel region Q in which specific luminance data having a large deviation from the average luminance I A exists. It is a means for seeking.
Luminance deviation representative value may be employed by a numerical value representing the deviation from the average luminance I A of the luminance data, a variety of statistical representative value and appropriately calculating the values it. For example, k can be an appropriate constant, σ can be a standard deviation, and the following equation can be used as a luminance deviation representative value.
s = k · σ (1)
Here, the value of k is preferably about 2-3.
The extraction of the singular luminance data and the pixel region Q can determine whether the reduced image I r (i, j) satisfies the following equation.
| I r (i, j) −I A |> s (2)
A set of all pixel positions (i, j) satisfying Expression (2) is the pixel region Q. Hereinafter, when emphasizing that (i, j) belongs to the pixel region Q, it is expressed as (I, J).
Here, the luminance value (I A ± s) obtained by the luminance information calculation unit 102 is a boundary luminance value for determining singular luminance data.

輝度平滑化手段108は、注目画素を任意位置に指定してその近傍周辺のブロックで輝度平滑化処理を行うための手段である。そして、輝度情報算出手段102および後述する輝度ムラ画像作成手段104に接続されている。
図3は、平滑化処理について説明するための概念図である。
平均をとるブロック領域Bは、矩形領域に限定されず、例えば円形領域などでもよいが、以下では簡単のために、大きさが{(2・Δi+1)×(2・Δj+1)}(Δi、Δjは整数)の矩形領域として説明する(図3(a)参照)。
画素位置(i,j)の画素の輝度がP(i,j)で表されるとすると、注目画素の画素位置(i,j)のブロック平均輝度p(i,j)は、次式で表される。
(i,j)={ΣP(i,j)}/K ・・・(3)
ここで、総和記号Σは、ブロック領域Bのすべての画素位置(i,j)についての和をとるものとする。また、Kはブロック領域Bの画素数を表すものとする。すなわち、
−Δi≦i≦i+Δi ・・・(4a)
−Δj≦j≦j+Δj ・・・(4b)
K=(2・Δi+1)・(2・Δj+1) ・・・(4c)
このようなブロックの形状、大きさは、画像データ、平滑化の目的に応じて適宜設定できる。
The luminance smoothing unit 108 is a unit for designating the target pixel at an arbitrary position and performing luminance smoothing processing on blocks in the vicinity thereof. And it is connected to the brightness information calculation means 102 and the brightness unevenness image creation means 104 described later.
FIG. 3 is a conceptual diagram for explaining the smoothing process.
The block area B to be averaged is not limited to a rectangular area, and may be, for example, a circular area, but for the sake of simplicity, the size is {(2 · Δi + 1) × (2 · Δj + 1)} (Δi, Δj Will be described as a rectangular area (see FIG. 3A).
If the luminance of the pixel at the pixel position (i, j) is represented by P (i, j), the block average luminance p 1 (i 1 , j 1 ) at the pixel position (i 1 , j 1 ) of the pixel of interest. Is expressed by the following equation.
p 1 (i 1 , j 1 ) = {ΣP (i B , j B )} / K (3)
Here, the summation symbol Σ is assumed to be the sum for all pixel positions (i B , j B ) in the block region B. Further, K represents the number of pixels in the block area B. That is,
i 1 −Δi ≦ i B ≦ i 1 + Δi (4a)
j 1 −Δj ≦ j B ≦ j 1 + Δj (4b)
K = (2 · Δi + 1) · (2 · Δj + 1) (4c)
The shape and size of such a block can be appropriately set according to the image data and the purpose of smoothing.

ここで、画素位置(i,j)を順次移動させれば、ブロック領域Bも平行移動し、任意の画素位置でのブロック平均輝度が求められる。例えば、iの値を1だけ更新して、p(i,j)に隣接するブロック平均輝度p(i+1,j)を求めることができる(図3(b)参照)。また、iの値を(2・Δi+1)だけ更新して、ブロック領域Bが隣り合う位置でのブロック平均輝度p(i+2・Δi+1,j)を求めることができる(図3(c)参照)。 Here, if the pixel position (i 1 , j 1 ) is sequentially moved, the block region B is also moved in parallel, and the block average luminance at an arbitrary pixel position is obtained. For example, the value of i 1 can be updated by 1 to obtain the block average luminance p 2 (i 1 +1, j 1 ) adjacent to p 1 (i 1 , j 1 ) (see FIG. 3B). ). Further, by updating the value of i 1 by (2 · Δi + 1), the block average luminance p 3 (i 1 + 2 · Δi + 1, j 1 ) at the position where the block region B is adjacent can be obtained (FIG. 3 ( c)).

輝度置換画像作成手段103は、輝度情報算出手段102で判断された特異輝度データを、より輝度偏差の小さい輝度置換データに置換することにより、輝度偏差が低減された置換画像を形成するための手段である。
すなわち、縮小画像I(i,j)に対する置換画像I(i,j)は、
i,jが、式(2)を満たす画素領域Qの範囲では、
(I,J)=I(I,J) ・・・(5a)
それ以外のi,jに対しては、
(i,j)=I(i,j) ・・・(5b)
とされる。
The brightness replacement image creating means 103 replaces the specific brightness data determined by the brightness information calculation means 102 with brightness replacement data having a smaller brightness deviation, thereby forming a replacement image with reduced brightness deviation. It is.
That is, the replacement image I t (i, j) for the reduced image I r (i, j) is
In the range of the pixel region Q where i and j satisfy Expression (2),
I t (I, J) = I R (I, J) ··· (5a)
For other i and j,
I t (i, j) = I r (i, j) (5b)
It is said.

ここで輝度置換データI(I,J)は、輝度偏差が低減できればどのようなデータでもよいが、例えば、輝度置換を行う画素(I,J)に対して、輝度平滑化手段108により算出される近傍周辺のブロック平均輝度を採用することができる。すなわち、式(3)のi,jに代えて、I,Jとし、P(i、j)に代えて、I(i、j)として、
(I,J)={ΣI(i,j)}/K ・・・(6)
ここで、総和記号Σの意味は、式(3)と同様とする。
また、特異輝度データの近傍周辺領域であるブロック領域Bは、式(4a)、(4b)において、i,jをそれぞれI,Jに置き換えたものとしてもよいが、より高精度の輝度置換を行うためには、画素領域Qをモルフォロジ膨張処理で拡張した画素領域のみから(i、JにはQ含まず)求めることが好ましい。また、簡単化のために画像領域Qを平均輝度Iで置換するようにしてもよい。
Here, the luminance replacement data I R (I, J) may be any data as long as the luminance deviation can be reduced. For example, the luminance smoothing means 108 calculates the pixel (I, J) to be subjected to luminance replacement. The block average luminance around the neighborhood can be adopted. That is, instead of i 1 and j 1 in equation (3), I and J are used, and instead of P (i B and j B ), I r (i B and j B ) is used.
I R (I, J) = {ΣI r (i B , j B )} / K (6)
Here, the meaning of the summation symbol Σ is the same as that in Equation (3).
In addition, the block region B which is the vicinity peripheral region of the singular luminance data may be obtained by replacing i 1 and j 1 with I and J in equations (4a) and (4b), respectively. In order to perform the replacement, it is preferable that the pixel area Q is obtained only from the pixel area expanded by the morphological expansion process (i B and J B do not include Q). Further, the image area Q may be substituted by the average luminance I A for simplicity.

輝度ムラ画像作成手段104は、式(5a)、(5b)に示す置換画像I(i,j)から、高周波成分のノイズ、例えば撮像素子の各画素の受光感度、応答特性に起因する撮像時のノイズなどを除去し、照明ムラや、撮像光学系のシェーディング特性などに起因する比較的広域にわたる輝度ムラを抽出して輝度ムラ画像を作成するための手段である。
具体的には、輝度平滑化手段108により、置換画像I(i,j)を平滑化する。すなわち、輝度ムラ画像Itave(i,j)は、式(3)のi,jに代えて、i,jとし、P(i,j)に代えて、I(i,j)とした次式により作成される。
tave(i,j)={Σ(I(i,j)}/K ・・・(7)
ここで、総和記号Σの意味は、式(3)と同様とする。また、ブロック領域Bは、式(4a)、(4b)において、i,jをそれぞれi,jに置き換えたものとする。ただし、Δi、Δjの大きさは、必要に応じて式(6)、(7)では異なる値とすることができる。
The luminance unevenness image creating means 104 captures high-frequency component noise, for example, the light reception sensitivity and response characteristics of each pixel of the image sensor from the replacement images I t (i, j) shown in equations (5a) and (5b). This is a means for removing luminance noise and extracting luminance unevenness over a relatively wide area caused by illumination unevenness and shading characteristics of the imaging optical system to create a luminance unevenness image.
Specifically, the replacement image I t (i, j) is smoothed by the brightness smoothing means 108. That is, the luminance unevenness image I tave (i, j) is replaced with i 1 , j 1 in equation (3), i, j, and P (i B , j B ) instead of I t (i B , J B ).
I tave (i, j) = {Σ (I t (i B , j B )} / K (7)
Here, the meaning of the summation symbol Σ is the same as that in Equation (3). The block area B is obtained by replacing i 1 and j 1 with i and j in equations (4a) and (4b), respectively. However, the magnitudes of Δi and Δj can be different values in the equations (6) and (7) as necessary.

輝度ムラ画像拡大手段105は、輝度ムラ画像Itave(i,j)に対して、画像縮小手段101でデータを間引いた画素に対応する輝度データを補間することにより画素サイズ(m×n)を画素サイズ(M×N)に拡大して、拡大輝度ムラ画像Itex(i,j)(i,jは、1≦i≦M、1≦j≦Nの整数)を作成するための手段である。
輝度データの補間には、どのような補間アルゴリズムを用いてもよいが、例えば1次補間を採用することができる。
The luminance unevenness image enlargement unit 105 interpolates the luminance data corresponding to the pixels obtained by thinning out the data by the image reduction unit 101 with respect to the luminance unevenness image I tave (i, j), thereby setting the pixel size (m × n). A means for enlarging the pixel size (M × N) to create an enlarged luminance unevenness image I tex (i, j) (i, j is an integer of 1 ≦ i ≦ M, 1 ≦ j ≦ N). is there.
Any interpolation algorithm may be used for the luminance data interpolation. For example, linear interpolation may be employed.

輝度ムラ除去画像作成手段106は、入力画像Iin(i,j)に対して、平均輝度I、拡大輝度ムラ画像Itex(i,j)を演算して、入力画像から輝度ムラを除去した出力画像Iout(i,j)(i,jは、1≦i≦M、1≦j≦Nの整数)を作成するための手段である。
出力画像Iout(i,j)は次式より算出される。
out(i,j)=Iin(i,j)+I−Itex(i,j) ・・・(8)
画像出力手段107は、出力画像Iout(i,j)を、特徴部分抽出部17へ出力するための手段である。
The luminance unevenness removal image creating means 106 calculates the average luminance I A and the enlarged luminance unevenness image I tex (i, j) for the input image I in (i, j), and removes the luminance unevenness from the input image. The output image I out (i, j) (i, j is an integer satisfying 1 ≦ i ≦ M and 1 ≦ j ≦ N).
The output image I out (i, j) is calculated from the following equation.
I out (i, j) = I in (i, j) + I A −I tex (i, j) (8)
The image output unit 107 is a unit for outputting the output image I out (i, j) to the feature portion extraction unit 17.

次に本実施形態の画像ムラ除去部11の動作を説明する。
図4(a)は、入力画像の一例を示す模式図である。図4(b)は、入力画像(縮小画像)の1次元の輝度分布の一例を示すグラフである。図4(c)は、置換画像の一例を示すグラフである。図4(b)、4(c)とも横軸は画素位置を示し、縦軸は各画素の輝度を示す。図5(a)は、本発明の第1の実施形態に係る画像処理方法について説明するためのフローチャートである。
Next, the operation of the image unevenness removal unit 11 of this embodiment will be described.
FIG. 4A is a schematic diagram illustrating an example of an input image. FIG. 4B is a graph showing an example of a one-dimensional luminance distribution of the input image (reduced image). FIG. 4C is a graph illustrating an example of a replacement image. 4B and 4C, the horizontal axis indicates the pixel position, and the vertical axis indicates the luminance of each pixel. FIG. 5A is a flowchart for explaining the image processing method according to the first embodiment of the present invention.

例えば半導体ウエハや液晶基板などの画像パターンは、図4(a)に一例を示すように、ブロック状に分布し、画像情報を多く含んだ高輝度部51が所定ピッチで繰り返し現れ、その間に高輝度部51より著しく輝度が低く面積比も小さい低輝度部52が現れる、といった比較的高コントラストの周期的パターンを有する場合が多い。また、周期性はなくとも、例えば、画像検査における欠陥領域や各種構成部材の境界領域、配線ラインなどの輝度が急変する領域が存在する。
そして、入力画像50には、このような急峻な輝度変化の他に、照明ムラやCCDカメラ4の撮像光学系のシェーディング特性などに起因する輝度ムラが含まれている。この輝度ムラは、CCDカメラ4の撮像素子の感度バラツキや不安定性に起因するノイズに比べると空間周波数ではより低周波となっている。またそのような輝度ムラの変動幅は、高輝度部51と低輝度部52の輝度の差よりも小さい場合が多い。
For example, as shown in FIG. 4A, for example, an image pattern of a semiconductor wafer, a liquid crystal substrate, or the like is distributed in a block shape, and high-intensity portions 51 containing a lot of image information appear repeatedly at a predetermined pitch. In many cases, the pattern has a relatively high contrast periodic pattern in which a low-luminance portion 52 having a significantly lower luminance and a smaller area ratio than the luminance portion 51 appears. Moreover, even if there is no periodicity, for example, there are areas where the luminance changes suddenly, such as defect areas in image inspection, boundary areas of various components, and wiring lines.
In addition to such a steep brightness change, the input image 50 includes brightness unevenness due to illumination unevenness and shading characteristics of the imaging optical system of the CCD camera 4. This luminance unevenness is lower in spatial frequency than noise due to sensitivity variation and instability of the image sensor of the CCD camera 4. In addition, the variation width of such luminance unevenness is often smaller than the difference in luminance between the high luminance portion 51 and the low luminance portion 52.

以下、図5(a)を参照して各工程について説明する。
画像入力工程(ステップ150)では、入力画像50が、画像入力手段100により2次元配列Iin(i,j)に格納され、参照可能とされる。Iin(i,j)の格納場所は、画像記憶部8に設けられる。
例えば図4(a)のj=jの画素列の輝度分布を表示すると、一例として、図4(b)に示すような輝度分布を示す曲線301が得られる。
曲線301は、画素位置に応じて幅の広い高輝度部51と幅が狭く輝度レベルがほとんど最小レベルに近い低輝度部52とが交代して現れている。そして、全画素に対して下向きに凸の輝度ムラが生じている。
高輝度部51では、さらにそれぞれのブロック内の輝度ムラによる変動が重畳されている。輝度ムラは、輝度に比例して生じるため、低輝度部52の輝度レベルは、ほとんど影響を受けていない。
Hereinafter, each step will be described with reference to FIG.
In the image input step (step 150), the input image 50 is stored in the two-dimensional array I in (i, j) by the image input means 100 and can be referred to. The storage location of I in (i, j) is provided in the image storage unit 8.
For example, to display the luminance distribution of the pixel column of j = j k of FIG. 4 (a), as an example, the curve 301 showing the luminance distribution as shown in FIG. 4 (b) is obtained.
A curved line 301 alternates between a wide high-brightness part 51 and a low-brightness part 52 that is narrow and whose luminance level is almost the minimum level depending on the pixel position. In addition, uneven luminance unevenly occurs downward with respect to all pixels.
In the high luminance part 51, variation due to luminance unevenness in each block is further superimposed. Since the luminance unevenness occurs in proportion to the luminance, the luminance level of the low luminance portion 52 is hardly affected.

次に、画像縮小工程(ステップ151)では、画像縮小手段101により、Iin(i,j)のデータを等間隔に間引き、画像サイズ(M×N)を画像サイズ(m×n)に縮小して、縮小画像I(i,j)を作成する。このとき、図4(b)は、横軸方向に倍率(m/M)で圧縮されるが、以下の説明では、特に誤解の恐れがない限り、図4(b)が縮小画像I(i,j)をも表すものとして説明する。 Next, in the image reduction process (step 151), the image reduction means 101 thins out the data of I in (i, j) at equal intervals, and reduces the image size (M × N) to the image size (m × n). Then, the reduced image I r (i, j) is created. At this time, FIG. 4B is compressed at a magnification (m / M) in the horizontal axis direction, but in the following description, FIG. 4B is a reduced image I r (unless otherwise misunderstood. It is assumed that i, j k ) is also expressed.

次に、縮小画像I(i,j)から輝度情報を算出する輝度情報算出工程(ステップ152)について説明する。
図5(b)は、輝度情報算出工程の詳細について説明するためのフローチャートである。
ステップ201では、輝度情報算出手段102により、平均輝度I、輝度偏差代表値s(式(1)参照)を求める。図4(b)には、平均輝度Iと、境界輝度値I±sをそれぞれ破線で示した。
このとき、縮小画像を用いるのでデータ数は減少しているが、処理対象領域としては、画像サイズ(M×N)に相当する領域となっている。
Next, a luminance information calculation step (step 152) for calculating luminance information from the reduced image I r (i, j) will be described.
FIG. 5B is a flowchart for explaining details of the luminance information calculation step.
In step 201, the luminance information calculation means 102 obtains the average luminance I A and the luminance deviation representative value s (see equation (1)). In FIG. 4B, the average luminance I A and the boundary luminance value I A ± s are indicated by broken lines.
At this time, since the reduced image is used, the number of data is reduced, but the processing target area is an area corresponding to the image size (M × N).

ステップ202では、縮小画像I(i,j)の各データが、式(2)を満たすかどうか判断し、画素領域Qを抽出する。
例えば、図4(b)に示す領域51A、51B、および低輝度部52は、画素領域Qに属する。
In step 202, it is determined whether each data of the reduced image I r (i, j) satisfies the equation (2), and the pixel region Q is extracted.
For example, the areas 51A and 51B and the low luminance part 52 shown in FIG. 4B belong to the pixel area Q.

ステップ203では、画素領域Qに属する画素を注目画素として、輝度平滑化手段108により、その近傍周辺領域のブロック平均輝度を算出し、式(6)により輝度置換データI(I,J)を算出する(輝度平滑化工程、図5(a)のステップ153)。
輝度置換データI(I,J)は、平均をとるブロック領域Bの大きさを適切に設定し、特異輝度データ以外の輝度データを含めて平均することにより、特異輝度データより平均輝度Iからの偏差が小さくなるようにすることができる。このようなブロック領域Bは、その大きさを、画素領域Qの外側に延長された領域とすることにより可能となる。例えば、画素領域Qをモルフォロジ膨張処理することにより、そのような近傍周辺領域を容易に求めることができる。
以上により、輝度情報算出工程が終了する。
In step 203, the pixel that belongs to the pixel region Q is used as a pixel of interest, the luminance smoothing means 108 calculates the block average luminance of the neighboring peripheral region, and the luminance replacement data I R (I, J) is calculated by equation (6) Calculate (brightness smoothing step, step 153 in FIG. 5A).
In the luminance replacement data I R (I, J), the average luminance I A is determined from the specific luminance data by appropriately setting the size of the block area B to be averaged and averaging the luminance data other than the specific luminance data. The deviation from can be reduced. Such a block area B is made possible by setting the size of the block area B to an area extending outside the pixel area Q. For example, by performing a morphological expansion process on the pixel region Q, such a neighboring peripheral region can be easily obtained.
Thus, the luminance information calculation process ends.

次に、輝度置換画像作成工程(図5(a)のステップ154)では、輝度情報算出工程で抽出された特異輝度データに対して、輝度置換画像作成手段103により、輝度置換を行い、式(5a)、(5b)で表される置換画像I(i,j)を作成する。
図4(c)に示す曲線302は、置換画像I(i,j)の一例を示す。輝度が(I−s)以上(I+s)以下の範囲では、輝度置換が行われないが、その範囲外で輝度偏差が縮小されている。
なお、図4(c)は模式図のため、寸法比は必ずしも正確ではない。例えば、輝度置換データが境界輝度値と等しいかのように図示されているが、本実施形態では、輝度置換データはブロック領域Bの大きさにより輝度値が変化するので常に境界輝度値と等しくなるとは限らない。
Next, in the brightness replacement image creation step (step 154 in FIG. 5A), the brightness replacement image creation means 103 performs brightness replacement on the specific brightness data extracted in the brightness information calculation step, and the formula ( A replacement image I t (i, j) represented by 5a) and (5b) is created.
A curve 302 shown in FIG. 4C shows an example of the replacement image I t (i, j k ). Brightness (I A -s) In the above (I A + s) the range, the luminance substituted is not performed, the brightness deviation is reduced in the range.
In addition, since FIG.4 (c) is a schematic diagram, a dimensional ratio is not necessarily exact. For example, although the luminance replacement data is illustrated as being equal to the boundary luminance value, in the present embodiment, the luminance replacement data is always equal to the boundary luminance value because the luminance value changes depending on the size of the block area B. Is not limited.

続いて、輝度ムラ画像作成工程(ステップ155)では、輝度平滑化手段108により置換画像I(i,j)の平滑化を行い、式(7)で表される輝度ムラ画像Itave(i,j)を作成する。
すなわち、ブロック領域Bの大きさを適宜に設定して、所定領域内のすべての画素について順次平滑化を行う(輝度平滑化工程、ステップ156)。
置換画像では、輝度変化の大きい特異輝度データが置換されているので、輝度変化の近傍領域で特異輝度データの影響を受けて、平滑化しきれない滲みが生じ、輝度ムラの抽出精度が低下する、といったことを防止することができる。
Subsequently, in the luminance unevenness image creation step (step 155), the luminance smoothing means 108 smoothes the replacement image I t (i, j), and the luminance unevenness image I tave (i) expressed by the equation (7). , J).
That is, the size of the block area B is set as appropriate, and all pixels in the predetermined area are sequentially smoothed (luminance smoothing step, step 156).
In the replacement image, the singular luminance data having a large luminance change is replaced, and therefore, blurring that cannot be smoothed occurs due to the influence of the singular luminance data in the vicinity region of the luminance change, and the extraction accuracy of luminance unevenness decreases. Can be prevented.

このとき、入力画像50に輝度ムラと関係のない周期的パターンが存在する場合には、ブロック領域Bの大きさをその周期的パターンが存在する方向の大きさを、周期的パターンの空間周期の整数倍に設定する。このようにすることにより、周期的パターンの空間周期単位で平滑化が行われるので、パターンの空間周期に起因する輝度変動が平滑化され、輝度ムラのノイズとならないようにすることができるという利点がある。   At this time, when there is a periodic pattern unrelated to luminance unevenness in the input image 50, the size of the block region B is set to the size of the direction in which the periodic pattern exists, and the spatial period of the periodic pattern is set. Set to an integer multiple. By doing so, since smoothing is performed in units of the spatial period of the periodic pattern, the luminance fluctuation caused by the spatial period of the pattern is smoothed, and it is possible to prevent noise from luminance unevenness. There is.

入力画像50の周期的パターンは、例えば半導体ウエハのチップ間隔などは予め知られている値に設定することができるが、必要ならば、周期的パターンを検出する画像処理を施して自動的に判別するようにしてもよい。   The periodic pattern of the input image 50 can be set to a known value, for example, the chip interval of the semiconductor wafer. However, if necessary, it is automatically discriminated by performing image processing for detecting the periodic pattern. You may make it do.

図4(c)に示す曲線303Aは、このようにして得られた輝度ムラ画像Itave(i,j)の一例を示す。曲線302は、(I−s)以上(I+s)以下の範囲に略含まれ、滑らかな下向きに凸の曲線となっている。
そして特異輝度データが置換されているので、特に高輝度部51から低輝度部52(図4(b)参照)へ急峻な変化を示す部分の変化幅が格段に低減され、その影響をあまり受けない滑らかな曲線とされている。したがって、曲線303Aは、高輝度部51内の輝度変化に略沿う形状となっている。
このような輝度ムラ画像は、明確な周期性がないので、フーリエ変換では精度よく抽出することができないが、本実施形態では、空間領域で画像処理するので、疑似エッジなどを発生させることもなく高精度に輝度ムラを抽出できる利点がある。
A curve 303A shown in FIG. 4C shows an example of the luminance unevenness image I tave (i, j k ) obtained in this way. The curve 302 is substantially included in a range from (I A −s) to (I A + s) and is a smooth downward convex curve.
Since the singular luminance data is replaced, the change width of the portion showing a steep change from the high luminance portion 51 to the low luminance portion 52 (see FIG. 4B) is remarkably reduced, and the influence is not so much. There are no smooth curves. Therefore, the curve 303 </ b> A has a shape that substantially follows the luminance change in the high luminance part 51.
Such a luminance unevenness image does not have a clear periodicity, and therefore cannot be accurately extracted by Fourier transform. However, in this embodiment, since image processing is performed in the spatial domain, a pseudo edge or the like is not generated. There is an advantage that luminance unevenness can be extracted with high accuracy.

次に、輝度ムラ画像拡大工程(ステップ157)では、輝度ムラ画像拡大手段105により輝度ムラ画像Itave(i,j)を補間して、拡大輝度ムラ画像Itex(i,j)(i,jは、1≦i≦M、1≦j≦Nの整数)を作成する。これにより、入力画像Iin(i,j)のうち、略輝度ムラ成分のみが残る輝度ムラ画像が、入力画像Iin(i,j)の画素位置、画素サイズと対応して求められる。
図6(a)は、縮小前の入力画像Iin(i,j)を表す曲線301と、拡大輝度ムラ画像Itex(i,j)を表す曲線303Bとを重ね合わせて示したグラフである。
Next, in the luminance unevenness image enlargement step (step 157), the luminance unevenness image enlargement unit 105 interpolates the luminance unevenness image I tave (i, j) to obtain the enlarged luminance unevenness image I tex (i, j) (i, j is an integer of 1 ≦ i ≦ M and 1 ≦ j ≦ N). Thus, in the input image I in (i, j), brightness unevenness image in which only substantially uneven luminance component remains is the pixel position of the input image I in (i, j), are determined to correspond to the pixel size.
FIG. 6A is a graph in which a curve 301 representing the input image I in (i, j k ) before reduction and a curve 303B representing the enlarged luminance unevenness image I tex (i, j k ) are superimposed. It is.

続いて輝度ムラ除去工程(ステップ158)では、輝度ムラ除去画像作成手段106により、式(8)に基づいて輝度ムラが除去された出力画像Iout(i,j)が作成される。
図6(b)は、出力画像Iout(i,j)を示すグラフである。
拡大輝度ムラ画像Itex(i,j)が入力画像Iin(i,j)から差し引かれることにより、高輝度部51(図4(b)参照)の下向きに凸の輝度ムラの傾向が補正され、略平均輝度Iに沿って平坦な高輝度部51aが形成されていることが分かる。
これに対して、低輝度部52(図4(b)参照)は、上記の補正により領域502の範囲で輝度値がわずかに高い低輝度部52aが形成されている。
この例のように、平均輝度Iが高輝度部側に偏っている画像パターンの場合、輝度ムラが低輝度部に転化しても一般には問題とならないことが多い。
Subsequently, in the luminance unevenness removal step (step 158), the luminance unevenness removed image creating means 106 creates an output image I out (i, j) from which the luminance unevenness has been removed based on the equation (8).
FIG. 6B is a graph showing the output image I out (i, j k ).
The tendency of uneven brightness unevenness of the high brightness portion 51 (see FIG. 4B) is obtained by subtracting the enlarged brightness unevenness image I tex (i, j k ) from the input image I in (i, j k ). There is corrected, it can be seen that is formed flat high-luminance portion 51a substantially along the average luminance I a.
On the other hand, in the low luminance portion 52 (see FIG. 4B), the low luminance portion 52a having a slightly high luminance value in the range of the region 502 is formed by the above correction.
As in this example, the average luminance I A if the image pattern that is biased to the high brightness side, it is often uneven brightness does not become generally safe to convert the low-luminance portion.

画像出力工程(ステップ159)では、画像出力手段107により、出力画像Iout(i,j)を特徴部分抽出部17(図1参照)に出力する。
以上で、画像ムラ除去部11による画像処理工程が終了する。
In the image output step (step 159), the image output means 107 outputs the output image I out (i, j) to the feature portion extraction unit 17 (see FIG. 1).
Thus, the image processing process by the image unevenness removal unit 11 is completed.

このようなに画像ムラ除去部11によれば、加減演算、平均化演算、データ比較、データ置換などの比較的単純な演算処理により空間領域で輝度ムラの量を直接低減することができるから、フーリエ変換などにより周波数領域で画像処理する場合のように、疑似エッジなどのノイズが発生することなく容易に輝度ムラを除去または低減できる。
また、周期パターンを含む場合でも含まない場合でも輝度ムラ除去が行えるという利点がある。
また、フーリエ変換などのアルゴリズムを用いないので、データ量が大きくなっても比較的計算時間が短いため、迅速に画像処理することができるという利点がある。
また、入力画像を縮小してから、輝度置換を行い、輝度ムラ画像を作成するので、これらの演算を施すデータ数を低減できて、入力画像を縮小しない場合に比べて比較的高速な画像処理を行うことができる。近年、例えば基板検査などの画像処理では、被検体のサイズが大型化し、検査対象のパターンが高精細化しているため、画像サイズが大きくなる傾向にあるが、そのような場合でも、迅速に輝度ムラの除去または低減を行うことができるものである。
As described above, according to the image unevenness removing unit 11, the amount of luminance unevenness can be directly reduced in the spatial region by relatively simple arithmetic processing such as addition / subtraction operation, averaging operation, data comparison, and data replacement. As in the case of image processing in the frequency domain by Fourier transform or the like, luminance unevenness can be easily removed or reduced without generating noise such as pseudo edges.
Further, there is an advantage that luminance unevenness can be removed with or without a periodic pattern.
Further, since an algorithm such as Fourier transform is not used, there is an advantage that image processing can be performed quickly because the calculation time is relatively short even when the amount of data increases.
In addition, since the input image is reduced and then the luminance replacement is performed to create a luminance unevenness image, the number of data to be subjected to these operations can be reduced, and relatively high-speed image processing can be performed compared to the case where the input image is not reduced. It can be performed. In recent years, for example, in image processing such as substrate inspection, the size of the subject has increased and the pattern to be inspected has become higher definition, so the image size tends to increase. Unevenness can be removed or reduced.

次に、本実施形態の第1変形例について説明する。
本変形例は、上記実施形態において出力画像Iout(i,j)において、輝度ムラ補正の影響により輝度値がわずかに引き上げられ低輝度部52a(図6(b)参照)の発生を防止するもので、輝度ムラ除去画像作成手段106において、式(8)に代えて、次式により出力画像Iout(i,j)を作成できるようにしたものである。
out(i,j)=Iin(i,j)+{I−Itex(i,j)}・α ・・・(9)
ただし、αは、下記の条件式(10)を満足する(i,j)の範囲に対しては、α=1であり、それ以外の(i,j)に対しては、α=α=0〜1とする。
in(i,j)−Itex(i,j)+I≧0 ・・・(10)
ここで、Iは、適宜設定された一定値を有するオフセット輝度である。
係数α、オフセット輝度Iの値は、例えば、α=0.5、I=Sなどの値を採用することができる。
Next, a first modification of the present embodiment will be described.
In the present modification, in the above-described embodiment, in the output image I out (i, j), the luminance value is slightly increased due to the influence of the luminance unevenness correction, thereby preventing the occurrence of the low luminance portion 52a (see FIG. 6B). Therefore, the luminance unevenness-removed image creating means 106 can create the output image I out (i, j) by the following equation instead of the equation (8).
I out (i, j) = I in (i, j) + {I A −I tex (i, j)} · α (9)
However, α is α = 1 for the range of (i, j) that satisfies the following conditional expression (10), and α = α 0 for the other (i, j). = 0 to 1.
I in (i, j) −I tex (i, j) + I o ≧ 0 (10)
Here, Io is an offset luminance having a constant value set as appropriate.
As the values of the coefficient α o and the offset luminance I o , for example, values such as α o = 0.5, I o = S can be adopted.

本変形例の作用について、図7を参照して説明する。
図7は、第1変形例による出力画像Iout(i,j)を示すグラフである。
例えば、オフセット輝度がI=Sとされると、入力画像Iin(i,j)の高輝度部51(図6(a)参照)では、式(10)を満足するので、式(9)において、α=1とされ、式(8)と同一となる。したがって、上記実施形態と同様に輝度ムラ除去が行われる。
一方、低輝度部52では、式(10)が満足されないので、式(9)において、α=αとして輝度ムラ除去が行われる。そのため、低輝度部52の輝度ムラ補正による影響が低減される。
したがって、図7における領域502に示すように、入力画像の低輝度部52(図6(a)参照)は、出力画像においても、補正前と略同等の輝度を有する低輝度部52bとされる。
その結果、輝度ムラ除去を行っても、補正の影響が低輝度部に及ばないようにすることができる。
The operation of this modification will be described with reference to FIG.
FIG. 7 is a graph showing an output image I out (i, j k ) according to the first modification.
For example, when the offset luminance is I o = S, the high luminance portion 51 (see FIG. 6A) of the input image I in (i, j) satisfies the equation (10). ), Α = 1, which is the same as the equation (8). Therefore, luminance unevenness removal is performed as in the above embodiment.
On the other hand, in the low luminance portion 52, since the equation (10) is not satisfied, the formula (9), the luminance unevenness removal is performed as α = α o. For this reason, the influence of the luminance unevenness correction of the low luminance portion 52 is reduced.
Therefore, as shown in a region 502 in FIG. 7, the low luminance portion 52 (see FIG. 6A) of the input image is a low luminance portion 52b having substantially the same luminance as that before correction in the output image. .
As a result, even if luminance unevenness removal is performed, it is possible to prevent the correction from affecting the low luminance portion.

次に、本実施形態の第2変形例について説明する。
本変形例は、上記実施形態の輝度置換画像作成手段103において、輝度置換データI(I,J)として、式(6)に代えて、次式のように特異輝度データに近い境界輝度値を代入するようにしたものである。すなわち、
画素領域Qの画素位置(I,J)に対して、
(I,J)>I+sのとき、
(I,J)=I+s ・・・(11a)
(I,J)<I−sのとき、
(I,J)=I−s ・・・(11b)
このようにすれば、I(I,J)が加減演算だけで求められるので、式(6)を計算する場合に比べて格段に計算時間が短縮されるという利点がある。
Next, a second modification of the present embodiment will be described.
In this variation, in the luminance replacement image creation unit 103 of the above embodiment, as the luminance replacement data I R (I, J), a boundary luminance value close to singular luminance data as in the following equation instead of equation (6): Is substituted. That is,
For the pixel position (I, J) of the pixel region Q,
When I r (I, J)> I A + s,
I R (I, J) = I A + s (11a)
I r (I, J) <when I A -s,
I R (I, J) = I A −s (11b)
In this way, since I R (I, J) can be obtained only by addition / subtraction, there is an advantage that the calculation time is remarkably reduced as compared with the case of calculating equation (6).

なお、本変形例によれば、置換画像I(i,j)が、すべての画素位置(i,j)に対して、次式の範囲とされる。
−s≦I(i,j)≦I+s ・・・(12)
したがって、予め輝度ムラの範囲が予想される場合には、境界輝度値をその輝度ムラの範囲に合わせることにより、高精度な輝度ムラの補正を行うことができる。
Note that, according to the present modification, the replacement image I t (i, j) is in the range of the following expression for all pixel positions (i, j).
I A −s ≦ I t (i, j) ≦ I A + s (12)
Therefore, when a range of luminance unevenness is predicted in advance, the luminance unevenness can be corrected with high accuracy by matching the boundary luminance value with the range of the luminance unevenness.

[第2の実施形態]
本発明の第2の実施形態に係る画像処理装置について説明する。
本実施形態の画像処理装置は、第1の実施形態の画像ムラ除去部11において、画像縮小手段101、輝度ムラ画像拡大手段105を省略した構成とする。それに伴い輝度情報算出手段102、輝度置換画像作成手段103、輝度ムラ画像作成手段104において、縮小画像I(i,j)に代えて入力画像Iin(i,j)を用い、輝度ムラ除去画像作成手段106において、拡大輝度ムラ画像Itex(i,j)に代えて輝度ムラ画像Itave(i,j)を用いるようにしたものである。
また本実施形態の画像処理方法は、このような画像ムラ除去部11を用いて第1の実施形態の画像縮小工程(ステップ151)、輝度ムラ画像拡大工程(ステップ157)を省略した方法である(図8参照)。これは、画素数が少なく十分計算時間を短くできる場合に適用できる。
これらの詳細の説明は、第1の実施形態の説明および式を上記の変更に基づいて逐次読み替えれば容易に理解されるので省略する。
[Second Embodiment]
An image processing apparatus according to the second embodiment of the present invention will be described.
The image processing apparatus according to the present embodiment has a configuration in which the image reduction unit 101 and the luminance unevenness image enlargement unit 105 are omitted from the image unevenness removal unit 11 according to the first embodiment. Accordingly, the luminance information calculation unit 102, the luminance replacement image creation unit 103, and the luminance unevenness image creation unit 104 use the input image I in (i, j) instead of the reduced image I r (i, j) to remove the luminance unevenness. In the image creating means 106, the uneven luminance image I tave (i, j) is used instead of the enlarged uneven luminance image I tex (i, j).
The image processing method of this embodiment is a method in which the image reduction process (step 151) and the luminance unevenness image enlargement process (step 157) of the first embodiment are omitted using such an image unevenness removal unit 11. (See FIG. 8). This is applicable when the number of pixels is small and the calculation time can be sufficiently shortened.
Description of these details will be omitted because it will be easily understood if the description and formulas of the first embodiment are sequentially read based on the above changes.

本実施形態によれば、フーリエ変換などのアルゴリズムを用いない点では、第1の実施形態と同様であるから、疑似エッジなどのノイズが発生することなく容易に輝度ムラを除去または低減でき、周期パターンを含む場合でも含まない場合でも輝度ムラ除去が行えるという利点がある。
また、データ量が大きくなってもアルゴリズムに起因する計算時間が比較的短いため、迅速に画像処理することができるという利点がある。
第1の実施形態と異なる点では、画像縮小手段、輝度ムラ画像拡大手段を省略するので簡素な装置を構成することができる。また、入力画像の全輝度データを用いて輝度ムラを除去するので、高精度な輝度ムラの除去を行うことができるという利点がある。
According to the present embodiment, since it is the same as the first embodiment in that an algorithm such as Fourier transform is not used, luminance unevenness can be easily removed or reduced without generating noise such as a pseudo edge, and the period There is an advantage that luminance unevenness can be removed with or without a pattern.
In addition, even if the amount of data increases, there is an advantage that image processing can be performed quickly because the calculation time resulting from the algorithm is relatively short.
The difference from the first embodiment is that the image reduction means and the luminance unevenness image enlargement means are omitted, so that a simple device can be configured. Further, since the luminance unevenness is removed using the entire luminance data of the input image, there is an advantage that the luminance unevenness can be removed with high accuracy.

なお、上記の説明では、一例として、面積比の大きい高輝度部と面積比の小さい低輝度部を有する入力画像の例で説明したが、本発明は、平均輝度近傍に含まれる輝度ムラを容易に除去することができるものであり、平均輝度が高輝度であるか、低輝度であるかは、関係がないから、輝度分布はこのような例に限定されない。   In the above description, an example of an input image having a high luminance part with a large area ratio and a low luminance part with a small area ratio has been described as an example. However, the present invention can easily eliminate luminance unevenness included in the vicinity of the average luminance. The luminance distribution is not limited to such an example because there is no relationship between whether the average luminance is high luminance or low luminance.

また、上記の説明では、画像縮小手段101として、等間隔にデータを間引いて整数分の一に縮小する例で説明したが、それ以外の縮小倍率を採用してもよい。   In the above description, the image reduction unit 101 has been described as an example in which data is thinned out at equal intervals and reduced to an integer, but other reduction ratios may be employed.

また、上記の説明では、第1の実施形態として、画像の縮小拡大を行う場合、第2の実施形態として、画像の縮小拡大を行わない場合について説明したが、例えば、図5(a)で画像縮小工程(ステップ151)の直前、および輝度ムラ画像拡大工程(ステップ158)の直前に、画素数判定工程を設け、画像の画素数が所定画素数Xより大きいときは、ステップ151、158を実行し、画素数が所定画素数X以下のときは、ステップ151、158を実行せずにステップ152、159を実行するようにしてもよい。   In the above description, the case where image reduction / enlargement is performed as the first embodiment, and the case where image reduction / enlargement is not performed as the second embodiment have been described. For example, FIG. A pixel number determination step is provided immediately before the image reduction step (step 151) and immediately before the luminance unevenness image enlargement step (step 158). When the number of pixels of the image is larger than the predetermined pixel number X, steps 151 and 158 are performed. When the number of pixels is less than or equal to the predetermined number of pixels X, steps 152 and 159 may be executed without executing steps 151 and 158.

また、上記の説明では、画像処理装置として、基板検査システムの一部に用いられた例で説明したが、輝度ムラを除去する画像処理であれば、どのようなシステムで用いられてもよい。また、単体の画像処理装置であってもよい。   In the above description, an example in which the image processing apparatus is used as a part of a substrate inspection system has been described. However, any image processing may be used as long as it is an image process for removing luminance unevenness. A single image processing apparatus may be used.

本発明の第1の実施形態に係る画像処理装置が用いられた基板検査システムの概略構成について説明するための機能ブロック図である。It is a functional block diagram for demonstrating schematic structure of the board | substrate inspection system using the image processing apparatus which concerns on the 1st Embodiment of this invention. 本発明の第1の実施形態に係る画像処理装置の画像ムラ除去部の構成について説明するための機能ブロック図である。It is a functional block diagram for demonstrating the structure of the image nonuniformity removal part of the image processing apparatus which concerns on the 1st Embodiment of this invention. 輝度平滑化処理について説明するための概念図である。It is a conceptual diagram for demonstrating a brightness | luminance smoothing process. 入力画像の一例を示す模式図、その輝度分布を示すグラフ、および置換画像の輝度分布を示すグラフである。It is a schematic diagram which shows an example of an input image, a graph which shows the luminance distribution, and a graph which shows the luminance distribution of a replacement image. 本発明の第1の実施形態に係る画像処理方法および輝度情報算出工程について説明するためのフローチャートである。It is a flowchart for demonstrating the image processing method and luminance information calculation process which concern on the 1st Embodiment of this invention. 入力画像、拡大輝度ムラ画像、出力画像の一例を模式的に示すグラフである。5 is a graph schematically showing an example of an input image, an enlarged luminance unevenness image, and an output image. 第1変形例による出力画像Iout(i,j)を示すグラフである。Output image I out (i, j k) according to a first modification is a graph showing a. 本発明の第2の実施形態に係る画像処理方法について説明するためのフローチャートである。It is a flowchart for demonstrating the image processing method which concerns on the 2nd Embodiment of this invention.

符号の説明Explanation of symbols

1 基板検査システム
4 CCDカメラ
8、240 画像記憶部
11 画像ムラ除去部(画像処理装置)
40、41 欠陥抽出アルゴリズム部
50 入力画像
100 画像入力手段
101 画像縮小手段
102 輝度情報算出手段
103 輝度置換画像作成手段(置換画像作成手段)
104 輝度ムラ画像作成手段
105 輝度ムラ画像拡大手段(画像拡大手段)
106 輝度ムラ除去画像作成手段
107 画像出力手段
108 輝度平滑化手段
DESCRIPTION OF SYMBOLS 1 Board | substrate inspection system 4 CCD camera 8, 240 Image memory | storage part 11 Image nonuniformity removal part (image processing apparatus)
40, 41 Defect extraction algorithm unit 50 Input image 100 Image input means 101 Image reduction means 102 Luminance information calculation means 103 Luminance replacement image creation means (replacement image creation means)
104 brightness unevenness image creation means 105 brightness unevenness image enlargement means (image enlargement means)
106 Brightness unevenness removal image creation means 107 Image output means 108 Brightness smoothing means

Claims (7)

入力画像の輝度ムラを除去するための画像処理装置であって、
所定領域内の前記入力画像の平均輝度および輝度偏差代表値を算出する輝度情報算出手段と、
前記所定領域内の入力画像の輝度データのうち、前記輝度情報算出手段で算出した平均輝度からの偏差が所定値より大きい特異輝度データを、前記平均輝度からの偏差がより小さくなる置換輝度データに置換した置換画像を作成する置換画像作成手段と、
前記所定領域内の注目画素近傍の輝度値により前記注目画素の輝度を平滑化処理する輝度平滑化手段と、
前記置換画像作成手段により作成された置換画像に対して、前記輝度平滑化手段による輝度平滑化を行って輝度ムラ画像を作成する輝度ムラ画像作成手段と、
前記入力画像に対して、前記輝度情報算出手段により算出された平均輝度、および前記輝度ムラ画像作成手段により作成された輝度ムラ画像を演算して、輝度ムラを除去した出力画像を作成する輝度ムラ除去手段とを備えることを特徴とする画像処理装置。
An image processing apparatus for removing luminance unevenness of an input image,
Luminance information calculating means for calculating an average luminance and a luminance deviation representative value of the input image in a predetermined area;
Among the luminance data of the input image in the predetermined area, the specific luminance data whose deviation from the average luminance calculated by the luminance information calculation means is larger than a predetermined value is replaced with the replacement luminance data whose deviation from the average luminance is smaller. A replacement image creating means for creating a replaced image;
Brightness smoothing means for smoothing the brightness of the target pixel by the brightness value near the target pixel in the predetermined area;
A brightness unevenness image creating means for creating a brightness unevenness image by performing brightness smoothing by the brightness smoothing means on the replacement image created by the replacement image creating means;
Brightness unevenness for calculating an average brightness calculated by the brightness information calculating means and a brightness unevenness image created by the brightness unevenness image creating means for the input image to create an output image from which the brightness unevenness has been removed An image processing apparatus comprising: a removing unit.
前記置換画像作成手段が、前記特異輝度データを注目画素として前記輝度平滑化手段により平滑化された輝度を、前記特異輝度データに対する前記置換輝度データとすることを特徴とする請求項1に記載の画像処理装置。   2. The replacement image creation unit according to claim 1, wherein the luminance smoothed by the luminance smoothing unit using the specific luminance data as a pixel of interest is the replacement luminance data for the specific luminance data. Image processing device. 前記置換画像作成手段が、前記特異輝度データを判断する所定値として、前記平均輝度に前記輝度偏差代表値だけ加減した境界輝度値を用い、
前記置換画像作成手段が、前記特異輝度データに対する前記置換輝度データとして、前記特異輝度データ近傍の前記境界輝度値を用いるようにしたことを特徴とする請求項1または2に記載の画像処理装置。
The replacement image creating means uses, as a predetermined value for determining the specific brightness data, a boundary brightness value obtained by adding or subtracting the brightness deviation representative value to the average brightness,
The image processing apparatus according to claim 1, wherein the replacement image creating unit uses the boundary luminance value in the vicinity of the specific luminance data as the replacement luminance data for the specific luminance data.
前記輝度ムラ画像作成手段が、前記置換画像中の互いに離れた注目画素に対して前記輝度平滑化手段により輝度平滑化を行い、
前記互いに離れた注目画素の間の画素の輝度を、輝度平滑化後の前記注目画素の輝度を補間して求めることにより前記輝度ムラ画像を作成することを特徴とする請求項1〜3のいずれに記載の画像処理装置。
The brightness unevenness image creating means performs brightness smoothing by the brightness smoothing means on the target pixels separated from each other in the replacement image,
The luminance unevenness image is generated by interpolating the luminance of the pixel of interest after luminance smoothing by interpolating the luminance of the pixel between the pixels of interest separated from each other. An image processing apparatus according to 1.
前記輝度平滑化手段が、
前記入力画像に所定ピッチの繰り返しパターンが存在する場合に、前記輝度平滑化を行う近傍周辺のブロックの大きさを前記所定ピッチの整数倍とすることを特徴とする請求項1〜4のいずれかに記載の画像処理装置。
The luminance smoothing means;
5. The block according to claim 1, wherein when a repetitive pattern having a predetermined pitch exists in the input image, the size of a block in the vicinity of the luminance smoothing is set to an integral multiple of the predetermined pitch. An image processing apparatus according to 1.
入力画像を間引いて所定画像サイズの縮小入力画像を作成する画像縮小手段と、
前記所定画像サイズの画像を前記入力画像の画像サイズに拡大する画像サイズ拡大手段とを備え、
前記縮小入力画像を前記所定領域内の入力画像として、前記輝度情報算出手段、前記置換画像作成手段、前記輝度平滑化手段、および前記輝度ムラ画像作成手段により、前記輝度ムラ画像を作成し、
該輝度ムラ画像の画像サイズを前記画像サイズ拡大手段により拡大し、
前記縮小入力画像の平均輝度、画像サイズが拡大された輝度ムラ画像および前記入力画像から、前記輝度ムラ除去手段により輝度ムラを除去した出力画像が作成できるようにしたことを特徴とする請求項1〜5のいずれかに記載の画像処理装置。
Image reduction means for creating a reduced input image of a predetermined image size by thinning out the input image;
Image size enlarging means for enlarging the image of the predetermined image size to the image size of the input image,
Using the reduced input image as an input image in the predetermined area, the luminance information calculation unit, the replacement image generation unit, the luminance smoothing unit, and the luminance unevenness image generation unit, to create the luminance unevenness image,
The image size of the uneven brightness image is enlarged by the image size enlargement means,
2. An output image from which brightness unevenness is removed by the brightness unevenness removing means can be created from the brightness unevenness image in which the average brightness and the image size of the reduced input image are enlarged and the input image. The image processing device according to any one of?
入力画像の輝度ムラを除去するための画像処理方法であって、
所定領域内の前記入力画像の平均輝度および輝度偏差代表値を算出する輝度情報算出工程と、
前記所定領域内の入力画像の輝度データのうち、前記輝度情報算出工程で算出した平均輝度からの偏差が所定値より大きい特異輝度データを、前記平均輝度からの偏差がより小さくなる置換輝度データに置換して置換画像を作成する置換画像作成工程と、
前記所定領域内の注目画素近傍の輝度値により前記注目画素の輝度を平滑化処理する輝度平滑化工程と、
前記置換画像作成工程により作成された置換画像に対して、前記輝度平滑化工程によりブロック平均輝度を求めて輝度ムラ画像を作成する輝度ムラ画像作成工程と、
前記入力画像に対して、前記輝度情報算出工程により算出された平均輝度、および前記輝度ムラ画像作成工程により作成された輝度ムラ画像を演算して、輝度ムラを除去した出力画像を作成する輝度ムラ除去工程とを備えることを特徴とする画像処理方法。
An image processing method for removing luminance unevenness of an input image,
A luminance information calculation step of calculating an average luminance and a luminance deviation representative value of the input image in a predetermined region;
Among the luminance data of the input image in the predetermined area, the specific luminance data whose deviation from the average luminance calculated in the luminance information calculation step is larger than a predetermined value is replaced with the replacement luminance data whose deviation from the average luminance is smaller. A replacement image creation step of creating a replacement image by replacing,
A luminance smoothing step of smoothing the luminance of the target pixel by a luminance value in the vicinity of the target pixel in the predetermined region;
For the replacement image created by the replacement image creation step, a luminance unevenness image creation step of creating a brightness unevenness image by obtaining a block average brightness by the brightness smoothing step;
Brightness unevenness that creates an output image from which the brightness unevenness is removed by calculating the average brightness calculated by the brightness information calculating step and the brightness unevenness image created by the brightness unevenness image creating step for the input image An image processing method comprising: a removing step.
JP2004117699A 2004-04-13 2004-04-13 Image processing device and image processing method Withdrawn JP2005303705A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2004117699A JP2005303705A (en) 2004-04-13 2004-04-13 Image processing device and image processing method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2004117699A JP2005303705A (en) 2004-04-13 2004-04-13 Image processing device and image processing method

Publications (1)

Publication Number Publication Date
JP2005303705A true JP2005303705A (en) 2005-10-27

Family

ID=35334706

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2004117699A Withdrawn JP2005303705A (en) 2004-04-13 2004-04-13 Image processing device and image processing method

Country Status (1)

Country Link
JP (1) JP2005303705A (en)

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008146729A1 (en) * 2007-05-28 2008-12-04 Olympus Corporation Noise removal device, program, and method
JP2010141435A (en) * 2008-12-09 2010-06-24 Noritsu Koki Co Ltd Method, program and apparatus for photographic image processing
JP2012059129A (en) * 2010-09-10 2012-03-22 Bridgestone Corp Tire master image generation method and tire master image generation device
JP2013031000A (en) * 2011-07-28 2013-02-07 Kyocera Document Solutions Inc Image processing program and image processing method
JP2017102804A (en) * 2015-12-04 2017-06-08 セイコーエプソン株式会社 Image processing method and image processing program

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2008146729A1 (en) * 2007-05-28 2008-12-04 Olympus Corporation Noise removal device, program, and method
JP2008293424A (en) * 2007-05-28 2008-12-04 Olympus Corp Noise removal device, program, and method
JP2010141435A (en) * 2008-12-09 2010-06-24 Noritsu Koki Co Ltd Method, program and apparatus for photographic image processing
JP2012059129A (en) * 2010-09-10 2012-03-22 Bridgestone Corp Tire master image generation method and tire master image generation device
JP2013031000A (en) * 2011-07-28 2013-02-07 Kyocera Document Solutions Inc Image processing program and image processing method
JP2017102804A (en) * 2015-12-04 2017-06-08 セイコーエプソン株式会社 Image processing method and image processing program

Similar Documents

Publication Publication Date Title
Chandel et al. Image filtering algorithms and techniques: A review
US8086024B2 (en) Defect detection apparatus, defect detection method and computer program
JP2008052469A (en) Image correction device, image inspection device, and image correction method
JP2003274157A (en) Image processor, image processing method, image processing program, and computer readable recording medium with image processing program recorded
JP2015511310A (en) Segmentation for wafer inspection
JP2008051617A (en) Image inspection device, image inspection method and recording medium
JP2009212969A (en) Image processing apparatus, image processing method, and image processing program
US20120206593A1 (en) Defect Detection Apparatus, Defect Detection Method, And Computer Program
JP2005172559A (en) Method and device for detecting line defect on panel
JP2004038885A (en) Image feature learning type defect detection method, defect detection device and defect detection program
US8055093B2 (en) Method and system for noise level detection in image data
US20100040304A1 (en) Image quality improvement processing apparatus, image quality improvement processing method and computer-readable recording medium storing image quality improvement processing computer program
JP2013002839A (en) Crack detection method
US8090215B2 (en) Method and system for noise level detection in image data
JP2005165387A (en) Method and device for detecting stripe defective of picture and display device
JP2004239733A (en) Defect detection method and apparatus of screen
US8208753B2 (en) Method and system for noise level detection in image data
JP2005303705A (en) Image processing device and image processing method
JP2005283197A (en) Detecting method and system for streak defect of screen
JP4405407B2 (en) Defect inspection equipment
JP5084755B2 (en) Noise reduction apparatus and program thereof
JP2006195622A (en) Image processing device
JP2004037136A (en) Apparatus and method for inspecting pattern
JP2009150855A (en) Inspection method of inspection target, and inspection device for the inspection target
JP2008021219A (en) Image processing apparatus and method

Legal Events

Date Code Title Description
A300 Application deemed to be withdrawn because no request for examination was validly filed

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20070703