JP5582572B2 - Image processing method, image processing program, computer-readable storage medium storing the same, and image processing apparatus - Google Patents
Image processing method, image processing program, computer-readable storage medium storing the same, and image processing apparatus Download PDFInfo
- Publication number
- JP5582572B2 JP5582572B2 JP2010250252A JP2010250252A JP5582572B2 JP 5582572 B2 JP5582572 B2 JP 5582572B2 JP 2010250252 A JP2010250252 A JP 2010250252A JP 2010250252 A JP2010250252 A JP 2010250252A JP 5582572 B2 JP5582572 B2 JP 5582572B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- pixel
- window
- reference image
- processing
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Image Processing (AREA)
- Image Analysis (AREA)
Description
本発明は、画像処理方法、画像処理プログラム、これを記憶したコンピュータ読み取り可能な記憶媒体、及び画像処理装置に関するものである。 The present invention relates to an image processing method, an image processing program, a computer-readable storage medium storing the image processing program, and an image processing apparatus.
FA分野などにおいて、画像認識技術が普及している。この画像認識技術の一つとしてステレオビジョン法がある。ステレオビジョン法は、複数のカメラからによって撮像された視点の異なる画像を利用して3次元情報を復元する技術であり、計測対象物の3次元形状や寸法、位置姿勢を高精度に計測可能という、他の画像認識技術では実現できない機能を有している。このため、ランダムに積載された部品群を対象とするロボットアームピッキングなどに利用されるなど産業界での応用例は幅広く、また、画像情報を異なる視点から取得するだけでよいために特殊なハードウェアを必要とせずに低コストで実現できる技術であることからも、ステレオビジョン法による位置姿勢計測は実用化が強く期待されている技術である。 Image recognition technology is prevalent in the FA field and the like. One of the image recognition techniques is the stereo vision method. The stereo vision method is a technology that restores three-dimensional information using images taken from a plurality of cameras with different viewpoints, and can measure the three-dimensional shape, dimensions, position and orientation of a measurement object with high accuracy. It has functions that cannot be realized by other image recognition technologies. For this reason, it has a wide range of applications in the industry, such as robot arm picking for randomly loaded parts, and special hardware is required because image information only needs to be acquired from different viewpoints. Because it is a technology that can be realized at low cost without the need for wear, the position and orientation measurement by the stereo vision method is a technology that is strongly expected to be put to practical use.
このステレオビジョン法では、三角測量を用いて3次元の位置を計算しているが、この3次元の位置を計算するためには、ある空間点が2つの画像上に投影された点の位置を特定する必要がある。具体的には、一方の画像を基準画像、もう一方の画像を参照画像とし、基準画像中の特定の位置の画素に対して、参照画像中から同じ点を探索する必要がある。この基準画像の特定の位置の画素に対応する参照画像中の対応点を探索するためには、例えば以下の数式1で示される差分絶対値和(SAD:Sum of Absolute Difference)や差分二乗和(SSD:Sum of Squared Difference)を用いて対応点探索処理が実行される。
これらSADやSSDの値が最も小さくなるような2次元位置を、基準画像に対する参照画像の対応点としている。そして、非特許文献1に開示されているように、再帰相関法を用いることによって、その計算量を大幅に低減することができ、ひいては、処理時間を短縮することが可能である。
In this stereo vision method, the three-dimensional position is calculated using triangulation. In order to calculate the three-dimensional position, the position of a point where a certain spatial point is projected on two images is calculated. Need to be identified. Specifically, it is necessary to search for the same point in the reference image for a pixel at a specific position in the standard image, with one image as the standard image and the other image as the reference image. In order to search for a corresponding point in the reference image corresponding to a pixel at a specific position in the reference image, for example, a sum of absolute differences (SAD) or a sum of squared differences (SAD) expressed by the
The two-dimensional position where the values of these SAD and SSD are the smallest is taken as the corresponding point of the reference image with respect to the standard image. Then, as disclosed in
しかしながら、上述した差分絶対値和や差分二乗和を用いた対応点探索処理では、基準画像と参照画像との間における輝度差が大きい場合や、基準画像又は参照画像内におけるコントラストが低い場合には誤対応が多発するために、正常に距離計測が行えなくなるという問題が発生する。このため、基準画像と参照画像との間における輝度差が大きい場合や、基準画像又は参照画像内のコントラストが低い場合には、数式2に示される正規化相互相関(NCC:Normalized Cross-Correlation)を用いて対応点探索処理をする必要があった。
そこで、本発明は、基準画像と参照画像との間における輝度差が大きい場合や、基準画像や参照画像内のコントラストが低い場合であっても処理速度を落とすことなく適切に対応点探索処理を行うことのできる画像処理方法、画像処理プログラム、これを記憶したコンピュータ読み取り可能な記憶媒体、及び画像処理装置を提供することを課題とする。 Therefore, the present invention appropriately performs the corresponding point search process without reducing the processing speed even when the luminance difference between the standard image and the reference image is large or when the contrast in the standard image or the reference image is low. An object is to provide an image processing method, an image processing program, a computer-readable storage medium storing the image processing program, and an image processing apparatus.
本発明に係る画像処理方法は、異なる視点から撮像された対象物の2枚の画像を基準画像及び参照画像として取得するステップと、前記基準画像及び参照画像における各画素の輝度をそれぞれ正規化処理する正規化処理ステップと、前記正規化処理された基準画像上に設定された基準ウィンドウ内の各画素と、前記正規化処理された参照画像上に設定され前記基準ウィンドウと同一サイズの参照ウィンドウ内の各画素との相関を算出することにより、前記基準画像上の注目点に対応する前記参照画像上の対応点を探索する対応点探索処理ステップと、を含み、前記正規化処理ステップは、前記基準画像及び参照画像上のそれぞれに設定された正規化処理ウィンドウ内の中央に位置する画素の輝度Iを、前記正規化処理ウィンドウ内における各画素の輝度の平均値μで減算したものを、前記正規化処理ウィンドウ内における各画素の輝度の標準偏差σで除算することにより正規化処理し、この正規化処理を前記基準画像及び参照画像の全画素毎に行う。 The image processing method according to the present invention includes a step of acquiring two images of an object captured from different viewpoints as a standard image and a reference image, and a normalization process for the luminance of each pixel in the standard image and the reference image. Normalization processing step, each pixel in the reference window set on the normalized reference image, and a reference window of the same size as the reference window set on the normalized reference image A corresponding point search processing step of searching for a corresponding point on the reference image corresponding to the target point on the base image by calculating a correlation with each pixel of the reference image, and the normalization processing step includes The luminance I of the pixel located at the center in the normalization processing window set on each of the reference image and the reference image is set in each normalization processing window. A value obtained by subtracting the average value μ of the prime luminance is divided by the standard deviation σ of the luminance of each pixel in the normalization processing window, and this normalization processing is performed on the reference image and the reference image. This is done for every pixel.
この画像処理方法は、対応点探査処理ステップの前に、基準画像及び参照画像における各画素の輝度をそれぞれ上述した方法で正規化処理している。このため、基準画像と参照画像との間における輝度差が大きい場合や、基準画像や参照画像内のコントラストが低い場合に、対応点探索処理ステップとしてSADやSSDを利用しても、誤対応が発生せず、適切に距離計測を行うことができる。なお、オクルージョンの問題を軽減するために、上記対象物の画像を3枚以上とすることもできる。また、上記正規化処理の式は、(I−μ)/σとなる。 In this image processing method, the luminance of each pixel in the base image and the reference image is normalized by the above-described method before the corresponding point search processing step. For this reason, when the brightness difference between the standard image and the reference image is large, or when the contrast in the standard image or the reference image is low, even if SAD or SSD is used as the corresponding point search processing step, there is an erroneous response. It does not occur, and distance measurement can be performed appropriately. In order to reduce the problem of occlusion, the number of images of the object can be three or more. The normalization formula is (I−μ) / σ.
なお、上記正規化処理ウィンドウは、基準ウィンドウと同一サイズに設定することが好ましい。 Note that the normalization window is preferably set to the same size as the reference window.
また、上記対応点探索処理ステップは、基準画像上に設定された基準ウィンドウ内の各画素の画素値と、参照画像上に設定された参照ウィンドウ内の各画素の画素値との差分絶対値和(SAD:Sum of Absolute Difference)を再帰相関法を用いて算出することで行うことが、迅速な画像処理を実現する観点から好ましい。その他にも、上記対応点探索処理ステップは、基準ウィンドウ内の各画素の画素値と、参照画像上に設定された参照ウィンドウ内の各画素の画素値との差分二乗和(SSD:Sum of Squared Difference)を再帰相関法を用いて算出することで行うこともできる。 Further, the corresponding point search processing step includes a sum of absolute differences between a pixel value of each pixel in the reference window set on the reference image and a pixel value of each pixel in the reference window set on the reference image. It is preferable to calculate (SAD: Sum of Absolute Difference) by using the recursive correlation method from the viewpoint of realizing rapid image processing. In addition, the corresponding point search processing step includes a sum of squares of differences (SSD: Sum of Squared) between the pixel value of each pixel in the reference window and the pixel value of each pixel in the reference window set on the reference image. Difference) can also be calculated by using a recursive correlation method.
また、上記対応点探索処理ステップは、エピポーラ線上に沿って参照画像内における対応点を探索することにより、探索範囲をエピポーラ線上に絞って探索することができ、対応点探索に要する計算量を少なくすることが可能となる。 In addition, the corresponding point search processing step can search by searching for the corresponding points in the reference image along the epipolar line so that the search range can be narrowed down to the epipolar line, and the amount of calculation required for the corresponding point search is reduced. It becomes possible to do.
また、本発明に係る画像処理プログラムは、上記いずれかに記載のステップをコンピュータに実行させるものである。 An image processing program according to the present invention causes a computer to execute any of the steps described above.
また、本発明に係るコンピュータ読み取り可能な記憶媒体は、上記画像処理プログラムを記憶したものである。 A computer-readable storage medium according to the present invention stores the image processing program.
また、本発明に係る画像処理装置は、撮影対象物を異なる視点から2枚の画像を基準画像及び参照画像として撮像する撮像部と、前記撮像部によって撮像された前記基準画像及び前記参照画像を画像処理する演算処理部と、を備え、前記演算処理部は、前記基準画像及び参照画像上のそれぞれに設定された正規化処理ウィンドウ内の中央に位置する画素の輝度Iを、前記正規化処理ウィンドウ内における各画素の輝度の平均値μで減算したものを、前記正規化処理ウィンドウ内における各画素の輝度の標準偏差σで除算することにより正規化処理し、この正規化処理を前記基準画像及び参照画像の全画素毎に行い、前記正規化処理された基準画像上に設定された基準ウィンドウ内の各画素と、前記正規化処理された参照画像上に設定され前記基準ウィンドウと同一サイズの参照ウィンドウ内の各画素との相関を算出することにより、前記基準画像上の注目点に対応する前記参照画像上の対応点を探索するように構成されている。 The image processing apparatus according to the present invention also includes an imaging unit that captures two images from different viewpoints as a standard image and a reference image, and the standard image and the reference image captured by the imaging unit. An arithmetic processing unit that performs image processing, and the arithmetic processing unit calculates a luminance I of a pixel located at a center in a normalization processing window set on each of the standard image and the reference image, and performs the normalization processing A value obtained by subtracting the average value μ of the luminance of each pixel in the window is divided by a standard deviation σ of the luminance of each pixel in the normalization processing window, and this normalization processing is performed on the reference image. And each pixel in the reference window set on the normalized reference image, and the reference image set on the normalized reference image. By calculating the correlation with each pixel in the reference window having the same size as the quasi-window, the corresponding point on the reference image corresponding to the attention point on the reference image is searched.
この画像処理装置によれば、演算処理部が、まず、上述したように基準画像及び参照画像における各画素の輝度をそれぞれ正規化処理し、その後、対応点探索処理を行うため、基準画像と参照画像との間における輝度差が大きい場合や、基準画像や参照画像内のコントラストが低い場合に、対応点探索処理ステップとしてSADやSSDを利用しても、誤対応が発生せず、適切に距離計測を行うことができる。なお、上記正規化処理ウィンドウは、基準ウィンドウと同一サイズであることが好ましい。 According to this image processing apparatus, the arithmetic processing unit first normalizes the luminance of each pixel in the standard image and the reference image as described above, and then performs the corresponding point search process. When there is a large luminance difference from the image or when the contrast in the base image or the reference image is low, even if SAD or SSD is used as the corresponding point search processing step, no miscorrespondence occurs, and an appropriate distance is obtained. Measurement can be performed. The normalization processing window is preferably the same size as the reference window.
本発明によれば、基準画像と参照画像との間における輝度差が大きい場合や、基準画像や参照画像内のコントラストが低い場合であっても処理速度を落とすことなく適切に対応点探索処理を行うことができる。 According to the present invention, even when the luminance difference between the standard image and the reference image is large or when the contrast in the standard image or the reference image is low, the corresponding point search process is appropriately performed without reducing the processing speed. It can be carried out.
以下、本発明に係る実施形態について図面を参照しつつ説明する。 Hereinafter, embodiments according to the present invention will be described with reference to the drawings.
図1は、本発明の一実施形態によるステレオビジョン画像処理装置1の基本構成を示している。本装置1は、演算処理部(以下、CPUと記す)2、データを記録する記録部3、記憶部(以下、メモリと記す)4、インターフェース部5、及びこれら各部の間でデータ(制御信号を含む)を交換するための内部バス6から構成された本体部10を備えている。また、この本体部10に、インターフェース部5を介して、操作部7、表示部8、第1及び第2撮像部C1、C2が接続されている。
FIG. 1 shows a basic configuration of a stereo vision
CPU2は、記録部3から所定のプログラムをメモリ4に読み出し、メモリ4の一部をワークエリアとして使用して、所定のデータ処理を実行するものであり、例えば、インターフェース部5を介して操作部7からの指示やデータの入力を受け、入力されたデータを記録部3に記録しつつ指示された処理を実行するなど、それらに応じた処理を実行する。また、CPU2は、実行途中の演算結果や、処理完了後の最終結果を適宜、記録部3に記録したり、インターフェース部5を介して所定の情報を表示部8に表示したりする。例えば、操作部7からの入力を受け付けるためのグラフィカルなユーザーインターフェース画像を表示部8に表示する。本装置は、コンピュータで実現することができ、その場合は、例えば、操作部7としてコンピュータ用のキーボードやマウスを使用し、表示部8としてCRTディスプレイや液晶ディスプレイ等を使用することができる。
The
第1及び第2撮像部C1、C2は、所定の間隔で所定の位置に配置され、撮像の対象物Tを撮像し、撮像された画像データを本体部10に伝送する。本体部10では、インターフェース部5を介して取得した各撮像部C1,C2からの画像データを、区別可能に、例えば、各撮像部C1、C2に対応する異なるファイル名を付けて、第1撮像部C1によって撮像された画像を基準画像、第2撮像部C2によって撮像された画像を参照画像として記録部3に記録する。なお、第1撮像部C1によって撮像された画像を参照画像、第2撮像部C2によって撮像された画像を基準画像としてもよい。
The first and second imaging units C <b> 1 and C <b> 2 are arranged at predetermined positions at predetermined intervals, capture the imaging target T, and transmit the captured image data to the
第1及び第2撮像部C1、C2からの出力信号がアナログ信号の場合、本体部10はAD(アナログデジタル)変換部(図示省略)を設け、所定の時間間隔で入力されるアナログ信号をサンプリングしてデジタルデータに変換する。なお、第1及び第2撮像部C1、C2からの出力信号がデジタルデータであればAD変換部は不要である。また、第1及び第2撮像部C1、C2は、少なくとも静止画像を撮像できる装置であればよく、例えば、デジタルカメラや、デジタル又はアナログのビデオカメラなどを使用することができる。
When the output signals from the first and second imaging units C1 and C2 are analog signals, the
以下、本装置1が行う処理について、図2のフローチャートに基づいて説明する。なお、以下においては、特に断らない限り、CPU2が行う処理、すなわちCPU2が各部を制御して行う処理として記載する。また、第1及び第2撮像部C1、C2は、測定対象物Tを撮像可能なように、所定位置に所定方向を向けて配置されており、その位置及び撮像方向の情報は記録部3に記録されている。また、第1及び第2撮像部C1、C2の内部及び外部パラメータは、予め校正実験によって求められ、記録部3に記録されている。
Hereinafter, processing performed by the
まず、ステップS1において、初期設定を行う。この初期設定は、ステップS2以降の処理を行うために必要な処理であり、例えば、第1及び第2撮像部C1、C2とのデータ伝送経路や制御プロトコルを確立し、第1及び第2撮像部C1、C2を制御可能とする。 First, in step S1, initial setting is performed. This initial setting is a process necessary for performing the processes after step S2. For example, a data transmission path and a control protocol with the first and second imaging units C1 and C2 are established, and the first and second imaging are performed. The parts C1 and C2 can be controlled.
次に、ステップS2において、第1及び第2撮像部C1、C2で対象物Tを撮像し、基準画像及び参照画像を取得する。なお、第1及び第2撮像部C1,C2によって撮像された画像は、本体部10に伝送されて、所定のファイル名で記録部3に記録される。これによって、記録部3には、それぞれ異なる位置、異なる方向から撮像された2枚の2次元画像データが基準画像、参照画像として記録される。なお、2枚の2次元画像データのうち、どちらを基準画像にしてもよい。
Next, in step S2, the target T is imaged by the first and second imaging units C1 and C2, and a standard image and a reference image are acquired. The images captured by the first and second imaging units C1 and C2 are transmitted to the
続いて、ステップS3として、この基準画像及び参照画像に対して正規化処理をする。基準画像を正規化処理する方法について詳細に説明すると、図3(a)に示すように、基準画像A上のある特定の位置に、後述する基準ウィンドウW1と同一サイズの正規化処理ウィンドウW3を設定する。そして、この位置における正規化処理ウィンドウW3内の各画素の輝度の平均値μ1及び標準偏差σ1を算出する。そして、この位置における正規化処理ウィンドウW3内の画素の輝度の平均値μ1及び標準偏差σ1を用いて、正規化処理ウィンドウW3の中央に位置する画素C1の輝度I1を以下の式に基づき正規化する。なお、図3中において、正規化処理された画素を斜線で示す。
(I1−μ1)/σ1
次に、図3(b)に示すように、正規化処理ウィンドウW3を右に一画素分だけずらし、この位置での正規化処理ウィンドウW3内における各画素の輝度の平均値μ2及び標準偏差σ2を算出し、上記同様に、この位置での正規化処理ウィンドウW3の中央に位置する画素C2の輝度I2を以下の式に基づき正規化する。
(I2−μ2)/σ2
以上の作業を繰り返すよう、正規化処理ウィンドウW3を基準画像A上において走査させることで、基準画像Aを構成する全画素に対して正規化処理を実行する。なお、参照画像Bについても同様の方法で全画素に対して正規化処理を行う。
Subsequently, in step S3, normalization processing is performed on the standard image and the reference image. The method for normalizing the reference image will be described in detail. As shown in FIG. 3A, a normalization processing window W3 having the same size as the reference window W1 described later is provided at a specific position on the reference image A. Set. Then, the average value μ 1 and the standard deviation σ 1 of the luminance of each pixel in the normalization processing window W3 at this position are calculated. Then, using the average luminance value μ 1 and standard deviation σ 1 of the pixels in the normalization processing window W3 at this position, the luminance I 1 of the pixel C 1 located in the center of the normalization processing window W3 is expressed by the following equation: Normalize based on. In FIG. 3, the normalized pixels are indicated by diagonal lines.
(I 1 -μ 1 ) / σ 1
Next, as shown in FIG. 3B, the normalization processing window W3 is shifted to the right by one pixel, and the average value μ 2 and standard deviation of the luminance of each pixel in the normalization processing window W3 at this position. σ 2 is calculated, and similarly to the above, the luminance I 2 of the pixel C 2 located at the center of the normalization
(I 2 −μ 2 ) / σ 2
By scanning the normalization processing window W3 on the reference image A so as to repeat the above operation, the normalization processing is executed for all the pixels constituting the reference image A. For the reference image B, the normalization process is performed on all pixels in the same manner.
以上のように正規化処理された基準画像Aと参照画像Bとの間で、対応点探索処理を行う(ステップS4)。図4を参照しつつ詳細に説明すると、まず、基準画像Aのある画素を注目点Pとして設定し、この注目点Pを中心として基準画像A上に基準ウィンドウW1を設定する。なお、基準ウィンドウW1がラスタ走査されることによって、基準画像A上の全画素、若しくは、一定の間隔をあけて複数の画素が、注目点Pとして順次設定される。また、参照画像B上にも同様に、ある画素を中心とした参照ウィンドウW2を設定する。この参照ウィンドウW2は、基準ウィンドウW1と同一サイズであり、参照画像B上を走査しながら基準画像Aに設定した基準ウィンドウW1との類似度が最も高い領域を探索する。ここで、マッチングの際の誤りや計算量を軽減する観点から、参照ウィンドウW2を参照画像B上の対応するエピポーラ線上に設定し、参照ウィンドウW2をエピポーラ線上で走査しながら、基準画像Aに設定した基準ウィンドウW1との類似度が最も高い領域を探索することが好ましい。この探索の結果、参照画像B内において類似度が最も高い位置を、基準画像Aの注目点Pの対応点として特定する。なお、この基準ウィンドウW1や参照ウィンドウW2の大きさは特に限定されるものではなく,対象物の大きさや濃度変化および画像密度により決定される。 Corresponding point search processing is performed between the standard image A and the reference image B that have been normalized as described above (step S4). Referring to FIG. 4 in detail, first, a certain pixel of the reference image A is set as the attention point P, and a reference window W1 is set on the reference image A around the attention point P. Note that, by raster scanning the reference window W1, all the pixels on the reference image A or a plurality of pixels with a certain interval are sequentially set as the attention point P. Similarly, a reference window W2 centered on a certain pixel is set on the reference image B. The reference window W2 has the same size as the standard window W1, and searches for a region having the highest similarity with the standard window W1 set for the standard image A while scanning the reference image B. Here, from the viewpoint of reducing errors in matching and the amount of calculation, the reference window W2 is set on the corresponding epipolar line on the reference image B, and the reference window W2 is set on the reference image A while scanning on the epipolar line. It is preferable to search for a region having the highest degree of similarity with the reference window W1. As a result of this search, the position having the highest similarity in the reference image B is specified as the corresponding point of the attention point P of the standard image A. Note that the sizes of the standard window W1 and the reference window W2 are not particularly limited, and are determined by the size, density change, and image density of the object.
上述した対応点探索の際には、基準画像A上に設定された基準ウィンドウW1内における各画素値と、参照画像B上に設定された参照ウィンドウW2内における各画素値との差分絶対値和(SAD: Sum of Absolute Difference)や、基準画像A上に設定された基準ウィンドウW1内における各画素値と、参照画像B上に設定された参照ウィンドウW2内における各画素値との差分二乗和(SSD:Sum of Squared Difference)を用いて、類似度を評価することができる。また、これら差分絶対値和や、差分二乗和の計算量を低減させるために、再帰相関法を用いることが好ましい。そして、上記差分絶対値和や差分二乗和が最も小さくなる点を最も類似度が高い点として対応点を特定する。 In the above-described corresponding point search, the sum of absolute differences between each pixel value in the standard window W1 set on the standard image A and each pixel value in the reference window W2 set on the reference image B (SAD: Sum of Absolute Difference) or the sum of squared differences between each pixel value in the standard window W1 set on the standard image A and each pixel value in the reference window W2 set on the reference image B ( The degree of similarity can be evaluated using SSD (Sum of Squared Difference). In order to reduce the amount of calculation of the sum of absolute differences and the sum of squared differences, it is preferable to use a recursive correlation method. And a corresponding point is specified by making the point with the smallest difference absolute value sum or the sum of squared differences the point with the highest similarity.
なお、再帰相関法について図5を参照しつつ説明する。
以下のSADの式
の相関演算は、
The following SAD equation
The correlation operation of
以上のようにして、対応点が特定されると、三角測量の原理により距離画像が生成される。上述したように探索した対応点に基づいて距離画像を生成する(ステップS5)。 When the corresponding points are specified as described above, a distance image is generated based on the principle of triangulation. A distance image is generated based on the corresponding points searched as described above (step S5).
そして、上記ステップS5で生成した距離画像を記録部3に記録し(ステップS6)、画像処理を終了する。 Then, the distance image generated in step S5 is recorded in the recording unit 3 (step S6), and the image processing ends.
図2に示したブロック図中の各ステップは、所定のプログラムをコンピュータに実行させることにより実現することができる。このプログラムは、CD−ROM等のコンピュータ読み取り可能な記録媒体に記録して配布することも可能であるが、インターネット等を通じて配信することも可能である。 Each step in the block diagram shown in FIG. 2 can be realized by causing a computer to execute a predetermined program. This program can be recorded and distributed on a computer-readable recording medium such as a CD-ROM, but can also be distributed via the Internet or the like.
以上、本発明の実施形態について説明したが、本発明はこれらに限定されるものではなく、本発明の趣旨を逸脱しない限りにおいて種々の変更が可能である。例えば、上記実施形態では、2枚の画像で距離画像を生成しているが、これを3枚以上の画像から距離画像を生成することができる。この場合は、撮像部をその分増やして、基準画像Aを一枚、参照画像Bを複数枚とし、基準画像Aの注目点Pに対応する対応点を各参照画像Bから上記実施形態と同様の方法で探索する。 As mentioned above, although embodiment of this invention was described, this invention is not limited to these, A various change is possible unless it deviates from the meaning of this invention. For example, in the above embodiment, the distance image is generated from two images, but a distance image can be generated from three or more images. In this case, the number of imaging units is increased by that amount, one base image A and a plurality of reference images B, and corresponding points corresponding to the attention point P of the base image A are determined from each reference image B as in the above embodiment. Search by the method.
以下に実施例及び比較例を示して、本発明をさらに具体的に説明する。なお、本発明は、下記実施例に限定されるものではない。 The present invention will be described more specifically with reference to the following examples and comparative examples. In addition, this invention is not limited to the following Example.
2台のデジタルカメラを用いて、対象物Tである半解凍状態のタラの半身を異なる視点から撮像し、基準画像(図6(a))と参照画像(図6(b))を取得した。条件としては、基準カメラが対象物Tの設置面より610mm上方に設置されており、参照カメラが基準カメラから150mm右に離れた位置に設置されている。また、画像サイズは640×480pixelであり、画像取り込みレートは15fps、照明は4本の20W直流蛍光灯である。なお、基準カメラとは基準画像を撮像するカメラであり、参照カメラとは参照画像を撮像するカメラである。
Using two digital cameras, the half body of the half-decompressed cod that is the object T was imaged from different viewpoints, and a reference image (FIG. 6A) and a reference image (FIG. 6B) were acquired. . As a condition, the standard camera is installed 610 mm above the installation surface of the object T, and the reference camera is installed at a
以上の2つの画像に対して、15×15pixelの正規化処理ウィンドウW3で上述したように各画素の輝度を正規化処理し、その後、15×15pixelの基準ウィンドウW1及び参照ウィンドウW2で再帰相関法を用いたSADを利用して対応点探索処理を行い、3次元復元した結果が図7に示したグラフである(実施例1)。また、正規化処理を行わずに、単に基準画像と参照画像とを再帰相関法を用いたSADを利用して対応点探索処理を行い、3次元復元した結果が図8のグラフである(比較例1)。なお、各グラフのX、Y軸の値は、基準画像の画素座標(ピクセル)を示し、Z軸の値は視差を示している。 With respect to the above two images, the luminance of each pixel is normalized as described above in the normalization window W3 of 15 × 15 pixels, and then the recursive correlation method is performed in the reference window W1 and the reference window W2 of 15 × 15 pixels. FIG. 7 is a graph showing the result of performing the corresponding point search process using the SAD using the three-dimensional reconstruction (Example 1). Further, the result of three-dimensional restoration by performing the corresponding point search process using the SAD using the recursive correlation method for the standard image and the reference image without performing the normalization process is the graph of FIG. Example 1). The X and Y axis values of each graph indicate pixel coordinates (pixels) of the reference image, and the Z axis value indicates parallax.
図7及び図8のグラフから分かるように、比較例1では、誤対応によって、実際には存在しない線状のノイズや、距離測定が不能となった穴が多発しているが(図8参照)、実施例1では、そのような誤対応がほとんど発生していないことが分かる(図7参照)。 As can be seen from the graphs of FIGS. 7 and 8, in Comparative Example 1, there are many linear noises that do not actually exist and holes in which distance measurement is impossible due to mishandling (see FIG. 8). In Example 1, it can be seen that such erroneous correspondence hardly occurs (see FIG. 7).
1 画像処理装置
2 CPU(演算処理部)
A 基準画像
B 参照画像
P 注目点
T 対象物
W1 正規化処理ウィンドウ
W2 基準ウィンドウ
W3 参照ウィンドウ
1
A reference image B reference image P attention point T object W1 normalization processing window W2 reference window W3 reference window
Claims (8)
前記基準画像及び参照画像における各画素の輝度をそれぞれ正規化処理する正規化処理ステップと、
前記正規化処理された基準画像上に設定された基準ウィンドウ内の各画素と、前記正規化処理された参照画像上に設定され前記基準ウィンドウと同一サイズの参照ウィンドウ内の各画素との相関を算出することにより、前記基準画像上の注目点に対応する前記参照画像上の対応点を探索する対応点探索処理ステップと、
を含み、
前記正規化処理ステップは、前記基準画像及び参照画像上のそれぞれに設定された正規化処理ウィンドウ内の中央に位置する画素の輝度Iを、前記正規化処理ウィンドウ内における各画素の輝度の平均値μで減算したものを、前記正規化処理ウィンドウ内における各画素の輝度の標準偏差σで除算することにより正規化処理し、この正規化処理を前記基準画像及び参照画像の全画素毎に行う、画像処理方法。 Obtaining two images of the object imaged from different viewpoints as a standard image and a reference image;
Normalization processing steps for normalizing the luminance of each pixel in the standard image and the reference image;
Correlation between each pixel in the reference window set on the normalized reference image and each pixel in the reference window having the same size as the reference window set on the normalized reference image A corresponding point search processing step of searching for a corresponding point on the reference image corresponding to the target point on the base image by calculating;
Including
In the normalization processing step, the luminance I of the pixel located at the center in the normalization processing window set on each of the standard image and the reference image is calculated as an average value of the luminance of each pixel in the normalization processing window. What is subtracted by μ is normalized by dividing by the standard deviation σ of the luminance of each pixel in the normalization processing window, and this normalization processing is performed for every pixel of the reference image and the reference image. Image processing method.
前記撮像部によって撮像された前記基準画像及び前記参照画像を画像処理する演算処理部と、を備え、
前記演算処理部は、
前記基準画像及び参照画像上のそれぞれに設定された正規化処理ウィンドウ内の中央に位置する画素の輝度Iを、前記正規化処理ウィンドウ内における各画素の輝度の平均値μで減算したものを、前記正規化処理ウィンドウ内における各画素の輝度の標準偏差σで除算することにより正規化処理し、この正規化処理を前記基準画像及び参照画像の全画素毎に行い、
前記正規化処理された基準画像上に設定された基準ウィンドウ内の各画素と、前記正規化処理された参照画像上に設定され前記基準ウィンドウと同一サイズの参照ウィンドウ内の各画素との相関を算出することにより、前記基準画像上の注目点に対応する前記参照画像上の対応点を探索する、画像処理装置。 An imaging unit that captures two images from different viewpoints as a base image and a reference image;
An arithmetic processing unit that performs image processing on the reference image and the reference image captured by the imaging unit,
The arithmetic processing unit includes:
What is obtained by subtracting the luminance I of the pixel located in the center of the normalization processing window set on each of the standard image and the reference image by the average value μ of the luminance of each pixel in the normalization processing window, Normalization processing is performed by dividing by the standard deviation σ of luminance of each pixel in the normalization processing window, and this normalization processing is performed for every pixel of the standard image and the reference image,
Correlation between each pixel in the reference window set on the normalized reference image and each pixel in the reference window having the same size as the reference window set on the normalized reference image An image processing apparatus that searches for a corresponding point on the reference image corresponding to a point of interest on the base image by calculating.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010250252A JP5582572B2 (en) | 2010-11-08 | 2010-11-08 | Image processing method, image processing program, computer-readable storage medium storing the same, and image processing apparatus |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2010250252A JP5582572B2 (en) | 2010-11-08 | 2010-11-08 | Image processing method, image processing program, computer-readable storage medium storing the same, and image processing apparatus |
Publications (2)
Publication Number | Publication Date |
---|---|
JP2012103815A JP2012103815A (en) | 2012-05-31 |
JP5582572B2 true JP5582572B2 (en) | 2014-09-03 |
Family
ID=46394159
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2010250252A Active JP5582572B2 (en) | 2010-11-08 | 2010-11-08 | Image processing method, image processing program, computer-readable storage medium storing the same, and image processing apparatus |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP5582572B2 (en) |
Families Citing this family (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US11740709B2 (en) * | 2021-06-10 | 2023-08-29 | Pixart Imaging Inc. | Image quality improving method, optical navigation device control method, and optical navigation device using the methods |
Family Cites Families (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2929106B2 (en) * | 1989-07-24 | 1999-08-03 | 株式会社トプコン | Stereo matching method and apparatus |
JP2958462B1 (en) * | 1998-10-01 | 1999-10-06 | 工業技術院長 | Method and apparatus for correcting luminance of stereo image |
JP4749879B2 (en) * | 2005-03-31 | 2011-08-17 | 富士フイルム株式会社 | Face discrimination method, apparatus, and program |
JP4795737B2 (en) * | 2005-07-12 | 2011-10-19 | 富士フイルム株式会社 | Face detection method, apparatus, and program |
JP4840822B2 (en) * | 2007-08-29 | 2011-12-21 | 独立行政法人産業技術総合研究所 | Image processing method, apparatus and program |
JP4946896B2 (en) * | 2008-01-31 | 2012-06-06 | コニカミノルタホールディングス株式会社 | Distance measuring device and distance measuring method |
JP5311016B2 (en) * | 2008-12-10 | 2013-10-09 | コニカミノルタ株式会社 | Stereo camera unit and stereo matching method |
-
2010
- 2010-11-08 JP JP2010250252A patent/JP5582572B2/en active Active
Also Published As
Publication number | Publication date |
---|---|
JP2012103815A (en) | 2012-05-31 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US7733404B2 (en) | Fast imaging system calibration | |
US10027947B2 (en) | Image processing apparatus and image processing method | |
JP2005072888A (en) | Image projection method and image projection device | |
US20060215881A1 (en) | Distance measurement apparatus, electronic device, distance measurement method, distance measurement control program and computer-readable recording medium | |
WO2010101227A1 (en) | Device for creating information for positional estimation of matter, method for creating information for positional estimation of matter, and program | |
JP6403115B2 (en) | 3D information restoration device, 3D information restoration system, and 3D information restoration method | |
JP6502511B2 (en) | Calculation device, control method of calculation device, and calculation program | |
JP4941565B2 (en) | Corresponding point search apparatus and corresponding point searching method | |
JP2004235934A (en) | Calibration processor, calibration processing method, and computer program | |
TWI528783B (en) | Methods and systems for generating depth images and related computer products | |
JP6694234B2 (en) | Distance measuring device | |
JP2018087732A (en) | Wire rope measurement device and method | |
JP2008090583A (en) | Information processing system, program, and information processing method | |
JP2016217944A (en) | Measurement device and measurement method | |
TWI571099B (en) | Device and method for depth estimation | |
JP6494402B2 (en) | Image processing apparatus, imaging apparatus, image processing method, and program | |
JP2020134242A (en) | Measuring method, measuring device and program | |
JP5582572B2 (en) | Image processing method, image processing program, computer-readable storage medium storing the same, and image processing apparatus | |
JP6852406B2 (en) | Distance measuring device, distance measuring method and distance measuring program | |
JP6625654B2 (en) | Projection device, projection method, and program | |
WO2019058487A1 (en) | Three-dimensional reconstructed image processing device, three-dimensional reconstructed image processing method, and computer-readable storage medium having three-dimensional reconstructed image processing program stored thereon | |
JP2018032144A (en) | Image processor, image processing method and program | |
JP2012173858A (en) | Omnidirectional image generation method, image generation device and program | |
JPH10289315A (en) | Parallax calculation device and method, and distance calculation device and method | |
EP2953096B1 (en) | Information processing device, information processing method, system and carrier means |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130628 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20140210 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20140218 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140411 |
|
TRDD | Decision of grant or rejection written | ||
A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20140708 |
|
A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20140710 |
|
R150 | Certificate of patent or registration of utility model |
Ref document number: 5582572 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |
|
S533 | Written request for registration of change of name |
Free format text: JAPANESE INTERMEDIATE CODE: R313533 |
|
R350 | Written notification of registration of transfer |
Free format text: JAPANESE INTERMEDIATE CODE: R350 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |
|
R250 | Receipt of annual fees |
Free format text: JAPANESE INTERMEDIATE CODE: R250 |