JP5430643B2 - Method for creating a three-dimensional profile map for image composition - Google Patents

Method for creating a three-dimensional profile map for image composition Download PDF

Info

Publication number
JP5430643B2
JP5430643B2 JP2011285895A JP2011285895A JP5430643B2 JP 5430643 B2 JP5430643 B2 JP 5430643B2 JP 2011285895 A JP2011285895 A JP 2011285895A JP 2011285895 A JP2011285895 A JP 2011285895A JP 5430643 B2 JP5430643 B2 JP 5430643B2
Authority
JP
Japan
Prior art keywords
height
pixel
image
boundary
map
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Expired - Fee Related
Application number
JP2011285895A
Other languages
Japanese (ja)
Other versions
JP2012220490A (en
Inventor
ジュン キム、ヨン
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Huvitz Co Ltd
Original Assignee
Huvitz Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Huvitz Co Ltd filed Critical Huvitz Co Ltd
Publication of JP2012220490A publication Critical patent/JP2012220490A/en
Application granted granted Critical
Publication of JP5430643B2 publication Critical patent/JP5430643B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T7/00Image analysis
    • G06T7/30Determination of transform parameters for the alignment of images, i.e. image registration
    • G06T7/37Determination of transform parameters for the alignment of images, i.e. image registration using transform domain methods
    • GPHYSICS
    • G02OPTICS
    • G02BOPTICAL ELEMENTS, SYSTEMS OR APPARATUS
    • G02B21/00Microscopes
    • G02B21/36Microscopes arranged for photographic purposes or projection purposes or digital imaging or video purposes including associated control and data processing arrangements
    • G02B21/365Control or image processing arrangements for digital or video microscopes
    • G02B21/367Control or image processing arrangements for digital or video microscopes providing an output produced by processing a plurality of individual source images, e.g. image tiling, montage, composite images, depth sectioning, image comparison
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image
    • G06T3/40Scaling the whole image or part thereof
    • G06T3/4007Interpolation-based scaling, e.g. bilinear interpolation
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T5/00Image enhancement or restoration
    • G06T5/10Image enhancement or restoration by non-spatial domain filtering
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T2207/00Indexing scheme for image analysis or image enhancement
    • G06T2207/20Special algorithmic details
    • G06T2207/20048Transform domain processing
    • G06T2207/20064Wavelet transform [DWT]

Description

本発明は3次元プロファイルマップの作成方法に係り、さらに詳しくは、光学顕微鏡などのカメラ装置を用いて、一つの立体的な試料に対して、焦点距離に応じた多数の画像を得、これらの画像を組み合わせて、全領域に亘ってピントの合った(合焦点の)1枚の2次元合成画像が得られるように、試料の高さ情報を表示する3次元プロファイルマップの作成方法に関する。   The present invention relates to a method for creating a three-dimensional profile map. More specifically, a camera device such as an optical microscope is used to obtain a large number of images corresponding to a focal length with respect to one three-dimensional sample. The present invention relates to a method for creating a three-dimensional profile map that displays sample height information so that a single two-dimensional composite image in focus (in focus) can be obtained by combining images.

一般に、試料の3次元プロファイル(高さ情報)を得るためには、焦点距離の異なるそれぞれの試料画像を得、それぞれの試料画像から領域別に明暗対比(コントラスト)を求め、それぞれの領域に対して、明暗対比が最も大きく現れる画像の焦点情報(すなわち、高さ情報)を取り合わせてイメージ地図を作成する。このような3次元プロファイルは、焦点距離の異なる多数の試料画像から、鮮やかな1枚の合成画像を得るのに用いられる。このとき、画像のノイズとぶれ(ブラー)によって、大きな明暗対比を示す部分が必ずしも画像内部の境界線を意味するわけではないため、これを補完しようとする様々な試みがなされている。例えば、最大の明暗対比を有する画像を組み合わせてなる1枚の画像において、各領域ごとに整合性を判断するウィンドウを設定し、ウィンドウの内部において最も多い明暗対比の頻度数を示す入力画像の番号を代表値として選択する最頻数選択法、最頻数の代わりに主として発生する黒−白ノイズの除去のために中央値を選択する中央値選択法などが単独でまたは他の方法と併用されている。しかしながら、前記方法の最大の問題は、焦点が全く合わない画像に対しては、境界線そのものが存在しないため、正しい情報が得られないという点にある。実際に、既存の3次元プロファイラーのほとんどは、簡単な低域フィルター方式により非合焦点の領域を処理するため、非合焦点の領域が広く分布すれば、上下に揺れる非正常的な高さ地図が形成される。それにも拘わらず、実質的に、入力画像の全体に亘って焦点が合うことは困難であるため、非合焦点の領域に対する適切な処理方式が必要である。   In general, in order to obtain a three-dimensional profile (height information) of a sample, sample images having different focal lengths are obtained, brightness contrast (contrast) is obtained for each region from each sample image, and each region is obtained. The image map is created by combining the focus information (that is, the height information) of the image having the largest contrast between the light and dark. Such a three-dimensional profile is used to obtain one vivid composite image from a large number of sample images having different focal lengths. At this time, due to image noise and blur (blur), a portion showing a large contrast between light and dark does not necessarily mean a boundary line inside the image, so various attempts have been made to complement this. For example, in one image formed by combining images having the maximum contrast, a window for determining consistency is set for each region, and the number of the input image indicating the most frequent contrast frequency in the window The mode selection method for selecting a representative value as the representative value, the median selection method for selecting the median value for the removal of black-white noise mainly generated instead of the mode number, etc. are used alone or in combination with other methods. ing. However, the biggest problem with the above method is that there is no boundary line for an image that is not in focus at all, so that correct information cannot be obtained. In fact, most existing 3D profilers process out-of-focus areas using a simple low-pass filter method, so if the out-of-focus areas are widely distributed, the atypical height map will swing up and down. Is formed. Nevertheless, since it is difficult to focus on the entire input image, an appropriate processing method for a non-focused area is necessary.

一方、画像の焦点整合度を判断する方法も様々に開発されている。画像内部の各点に対して高さ情報を得る必要があるため、焦点整合度は、ピクセル単位若しくは特定の領域単位で得られる。領域のくくり方についても、類似する特性を示す領域でくくる方式、一括的に同じ形状のウィンドウでくくる方式など、いろいろなくくり方があり、たとえ同じ形状のウィンドウであるとしても、入力画像の解像度に応じてウィンドウの大きさも異なるように設定されることがある。焦点整合度を求める方法としては、ゾーベル(Sobel)フィルターやLoGなどのマスク基盤の方式、ウィンドウを用いたフーリエ変換方式、ウェーブレット方式などが挙げられ、それぞれの大分類内においても様々な方法が用いられる。なお、合焦点の画像の番号(高さ)のみから構成された画像地図を取得したとしても、必ずしも正しい3次元情報が得られるとは限らない。これは、たとえ離散化した高さ情報を3次元モデリング過程で補正するとしても、勾配が急峻に増加する場合と緩やかに増加する場合とを区別することが困難であるためである。   On the other hand, various methods for determining the degree of focus matching of images have been developed. Since it is necessary to obtain height information for each point in the image, the degree of focus matching is obtained in units of pixels or specific regions. There are various ways to wrap areas, such as wrapping in areas that have similar characteristics, wrapping in the same shape window, and the resolution of the input image even if the windows are the same shape. Depending on the window size, the window size may be set differently. Methods for obtaining the focus matching degree include mask-based methods such as a Sobel filter and LoG, a Fourier transform method using a window, a wavelet method, and the like, and various methods are used within each large classification. It is done. Note that even if an image map composed only of the number (height) of the focused image is acquired, correct three-dimensional information is not always obtained. This is because it is difficult to distinguish between a case where the gradient increases sharply and a case where it gradually increases even if the discretized height information is corrected in the three-dimensional modeling process.

本発明の目的は、試料画像において、合焦点の領域の正確な位置情報を把握して、位置に応じた高さ変化を正しく反映する、3次元プロファイルマップの作成方法を提供することである。   An object of the present invention is to provide a method for creating a three-dimensional profile map that grasps accurate position information of a focused area in a sample image and correctly reflects a height change according to the position.

本発明の他の目的は、合焦点の画像部分を有さない非合焦点の領域が関心領域の情報把握を妨げず、周辺の合焦点区間とは高さの連続性を有する、3次元プロファイルマップの作成方法を提供することである。   Another object of the present invention is to provide a three-dimensional profile in which a non-focused area that does not have an in-focus image portion does not hinder information grasping of a region of interest and has a continuity in height from the surrounding focused sections. It is to provide a method for creating a map.

本発明のさらに他の目的は、画像の焦点整合度を正確に反映することのできる、3次元プロファイルマップの作成方法を提供することである。   Still another object of the present invention is to provide a method of creating a three-dimensional profile map that can accurately reflect the degree of focus matching of an image.

前記目的を達成するために、本発明は、試料を互いに異なる高さから撮像して、焦点部位の異なる多数の2次元試料画像を得るステップと、多数の前記試料画像に対して、離散ウェーブレット変換(Discrete Wavelet Transform:DWT)を行うステップと、それぞれの試料画像に対して離散ウェーブレット変換(DWT)を行うことにより得られた詳細サブーバンド(sub-band)において、各ピクセルの詳細サブーバンド(sub-band)係数値を比較して、最大係数値を示す画像の撮像高さで、各ピクセルに対する初期の高さ地図を作成するステップと、それぞれの入力画像において、離散ウェーブレット変換(DWT)の行われた画像の近似サブーバンド(sub-band)領域に対して、ピントの度合い(焦点整合度)を計算するステップと、前記焦点整合度にフィルターをかけて、合焦点のピクセル(境界点)の高さ情報は残留させ、非合焦点のピクセル(非境界点)の高さ情報は除去するステップと、前記フィルターを通過できずに除去されたピクセル(非境界点)の高さを、フィルターを通過したピクセル(境界点)の高さ値から内挿して算出するステップと、前記高さ情報の除去されたピクセルに対して前記内挿によって算出された高さを代入して高さ地図を作成するステップと、を含む3次元プロファイルマップの作成方法を提供する。 In order to achieve the above object, the present invention includes a step of imaging a sample from different heights to obtain a number of two-dimensional sample images having different focal sites, and a discrete wavelet transform for the number of sample images. In the step of performing (Discrete Wavelet Transform: DWT) and the detailed sub-band obtained by performing the discrete wavelet transform (DWT) on each sample image, the sub-band of each pixel (sub-band) ) Compare the coefficient values and create an initial height map for each pixel at the imaging height of the image showing the maximum coefficient value, and discrete wavelet transform (DWT) was performed on each input image Calculate the degree of focus (degree of focus matching) for the approximate sub-band region of the image Filtering the focus matching degree so that the height information of the focused pixel (boundary point) remains, and the height information of the non-focused pixel (nonboundary point) is removed; Calculating a height of a pixel (non-boundary point) removed without passing through the filter by interpolating from a height value of a pixel (boundary point) passing through the filter, and the height information is removed And a step of creating a height map by substituting the height calculated by the interpolation with respect to a pixel.

本発明に係る3次元プロファイルマップの作成方法によれば、互いに異なる高さ情報とともに入力された多数の入力画像を用いて、合焦点の全領域から、試料の当該部分の高さ情報を得、非合焦点の部分に対して不連続的な高さを入力することに伴う、不正確な高さプロファイルの問題がない、整合性の良い高さ地図を提供することができる。本発明に従い製作された3次元プロファイルマップを用いて、試料の正確な測定および観察が可能になり、高さに応じて焦点部位が異なってくる試料の画像を、整合性よく1枚の合成画像として合成することができる。 According to the method for creating a three-dimensional profile map according to the present invention, using a large number of input images input together with different height information, the height information of the portion of the sample is obtained from the entire region of the focal point, It is possible to provide a highly consistent height map without the problem of an inaccurate height profile associated with inputting a discontinuous height with respect to a non-focused portion. Using the three-dimensional profile map produced in accordance with the present invention, it is possible to accurately measure and observe the sample, and an image of the sample in which the focal portion varies depending on the height is combined with a single composite image. Can be synthesized as

本発明に係る3次元プロファイルマップの作成方法が実現可能な光学顕微鏡の構成ブロック図。1 is a configuration block diagram of an optical microscope capable of realizing a three-dimensional profile map creation method according to the present invention. 本発明の一実施形態による3次元プロファイルマップの作成方法を説明するためのフローチャート。6 is a flowchart for explaining a method of creating a three-dimensional profile map according to an embodiment of the present invention. 試料の2次元画像に対して離散ウェーブレット変換(DWT)を行った結果を説明するための図。The figure for demonstrating the result of having performed discrete wavelet transform (DWT) with respect to the two-dimensional image of a sample. 試料の2次元画像に対して離散ウェーブレット変換(DWT)を行った結果の一例を示す図。The figure which shows an example of the result of having performed discrete wavelet transform (DWT) with respect to the two-dimensional image of a sample. ピクセル単位で作成された画像の初期の高さを示す地図(初期高さ地図)の一例を示す図。The figure which shows an example of the map (initial height map) which shows the initial height of the image produced in the pixel unit. ピクセルの高さが周辺のピクセルの高さと整合するように1次補正された高さ地図の一例を示す図。The figure which shows an example of the height map primary-corrected so that the height of a pixel may correspond with the height of a surrounding pixel. 高さ情報が不連続的に入力される場合において、実際の試料の高さ分布の一例を示す図。The figure which shows an example of the height distribution of an actual sample in case height information is input discontinuously. 高さ情報が不連続的に入力される場合において、焦点整合度から計算された高さ分布の一例を示す図。The figure which shows an example of the height distribution calculated from the focus matching degree, when height information is discontinuously input. 離散ウェーブレット変換(DWT)の行われた画像の近似サブーバンド(sub-band)領域に対して、焦点整合度を計算して、境界点を抽出する過程を説明するための図。The figure for demonstrating the process of calculating a focus matching degree with respect to the approximate sub-band area | region of the image in which the discrete wavelet transform (DWT) was performed, and extracting a boundary point. 離散ウェーブレット変換(DWT)の行われた画像の近似サブーバンド(sub-band)領域に対して、非合焦点のピクセルの高さ値が不十分に除去された場合における高さ地図を示す図。The figure which shows a height map in case the height value of the pixel of a non-focal point is removed enough with respect to the approximate sub-band area | region of the image in which the discrete wavelet transform (DWT) was performed. 離散ウェーブレット変換(DWT)の行われた画像の近似サブーバンド(sub-band)領域に対して、非合焦点のピクセルの高さ値が十分に除去された場合における高さ地図を示す図。The figure which shows a height map in case the height value of a non-focus point pixel is fully removed with respect to the approximate sub-band area | region of the image in which the discrete wavelet transform (DWT) was performed. 連続的に高さが変化する試料において、焦点整合度にフィルターをかけて残留した点(1、2、3、4)と、消去される点(1′、2′、3′、4′)および高さ内挿法の適用後に得られた高さ分布値を示す図。In samples with continuously changing heights, the remaining points (1, 2, 3, 4) after filtering the degree of focus matching and the points to be erased (1 ', 2', 3 ', 4') The figure which shows the height distribution value obtained after application of the height interpolation method. 階段状に高さが不連続的に変化する試料において、焦点整合度にフィルターをかけて残留した点(1、2、3、4)と、消去される点(1′、2′、3′、4′)および高さ内挿法の適用後に得られた高さ分布値を示す図。In a sample whose height changes discontinuously in a stepped manner, a point (1, 2, 3, 4) remaining after filtering the focus matching degree and a point (1 ′, 2 ′, 3 ′) to be erased 4 ') and a diagram showing height distribution values obtained after application of the height interpolation method. 焦点が合わなくて消去された点の高さを内挿により算出するために、内挿に使われる境界点を抽出する過程を示す図。The figure which shows the process in which the boundary point used for interpolation is extracted in order to calculate the height of the point erased because it was out of focus. 本発明に従い完成された3次元プロファイル(高さ)マップの一例を示す図。The figure which shows an example of the three-dimensional profile (height) map completed according to this invention.

以下、添付図面に基づき、本発明を詳述する。   Hereinafter, the present invention will be described in detail with reference to the accompanying drawings.

図1は、本発明に係る3次元プロファイルマップの作成方法が実現可能な光学顕微鏡の構成ブロック図である。同図に示すように、本発明において採用可能な光学顕微鏡は、試料に照明光を照射する照明と、試料の画像を拡大する光学鏡筒および試料画像を結像するカメラを備え、試料の拡大された画像を得る顕微鏡部10と、前記顕微鏡部10の高さ、すなわち、焦点距離を調節する顕微鏡運転制御部12と、前記顕微鏡部10から試料の拡大された画像を受け取ってデジタル画像信号に変換する画像入力部22と、前記顕微鏡運転制御部12から試料の画像が得られる高さ(顕微鏡の高さ)が入力される高さ入力部24、および前記画像入力部22からデジタル画像信号が入力され、前記高さ入力部24から試料画像が得られた高さ情報が入力されて、入力された画像の焦点整合度を評価し、試料の3次元プロファイルマップ(高さ地図)を生成する画像処理部26と、を備える。なお、前記画像処理部26は、前記3次元プロファイルマップを用いて、合焦点の画像からなる、深度の拡張された画像を生成することができる。   FIG. 1 is a configuration block diagram of an optical microscope capable of realizing a method for creating a three-dimensional profile map according to the present invention. As shown in the figure, the optical microscope that can be employed in the present invention includes illumination for irradiating a sample with illumination light, an optical barrel for enlarging the image of the sample, and a camera for imaging the sample image. A microscope unit 10 for obtaining the obtained image, a microscope operation control unit 12 for adjusting the height of the microscope unit 10, that is, a focal length, and an enlarged image of the sample from the microscope unit 10 and receiving the digital image signal. An image input unit 22 to be converted, a height input unit 24 to which a height at which a sample image is obtained from the microscope operation control unit 12 (a height of the microscope) is input, and a digital image signal from the image input unit 22 The height information from which the sample image was obtained is input from the height input unit 24, the focus matching degree of the input image is evaluated, and a three-dimensional profile map (height map) of the sample is generated. It includes an image processing unit 26, a. The image processing unit 26 can generate an image with an extended depth, which is an in-focus image, using the three-dimensional profile map.

図2は、本発明の一実施形態による3次元プロファイルマップの作成方法(アルゴリズム)を説明するためのフローチャートである。図1および図2に示すように、本発明に係る3次元プロファイルマップの作成方法は、試料を互いに異なる高さから撮像して、焦点部位の異なる多数の2次元試料画像を得るステップ(S10)と、前記試料画像に対して、離散ウェーブレット変換(DWT)を行うステップ(S20)と、それぞれの試料画像に対して離散ウェーブレット変換(DWT)を行うことにより得られた詳細サブーバンド(sub-band)において、各ピクセルの詳細サブーバンド係数値を比較して、最大係数値を示す画像の撮像高さで、各ピクセルに対する初期の高さ地図を作成するステップ(S22)と、それぞれの入力画像において、離散ウェーブレット変換(DWT)の行われた画像の近似サブーバンド(sub-band)領域に対して、焦点整合度を計算するステップ(S28)と、前記焦点整合度にフィルターをかけて、合焦点のピクセルの高さ情報は残留させ、非合焦点のピクセルの高さ情報は除去するステップ(S30)と、前記フィルターを通過できずに除去されたピクセルの高さを、フィルターを通過したピクセルの高さ値から内挿して算出するステップ(S32)と、前記高さ情報の除去されたピクセルに対して前記内挿によって算出された高さを代入して高さ地図を作成するステップ(S34)と、を含む。ここで、前記ステップ(S22)とステップ(S28)との間に、各ピクセルを中心とする検証ウィンドウ内において、同じ高さとして計算されたピクセルの詳細サブーバンドウェーブレット係数を加算し、高さに応じたウェーブレット係数の和を比較して、最も大きな値を与える高さを当該ピクセルの実際の高さで補正するステップ(S24)および/または前記(補正済みの)高さ地図に中央値フィルターをかけて、インパルスノイズの除去された高さ地図を作成するステップ(S26)をさらに含むことが好ましい。ここで、前記試料画像を得るステップS10は、顕微鏡部10によって行われ、得られた試料画像は、画像入力部22においてデジタル画像信号に変換された後、画像処理部26において離散ウェーブレット変換(DWT)などの残りの過程が行われても良い。必要に応じて、前記(カラー)デジタル画像信号は、画像処理部26において、通常の方法によって黒白のデジタル画像信号に変換された後(S12)、離散ウェーブレット変換(DWT)などの残りの過程が行われてもよい。このような黒白画像の変換は、今後の画像信号データの数を減らして、画像処理部26にかかる計算の負担を低減することができる。   FIG. 2 is a flowchart for explaining a method (algorithm) for creating a three-dimensional profile map according to an embodiment of the present invention. As shown in FIG. 1 and FIG. 2, in the method of creating a three-dimensional profile map according to the present invention, a sample is imaged from different heights to obtain a number of two-dimensional sample images having different focal sites (S10). A step of performing discrete wavelet transform (DWT) on the sample image (S20), and a detailed sub-band obtained by performing discrete wavelet transform (DWT) on each sample image In step S22, the detailed sub-band coefficient value of each pixel is compared to create an initial height map for each pixel at the imaging height of the image indicating the maximum coefficient value. A step of calculating a focus matching degree for the approximate sub-band region of the image subjected to the wavelet transform (DWT) (S28). A step of filtering the focus matching degree so that the height information of the in-focus pixel remains, and the height information of the non-focus pixel is removed (S30); Calculating the height of the pixel obtained by interpolating from the height value of the pixel that has passed through the filter (S32), and the height calculated by the interpolation for the pixel from which the height information has been removed. Substituting, and creating a height map (S34). Here, between the step (S22) and step (S28), the detailed sub-band wavelet coefficient of the pixel calculated as the same height is added in the verification window centered on each pixel, and the height is calculated. The sum of the corresponding wavelet coefficients is compared and the height giving the largest value is corrected with the actual height of the pixel (S24) and / or the median filter is applied to the (corrected) height map. It is preferable to further include a step (S26) of creating a height map from which impulse noise is removed. Here, the step S10 for obtaining the sample image is performed by the microscope unit 10, and the obtained sample image is converted into a digital image signal by the image input unit 22, and then the discrete wavelet transform (DWT) is performed by the image processing unit 26. ) Etc. may be performed. If necessary, the (color) digital image signal is converted into a black-and-white digital image signal by a normal method in the image processing unit 26 (S12), and the remaining processes such as discrete wavelet transform (DWT) are performed. It may be done. Such black-and-white image conversion can reduce the number of future image signal data and reduce the calculation burden on the image processing unit 26.

以下、本発明に係る3次元プロファイルマップの作成方法をより具体的に説明する。本発明に係る3次元プロファイルマップの作成方法は、(a)試料画像の全体に対して高さ情報を得るステップ(初期の高さ地図の作成)と、(b)試料の境界線(境界点)に相当する領域の情報を抽出し、前記ステップ(a)において求められた境界線領域の高さ情報を用いて境界線以外の領域の高さを内挿法により算出するステップ、といった2つのステップに大きく分けられる。前記ステップ(a)は、合焦点の領域に関する正確な高さ情報を得ることが目的である。本発明は、前記ステップ(a)においてより一層正確な高さ情報を得、ステップ(b)において高さ情報の整合性を判断し、整合性の低いピクセルの高さ情報を整合性よく補正して、非合焦点の領域を処理する。   Hereinafter, a method for creating a three-dimensional profile map according to the present invention will be described more specifically. A method for creating a three-dimensional profile map according to the present invention includes (a) a step of obtaining height information for the entire sample image (creation of an initial height map), and (b) a boundary line (boundary point) of the sample. 2) extracting information on the area corresponding to), and calculating the height of the area other than the boundary line by interpolation using the height information of the boundary line area obtained in step (a). Broadly divided into steps. The purpose of the step (a) is to obtain accurate height information regarding the in-focus area. The present invention obtains more accurate height information in the step (a), judges the consistency of the height information in the step (b), and corrects the height information of the pixel having low consistency with good consistency. To process the out-of-focus area.

前記ステップ(a)において、画像の高さ情報を得るために、まず、試料を互いに異なる高さ(距離)から撮像して、焦点部位の異なる多数(例えば、2〜8枚、好ましくは、2〜5枚)の2次元画像を得(S10)、前記2次元画像から、合焦点部分の位置情報と高さ情報を取り合わせて一つの高さ地図(例えば、xy平面上に当該位置の高さ値(入力画像番号)が表示された形のデータである2次元地図。区別し易くするために、カラーごとに高さを表示する場合もある。)を作成する。このために、得られた2次元画像の各ピクセルに対して、(i)焦点整合度の評価、(ii)焦点整合度(焦点情報)からの各ピクセルの高さ情報の算出、および(iii)取り合わせられた高さ情報を用いた高さ地図の作成といった3ステップを行う。   In the step (a), in order to obtain the height information of the image, first, the sample is imaged from different heights (distances), and a large number (for example, 2 to 8 pieces, preferably 2) having different focal sites. ~ 5) two-dimensional images are obtained (S10), and the position information and height information of the in-focus portion are combined from the two-dimensional image to form a height map (for example, the height of the position on the xy plane). A two-dimensional map that is data in a form in which values (input image numbers) are displayed. In order to make it easy to distinguish, a height may be displayed for each color. For this purpose, for each pixel of the obtained two-dimensional image, (i) evaluation of the focus matching degree, (ii) calculation of height information of each pixel from the focus matching degree (focus information), and (iii) 3) Perform three steps, such as creating a height map using the combined height information.

まず、(i)試料画像の各部分に対する焦点整合度の評価方法は、下記の通りである。一般に、合焦点の画像は境界がはっきりしており、最もピントの合った(合焦点が最高の)位置において、光の強さと明暗対比が最大となるため、ピクセル間の明暗対比を用いる境界検出方法により焦点整合度を評価することができる。本発明において、境界検出方法として、通常の信号または画像の分析方法である離散ウェーブレット変換(DWT)法を採用する。離散ウェーブレット変換(DWT)法は、局所化したウェーブレットを用いて信号を分析する方法であり、多層構造分析によって、様々な解像度の信号分析を行うことができ、局所的な信号の分析に役立つ。特に、離散ウェーブレット変換(DWT)を繰り返し行うことにより(多重離散ウェーブレット変換)、上位レベルに上がるにつれて、平均値平滑化効果が高まるため、同型ノイズなどの非インパルス型ノイズが除去されるというメリットがあるが、インパルス型ノイズは依然として残留するため、高さ地図が整合性を有するように後加工してインパルス型ノイズを除去する。   First, (i) the method of evaluating the degree of focus matching for each part of the sample image is as follows. In general, the in-focus image has a well-defined boundary, and at the most in-focus position (the best in-focus), the light intensity and the contrast of light and dark are maximized. The focus matching degree can be evaluated by the method. In the present invention, a discrete wavelet transform (DWT) method, which is a normal signal or image analysis method, is employed as the boundary detection method. The discrete wavelet transform (DWT) method is a method of analyzing a signal using a localized wavelet. Signal analysis with various resolutions can be performed by multilayer structure analysis, which is useful for analysis of a local signal. In particular, by performing discrete wavelet transform (DWT) repeatedly (multiple discrete wavelet transform), the average value smoothing effect increases as it goes up, so that there is a merit that non-impulse noise such as the same type noise is removed. However, since the impulse noise still remains, the impulse map is removed by post-processing so that the height map is consistent.

試料の2次元画像に対して離散ウェーブレット変換(DWT)を行うと(S20)、図3AのAに示すように、LL、HL、LH、HHからなる4個のサブーバンドに画像が分けられる。ここで、LLは解像度が1/4に減少された原画像の縮小画像であり、近似サブーバンド(Approximation Sub−band)と呼ばれ、HLサブーバンドは、垂直方向の画像情報の変化の度合い(例えば、原画像に対して離散ウェーブレット変換(DWT)を1回行った場合、HLサブーバンドの係数は垂直方向への画像の明るさの変化の度合いを示し、離散ウェーブレット変換(DWT)を2回以上行った場合、HLサブーバンドの係数は縮小された画像の情報変化を表わす。)、LHは、水平方向の画像情報の変化の度合い、HHは、対角線方向の画像情報の変化の度合いを表わす。例えば、LHが大きいということは、水平方向への画像情報の変化が大きいことを意味するため、垂直方向の境界が存在することを意味する。前記LH、HL、HHを詳細サブーバンド(Detail Sub−band)と称する(例えば、米国特許6,151,415号などを参照されたい)。かかる離散ウェーブレット変換(DWT)は、原画像の解像度に応じて、1枚の原画像に対して2回(図3AのBおよび図3B)、3回(図3AのC)など、多数回に亘って行うことができる。既に離散ウェーブレット変換(DWT)の行われた画像に重ねて離散ウェーブレット変換(DWT)を行う場合、現在得られたLLサブーバンドに対して離散ウェーブレット変換(DWT)を行うことにより、図3AのBまたはCなどの多層(マルチレベル)構造の画像を得る。このように、離散ウェーブレット変換(DWT)を行うことにより得られた詳細サブーバンドのウェーブレット係数(例えば、図3Bには、16個のピクセルに対するウェーブレット係数が示してある。)は、画像の明暗対比の特性を反映するため、詳細サブーバンドのウェーブレット係数のうち、絶対値が最大となる値を取り合わせると、境界検出が可能となる。なお、近似サブーバンド値は、ノイズの除去された低解像度の画像であるため、これを用いても、境界検出などの画像処理を行うことが可能である。すなわち、本発明は、従来より画像の境界検出や信号分析に用いられてきたフーリエ分析の代わりに、様々な解像度で局所的なデータアクセスが行える離散ウェーブレット変換(DWT)法を応用して、焦点整合度を評価(計算)する。このような離散ウェーブレット変換(DWT)を用いた焦点整合度の評価方法の一例は、本出願人による大韓民国特許出願第10−2010−0054861号(出願日:2010年06月10日)にも開示されており、前記特許出願の内容は、参照としてこの明細書中に取り込まれる。例えば、入力解像度が1600x1200の画像から、解像度が約100x100の画像を得るために、約3回に亘って離散ウェーブレット変換(DWT)を行い、離散ウェーブレット変換(DWT)を行うことにより得られた詳細サブーバンド(LH、HL、HH)のピクセル係数の最大値(すなわち、LH、HL、HHサブーバンド係数値のうちの最大値)を、当該画像における各ピクセルの焦点整合度であると判断する。同様に、入力されたそれぞれの画像に対して、ピクセル係数の最大値を得る。本発明において、離散ウェーブレット変換(DWT)は、1回以上の多重に行われ、変換回数は、原画像の解像度、合成されるピクセルの大きさなどに応じて、1〜10回、好ましくは、2〜5回行われる。   When the discrete wavelet transform (DWT) is performed on the two-dimensional image of the sample (S20), the image is divided into four sub-bands composed of LL, HL, LH, and HH, as shown at A in FIG. 3A. Here, LL is a reduced image of the original image with the resolution reduced to ¼, which is called an approximate sub-band, and the HL sub-band is a degree of change in image information in the vertical direction (for example, When the discrete wavelet transform (DWT) is performed once on the original image, the HL sub-band coefficient indicates the degree of change in the brightness of the image in the vertical direction, and the discrete wavelet transform (DWT) is performed twice or more. In this case, the HL sub-band coefficient represents the information change of the reduced image.), LH represents the degree of change of the image information in the horizontal direction, and HH represents the degree of change of the image information in the diagonal direction. For example, a large LH means that there is a large change in image information in the horizontal direction, and therefore there is a vertical boundary. The LH, HL, and HH are referred to as detailed sub-bands (see, for example, US Pat. No. 6,151,415). Such discrete wavelet transform (DWT) is performed many times, such as twice (B in FIG. 3A and FIG. 3B) and three times (C in FIG. 3A) for one original image, depending on the resolution of the original image. Can be performed over a wide range. When performing discrete wavelet transform (DWT) on an image that has already been subjected to discrete wavelet transform (DWT), by performing discrete wavelet transform (DWT) on the currently obtained LL sub-band, An image having a multi-layer structure such as C is obtained. As described above, the detailed sub-band wavelet coefficients obtained by performing the discrete wavelet transform (DWT) (for example, the wavelet coefficients for 16 pixels are shown in FIG. 3B) are the contrasts of the contrast of the image. In order to reflect the characteristics, among the detailed sub-band wavelet coefficients, the boundary detection becomes possible by combining the values having the maximum absolute value. Since the approximate sub-band value is a low-resolution image from which noise has been removed, image processing such as boundary detection can be performed using this image. That is, the present invention applies a discrete wavelet transform (DWT) method that allows local data access at various resolutions instead of the Fourier analysis conventionally used for image boundary detection and signal analysis. Evaluate (calculate) consistency. An example of a method for evaluating the degree of focus matching using such discrete wavelet transform (DWT) is also disclosed in Korean Patent Application No. 10-2010-0054861 (filing date: June 10, 2010) by the present applicant. The contents of said patent application are incorporated herein by reference. For example, in order to obtain an image having a resolution of about 100 × 100 from an image having an input resolution of 1600 × 1200, details obtained by performing discrete wavelet transform (DWT) and performing discrete wavelet transform (DWT) about three times. The maximum value of the pixel coefficient of the sub-band (LH, HL, HH) (that is, the maximum value among the LH, HL, and HH sub-band coefficient values) is determined as the focus matching degree of each pixel in the image. Similarly, the maximum value of the pixel coefficient is obtained for each input image. In the present invention, the discrete wavelet transform (DWT) is performed one or more times, and the number of transforms is 1 to 10 times, preferably depending on the resolution of the original image, the size of the pixel to be synthesized, etc. 2 to 5 times.

次いで、各ピクセルに対して、前記ピクセルの係数値が最大となる画像の高さ(撮像または焦点距離)を、当該ピクセルに対する合焦点の位置(高さ)であると判断し、当該ピクセルにこの高さを指定する。これは、前記(ii)焦点整合度(焦点情報)から各ピクセルの高さ情報を算出する過程である。つまり、画像の各ピクセルに対する焦点整合度(焦点情報)から、各ピクセルの高さ情報を得るのである。次いで、(iii)取り合わせられた高さ情報を用いて高さ地図を作成するステップにおいて、ピクセル単位で画像の高さ地図を作成し、このようにして作成された初期の高さ地図の一例が図4に示してある。図4は、4枚の金属板と円形の金属構造物がほとんど同じ高さに構成されたサンプルの初期の高さ地図であり、前記円形の金属構造物の中央部(図4における真ん中の黒色部)が部分的に凹んでいる(窪んでいる)ような構造を有する。   Next, for each pixel, the image height (imaging or focal length) at which the coefficient value of the pixel is maximum is determined to be the focal point position (height) with respect to the pixel, and Specify the height. This is a process of calculating the height information of each pixel from the (ii) focus matching degree (focus information). That is, the height information of each pixel is obtained from the focus matching degree (focus information) for each pixel of the image. Next, in the step of (iii) creating a height map using the combined height information, an image height map is created in pixel units, and an example of the initial height map thus created is It is shown in FIG. FIG. 4 is an initial height map of a sample in which four metal plates and a circular metal structure are configured to have almost the same height, and the central part of the circular metal structure (the middle black color in FIG. 4). Part) is partially recessed (recessed).

このようにして得られた初期の高さ地図においては、上述したように、インパルス型ノイズが除去されていない状態であり、ピクセル単位の明暗対比値は外部の環境要素に敏感であるため、得られた高さの整合性を確認することが好ましい。ピクセル単位の敏感度を緩和しつつも、ウェーブレット係数の境界値情報を保持するには、ピクセルの周辺にウィンドウを設定し、このウィンドウ内においてウェーブレット係数を比較することが有効である(A wavelet−based image fusion tutorial, G. Pajares and J.M. de la Cruz, Pattern Recognition 37 (2004) 1855〜1872参照)。かようなウィンドウ基盤の合成方法は、高さ地図を作成するに際して焦点整合度を判断するために用いられるか、あるいは、整合性を確認するに際して単にフィルターを適用するために用いられる。しかしながら、このようなウィンドウ基盤の方式を用いると、全ての入力画像の全てのピクセルに対してウィンドウ演算が必要となるため、速度が遅くなってしまう。このため、本発明においては、ウェーブレット係数の意味(焦点整合度)を保持しつつ、計算が簡単に行われるように、ウィンドウ(例えば、当該ピクセルを中心とする3x3ピクセルサイズの検証ウィンドウ)内のウェーブレット係数を入力高さに応じてグループ化する。一般に、1つ若しくは2つのピクセルのみ特異的な高さを有する試料は多くないため、ウィンドウ中に境界が存在すれば、ほとんどの場合は境界点ではない境界線の形で存在し、同じ高さを有する境界線のウェーブレット係数の和は、異なる高さを有するウェーブレット係数の和よりも大きい。たとえウィンドウ内のいずれかのピクセルが周辺と高さが大きく異なるインパルスノイズの形を帯びて大きいウェーブレット係数を有するとしても、ウィンドウ中に境界が存在すれば、一般に境界点の数がインパルス型ノイズよりも多く、境界点のウェーブレット係数は大きな値を有するため、同じ高さにある境界点のウェーブレット係数の和は、普通、同じ高さにあるインパルスノイズのウェーブレット係数よりも大きい。このため、本発明においては、ウィンドウ内において同じ高さとして計算されたピクセルをグループ化し、グループ化されたピクセルのウェーブレット係数を加算し、高さに応じたウェーブレット係数の和を比較して、最も大きな値を与える高さを当該ピクセルの実際の高さで補正する(S24)。以下、この方式をグループ化した係数和検証(Grouped Coefficients Summation Verification:GCSV)方式と呼ぶ。検証ウィンドウ内において、同じ高さのウェーブレット係数のグループ化は、前記ステップ(ii)において得られた当該ピクセルの入力画像の番号(高さ)を基準としてグループ化される。すなわち、同じ高さのウェーブレット係数は、同じグループにくくる。例えば、互いに異なる3つの高さ(1、2および3)から試料を撮像して、焦点部位の異なる3つの2次元画像を得た場合、高さ1に相当するウェーブレット係数を同じグループにくくり、高さ2に相当するウェーブレット係数を同じグループにくくり、高さ3に相当するウェーブレット係数を同じグループにくくる。なお、上述した方法だけでは、インパルスノイズが完全に除去されないため、中央値フィルターリング(メディアンフィルターリング)を1回以上行うことにより、インパルスノイズの除去された1次補正済み高さ地図を作成することが好ましい(S26)。前記中央値フィルターリングを行うためには、フィルターをかけようとするピクセルを中心として適当な領域のウィンドウ(例えば、5x5ピクセル)を設定し、前記ウィンドウ内に存在する全ての高さ情報を昇順若しくは降順に並べ替え、その中央値で最初に選択したピクセルの高さ情報を補正(取り替え)する。このように、境界領域に対する正確な高さが反映されて、ピクセルの高さが周辺ピクセルの高さと整合されるように1次補正された画像地図の一例を図5に示す。図4は、離散ウェーブレット変換(DWT)後に、単に焦点整合度を用いてプロットした高さ地図であり、図5は、図4の高さ地図に対して、前記グループ化された係数和検証方式(GCSV)と中央値フィルターリングを行うことにより得られた高さ地図である。図5は、図4に比べて、隣り合うピクセル間の高さのばらつきが低減されていることが分かる。   In the initial height map obtained in this way, as described above, the impulse-type noise is not removed, and the contrast value in units of pixels is sensitive to external environmental elements. It is preferable to confirm the consistency of the height obtained. In order to retain the boundary value information of wavelet coefficients while reducing the sensitivity of each pixel, it is effective to set a window around the pixel and compare the wavelet coefficients within this window (A wavelet− based image fusion tutoral, G. Pagesares and JM de la Cruz, Pattern Recognition 37 (2004) 1855-1872). Such a window-based composition method is used to determine the focus matching degree when creating a height map, or simply used to apply a filter when checking the consistency. However, when such a window-based method is used, a window operation is required for all pixels of all input images, resulting in a slow speed. For this reason, in the present invention, in a window (for example, a verification window having a 3 × 3 pixel size centered on the pixel) so that the calculation can be easily performed while maintaining the meaning (degree of focus matching) of the wavelet coefficient. Group wavelet coefficients according to input height. In general, not many samples have a specific height of only one or two pixels, so if there is a boundary in the window, it will almost always be in the form of a boundary line that is not a boundary point, and will have the same height. The sum of the wavelet coefficients of the boundary line with is greater than the sum of the wavelet coefficients with different heights. Even if any pixel in the window has a large wavelet coefficient in the form of impulse noise that differs greatly in height from the surrounding area, if there are boundaries in the window, the number of boundary points is generally greater than impulse noise. Since the wavelet coefficients at the boundary points have a large value, the sum of the wavelet coefficients at the boundary points at the same height is usually larger than the wavelet coefficients of the impulse noise at the same height. Therefore, in the present invention, the pixels calculated as the same height in the window are grouped, the wavelet coefficients of the grouped pixels are added, the sum of the wavelet coefficients according to the height is compared, and the most The height giving a large value is corrected by the actual height of the pixel (S24). Hereinafter, this method is referred to as a grouped coefficient summation verification (GCSV) method. Within the verification window, wavelet coefficients having the same height are grouped based on the input image number (height) of the pixel obtained in step (ii). That is, the same height wavelet coefficients are less likely to be in the same group. For example, when imaging a sample from three different heights (1, 2 and 3) and obtaining three two-dimensional images with different focal sites, the wavelet coefficients corresponding to height 1 are less likely to be the same group, Wavelet coefficients corresponding to height 2 are less likely to be the same group, and wavelet coefficients corresponding to height 3 are less likely to be the same group. Since the impulse noise is not completely removed only by the above-described method, the first corrected height map from which the impulse noise is removed is created by performing median filtering (median filtering) at least once. It is preferable (S26). In order to perform the median filtering, a window of an appropriate area (for example, 5 × 5 pixels) is set around the pixel to be filtered, and all the height information existing in the window is set in ascending order or Sort in descending order and correct (replace) the height information of the first selected pixel with its median. FIG. 5 shows an example of an image map that is first corrected so that the pixel height matches the height of the surrounding pixels, reflecting the accurate height with respect to the boundary region. FIG. 4 is a height map simply plotted using the degree of focus matching after the discrete wavelet transform (DWT), and FIG. 5 shows the grouped coefficient sum verification method for the height map of FIG. It is a height map obtained by performing (GCSV) and median filtering. FIG. 5 shows that the variation in height between adjacent pixels is reduced compared to FIG.

このようにして作成された1次補正済み高さ地図は、図5に示すように、非合焦点の領域において高さのばらつきが激しく現れ、高さ情報が不連続的に入力されるため、高さの変化を正しく表示することができないという問題がある。高さ情報が不連続的に(離散化して)入力され、実際の試料が図6に示すように連続的な高さ分布を有すると、図7(横軸は試料の位置、縦軸は試料の高さを表す)に示すように、図6の横軸に平行な点線よりも高い個所はH値、それよりも低い個所はL値を有する高さ分布を示す。図6および図7中、グラフは実際のサンプルのプロファイルを示すものであり、ボックス内の数は、デジタルの形で入力されたサンプルの高さ情報であり、例えば、0はL、1はHに相当し、中央値はHに設定してもよく、Lに設定してもよいため、0.5という値を使用した。ここで、一旦中央値が決定された限り、これを変えることはできない。このため、この方式では、試料が階段状の勾配を有するか、あるいは、連続的な勾配を有するかを区別することはできない。ところが、勾配が不連続的であるピクセルの位置を比較すれば、連続的な高さの変化と不連続的な高さの変化とを区別することができる。図7中、不連続的な勾配の位置は、階段が始まる1点であるか、あるいは、階段の勾配がやや緩やかな場合、階段が上がり始まる点と、階段が上がり終わる点といった2点である。連続的に高さが変化する試料の場合にも、高さが上がり始まる点と、それ以上上がらない点といった2点である。2つの場合を比較すれば、不連続的な勾配が現れる点が近づいた場合には勾配が急峻であり、そうではない場合には勾配が緩やかである。このため、勾配の不連続点が勾配を判断する上で重要な根拠となる。   As shown in FIG. 5, the primary corrected height map created in this way has a significant variation in height in the non-focused region, and height information is discontinuously input. There is a problem that the change in height cannot be displayed correctly. When height information is input discontinuously (discretized) and the actual sample has a continuous height distribution as shown in FIG. 6, the horizontal axis indicates the position of the sample, and the vertical axis indicates the sample. As shown in FIG. 6, a portion higher than the dotted line parallel to the horizontal axis in FIG. 6 indicates a height distribution having an H value, and a portion lower than the dotted line has an L value. In FIG. 6 and FIG. 7, the graph shows the profile of the actual sample, the number in the box is the height information of the sample input in digital form, for example, 0 is L, 1 is H Since the median may be set to H or L, the value 0.5 is used. Here, once the median is determined, it cannot be changed. For this reason, in this method, it cannot be distinguished whether the sample has a stepped gradient or a continuous gradient. However, if the positions of pixels with discontinuous gradients are compared, it is possible to distinguish between a continuous height change and a discontinuous height change. In FIG. 7, the position of the discontinuous gradient is one point where the staircase starts, or when the staircase gradient is slightly gentle, there are two points: the point where the staircase starts to rise and the point where the staircase ends. . Even in the case of a sample whose height continuously changes, there are two points: a point where the height starts to rise and a point where the height does not rise any further. Comparing the two cases, the gradient is steep when the point at which the discontinuous gradient appears is close, and the gradient is gentle otherwise. For this reason, the discontinuity of the gradient is an important basis for judging the gradient.

高さ分布の判断に際して重要な根拠となる高さ勾配の不連続点は、焦点整合度により把握することができる。このために、それぞれの入力画像において、離散ウェーブレット変換(DWT)の行われた、好ましくは、最高レベル(Highest level)まで 離散ウェーブレット変換(DWT)が行われ、必要に応じて、非インパルス型ノイズが除去された画像の近似サブーバンド領域に対して、焦点整合度を計算する(S28)。図8は、L、Hといった2種類の高さを測定するとき、焦点が高さLに結ばれる3つの光と、高さが連続的に変わる試料を示す図である。Lの位置に達した光1、2は焦点が正確に合ったため、焦点整合度が高く評価されるのに対し、ピントが合っていない(非合焦点)3の光は焦点整合度が低く評価される。前記近似サブーバンド領域において、特定のピクセルの焦点整合度は、次式1に示すように、当該ピクセル(座標:(x,y))の明るさ(I(x,y))と、周辺4点(座標:((x,y+1)、(x,y−1)、(x+1,y)、(x−1,y))の明るさとの差の絶対値の和として計算され得る。   The discontinuity of the height gradient, which is an important basis for determining the height distribution, can be grasped by the degree of focus matching. For this purpose, discrete wavelet transform (DWT) is performed on each input image, preferably discrete wavelet transform (DWT) is performed up to the highest level, and if necessary, non-impulse type noise is performed. The degree of focus matching is calculated for the approximate sub-band region of the image from which is removed (S28). FIG. 8 is a diagram showing three lights whose focal points are tied to the height L and a sample whose height changes continuously when measuring two types of heights L and H. FIG. Since the lights 1 and 2 that have reached the position L are accurately focused, the degree of focus matching is highly evaluated. On the other hand, the light that is not in focus (non-focused) 3 has a low degree of focus matching. Is done. In the approximate sub-band region, the focus matching degree of a specific pixel is expressed by the brightness (I (x, y)) of the pixel (coordinate: (x, y)) and the surrounding four points as shown in the following equation 1. It can be calculated as the sum of absolute values of differences from the brightness of (coordinates: ((x, y + 1), (x, y-1), (x + 1, y), (x-1, y))).

このとき、前記焦点整合度にフィルターをかけて、例えば、閾値を設定して、高域通過フィルターをかけると(S30)、合焦点の点(1、2の点)は残留し、非合焦点の点(3の点)は消える。例えば、隣り合う両ピクセルの明るさ(intensity)の差が40以上であれば、ピクセル間の境界がはっきりと現れるが、このような明るさの差を示すピクセルが上下左右の4方向に少なくとも2つ存在するとき、すなわち、フィルターをかけようとするピクセルが孤立されていない線としての意味を有するときを閾の条件とする。実験の結果、この場合、閾値が80〜120の場合に、輪郭線の形態のみが全く残る。このため、この場合の閾値は80、好ましくは、100に設定することができる。よって、本発明においては、前記焦点整合度が、隣り合う両ピクセルの境界が現れる(すなわち、明らかになる)明るさの差の3倍未満、好ましくは、2.5倍未満、さらに好ましくは、2倍未満であれば、非合焦点のピクセルと見なして、高さ情報を除去する。ここで、「隣り合う両ピクセルの境界が現れる明るさの差」は、画像の輪郭線が現れる明るさの差を実験的に決定することができる。このように、焦点整合度にフィルターをかけると、残留した点は境界がはっきりしている境界点であり、ここには勾配が不連続的な点(図8における2番の位置)が含まれる。このとき、前記閾値をあまりにも低く設定すれば(例えば、50)、非合焦点の部分が残留し(図9参照)、前記閾値を適度に設定すれば(例えば、100)、境界点は残留し、非合焦点の領域の点を消去することができる(図10参照)。図9および図10において、円形の試料画像内の白抜き部は境界線として認識されて消去されずに残留した点であり、黒色部は境界線以外の部分として認識されて消去された部分である。図9に示すように、未消去点(白抜き部)が多ければ、画像は全体的に明るくなるが、境界としての意味は薄くなり、図10においては、境界以外の点が十分に除去された状態を示す。前記ピクセルの高さ情報の消去において、境界に相当するピクセルの高さ情報のみ残留して、画像の境界線がいずれも鮮やかに見えることが好ましく、もし、一部の境界情報が失われるとしても、全体的な境界情報は残留し、且つ、境界線以外のピクセルはいずれも消去されることが好ましい。観察される試料の画像、高さの変化などによるが、焦点が合わなくて高さ情報が消去されるピクセルの数の非限定的な例は、全体のピクセルに対して10〜70%、具体的に20〜50%、さらに具体的には30〜40%である。ここで、閾値を通過した境界点がいずれも勾配が連続していない点ではないものの、図11および図12に示すように、同じ高さに存在し、且つ、隣り合う境界点の集まりの周縁にある点は、勾配が連続していない点である。具体的に、図11および図12中、1、2、3、4は境界点であり、1′、2′、3′、4′は高域通過フィルターによって消去された点である。   At this time, if the degree of focus matching is filtered, for example, a threshold is set and a high-pass filter is applied (S30), the in-focus point (points 1 and 2) remains, and the non-in-focus point The point (3) disappears. For example, if the difference in intensity between two adjacent pixels is 40 or more, the boundary between the pixels appears clearly. However, the pixel indicating such a difference in brightness is at least 2 in the four directions, up, down, left, and right. The threshold condition is when there are two pixels, that is, when the pixel to be filtered has a meaning as a non-isolated line. As a result of the experiment, in this case, when the threshold is 80 to 120, only the shape of the outline remains. For this reason, the threshold value in this case can be set to 80, preferably 100. Therefore, in the present invention, the degree of focus matching is less than 3 times, preferably less than 2.5 times, more preferably less than the brightness difference where the boundary between adjacent pixels appears (that is, becomes clear). If it is less than twice, it is regarded as an out-of-focus pixel and the height information is removed. Here, “the difference in brightness at which the boundary between adjacent pixels appears” can experimentally determine the difference in brightness at which the outline of the image appears. As described above, when the focus matching degree is filtered, the remaining points are boundary points where the boundary is clear, and this includes a point where the gradient is discontinuous (position 2 in FIG. 8). . At this time, if the threshold is set too low (for example, 50), a non-focused portion remains (see FIG. 9), and if the threshold is set appropriately (for example, 100), the boundary point remains. Then, the points in the out-of-focus area can be deleted (see FIG. 10). 9 and 10, white portions in a circular sample image are recognized as boundary lines and remain without being erased, and black portions are portions recognized and erased as portions other than the boundary line. is there. As shown in FIG. 9, if there are many unerased points (outlined portions), the image is brightened as a whole, but the meaning as a boundary is reduced. In FIG. 10, points other than the boundary are sufficiently removed. Indicates the state. In erasing the pixel height information, it is preferable that only the pixel height information corresponding to the boundary remains and all the boundary lines of the image look vivid, even if some boundary information is lost. Preferably, the entire boundary information remains and any pixels other than the boundary line are erased. A non-limiting example of the number of pixels that are out of focus and whose height information is erased depends on the observed sample image, height change, etc. 20 to 50%, more specifically 30 to 40%. Here, although none of the boundary points that have passed through the threshold are points where the gradient is not continuous, as shown in FIG. 11 and FIG. The point at is the point where the gradient is not continuous. Specifically, in FIGS. 11 and 12, 1, 2, 3, and 4 are boundary points, and 1 ′, 2 ′, 3 ′, and 4 ′ are points eliminated by the high-pass filter.

このように、前記フィルターを通過できずに消去された点の高さを、フィルターを通過した点の高さ値(例えば、前記ステップS26において求められた1次補正済みの高さ値)を内挿して算出し(S32)、これを用いて最終的に高さ地図を完成する。高さの不連続点は高さ分布を分析する上で重要な役割を果たすが、実際に高さ地図を作成するに際しては、別途に抽出を行う必要がない。境界点は高さ値をそのまま使用し、消去された点(非境界点)は、周辺において相対する最も近い2つの境界点の高さを内挿して、高さを求めることにより、勾配の変化に関する情報が十分に得られるためである。例えば、図11および図12において、1′のように、境界点ではないものの、境界点として残留した点と同じ高さにある点は、周辺にある境界点の内挿を通じて、周辺境界点と同じ高さを有する。これに対し、2′のように、高さの異なる境界点の間にある点は、周辺の境界点の高さから内挿して、中間の高さを有する。このとき、内挿される点の高さは、境界点の高さの重み付け平均を求めるものであり、重み付け値は近い境界値に一層大きく影響されるため、距離逆数(1/r)の関数または距離のガウス関数として与えられる。例えば、ガウス関数と重み付け値関数を1/rで展開したとき(ここで、rは、内挿される点と境界点との距離を表わす。)、最も低い次数である1/rを重み付け値として適用するか、あるいは、ガウス関数の場合、exp(−r/1000)を重み付け値として用いて、好適な結果を得ることができた。 In this way, the height of the point that has been erased without passing through the filter is set to the height value of the point that has passed through the filter (for example, the height value that has been subjected to the primary correction obtained in step S26). It is calculated by inserting (S32), and the height map is finally completed using this. Although the height discontinuity plays an important role in analyzing the height distribution, it does not need to be extracted separately when actually creating the height map. The boundary point uses the height value as it is, and the deleted point (non-boundary point) changes the gradient by interpolating the heights of the two closest boundary points in the vicinity to obtain the height. This is because sufficient information can be obtained. For example, in FIG. 11 and FIG. 12, a point that is not a boundary point but is at the same height as a point that remains as a boundary point, such as 1 ', is converted into a peripheral boundary point through interpolation of the peripheral boundary points. Have the same height. On the other hand, a point between the boundary points having different heights, such as 2 ', has an intermediate height by interpolating from the heights of the peripheral boundary points. At this time, the height of the point to be interpolated is to obtain a weighted average of the heights of the boundary points, and the weighting value is more greatly influenced by the near boundary value, so that the function of the reciprocal distance (1 / r) or It is given as a Gaussian function of distance. For example, when the Gaussian function and the weight value function are expanded by 1 / r (where r represents the distance between the point to be interpolated and the boundary point), 1 / r which is the lowest order is used as the weight value. or apply, or, in the case of a Gaussian function, using exp a (-r 2/1000) as a weighting value, it was possible to obtain good results.

一方、図6及び図7などに示す1次元試料とは異なり、2次元の実際の試料においては、境界値が閉曲線の形だけではなく、開曲線、点の集まりなどの形で存在してもよい。このため、本発明においては、高さが算出されるべき消去された点から最も近い個所に位置している3〜7個、例えば、5個の境界点から内挿を行うことが好ましい。内挿に用いられる境界点の検出には、内挿される点(消去された点)を中心とする同心円の検索と方位角の検索とを組み合わせて用いる。同心円の検索と方位角の検索が組み合わせられた方式は、図13に示すように、内挿される点を中心として同心円または同心四角形を描き、中心から外方に向けて検索を行うが、境界点が見出されれば、見出された境界点から、例えば、±30°、好ましくは、±15°の範囲(すなわち、境界点が見出された方位角)内においてはそれ以上の境界点を検索しない方式である。図13中、中空の四角形は、内挿される点の位置、中実の四角形は境界点、点線の四角形は、検索する同心円、薄色の点線で描かれた三角形の部分は、境界点の見出後に検索の対象から除外された方位角の領域を示す。前記方法は、内挿される点を含む単一閉曲線を検索する方法であり、1次元である図11において2′の点を内挿するに際して、左側に検索する際に境界点2を検索したならば、左側にはそれ以上の検索を行わないことと同じ意味である。このように、境界点が検索されれば、1/r若しくはexp(−r/1000)を重み付け値に設定し、内挿を行うことにより、消去された点の高さを算出し、前記高さ情報が除去されたピクセルに対して前記内挿によって算出された高さを代入して最終的に高さ地図を完成する(S34)。図14は、本発明に従い最終的に完成された3次元プロファイル(高さ)マップの一例を示す。 On the other hand, unlike the one-dimensional samples shown in FIG. 6 and FIG. 7 and the like, in a two-dimensional actual sample, the boundary value may exist not only in the form of a closed curve but also in the form of an open curve, a collection of points, etc. Good. For this reason, in the present invention, it is preferable to perform interpolation from 3 to 7, for example, 5 boundary points located at a position closest to the deleted point whose height is to be calculated. The detection of boundary points used for interpolation uses a combination of concentric circle search centered on the point to be interpolated (erased point) and azimuth angle search. As shown in FIG. 13, a method in which concentric circle search and azimuth angle search are combined draws a concentric circle or a concentric rectangle with the point to be interpolated as the center, and searches from the center toward the outside. If found, search for more boundary points within the range of ± 30 °, preferably ± 15 ° (ie, the azimuth at which the boundary point was found) from the found boundary points. It is a method that does not. In FIG. 13, the hollow rectangle indicates the position of the point to be interpolated, the solid rectangle indicates the boundary point, the dotted rectangle indicates the concentric circle to be searched, and the triangular portion drawn by the light dotted line indicates the boundary point. The area of the azimuth angle excluded from the search target after leaving is shown. The above method is a method of searching for a single closed curve including a point to be interpolated. When interpolating the 2 ′ point in FIG. 11 which is one-dimensional, if the boundary point 2 is searched when searching to the left side. For example, it means that no further search is performed on the left side. Thus, if the boundary points are searched, the 1 / r or exp (-r 2/1000) is set to the weighted value by performing interpolation to calculate the height of the points is erased, the A height map is finally completed by substituting the height calculated by the interpolation for the pixels from which the height information has been removed (S34). FIG. 14 shows an example of a three-dimensional profile (height) map finally completed according to the present invention.

このように、試料画像の最終的な高さ地図が完成されれば、当該高さの離散ウェーブレット変換(DWT)のサブーバンドで最高レベルのウェーブレットサブーバンド値を再構成し、R、G、Bそれぞれのカラーに対して、最高レベルのウェーブレットの近似サブーバンドを重み付け平均として、柔らかく連結した後、多重逆離散ウェーブレット変換(Inverse DWT)を行うことにより、入力画像の解像度レベルで最終的な合成画像が得られる。生成された最終的な合成画像は、画像の全領域に亘ってピントの合った(合焦点)、深度の拡張された2次元画像となる。   Thus, when the final height map of the sample image is completed, the highest wavelet sub-band value is reconstructed in the sub-band of the discrete wavelet transform (DWT) of the height, and each of R, G, and B is reconstructed. After the soft sub-band of the approximate sub-band of the highest level wavelet is used as a weighted average, the multiple inverse discrete wavelet transform (Inverse DWT) is performed to obtain a final composite image at the resolution level of the input image. It is done. The final composite image that is generated is a two-dimensional image that is in focus (focused) and extended in depth over the entire area of the image.

Claims (9)

試料を互いに異なる高さから撮像して、焦点部位の異なる多数の2次元試料画像を得るステップと、
前記試料画像に対して、離散ウェーブレット変換を行うステップと、
それぞれの試料画像に対して離散ウェーブレット変換を行うことにより得られた詳細サブーバンドにおいて、各ピクセルの詳細サブーバンド係数値を比較して、最大係数値を示す画像の撮像高さで、各ピクセルに対する初期の高さ地図を作成するステップと、
それぞれの入力画像において、離散ウェーブレット変換の行われた画像の近似サブーバンド領域に対して、合焦点であり且つ境界点であるピクセルを検出するための評価値である焦点整合度を計算するステップと、
前記焦点整合度にフィルターをかけて、合焦点であり且つ境界点であるピクセルの高さ情報は残留させ、そうでないピクセルの高さ情報は除去するステップと、
前記フィルターを通過できずに除去されたピクセル(非境界点)の高さを、フィルターを通過したピクセル(境界点)の高さ値から内挿して算出するステップと、
前記高さ情報の除去されたピクセルに対して前記内挿によって算出された高さを代入して高さ地図を作成するステップと、
を含む3次元プロファイルマップの作成方法。
Imaging a sample from different heights to obtain a number of two-dimensional sample images with different focal points;
Performing a discrete wavelet transform on the sample image;
In the detailed sub-band obtained by performing the discrete wavelet transform on each sample image, the detailed sub-band coefficient value of each pixel is compared, and the initial height for each pixel is obtained at the imaging height of the image showing the maximum coefficient value. Creating a height map;
In each input image, calculating a focus matching degree that is an evaluation value for detecting a pixel that is a focal point and a boundary point with respect to the approximate subband region of the image subjected to the discrete wavelet transform;
Filtering the focus matching degree to leave pixel height information that is in- focus and boundary points, and removing pixel height information that is not .
Calculating a height of a pixel (non-boundary point) removed without passing through the filter from a height value of a pixel (boundary point) that has passed through the filter;
Substituting the height calculated by the interpolation for the pixels from which the height information has been removed, and creating a height map;
Of creating a three-dimensional profile map including
前記初期の高さ地図を作成するステップ後に、各ピクセルを中心とする検証ウィンドウ内において、同じ高さとして計算されたピクセルの詳細サブーバンドウェーブレット係数を加算し、高さに応じたウェーブレット係数の和を比較して、最も大きな値を与える高さを当該ピクセルの実際の高さで補正するステップを
さらに含む、請求項1に記載の3次元プロファイルマップの作成方法。
After the step of creating the initial height map, the detailed sub-band wavelet coefficients of the pixels calculated as the same height are added within the verification window centered on each pixel, and the sum of the wavelet coefficients according to the height is added. The method of creating a three-dimensional profile map according to claim 1, further comprising the step of comparing the heights that give the largest value with the actual height of the pixel.
前記検証ウィンドウは、各ピクセルを中心として3x3のピクセルサイズを有するものである、請求項2に記載の3次元プロファイルマップの作成方法。   The method according to claim 2, wherein the verification window has a pixel size of 3 × 3 with each pixel as a center. 前記詳細サブーバンドウェーブレット係数が加算される、すなわち、グループ化されるピクセルを選定する方法は、検証ウィンドウ内において同じ高さに相当するピクセルを同じグループとして選定することである、請求項2に記載の3次元プロファイルマップの作成方法。   The method of claim 2, wherein the method of selecting pixels to be grouped, i.e. grouped by the detailed sub-band wavelet coefficients, is to select pixels corresponding to the same height in the verification window as the same group. 3D profile map creation method. 前記近似サブーバンド領域の前記焦点整合度は、次式1に示すように、当該ピクセル(座標:(x,y))の明るさ(I(x,y))と、周辺4点(座標:((x,y+1)、(x,y−1)、(x+1,y)、(x−1,y))の明るさとの差の絶対値の和として計算される、請求項1に記載の3次元プロファイルマップの作成方法。
The focus matching degree of the approximation Sabubando region, as shown in the following equation 1, the pixel (coordinates: (x, y)) brightness of the (I (x, y)), peripheral four points (coordinates :( 3. The calculation according to claim 1, which is calculated as a sum of absolute values of differences from brightness of (x, y + 1), (x, y−1), (x + 1, y), (x−1, y)). How to create a dimension profile map.
前記焦点整合度が、隣り合う両ピクセルの境界が現れる明るさの差の3倍未満であれば、非合焦点のピクセルと見なして高さ情報を除去する、請求項5に記載の3次元プロファイルマップの作成方法。   6. The three-dimensional profile according to claim 5, wherein if the focus matching degree is less than three times the brightness difference at which a boundary between adjacent pixels appears, it is regarded as a non-focus pixel and height information is removed. How to create a map. 前記内挿される点の高さは、境界点の高さの重み付け平均から求められ、前記重み付け平均の重み付け値関数は、距離逆数(1/r、ここで、rは、内挿される点と境界点との間の距離を表わす。)の関数であるか、あるいは、距離のガウス関数である、請求項1に記載の3次元プロファイルマップの作成方法。   The height of the point to be interpolated is obtained from the weighted average of the heights of the boundary points, and the weighted value function of the weighted average is a reciprocal distance (1 / r, where r is the point to be interpolated and the boundary The method of creating a three-dimensional profile map according to claim 1, which represents a distance between points) or a Gaussian function of distance. 前記重み付け平均の重み付け値関数は、1/rまたはexp(−r/1000)である、請求項7に記載の3次元プロファイルマップの作成方法。 Weighting value a function of the weighted average is 1 / r or exp (-r 2/1000), 3 -dimensional profile map creation method according to claim 7. 前記非境界点の高さを内挿するための境界点の選択は、内挿される点(境界点)を中心として同心円または同心四角形を描き、中心から外方に向けて検索するが、境界点が見出されれば、見出された境界点から±30°の範囲(境界点が見出された方位角)内においてはそれ以上の境界点を検索しないような方式により行われる、請求項1に記載の3次元プロファイルマップの作成方法。   Selection of a boundary point for interpolating the height of the non-boundary point is performed by drawing a concentric circle or a concentric rectangle centering on the point to be interpolated (boundary point) and searching from the center outward. If found, it is performed in such a manner that no more boundary points are searched within a range of ± 30 ° from the found boundary point (azimuth angle where the boundary point was found). A method for creating the described three-dimensional profile map.
JP2011285895A 2011-04-12 2011-12-27 Method for creating a three-dimensional profile map for image composition Expired - Fee Related JP5430643B2 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
KR1020110033599A KR101226913B1 (en) 2011-04-12 2011-04-12 Method for preparing three dimensional profile map for composing images
KR10-2011-0033599 2011-04-12

Publications (2)

Publication Number Publication Date
JP2012220490A JP2012220490A (en) 2012-11-12
JP5430643B2 true JP5430643B2 (en) 2014-03-05

Family

ID=47272128

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011285895A Expired - Fee Related JP5430643B2 (en) 2011-04-12 2011-12-27 Method for creating a three-dimensional profile map for image composition

Country Status (2)

Country Link
JP (1) JP5430643B2 (en)
KR (1) KR101226913B1 (en)

Families Citing this family (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6351289B2 (en) * 2014-02-18 2018-07-04 Ntn株式会社 Surface shape measuring apparatus, method and program
JP2018091807A (en) * 2016-12-07 2018-06-14 オルボテック リミテッド Defective flaw determination method and device
JP2019135453A (en) * 2018-02-05 2019-08-15 森合精機株式会社 Residual foreign matter measuring device
CN114111636B (en) * 2021-11-19 2022-10-14 四川大学 Three-dimensional surface shape measuring method based on double-angle rotation wavelet transformation

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH1074192A (en) * 1996-08-30 1998-03-17 Mitsubishi Electric Corp Image processing method and device
JP2001291092A (en) * 2000-04-05 2001-10-19 Matsushita Electric Ind Co Ltd Device and method for identifying image
US7352892B2 (en) 2003-03-20 2008-04-01 Micron Technology, Inc. System and method for shape reconstruction from optical images
JP4375662B2 (en) * 2003-11-17 2009-12-02 株式会社リコー Image processing apparatus, image processing method, program, information recording medium, and imaging apparatus
US7680350B2 (en) 2004-05-07 2010-03-16 TerraMetrics, Inc. Method and system for progressive mesh storage and reconstruction using wavelet-encoded height fields
JP2010129077A (en) * 2008-11-28 2010-06-10 Power Assist Co Ltd Generation means of omnifocal image using wavelet transformation

Also Published As

Publication number Publication date
KR20120116073A (en) 2012-10-22
KR101226913B1 (en) 2013-01-28
JP2012220490A (en) 2012-11-12

Similar Documents

Publication Publication Date Title
CN111083365B (en) Method and device for rapidly detecting optimal focal plane position
JP6490219B2 (en) Autofocus system and autofocus method in digital holography
JP5705096B2 (en) Image processing apparatus and image processing method
JP6214183B2 (en) Distance measuring device, imaging device, distance measuring method, and program
EP1958158B1 (en) Method for detecting streaks in digital images
JP5385593B2 (en) Crack detection method
JP2006162583A (en) Crack detection method
JP5430643B2 (en) Method for creating a three-dimensional profile map for image composition
CN108369737B (en) Using heuristic graph search to segment layered images quickly and automatically
KR20090090333A (en) Focus assist system and method
JP5705711B2 (en) Crack detection method
JP2015108837A (en) Image processing apparatus and image processing method
CN107529963A (en) Image processing apparatus, image processing method and image processing program
CN111325763A (en) Occlusion prediction method and device based on light field refocusing
CN111179173B (en) Image splicing method based on discrete wavelet transform and gradient fusion algorithm
JP2013002839A (en) Crack detection method
KR20160034928A (en) Keypoint identification
JPWO2017030056A1 (en) Image processing apparatus, image processing method, and image processing program
CN116824070B (en) Real-time three-dimensional reconstruction method and system based on depth image
CN113375555A (en) Power line clamp measuring method and system based on mobile phone image
Mahmood et al. 3D shape recovery from image focus using kernel regression in eigenspace
CN111445435A (en) No-reference image quality evaluation method based on multi-block wavelet transform
EP2300990A1 (en) Image analysis system & method
EP3582179B1 (en) Image processing apparatus, image processing method, and image processing program
JP5403400B2 (en) Image processing apparatus, imaging apparatus, and image processing program

Legal Events

Date Code Title Description
A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20130625

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20130919

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: 20131112

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20131203

R150 Certificate of patent or registration of utility model

Free format text: JAPANESE INTERMEDIATE CODE: R150

Ref document number: 5430643

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees