JP2006227895A - Image processor - Google Patents

Image processor Download PDF

Info

Publication number
JP2006227895A
JP2006227895A JP2005040660A JP2005040660A JP2006227895A JP 2006227895 A JP2006227895 A JP 2006227895A JP 2005040660 A JP2005040660 A JP 2005040660A JP 2005040660 A JP2005040660 A JP 2005040660A JP 2006227895 A JP2006227895 A JP 2006227895A
Authority
JP
Japan
Prior art keywords
image
image processing
area
processing apparatus
calculation
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
JP2005040660A
Other languages
Japanese (ja)
Inventor
Kazuki Maruoka
和貴 丸岡
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Panasonic Holdings Corp
Original Assignee
Matsushita Electric Industrial Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Matsushita Electric Industrial Co Ltd filed Critical Matsushita Electric Industrial Co Ltd
Priority to JP2005040660A priority Critical patent/JP2006227895A/en
Publication of JP2006227895A publication Critical patent/JP2006227895A/en
Withdrawn legal-status Critical Current

Links

Landscapes

  • Image Analysis (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an image processor capable of performing alignment of a plurality of photographic images with high accuracy regardless of a light emission characteristic of an object that is a reference of the alignment, and a photographic condition of the object. <P>SOLUTION: An area pixel data integration part 130 relatively shifts an arithmetic area outputted from an arithmetic area setting part 102 to a filter image 101, and sequentially calculates area integration data wherein all luminance values of the arithmetic area are added up in each shift position. A shift amount calculation part 104 finds a maximum value from the area integration data of each the shift position, and calculates the shift position corresponding to the maximum value as a shift amount for the alignment. A position correction part 105 shifts the filter image 101 on the basis of the calculated shift amount, and outputs it as an output image 106. <P>COPYRIGHT: (C)2006,JPO&NCIPI

Description

本発明は、複数画像の位置合わせ処理を行う画像処理装置に関し、特に、同一の撮影対象を複数回撮影して得た画像間の位置ずれを補正する技術に関するものである。   The present invention relates to an image processing apparatus that performs alignment processing of a plurality of images, and more particularly to a technique for correcting a positional deviation between images obtained by imaging the same imaging object a plurality of times.

複数の画像間の位置ずれを補正する位置合わせ手法としては、画像間の相関を評価し、相関が最も大きい位置に画像を合わせる手法が一般的によく知られている。そして、画像間の相関の評価には、残差が用いられる。残差は、2枚の画像を重ね合わせたときの重なった画素の輝度値の差の絶対値を累積加算した値であり、2枚の画像のミスマッチ度合いを示している。したがって、重ね合わせる位置を変更しつつ、各位置で残差を求め、残差が最小となる位置を検出することで、位置合わせの位置を求めることができる。   As an alignment method for correcting misalignment between a plurality of images, a method for evaluating the correlation between images and aligning the image at a position having the largest correlation is generally well known. The residual is used for evaluating the correlation between images. The residual is a value obtained by accumulatively adding the absolute value of the difference between the luminance values of the overlapped pixels when the two images are overlapped, and indicates the degree of mismatch between the two images. Therefore, it is possible to obtain the position of alignment by calculating the residual at each position while changing the overlapping position and detecting the position where the residual is minimum.

このような位置合わせ処理に関する技術が記載された文献として、特許文献1がある。特許文献1には、基準となる画像に対して位置合わせ対象となる画像を最もうまく重ね合わせることができる位置を求める画像の位置合わせ方法であって、基準画像と対象画像との位置合わせのよさの指標として、基準画像と対象画像が重なり合う部分である重複領域における残差をその重複領域に含まれる要素数により正規化した類似測度を用い、対象画像の基準画像に対する各重なり位置の候補における類似測度のうち、最良の類似測度が得られた重なり位置の候補を基準画像に対するその対象画像の位置合わせ位置とする位置合わせ方法が記載されている。   Patent Document 1 is a document describing a technique related to such alignment processing. Patent Document 1 discloses an image alignment method for obtaining a position where an image to be aligned can be best superimposed on a reference image, and the alignment between the reference image and the target image is good. As a measure of similarity, the similarity in each overlap position candidate with respect to the reference image of the target image is obtained by using a similarity measure obtained by normalizing the residual in the overlap region where the reference image and the target image overlap with the number of elements included in the overlap region. Among the measures, an alignment method is described in which the candidate for the overlapping position where the best similarity measure is obtained is used as the alignment position of the target image with respect to the reference image.

図20は、この位置合わせ処理を示すフローチャートである。図20において、まず、位置合わせ処理の対象となる対象画像及び位置合わせ処理の基準となる基準画像の画像データを読み込む(ステップA0)。また、基準画像に対して対象画像がとりうる位置を示す位置パラメータの候補の集合(位置パラメータ候補群)も読み込む(ステップA1)。そして、最良類似測度を与えた位置パラメータ候補、その位置パラメータ候補により得られた重複領域の要素数及び類似測度の各項目を記憶しておく最良類似測度メモリを初期化する(ステップA2)。   FIG. 20 is a flowchart showing this alignment process. In FIG. 20, first, the target image to be subjected to the alignment process and the image data of the reference image to be the reference for the alignment process are read (step A0). Also, a set of position parameter candidates (position parameter candidate group) indicating positions that can be taken by the target image with respect to the reference image is read (step A1). Then, the best similarity measure memory for storing the position parameter candidate to which the best similarity measure is given, the number of elements of the overlapping region obtained by the position parameter candidate, and the similarity measure is initialized (step A2).

続いて、読み込んだ位置パラメータ候補群の中から1つの位置パラメータ候補を選択し(ステップA3)、この選択された位置パラメータ候補を対象画像に適用した際に対象画像と基準画像が重なり合う部分である重複領域を求めて設定する(ステップA4)。そして、その重複領域に含まれる要素数を計算し(ステップA5)、記憶しておく。さらに、記憶した重複領域の要素数と、今までの算出した最良類似測度とから閾値を求め、設定する(ステップA6)。この閾値は、重複領域の要素数と最良類似測度を乗じた値であり、重複領域における残差を計算する以下の手続きにおいて、手続きを途中で打切るかどうかを判断するために利用される。   Subsequently, one position parameter candidate is selected from the read position parameter candidate group (step A3), and when the selected position parameter candidate is applied to the target image, the target image and the reference image overlap. An overlapping area is obtained and set (step A4). Then, the number of elements included in the overlapping area is calculated (step A5) and stored. Further, a threshold value is obtained and set from the stored number of elements in the overlapping area and the best similarity measure calculated so far (step A6). This threshold value is a value obtained by multiplying the number of elements in the overlapping region by the best similarity measure, and is used to determine whether or not to abort the procedure in the following procedure for calculating the residual in the overlapping region.

次に、重複領域における残差を求めるにあたり、残差計算の途中経過(部分残差)を格納する残差メモリを初期化する(ステップA7)。そして、重複領域内の要素に対応する、基準画像と対象画像の画素の輝度値から残差を求め、残差メモリを更新していく(ステップA8、A9)。更新された残差メモリ内の値は、ステップA6で設定した閾値と比較され(ステップA10)、残差メモリ内の値が閾値を上回っている場合には、重複領域に対する残差を求める手続きを中断し、ステップA3に戻って、位置パラメータ候補群内の次の位置パラメータ候補に対して、ステップA3以降と同様の処理を行う。   Next, when obtaining the residual in the overlapping region, a residual memory for storing the intermediate progress of the residual calculation (partial residual) is initialized (step A7). Then, a residual is obtained from the luminance values of the pixels of the reference image and the target image corresponding to the elements in the overlapping area, and the residual memory is updated (steps A8 and A9). The updated value in the residual memory is compared with the threshold value set in step A6 (step A10), and if the value in the residual memory exceeds the threshold value, a procedure for obtaining a residual for the overlapping region is performed. The process is interrupted, the process returns to Step A3, and the same processing as that after Step A3 is performed on the next position parameter candidate in the position parameter candidate group.

一方、残差メモリ内の値が閾値未満の場合には、重複領域内の次の要素を選択し、同様に残差メモリの値を更新する処理を引き続き行う。重複領域内の全ての要素に対して残差メモリ内の値を更新する処理を終えた場合は、得られた結果に基づき、最良類似測度メモリ内の位置パラメータ、その位置パラメータを対象画像に適用した場合に得られる重複領域の残差、その重複領域に含まれる要素数のそれぞれを、更新する(ステップA11)。   On the other hand, if the value in the residual memory is less than the threshold value, the next element in the overlap area is selected, and the process of updating the residual memory value is continued. When the process of updating the values in the residual memory for all the elements in the overlap region is completed, the position parameter in the best similarity measure memory and the position parameter are applied to the target image based on the obtained result. Each of the residual of the overlapping area obtained in this case and the number of elements included in the overlapping area are updated (step A11).

そして、ステップA3に戻って、位置パラメータ候補群の次の位置パラメータ候補を選択し、ステップA3以降の処理を繰り返す。位置パラメータ候補群内の全ての位置パラメータ候補を選択し、それらに対して上記の処理を適用し終えると、最良類似測度メモリには、位置パラメータ候補群内で最良の類似測度を与えた位置パラメータと、その位置パラメータにより得られる重複領域の類似測度と、その重複領域の要素数とが格納されていることになる。そして、これらの値を位置合わせ結果とする。   Then, returning to step A3, the next position parameter candidate in the position parameter candidate group is selected, and the processes after step A3 are repeated. When all the position parameter candidates in the position parameter candidate group are selected and the above processing is applied to them, the best similarity measure memory stores the position parameter that gives the best similarity measure in the position parameter candidate group. And the similarity measure of the overlapping area obtained by the position parameter and the number of elements of the overlapping area are stored. These values are used as alignment results.

以上のように、画像間の重ね合わせのよさを評価する指標として基準画像と対象画像との重複領域における残差をその重複領域に含まれる要素数により正規化した類似測度を用いることにより、画像間の位置関係によって重なり部分の大きさや形状が変化する場合にも正確な位置合わせが行える。また、対象画像の基準画像に対するある重なり位置における類似測度を算出するに際して、両画像の重複部分の要素数と今までの最良類似測度とを乗じた値を、今回の類似測度算出で使用する閾値の値として設定し、重複領域における計算途中の残差が閾値を超過した場合には、それまでの最良値を更新できないことが判明するため、残差計算を打切ることで、全体の計算量が削減され、高速な位置合わせを可能としている。さらに、正規化した残差である類似測度は画像の重なり部分の大きさや形状に影響されない値であるので、画像の各画素が有効画素であるのか、無効画素であるのかを示す情報を保持する画像マスクを予め用意しておき、類似測度を求める際に、画像マスクを参照し、基準画像と対象画像の重複領域で双方が有効画素である要素のみを用いることで、画像中の特定の範囲だけを画像処理の対象とした位置合わせも可能としている。   As described above, by using the similarity measure obtained by normalizing the residual in the overlapping area between the reference image and the target image by the number of elements included in the overlapping area as an index for evaluating the goodness of overlapping between the images, Even when the size or shape of the overlapping portion changes depending on the positional relationship between them, accurate alignment can be performed. In addition, when calculating the similarity measure at a certain overlapping position of the target image with respect to the reference image, a threshold value used in the calculation of the similarity measure this time is a value obtained by multiplying the number of elements in the overlapping portion of both images by the best similarity measure so far If the residual during calculation in the overlap region exceeds the threshold, it turns out that the best value up to that point cannot be updated. Is reduced, enabling high-speed alignment. Furthermore, since the similarity measure, which is a normalized residual, is a value that is not affected by the size or shape of the overlapping portion of the image, it holds information indicating whether each pixel of the image is a valid pixel or an invalid pixel. By preparing an image mask in advance and calculating the similarity measure, the image mask is referred to, and only the elements that are both effective pixels in the overlapping area of the reference image and the target image are used, thereby enabling a specific range in the image. It is also possible to align only the image processing target.

特開平10−49681号公報 第2図Japanese Patent Laid-Open No. 10-49681 FIG. 2

しかしながら、上記した位置合わせ処理は、基準画像と対象画像が同一の対象を同一の撮影条件で撮影して得たものであることを前提としており、1つの撮影対象を通過帯域の異なるフィルタを介して撮影した複数の画像間の位置ずれの補正には適用が困難である。すなわち、一般に対象物は様々な発光特性を持っており、通過帯域の異なるフィルタを介して撮影した画像は、同一対象物の明るさが異なるものとなる。したがって、画像間における相関の評価が困難になり、場合によっては、一対の画像を重ね合わせて求めた残差の最小値の位置が必ずしもマッチング位置と限らなくなる。   However, the above alignment processing is based on the premise that the reference image and the target image are obtained by shooting the same target under the same shooting conditions, and one shooting target is passed through filters having different passbands. Therefore, it is difficult to apply to the correction of misalignment between a plurality of images taken in this manner. That is, generally, an object has various emission characteristics, and images taken through filters having different pass bands have different brightness of the same object. Therefore, it becomes difficult to evaluate the correlation between images, and in some cases, the position of the minimum value of the residual obtained by superimposing a pair of images is not necessarily the matching position.

本発明は、上記事情に鑑みなされたもので、位置合わせの基準となる対象物の発光特性、その対象物の撮影条件にかかわらず、複数の撮影画像の位置合わせを精度良く行うことができる画像処理装置を提供することを目的とする。   The present invention has been made in view of the above circumstances, and can accurately align a plurality of captured images regardless of the light emission characteristics of an object serving as a reference for alignment and the imaging conditions of the object. An object is to provide a processing apparatus.

本発明の画像処理装置は、複数画像の位置合わせ処理を行う画像処理装置であって、位置合わせを行うべき画像それぞれに対して、位置合わせのための演算処理を行う画素領域である演算領域を設定する演算領域設定部と、処理対象画像における前記演算領域の画素の輝度値を加算した領域積算データを、前記演算領域を前記処理対象画像に対して相対的に移動させた複数のシフト位置で算出する領域画素データ積算部と、前記領域画素データ積算部において算出した複数の前記領域積算データの中の最大値又は最小値に対応する前記シフト位置を示すシフト量を算出するシフト量算出部と、前記シフト量算出部において算出した前記シフト量に基づいて、前記処理対象画像の補正画像を生成する位置補正部と、を備えるものである。   An image processing apparatus according to the present invention is an image processing apparatus that performs alignment processing of a plurality of images, and includes an arithmetic area that is a pixel area that performs arithmetic processing for alignment for each image to be aligned. The calculation area setting unit to be set and area integration data obtained by adding the luminance values of the pixels of the calculation area in the processing target image at a plurality of shift positions where the calculation area is moved relative to the processing target image. A region pixel data integration unit to calculate, and a shift amount calculation unit to calculate a shift amount indicating the shift position corresponding to the maximum value or the minimum value among the plurality of region integration data calculated in the region pixel data integration unit; A position correction unit that generates a corrected image of the processing target image based on the shift amount calculated by the shift amount calculation unit.

本発明によれば、位置合わせの基準となる対象物の発光特性、その対象物の撮影条件にかかわらず、複数の撮影画像の位置合わせを精度良く行うことができる。   According to the present invention, it is possible to perform alignment of a plurality of captured images with high accuracy regardless of the light emission characteristics of an object serving as a reference for alignment and the imaging conditions of the object.

本発明の画像処理装置は、前記演算領域設定部が設定する前記演算領域が、前記処理対象画像における位置合わせの基準となる対象物の領域であるものを含む。   The image processing apparatus of the present invention includes an image processing apparatus in which the calculation area set by the calculation area setting unit is an area of an object serving as a reference for alignment in the processing target image.

本発明の画像処理装置は、前記演算領域設定部が設定する前記演算領域が、前記演算領域を求めるための画像データである演算領域算出画像を2値化して得られた画像データの、一方の画素値が占める領域であるものを含む。   In the image processing apparatus of the present invention, the calculation area set by the calculation area setting unit is one of image data obtained by binarizing a calculation area calculation image that is image data for obtaining the calculation area. This includes areas occupied by pixel values.

本発明の画像処理装置は、前記演算領域算出画像が、前記処理対象画像における位置合わせの基準となる対象物に光を照射した時の影を撮影した画像であるものを含む。   In the image processing apparatus of the present invention, the calculation area calculation image includes an image obtained by photographing a shadow when light is irradiated to an object serving as a reference for alignment in the processing target image.

本発明の画像処理装置は、前記演算領域算出画像が、前記処理対象画像における位置合わせの基準となる全ての対象物が撮影されている画像である画像処理装置。   The image processing apparatus according to the present invention is an image processing apparatus in which the calculation area calculation image is an image in which all objects that are used as alignment references in the processing target image are captured.

本発明の画像処理装置は、前記位置合わせを行うべき画像が、通過帯域の異なる複数のフィルタを切り換えて撮影された撮影画像であり、前記演算領域算出画像が、前記複数のフィルタの全通過帯域を通過するフィルタを用いて、又はフィルタを用いずに撮影した画像であるものを含む。   In the image processing apparatus of the present invention, the image to be aligned is a captured image that is captured by switching a plurality of filters having different pass bands, and the calculation region calculation image is an all pass band of the plurality of filters. Including an image taken using a filter passing through or without using a filter.

本発明の画像処理装置は、前記位置合わせを行うべき画像が、通過帯域の異なる複数のフィルタを切り換えて撮影された撮影画像であり、前記演算領域設定部が、撮影される対象物の画像パターンの形状を示すマスクパターンを有し、前記撮影画像の複数の画像を重ね合わせて各画像の対応する画素の輝度値を加算した画像データを作成し、該画像データにおいて予め与えられた閾値に基づいて抽出した領域の重心位置とマスクパターンの重心位置が一致するようにマスクパターンを配置し、該マスクパターンの領域を演算領域とするものを含む。   In the image processing device of the present invention, the image to be aligned is a captured image that is captured by switching a plurality of filters having different passbands, and the calculation area setting unit is configured to capture an image pattern of an object to be captured. Based on a threshold value given in advance in the image data, creating a mask pattern indicating the shape of the image, superimposing a plurality of images of the captured image and adding the luminance values of the corresponding pixels of each image The mask pattern is arranged so that the centroid position of the extracted area matches the centroid position of the mask pattern, and the area of the mask pattern is used as the calculation area.

本発明の画像処理装置は、前記領域画素データ積算部が、前記演算領域設定部によって設定される前記演算領域のうち、前記相対的に移動させる範囲に応じて定められる前記演算領域の前記輝度値を加算するものを含む。   In the image processing apparatus according to the aspect of the invention, the luminance value of the calculation area determined by the area pixel data integration unit according to the relatively moved range of the calculation areas set by the calculation area setting unit. Including those that add.

本発明の画像処理装置は、前記領域画素データ積算部が、前記処理対象画像の周辺部分を除く部分に対応する前記演算領域の前記輝度値を加算するものを含む。   The image processing apparatus of the present invention includes an apparatus in which the region pixel data integration unit adds the luminance values of the calculation region corresponding to a portion excluding a peripheral portion of the processing target image.

本発明の画像処理装置は、前記演算領域設定部が、前記相対的に移動させる範囲に応じて定められる範囲に、前記演算領域を設定するものを含む。   The image processing apparatus of the present invention includes an apparatus in which the calculation area setting unit sets the calculation area in a range determined according to the relatively moved range.

本発明の画像処理装置は、前記演算領域を設定する領域が、前記処理対象画像の周辺部分を除く部分に対応する領域であるものを含む。   In the image processing apparatus according to the present invention, the region in which the calculation region is set is a region corresponding to a portion other than a peripheral portion of the processing target image.

本発明の画像処理装置は、前記領域画素データ積算部が、1画素よりも大きい間隔で、前記演算領域を前記処理対象画像に対して相対的に移動させるものを含む。   The image processing apparatus of the present invention includes an apparatus in which the region pixel data integration unit moves the calculation region relative to the processing target image at an interval larger than one pixel.

本発明の画像処理装置は、前記領域画素データ積算部が、前記シフト位置に対応する格納アドレスを持ったテーブルを有し、そのアドレス位置に、そのシフト位置における領域積算データを記憶するものを含む。   In the image processing apparatus of the present invention, the area pixel data accumulation unit includes a table having a storage address corresponding to the shift position, and stores area accumulation data at the shift position at the address position. .

本発明の画像処理装置は、前記領域画素データ積算部が、前記演算領域の画素の輝度値を加算した結果から予め与えた一定値を減算した値を前記領域積算データとするものを含む。   In the image processing apparatus of the present invention, the region pixel data integration unit includes, as the region integration data, a value obtained by subtracting a predetermined value from a result of adding the luminance values of the pixels in the calculation region.

本発明の画像処理装置は、前記領域画素データ積算部が、前記処理対象画像における前記演算領域の繋がっている領域毎に平均輝度値を算出し、算出した各領域の平均輝度値を全て加算した値を領域積算データとするものを含む。   In the image processing apparatus of the present invention, the region pixel data integration unit calculates an average luminance value for each region connected to the calculation region in the processing target image, and adds all the calculated average luminance values of each region. Including those whose values are area integration data.

本発明の画像処理装置は、前記シフト量算出部が、前記領域画素データ積算部で算出した領域積算データの最大値又は最小値が複数ある場合、最大値又は最小値に対応する複数のシフト量の平均値をシフト量とするものを含む。   In the image processing apparatus of the present invention, when the shift amount calculation unit has a plurality of maximum values or minimum values of the region integration data calculated by the region pixel data integration unit, a plurality of shift amounts corresponding to the maximum value or the minimum value Including an average value of the shift amount.

本発明の画像処理装置は、前記シフト量算出部が、1画素よりも大きい間隔で前記演算領域を前記処理対象画像に対して相対的に移動させたときのシフト量の最大値又は最小値を前記領域画素データ積算部に出力するものを含む。   In the image processing apparatus of the present invention, the shift amount calculation unit calculates a maximum value or a minimum value of the shift amount when the calculation area is moved relative to the processing target image at an interval larger than one pixel. What is output to the region pixel data integration unit is included.

本発明の画像処理装置は、前記領域画素データ積算部が、前記シフト量算出部から入力されるシフト量の最大値又は最小値に対応する移動位置近傍で、より狭い範囲でかつより小さい間隔で前記演算領域を前記処理対象画像に対して相対的に移動させた場合の前記領域積算データを再度算出するものを含む。本発明によれば、少ない演算量で高速に位置合わせを行うことができる。   In the image processing apparatus according to the present invention, the region pixel data integration unit has a narrower range and smaller intervals near the movement position corresponding to the maximum value or the minimum value of the shift amount input from the shift amount calculation unit. Including calculating again the area integration data when the calculation area is moved relative to the processing target image. According to the present invention, alignment can be performed at high speed with a small amount of calculation.

本発明の画像処理装置は、前記領域画素データ積算部が、前記領域積算データを再度算出する場合、既算出の移動位置における前記領域積算データの算出を省略するものを含む。   The image processing apparatus of the present invention includes an apparatus that omits the calculation of the region integration data at the already calculated movement position when the region pixel data integration unit calculates the region integration data again.

本発明の画像処理装置は、前記領域画素データ積算部で算出した前記領域積算データに基づいて、前記処理対象画像の位置合わせの可否を判定する判断部をさらに備えるものを含む。本発明によれば、位置合わせ処理に対し誤動作を起こす可能性があるフィルタ画像が入力された場合、位置合わせを行わないようにすることができる。   The image processing apparatus of the present invention includes an image processing apparatus that further includes a determination unit that determines whether or not the processing target image can be aligned based on the region integration data calculated by the region pixel data integration unit. According to the present invention, when a filter image that may cause a malfunction in the alignment process is input, it is possible to prevent alignment.

本発明の画像処理装置は、前記判断部が、前記領域画素データ積算部で算出した前記領域積算データの中で最大値と最小値を求め、求めた最大値と最小値との比に基づいて前記処理対象画像の位置合わせの可否を判定するものを含む。   In the image processing apparatus of the present invention, the determination unit obtains a maximum value and a minimum value among the region integration data calculated by the region pixel data integration unit, and based on a ratio between the obtained maximum value and minimum value. Including determining whether the processing target image can be aligned.

本発明の画像処理装置は、前記判断部が、前記領域画素データ積算部で算出した前記領域積算データの中で最大値又は最小値を求め、求めた最大値又は最小値に対して所定の割合の値を持つシフト位置を抽出し、抽出したシフト位置の分布に基づいて前記処理対象画像の位置合わせの可否を判定するものを含む。   In the image processing apparatus of the present invention, the determination unit obtains a maximum value or a minimum value among the region integration data calculated by the region pixel data integration unit, and a predetermined ratio with respect to the calculated maximum value or minimum value. And determining whether or not the processing target image can be aligned based on the extracted distribution of shift positions.

本発明の画像処理装置は、前記判断部が、前記抽出したシフト位置の存在範囲の大きさに基づいて前記処理対象画像の位置合わせの可否を判定するものを含む。   The image processing apparatus according to the aspect of the invention includes an apparatus in which the determination unit determines whether or not the processing target image can be aligned based on the size of the extracted range of the shift position.

本発明の画像処理装置は、前記判断部が、前記抽出したシフト位置の存在範囲の縦幅又は横幅の少なくとも一方の大きさに基づいて前記処理対象画像の位置合わせの可否を判定するものを含む。   The image processing apparatus according to the aspect of the invention includes the determination unit that determines whether or not the processing target image is aligned based on at least one of a vertical width and a horizontal width of the extracted range of the shift position. .

本発明の画像処理装置は、前記判断部が、前記抽出したシフト位置の存在範囲の縦幅と横幅の和に基づいて前記処理対象画像の位置合わせの可否を判定するものを含む。   The image processing apparatus according to the aspect of the invention includes an apparatus in which the determination unit determines whether the alignment of the processing target image is possible based on a sum of a vertical width and a horizontal width of the extracted shift position existence range.

本発明の画像処理装置は、前記判断部が、前記抽出したシフト位置の存在範囲の縦幅と横幅の積に基づいて前記処理対象画像の位置合わせの可否を判定するものを含む。   The image processing apparatus according to the aspect of the invention includes an apparatus in which the determination unit determines whether the alignment of the processing target image is possible based on a product of a vertical width and a horizontal width of the extracted range of the shift position.

本発明の画像処理装置は、前記判断部が、前記抽出したシフト位置の存在範囲の縦幅と横幅の差に基づいて前記処理対象画像の位置合わせの可否を判定するものを含む。   The image processing apparatus according to the aspect of the invention includes an apparatus in which the determination unit determines whether the alignment of the processing target image is possible based on a difference between a vertical width and a horizontal width of the extracted shift position existence range.

本発明の画像処理装置は、前記判断部が、前記抽出したシフト位置の存在範囲の縦幅と横幅の比に基づいて前記処理対象画像の位置合わせの可否を判定するものを含む。   The image processing apparatus according to the aspect of the invention includes an apparatus in which the determination unit determines whether or not the processing target image can be aligned based on a ratio between a vertical width and a horizontal width of the extracted range of the shift position.

本発明の画像処理装置は、前記位置合わせを行うべき画像が、通過帯域の異なる複数のフィルタを切り換えて撮影された撮影画像であり、前記判断部が、位置合わせ不可と判定した場合、同じフィルタを用い、撮影位置を変えて撮影した画像に変更して位置合わせ処理を繰り返すものを含む。   In the image processing apparatus of the present invention, when the image to be aligned is a captured image captured by switching a plurality of filters having different pass bands, and the determination unit determines that alignment is not possible, the same filter , And changing the photographing position to a photographed image and repeating the alignment process.

本発明の画像処理装置は、前記領域画素データ積算部が、第2の移動範囲において前記演算領域を前記処理対象画像に対して相対的に移動させた複数のシフト位置で、前記領域積算データを算出するものであり、前記シフト量算出部が、前記第2の移動範囲における前記領域積算データの最大値又は最小値を求め、求めた最大値又は最小値に対応するシフト位置が、前記第2の移動範囲より小さい第1の移動範囲内にある場合は、前記最大値又は最小値に対応するシフト位置を示すシフト量を前記シフト量として出力し、前記第1の移動範囲外にある場合は、前記シフト量を0として出力するものを含む。本発明によれば、第1の移動範囲よりも大きくシフトしている画像に対して、誤った位置合わせを行なわないようにすることができる。   In the image processing device of the present invention, the region pixel data integration unit outputs the region integration data at a plurality of shift positions where the calculation region is moved relative to the processing target image in a second movement range. The shift amount calculation unit calculates a maximum value or a minimum value of the region integration data in the second movement range, and a shift position corresponding to the calculated maximum value or minimum value is the second value. If it is within the first movement range smaller than the movement range, the shift amount indicating the shift position corresponding to the maximum value or the minimum value is output as the shift amount, and if it is outside the first movement range , And those that output the shift amount as zero. According to the present invention, it is possible to prevent erroneous alignment with respect to an image that is shifted more than the first movement range.

本発明の画像処理装置は、前記領域画素データ積算部が、前記第2の移動範囲における前記領域積算データの最大値又は最小値に対応するシフト位置が前記第2の移動範囲の最大シフト位置である場合、前記第2の移動範囲を一定量拡大するものを含む。   In the image processing device according to the aspect of the invention, the region pixel data integration unit may determine that the shift position corresponding to the maximum value or the minimum value of the region integration data in the second movement range is the maximum shift position of the second movement range. In some cases, the second moving range is expanded by a certain amount.

本発明の画像処理装置は、前記領域画素データ積算部が、前記第2の移動範囲における前記領域積算データの最大値又は最小値に対応するシフト位置が前記第2の移動範囲の最大シフト位置である場合、そのシフト位置に対応するシフト量の方向にのみ前記第2の移動範囲を一定量拡大するものを含む。   In the image processing device according to the aspect of the invention, the region pixel data integration unit may determine that the shift position corresponding to the maximum value or the minimum value of the region integration data in the second movement range is the maximum shift position of the second movement range. In some cases, the second movement range is expanded by a certain amount only in the direction of the shift amount corresponding to the shift position.

本発明の画像処理装置は、前記位置合わせを行うべき画像が、通過帯域の異なる複数のフィルタを切り換えて撮影された撮影画像であり、前記領域画素データ積算部において求めた前記第2の移動範囲における前記領域積算データの最大値又は最小値に対応するシフト位置が前記第1の移動範囲外にある場合、同じフィルタを用い、撮影位置を変えて撮影した画像に変更して位置合わせ処理を繰り返すものを含む。   In the image processing apparatus of the present invention, the image to be aligned is a captured image obtained by switching a plurality of filters having different passbands, and the second moving range obtained by the region pixel data integrating unit When the shift position corresponding to the maximum value or the minimum value of the area integration data at is outside the first movement range, the same filter is used to change the shooting position to the shot image and repeat the alignment process. Including things.

本発明の画像処理装置は、前記シフト量算出部が、前記第2の移動範囲における前記領域積算データの最大値又は最小値に対応するシフト位置が前記第1の移動範囲外にある場合で、かつ前記第2の移動範囲の最大シフト位置でない場合は、そのシフト位置を示すシフト量を前記シフト量として出力するものを含む。   In the image processing device of the present invention, the shift amount calculation unit may be configured such that a shift position corresponding to the maximum value or the minimum value of the region integration data in the second movement range is outside the first movement range. When the shift position is not the maximum shift position of the second movement range, the shift amount indicating the shift position is output as the shift amount.

本発明の画像処理装置は、前記位置合わせを行うべき画像が、通過帯域の異なる複数のフィルタを切り換えて撮影された撮影画像であるものを含む。本発明によれば、位置合わせ対象画像が様々な発光特性を持った対象物を通過帯域の異なる複数のフィルタを切り替えて撮影した画像であっても、確実に位置合わせを行うことができる。   In the image processing apparatus of the present invention, the image to be aligned includes an image captured by switching a plurality of filters having different pass bands. According to the present invention, even if the alignment target image is an image obtained by photographing an object having various light emission characteristics by switching a plurality of filters having different pass bands, alignment can be reliably performed.

本発明の画像処理装置は、前記位置合わせを行うべき画像が、複数の異なる撮影位置において同一のフィルタを用いて撮影した画像を含み、前記領域画素データ積算部が、複数枚の画像の前記領域積算データを記憶しておく機能を有し、前記領域画素データ積算部では、それぞれのフィルタ画像に対して前記演算領域を相対的にずらし、ずらした各位置における領域積算データを求め、各フィルタ画像の領域積算データを記憶しておき、前記シフト量算出部が、同一のフィルタを用いて撮影した画像毎に記憶している前記領域積算データの中でそれぞれ最大値と最小値を求め、求めた最大値と最小値との比に基づいて特定の画像を選択し、その画像の前記シフト量を算出するものを含む。本発明によれば、最も精度良く位置合せを行うことができるフィルタ画像を用いて位置合わせ処理を行うことになり、さらに精度良く位置合わせをおこなうことができる。   In the image processing apparatus of the present invention, the image to be aligned includes an image photographed using the same filter at a plurality of different photographing positions, and the region pixel data integrating unit includes the region of the plurality of images. The region pixel data integration unit has a function of storing integration data, the region pixel data integration unit relatively shifts the calculation region with respect to each filter image, obtains region integration data at each shifted position, and each filter image The area integration data is stored, and the shift amount calculation unit obtains a maximum value and a minimum value from the area integration data stored for each image captured using the same filter. This includes selecting a specific image based on the ratio between the maximum value and the minimum value and calculating the shift amount of the image. According to the present invention, alignment processing is performed using a filter image that can perform alignment with the highest accuracy, and alignment can be performed with higher accuracy.

本発明によれば、位置合わせの基準となる対象物の発光特性、その対象物の撮影条件にかかわらず、複数の撮影画像の位置合わせを精度良く行うことができる。   According to the present invention, it is possible to perform alignment of a plurality of captured images with high accuracy regardless of the light emission characteristics of an object serving as a reference for alignment and the imaging conditions of the object.

以下、本発明の実施の形態について、図面を用いて説明する。ここでは、特定の複数の波長帯域の光を透過させるバンドパスフィルタを用いて発光波長の異なる蛍光物質の測定を行う蛍光顕微鏡における、各バンドパスフィルタを用いて撮影された画像の位置合わせを行う場合を例として説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. Here, in a fluorescence microscope that measures fluorescent substances having different emission wavelengths using a band-pass filter that transmits light in a plurality of specific wavelength bands, an image captured using each band-pass filter is aligned. A case will be described as an example.

(第1の実施の形態)
図1は、本発明の第1の実施の形態の画像処理装置の要部概略構成を示すブロック図である。図1の画像処理装置は、演算領域設定部102と、領域画素データ積算部103と、シフト量算出部104と、位置補正部105を含んで構成される。これらの各要素は、所定のプログラムをインストールしたコンピュータを用いて実現することができる。
(First embodiment)
FIG. 1 is a block diagram showing a schematic configuration of a main part of the image processing apparatus according to the first embodiment of the present invention. The image processing apparatus in FIG. 1 includes a calculation region setting unit 102, a region pixel data integration unit 103, a shift amount calculation unit 104, and a position correction unit 105. Each of these elements can be realized using a computer in which a predetermined program is installed.

画像処理装置に入力されるフィルタ画像101は、発光波長の異なる蛍光物質を、バンドパスフィルタを通してCCDエリアセンサで撮影し、デジタル化した画像データである。ここでは、励起光により様々な色を発光する蛍光物質を直径10μmの球状のマイクロビーズ(以下ビーズとする。)とし、フィルタ画像101内にビーズが1個あるいは複数個存在しているものとする。また、フィルタ画像101は、256階調でデジタル化され、輝度が高いほど各画素の値が大きくなるものとする。図2は、フィルタ画像101の一例を示したものである。図2に示すように様々な色を発光しているビーズの輝度値は大きく(明るい)、背景の輝度値は小さく(暗い)なる。また、撮影に用いたバンドパスフィルタが通す波長の光を多く発光しているビーズほど輝度値が大きくなる。   The filter image 101 input to the image processing apparatus is image data obtained by photographing fluorescent materials having different emission wavelengths with a CCD area sensor through a band-pass filter. Here, it is assumed that a fluorescent substance that emits various colors by excitation light is a spherical microbead (hereinafter referred to as a bead) having a diameter of 10 μm, and one or a plurality of beads are present in the filter image 101. . The filter image 101 is digitized with 256 gradations, and the value of each pixel increases as the luminance increases. FIG. 2 shows an example of the filter image 101. As shown in FIG. 2, the luminance value of beads emitting various colors is large (bright), and the luminance value of the background is small (dark). Also, the brightness value of the beads emitting more light of the wavelength that the band pass filter used for photographing passes is larger.

演算領域設定部102は、領域設定データ記憶部1021と演算領域算出部1022を含んで構成され、フィルタ画像101に対して位置合わせの演算を行う特定領域(以下、演算領域と称す)を設定し、該演算領域を領域画素データ積算部103に出力する。演算領域は、処理対象画像であるフィルタ画像101における位置合わせの基準となる対象物であるビーズの領域である。   The calculation area setting unit 102 includes an area setting data storage unit 1021 and a calculation area calculation unit 1022, and sets a specific area (hereinafter referred to as a calculation area) for performing alignment calculation on the filter image 101. The calculation area is output to the area pixel data integration unit 103. The calculation area is a bead area that is an object serving as a reference for alignment in the filter image 101 that is an image to be processed.

領域設定データ記憶部1021は、フィルタ画像中に存在するビーズの形状及び位置情報を示す領域設定データを予め記憶するものであり、記憶された領域設定データは演算領域算出部1022に出力される。演算領域算出部1022は、領域設定データに基づいて演算領域を算出し、領域画素データ積算部103に出力する。   The area setting data storage unit 1021 stores area setting data indicating the shape and position information of beads existing in the filter image in advance, and the stored area setting data is output to the calculation area calculation unit 1022. The calculation area calculation unit 1022 calculates a calculation area based on the area setting data and outputs the calculation area to the area pixel data integration unit 103.

領域画素データ積算部103は、フィルタ画像101と演算領域算出部1022が出力する演算領域を用いて、フィルタ画像101の演算領域における画素の輝度値の積算処理を行う。輝度値の積算処理は、フィルタ画像101に対して演算領域を相対的にずらして複数回行い、ずらした各位置(以下、シフト位置と称す)における輝度値の積算値(以下、領域積算データと称す)は、シフト量算出部104に出力される。   The area pixel data integration unit 103 performs the process of integrating the luminance values of pixels in the calculation area of the filter image 101 using the calculation areas output from the filter image 101 and the calculation area calculation unit 1022. The luminance value integration process is performed a plurality of times with the operation area relatively shifted with respect to the filter image 101, and the integrated value of luminance values (hereinafter referred to as area integration data) at each shifted position (hereinafter referred to as a shift position). Is output to the shift amount calculation unit 104.

シフト量算出部104は、領域画素データ積算部103から出力された各シフト位置における領域積算データの中で最大値を求め、最大値に対応するシフト位置を示すシフト量を位置補正部105に出力する。この例では、処理対象画像が発光ビーズを位置合わせの基準となる対象物であるので、領域積算データの中で最大値を求めたが、処理対象画像の種類及び基準となる対象物の種類によっては、最小値を求める場合もある。例えば、処理対象画像において、基準となる対象物の領域の輝度値が小さく(暗く)、背景領域の輝度値が大きい(明るい)場合である。   The shift amount calculation unit 104 obtains the maximum value among the region integration data at each shift position output from the region pixel data integration unit 103, and outputs the shift amount indicating the shift position corresponding to the maximum value to the position correction unit 105. To do. In this example, since the processing target image is an object that serves as a reference for aligning the light-emitting beads, the maximum value is obtained in the area integration data, but depending on the type of processing target image and the type of the target object. May find the minimum value. For example, in the processing target image, the luminance value of the reference object area is small (dark) and the luminance value of the background area is large (bright).

位置補正部105は、シフト量算出部104から出力されたシフト量に応じて、フィルタ画像101全体をシフトさせた補正画像を出力画像106として出力する。この出力画像106は、撮影対象の位置が一定の位置にシフトされた画像であるので、複数の入力画像に対応する出力画像をそのまま重ね合わせることにより、位置ずれのない重ね合わせ画像を得ることができる。   The position correction unit 105 outputs, as an output image 106, a corrected image obtained by shifting the entire filter image 101 in accordance with the shift amount output from the shift amount calculation unit 104. Since the output image 106 is an image in which the position of the photographing target is shifted to a certain position, it is possible to obtain a superimposed image without positional deviation by directly superimposing output images corresponding to a plurality of input images. it can.

次に、以上のように構成された本発明の第1の実施の形態の画像処理装置の動作について図3から図11を用いて詳細に説明する。   Next, the operation of the image processing apparatus according to the first embodiment of the present invention configured as described above will be described in detail with reference to FIGS.

図3は、本発明の第1の実施の形態の画像処理装置が行う画像処理を説明するためのフローチャートである。図3のフローチャートはステップS101ないしステップS106からなり、ステップS101は演算領域設定工程を、ステップS102ないしステップS104からなるステップS1020は領域画素データ積算工程を、ステップS105はシフト量算出工程を、ステップS106は位置補正工程を、それぞれ示す。   FIG. 3 is a flowchart for explaining image processing performed by the image processing apparatus according to the first embodiment of the present invention. The flowchart in FIG. 3 includes steps S101 to S106. Step S101 includes a calculation region setting step, step S1020 including steps S102 to S104 is a region pixel data integration step, step S105 is a shift amount calculation step, and step S106. Indicates a position correction step.

(ステップS101)
まず、演算領域算出部1022にて、入力されたフィルタ画像101に対して位置合わせの演算を行う演算領域を、領域設定データ記憶部1021に記憶されている情報を基に算出する。演算領域とは、位置合わせの基準となる対象物が撮影されている領域であり、ここではビーズが撮影されている位置である。
(Step S101)
First, the calculation area calculation unit 1022 calculates a calculation area for performing alignment calculation on the input filter image 101 based on information stored in the area setting data storage unit 1021. The calculation area is an area where an object serving as a reference for alignment is imaged, and here is a position where a bead is imaged.

領域設定データ記憶部1021には、ビーズの形状情報と位置情報が予め記憶されている。ビーズの形状情報は、画像中にビーズのみが存在する2値のデジタル画像データ(以下、パターン画像と称す)であり、ビーズ領域を1、その他の領域を0とする。パターン画像のサイズは、ビーズ全体が収まる大きさを確保すればよく、ビーズの直径が10画素の場合は、縦横ともに10画素の画像メモリを用意する。ビーズの位置情報は、フィルタ画像中のビーズ位置とパターン画像が一致した際のパターン画像の中心位置に対応するフィルタ画像上の座標とし、フィルタ画像中のビーズ個数分のX,Y座標を記憶しておくメモリを用意し、各ビーズの座標を記憶しておく。 The area setting data storage unit 1021 stores bead shape information and position information in advance. The bead shape information is binary digital image data (hereinafter referred to as a pattern image) in which only the beads exist in the image. The bead area is 1 and the other areas are 0. The size of the pattern image may be ensured so that the entire bead can be accommodated. When the bead diameter is 10 pixels, an image memory having 10 pixels in both vertical and horizontal directions is prepared. The position information of the beads is the coordinates on the filter image corresponding to the center position of the pattern image when the bead position in the filter image matches the pattern image, and the X and Y coordinates for the number of beads in the filter image are stored. A memory is prepared to store the coordinates of each bead.

演算領域算出部1022は、フィルタ画像101と同サイズの0で初期化された2値のデジタル画像データ(以下、演算領域画像と称す)を用意しておき、領域設定データ記憶部1021に記憶されている座標位置にパターン画像を重ね合わせ、重ね合った各画素において論理和演算を行い、演算結果を演算領域画像に書き込む処理を繰り返す。   The calculation area calculation unit 1022 prepares binary digital image data initialized to 0 of the same size as the filter image 101 (hereinafter referred to as calculation area image), and is stored in the area setting data storage unit 1021. The pattern image is overlaid at the coordinate position, and the logical sum operation is performed on each of the overlapped pixels, and the process of writing the operation result in the operation area image is repeated.

図4は、図2に示すフィルタ画像における演算領域である。演算領域を参照する際には、演算領域画像中の画素値が1となっている領域を調べればよい。こうして作成された演算領域画像を演算領域として設定し、領域画素データ積算部103に出力する。   FIG. 4 is a calculation area in the filter image shown in FIG. When referring to the calculation area, an area where the pixel value in the calculation area image is 1 may be examined. The calculation area image created in this way is set as a calculation area and output to the area pixel data integration unit 103.

なお、ここでは球状のビーズを用いた例を示したが、パターン画像を対象物の形状に合わせて作成することにより、円形に限らず複雑な形状の対象物や、大きさの異なる対象物に対しても演算領域を設定することが可能である。また、対象物が回転しているものに対しても、形状情報及び位置情報に加え、回転角度情報を記憶しておき、演算領域画像を作成する際に、パターン画像を回転して配置すればよい。さらに、演算領域画像を予め作成して領域設定データ記憶部1021に記憶させておき、演算領域算出部1022では、記憶されている演算領域画像をそのまま領域画素データ積算部103に出力してもよい。   In addition, although the example using a spherical bead was shown here, by creating a pattern image according to the shape of the target object, it is not limited to a circular shape, and an object having a complicated shape or a target having a different size is used. In contrast, it is possible to set a calculation area. In addition, the rotation angle information is stored in addition to the shape information and the position information even when the object is rotating, and the pattern image is rotated and arranged when creating the calculation area image. Good. Furthermore, a calculation region image may be created in advance and stored in the region setting data storage unit 1021, and the calculation region calculation unit 1022 may output the stored calculation region image to the region pixel data integration unit 103 as it is. .

(ステップS102)
次に、領域画素データ積算部103において、予め与えられている移動範囲(以下、第1の移動範囲と称す)で、フィルタ画像101に対して演算領域算出部1022から出力された演算領域を相対的に1画素ずつずらすシフト処理を行う。なお、最初は、基準位置(シフト量は0)である。また、第1の移動範囲内でシフトする順序は任意であるが、ここでは基準位置から螺旋上にシフトした位置とする。
(Step S102)
Next, in the region pixel data integration unit 103, the calculation region output from the calculation region calculation unit 1022 is relative to the filter image 101 within a predetermined movement range (hereinafter referred to as a first movement range). Thus, a shift process for shifting one pixel at a time is performed. The initial position is the reference position (shift amount is 0). Further, the order of shifting within the first movement range is arbitrary, but here it is assumed that the position is shifted spirally from the reference position.

第1の移動範囲は、フィルタ画像の位置合わせを行う際に取りうると考えられる最大シフト量を含むような範囲を設定すればよく、フィルタ画像に対して演算領域画像をそのまま重ね合わせた位置を基準位置とし、基準位置から最大シフト量を上下左右に取った範囲と設定する。ここでは、最大シフト量を10とし、基準位置から上下左右にそれぞれ10画素の広がりを持つ正方形の範囲が第1の移動範囲として設定されているものとする。これにより、基準位置からのずれが10画素以内のフィルタ画像ならば位置合わせが可能となる。またシフト位置は、画像の横軸をX軸、縦軸をY軸で表し各々右方向及び下方向に行くほど値が大きくなるものとし、基準位置を(0,0)とする。したがって、シフトさせる正方形の範囲の四隅は、それぞれ左上位置が(−10,−10)、右上位置が(10,−10)、左下位置が(−10,10)、右下位置が(10,10)となる。   The first movement range may be set to a range including the maximum shift amount that can be taken when the filter images are aligned, and the position where the calculation region image is directly superimposed on the filter image is set. The reference position is set to a range in which the maximum shift amount is taken up, down, left and right from the reference position. Here, it is assumed that the maximum shift amount is 10, and a square range having a spread of 10 pixels vertically and horizontally from the reference position is set as the first movement range. As a result, if the deviation from the reference position is within 10 pixels, alignment is possible. The shift position is represented by the X axis on the horizontal axis and the Y axis on the vertical axis, and the value increases in the right and downward directions, and the reference position is (0, 0). Therefore, the four corners of the square range to be shifted are respectively (-10, -10) for the upper left position, (10, -10) for the upper right position, (-10, 10) for the lower left position, and (10, 10) for the lower right position. 10).

(ステップS103)
次に、引き続き領域画素データ積算部103において、フィルタ画像101と基準位置の演算領域画像(シフト量0)又はシフトされた演算領域画像を重ね合わせ、演算領域と重なるフィルタ画像101の画素の輝度値を全て足し合わせた領域積算データを算出する。
(Step S103)
Next, in the region pixel data integration unit 103, the filter image 101 and the calculation region image at the reference position (shift amount 0) or the shifted calculation region image are superimposed, and the luminance value of the pixel of the filter image 101 that overlaps the calculation region The area integration data is calculated by adding all of the above.

この場合、演算領域が演算領域画像の周辺付近に存在するとフィルタ画像とシフトされた演算領域を重ね合わせたとき、演算領域がフィルタ画像からはみ出ることがある。これを図示したものが図5である。図5に示すように、フィルタ画像からはみ出した演算領域においては、輝度値が存在しないため輝度値を積算することができず、シフト位置によって積算される画素総数が異なってしまうことになる。このような状態を避けるためには、演算領域のシフトによりフィルタ画像の外にはみ出ることがない範囲に存在する演算領域においてのみ、輝度値の積算を行えばよい。はみ出さない範囲の演算領域は、演算領域画像のふちから最大シフト量内側に狭めた領域に存在するか否かによって判断可能である。   In this case, if the calculation area exists near the periphery of the calculation area image, the calculation area may protrude from the filter image when the filter image and the shifted calculation area are overlapped. This is illustrated in FIG. As shown in FIG. 5, in the calculation region that protrudes from the filter image, the luminance value cannot be integrated because there is no luminance value, and the total number of pixels to be integrated differs depending on the shift position. In order to avoid such a state, the luminance values may be integrated only in the calculation area that exists in a range that does not protrude from the filter image due to the shift of the calculation area. It is possible to determine whether or not the calculation area in the range that does not protrude exists in the area narrowed to the inner side of the maximum shift amount from the edge of the calculation area image.

また、ステップS101において演算領域を設定する際に、シフト処理によりはみ出さない範囲の外側にある演算領域を除いて演算領域画像を生成することによっても、このような状態を避けることができる。具体的には、演算領域画像において範囲外にある演算領域を示す画素値の1を0に変更すればよい。演算領域を設定する範囲は、最大シフト量以上に内側に狭めた範囲としてもよい。このような範囲とすると、レンズ特性などの理由で処理対象画像の周辺が歪み、位置合わせを行う際に最適でない場合に、これら最適でない領域に存在するビーズ等の基準対象物を演算から除くことができ、より精度の高い位置合わせを行うことができる。この際の範囲は、画像の中心から一定の距離をもつ範囲とすればよい。   In addition, when the calculation area is set in step S101, such a state can be avoided by generating the calculation area image except for the calculation area outside the range that does not protrude by the shift process. Specifically, the pixel value 1 indicating the calculation area outside the range in the calculation area image may be changed to 0. The range in which the calculation area is set may be a range narrowed to the inside more than the maximum shift amount. In such a range, if the periphery of the image to be processed is distorted due to lens characteristics or other reasons and is not optimal when performing alignment, the reference objects such as beads existing in these non-optimal areas are excluded from the calculation. And more accurate alignment can be performed. The range at this time may be a range having a certain distance from the center of the image.

(ステップS104)
これらステップS102、ステップS103の工程を第1の移動範囲の各シフト位置で繰り返し、第1の移動範囲の各シフト位置の領域積算データを逐次算出し、算出した領域積算データをシフト量算出部104に出力する。
(Step S104)
The steps S102 and S103 are repeated at each shift position of the first movement range, the area integration data at each shift position of the first movement range is sequentially calculated, and the calculated area integration data is used as the shift amount calculation unit 104. Output to.

この際、各シフト位置の領域積算データを記憶するメモリは、ずらしたシフト量に対応する格納アドレスをもったテーブルとし、そのアドレス位置にずらした各シフト位置における領域積算データを記憶するようにする。こうすることにより、テーブルに格納された領域積算データがどのシフト位置で算出された値なのかを知りたい場合、アドレスを参照することで求めることが可能である。   At this time, the memory for storing the area integration data at each shift position is a table having a storage address corresponding to the shifted shift amount, and the area integration data at each shift position shifted to that address position is stored. . In this way, when it is desired to know at which shift position the area integration data stored in the table is calculated, it can be obtained by referring to the address.

以下、ステップS102において最大シフト量を10とし、第1の移動範囲を全シフト範囲とした場合について、具体的な記憶動作の説明を行う。最大シフト量を10とした場合とした場合、算出される領域積算データの個数は(10+1+10)×(10+1+10)で441個となり格納するテーブルのアドレスを0〜440まで準備する。そして、シフト位置(x1,y1)とした際の、格納アドレスAd1は、Ad1=(y1+10)×21+(x1+10)で求めることができる。また、格納アドレスAd2に格納されている領域積算データのシフト位置(x2,y2)を求める際には、x2は、Ad2を(10+1+10)で割った余りから10を引いた値を、y2は、Ad2を(10+1+10)で割った商の整数値から10を引いた値を、それぞれ用いればよい。   Hereinafter, a specific storage operation will be described for the case where the maximum shift amount is 10 and the first movement range is the entire shift range in step S102. Assuming that the maximum shift amount is 10, the number of area integration data to be calculated is (10 + 1 + 10) × (10 + 1 + 10), which is 441, and the address of the table to be stored is prepared from 0 to 440. The storage address Ad1 when the shift position is (x1, y1) can be obtained by Ad1 = (y1 + 10) × 21 + (x1 + 10). Further, when obtaining the shift position (x2, y2) of the area integration data stored in the storage address Ad2, x2 is a value obtained by subtracting 10 from the remainder obtained by dividing Ad2 by (10 + 1 + 10), and y2 is: A value obtained by subtracting 10 from the integer value of the quotient obtained by dividing Ad2 by (10 + 1 + 10) may be used.

(ステップS105)
次に、シフト量算出部104では、領域画素データ積算部103から出力された各シフト位置の領域積算データの中で最大値を求め、最大値に対応するシフト位置を示すシフト量(この例ではシフト位置が基準位置からの移動量を示すので、シフト位置とシフト量が一致する。)を、位置合わせのシフト量として位置補正部105に出力する。
(Step S105)
Next, the shift amount calculation unit 104 obtains the maximum value among the region integration data of each shift position output from the region pixel data integration unit 103, and indicates the shift amount indicating the shift position corresponding to the maximum value (in this example, Since the shift position indicates the amount of movement from the reference position, the shift position matches the shift amount.) Is output to the position correction unit 105 as a shift amount for alignment.

以下、この処理の原理を説明する。図2に示したようにビーズは発光しているためフィルタ画像中のビーズ領域は背景領域に比べ輝度値が高くなっている。したがって、ビーズ領域を演算領域とし、フィルタ画像における演算領域において輝度値を積算していくと、ビーズ領域を多く含んだ領域で積算した方が積算値は大きくなる。図6は、図2に示すフィルタ画像において、ビーズB及びビーズDを含むX軸と平行な線上の画素の輝度値を示したものである。図6より、演算領域がフィルタ画像内のビーズ領域に最もよく重なり合った際、積算値が最も大きくなり、重なりが少なくなるほど輝度値の小さい背景部分が混入するため積算値が小さくなる、ということが分かる。このことにより、各シフト位置の領域積算データの中で最大値を求め、最大値に対応するシフト位置を求めることで、最適な位置合わせのシフト量を得ることができる。   Hereinafter, the principle of this process will be described. As shown in FIG. 2, since the beads emit light, the bead area in the filter image has a higher luminance value than the background area. Therefore, when the bead area is set as the calculation area and the luminance values are integrated in the calculation area in the filter image, the integrated value becomes larger when the luminance value is integrated in the area including many bead areas. FIG. 6 shows luminance values of pixels on a line parallel to the X axis including the beads B and D in the filter image shown in FIG. From FIG. 6, it can be said that when the calculation area best overlaps the bead area in the filter image, the integrated value becomes the largest, and the smaller the overlap, the smaller the luminance value is mixed and the smaller the integrated value becomes. I understand. As a result, it is possible to obtain an optimum alignment shift amount by obtaining the maximum value in the area integration data of each shift position and obtaining the shift position corresponding to the maximum value.

また、バントパスフィルタを変えて撮影したフィルタ画像においても、ビーズ領域の輝度値は背景領域の輝度値より高いので、領域積算データの最大値に対応するシフト位置を求めることで、フィルタ画像毎のパラメータ調節を行うことなく位置合わせのシフト量を得ることができる。   Also, even in a filter image taken by changing the bandpass filter, the luminance value of the bead region is higher than the luminance value of the background region, so by obtaining the shift position corresponding to the maximum value of the region integration data, An alignment shift amount can be obtained without adjusting parameters.

さらに、対象物が様々な発光特性を持っていた場合においても、同様にシフト量を得ることが可能である。このとき、撮影に用いたバントパスフィルタを通す波長を持たないビーズがフィルタ画像内に存在することがあるが、このようなビーズが発光していない演算領域においては、各シフト位置の輝度値の積算値はすべて背景領域の輝度値を積算したものになるため、ビーズが発光していない演算領域における各シフト位置の積算値は同値となり、他の発光しているビーズの演算領域の積算値に影響を与えないので、ビーズの有無を調べる判断処理を別途用意する必要がなく、有効なビーズのみ用いた位置合わせを行うことができる。   Furthermore, even when the object has various light emission characteristics, it is possible to obtain the shift amount in the same manner. At this time, beads that do not have a wavelength that passes through the band pass filter used for imaging may be present in the filter image. However, in the calculation area where such beads do not emit light, the luminance value of each shift position is Since all integrated values are obtained by integrating the luminance values of the background area, the integrated values of the shift positions in the calculation area where the beads are not emitting light are the same, and the integrated values of the calculation areas of other emitting beads are the same. Since there is no influence, it is not necessary to prepare a separate determination process for checking the presence of beads, and alignment using only effective beads can be performed.

また、ビーズ周辺の局所的な演算領域で積算を行っているので、光源の配置位置により光が強く当たる箇所と弱く当たる箇所ができ、撮影されたフィルタ画像において輝度むらが発生し、光が強く当たっている背景領域の輝度値のほうが、光が弱く当たっているビーズの輝度値よりも高くなってしまう、また同じ背景領域でもバントパスフィルタ毎に輝度むらの程度が変化する、ということが起きた場合においても、ビーズ周辺を局所的にみれば必ずビーズ領域が背景領域に比べ輝度値が大きくなっているため輝度むらの影響を受けず、最適な位置合わせのシフト量を得ることができる。   In addition, since integration is performed in the local calculation area around the bead, there are places where light hits strongly and places where it hits weakly depending on the position of the light source, luminance unevenness occurs in the captured filter image, and the light is strong The brightness value of the hitting background area will be higher than the brightness value of the bead that is hit by light, and even in the same background area, the degree of brightness unevenness will change for each bunt pass filter. Even in this case, if the periphery of the bead is viewed locally, the bead area always has a luminance value larger than that of the background area, so that it is not affected by the luminance unevenness, and an optimum alignment shift amount can be obtained.

また、演算領域の積算値を用いることで次に示すような利点がある。一般的に人間がフィルタ画像を見ながら位置合わせを行う際には、ビーズと背景の境界がはっきりしない暗いビーズよりも、ずれ具合がよく分かる背景領域と輝度差がある明るいビーズに、より重点をおいて位置合わせを行うことで良い結果が得られるが、コンピュータで演算を行う際にも同様のことが言え、ビーズ領域と背景領域の輝度値の差が大きいほど、位置が一致した場合としていない場合の演算結果の差が大きくでるので、輝度値の差が大きい領域に重み付けをして位置合わせを行った方が概して良い結果が得られる。   Further, using the integrated value of the calculation area has the following advantages. In general, when performing alignment while looking at the filter image, humans should place more emphasis on bright beads with a difference in brightness from the background area where the deviation is well known than dark beads where the boundary between the beads and the background is not clear. However, the same thing can be said when performing calculations with a computer. The larger the difference in the brightness value between the bead area and the background area, the more the position does not match. In this case, the difference in the calculation result is large, and generally better results can be obtained by performing the positioning by weighting the region where the difference in the luminance value is large.

そして、本発明の画像処理においては、位置合わせの評価に用いる領域積算データを算出するにあたり輝度値の大きい画素ほど大きな値が領域積算データに積算されるため、新たな処理を追加することなく、同様に明るいビーズに重み付けがなされた処理を実現している。なお、この重みについては、積算する輝度値に上限を持たし、上限以上の輝度値の場合は、上限の値をその画素の輝度値として積算することで調節が可能であり、上限の値を背景領域の輝度値よりも大きく、かつフィルタ画像の最大輝度値よりも小さい値で設定すればよい。上限の値が小さいほど、暗いビーズ領域の輝度値がより反映された結果となる。   And in the image processing of the present invention, in calculating the region integration data used for the alignment evaluation, a larger value is integrated into the region integration data as the pixel having a larger luminance value, so without adding new processing, Similarly, a process in which bright beads are weighted is realized. This weight has an upper limit on the luminance value to be integrated, and in the case of a luminance value greater than or equal to the upper limit, it can be adjusted by integrating the upper limit value as the luminance value of the pixel. What is necessary is just to set with the value larger than the luminance value of a background area | region, and smaller than the maximum luminance value of a filter image. The smaller the upper limit value, the more the brightness value of the dark bead region is reflected.

なお、演算領域データの中で最大値が複数あった場合は、最大値に対応する複数のシフト位置を平均して求めた位置をシフト量とする。これは、ビーズ領域に対し演算領域が小さいもしくは大きい場合に起こり、演算領域をシフトさせても積算する輝度値が変わらないときに発生する。図7は、ビーズ領域に対し演算領域が大きい場合を示す図である。図7において背景領域の輝度値が均一だった場合、演算領域とビーズ領域間の斜線部分の範囲にビーズ領域が含まれるように演算領域をシフトさせても演算積算データは同値になる。このような場合は、複数の最大値を持つ領域の中心をずらす位置とすればよく、複数のシフト位置における平均位置を求めればよい。   When there are a plurality of maximum values in the calculation area data, a position obtained by averaging a plurality of shift positions corresponding to the maximum value is set as the shift amount. This occurs when the calculation area is smaller or larger than the bead area, and occurs when the integrated luminance value does not change even if the calculation area is shifted. FIG. 7 is a diagram illustrating a case where the calculation area is larger than the bead area. In FIG. 7, when the luminance value of the background area is uniform, the calculation integrated data becomes the same value even if the calculation area is shifted so that the bead area is included in the shaded area between the calculation area and the bead area. In such a case, the center of the region having a plurality of maximum values may be shifted, and an average position at a plurality of shift positions may be obtained.

(ステップS106)
次に、位置補正部105で、シフト量算出部104から入力されるシフト量を基にフィルタ画像101をシフトさせて補正フィルタ画像を生成する。なお、シフト量算出部104から入力されるシフト量は、入力されたフィルタ画像101に対して演算領域をずらしたシフト位置であるため、シフト位置の符号をプラスマイナスで逆転させた値で、フィルタ画像101をシフトさせる。例えば、シフト量算出部104から出力されたシフト量が(4,5)であった場合、フィルタ画像101の各画素(x,y)は、(x−4,y−5)にシフトされることになる。そして、全画素においてシフトした結果を出力画像106として出力する。この出力画像106は、撮影対象の位置が一定の位置にシフトされた画像となる。したがって、ステップS101ないしステップS106の工程の処理を全てのフィルタ画像に対して行うことにより得られた複数の出力画像をそのまま重ね合わせた画像は、発光しているビーズが重なり合うように位置合わせがなされた画像となる。
(Step S106)
Next, the position correction unit 105 shifts the filter image 101 based on the shift amount input from the shift amount calculation unit 104 to generate a correction filter image. Since the shift amount input from the shift amount calculation unit 104 is a shift position obtained by shifting the calculation area with respect to the input filter image 101, the filter position is a value obtained by reversing the sign of the shift position with plus or minus. The image 101 is shifted. For example, when the shift amount output from the shift amount calculation unit 104 is (4, 5), each pixel (x, y) of the filter image 101 is shifted to (x-4, y-5). It will be. Then, the result of shifting in all pixels is output as an output image 106. The output image 106 is an image in which the position of the photographing target is shifted to a certain position. Therefore, an image obtained by superimposing a plurality of output images obtained by performing the processes of steps S101 to S106 on all the filter images is aligned so that the emitted beads are overlapped. Image.

以上のように、本発明の第1の実施の形態の画像処理装置によれば、複数のバンドパスフィルタを通して撮影された相対的な位置ずれをもつ各フィルタ画像に対して、フィルタ画像と演算領域の位置を相対的にずらしながら各位置における領域積算データを逐次算出し、算出した領域積算データの中で最大値を求め、最大値に対応する位置をシフト量とし、該シフト量を基にフィルタ画像の位置合わせを行うことにより、様々な発光特性を持った対象物を複数のバンドパスフィルタを通して撮影した画像であっても、確実に位置合わせを行うことができる。   As described above, according to the image processing apparatus of the first embodiment of the present invention, for each filter image having a relative positional deviation photographed through a plurality of bandpass filters, a filter image and a calculation area The area integration data at each position is sequentially calculated while relatively shifting the position of the position, the maximum value is obtained from the calculated area integration data, the position corresponding to the maximum value is set as the shift amount, and the filter is based on the shift amount. By aligning the images, it is possible to reliably align even an image obtained by photographing an object having various emission characteristics through a plurality of bandpass filters.

なお、以上の説明では、ステップS101において、領域設定データ記憶部1021に記憶されているビーズの形状情報と位置情報を基に、演算領域算出部1022にて演算領域を算出したが、領域設定データ記憶部1021にビーズを撮影した画像を演算領域算出画像として記憶させておき、演算領域算出部1022では、演算領域算出画像に対してビーズ位置が特定できるように2値化処理を行い、得られた2値データのビーズ画素を演算領域として設定してもよい。このように、ビーズを撮影した画像から演算領域を設定することで、位置合わせの基準となる対象物であるビーズの位置が変化しても、フレキシブルに対応できるようになる。   In the above description, in step S101, the calculation area calculation unit 1022 calculates the calculation area based on the bead shape information and the position information stored in the area setting data storage unit 1021, but the area setting data An image obtained by photographing the beads is stored in the storage unit 1021 as a calculation region calculation image, and the calculation region calculation unit 1022 performs binarization processing so that the bead position can be specified for the calculation region calculation image. Alternatively, a bead pixel of binary data may be set as the calculation area. In this way, by setting the calculation area from the image obtained by photographing the beads, it is possible to flexibly cope with the change in the position of the bead, which is an object serving as a reference for alignment.

以下、演算領域算出画像を用いる場合の具体的な処理について説明する。演算領域算出画像としては、例えば、ビーズに光を当てることによってできた影を撮影したものを用いることができる。このようにビーズの影を撮影することで、ビーズの発光特性に関係なく全ビーズを撮影することができる。図8は、紙面の裏側から光を照射した状態で撮影した画像の一例であり、ビーズは影を撮影した状態となるので、背景領域に比べビーズ領域が暗くなっている。   Hereinafter, specific processing in the case of using the calculation area calculation image will be described. As a calculation area | region calculation image, what image | photographed the shadow produced by irradiating light to a bead can be used, for example. By photographing the shadow of the beads in this manner, all the beads can be photographed regardless of the light emission characteristics of the beads. FIG. 8 is an example of an image captured in a state where light is irradiated from the back side of the paper surface. Since the bead is in a state of capturing a shadow, the bead region is darker than the background region.

この演算領域算出画像から演算領域を求める処理は次のように行う。予めビーズ領域と背景領域を分離できる閾値を設定しておき、この閾値に基づき2値化処理を演算領域算出画像に施すことにより、2値化画像を得る。すなわち、閾値以上の画素を0、それ以外の画素を1として2値化した画像を得る。そして、この作成した演算領域画像を演算領域として設定する。この場合、ビーズ領域は、背景領域に比べ暗いので、画素値が1となる。   The processing for obtaining the calculation area from the calculation area calculation image is performed as follows. A threshold value that can separate the bead area and the background area is set in advance, and a binarization process is performed on the calculation area calculation image based on the threshold value to obtain a binarized image. That is, an image obtained by binarization is obtained with 0 being a pixel equal to or greater than the threshold and 1 being the other pixel. The created calculation area image is set as a calculation area. In this case, since the bead area is darker than the background area, the pixel value is 1.

なお、ビーズ領域と背景領域を分離する閾値は、演算領域算出画像から求めることもできる。図9は、図8に示した演算領域算出画像の輝度分布を示したものである。横軸が輝度値を表わし、左が低輝度、右が高輝度を表わす。縦軸は各輝度における画素の総数を示している。背景領域は明るいので高輝度側に分布し、ビーズ領域は背景に比べ暗いので低輝度側に分布する。したがって、ビーズ領域と背景領域を分離するためには、図中の破線で示す2つの分布からなる谷の階調を閾値として設定すればよい。また、演算領域算出画像の明るさが局所的に変化している場合は、演算領域算出画像を複数の領域に分割し、分割した各領域毎に輝度分布を作成し谷階調を閾値として求め、求めた閾値で2値化処理を行えばよい。分割する大きさは、演算領域算出画像の大きさに応じて設定すればよく、1360×1024画素程度の画像の場合、100×100画素で分割すればよい。   The threshold for separating the bead area and the background area can also be obtained from the calculation area calculation image. FIG. 9 shows the luminance distribution of the calculation area calculation image shown in FIG. The horizontal axis represents the luminance value, the left represents low luminance, and the right represents high luminance. The vertical axis represents the total number of pixels at each luminance. Since the background region is bright, it is distributed on the high luminance side, and the bead region is darker than the background, so it is distributed on the low luminance side. Therefore, in order to separate the bead area and the background area, the gradation of the valley formed by the two distributions indicated by the broken lines in the figure may be set as the threshold value. If the brightness of the calculation area calculation image changes locally, the calculation area calculation image is divided into a plurality of areas, a luminance distribution is created for each of the divided areas, and the valley gradation is obtained as a threshold value. The binarization process may be performed with the obtained threshold value. The size to be divided may be set according to the size of the calculation area calculation image. In the case of an image of about 1360 × 1024 pixels, the size may be divided by 100 × 100 pixels.

前述した2値化処理は一例であり、例えばテンプレートマッチング処理でビーズ位置を検出し、検出したビーズ位置を演算領域として設定してもよい。テンプレートマッチング処理では、演算領域算出画像から検出する対象物のみを切り取った画像をテンプレート画像として持ち、演算領域算出画像とテンプレート画像を重ね合わせ、重なり合った各画素において差分値を求め、テンプレート画像全体の差分結果を全て個別に2乗した後、加算する。この加算した値は両画像の相関関係を示し、両者が同じ画像であるときは小さな値となり、両者が異なったときは大きな値となる。したがって、予め一致したと判断できる加算値を閾値として持ち、求めた加算値が閾値より小さい場合はパターンを検出したものと判定し、閾値より大きい場合はパターンが存在しないと判定することができる。そして、この判定処理を、テンプレート画像を1画素ずつずらしながら同様の判定を行い、これを繰り返して、演算領域算出画像全体に対して順次行う。   The binarization process described above is an example. For example, a bead position may be detected by a template matching process, and the detected bead position may be set as a calculation region. In the template matching process, an image obtained by cutting only an object to be detected from the calculation area calculation image is used as a template image, the calculation area calculation image and the template image are overlapped, a difference value is obtained for each overlapped pixel, and the entire template image is obtained. All the difference results are squared individually and then added. This added value indicates the correlation between both images, and is a small value when they are the same image, and a large value when they are different. Therefore, an addition value that can be determined to be matched in advance is used as a threshold value. If the obtained addition value is smaller than the threshold value, it is determined that a pattern has been detected, and if it is greater than the threshold value, it can be determined that no pattern exists. Then, this determination process is performed for the entire calculation area calculation image by repeating the same determination while shifting the template image pixel by pixel.

図10は、前述したテンプレートマッチング処理を示した図である。テンプレートマッチング処理は、ビーズ領域を有するテンプレート画像を初期位置1001で演算領域算出画像に重ね合わせ、その位置から順次矢印方向に判定を行っていく。そして、位置1002等においてビーズを検出する。   FIG. 10 is a diagram showing the template matching process described above. In the template matching process, a template image having a bead region is superimposed on the calculation region calculation image at the initial position 1001, and the determination is sequentially performed in the direction of the arrow from that position. Then, beads are detected at the position 1002 and the like.

このように、テンプレートマッチング処理を行うことで、もし演算領域算出画像中にゴミが混入していたとしてもゴミは無視され、ビーズ領域のみ抽出した演算領域を得ることができる。   In this way, by performing the template matching process, even if dust is mixed in the calculation area calculation image, the dust is ignored and a calculation area in which only the bead area is extracted can be obtained.

なお、演算領域算出画像として、蛍光物質の測定に用いる複数のバントパスフィルタの全波長を透過させるバントパスフィルタを用いて撮影した画像、又はバントパスフィルタを用いずに撮影した画像を用いてもよい。こうすることで、ビーズの発光特性に関係なく、発光している全ビーズが撮影された画像を得ることができる。この演算領域算出画像では、ビーズが発光している光を撮影するため、ビーズ領域が背景領域に比べ明るくなる。これは、ビーズ領域と背景領域の明るさが、図8に示すビーズに光が当たった際にできる影を撮影した演算領域算出画像と逆になっているだけなので、前述した2値化処理又はテンプレートマッチング処理を用いて同様に演算領域を得ることができる。   Note that, as the calculation region calculation image, an image taken using a bunt pass filter that transmits all wavelengths of a plurality of bunt pass filters used for measurement of the fluorescent material, or an image taken without using the bunt pass filter may be used. Good. By doing so, it is possible to obtain an image in which all the light-emitting beads are photographed regardless of the light emission characteristics of the beads. In this calculation area calculation image, since the light emitted by the beads is captured, the bead area becomes brighter than the background area. This is because the brightness of the bead area and the background area is only the reverse of the calculation area calculation image obtained by photographing the shadow that is generated when light strikes the bead shown in FIG. A calculation area can be similarly obtained using a template matching process.

演算領域算出画像としては、ビーズに光を当てることによってできた影を撮影したものに限らず、撮影した複数のフィルタ画像から作成したものを用いることもできる。この場合、演算領域設定部102において、予めビーズの形状を示すマスクパターンを持っておき、複数のフィルタ画像を重ね合わせて各フィルタ画像の対応する画素の輝度値を加算した画像データを作成し、これを演算領域算出画像とする。そして、作成した演算領域算出画像において予め与えられた閾値以上の輝度値をもつ領域を抽出し、抽出した領域の重心位置とマスクパターンの重心位置が一致するようにマスクパターンを配置し、配置したマスクパターンの領域を演算領域として設定する。このマスクパターンは、ステップS101で用いたビーズの形状情報を示すパターン画像と同様に画像として記憶しておく。   The calculation area calculation image is not limited to an image obtained by photographing a shadow formed by shining light on a bead, and an image created from a plurality of photographed filter images can also be used. In this case, the calculation area setting unit 102 has a mask pattern indicating the shape of the beads in advance, creates a plurality of filter images and creates image data in which the luminance values of the corresponding pixels of each filter image are added, This is the calculation area calculation image. Then, an area having a luminance value equal to or higher than a predetermined threshold is extracted from the calculated calculation area calculation image, and the mask pattern is arranged and arranged so that the centroid position of the extracted area matches the centroid position of the mask pattern. The mask pattern area is set as the calculation area. This mask pattern is stored as an image in the same manner as the pattern image indicating the shape information of the beads used in step S101.

図11を用いて演算領域算出画像の作成処理の動作説明を行う。図11は、3枚のフィルタ画像を重ね合わせ、ビーズが存在する領域を切り抜いたものである。フィルタ画像間に位置ずれがある場合、図11に示したようにビーズがずれた位置で重なり合う。ビーズ領域は、背景領域にくらべ明るいので、この3枚のフィルタ画像を重ね合わせて各画素を加算すると、3つのビーズ領域が共に重なり合った領域が重ねあわせた画像の中で最も輝度の高い領域となる。この重なり領域を、フィルタ画像を重なり合わせて作成した演算領域算出画像において閾値以上の輝度値を持つ画素を求めることで抽出し、この領域の重心位置を求める。そして、求めた重心位置とマスクパターンの重心が一致するようにマスクパターンを配置し、この領域を演算領域として設定する。こうすることで、各位置ずれがあるフィルタ画像の中心に演算領域を持っていくことができ、位置合わせ処理において全フィルタ画像において最短の位置に位置合わせを行うことができる。   The operation of the calculation area calculation image creation process will be described with reference to FIG. FIG. 11 is a view in which three filter images are overlaid and a region where beads are present is cut out. When there is a positional shift between the filter images, the beads are overlapped at the shifted position as shown in FIG. Since the bead area is brighter than the background area, when these three filter images are overlapped and each pixel is added, the area where the three bead areas overlap together is the area with the highest luminance among the overlapping images. Become. This overlapping area is extracted by obtaining a pixel having a luminance value equal to or higher than the threshold in the calculation area calculation image created by overlapping the filter images, and the barycentric position of this area is obtained. Then, the mask pattern is arranged so that the obtained center-of-gravity position matches the center of gravity of the mask pattern, and this area is set as a calculation area. By doing so, it is possible to bring the calculation area to the center of the filter image having each positional deviation, and it is possible to perform alignment at the shortest position in all the filter images in the alignment processing.

なお、前述した閾値は、演算領域算出画像を複数の領域に分割し、分割した各領域において輝度分布を作成し、輝度分布の画素数を上位から積算した値が輝度分布の総画素数の所定割合、例えば2%となる階調を設定する。分割する大きさは、演算領域算出画像の大きさやビーズの大きさに応じて設定すればよく、1360×1024画素程度の画像の場合、例えば50×50画素で分割する。こうすることで、最も輝度の高い重なり領域を抽出することができる。なお、2%は一例であり、演算領域算出画像に合わせて分割した領域の総画素数に占める重なり領域の画素数の割合を設定してもよい。   Note that the threshold value described above is obtained by dividing the calculation area calculation image into a plurality of areas, creating a luminance distribution in each divided area, and adding the number of pixels of the luminance distribution from the top to a predetermined value of the total number of pixels of the luminance distribution. A gradation is set such that the ratio is, for example, 2%. The size to be divided may be set in accordance with the size of the calculation area calculation image and the size of the beads. In the case of an image of about 1360 × 1024 pixels, for example, the size is divided by 50 × 50 pixels. By doing so, it is possible to extract the overlapping region with the highest luminance. Note that 2% is an example, and the ratio of the number of pixels in the overlapping region to the total number of pixels in the region divided in accordance with the calculation region calculation image may be set.

また、本発明の第1の実施の形態では、領域画素データ積算部103において、フィルタ画像101における演算領域の輝度値を足し合わせて領域積算データを求めているが、輝度値を足し合わせた積算結果から一定値を減算する機能を追加し、領域積算データの値を減少させた値をシフト量算出部104に出力してもよい。この減算する処理は、演算領域の輝度値を積算する際に足し合わせる輝度値を減算しても良いし、演算領域の全画素の輝度値を積算した領域積算データから減算してもよい。こうすることで、領域積算データの値を小さくすることができ、予め用意する領域積算データを記憶するメモリを小さくすることができる。なお、減算する一定値は、もっともメモリを小さくすることができる値を設定すればよく、前者の場合はフィルタ画像101における各画素の輝度値の最小値を設定すればよい。また、後者の場合はフィルタ画像101の輝度値の最小値に演算領域の画素数を乗じた値を設定すればよい。   In the first embodiment of the present invention, the region pixel data integration unit 103 adds the luminance values of the calculation regions in the filter image 101 to obtain the region integration data, but the integration is performed by adding the luminance values. A function of subtracting a constant value from the result may be added, and a value obtained by reducing the value of the area integration data may be output to the shift amount calculation unit 104. This subtracting process may be performed by subtracting the luminance value to be added when the luminance values in the calculation area are integrated, or may be subtracted from the area integration data obtained by integrating the luminance values of all the pixels in the calculation area. By doing so, the value of the area integration data can be reduced, and the memory for storing the area integration data prepared in advance can be reduced. The fixed value to be subtracted may be set to a value that can make the memory the smallest, and in the former case, the minimum value of the luminance value of each pixel in the filter image 101 may be set. In the latter case, a value obtained by multiplying the minimum luminance value of the filter image 101 by the number of pixels in the calculation area may be set.

さらに、領域画素データ積算部103において、フィルタ画像101における演算領域の画素が繋がっている領域毎に平均輝度値を算出し、算出した各領域の平均輝度値を全て足し合わせた値を領域積算データとしてもよい。この演算領域の画素が繋がっている領域とは、それぞれのビーズ領域であり、各ビーズの平均輝度値を算出することと等しい。この処理により、領域積算データの値を小さくでき、予め用意する領域積算データを記憶するメモリを小さくすることができる。また、前述した輝度値を足し合わせた積算結果から一定値を減算する機能と併用することで、さらにメモリの節約が可能になる。   Further, the area pixel data integration unit 103 calculates an average luminance value for each area where the pixels of the calculation area in the filter image 101 are connected, and adds the calculated average luminance value of each area to the area integration data. It is good. The area where the pixels of this calculation area are connected is each bead area, which is equivalent to calculating the average luminance value of each bead. By this processing, the value of the area integration data can be reduced, and the memory for storing the area integration data prepared in advance can be reduced. Further, by using together with the above-described function of subtracting a constant value from the integration result obtained by adding the luminance values, it is possible to further save memory.

また、以上の説明では、領域画素データ積算部103において、予め与えられている第1の移動範囲で、フィルタ画像101に対して演算領域算出部1022から出力された演算領域を相対的に1画素ずつずらすシフト処理としたが、1画素よりも大きい間隔をあけてずらしてもよい。この場合、位置合わせのシフト量の単位が1画素よりも大きくなり位置合わせ精度は落ちるが、演算量が減少するので高速に処理を行うことができる。例えば、シフト量を2画素とした場合、1画素の場合と比べ、縦方向と横方向でそれぞれ領域積算データを求める回数が半分となるので、全体の領域積算データを求める演算量は4分の1となる。この処理は、1画素単位の精度が必要とされてはおらず、精度よりも処理時間に重みが置かれている場合に有効である。   In the above description, the region pixel data integration unit 103 sets the calculation region output from the calculation region calculation unit 1022 relative to the filter image 101 within the first movement range given in advance as one pixel. Although the shift processing is performed by shifting each step, the shift processing may be performed with an interval larger than one pixel. In this case, the unit of the alignment shift amount is larger than one pixel and the alignment accuracy is lowered, but the calculation amount is reduced, so that the processing can be performed at high speed. For example, when the shift amount is 2 pixels, the number of times of obtaining the region integration data in the vertical direction and the horizontal direction is halved compared to the case of 1 pixel, so the calculation amount for obtaining the entire region integration data is 4 minutes. 1 This processing is effective when the accuracy of one pixel unit is not required and the processing time is more weighted than the accuracy.

(第2の実施の形態)
図12は、本発明の第2の実施の形態の画像処理装置の要部概略構成を示すブロック図である。図12の画像処理装置は、演算領域設定部102と、領域画素データ積算部103と、シフト量算出部104と、位置補正部105を含んで構成される。第1の実施の形態で説明したのと同じ構成のものについては同じ符号を付し、説明を省略する。図1に示す第1の実施の形態の画像処理装置の構成と異なる点は、シフト量算出部104で算出したシフト量を領域画素データ積算部103に出力させるようにした点である。
(Second Embodiment)
FIG. 12 is a block diagram illustrating a schematic configuration of a main part of the image processing apparatus according to the second embodiment of the present invention. The image processing apparatus in FIG. 12 includes a calculation region setting unit 102, a region pixel data integration unit 103, a shift amount calculation unit 104, and a position correction unit 105. The same components as those described in the first embodiment are denoted by the same reference numerals, and description thereof is omitted. The difference from the configuration of the image processing apparatus according to the first embodiment shown in FIG. 1 is that the shift amount calculated by the shift amount calculation unit 104 is output to the region pixel data integration unit 103.

この画像処理装置では、まず、領域画素データ積算部103で領域積算データを算出するに際して、1画素よりも大きい間隔で、演算領域を前記処理対象画像に対して相対的に移動させる。すなわち、シフト位置を大まかにして領域積算データを算出する。そして、シフト量算出部104から領域積算データが最大値を示すシフト位置を得た後、そのシフト位置の近傍でより狭い間隔で演算領域を移動させて、再度領域積算データを算出する。したがって、領域積算データが最大となるシフト位置を求める処理を減らすことができる   In this image processing apparatus, first, when the region integration data is calculated by the region pixel data integration unit 103, the calculation region is moved relative to the processing target image at an interval larger than one pixel. That is, the area integration data is calculated by roughly setting the shift position. Then, after obtaining the shift position where the area integration data shows the maximum value from the shift amount calculation unit 104, the calculation area is moved at a narrower interval near the shift position, and the area integration data is calculated again. Therefore, it is possible to reduce the processing for obtaining the shift position where the area integration data is maximized.

次に、本発明の第2の実施の形態の画像処理装置の動作について図13を用いて詳細に説明する。図13は、本発明の第2の実施の形態の画像処理装置が行う画像処理を説明するためのフローチャートである。図13のフローチャートは、ステップS201ないしステップS207からなり、ステップS201は演算領域設定工程を、ステップS202ないしステップS204からなるステップS2020は領域画素データ積算工程を、ステップS205及びステップS206からなるステップS2050はシフト量算出工程を、ステップS207は位置補正工程を、それぞれ示す。   Next, the operation of the image processing apparatus according to the second embodiment of the present invention will be described in detail with reference to FIG. FIG. 13 is a flowchart for explaining image processing performed by the image processing apparatus according to the second embodiment of the present invention. The flowchart of FIG. 13 includes steps S201 to S207, where step S201 is a calculation region setting step, step S2020 consisting of steps S202 to S204 is a region pixel data integrating step, and step S2050 consisting of steps S205 and S206 is step S2050. Step S207 shows a shift amount calculation step, and step S207 shows a position correction step.

(ステップS201)
まず、演算領域算出部1022にて、入力されたフィルタ画像101に対して位置合わせの演算を行う演算領域を、領域設定データ記憶部1021に記憶されている情報を基に算出する。なお、演算領域の算出方法は、図3のステップS101で説明したものと同様であるため、ここでは説明を省略する。
(Step S201)
First, the calculation area calculation unit 1022 calculates a calculation area for performing alignment calculation on the input filter image 101 based on information stored in the area setting data storage unit 1021. The calculation method of the calculation area is the same as that described in step S101 in FIG.

(ステップS202)
次に、領域画素データ積算部103において、予め与えられている第1の移動範囲で、フィルタ画像101に対して演算領域算出部1022から出力された演算領域を相対的に1画素よりも大きい間隔を空けてずらすシフト処理を行う。ここでは、まずこの間隔を4画素として説明を行う。
(Step S202)
Next, in the region pixel data integration unit 103, the calculation region output from the calculation region calculation unit 1022 with respect to the filter image 101 is relatively larger than one pixel in the first movement range given in advance. Shift processing is performed with a gap. Here, the description will be made assuming that this interval is 4 pixels.

(ステップS203)
次に、引き続き領域画素データ積算部103において、フィルタ画像101と基準位置の演算領域画像又はシフトされた演算領域画像を重ね合わせ、演算領域と重なるフィルタ画像101の画素の輝度値を全て足し合わせた領域積算データを算出する。なお、領域積算データの算出方法は、図3のステップS103で説明したものと同様であるため、ここでは説明を省略する。
(Step S203)
Next, in the region pixel data integration unit 103, the filter image 101 and the calculation region image at the reference position or the shifted calculation region image are superimposed, and all the luminance values of the pixels of the filter image 101 that overlap the calculation region are added. Area integration data is calculated. Note that the method for calculating the area integration data is the same as that described in step S103 in FIG.

(ステップS204)
これらステップS202、ステップS203の工程を第1の移動範囲の各シフト位置で繰り返し、第1の移動範囲の各シフト位置の領域積算データを逐次算出し、算出した各シフト位置の領域積算データをシフト量算出部104に出力する。
(Step S204)
These steps S202 and S203 are repeated at each shift position in the first movement range, the area integration data at each shift position in the first movement range is sequentially calculated, and the area integration data at each calculated shift position is shifted. The data is output to the quantity calculation unit 104.

(ステップS205)
次に、シフト量算出部104で、領域画素データ積算部103から出力された各シフト位置の領域積算データの中で最大値を求め、最大値に対応するシフト位置(シフト量)を求める。
(Step S205)
Next, the shift amount calculation unit 104 obtains the maximum value among the region integration data of each shift position output from the region pixel data integration unit 103, and obtains the shift position (shift amount) corresponding to the maximum value.

(ステップS206)
そして、シフト量算出部104でシフト位置を求めた際の、シフト間隔(フィルタ画像101に対する演算領域の移動間隔)が1画素かどうかの判定を行う。1画素だった場合は、シフト量算出部104で求めたシフト位置をそのまま、位置合わせのシフト量として位置補正部105に出力する。一方、1画素以外の場合は、シフト量算出部104で求めたシフト位置を領域画素データ積算部103に出力し、再度ステップS202ないしステップS205の工程を繰り返す。
(Step S206)
Then, it is determined whether or not the shift interval (the movement interval of the calculation area with respect to the filter image 101) is one pixel when the shift amount calculation unit 104 obtains the shift position. In the case of one pixel, the shift position obtained by the shift amount calculation unit 104 is output as it is to the position correction unit 105 as an alignment shift amount. On the other hand, in the case of other than one pixel, the shift position obtained by the shift amount calculation unit 104 is output to the region pixel data integration unit 103, and the steps S202 to S205 are repeated again.

なお、ステップS202を再度行う際は、シフト間隔を前回のシフト間隔の半分を設定する。この例では、最初のシフト間隔が4画素であるので、2回目はシフト間隔を2画素に、3回目は1画素に設定される。また、フィルタ画像101に対して演算領域を相対的にずらす第1の移動範囲は、シフト量算出部104から出力されたシフト位置を中心とし上下左右に前回のずらす間隔を持った範囲とする。したがって、この例では2回目は、シフト位置から上下左右に4画素とった正方形の範囲となり、3回目はシフト位置から上下左右に2画素とった正方形の範囲となる。   When step S202 is performed again, the shift interval is set to half of the previous shift interval. In this example, since the first shift interval is 4 pixels, the shift interval is set to 2 pixels for the second time, and 1 pixel is set for the third time. The first movement range in which the calculation area is shifted relative to the filter image 101 is a range having the previous shift interval in the vertical and horizontal directions with the shift position output from the shift amount calculation unit 104 as the center. Therefore, in this example, the second time is a square range with 4 pixels vertically and horizontally from the shift position, and the third time is a square range with 2 pixels vertically and horizontally from the shift position.

(ステップS207)
次に、位置補正部105で、シフト量算出部104から出力されたシフト量を基にフィルタ画像101をシフトさせて補正フィルタ画像を生成する。なお、フィルタ画像のシフト方法は、図3のステップS106で説明したものと同様であるため、ここでは説明を省略する。
(Step S207)
Next, the position correction unit 105 shifts the filter image 101 based on the shift amount output from the shift amount calculation unit 104 to generate a correction filter image. The method for shifting the filter image is the same as that described in step S106 in FIG.

以上のように、本発明の第2の実施の形態の画像処理装置によれば、フィルタ画像に対して演算領域を1画素よりも大きい間隔をあけてずらし、その際のフィルタ画像のずれ量を示すシフト位置を大まかに求めた後、順にフィルタ画像に対して演算領域のずらす間隔を小さくしながら前の処理で求めたシフト位置の近傍に限定された領域内で、より正確なシフト位置を求めるようにすることで、フィルタ画像に対して演算領域をずらす第1の移動範囲のすべてのシフト位置において領域積算データを求めずにすみ、演算量を大幅に減らすことができ、高速化が行える。   As described above, according to the image processing apparatus of the second embodiment of the present invention, the calculation area is shifted with respect to the filter image by an interval larger than one pixel, and the shift amount of the filter image at that time is changed. After roughly obtaining the indicated shift position, in order to obtain a more accurate shift position within an area limited to the vicinity of the shift position obtained in the previous processing while sequentially reducing the interval of shifting the calculation area with respect to the filter image By doing so, it is not necessary to obtain area integration data at all shift positions of the first movement range in which the calculation area is shifted with respect to the filter image, the calculation amount can be greatly reduced, and the speed can be increased.

また、ステップS202ないしステップS205の工程を繰り返し行う際、領域画素データ積算部103において、求めようとするシフト位置の領域積算データがメモリ上に既に存在する場合、積算処理を行わずにメモリ上の領域積算データを用いるようにしてもよい。こうすることで、フィルタ画像に対して演算領域のずらす間隔を小さくしながら順に演算領域を算出する処理を繰り返した際、同じ位置の演算領域データを何度も求めることを防ぎ、高速化が図れる。   Further, when the process from step S202 to step S205 is repeated, if the area pixel data integration unit 103 already has the area integration data of the shift position to be obtained on the memory, the integration process is not performed and the integration process is not performed. The area integration data may be used. By doing this, it is possible to prevent calculation area data at the same position from being repeatedly obtained and to increase the speed when repeating the process of calculating the calculation area in order while reducing the interval at which the calculation area is shifted with respect to the filter image. .

(第3の実施の形態)
図14は、本発明の第3の実施の形態の画像処理装置の要部概略構成を示すブロック図である。図14の画像処理装置は、演算領域設定部102と、領域画素データ積算部103と、シフト量算出部104と、位置補正部105と、判断部307を含んで構成される。第1の実施の形態で説明したのと同じ構成のものについては同じ符号を付し、説明を省略する。図1に示す第1の実施の形態の画像処理装置の構成と異なる点は、判断部307が新たに追加された点である。判断部307は、領域画素データ積算部103から出力された領域積算データに基づいて、入力されたフィルタ画像101の位置合わせの可否を判定し、その判定結果をシフト量算出部104に出力するものである。
(Third embodiment)
FIG. 14 is a block diagram illustrating a schematic configuration of main parts of an image processing apparatus according to the third embodiment of the present invention. The image processing apparatus in FIG. 14 includes a calculation region setting unit 102, a region pixel data integration unit 103, a shift amount calculation unit 104, a position correction unit 105, and a determination unit 307. The same components as those described in the first embodiment are denoted by the same reference numerals, and description thereof is omitted. The difference from the configuration of the image processing apparatus according to the first embodiment shown in FIG. 1 is that a determination unit 307 is newly added. The determination unit 307 determines whether or not the input filter image 101 can be aligned based on the region integration data output from the region pixel data integration unit 103, and outputs the determination result to the shift amount calculation unit 104. It is.

次に、本発明の第3の実施の形態の画像処理装置の動作について図15を用いて詳細に説明する。図15は、本発明の第3の実施の形態の画像処理装置が行う画像処理を説明するためのフローチャートである。図15のフローチャートは、ステップS301ないしステップS308からなり、ステップS301は演算領域設定工程を、ステップS302ないしステップS304からなるステップS3020は領域画素データ積算工程を、ステップS305ないしステップS307からなるステップS3050はシフト量算出工程を、ステップS308は位置補正工程を、それぞれ示す。   Next, the operation of the image processing apparatus according to the third embodiment of the present invention will be described in detail with reference to FIG. FIG. 15 is a flowchart for explaining image processing performed by the image processing apparatus according to the third embodiment of the present invention. The flowchart of FIG. 15 includes steps S301 to S308, where step S301 is a calculation area setting step, step S3020 including steps S302 to S304 is an area pixel data integrating step, and step S3050 including steps S305 to S307 is step S3050. Step S308 shows a shift amount calculation step, and step S308 shows a position correction step.

(ステップS301)
まず、演算領域算出部1022にて、入力されたフィルタ画像101に対して位置合わせの演算を行う演算領域を、領域設定データ記憶部1021に記憶されている情報を基に算出する。なお、演算領域の算出方法は、図3のステップS101で説明したものと同様であるため、ここでは説明を省略する。
(Step S301)
First, the calculation area calculation unit 1022 calculates a calculation area for performing alignment calculation on the input filter image 101 based on information stored in the area setting data storage unit 1021. The calculation method of the calculation area is the same as that described in step S101 in FIG.

(ステップS302)
次に、領域画素データ積算部103において、予め与えられている第1の移動範囲で、フィルタ画像101に対して演算領域算出部1022から入力された演算領域を相対的に1画素ずつずらすシフト処理を行う。なお、このシフト処理は、図3のステップS102で説明したものと同様であるため、ここでは説明を省略する。
(Step S302)
Next, the region pixel data integration unit 103 shifts the calculation region input from the calculation region calculation unit 1022 relative to the filter image 101 one pixel at a time within a first movement range given in advance. I do. Since this shift process is the same as that described in step S102 in FIG. 3, the description thereof is omitted here.

(ステップS303)
次に、引き続き領域画素データ積算部103において、フィルタ画像101と基準位置の演算領域画像又はシフトされた演算領域画像を重ね合わせ、演算領域と重なるフィルタ画像101の画素の輝度値を全て足し合わせた領域積算データを算出する。なお、演算領域の算出方法は、図3のステップS103で説明したものと同様であるため、ここでは説明を省略する。
(Step S303)
Next, in the region pixel data integration unit 103, the filter image 101 and the calculation region image at the reference position or the shifted calculation region image are superimposed, and all the luminance values of the pixels of the filter image 101 that overlap the calculation region are added. Area integration data is calculated. The calculation method of the calculation area is the same as that described in step S103 in FIG.

(ステップS304)
これらステップS302、ステップS303の工程を予め与えられている第1の移動範囲の各シフト位置で繰り返し、第1の移動範囲における各シフト位置の領域積算データを逐次算出し、算出した各シフト位置の領域積算データをシフト量算出部104及び判断部307に出力する。
(Step S304)
These steps S302 and S303 are repeated at each shift position of the first movement range given in advance, and the area integration data of each shift position in the first movement range is sequentially calculated. The area integration data is output to the shift amount calculation unit 104 and the determination unit 307.

(ステップS305)
次に、判断部307において、領域画素データ積算部103から出力された領域積算データに基づいて、入力されたフィルタ画像101の位置合わせの可否を判定する。
(Step S305)
Next, the determination unit 307 determines whether or not the input filter image 101 can be aligned based on the region integration data output from the region pixel data integration unit 103.

(ステップS306)
判断部307による判定の結果、入力されたフィルタ画像101の位置合わせが可能な場合には、シフト量算出部104において、領域画素データ積算部103から出力された各シフト位置の領域積算データの中で最大値を求め、最大値に対応するシフト位置を、シフト量として位置補正部105に出力する。
(Step S306)
As a result of the determination by the determination unit 307, when the input filter image 101 can be aligned, the shift amount calculation unit 104 determines whether the shift amount calculation unit 104 outputs the region integration data at each shift position. Then, the maximum value is obtained, and the shift position corresponding to the maximum value is output to the position correction unit 105 as the shift amount.

(ステップS307)
一方、判断部307による判定の結果、入力されたフィルタ画像101における位置合わせが不可能な場合には、シフト量算出部104において、全く位置合せを行わないようにシフト量を0として位置補正部105に出力する。
(Step S307)
On the other hand, as a result of the determination by the determination unit 307, if the input filter image 101 cannot be aligned, the shift amount calculation unit 104 sets the shift amount to 0 so that the alignment is not performed at all. To 105.

(ステップS308)
次に、位置補正部105で、シフト量算出部104から入力されたシフト量を基にフィルタ画像101をシフトさせて補正フィルタ画像を生成する。なお、このシフト方法は、図3のステップS106で説明したものと同様であるため、ここでは説明を省略する。
(Step S308)
Next, the position correction unit 105 shifts the filter image 101 based on the shift amount input from the shift amount calculation unit 104 to generate a correction filter image. Note that this shift method is the same as that described in step S106 in FIG.

以上のように、本発明の第3の実施の形態の画像処理装置によれば、判断部307において、領域画素データ積算部103から出力された領域積算データに基づいて、入力されたフィルタ画像101の位置合わせの可否を判定し、位置合わせが可能な場合は、シフト量算出部104において領域積算データからシフト量を算出し、位置補正部105で位置合わせのためのシフト処理を行う。一方、位置補正が不可能な場合は、シフト量算出部104においてシフト量を0として、位置補正部105でシフト処理を行わないようにすることにより、誤った位置合わせ処理を防ぐことができる。   As described above, according to the image processing apparatus of the third embodiment of the present invention, in the determination unit 307, the input filter image 101 is input based on the region integration data output from the region pixel data integration unit 103. In the case where alignment is possible, the shift amount calculation unit 104 calculates the shift amount from the area integration data, and the position correction unit 105 performs shift processing for alignment. On the other hand, when position correction is impossible, the shift amount calculation unit 104 sets the shift amount to 0 and the position correction unit 105 does not perform shift processing, thereby preventing erroneous alignment processing.

以下、判断部307における判定処理について詳細に説明する。   Hereinafter, the determination process in the determination unit 307 will be described in detail.

誤った位置合わせを起こす原因として、入力されたフィルタ画像101に位置合わせのための基準となるビーズがフィルタ画像内に存在しない、又はビーズが存在してもほとんど発光しておらずビーズの輝度レベルが背景の輝度レベルとほとんど変わらない、といったことが考えられる。これは、撮影に用いたバンドパスフィルタが、ビーズが発光している波長の光を通さない場合に起こる。このような場合は、何処で位置が合うかの判断ができないため、位置合わせ処理を行わないほうがよい。   As a cause of erroneous alignment, the input filter image 101 does not have a bead serving as a reference for alignment in the filter image, or even if a bead exists, light is hardly emitted and the luminance level of the bead May be almost the same as the background brightness level. This occurs when the bandpass filter used for imaging does not pass light of the wavelength emitted by the beads. In such a case, it is not possible to determine where the position is matched, so it is better not to perform the positioning process.

そこで、判断部307では、領域画素データ積算部103から出力された各シフト位置の領域積算データの中で最大値と最小値を求め、求めた最大値と最小値の比に基づいて位置合わせの可否を判定する。   Therefore, the determination unit 307 obtains the maximum value and the minimum value among the region integration data of each shift position output from the region pixel data integration unit 103, and performs alignment based on the ratio of the obtained maximum value and minimum value. Judgment is made.

例えば、最大値を最小値で除算した値(以下、最大最小除算値と称す)が、予め与えられている閾値よりも小さい場合、フィルタ画像101の位置補正が不可能であると判定し、それ以外の場合、フィルタ画像101の位置補正が可能であると判定する。図2に示したようにフィルタ画像においてビーズ領域は背景領域に比べ輝度値が大きくなっているので、ビーズ領域と背景領域の輝度レベルの差が大きいほど最大最小除算値が大きくなり、逆に、輝度レベルの差が小さくなるほど最大最小除算値は小さくなる。また、ビーズ領域と背景領域の輝度レベルが同じ場合、最大最小除算値は1.0となる。したがって、最大最小除算値を求めることで、ビーズ領域と背景領域の輝度レベルの差を評価することができ、最大最小除算値が閾値よりも小さい場合、フィルタ画像101の位置合わせが不可能であると判定することができる。   For example, when the value obtained by dividing the maximum value by the minimum value (hereinafter referred to as the maximum / minimum division value) is smaller than a predetermined threshold value, it is determined that the position correction of the filter image 101 is impossible, In other cases, it is determined that the position of the filter image 101 can be corrected. As shown in FIG. 2, in the filter image, the bead area has a larger luminance value than the background area. Therefore, the larger the difference in the luminance level between the bead area and the background area, the larger the maximum and minimum division value. The maximum / minimum division value decreases as the difference in luminance level decreases. When the luminance levels of the bead area and the background area are the same, the maximum and minimum division value is 1.0. Therefore, the difference between the luminance levels of the bead area and the background area can be evaluated by obtaining the maximum / minimum division value. When the maximum / minimum division value is smaller than the threshold value, the alignment of the filter image 101 is impossible. Can be determined.

なお、ここで予め与えておく閾値は、1.0以上の小数値であり、フィルタ画像のビーズ領域と背景領域の輝度レベルの差に応じて設定すればよく、予め複数枚のフィルタ画像を用いて最大最小除算値を算出し、位置合わせが成功した際の最大最小除算値の中で、最も小さい値を設定しておけばよい。   Note that the threshold value given in advance here is a decimal value of 1.0 or more, and may be set according to the difference in luminance level between the bead area and the background area of the filter image, and a plurality of filter images are used in advance. The maximum / minimum division value is calculated, and the smallest value among the maximum / minimum division values when the alignment is successful may be set.

最大最小除算値を用いた判定は、前述した、位置合わせのための基準となるビーズがフィルタ画像内に存在しない、又はビーズが存在してもほとんど発光していない場合以外においても、ビーズ領域と背景領域の輝度レベルの差が小さくなる場合に有効であり、例えば、露光時間を長くしすぎて画像全体の輝度値が飽和してしまった場合においても、誤った位置合わせ処理を防ぐことができる。   The determination using the maximum / minimum division value is the same as the bead region described above even when the reference beads for alignment do not exist in the filter image, or when beads are present but hardly emit light. This is effective when the difference in the brightness level of the background area becomes small. For example, even when the exposure time is made too long and the brightness value of the entire image is saturated, erroneous alignment processing can be prevented. .

さらに、ビーズが強く発光していても全演算領域における割合が少ない場合、例えば、100個のビーズのうち1個のビーズしか発光していなかった場合は、位置合わせは画像全体を評価して行うものであり1個の場合は信頼性が乏しいので、概して位置合わせを行わないほうが良いが、このような場合においても最大最小除算値が小さくなるので、フィルタ画像の位置合わせが不可能であると判定することができる。逆に、ビーズ全体の発光量が少なく、ビーズ領域と背景領域の輝度差があまり無くとも、全演算領域に占める割合が多い場合は信頼性が向上するので、概して位置合せを行った方がよいが、このような場合は、最大最小除算値が大きくなるのでフィルタ画像の位置補正が可能であると判定することができる。   Furthermore, when the ratio of the entire calculation region is small even if the beads are intensely emitted, for example, when only one of the 100 beads is emitted, alignment is performed by evaluating the entire image. Since the reliability is poor in the case of one, it is better not to perform alignment in general. However, even in such a case, the maximum / minimum division value becomes small, so that the alignment of the filter image is impossible. Can be determined. Conversely, even if the light emission amount of the entire bead is small and there is not much difference in brightness between the bead area and the background area, reliability is improved when the ratio of the entire calculation area is large. However, in such a case, since the maximum / minimum division value becomes large, it can be determined that the position of the filter image can be corrected.

また、他にも誤った位置合わせを起こす原因として、撮影中に装置の振動が起こり、フィルタ画像内のビーズの形状が変形してしまう場合も考えられる。振動が起こった際のフィルタ画像を図16に示す。図16では、横揺れが起こり、ビーズが横長になっている。このような場合、どのシフト位置がマッチングしている位置なのかを特定できないため、位置合わせ処理を行わないほうがよい。   Another possible cause of misalignment is when the apparatus vibrates during photographing and the shape of the beads in the filter image is deformed. FIG. 16 shows a filter image when vibration occurs. In FIG. 16, rolling occurs and the beads are horizontally long. In such a case, since it is not possible to specify which shift position is the matching position, it is better not to perform the alignment process.

そこで、判断部307では、領域画素データ積算部103から出力された各シフト位置の領域積算データにおいて、該領域積算データの中で最大値を示す値に対して所定の割合以上の値を持つシフト位置を抽出し、抽出したシフト位置の分布に基づいて前記処理対象画像の位置合わせの可否を判定する。例えば、抽出したシフト位置が占める領域(以下、所定割合領域と称す)から特徴量を算出し、算出した特徴量が予め与えている条件を満たす場合、フィルタ画像101の位置合わせが不可能であると判定し、それ以外の場合、フィルタ画像101の位置補正が可能であると判定する。   Therefore, the determination unit 307 shifts the region integration data at each shift position output from the region pixel data integration unit 103 with a value greater than or equal to a predetermined ratio with respect to the value indicating the maximum value in the region integration data. A position is extracted, and whether or not the processing target image is aligned is determined based on the extracted distribution of shift positions. For example, if a feature amount is calculated from an area occupied by the extracted shift position (hereinafter referred to as a predetermined ratio area), and the calculated feature amount satisfies a predetermined condition, the filter image 101 cannot be aligned. Otherwise, it is determined that the position of the filter image 101 can be corrected.

図17は、位置合わせが可能な振動が無い場合の所定割合領域を説明する図である。図17(a)は、各シフト位置の領域積算データを2次元平面に表示しており、フィルタ画像に対する演算領域のシフト量を、横軸をX方向のシフト量、縦軸をY方向のシフト量とし、位置合わせ可能な場合における所定割合領域を図示したものである。また図17(b)は、図17(a)のX軸上における領域積算データを示しており、横軸をX方向のシフト量、縦軸を領域積算データの値とし、領域積算データの中で最大値を持つシフト位置と所定の割合以上の値を持つ位置を図示している。所定の割合は、所定割合領域の特徴が現れる値を設定すればよくここでは8割とする。   FIG. 17 is a diagram illustrating a predetermined ratio area when there is no vibration that can be aligned. FIG. 17 (a) displays area integration data at each shift position on a two-dimensional plane. The shift amount of the calculation area with respect to the filter image is indicated by the horizontal axis indicating the X-direction shift amount and the vertical axis indicating the Y-direction shift. The predetermined ratio area in the case where the position can be aligned is shown. FIG. 17B shows the area integration data on the X axis in FIG. 17A, where the horizontal axis represents the shift amount in the X direction and the vertical axis represents the value of the area integration data. A shift position having a maximum value and a position having a value greater than a predetermined ratio are shown. The predetermined ratio may be set to a value at which the characteristic of the predetermined ratio area appears, and is set to 80% here.

このように、領域積算データの中で最大値を示す値に対して所定の割合以上の値を持つシフト位置を所定割合領域として求めることで、対象物の明るさが変化し領域積算データの最大値が変化しても、所定割合領域の形状は全く同じになる。図17(b)において、領域積算データは、演算領域とフィルタ画像内のビーズ領域の重なりが少なくなるほど値が小さくなるので、最大値の位置から遠ざかるほど値が小さくなっている。したがって、所定割合領域を抽出した場合、図17(a)に示すように最大値の位置を中心とした円となる。   In this way, by obtaining a shift position having a value greater than or equal to a predetermined ratio with respect to the value indicating the maximum value in the area integration data as a predetermined ratio area, the brightness of the object changes and the maximum of the area integration data is obtained. Even if the value changes, the shape of the predetermined ratio area is exactly the same. In FIG. 17B, the value of the region integration data decreases as the overlap between the calculation region and the bead region in the filter image decreases, and thus the value decreases as the distance from the maximum value position increases. Therefore, when the predetermined ratio area is extracted, the circle is centered on the position of the maximum value as shown in FIG.

しかしながら、振動したフィルタ画像の場合では、ビーズが楕円になるため、所定の割合以上の値を持つ位置の所定割合領域を抽出した場合、所定割合領域はビーズの形状と同様に楕円になる。これは、演算領域がビーズ領域内に含まれてしまい、長径方向に演算領域をシフトしても演算領域の全画素がビーズ領域となるため、所定の割合以上の値を持つシフト位置が、位置合わせ可能な振動がない場合と比べて長くなるからである。図18は図16に示した振動している際に撮影されたフィルタ画像の所定割合領域を図示したものである。   However, in the case of a filtered filter image, the beads are elliptical. Therefore, when a predetermined ratio area at a position having a value equal to or higher than a predetermined ratio is extracted, the predetermined ratio area becomes an ellipse similarly to the shape of the beads. This is because the calculation area is included in the bead area, and even if the calculation area is shifted in the major axis direction, all the pixels in the calculation area become the bead area. This is because it becomes longer than when there is no vibration that can be matched. FIG. 18 shows a predetermined ratio area of the filter image photographed during the vibration shown in FIG.

以上の説明からわかるように、所定割合領域において位置合わせ可能な場合の形状との差異を求めることで位置合わせの可否を判定することが可能である。形状の差異は、所定割合領域の形状を示す特徴量を算出し、算出した特徴量を用いて判定を行う。   As can be seen from the above description, it is possible to determine whether or not alignment is possible by obtaining a difference from the shape when alignment is possible in the predetermined ratio area. The difference in shape is determined by calculating a feature amount indicating the shape of the predetermined ratio region and using the calculated feature amount.

所定割合領域の形状を示す特徴量としては、所定割合領域の面積の大きさを用いることができる。そして、予め位置合わせ可能な場合の面積値が取りうる範囲を求めておき、その範囲外にある場合、フィルタ画像の位置合わせが不可能であると判定する。所定割合領域の面積値は、所定割合領域におけるシフト位置の個数をカウントすることで求めることができる。   As the feature amount indicating the shape of the predetermined ratio area, the size of the area of the predetermined ratio area can be used. Then, a range that can be taken by the area value when alignment is possible is obtained in advance, and if it is outside the range, it is determined that alignment of the filter image is impossible. The area value of the predetermined ratio area can be obtained by counting the number of shift positions in the predetermined ratio area.

また、特徴量として、所定割合領域の縦幅と横幅を用いることもできる。そして、予め位置合わせ可能な場合の縦幅と横幅の範囲を求めておき、その縦幅と横幅の片方、もしくは両方がその範囲外にある場合、フィルタ画像の位置合わせが不可能であると判定する。縦幅と横幅は、所定割合領域におけるシフト位置のX,Y座標に対しそれぞれ最大値と最小値を求め、縦幅はY座標の最大値から最小値を引いた値の絶対値、横幅はX座標の最大値から最小値を引いた値の絶対値とすることで求めることができる。   Further, the vertical and horizontal widths of the predetermined ratio area can be used as the feature amount. Then, the range of the vertical width and the horizontal width when alignment is possible is obtained in advance, and if one or both of the vertical width and horizontal width are outside the range, it is determined that the filter image cannot be aligned. To do. The vertical width and the horizontal width are obtained as the maximum value and the minimum value for the X and Y coordinates of the shift position in the predetermined ratio area, respectively, the vertical width is the absolute value obtained by subtracting the minimum value from the maximum value of the Y coordinate, The absolute value can be obtained by subtracting the minimum value from the maximum coordinate value.

さらに、特徴量として、所定割合領域の縦幅と横幅を演算した値を用いることもできる。例えば、縦幅と横幅の和、又は縦幅と横幅の積を用いる。これら値により、所定割合領域の大きさの評価を行うことができる。   Furthermore, a value obtained by calculating the vertical width and the horizontal width of the predetermined ratio area can also be used as the feature amount. For example, the sum of the vertical width and the horizontal width or the product of the vertical width and the horizontal width is used. With these values, the size of the predetermined ratio area can be evaluated.

また、縦幅と横幅の差、又は縦幅と横幅の比を用いることもできる。これら値により、所定割合領域の真円度を評価することができ、縦幅と横幅の差では真円度をシフト位置の絶対量で評価することができ、縦幅と横幅の比では真円度を比で評価することができる。   Further, a difference between the vertical width and the horizontal width, or a ratio between the vertical width and the horizontal width can be used. These values can be used to evaluate the roundness of a given area, the roundness can be evaluated by the absolute amount of the shift position based on the difference between the vertical width and the horizontal width, and the roundness can be evaluated based on the ratio of the vertical width to the horizontal width. The degree can be evaluated as a ratio.

なお、所定割合領域の形状を示す特徴量として面積値、縦幅、横幅、又は縦幅と横幅を演算した値を複数同時に用いて、判定を行ってもよい。さらに、判断部307において、前述した最大最小除算値を用いる方法と、所定割合領域の形状を示す特徴量を用いる方法を同時に用いて判定を行ってもよい。この場合、両方法共に位置合わせ可能であると判定された場合のみ、判断部307の出力として位置合わせが可能とする。   Note that the determination may be performed by simultaneously using a plurality of values obtained by calculating the area value, the vertical width, the horizontal width, or the vertical width and the horizontal width as the feature amount indicating the shape of the predetermined ratio area. Further, the determination unit 307 may perform the determination using the above-described method using the maximum / minimum division value and the method using the feature amount indicating the shape of the predetermined ratio area at the same time. In this case, alignment is possible as an output of the determination unit 307 only when it is determined that both methods can be aligned.

また、第3の実施の形態の画像処理装置において、判断部307で位置合わせが不可能と判定され位置合わせ処理が行われなかった場合、撮影位置を変えてフィルタ画像を撮り直し、撮り直したフィルタ画像に対して、再度、位置合わせ処理を、フィルタ画像の位置合わせが行われる、もしくは指定回数になるまで複数回繰り返してもよい。指定回数とは、位置合わせ処理の繰り返しの限界回数であり、何度撮影しても位置合わせを行うことができない場合、処理を終了させるために設定しておく。こうすることで、位置合わせ処理におけるリトライを自動化することが可能である。   Further, in the image processing apparatus according to the third embodiment, when it is determined that the alignment is impossible by the determination unit 307 and the alignment process is not performed, the filter image is re-taken by changing the shooting position, and the image is re-taken. The alignment process may be repeated on the filter image a plurality of times until the alignment of the filter image is performed or the designated number of times is reached. The designated number of times is a limit number of repetitions of the alignment process, and is set to end the process when the alignment cannot be performed no matter how many times the image is taken. By doing so, it is possible to automate the retry in the alignment process.

(第4の実施の形態)
次に、本発明の第4の実施の形態の画像処理装置について説明する。本発明の第4の実施の形態の画像処理装置の構成を示すブロック図は、図1と同じであるが、領域画素データ積算部103とシフト量算出部104の動作が異なっている。すなわち、入力されたフィルタ画像101が予め与えられている第1の移動範囲よりも大きくシフトしている場合、誤った位置合わせを行わないようにしたものである。
(Fourth embodiment)
Next, an image processing apparatus according to a fourth embodiment of the present invention will be described. The block diagram showing the configuration of the image processing apparatus according to the fourth embodiment of the present invention is the same as that shown in FIG. 1, but the operations of the area pixel data integrating unit 103 and the shift amount calculating unit 104 are different. In other words, when the input filter image 101 is shifted larger than the first movement range given in advance, incorrect alignment is not performed.

本発明の第4の実施の形態の画像処理装置の領域画素データ積算部103は、予め与えられている第1の移動範囲より大きい所定の範囲(以下、第2の移動範囲と称す)でフィルタ画像101に対して演算領域を相対的にずらす機能を持ち、この第2の移動範囲内における各シフト位置の領域積算データを図3に示すステップS102ならびにステップS105と同様にして逐次算出する。   The area pixel data integration unit 103 of the image processing apparatus according to the fourth embodiment of the present invention performs filtering within a predetermined range (hereinafter referred to as a second movement range) that is greater than a first movement range given in advance. A function of shifting the calculation area relative to the image 101 is provided, and area integration data at each shift position within the second movement range is sequentially calculated in the same manner as in steps S102 and S105 shown in FIG.

図19は、予め与えられている第1の移動範囲と第2の移動範囲を図示したものである。第2の移動範囲のサイズは、第1の移動範囲より大きいサイズにしておけばよく、第1の移動範囲と第2の移動範囲の中心が一致するように設定しておく。ただし、第2の移動範囲が大きすぎると大きさに応じて演算量が増加するので、ここでは1辺の長さが第1の移動範囲の1.2倍になるように設定することとする。この倍率は、一例でありフィルタ画像におけるずれ量に応じて設定すればよく、ずれ量が大きいほど大きい倍率を設定する。   FIG. 19 illustrates a first movement range and a second movement range given in advance. The size of the second movement range may be larger than the first movement range, and is set so that the centers of the first movement range and the second movement range coincide. However, if the second movement range is too large, the amount of calculation increases according to the size, so here the length of one side is set to be 1.2 times the first movement range. . This magnification is an example, and may be set according to the amount of deviation in the filter image. The larger the amount of deviation, the larger the magnification is set.

本発明の第4の実施の形態のシフト量算出部104では、図3に示すステップS105と同様にして領域画素データ積算部103から出力された各シフト位置の領域積算データの中で最大値を求め、最大値に対応するシフト位置を、位置合わせのシフト量として位置補正部105に出力する。ただし、最大値に対応するシフト位置が第1の移動範囲よりも外にあった場合、これは第1の移動範囲内にフィルタ画像101を一致させるシフト位置が存在しなかったことを示しているので、フィルタ画像101の位置合せを行わないようにシフト量を0とし、位置補正部105に出力する。   In the shift amount calculation unit 104 according to the fourth embodiment of the present invention, the maximum value among the region integration data of each shift position output from the region pixel data integration unit 103 is obtained in the same manner as in step S105 shown in FIG. The obtained shift position corresponding to the maximum value is output to the position correction unit 105 as a shift amount for alignment. However, if the shift position corresponding to the maximum value is outside the first movement range, this indicates that there is no shift position for matching the filter image 101 within the first movement range. Therefore, the shift amount is set to 0 so that the filter image 101 is not aligned, and is output to the position correction unit 105.

以上のように、本発明の第4の実施の形態の画像処理装置によれば、第1の移動範囲よりも大きくシフトしているフィルタ画像に対して、誤った位置合わせを行なわないようにすることができる。さらに、算出したシフト量からどの程度第1の移動範囲より大きくフィルタ画像がシフトしているのかという情報を得ることができる。そして、この情報を用いて、予め第1の移動範囲を設定する際の調節を行うことも可能である。   As described above, according to the image processing apparatus of the fourth embodiment of the present invention, it is possible to prevent erroneous alignment with respect to a filter image that is shifted more than the first movement range. be able to. Furthermore, it is possible to obtain information on how much the filter image is shifted from the calculated shift amount to be larger than the first movement range. And it is also possible to perform adjustment when setting the first movement range in advance using this information.

なお、本発明の第4の実施の形態の画像処理装置のシフト量算出部104において、求めたシフト位置が、第2の移動範囲の最大シフト位置であった場合、所定の第2の移動範囲を一定量拡大する処理を行ってもよい。具体的に説明すると、最大値に対応するシフト位置が図19に示す第2の移動範囲の外周位置となる場合、第2の移動範囲を中心から均等に一定量拡大させる。なお拡大後の第2の移動範囲は、再度、求めたシフト位置が第2の移動範囲の最大シフト位置にならないように設定すればよく、一例として、元の第2の移動範囲における一辺の1.2倍を設定することとする。   In the shift amount calculation unit 104 of the image processing apparatus according to the fourth embodiment of the present invention, when the obtained shift position is the maximum shift position of the second movement range, the predetermined second movement range. A process of enlarging a certain amount may be performed. More specifically, when the shift position corresponding to the maximum value is the outer peripheral position of the second movement range shown in FIG. 19, the second movement range is uniformly expanded from the center by a certain amount. The second movement range after the enlargement may be set again so that the obtained shift position does not become the maximum shift position of the second movement range. As an example, one side of the original second movement range is set as one side. .2 times shall be set.

また、各シフト位置で求めた領域積算データにおいて、図17(b)に示すように最大値のシフト位置から遠ざかるほど領域積算データは小さくなるため、最大値のシフト位置が第2の移動範囲の外周位置にある場合、外周位置の外に、より大きな値となる領域積算データが存在する可能性があることが言え、逆に、最大値のシフト位置が第2の移動範囲の外周位置ではない場合は、その最大値のシフト位置が、最も一致する位置ということが言える。したがって、求めたシフト量が第2の移動範囲の最大シフト量であった場合、所定の第2の移動範囲を一定量拡大することにより、さらに大きくシフトしているフィルタ画像のシフト量を求めることが可能である。   Further, in the area integration data obtained at each shift position, as shown in FIG. 17B, the area integration data decreases as the distance from the maximum shift position increases, so that the maximum shift position is the second movement range. In the case of the outer peripheral position, it can be said that there is a possibility that there is a region integration data having a larger value outside the outer peripheral position. Conversely, the maximum shift position is not the outer peripheral position of the second movement range. In this case, the maximum shift position can be said to be the most consistent position. Therefore, when the obtained shift amount is the maximum shift amount of the second movement range, the shift amount of the filter image that is further shifted is obtained by enlarging the predetermined second movement range by a certain amount. Is possible.

また、シフト量算出部104において、求めたシフト位置が第2の移動範囲の最大シフト位置であった場合、所定の第2の移動範囲を、求めたシフト位置をシフト量としたときにシフトさせる方向にのみ一定量拡大してもよい。具体的に説明すると、最大値に対応するシフト位置が図19に示す第2の移動範囲の右側の外周位置となる場合、第2の移動範囲を右側方向にのみ一定量拡大させるようにする。第2の移動範囲が大きくなるほど演算量が増加するが、拡大させる方向を限定することで、第2の移動範囲を必要最小限の大きさで拡大させることができる。   Further, in the shift amount calculation unit 104, when the obtained shift position is the maximum shift position of the second movement range, the predetermined second movement range is shifted when the obtained shift position is used as the shift amount. A certain amount may be enlarged only in the direction. More specifically, when the shift position corresponding to the maximum value is the outer peripheral position on the right side of the second movement range shown in FIG. 19, the second movement range is expanded by a certain amount only in the right direction. Although the amount of calculation increases as the second movement range becomes larger, the second movement range can be enlarged with a necessary minimum size by limiting the direction of expansion.

また、前述したとおり、最大値のシフト位置が第2の移動範囲の外周位置ではない場合は、その最大値のシフト位置が最も一致する位置ということが言えるため、シフト量算出部104において求めたシフト位置が第2の移動範囲の最大シフト位置でない場合、求めたシフト位置が領域画素データ積算部103に予め与えられている第1の移動範囲より外にあっても、求めたシフト位置を位置合わせのシフト量とし位置合わせを行ってもよい。こうすることで、領域画素データ積算部103に予め与えられている第1の移動範囲が狭く設定されていても、位置合わせが可能である。   Further, as described above, when the maximum value shift position is not the outer peripheral position of the second movement range, it can be said that the maximum value shift position is the best match position, and thus the shift amount calculation unit 104 obtains it. If the shift position is not the maximum shift position of the second movement range, the obtained shift position is positioned even if the obtained shift position is outside the first movement range given in advance to the area pixel data integrating unit 103. Positioning may be performed using a shift amount of alignment. By doing so, alignment is possible even if the first movement range given in advance to the area pixel data integration unit 103 is set narrow.

さらに、本発明の第4の実施の形態4の画像処理装置において、位置合わせ処理が行われなかった場合、撮影位置を変えてフィルタ画像を撮り直し、撮り直したフィルタ画像に対して、再度、位置合わせ処理を、フィルタ画像の位置合わせが行われる、もしくは指定回数になるまで複数回繰り返してもよい。指定回数とは、位置合わせ処理の繰り返しの限界回数であり、何度撮影しても位置合わせを行うことができない場合、処理を終了させるために設定しておく。こうすることで、位置合わせ処理におけるリトライを自動化することが可能である。   Furthermore, in the image processing apparatus according to the fourth embodiment of the present invention, when the alignment processing is not performed, the filter position is changed and the filter image is re-taken. The alignment process may be repeated a plurality of times until the filter image is aligned or until the designated number of times is reached. The designated number of times is a limit number of repetitions of the alignment process, and is set to end the process when the alignment cannot be performed no matter how many times the image is taken. By doing so, it is possible to automate the retry in the alignment process.

(第5の実施の形態)
次に、本発明の第4の実施の形態の画像処理装置について説明する。本発明の第5の実施の形態5の画像処理装置の構成を示すブロック図は、図1と同じであるが、領域画素データ積算部103とシフト量算出部104の動作が異なっている。すなわち、複数の異なる撮影位置において同一のバントパスフィルタを用いて複数枚のフィルタ画像を撮影し、撮影したフィルタ画像のうち最も結果がよくなるフィルタ画像を用いて位置合わせを行うようにしたものである。
(Fifth embodiment)
Next, an image processing apparatus according to a fourth embodiment of the present invention will be described. The block diagram showing the configuration of the image processing apparatus according to the fifth embodiment of the present invention is the same as that shown in FIG. 1, but the operations of the region pixel data integrating unit 103 and the shift amount calculating unit 104 are different. That is, a plurality of filter images are photographed using the same bunt pass filter at a plurality of different photographing positions, and alignment is performed using a filter image with the best result among the photographed filter images. .

まず、複数の異なる撮影位置において同一のバントパスフィルタを用いて複数枚のフィルタ画像を撮影する。この際の撮影するフィルタ画像の枚数は3枚程度で十分である。   First, a plurality of filter images are photographed using the same bunt pass filter at a plurality of different photographing positions. In this case, about three filter images are sufficient to be photographed.

そして、本発明の第5の実施の形態の画像処理装置の領域画素データ積算部103は、複数枚のフィルタ画像に対する領域積算データを記憶しておく機能をさらに持ち、それぞれのフィルタ画像に対して演算領域を相対的にずらし、ずらした各シフト位置において領域積算データを求め、フィルタ画像毎に各シフト位置において求めた領域積算データを記憶しておく。   The area pixel data integration unit 103 of the image processing apparatus according to the fifth embodiment of the present invention further has a function of storing area integration data for a plurality of filter images, and for each filter image. The calculation area is relatively shifted, area integration data is obtained at each shifted shift position, and area integration data obtained at each shift position is stored for each filter image.

そして、本発明の第5の実施の形態の画像処理装置のシフト量算出部104では、フィルタ画像毎に記憶している領域積算データの中でそれぞれ最大値と最小値を求め、最大値を最小値で除算した値が最も大きい値を持つフィルタ画像の領域積算データからシフト量を算出し、算出したシフト量を位置補正部105に出力する。領域積算データからシフト量を算出する方法は、図3のステップS105で説明したものと同様であるため、ここでは説明を省略する。   Then, in the shift amount calculation unit 104 of the image processing apparatus according to the fifth embodiment of the present invention, the maximum value and the minimum value are obtained from the area integration data stored for each filter image, and the maximum value is minimized. The shift amount is calculated from the area integration data of the filter image having the largest value divided by the value, and the calculated shift amount is output to the position correction unit 105. Since the method for calculating the shift amount from the area integration data is the same as that described in step S105 in FIG. 3, the description thereof is omitted here.

以上のように、本発明の第5の実施の形態の画像処理装置によれば、前述したとおり領域積算データの中の最大値と最小値を除算した値は、ビーズ領域と背景領域の輝度レベルの差が大きいほど大きくなり、ビーズ領域と背景領域の輝度レベルの差が大きいほど位置合わせを精度良く行えるので、最大値を最小値で除算した値が最も大きい値を持つフィルタ画像の領域積算データからシフト量を算出することで、さらに精度の高い位置合わせを行うことができる。   As described above, according to the image processing apparatus of the fifth embodiment of the present invention, as described above, the value obtained by dividing the maximum value and the minimum value in the area integration data is the luminance level of the bead area and the background area. The larger the difference is, the larger the difference is. The larger the brightness level difference between the bead area and the background area is, the more accurate the alignment is. Therefore, the area integrated data of the filter image having the largest value obtained by dividing the maximum by the minimum By calculating the shift amount from the above, it is possible to perform alignment with higher accuracy.

本発明の画像処理装置は、複数の特定の波長帯域の光を透過させるバンドパスフィルタを通して撮影したそれぞれの画像における位置ずれに対して、対象物の発光特性に影響されずに精度良く位置合わせを行うことができ、複数のバンドパスフィルタを用いて発光波長の異なる蛍光物質の測定を行う各種処理装置に利用可能である。   The image processing apparatus of the present invention accurately aligns a positional shift in each image captured through a bandpass filter that transmits light in a plurality of specific wavelength bands without being affected by the light emission characteristics of the object. The present invention is applicable to various processing apparatuses that measure fluorescent substances having different emission wavelengths using a plurality of bandpass filters.

本発明の第1の実施の形態の画像処理装置の要部概略構成を示すブロック図1 is a block diagram showing a schematic configuration of a main part of an image processing apparatus according to a first embodiment of the present invention. 本発明の第1の実施の形態の画像処理装置に入力されるフィルタ画像の一例を示す図The figure which shows an example of the filter image input into the image processing apparatus of the 1st Embodiment of this invention 本発明の第1の実施の形態の画像処理装置が行う画像処理を説明するフローチャートThe flowchart explaining the image processing which the image processing apparatus of the 1st Embodiment of this invention performs 本発明の第1の実施の形態の画像処理装置に入力されるフィルタ画像における演算領域を示す図The figure which shows the calculation area | region in the filter image input into the image processing apparatus of the 1st Embodiment of this invention 本発明の第1の実施の形態の画像処理装置に入力されるフィルタ画像からはみ出した演算領域を示す図The figure which shows the calculation area | region protruded from the filter image input into the image processing apparatus of the 1st Embodiment of this invention 本発明の第1の実施の形態の画像処理装置に入力されるフィルタ画像のX軸と平行な線上の画素の輝度値を示す図The figure which shows the luminance value of the pixel on the line parallel to the X-axis of the filter image input into the image processing apparatus of the 1st Embodiment of this invention 本発明の第1の実施の形態の画像処理装置に入力されるフィルタ画像のビーズ領域に対し演算領域が大きい場合の一例を示す図The figure which shows an example when a calculation area | region is large with respect to the bead area | region of the filter image input into the image processing apparatus of the 1st Embodiment of this invention 本発明の第1の実施の形態の画像処理装置の演算領域設定部に記憶されるビーズに光を当てることによってできた影を撮影した演算領域算出画像の一例を示す図The figure which shows an example of the calculation area | region calculation image which image | photographed the shadow produced by irradiating light to the bead memorize | stored in the calculation area | region setting part of the image processing apparatus of the 1st Embodiment of this invention 本発明の第1の実施の形態の画像処理装置の演算領域設定部に記憶されるビーズに光を当てることによってできた影を撮影した演算領域算出画像の一例の輝度分布を示す図The figure which shows the luminance distribution of an example of the calculation area calculation image which image | photographed the shadow produced by irradiating the light memorize | stored in the bead memorize | stored in the calculation area setting part of the image processing apparatus of the 1st Embodiment of this invention 本発明の第1の実施の形態の画像処理装置の演算領域設定のためのテンプレートマッチング処理を示す図The figure which shows the template matching process for the calculation area setting of the image processing apparatus of the 1st Embodiment of this invention 本発明の第1の実施の形態の画像処理装置の演算領域設定のための演算領域算出画像の作成処理を説明する図The figure explaining the creation process of the calculation area calculation image for the calculation area setting of the image processing apparatus of the 1st Embodiment of this invention 本発明の第2の実施の形態の画像処理装置の要部概略構成を示すブロック図The block diagram which shows the principal part schematic structure of the image processing apparatus of the 2nd Embodiment of this invention. 本発明の第2の実施の形態の画像処理装置が行う画像処理を説明するフローチャートThe flowchart explaining the image processing which the image processing apparatus of the 2nd Embodiment of this invention performs 本発明の第3の実施の形態の画像処理装置の要部概略構成を示すブロック図The block diagram which shows the principal part schematic structure of the image processing apparatus of the 3rd Embodiment of this invention. 本発明の第3の実施の形態の画像処理装置が行う画像処理を説明するフローチャートThe flowchart explaining the image processing which the image processing apparatus of the 3rd Embodiment of this invention performs 位置合わせを行うフィルタ画像の撮影時に振動が起こった場合の画像の一例を示す図The figure which shows an example of the image when a vibration occurs at the time of imaging | photography of the filter image which performs alignment 位置合わせが可能なフィルタ画像の抽出したシフト領域の分布を説明する図The figure explaining the distribution of the shift area which the filter image which can be aligned extracted 図16に示す振動が起こった際のフィルタ画像の抽出したシフト領域の範囲を示す図The figure which shows the range of the shift area | region which the filter image extracted when the vibration shown in FIG. 16 occurred 領域積算データを求める処理を行うために演算領域を相対的に移動する第1の移動範囲と第2の移動範囲との関係を示す図The figure which shows the relationship between the 1st movement range which relatively moves a calculation area | region in order to perform the process which calculates | requires area | region integrated data, and a 2nd movement range. 従来の画像位置合わせ方法における位置合わせ処理のフローチャートFlowchart of registration processing in conventional image registration method

符号の説明Explanation of symbols

101 フィルタ画像
102 演算領域設定部
103 領域画素データ積算部
104 シフト量算出部
105 位置補正部
106 出力画像
307 判断部
1001 最初のパターンマッチング位置
1002 パターンを検出した位置
1021 領域設定データ記憶部
1022 演算領域算出部
DESCRIPTION OF SYMBOLS 101 Filter image 102 Calculation area | region setting part 103 Area pixel data integration part 104 Shift amount calculation part 105 Position correction part 106 Output image 307 Judgment part 1001 Initial pattern matching position 1002 Position 1021 where pattern was detected Area setting data storage part 1022 Calculation area Calculation unit

Claims (36)

複数画像の位置合わせ処理を行う画像処理装置であって、
位置合わせを行うべき画像それぞれに対して、位置合わせのための演算処理を行う画素領域である演算領域を設定する演算領域設定部と、
処理対象画像における前記演算領域の画素の輝度値を加算した領域積算データを、前記演算領域を前記処理対象画像に対して相対的に移動させた複数のシフト位置で算出する領域画素データ積算部と、
前記領域画素データ積算部において算出した複数の前記領域積算データの中の最大値又は最小値に対応する前記シフト位置を示すシフト量を算出するシフト量算出部と、
前記シフト量算出部において算出した前記シフト量に基づいて、前記処理対象画像の補正画像を生成する位置補正部と、を備える画像処理装置。
An image processing apparatus that performs alignment processing of a plurality of images,
For each image to be aligned, a calculation area setting unit that sets a calculation area that is a pixel area for performing calculation processing for alignment;
A region pixel data integration unit that calculates region integration data obtained by adding luminance values of pixels in the calculation region in the processing target image at a plurality of shift positions that are moved relative to the processing target image; ,
A shift amount calculation unit that calculates a shift amount indicating the shift position corresponding to the maximum value or the minimum value among the plurality of region integration data calculated in the region pixel data integration unit;
An image processing apparatus comprising: a position correction unit that generates a corrected image of the processing target image based on the shift amount calculated by the shift amount calculation unit.
請求項1記載の画像処理装置であって、
前記演算領域設定部が設定する前記演算領域は、前記処理対象画像における位置合わせの基準となる対象物の領域である画像処理装置。
The image processing apparatus according to claim 1,
The image processing apparatus is an image processing device in which the calculation area set by the calculation area setting unit is an area of an object serving as a reference for alignment in the processing target image.
請求項1又は2記載の画像処理装置であって、
前記演算領域設定部が設定する前記演算領域は、前記演算領域を求めるための画像データである演算領域算出画像を2値化して得られた画像データの、一方の画素値が占める領域である画像処理装置。
The image processing apparatus according to claim 1 or 2,
The calculation area set by the calculation area setting unit is an area occupied by one pixel value of image data obtained by binarizing a calculation area calculation image that is image data for obtaining the calculation area. Processing equipment.
請求項3記載の画像処理装置であって、
前記演算領域算出画像は、前記処理対象画像における位置合わせの基準となる対象物に光を照射した時の影を撮影した画像である画像処理装置。
The image processing apparatus according to claim 3,
The calculation region calculation image is an image processing device that is an image obtained by photographing a shadow when an object that is a reference for alignment in the processing target image is irradiated with light.
請求項3記載の画像処理装置であって、
前記演算領域算出画像は、前記処理対象画像における位置合わせの基準となる全ての対象物が撮影されている画像である画像処理装置。
The image processing apparatus according to claim 3,
The image processing device is an image processing device in which the calculation area calculation image is an image in which all the objects serving as the alignment reference in the processing target image are captured.
請求項5記載の画像処理装置であって、
前記位置合わせを行うべき画像は、通過帯域の異なる複数のフィルタを切り換えて撮影された撮影画像であり、
前記演算領域算出画像は、前記複数のフィルタの全通過帯域を通過するフィルタを用いて、又はフィルタを用いずに撮影した画像である画像処理装置。
The image processing apparatus according to claim 5, wherein
The image to be aligned is a photographed image photographed by switching a plurality of filters having different passbands,
The calculation region calculation image is an image processing device that is an image captured using a filter that passes through all the passbands of the plurality of filters or without using a filter.
請求項1記載の画像処理装置であって、
前記位置合わせを行うべき画像は、通過帯域の異なる複数のフィルタを切り換えて撮影された撮影画像であり、
前記演算領域設定部は、撮影される対象物の画像パターンの形状を示すマスクパターンを有し、前記撮影画像の複数の画像を重ね合わせて各画像の対応する画素の輝度値を加算した画像データを作成し、該画像データにおいて予め与えられた閾値に基づいて抽出した領域の重心位置とマスクパターンの重心位置が一致するようにマスクパターンを配置し、該マスクパターンの領域を演算領域とする画像処理装置。
The image processing apparatus according to claim 1,
The image to be aligned is a photographed image photographed by switching a plurality of filters having different passbands,
The calculation area setting unit has a mask pattern indicating the shape of the image pattern of the object to be photographed, and image data obtained by superimposing a plurality of images of the photographed image and adding luminance values of corresponding pixels of the images. An image in which the mask pattern is arranged so that the centroid position of the region extracted based on the threshold given in advance in the image data and the centroid position of the mask pattern coincide with each other, and the mask pattern region is used as the calculation region Processing equipment.
請求項1ないし7のいずれか1項記載の画像処理装置であって、
前記領域画素データ積算部は、前記演算領域設定部によって設定される前記演算領域のうち、前記相対的に移動させる範囲に応じて定められる前記演算領域の前記輝度値を加算する画像処理装置。
The image processing apparatus according to any one of claims 1 to 7,
The area pixel data integration unit is an image processing device that adds the luminance value of the calculation area determined according to the range to be relatively moved among the calculation areas set by the calculation area setting unit.
請求項8記載の画像処理装置であって、
前記領域画素データ積算部は、前記処理対象画像の周辺部分を除く部分に対応する前記演算領域の前記輝度値を加算する画像処理装置。
The image processing apparatus according to claim 8, wherein
The area pixel data integrating unit is an image processing apparatus that adds the luminance values of the calculation area corresponding to a portion excluding a peripheral portion of the processing target image.
請求項1ないし7のいずれか1項記載の画像処理装置であって、
前記演算領域設定部は、前記相対的に移動させる範囲に応じて定められる範囲に、前記演算領域を設定する画像処理装置。
The image processing apparatus according to any one of claims 1 to 7,
The calculation region setting unit is an image processing device that sets the calculation region in a range determined according to the relatively moved range.
請求項10記載の画像処理装置であって、
前記演算領域を設定する領域は、前記処理対象画像の周辺部分を除く部分に対応する領域である画像処理装置。
The image processing apparatus according to claim 10,
The area for setting the calculation area is an image processing apparatus corresponding to a portion excluding a peripheral portion of the processing target image.
請求項1ないし11のいずれか1項記載の画像処理装置であって、
前記領域画素データ積算部は、1画素よりも大きい間隔で、前記演算領域を前記処理対象画像に対して相対的に移動させる画像処理装置。
The image processing apparatus according to any one of claims 1 to 11,
The area pixel data integration unit is an image processing apparatus that moves the calculation area relative to the processing target image at an interval larger than one pixel.
請求項1ないし12のいずれか1項記載の画像処理装置であって、
前記領域画素データ積算部は、前記シフト位置に対応する格納アドレスを持ったテーブルを有し、そのアドレス位置に、そのシフト位置における領域積算データを記憶する画像処理装置。
The image processing apparatus according to any one of claims 1 to 12,
The area pixel data integration unit includes an image processing apparatus having a table having a storage address corresponding to the shift position, and storing area integration data at the shift position at the address position.
請求項1ないし13のいずれか1項記載の画像処理装置であって、
前記領域画素データ積算部は、前記演算領域の画素の輝度値を加算した結果から予め与えた一定値を減算した値を前記領域積算データとする画像処理装置。
An image processing apparatus according to any one of claims 1 to 13,
The area pixel data integration unit is an image processing apparatus in which a value obtained by subtracting a predetermined value from a result of adding luminance values of pixels in the calculation area is used as the area integration data.
請求項1ないし14のいずれか1項記載の画像処理装置であって、
前記領域画素データ積算部は、前記処理対象画像における前記演算領域の繋がっている領域毎に平均輝度値を算出し、算出した各領域の平均輝度値を全て加算した値を領域積算データとする画像処理装置。
15. The image processing apparatus according to claim 1, wherein
The region pixel data integration unit calculates an average luminance value for each region connected to the calculation region in the processing target image, and uses the value obtained by adding all the calculated average luminance values of the regions as region integration data. Processing equipment.
請求項1ないし15のいずれか1項記載の画像処理装置であって、
前記シフト量算出部は、前記領域画素データ積算部で算出した領域積算データの最大値又は最小値が複数ある場合、最大値又は最小値に対応する複数のシフト量の平均値をシフト量とする画像処理装置。
The image processing apparatus according to any one of claims 1 to 15,
The shift amount calculation unit uses an average value of a plurality of shift amounts corresponding to the maximum value or the minimum value as a shift amount when there are a plurality of maximum values or minimum values of the region integration data calculated by the region pixel data integration unit. Image processing device.
請求項1ないし16のいずれか1項記載の画像処理装置であって、
前記シフト量算出部は、1画素よりも大きい間隔で前記演算領域を前記処理対象画像に対して相対的に移動させたときのシフト量の最大値又は最小値を前記領域画素データ積算部に出力する画像処理装置。
The image processing apparatus according to any one of claims 1 to 16,
The shift amount calculation unit outputs a maximum value or a minimum value of a shift amount when the calculation region is moved relative to the processing target image at an interval larger than one pixel to the region pixel data integration unit. An image processing apparatus.
請求項17記載の画像処理装置であって、
前記領域画素データ積算部は、前記シフト量算出部から入力されるシフト量の最大値又は最小値に対応する移動位置近傍で、より狭い範囲でかつより小さい間隔で前記演算領域を前記処理対象画像に対して相対的に移動させた場合の前記領域積算データを再度算出する画像処理装置。
The image processing device according to claim 17,
The region pixel data integration unit is configured to display the processing region in a narrower range and at a smaller interval in the vicinity of the movement position corresponding to the maximum value or the minimum value of the shift amount input from the shift amount calculation unit. An image processing apparatus that recalculates the area integration data when moved relative to the image.
請求項18記載の画像処理装置であって
前記領域画素データ積算部は、前記領域積算データを再度算出する場合、既算出の移動位置における前記領域積算データの算出を省略する画像処理装置。
The image processing device according to claim 18, wherein the region pixel data integration unit omits the calculation of the region integration data at the already calculated movement position when calculating the region integration data again.
請求項1ないし19のいずれか1項記載の画像処理装置であって、
前記領域画素データ積算部で算出した前記領域積算データに基づいて、前記処理対象画像の位置合わせの可否を判定する判断部をさらに備える画像処理装置。
The image processing apparatus according to any one of claims 1 to 19,
An image processing apparatus further comprising: a determination unit that determines whether or not the processing target image can be aligned based on the region integration data calculated by the region pixel data integration unit.
請求項20記載の画像処理装置であって、
前記判断部は、前記領域画素データ積算部で算出した前記領域積算データの中で最大値と最小値を求め、求めた最大値と最小値との比に基づいて前記処理対象画像の位置合わせの可否を判定する画像処理装置。
The image processing apparatus according to claim 20, wherein
The determination unit obtains a maximum value and a minimum value in the region integration data calculated by the region pixel data integration unit, and performs alignment of the processing target image based on a ratio between the calculated maximum value and minimum value. An image processing apparatus that determines whether or not it is possible.
請求項20記載の画像処理装置であって、
前記判断部は、前記領域画素データ積算部で算出した前記領域積算データの中で最大値又は最小値を求め、求めた最大値又は最小値に対して所定の割合の値を持つシフト位置を抽出し、抽出したシフト位置の分布に基づいて前記処理対象画像の位置合わせの可否を判定する画像処理装置。
The image processing apparatus according to claim 20, wherein
The determination unit obtains a maximum value or a minimum value from the region integration data calculated by the region pixel data integration unit, and extracts a shift position having a predetermined ratio with respect to the calculated maximum value or minimum value. An image processing apparatus that determines whether or not the processing target image can be aligned based on the extracted distribution of shift positions.
請求項22記載の画像処理装置であって、
前記判断部は、前記抽出したシフト位置の存在範囲の大きさに基づいて前記処理対象画像の位置合わせの可否を判定する画像処理装置。
The image processing apparatus according to claim 22, wherein
The determination unit is an image processing apparatus that determines whether or not alignment of the processing target image is possible based on a size of the extracted range of shift positions.
請求項22記載の画像処理装置であって、
前記判断部は、前記抽出したシフト位置の存在範囲の縦幅又は横幅の少なくとも一方の大きさに基づいて前記処理対象画像の位置合わせの可否を判定する画像処理装置。
The image processing apparatus according to claim 22, wherein
The determination unit is an image processing apparatus that determines whether or not the processing target image can be aligned based on at least one of a vertical width and a horizontal width of the extracted shift position existence range.
請求項22記載の画像処理装置であって、
前記判断部は、前記抽出したシフト位置の存在範囲の縦幅と横幅の和に基づいて前記処理対象画像の位置合わせの可否を判定する画像処理装置。
The image processing apparatus according to claim 22, wherein
The determination unit is an image processing apparatus that determines whether or not alignment of the processing target image is possible based on a sum of a vertical width and a horizontal width of the extracted shift position existence range.
請求項22記載の画像処理装置であって、
前記判断部は、前記抽出したシフト位置の存在範囲の縦幅と横幅の積に基づいて前記処理対象画像の位置合わせの可否を判定する画像処理装置。
The image processing apparatus according to claim 22, wherein
The determination unit is an image processing apparatus that determines whether or not the processing target image can be aligned based on a product of a vertical width and a horizontal width of the extracted range of shift positions.
請求項22記載の画像処理装置であって、
前記判断部は、前記抽出したシフト位置の存在範囲の縦幅と横幅の差に基づいて前記処理対象画像の位置合わせの可否を判定する画像処理装置。
The image processing apparatus according to claim 22, wherein
The determination unit is an image processing apparatus that determines whether or not alignment of the processing target image is possible based on a difference between a vertical width and a horizontal width of the extracted shift position existence range.
請求項22記載の画像処理装置であって、
前記判断部は、前記抽出したシフト位置の存在範囲の縦幅と横幅の比に基づいて前記処理対象画像の位置合わせの可否を判定する画像処理装置。
The image processing apparatus according to claim 22, wherein
The determination unit is an image processing apparatus that determines whether or not the processing target image can be aligned based on a ratio of a vertical width and a horizontal width of the extracted range of shift positions.
請求項20ないし請求項28のいずれか1項記載の画像処理装置であって、
前記位置合わせを行うべき画像は、通過帯域の異なる複数のフィルタを切り換えて撮影された撮影画像であり、
前記判断部は、位置合わせ不可と判定した場合、同じフィルタを用い、撮影位置を変えて撮影した画像に変更して位置合わせ処理を繰り返す画像処理装置。
The image processing apparatus according to any one of claims 20 to 28, wherein:
The image to be aligned is a photographed image photographed by switching a plurality of filters having different passbands,
When the determination unit determines that positioning is impossible, the image processing apparatus uses the same filter, changes the shooting position, changes to a shot image, and repeats the positioning process.
請求項1ないし29のいずれか1項記載の画像処理装置であって、
前記領域画素データ積算部は、第2の移動範囲において前記演算領域を前記処理対象画像に対して相対的に移動させた複数のシフト位置で、前記領域積算データを算出するものであり、
前記シフト量算出部は、前記第2の移動範囲における前記領域積算データの最大値又は最小値を求め、求めた最大値又は最小値に対応するシフト位置が、前記第2の移動範囲より小さい第1の移動範囲内にある場合は、前記最大値又は最小値に対応するシフト位置を示すシフト量を前記シフト量として出力し、前記第1の移動範囲外にある場合は、前記シフト量を0として出力する画像処理装置。
An image processing apparatus according to any one of claims 1 to 29,
The region pixel data integration unit calculates the region integration data at a plurality of shift positions in which the calculation region is moved relative to the processing target image in a second movement range.
The shift amount calculation unit obtains a maximum value or a minimum value of the area integration data in the second movement range, and a shift position corresponding to the obtained maximum value or minimum value is smaller than the second movement range. If it is within the movement range of 1, the shift amount indicating the shift position corresponding to the maximum value or the minimum value is output as the shift amount, and if it is outside the first movement range, the shift amount is set to 0. As an image processing apparatus.
請求項30記載の画像処理装置であって、
前記領域画素データ積算部は、前記第2の移動範囲における前記領域積算データの最大値又は最小値に対応するシフト位置が前記第2の移動範囲の最大シフト位置である場合、前記第2の移動範囲を一定量拡大する画像処理装置。
The image processing apparatus according to claim 30, wherein
When the shift position corresponding to the maximum value or the minimum value of the region integration data in the second movement range is the maximum shift position of the second movement range, the region pixel data integration unit is configured to perform the second movement. An image processing device that expands the range by a certain amount.
請求項31記載の画像処理装置であって、
前記領域画素データ積算部は、前記第2の移動範囲における前記領域積算データの最大値又は最小値に対応するシフト位置が前記第2の移動範囲の最大シフト位置である場合、そのシフト位置に対応するシフト量の方向にのみ前記第2の移動範囲を一定量拡大する画像処理装置。
The image processing apparatus according to claim 31, wherein
The area pixel data integration unit corresponds to the shift position when the shift position corresponding to the maximum value or the minimum value of the area integration data in the second movement range is the maximum shift position of the second movement range. An image processing apparatus that expands the second movement range by a certain amount only in the direction of the shift amount to be performed.
請求項30ないし32のいずれか1項記載の画像処理装置であって、
前記位置合わせを行うべき画像は、通過帯域の異なる複数のフィルタを切り換えて撮影された撮影画像であり、
前記領域画素データ積算部において求めた前記第2の移動範囲における前記領域積算データの最大値又は最小値に対応するシフト位置が前記第1の移動範囲外にある場合、同じフィルタを用い、撮影位置を変えて撮影した画像に変更して位置合わせ処理を繰り返す画像処理装置。
The image processing apparatus according to any one of claims 30 to 32, wherein:
The image to be aligned is a photographed image photographed by switching a plurality of filters having different passbands,
When the shift position corresponding to the maximum value or the minimum value of the area integration data in the second movement range obtained in the area pixel data integration unit is outside the first movement range, the same filter is used, An image processing apparatus that changes the image to a photographed image and repeats the alignment process.
請求項30記載の画像処理装置であって、
前記シフト量算出部は、前記第2の移動範囲における前記領域積算データの最大値又は最小値に対応するシフト位置が前記第1の移動範囲外にある場合で、かつ前記第2の移動範囲の最大シフト位置でない場合は、そのシフト位置を示すシフト量を前記シフト量として出力する画像処理装置。
The image processing apparatus according to claim 30, wherein
The shift amount calculation unit is a case where a shift position corresponding to the maximum value or the minimum value of the area integration data in the second movement range is outside the first movement range, and in the second movement range. An image processing apparatus that outputs a shift amount indicating the shift position as the shift amount when it is not the maximum shift position.
請求項1ないし34のいずれか1項記載の画像処理装置であって、
前記位置合わせを行うべき画像は、通過帯域の異なる複数のフィルタを切り換えて撮影された撮影画像である画像処理装置。
An image processing apparatus according to any one of claims 1 to 34, wherein
The image processing apparatus, wherein the image to be aligned is a photographed image photographed by switching a plurality of filters having different pass bands.
請求項35記載の画像処理装置であって、
前記位置合わせを行うべき画像は、複数の異なる撮影位置において同一のフィルタを用いて撮影した画像を含み、
前記領域画素データ積算部は、複数枚の画像の前記領域積算データを記憶しておく機能を有し、
前記領域画素データ積算部では、それぞれのフィルタ画像に対して前記演算領域を相対的にずらし、ずらした各位置における領域積算データを求め、各フィルタ画像の領域積算データを記憶しておき、
前記シフト量算出部は、同一のフィルタを用いて撮影した画像毎に記憶している前記領域積算データの中でそれぞれ最大値と最小値を求め、求めた最大値と最小値との比に基づいて特定の画像を選択し、その画像の前記シフト量を算出する画像処理装置。
36. The image processing device according to claim 35, wherein
The image to be aligned includes images taken using the same filter at a plurality of different shooting positions,
The region pixel data integration unit has a function of storing the region integration data of a plurality of images,
The region pixel data integration unit shifts the calculation region relative to each filter image, obtains region integration data at each shifted position, stores the region integration data of each filter image,
The shift amount calculation unit obtains a maximum value and a minimum value in the area integration data stored for each image photographed using the same filter, and based on a ratio between the obtained maximum value and minimum value An image processing apparatus that selects a specific image and calculates the shift amount of the image.
JP2005040660A 2005-02-17 2005-02-17 Image processor Withdrawn JP2006227895A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2005040660A JP2006227895A (en) 2005-02-17 2005-02-17 Image processor

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2005040660A JP2006227895A (en) 2005-02-17 2005-02-17 Image processor

Publications (1)

Publication Number Publication Date
JP2006227895A true JP2006227895A (en) 2006-08-31

Family

ID=36989237

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2005040660A Withdrawn JP2006227895A (en) 2005-02-17 2005-02-17 Image processor

Country Status (1)

Country Link
JP (1) JP2006227895A (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110333253A (en) * 2018-03-29 2019-10-15 住友化学株式会社 Image processing apparatus, foreign body detecting device, image processing method and foreign matter checking method

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110333253A (en) * 2018-03-29 2019-10-15 住友化学株式会社 Image processing apparatus, foreign body detecting device, image processing method and foreign matter checking method

Similar Documents

Publication Publication Date Title
US10937146B2 (en) Image evaluation method and image evaluation device
KR101522804B1 (en) Pattern matching apparatus and recording medium
JP5313939B2 (en) Pattern inspection method, pattern inspection program, electronic device inspection system
WO2019150872A1 (en) Image processing device and image processing method
US11669953B2 (en) Pattern matching device and computer program for pattern matching
JP2017146298A (en) Shape measurement system, shape measurement device and shape measurement method
JP4286657B2 (en) Method for measuring line and space pattern using scanning electron microscope
JP2018004632A (en) Pattern inspection method and pattern inspection device
JP5660861B2 (en) Foreign matter inspection method and foreign matter inspection apparatus on substrate
JP2008040705A (en) Blur filter design method
JPWO2015083675A1 (en) Pattern measuring apparatus and computer program
JP2007155405A (en) Visual inspection method and visual inspection device
JP5546364B2 (en) Solder inspection method
JP2006227895A (en) Image processor
JP5379571B2 (en) Pattern inspection apparatus and pattern inspection method
CN113128499B (en) Vibration testing method for visual imaging device, computer device and storage medium
WO2009107365A1 (en) Test method and test device for compound-eye distance measuring device and chart used therefor
JP2003279319A (en) Dimension inspection method and its device and production
JP2006293522A (en) Straight line detection device, straight line detection method, and program for the same
Tehrani et al. A practical method for fully automatic intrinsic camera calibration using directionally encoded light
JP2004515830A (en) Quadratic dispersion plot technique for defect detection
JP2021135893A (en) Inspection device, inspection method, and program
JP2006288467A (en) Device and method for judging irradiation field and its program
JP6595800B2 (en) Defect inspection apparatus and defect inspection method
JP4525130B2 (en) Image processing device

Legal Events

Date Code Title Description
RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20071113

RD04 Notification of resignation of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7424

Effective date: 20071120

A300 Withdrawal of application because of no request for examination

Free format text: JAPANESE INTERMEDIATE CODE: A300

Effective date: 20080513