JP2013037658A - Edge detection device and program thereof - Google Patents

Edge detection device and program thereof Download PDF

Info

Publication number
JP2013037658A
JP2013037658A JP2011175745A JP2011175745A JP2013037658A JP 2013037658 A JP2013037658 A JP 2013037658A JP 2011175745 A JP2011175745 A JP 2011175745A JP 2011175745 A JP2011175745 A JP 2011175745A JP 2013037658 A JP2013037658 A JP 2013037658A
Authority
JP
Japan
Prior art keywords
edge
threshold
value
threshold value
edge detection
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2011175745A
Other languages
Japanese (ja)
Other versions
JP5677234B2 (en
Inventor
Kankun Boku
漢薫 朴
Hideki Mitsumine
秀樹 三ッ峰
Masato Fujii
真人 藤井
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.)
Japan Broadcasting Corp
Original Assignee
Nippon Hoso Kyokai NHK
Japan Broadcasting Corp
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Nippon Hoso Kyokai NHK, Japan Broadcasting Corp filed Critical Nippon Hoso Kyokai NHK
Priority to JP2011175745A priority Critical patent/JP5677234B2/en
Publication of JP2013037658A publication Critical patent/JP2013037658A/en
Application granted granted Critical
Publication of JP5677234B2 publication Critical patent/JP5677234B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

PROBLEM TO BE SOLVED: To provide an edge detection device capable of accurately detecting each of frame images constituting a video image even when a photographic condition such as illumination is changed, and the program thereof.SOLUTION: An edge detection device 1 includes edge detection means 20 for using a first threshold and a second threshold to detect edge points of each frame image constituting a video image, edge tracking means 40 for tracking edge points of the preceding frame image having similar edge points, edge slope strength and edge direction from edge points of the current frame image, model generation and updating means 50 for distributing edge points detected by the edge detection means 20 to generate a Gaussian mixed model, and also adding edge points whose tracking is successful by the edge tracking means 40 to update the Gaussian mixed model, and threshold calculation means 60 for calculating a first threshold and a second threshold from the average value and standard deviation of the generated or updated Gaussian mixed model.

Description

本発明は入力された映像からエッジを検出するエッジ検出装置およびそのプログラムに関するものである。   The present invention relates to an edge detection device for detecting an edge from an input video and a program thereof.

従来、エッジ検出処理における代表的な手法としてCannyオペレータが挙げられる。Cannyオペレータは、入力されたフレーム画像に対して、(1)ガウシアンフィルタによるノイズ除去、(2)ソーベルフィルタによる微分処理、(3)勾配の最大位置検出、(4)ヒステリシス特性を持った閾値処理によるエッジ検出とエッジの補間、という4つの処理を行う(非特許文献1参照)。特に(4)の閾値処理では、まず第1閾値hthによってエッジの始点を求め、当該エッジの始点に結合し、第2閾値lth以上のものをエッジと決定することで、不要なエッジを除いた必要なエッジのみを検出している。 Conventionally, the Canny operator is mentioned as a typical method in the edge detection process. The Canny operator performs (1) noise removal by a Gaussian filter, (2) differentiation processing by a Sobel filter, (3) maximum position detection of a gradient, and (4) a threshold value having hysteresis characteristics. Four processes of edge detection and edge interpolation are performed (see Non-Patent Document 1). In particular, in the threshold processing (4), an edge start point is first obtained by the first threshold value h th , joined to the start point of the edge, and those having a value equal to or greater than the second threshold value l th are determined as edges. Only the necessary edges removed are detected.

J.Canny, “A Computational Approach to Edge Detection”, IEEE Trans. Pattern Analysis and Machine Intelligence, .8, 6, .679-698, 1986.J. Canny, “A Computational Approach to Edge Detection”, IEEE Trans. Pattern Analysis and Machine Intelligence, .8, 6, .679-698, 1986.

ここで、コンピュータビジョンを始めとする各種画像処理で用いられる映像のエッジ検出処理は、映像を構成するフレーム画像のそれぞれからエッジを正確に検出するために、照明等の撮影条件や被写体に依存したチューニングを施す必要がある。また、調整した設定条件を変更しない場合であっても常にエッジを正確に検出できるように、撮影条件や被写体の条件も一定に保つ必要がある。しかしながら、撮影条件に合わせてチューニングを逐次調整していくことは、人手による場合は試行錯誤が必要で、煩雑な作業であるとともに、エッジ検出の状態を一定に保つことも困難である。   Here, the edge detection processing of video used in various image processing including computer vision depends on shooting conditions such as lighting and the subject in order to accurately detect the edge from each of the frame images constituting the video. Tuning needs to be done. In addition, even when the adjusted setting condition is not changed, it is necessary to keep the shooting condition and the subject condition constant so that the edge can always be accurately detected. However, it is difficult to manually adjust the tuning in accordance with the photographing conditions because it requires trial and error in the case of manual operation, is a complicated operation, and it is difficult to keep the edge detection state constant.

例えば、前記した非特許文献1で提案されたCannyオペレータを用いた映像のエッジ検出処理では、照明等の撮影条件が変化した場合であっても、2つの閾値hth,lthが固定された状態で閾値処理が行われていた。従って、従来は、照明等の撮影条件が変化すると、本来エッジではない影がエッジとして検出されたりするため、撮影条件によって検出できるエッジ状態が変化してしまうという問題があった。 For example, in the image edge detection process using the Canny operator proposed in Non-Patent Document 1, the two thresholds h th and l th are fixed even when the shooting conditions such as illumination change. Threshold processing was performed in the state. Therefore, conventionally, when a shooting condition such as illumination changes, a shadow that is not originally an edge is detected as an edge, so that the edge state that can be detected changes depending on the shooting condition.

本発明はかかる点に鑑みてなされたものであって、照明等の撮影条件が変化した場合であっても、映像を構成するフレーム画像のそれぞれからエッジを正確に検出することができるエッジ検出装置およびそのプログラムを提供することを課題とする。   The present invention has been made in view of the above points, and an edge detection device capable of accurately detecting an edge from each of frame images constituting a video even when a shooting condition such as illumination changes. And providing a program thereof.

前記課題を解決するために請求項1に係るエッジ検出装置は、入力された映像からエッジを構成するエッジ点を検出するエッジ検出装置であって、エッジ検出手段と、エッジ追跡手段と、モデル生成・更新手段と、閾値算出手段と、を備える構成とした。   In order to solve the above-described problem, an edge detection apparatus according to claim 1 is an edge detection apparatus that detects edge points constituting an edge from an input video, and includes edge detection means, edge tracking means, and model generation. -It was set as the structure provided with an update means and a threshold value calculation means.

これにより、エッジ検出装置は、エッジ検出手段によって、映像を構成するフレーム画像ごとに、第1閾値を超えるエッジ勾配強度を有する画素と、当該画素に隣接する画素であって、第1閾値以下かつ第1閾値より低い第2閾値以上のエッジ勾配強度を有する画素と、を前記エッジ点として検出する。また、エッジ検出装置は、エッジ追跡手段によって、現フレーム画像のエッジ点から、当該エッジ点とエッジ勾配強度およびエッジ方向が類似する前フレーム画像のエッジ点を追跡する。また、エッジ検出装置は、モデル生成・更新手段によって、エッジ検出手段によって検出されたエッジ点を分布化してガウス混合モデルを生成するとともに、エッジ追跡手段によって追跡が成功した前記現フレーム画像のエッジ点をガウス混合モデルに追加することでガウス混合モデルをフレーム画像ごとに順次更新する。なお、ガウス混合モデルは、フレーム画像ごとに生成または更新してもよく、フレーム画像を所定サイズのブロックで分割した所定ブロックごとに生成または更新してもよい。   Thus, the edge detection device uses the edge detection unit to detect, for each frame image constituting the video, a pixel having an edge gradient strength exceeding the first threshold and a pixel adjacent to the pixel, the pixel being equal to or lower than the first threshold and A pixel having an edge gradient strength equal to or higher than a second threshold lower than the first threshold is detected as the edge point. Further, the edge detection device tracks the edge point of the previous frame image whose edge gradient strength and edge direction are similar to the edge point from the edge point of the current frame image by the edge tracking means. The edge detection device generates a Gaussian mixture model by distributing the edge points detected by the edge detection means by the model generation / update means, and the edge points of the current frame image successfully tracked by the edge tracking means. Is added to the Gaussian mixture model to update the Gaussian mixture model sequentially for each frame image. The Gaussian mixture model may be generated or updated for each frame image, or may be generated or updated for each predetermined block obtained by dividing the frame image into blocks of a predetermined size.

また、エッジ検出装置は、閾値算出手段によって、モデル生成・更新手段によって生成および更新されたガウス混合モデルを構成する個々のガウスモデルから、予め定められた値以上の重みを有するとともに、最も大きい重みを有するガウスモデルを選択し、当該ガウスモデルの平均値から当該ガウスモデルの標準偏差を所定数倍したものを減じた値である第1算出値が、平均値を所定値で除した値である第2算出値を超える場合は、第1算出値を前記第1閾値とするとともに第2算出値を第2閾値とし、第1算出値が第2算出値以下である場合は、第2算出値を第1閾値とするとともに第1算出値を第2閾値とする。このように、エッジ検出装置は、Cannyオペレータを用いたエッジ検出処理において、従来は固定されていた第1閾値および第2閾値を、前フレーム画像以前のエッジ検出結果を学習させたガウス混合モデルに基づいて自動的に決定することができる。   In addition, the edge detection device has a weight greater than or equal to a predetermined value from each Gaussian model constituting the Gaussian mixture model generated and updated by the model generation / update unit by the threshold calculation unit, and has the largest weight. The first calculated value, which is a value obtained by subtracting a predetermined number times the standard deviation of the Gaussian model from the average value of the Gaussian model, is a value obtained by dividing the average value by the predetermined value. When the second calculated value is exceeded, the first calculated value is set as the first threshold value and the second calculated value is set as the second threshold value. When the first calculated value is equal to or less than the second calculated value, the second calculated value is set. Is the first threshold and the first calculated value is the second threshold. As described above, in the edge detection process using the Canny operator, the edge detection apparatus converts the first threshold value and the second threshold value that have been fixed in the past into a Gaussian mixture model in which the edge detection results before the previous frame image are learned. Can be determined automatically based on.

また、請求項2に係るエッジ検出装置は、請求項1に係るエッジ検出装置において、閾値算出手段が、平均値に標準偏差を所定数倍したものを加えることで、第1閾値よりも高い第3閾値を算出し、エッジ検出手段が、映像を構成するフレーム画像ごとに、第3閾値以下かつ第1閾値を超えるエッジ勾配強度を有する画素と、当該画素に隣接する画素であって、第1閾値以下かつ第2閾値以上のエッジ勾配強度を有する画素と、をエッジ点として検出する構成とした。このように、エッジ検出装置は、第1閾値よりも大きい値を有する第3閾値を、前フレーム画像以前のエッジ検出結果を学習させたガウス混合モデルに基づいて自動的に決定することができる。   Further, the edge detection device according to claim 2 is the edge detection device according to claim 1, wherein the threshold value calculation means adds a value obtained by multiplying the average value by a predetermined number of times to the average value so that the first detection value is higher than the first threshold value. 3 threshold values are calculated, and the edge detection means includes, for each frame image constituting the video, a pixel having an edge gradient strength equal to or lower than the third threshold value and exceeding the first threshold value, and a pixel adjacent to the pixel, A pixel having an edge gradient strength equal to or lower than the threshold and equal to or higher than the second threshold is detected as an edge point. As described above, the edge detection apparatus can automatically determine the third threshold value having a value larger than the first threshold value based on the Gaussian mixture model in which the edge detection result before the previous frame image is learned.

また、請求項3に係るエッジ検出装置は、請求項1または請求項2に係るエッジ検出装置において、エッジ検出手段が、閾値算出手段によって第1閾値および第2閾値が算出された場合は、当該算出された第1閾値および第2閾値を用いてエッジ点を検出し、閾値算出手段によって第1閾値および第2閾値が算出されない場合は、予め定められた固定値を第1閾値および第2閾値として用いてエッジ点を検出する構成とした。このように、エッジ検出装置は、閾値算出手段によって閾値が算出されない場合であっても、予め定められた固定の閾値を用いてフレーム画像からエッジ点を検出することができる。   The edge detection device according to claim 3 is the edge detection device according to claim 1 or 2, wherein the edge detection unit calculates the first threshold value and the second threshold value when the threshold value calculation unit calculates the first threshold value and the second threshold value. When the edge point is detected using the calculated first threshold value and the second threshold value, and the first threshold value and the second threshold value are not calculated by the threshold value calculation means, the predetermined fixed value is set to the first threshold value and the second threshold value. It was set as the structure which detects as an edge point. As described above, the edge detection device can detect an edge point from a frame image using a predetermined fixed threshold even when the threshold is not calculated by the threshold calculation means.

また、請求項4に係るエッジ検出装置は、請求項1から請求項3のいずれか一項に係るエッジ検出装置において、モデル生成・更新手段が、エッジ検出手段によってエッジ点が検出できなかった場合、または、エッジ追跡手段によって追跡が成功したエッジ点が存在しない場合、ガウス混合モデルを破棄し、エッジ検出手段が、ガウス混合モデルが破棄された場合、予め定められた固定値を第1閾値および第2閾値として用いてエッジ点を検出する構成とした。このように、エッジ検出装置は、入力されたフレーム画像からエッジ点が検出できなかった場合や、検出したエッジ点に類似する前フレーム画像のエッジ点を追跡できなかった場合は、それまでに学習させたガウス混合モデルを破棄し、次の処理で再度ガウス混合モデルを生成する。   An edge detection apparatus according to claim 4 is the edge detection apparatus according to any one of claims 1 to 3, wherein the model generation / update means cannot detect an edge point by the edge detection means. Or if there is no edge point successfully tracked by the edge tracking means, the Gaussian mixture model is discarded, and if the Gaussian mixture model is discarded, the edge detection means sets a predetermined fixed value as the first threshold and The edge point is detected using the second threshold value. As described above, when the edge detection device fails to detect the edge point from the input frame image, or when it cannot track the edge point of the previous frame image similar to the detected edge point, it learns so far. The generated Gaussian mixture model is discarded, and the Gaussian mixture model is generated again by the next processing.

また、請求項5に係るエッジ検出装置は、請求項1から請求項4のいずれか一項に係るエッジ検出装置において、エッジ追跡手段が、現フレーム画像のエッジ点における予め指定されたエッジ点から、当該エッジ点とエッジ勾配強度およびエッジ方向が類似する前フレーム画像のエッジ点を追跡する構成とした。このように、エッジ検出装置は、現フレーム画像から検出された全てのエッジ点を追跡するのではなく、追跡を行いたい特定のエッジ点のみを追跡することができる。   According to a fifth aspect of the present invention, in the edge detection device according to any one of the first to fourth aspects, the edge tracking means is configured so that the edge tracking means detects a predetermined edge point in the edge point of the current frame image. The edge point of the previous frame image having similar edge gradient strength and edge direction to the edge point is tracked. As described above, the edge detection apparatus can track only a specific edge point to be tracked, instead of tracking all edge points detected from the current frame image.

前記課題を解決するために請求項6に係るエッジ検出プログラムは、入力された映像からエッジを構成するエッジ点を検出するために、コンピュータを、エッジ検出手段、エッジ追跡手段、モデル生成・更新手段、閾値算出手段、として機能させる構成とした。   In order to solve the above-mentioned problem, an edge detection program according to a sixth aspect of the present invention provides a computer, an edge detection unit, an edge tracking unit, a model generation / update unit, in order to detect an edge point constituting an edge from an input video. The threshold value calculating means is configured to function.

これにより、エッジ検出プログラムは、エッジ検出手段によって、映像を構成するフレーム画像ごとに、第1閾値を超えるエッジ勾配強度を有する画素と、当該画素に隣接する画素であって、第1閾値以下かつ第1閾値より低い第2閾値以上のエッジ勾配強度を有する画素と、を前記エッジ点として検出する。また、エッジ検出プログラムは、エッジ追跡手段によって、現フレーム画像のエッジ点から、当該エッジ点とエッジ勾配強度およびエッジ方向が類似する前フレーム画像のエッジ点を追跡する。また、エッジ検出プログラムは、モデル生成・更新手段によって、エッジ検出手段によって検出されたエッジ点を分布化してガウス混合モデルを生成するとともに、エッジ追跡手段によって追跡が成功した前記現フレーム画像のエッジ点をガウス混合モデルに追加することでガウス混合モデルをフレーム画像ごとに順次更新する。なお、ガウス混合モデルは、フレーム画像ごとに生成および更新してもよく、フレーム画像を所定領域に分割した所定領域ごとに生成および更新してもよい。   Thus, the edge detection program uses the edge detection unit to detect, for each frame image constituting the video, a pixel having an edge gradient strength exceeding the first threshold and a pixel adjacent to the pixel, the pixel being equal to or lower than the first threshold and A pixel having an edge gradient strength equal to or higher than a second threshold lower than the first threshold is detected as the edge point. Further, the edge detection program tracks the edge point of the previous frame image whose edge gradient strength and edge direction are similar to the edge point from the edge point of the current frame image by the edge tracking means. Further, the edge detection program generates a Gaussian mixture model by distributing the edge points detected by the edge detection means by the model generation / update means, and the edge points of the current frame image successfully tracked by the edge tracking means. Is added to the Gaussian mixture model to update the Gaussian mixture model sequentially for each frame image. The Gaussian mixture model may be generated and updated for each frame image, or may be generated and updated for each predetermined area obtained by dividing the frame image into predetermined areas.

また、エッジ検出プログラムは、閾値算出手段によって、モデル生成・更新手段によって生成および更新されたガウス混合モデルを構成する個々のガウスモデルから、予め定められた値以上の重みを有するとともに、最も大きい重みを有するガウスモデルを選択し、当該ガウスモデルの平均値から当該ガウスモデルの標準偏差を所定数倍したものを減じた値である第1算出値が、平均値を所定値で除した値である第2算出値を超える場合は、第1算出値を前記第1閾値とするとともに第2算出値を第2閾値とし、第1算出値が第2算出値以下である場合は、第2算出値を第1閾値とするとともに第1算出値を第2閾値とする。このように、エッジ検出プログラムは、Cannyオペレータを用いたエッジ検出処理において、従来は固定されていた第1閾値および第2閾値を、前フレーム画像以前のエッジ検出結果を学習させたガウス混合モデルに基づいて自動的に決定することができる。   The edge detection program has a weight greater than or equal to a predetermined value from the individual Gaussian models constituting the Gaussian mixture model generated and updated by the model generation / update unit by the threshold calculation unit, and the largest weight. The first calculated value, which is a value obtained by subtracting a predetermined number times the standard deviation of the Gaussian model from the average value of the Gaussian model, is a value obtained by dividing the average value by the predetermined value. When the second calculated value is exceeded, the first calculated value is set as the first threshold value and the second calculated value is set as the second threshold value. When the first calculated value is equal to or less than the second calculated value, the second calculated value is set. Is the first threshold and the first calculated value is the second threshold. As described above, in the edge detection process using the Canny operator, the edge detection program converts the first threshold value and the second threshold value that have been fixed in the past into a Gaussian mixture model in which the edge detection results before the previous frame image are learned. Can be determined automatically based on.

請求項1および請求項6に係る発明によれば、前フレーム画像以前のエッジ検出結果を学習させたガウス混合モデルに基づいて決定された第1閾値および第2閾値を用いて、前フレーム以前のエッジ検出結果を加味してエッジ検出を行うため、仮に照明等の撮影条件が変化した場合であっても、映像を構成するフレーム画像のそれぞれからエッジ点を正確に検出することができる。   According to the inventions according to claim 1 and claim 6, using the first threshold value and the second threshold value determined based on the Gaussian mixture model in which the edge detection result before the previous frame image is learned, Since edge detection is performed in consideration of the edge detection result, edge points can be accurately detected from each of the frame images constituting the video even if the shooting conditions such as illumination are changed.

請求項2に係る発明によれば、第3閾値をエッジ検出の際の上限値として用いることで、第1閾値を超える高いエッジ勾配強度を有する部分(例えば影等)がエッジ点として検出されてしまうことを抑制することができ、エッジ検出の精度をより向上させることができる。   According to the second aspect of the invention, by using the third threshold value as the upper limit value in edge detection, a portion having a high edge gradient strength exceeding the first threshold value (for example, a shadow) is detected as an edge point. Can be suppressed, and the accuracy of edge detection can be further improved.

請求項3に係る発明によれば、例えば前フレーム画像からエッジ点が検出されなかった場合等、エッジ検出で用いられる閾値を算出できない状況になった場合であっても、映像を構成するフレーム画像から順次エッジ点を検出することができる。   According to the third aspect of the present invention, even when the threshold value used in edge detection cannot be calculated, for example, when an edge point is not detected from the previous frame image, the frame image constituting the video Edge points can be detected sequentially.

請求項4に係る発明によれば、入力されたフレーム画像からエッジ点が検出でき、かつ、エッジ点を追跡できた場合のみガウス混合モデルを生成または更新するため、前フレーム画像以前のエッジ点を正確に反映させたガウス混合モデルに基づいて閾値を算出することができる。   According to the fourth aspect of the present invention, since the edge point can be detected from the input frame image and the Gaussian mixture model is generated or updated only when the edge point can be tracked, the edge point before the previous frame image is obtained. The threshold value can be calculated based on the Gaussian mixture model accurately reflected.

請求項5に係る発明によれば、特定のエッジ点のみを追跡するため、全体の処理速度を向上させることができる。   According to the invention of claim 5, since only specific edge points are tracked, the overall processing speed can be improved.

本発明に係るエッジ検出装置の全体構成を示すブロック図である。It is a block diagram which shows the whole structure of the edge detection apparatus which concerns on this invention. 本発明に係るエッジ検出装置で用いられるガウス混合モデルの一例を示す概略図であり、(a)は、予め定められた値以上の重みを有するガウスモデルで構成されたガウス混合モデルを示す図、(b)は、予め定められた値未満の重みを有するガウスモデルで構成されたガウス混合モデルを示す図、である。It is a schematic diagram showing an example of a Gaussian mixture model used in the edge detection device according to the present invention, (a) is a diagram showing a Gaussian mixture model composed of Gaussian models having a weight equal to or greater than a predetermined value; (B) is a figure which shows the Gaussian mixture model comprised by the Gaussian model which has a weight less than a predetermined value. 本発明に係るエッジ検出装置で用いられるガウス混合モデルの一例を示す概略図であり、(a)は、第1算出値が第2算出値よりも大きい場合のガウス混合モデルを示す図、(b)は、第1算出値が第2算出値よりも小さい場合のガウス混合モデルを示す図、である。It is the schematic which shows an example of the Gaussian mixture model used with the edge detection apparatus which concerns on this invention, (a) is a figure which shows a Gaussian mixture model in case a 1st calculated value is larger than a 2nd calculated value, (b) ) Is a diagram showing a Gaussian mixture model when the first calculated value is smaller than the second calculated value. 本発明に係るエッジ検出装置の全体動作を示すフローチャートである。It is a flowchart which shows the whole operation | movement of the edge detection apparatus which concerns on this invention. 本発明に係るエッジ検出装置の実施例を示す概略図であり、(a)は、従来のエッジ検出装置をモデルベースカメラトラッキングに適用してエッジ検出を行った場合の図、(b)は、本発明に係るエッジ検出装置をモデルベースカメラトラッキングに適用してエッジ検出を行った場合の図、である。It is the schematic which shows the Example of the edge detection apparatus which concerns on this invention, (a) is a figure at the time of applying edge detection by applying the conventional edge detection apparatus to model-based camera tracking, (b), It is a figure at the time of applying edge detection apparatus concerning the present invention to model base camera tracking, and performing edge detection. 本発明に係るエッジ検出装置の実施例を示す概略図であり、(a)は、図5(a)の番号1−3の拡大図、(b)は、図5(b)の番号1−3の拡大図、である。It is the schematic which shows the Example of the edge detection apparatus which concerns on this invention, (a) is the enlarged view of the number 1-3 of Fig.5 (a), (b) is the number 1-of FIG.5 (b). 3 is an enlarged view of FIG.

本発明の実施形態に係るエッジ検出装置について、図面を参照しながら説明する。なお、以下の説明において、同一の構成については同一の名称及び符号を付し、詳細説明を省略する。   An edge detection apparatus according to an embodiment of the present invention will be described with reference to the drawings. In the following description, the same configuration is given the same name and symbol, and detailed description is omitted.

エッジ検出装置1は、入力された映像からエッジを構成するエッジ点を検出するものである。エッジ検出装置1は、例えばモデルベースカメラトラッキングのエッジ検出の際に用いられる。エッジ検出装置1は、ここでは図1に示すように、映像入力手段10と、エッジ検出手段20と、検出結果出力手段30と、エッジ追跡手段40と、モデル生成・更新手段50と、閾値算出手段60と、を備えている。以下、エッジ検出装置1の各要素について、詳細に説明する。   The edge detection device 1 detects edge points that constitute an edge from an input video. The edge detection apparatus 1 is used, for example, when detecting an edge in model-based camera tracking. Here, as shown in FIG. 1, the edge detection apparatus 1 includes a video input means 10, an edge detection means 20, a detection result output means 30, an edge tracking means 40, a model generation / update means 50, and a threshold calculation. Means 60. Hereinafter, each element of the edge detection apparatus 1 will be described in detail.

映像入力手段10は、図1に示すように、外部から映像が入力されるものである。映像入力手段10は、例えば映像インターフェイスであり、入力された映像を、当該映像を構成するフレーム画像ごとにエッジ検出手段20に出力する。   As shown in FIG. 1, the video input means 10 is for inputting video from outside. The video input means 10 is a video interface, for example, and outputs the input video to the edge detection means 20 for each frame image constituting the video.

エッジ検出手段20は、映像を構成するフレーム画像ごとにエッジ点を検出(抽出)するものである。ここで、エッジ検出手段20の基本的な構成は、前記したCannyオペレータと同様である。すなわち、エッジ検出手段20は、入力されたフレーム画像に対してガウシアンフィルタを用いてノイズを除去して画像を平滑化する。次に、エッジ検出手段20は、平滑後の画像に対してソーベルフィルタによって微分処理を行い、各画素のエッジ勾配強度とエッジ方向を算出する。次に、エッジ検出手段20は、エッジ勾配強度が極大となる画素を特定し、その画素をエッジ点の候補とする。そして、エッジ検出手段20は、閾値処理によってエッジ点の候補を絞り込み、エッジ点を検出する。   The edge detection means 20 detects (extracts) edge points for each frame image constituting the video. Here, the basic configuration of the edge detection means 20 is the same as that of the above-mentioned Canny operator. That is, the edge detection means 20 smooths the image by removing noise from the input frame image using a Gaussian filter. Next, the edge detection means 20 performs a differentiation process on the smoothed image using a Sobel filter, and calculates the edge gradient strength and edge direction of each pixel. Next, the edge detection unit 20 identifies a pixel having a maximum edge gradient strength, and sets the pixel as a candidate for an edge point. Then, the edge detection means 20 narrows down the edge point candidates by threshold processing and detects the edge points.

エッジ検出手段20は、前記した閾値処理において、第1閾値hthと、第1閾値hthよりも低い第2閾値lthと、の2つの閾値を用いてエッジ点を検出する。この第1閾値hthは、フレーム画像中における濃いエッジ点、すなわちエッジ勾配強度の高いエッジ点を検出するための閾値である。また、第2閾値lthは、フレーム画像中における薄いエッジ点、すなわちエッジ勾配強度の低いエッジ点を検出するための閾値である。 In the threshold processing described above, the edge detection unit 20 detects an edge point using two threshold values, ie, a first threshold value h th and a second threshold value l th lower than the first threshold value h th . The first threshold value h th is a threshold value for detecting a dark edge point in the frame image, that is, an edge point having a high edge gradient strength. The second threshold value l th is a threshold value for detecting a thin edge point in the frame image, that is, an edge point having a low edge gradient strength.

エッジ検出手段20は、まず第1閾値hthを超えるエッジ勾配強度を有する画素をエッジ点として検出する。そして、エッジ検出手段20は、第1閾値hth以下かつ第2閾値lth以上のエッジ勾配強度を有する画素であって、第1閾値hthによってエッジ点として検出された画素に隣接する(接続する)画素をエッジ点として検出する。なお、エッジ検出手段20において用いられる第1閾値hthおよび第2閾値lthの詳細については後記する。 The edge detection means 20 first detects a pixel having an edge gradient strength exceeding the first threshold value h th as an edge point. The edge detection means 20 is a pixel having an edge gradient strength equal to or lower than the first threshold value h th and equal to or higher than the second threshold value l th, and is adjacent to the pixel detected as an edge point by the first threshold value h th (connection). Detect a pixel as an edge point. The details of the first threshold value h th and the second threshold value l th used in the edge detection means 20 will be described later.

ここで、エッジ検出手段20は、前記した閾値処理において、後記する閾値算出手段60によって算出される第1閾値hthおよび第2閾値lthか、予め定められた固定の第1閾値hthおよび第2閾値lth(以下、初期閾値という)か、のいずれかを用いてエッジ点を検出する。例えば、エッジ検出手段20は、後記する閾値算出手段60において第1閾値hthおよび第2閾値lthが算出された場合は、当該算出された閾値を用いてエッジ検出処理を行う。 Here, the edge detection means 20 uses the first threshold value h th and the second threshold value l th calculated by the threshold value calculation means 60 described later in the threshold value processing described above, or a predetermined fixed first threshold value h th and The edge point is detected using either the second threshold value l th (hereinafter referred to as the initial threshold value). For example, when the first threshold value h th and the second threshold value l th are calculated by the threshold value calculation means 60 described later, the edge detection means 20 performs an edge detection process using the calculated threshold values.

一方、エッジ検出手段20が初期閾値を用いてエッジ検出処理を行うのは、例えば後記する閾値算出手段60によって第1閾値hthおよび第2閾値lthが算出されなかった場合である。そして、このように閾値算出手段60によって第1閾値hthおよび第2閾値lthが算出されない場合としては、例えば、映像入力手段10から入力されたフレーム画像が映像の1枚目(最初)のフレームでありガウス混合モデルがまだ生成されていない場合、2枚目以降のフレーム画像が入力されたものの、前回のエッジ検出処理でエッジ点を検出することができずガウス混合モデルが破棄された場合、2枚目以降のフレーム画像が入力されたものの、エッジ追跡手段40において追跡が成功したエッジ点が存在せずガウス混合モデルが破棄された場合、等が挙げられる。このように、エッジ検出装置1は、後記する閾値算出手段60によって閾値が算出されない場合であっても、予め定められた固定の閾値(初期閾値)を用いてフレーム画像からエッジ点を検出することができる。従って、エッジ検出装置1は、前記したように、エッジ検出で用いられる閾値を算出できない状況になった場合であっても、映像を構成するフレーム画像から順次エッジ点を検出することができる。なお、ガウス混合モデルの生成や破棄の詳細については後記する。 On the other hand, the edge detection unit 20 performs the edge detection process using the initial threshold when, for example, the first threshold h th and the second threshold l th are not calculated by the threshold calculation unit 60 described later. As a case where the first threshold value h th and the second threshold value l th are not calculated by the threshold value calculation means 60 in this way, for example, the frame image input from the video input means 10 is the first (first) video image. If the frame and Gaussian mixture model has not been generated yet, the second and subsequent frame images have been input, but the edge point could not be detected in the previous edge detection process and the Gaussian mixture model was discarded For example, the second and subsequent frame images are input, but there are no edge points that have been successfully tracked by the edge tracking unit 40 and the Gaussian mixture model is discarded. As described above, the edge detection apparatus 1 detects an edge point from a frame image using a predetermined fixed threshold (initial threshold) even when the threshold is not calculated by the threshold calculation means 60 described later. Can do. Therefore, as described above, the edge detection apparatus 1 can sequentially detect edge points from the frame images constituting the video even when the threshold used for edge detection cannot be calculated. Details of generation and destruction of the Gaussian mixture model will be described later.

ここで、エッジ検出手段20は、後記する閾値算出手段60によって、第1閾値hthおよび第2閾値lthに加えて第3閾値gthが算出された場合は、当該第3閾値gthをエッジ勾配強度の上限値として用いて閾値処理を行うことが好ましい。この第3閾値gthは、前記した第1閾値hthによって、例えば影等の実際にはエッジ点ではない部分がエッジ点として検出されてしまうことを抑制するための閾値である。 Here, when the third threshold value g th is calculated in addition to the first threshold value h th and the second threshold value l th by the threshold value calculation unit 60 described later, the edge detection unit 20 sets the third threshold value g th . It is preferable to perform threshold processing using the upper limit value of the edge gradient strength. The third threshold value g th is a threshold value for suppressing, for example, a portion that is not actually an edge point, such as a shadow, from being detected as an edge point by the first threshold value h th described above.

この場合、エッジ検出手段20は、まず第3閾値gth以下かつ第1閾値hthを超えるエッジ勾配強度を有する画素をエッジ点として検出する。そして、エッジ検出手段20は、第1閾値hth以下かつ第2閾値lth以上のエッジ勾配強度を有する画素であって、第1閾値hthによってエッジ点として検出した画素に隣接する(接続する)画素をエッジ点として検出する。このように、エッジ検出装置1は、第3閾値をエッジ検出の際の上限値として用いることで、より限定された条件の下でエッジ検出を行うことができるため、エッジ検出の精度をより向上させることができる。なお、エッジ検出手段20において用いられる第3閾値gthの詳細については後記する。 In this case, the edge detection unit 20 first detects a pixel having an edge gradient strength equal to or less than the third threshold value g th and exceeding the first threshold value h th as an edge point. The edge detection means 20 is a pixel having an edge gradient strength equal to or lower than the first threshold value h th and equal to or higher than the second threshold value l th, and is adjacent to (connected to) a pixel detected as an edge point by the first threshold value h th . ) Detect pixels as edge points. As described above, the edge detection apparatus 1 can perform edge detection under more limited conditions by using the third threshold value as the upper limit value in edge detection, thereby further improving the accuracy of edge detection. Can be made. The details of the third threshold value g th used in the edge detection means 20 will be described later.

エッジ検出手段20には、図1に示すように、映像入力手段10から映像を構成するフレーム画像が順次入力される。そして、エッジ検出手段20は、前記した手法によってフレーム画像からエッジ点を検出し、図1に示すように、その検出結果を検出結果出力手段30と、エッジ追跡手段40と、モデル生成・更新手段50と、に出力する。   As shown in FIG. 1, frame images constituting a video are sequentially input from the video input unit 10 to the edge detection unit 20. Then, the edge detection means 20 detects edge points from the frame image by the above-described method, and the detection result is output as a detection result output means 30, edge tracking means 40, model generation / update means as shown in FIG. And 50.

検出結果出力手段30は、エッジ検出手段20によるエッジ検出の結果を出力するものである。エッジ検出手段20は、図1に示すように、エッジ検出手段20から入力された検出結果を、例えば図示しない外部のパーソナルコンピュータや記憶手段等に出力する。   The detection result output means 30 outputs the result of edge detection by the edge detection means 20. As shown in FIG. 1, the edge detection means 20 outputs the detection result input from the edge detection means 20 to, for example, an external personal computer or storage means (not shown).

エッジ追跡手段40は、現在のフレーム画像(以下、現フレーム画像という)のエッジ点から、これに対応する前回のフレーム画像(以下、前フレーム画像という)のエッジ点を追跡するものである。エッジ追跡手段40は、具体的には現フレーム画像のエッジ点と前フレーム画像のエッジ点とを比較し、現フレーム画像のエッジ点とエッジ勾配強度およびエッジ方向が類似する前フレーム画像のエッジ点を追跡する。また、エッジ追跡手段40は、例えば現フレーム画像のエッジ点を基準として、当該エッジ点によって構成されるエッジの法線方向の所定範囲(所定長さ)に探索を行うことで、前フレーム画像のエッジ点を追跡する。なお、エッジ追跡手段40によって、エッジの法線方向に探索する範囲は特に限定されないが、例えば30ピクセルとすることが好ましい。そして、エッジ追跡手段40は、前フレーム画像のエッジ点と類似する現フレームのエッジ点、すなわち追跡に成功した現フレーム画像のエッジ点をエッジ追跡結果として出力する   The edge tracking means 40 tracks the edge point of the previous frame image (hereinafter referred to as the previous frame image) corresponding to the edge point of the current frame image (hereinafter referred to as the current frame image). Specifically, the edge tracking means 40 compares the edge point of the current frame image with the edge point of the previous frame image, and the edge point of the previous frame image whose edge gradient strength and edge direction are similar to those of the current frame image. To track. Further, the edge tracking means 40 searches for a predetermined range (predetermined length) in the normal direction of the edge constituted by the edge point with reference to the edge point of the current frame image, for example, so that the previous frame image Track edge points. The range in which the edge tracking unit 40 searches in the normal direction of the edge is not particularly limited, but is preferably 30 pixels, for example. Then, the edge tracking means 40 outputs the edge point of the current frame similar to the edge point of the previous frame image, that is, the edge point of the current frame image that has been successfully tracked, as the edge tracking result.

エッジ追跡手段40は、映像入力手段10から入力されたフレーム画像が2枚目以降のフレームであって、前回のエッジ検出処理でエッジ点が検出されている場合は、エッジ追跡を行う。一方、エッジ追跡手段40は、映像入力手段10から入力されたフレーム画像が映像の1枚目(最初)のフレームである場合や、映像入力手段10から入力されたフレーム画像が2枚目以降のフレームであって、前回のエッジ検出処理でエッジ点が検出されていない場合は、追跡対象となるエッジ点(以下、追跡対象エッジという)が存在しないため、エッジ追跡を行わない。   The edge tracking unit 40 performs edge tracking when the frame image input from the video input unit 10 is the second and subsequent frames and an edge point is detected in the previous edge detection process. On the other hand, the edge tracking means 40 is used when the frame image input from the video input means 10 is the first (first) frame of the video, or when the frame image input from the video input means 10 is the second and subsequent frames. If an edge point has not been detected in the previous edge detection process in the frame, no edge point to be tracked (hereinafter referred to as a tracking target edge) does not exist, and therefore edge tracking is not performed.

ここで、エッジ追跡手段40は、現フレーム画像から検出された全てのエッジ点について、当該エッジ点とエッジ勾配強度およびエッジ方向が類似する前フレーム画像のエッジ点を追跡してもよいが、例えば現フレーム画像の特定のエッジ点からのみ追跡を行っても構わない。この場合、エッジ追跡手段40には、例えば図1の破線矢印で示すように、現フレーム画像から検出されたエッジ点のうちの特定のエッジ点を示す追跡対象エッジが入力される。この追跡対象エッジは、例えばユーザが現フレーム画像から検出されたエッジ点のうちの特定のエッジ点を直接指定する等により入力することができる。そして、エッジ追跡手段40は、当該追跡対象エッジが示すエッジ点とエッジ勾配強度およびエッジ方向が類似する前フレーム画像のエッジ点を追跡する。このように、エッジ検出装置1は、現フレーム画像から検出された全てのエッジ点を追跡するのではなく、追跡を行いたい特定のエッジ点のみを追跡することができ、全体の処理速度を向上させることができる。   Here, the edge tracking means 40 may track the edge points of the previous frame image having similar edge gradient strength and edge direction to all edge points detected from the current frame image. Tracking may be performed only from a specific edge point of the current frame image. In this case, the edge tracking means 40 is input with a tracking target edge indicating a specific edge point among edge points detected from the current frame image, for example, as indicated by a broken line arrow in FIG. The tracking target edge can be input, for example, when the user directly designates a specific edge point among the edge points detected from the current frame image. Then, the edge tracking unit 40 tracks the edge point of the previous frame image whose edge gradient strength and edge direction are similar to the edge point indicated by the tracking target edge. In this way, the edge detection apparatus 1 can track only a specific edge point to be tracked instead of tracking all the edge points detected from the current frame image, thereby improving the overall processing speed. Can be made.

エッジ追跡手段40には、図1に示すように、エッジ検出手段20から現フレーム画像のエッジ点が入力される。そして、エッジ追跡手段40は、前記した手法によってエッジ点を追跡し、追跡が成功した現フレーム画像のエッジ点をモデル生成・更新手段50に出力する。   As shown in FIG. 1, the edge point of the current frame image is input from the edge detection unit 20 to the edge tracking unit 40. Then, the edge tracking unit 40 tracks the edge point by the above-described method, and outputs the edge point of the current frame image that has been successfully tracked to the model generation / update unit 50.

モデル生成・更新手段50は、ガウス混合モデルを生成および更新するものである。ここで、ガウス混合モデルとは、入力された映像におけるエッジ点の特徴、すなわちエッジ勾配強度をモデル化したものである。ガウス混合モデルは、より詳細には、映像を構成するフレーム画像から検出されたエッジ点のエッジ勾配強度を分布化したものである。   The model generation / update unit 50 generates and updates a Gaussian mixture model. Here, the Gaussian mixture model is obtained by modeling the feature of the edge point in the input video, that is, the edge gradient strength. More specifically, the Gaussian mixture model is a distribution of edge gradient strengths of edge points detected from frame images constituting an image.

ここで、エッジ検出手段20によってフレーム画像から検出されたエッジ点は、映像においては照明等の撮影条件によってエッジ勾配強度が大きく変化する。従って、フレーム画像のエッジ強度を分布化したものを図示すると、例えば図2(a)に示すように、単純なガウスモデルではなく、複数のガウスモデル(ここではガウスモデルG,G,G)が混合したガウス混合モデルとなる。なお、図2(a)、(b)に示すガウス混合モデルは、映像を構成するフレーム画像(または後記するようにその所定ブロック)に対してソーベルフィルタをかけた結果と考えることもできる。 Here, the edge gradient strength of the edge point detected from the frame image by the edge detection means 20 varies greatly depending on the photographing conditions such as illumination. Accordingly, when the distribution of the edge intensity of the frame image is illustrated, for example, as shown in FIG. 2A, not a simple Gaussian model but a plurality of Gaussian models (here, Gaussian models G 1 , G 2 , G 3 ) becomes a mixed Gaussian mixture model. Note that the Gaussian mixture model shown in FIGS. 2A and 2B can be considered as a result of applying a Sobel filter to a frame image (or a predetermined block thereof as described later) constituting a video.

なお、図2(a)、(b)において、横軸の|g|はエッジ点のエッジ勾配強度であり、縦軸のwは重みである。この重みwは、同じエッジ勾配強度を有するエッジ点の数が増える程大きくなるパラメータである。例えば図2(a)では、勾配強度|g|が100の地点における重みwが最も大きくなっているため、前フレーム画像以前のエッジ検出処理の結果として、勾配強度|g|が100のエッジ点が最も多く検出されていることを示している。   In FIGS. 2A and 2B, | g | on the horizontal axis is the edge gradient strength of the edge point, and w on the vertical axis is the weight. The weight w is a parameter that increases as the number of edge points having the same edge gradient strength increases. For example, in FIG. 2A, since the weight w at the point where the gradient strength | g | is 100 is the largest, as a result of the edge detection process before the previous frame image, the edge point where the gradient strength | g | Indicates that most are detected.

モデル生成・更新手段50は、エッジ検出手段20によって検出されたエッジ点を分布化することでガウス混合モデルを生成する。モデル生成・更新手段50は、より具体的には、エッジ検出手段20によって現フレーム画像のエッジ点が検出されると、当該エッジ点のエッジ勾配強度ごとに分類およびカウントし、例えばヒストグラムのように同じエッジ勾配強度を有するエッジ点を積み上げたものをモデル化することで、ガウス混合モデルを生成する。   The model generation / update unit 50 generates a Gaussian mixture model by distributing the edge points detected by the edge detection unit 20. More specifically, when an edge point of the current frame image is detected by the edge detection unit 20, the model generation / update unit 50 classifies and counts for each edge gradient strength of the edge point. A Gaussian mixture model is generated by modeling a stack of edge points having the same edge gradient strength.

そして、モデル生成・更新手段50は、エッジ検出手段20によって現フレーム画像の次のフレーム画像のエッジ点が検出され、かつ、エッジ追跡手段40によってエッジ点の追跡が行われた場合、当該追跡が成功した現フレーム画像のエッジ点を既に生成されているガウス混合モデルに追加することで、ガウス混合モデルを更新する。従って、ガウス混合モデルは、エッジ点が入力されるごとに更新され、図2(a)、(b)で図示した山の形がその都度変化することになる。なお、モデル生成・更新手段50は、その内部または外部に、ガウス混合モデルを記憶させる図示しない記憶手段を備えている。   Then, when the edge detection unit 20 detects the edge point of the next frame image after the current frame image and the edge tracking unit 40 tracks the edge point, the model generation / update unit 50 performs tracking. Update the Gaussian mixture model by adding the edge points of the successful current frame image to the already generated Gaussian mixture model. Therefore, the Gaussian mixture model is updated each time an edge point is input, and the shape of the mountain shown in FIGS. 2A and 2B changes each time. The model generation / update unit 50 includes a storage unit (not shown) that stores a Gaussian mixture model inside or outside the model generation / update unit 50.

ここで、モデル生成・更新手段50は、エッジ検出手段20によって現フレーム画像からエッジ点を検出することができなかった場合や、エッジ追跡手段40によって追跡が成功したエッジ点が存在しなかった場合は、既に生成または更新したガウス混合モデルを破棄する。このように、エッジ検出装置1は、入力されたフレーム画像からエッジ点が検出でき、かつ、エッジ点を追跡できた場合のみモデル生成・更新手段50によってガウス混合モデルを生成または更新するため、前フレーム画像以前のエッジ点を正確に反映させたガウス混合モデルに基づいて閾値を算出することができる。   Here, when the model generation / update unit 50 cannot detect an edge point from the current frame image by the edge detection unit 20 or when there is no edge point successfully tracked by the edge tracking unit 40 Discards a Gaussian mixture model that has already been generated or updated. As described above, the edge detection device 1 generates or updates the Gaussian mixture model by the model generation / update unit 50 only when the edge point can be detected from the input frame image and the edge point can be tracked. The threshold can be calculated based on a Gaussian mixture model that accurately reflects the edge points before the frame image.

また、モデル生成・更新手段50は、エッジ点が検出されたフレーム画像単位でガウス混合モデルを生成し、当該フレーム画像ごとにガウス混合モデルを順次更新してもよいが、例えばフレーム画像を所定幅×所定高さのブロックに分割し、分割されたブロックごとにガウス混合モデルを生成・更新しても構わない。分割するブロックの数は特に限定されないが、例えばフレーム画像を縦10個×横10個のブロック(例えば、画像サイズが640×480ピクセルの場合、1ブロックが64×48ピクセル)に分割して処理を行うことができる。エッジ検出装置1は、このようにフレーム画像のブロックごとにガウス混合モデルを生成・更新することで、エッジ検出の処理速度を向上させることができる。   The model generation / update unit 50 may generate a Gaussian mixture model for each frame image in which an edge point is detected, and sequentially update the Gaussian mixture model for each frame image. X It may be divided into blocks having a predetermined height, and a Gaussian mixture model may be generated and updated for each divided block. The number of blocks to be divided is not particularly limited. For example, a frame image is divided into 10 blocks in the vertical direction and 10 blocks in the horizontal direction (for example, when the image size is 640 × 480 pixels, one block is divided into 64 × 48 pixels). It can be performed. The edge detection apparatus 1 can improve the processing speed of edge detection by generating and updating the Gaussian mixture model for each block of the frame image in this way.

モデル生成・更新手段50には、図1に示すように、エッジ検出手段20から現フレーム画像のエッジ点が入力されるか、エッジ追跡手段40から追跡が成功したエッジ点が入力される。そして、モデル生成・更新手段50は、前記手法によってガウス混合モデルを生成または更新し、当該生成または更新したガウス混合モデルを閾値算出手段60に出力する。   As shown in FIG. 1, the model generation / update unit 50 receives an edge point of the current frame image from the edge detection unit 20 or an edge point that has been successfully tracked from the edge tracking unit 40. Then, the model generation / update unit 50 generates or updates a Gaussian mixture model by the above method, and outputs the generated or updated Gaussian mixture model to the threshold value calculation unit 60.

閾値算出手段60は、エッジ検出手段20における閾値処理で用いられる第1閾値hthおよび第2閾値lthを算出するものである。閾値算出手段60は、具体的には以下の手順により第1閾値hthおよび第2閾値lthを算出する。 The threshold value calculation unit 60 calculates the first threshold value h th and the second threshold value l th used in the threshold processing in the edge detection unit 20. Specifically, the threshold value calculation means 60 calculates the first threshold value h th and the second threshold value l th according to the following procedure.

まず、閾値算出手段60は、モデル生成・更新手段50によって、例えば図2(a)に示すようなガウス混合モデルが生成または更新されている場合、当該ガウス混合モデルを構成するガウスモデルG,G,Gの中から、予め定められたwmin以上の重みwを有するガウスモデルG,Gを選択する。ここで、予め定められたwminは、0〜1の範囲で設定され、ここでは例えば0.7に設定される。 First, when a Gaussian mixture model as shown in FIG. 2A, for example, is generated or updated by the model generation / update unit 50, the threshold value calculation unit 60 includes Gaussian models G 1 and G constituting the Gaussian mixture model. from the G 2, G 3, selects the Gaussian model G 1, G 3 having w min or more weights w determined in advance. Here, the predetermined w min is set in a range of 0 to 1, and is set to 0.7 here, for example.

次に、閾値算出手段60は、図2(a)に示すように、予め定められたwmin以上の重みwを有するガウスモデルが複数存在する場合は、より高い重みwを有するガウスモデルGを選択する。これらの処理は、ガウス混合モデルを構成するガウスモデルの中で、最も学習したエッジ点の数が多く、最も信頼性の高いガウスモデルを選択することに相当する。 Next, the threshold value calculating means 60, as shown in FIG. 2 (a), if the Gaussian model there are multiple with w min or more weight w predetermined Gaussian model G 1 having a higher weight w Select. These processes correspond to selecting the most reliable Gaussian model with the most learned edge points among the Gaussian models constituting the Gaussian mixture model.

そして、閾値算出手段60は、選択したガウスモデルGの平均値と標準偏差とを用いて第1算出値および第2算出値を算出する。第1算出値は、下記式(1)に示すように、ガウスモデルの平均値μからガウスモデルの標準偏差σをk倍したものを減じることで算出することができる。また、第2算出値は、下記式(2)に示すように、ガウスモデルの平均値μを2で除することで算出することができる。 Then, the threshold calculating means 60 calculates the first calculated value and the second calculated value by using the average value of the Gaussian model G 1 selected and the standard deviation. As shown in the following formula (1), the first calculated value can be calculated by subtracting a value obtained by multiplying the Gaussian model standard deviation σ by k from the average value μ of the Gaussian model. The second calculated value can be calculated by dividing the average value μ of the Gaussian model by 2, as shown in the following formula (2).

第1算出値=μ-kσ ・・・式(1)
第2算出値=μ/2 ・・・式(2)
First calculated value = μ−kσ (1)
Second calculated value = μ / 2 Formula (2)

そして、閾値算出手段60は、第1算出値が第2算出値を超える場合は、第1算出値を第1閾値hthとし、第2算出値を第2閾値lthとする。一方、閾値算出手段60は、第1算出値が第2算出値以下である場合は、第2算出値を第1閾値hthとし、第1算出値を第2閾値lthとする。これらの処理は、例えば以下の式(3)のように表わすことができる。 Then, when the first calculated value exceeds the second calculated value, the threshold value calculation means 60 sets the first calculated value as the first threshold value h th and sets the second calculated value as the second threshold value l th . On the other hand, when the first calculated value is less than or equal to the second calculated value, the threshold value calculating means 60 sets the second calculated value as the first threshold value h th and sets the first calculated value as the second threshold value l th . These processes can be expressed as, for example, the following equation (3).

If(μ-kσ)>μ/2
th=μ-kσ,lth=μ/2
else,
th=μ/2,lth=μ-kσ ・・・式(3)
If (μ-kσ)> μ / 2
h th = μ-kσ, l th = μ / 2
else,
h th = μ / 2, l th = μ-kσ (3)

ここで、式(1)〜(3)におけるkは、例えば1.0〜2.5の範囲とすることが好ましく、1.5とすることがより好ましい。式(3)におけるkが1.0未満である場合、エッジ検出の条件が厳しすぎるためエッジ点を検出できない場合があり、式(3)におけるkが2.5を超える場合、エッジ検出の条件が緩すぎるためエッジ点ではない画素をエッジ点として検出してしまう可能性がある。   Here, k in the formulas (1) to (3) is preferably in the range of 1.0 to 2.5, for example, and more preferably 1.5. If k in Expression (3) is less than 1.0, the edge detection condition may be too strict to detect an edge point. If k in Expression (3) exceeds 2.5, the edge detection condition may be Therefore, a pixel that is not an edge point may be detected as an edge point.

一方、閾値算出手段60は、モデル生成・更新手段50によって、例えば図2(b)に示すようなガウス混合モデルが生成または更新されている場合、当該ガウス混合モデルを構成するガウスモデルG,G,Gの中に予め定められたwmin以上の重みwを有するガウスモデルが存在しないため、当該ガウスモデルを選択せず、第1閾値hthおよび第2閾値lthも算出しない。従って、この場合は、エッジ検出手段20は予め定められた初期閾値を用いてフレーム画像からエッジ点を検出することになる。 On the other hand, when the Gaussian mixture model as shown in FIG. 2B, for example, is generated or updated by the model generation / update unit 50, the threshold value calculation unit 60, the Gaussian model G 4 , constituting the Gaussian mixture model, since the Gaussian model having a predetermined w min or more weights w in G 5, G 6 is absent, without selecting the Gaussian model, nor calculated first threshold value h th and the second threshold l th. Therefore, in this case, the edge detection means 20 detects an edge point from the frame image using a predetermined initial threshold value.

ここで、閾値算出手段60は、第1閾値hthおよび第2閾値lthに加えて、第3閾値gthを算出することが好ましい。この第3閾値gthは、第1閾値hthよりも大きい値を有しており、エッジ検出の際の上限の閾値として機能するものである。このように、エッジ検出装置1は、第3閾値gthをエッジ検出の際の上限値として用いることで、第1閾値hthを超える高いエッジ勾配強度を有する部分(例えば影等)がエッジ点として検出されてしまうことを抑制することができ、エッジ検出の精度をより向上させることができる。 Here, it is preferable that the threshold value calculation unit 60 calculates the third threshold value g th in addition to the first threshold value h th and the second threshold value l th . The third threshold value g th has a value larger than the first threshold value h th and functions as an upper limit threshold value at the time of edge detection. As described above, the edge detection device 1 uses the third threshold value g th as the upper limit value in edge detection, so that a portion having a high edge gradient strength exceeding the first threshold value h th (for example, a shadow or the like) is an edge point. Can be suppressed and the accuracy of edge detection can be further improved.

閾値算出手段60は、前記した図3(a)に示すように、モデル生成・更新手段50によって生成または更新されたガウス混合モデルから、予め定められたwmin以上の重みwを有し、かつ最も高い大きい重みwを有するガウスモデルGを選択した後、下記式(4)に示すように、ガウスモデルGの平均値μにガウスモデルの標準偏差σをk倍したものを加えることで、第3閾値gthを算出する。なお、下記式(4)におけるkは、前記した式(1)、(3)と同様に、例えば1.0〜2.5の範囲とすることが好ましく、1.5とすることがより好ましい。 As shown in FIG. 3A, the threshold value calculation means 60 has a weight w equal to or greater than a predetermined w min from the Gaussian mixture model generated or updated by the model generation / update means 50, and After selecting the Gaussian model G 1 having the highest large weight w, as shown in the following equation (4), the average value μ of the Gaussian model G 1 is added to the standard deviation σ of the Gaussian model multiplied by k. The third threshold value g th is calculated. In the following formula (4), k is preferably in the range of, for example, 1.0 to 2.5, and more preferably 1.5, as in the above formulas (1) and (3). .

th=μ+kσ ・・・式(4) g th = μ + kσ (4)

閾値算出手段60によって算出される第1閾値hth、第2閾値lthおよび第3閾値gthは、例えば前記した第1算出値が第2算出値を超える場合であって、kを1.5に設定した場合、図3(a)のように図示することができる。一方、閾値算出手段60によって算出される第1閾値hth、第2閾値lthおよび第3閾値gthは、前記した第1算出値が第2算出値以下である場合であって、kを1.5に設定した場合、例えば図3(b)のように図示することができる。このように、第1算出値が第2算出値以下である場合とは、例えば図3(b)に示すように、ガウスモデルの山が横に広く、「μ-kσ」が「μ/2」以下となってしまう場合のことを意味している。 The first threshold value h th , the second threshold value l th, and the third threshold value g th calculated by the threshold value calculation means 60 are, for example, a case where the first calculated value exceeds the second calculated value, and k is 1. When set to 5, it can be illustrated as shown in FIG. On the other hand, the first threshold value h th , the second threshold value l th, and the third threshold value g th calculated by the threshold value calculation means 60 are cases where the first calculated value is less than or equal to the second calculated value, and k is When set to 1.5, for example, it can be illustrated as shown in FIG. Thus, when the first calculated value is equal to or smaller than the second calculated value, for example, as shown in FIG. 3B, the Gaussian model has a wide mountain and “μ−kσ” is “μ / 2”. It means the case where it becomes below.

閾値算出手段60には、図1に示すように、モデル生成・更新手段50からガウス混合モデルが入力される。そして、閾値算出手段60は、前記した手法によって第1閾値hth、第2閾値lthおよび第3閾値gthを算出し、これらをエッジ検出手段20に出力する。 As shown in FIG. 1, a Gaussian mixture model is input from the model generation / update unit 50 to the threshold calculation unit 60. Then, the threshold value calculation unit 60 calculates the first threshold value h th , the second threshold value l th, and the third threshold value g th by the above-described method, and outputs them to the edge detection unit 20.

以上のような構成を備えるエッジ検出装置1は、Cannyオペレータを用いたエッジ検出処理において、従来は固定されていた第1閾値hthおよび第2閾値lthを、前フレーム画像以前のエッジ検出結果を学習させたガウス混合モデルに基づいて自動的に決定することができる。従って、エッジ検出装置1によれば、前フレーム画像以前のエッジ検出結果を学習させたガウス混合モデルに基づいて決定された第1閾値hthおよび第2閾値lthを用いて、前フレーム以前のエッジ検出結果を加味してエッジ検出を行うため、仮に照明等の撮影条件が変化した場合であっても、映像を構成するフレーム画像のそれぞれからエッジ点を正確に検出することができる。 In the edge detection apparatus 1 having the above-described configuration, in the edge detection process using the Canny operator, the first threshold value h th and the second threshold value l th that have been fixed in the past are used as the edge detection results before the previous frame image. Can be automatically determined based on the Gaussian mixture model learned. Therefore, according to the edge detection apparatus 1, using the first threshold value h th and the second threshold value l th determined based on the Gaussian mixture model in which the edge detection result before the previous frame image is learned, Since edge detection is performed in consideration of the edge detection result, edge points can be accurately detected from each of the frame images constituting the video even if the shooting conditions such as illumination are changed.

また、エッジ検出装置1は、映像のエッジを利用した自動処理等に関するアルゴリズムに組み込むことで、精度が高く頑健なシステムを構築することができる。例えば、エッジ検出装置1は、生産ラインにおいて製品のエッジを検出するために利用される場合においても、照明環境等を厳密に拘束することなく、エッジを正確に検出することができる。   Moreover, the edge detection apparatus 1 can construct a highly accurate and robust system by incorporating it into an algorithm relating to automatic processing using the edge of a video. For example, even when the edge detection device 1 is used to detect an edge of a product in a production line, the edge detection device 1 can accurately detect the edge without strictly restricting the lighting environment or the like.

以下、エッジ検出装置1の動作について、図4を参照しながら簡単に説明する。なお、以下では、説明の便宜上、エッジ検出装置1はフレーム画像から必ずエッジ点を検出できるということを前提として説明を行う。   Hereinafter, the operation of the edge detection apparatus 1 will be briefly described with reference to FIG. In the following description, for convenience of explanation, the description will be made on the assumption that the edge detection apparatus 1 can always detect an edge point from a frame image.

まず、エッジ検出装置1は、映像入力手段10に対して例えば外部の図示しない映像記憶手段から映像が入力された場合(ステップS1においてYes)、エッジ検出手段20によって、映像を構成する現フレーム画像からエッジ点を検出する(ステップS2)。その際、エッジ検出手段20は、予め定められた初期閾値を第1閾値hthおよび第2閾値lthとして用いてエッジ点を検出する。 First, when a video is input to the video input unit 10 from, for example, an external video storage unit (not shown) (Yes in step S1), the edge detection device 1 uses the edge detection unit 20 to form a current frame image that constitutes the video. An edge point is detected from (step S2). At that time, the edge detection means 20 detects an edge point using a predetermined initial threshold value as the first threshold value h th and the second threshold value l th .

次に、エッジ検出装置1は、エッジ追跡手段40によって、現フレーム画像から検出されたエッジ点が追跡すべき追跡対象エッジがあるかどうかを判定する(ステップS3)。そして、エッジ検出装置1は、追跡対象エッジがない場合(ステップS3においてNo)、モデル生成・更新手段50によって、ガウス混合モデルを生成する(ステップS4)。なお、追跡対象エッジがない場合とは、前記したように、例えば現フレーム画像が映像の1枚目(最初)のフレームである場合等が挙げられる。   Next, the edge detection apparatus 1 determines whether there is a tracking target edge to be tracked by the edge point detected from the current frame image by the edge tracking unit 40 (step S3). When there is no tracking target edge (No in step S3), the edge detection device 1 generates a Gaussian mixture model by the model generation / update unit 50 (step S4). The case where there is no tracking target edge includes the case where the current frame image is the first (first) frame of the video as described above.

次に、エッジ検出装置1は、閾値算出手段60によって、モデル生成・更新手段50によって生成されたガウス混合モデルを構成する個々のガウスモデルの中に、予め定められたwmin以上の重みwを有するガウスモデルが存在するか否かを判定する(ステップS5)。そして、エッジ検出装置1は、当該予め定められたwmin以上の重みwを有するガウスモデルが存在する場合(ステップS5においてYes)、閾値(第1閾値hth、第2閾値lthおよび第3閾値gth)を算出し(ステップS6)、ステップS1に戻る。 Next, the edge detection apparatus 1 adds a weight w equal to or greater than a predetermined w min to the individual Gaussian models constituting the Gaussian mixture model generated by the model generation / update unit 50 by the threshold calculation unit 60. It is determined whether or not there is a Gaussian model possessed (step S5). Then, when there is a Gaussian model having a weight w greater than or equal to the predetermined w min (Yes in step S5), the edge detection device 1 uses threshold values (first threshold value h th , second threshold value l th, and third threshold value). The threshold value g th ) is calculated (step S6), and the process returns to step S1.

一方、エッジ検出装置1は、ステップS3において、追跡対象エッジがある場合(ステップS3においてYes)、エッジ追跡手段40によって、現フレーム画像のエッジ点から前フレーム画像のエッジ点を追跡し、当該前フレーム画像のエッジ点とエッジ勾配強度およびエッジ方向が類似する現フレームのエッジ点を検出する(ステップS7)。次に、エッジ検出装置1は、モデル生成・更新手段50によって、追跡に成功したエッジ点があるか否かを判定する(ステップS8)。そして、エッジ検出装置1は、追跡に成功したエッジ点がある場合(ステップS8においてYes)、モデル生成・更新手段50によって、既に生成されたガウス混合モデルを更新し(ステップS9)、ステップS5に進む。   On the other hand, if there is an edge to be tracked in step S3 (Yes in step S3), the edge detection apparatus 1 tracks the edge point of the previous frame image from the edge point of the current frame image by the edge tracking unit 40, and An edge point of the current frame that is similar in edge gradient strength and edge direction to the edge point of the frame image is detected (step S7). Next, the edge detection apparatus 1 determines whether there is an edge point that has been successfully tracked by the model generation / update unit 50 (step S8). Then, when there is an edge point that has been successfully tracked (Yes in step S8), the edge detection device 1 updates the already generated Gaussian mixture model by the model generation / update unit 50 (step S9), and then proceeds to step S5. move on.

一方、エッジ検出装置1は、追跡に成功したエッジ点がない合(ステップS8においてNo)、モデル生成・更新手段50によって、既に生成されたガウス混合モデルを破棄し(ステップS10)、ステップS1に戻る。   On the other hand, if there is no edge point that has been successfully tracked (No in step S8), the edge detection device 1 discards the already generated Gaussian mixture model by the model generation / update unit 50 (step S10), and the process proceeds to step S1. Return.

以上のような動作を行うエッジ検出装置1は、前フレーム画像以前のエッジ検出結果を学習させたガウス混合モデルを生成または順次更新し、当該ガウス混合モデルに基づいて、前フレーム以前のエッジ検出結果を加味してエッジ検出を行うため、仮に照明等の撮影条件が変化した場合であっても、映像を構成するフレーム画像のそれぞれからエッジ点を正確に検出することができる。   The edge detection apparatus 1 that performs the operation as described above generates or sequentially updates a Gaussian mixture model in which the edge detection results before the previous frame image are learned, and based on the Gaussian mixture model, the edge detection results before the previous frame Therefore, the edge point can be accurately detected from each of the frame images constituting the video even if the photographing condition such as illumination is changed.

[エッジ検出プログラム]
ここで、前記したエッジ検出装置1は、一般的なコンピュータを、前記した各手段として機能させるプログラムにより動作させることで実現することができる。このプログラムは、通信回線を介して配布することも可能であるし、CD−ROM等の記録媒体に書き込んで配布することも可能である。
[Edge detection program]
Here, the edge detection apparatus 1 described above can be realized by operating a general computer with a program that functions as each of the above-described means. This program can be distributed via a communication line, or can be written on a recording medium such as a CD-ROM for distribution.

以下、本発明の効果を確認する実施例について説明する。本実施例では、本発明に係るエッジ検出装置(以下、本手法という)と、従来技術に係るエッジ検出装置(以下、従来手法という)と、をモデルベースカメラトラッキングのエッジ検出にそれぞれ適用して比較を行った。ここで、モデルベースカメラトラッキングとは、実空間の3次元形状のエッジ点をカメラ撮影映像で追跡し、予め用意した3次元モデルと比較することで、カメラ姿勢を推定するものである。すなわち、モデルベーストラッキングでは、カメラ撮影映像におけるエッジ点を検出し、当該検出したエッジ点と予め用意した3次元モデルのエッジ点とをマッチングすることで、撮影時におけるカメラ姿勢を推定する。   Examples for confirming the effects of the present invention will be described below. In this embodiment, the edge detection device according to the present invention (hereinafter referred to as the present method) and the edge detection device according to the prior art (hereinafter referred to as the conventional method) are respectively applied to the edge detection of model-based camera tracking. A comparison was made. Here, model-based camera tracking is to estimate a camera posture by tracking edge points having a three-dimensional shape in real space with a camera-captured video and comparing them with a three-dimensional model prepared in advance. That is, in model-based tracking, an edge point in a camera-captured video is detected, and the detected posture is matched with an edge point of a three-dimensional model prepared in advance to estimate the camera posture at the time of shooting.

ここで、本実施例では、従来手法を再現するために、モデルベースカメラトラッキングのエッジ検出処理において、固定の第1閾値hth(=200)および第2閾値lth(=100)によってエッジ検出を行った。また、本手法を再現するために、モデルベースカメラトラッキングのエッジ検出処理において、予め生成しておいたガウス混合モデルから算出した第1閾値hthおよび第2閾値lthによってエッジ検出を行った。 Here, in the present embodiment, in order to reproduce the conventional method, in the edge detection process of model-based camera tracking, edge detection is performed using a fixed first threshold value h th (= 200) and second threshold value l th (= 100). Went. Further, in order to reproduce this method, in the edge detection process of model-based camera tracking, edge detection is performed using the first threshold value h th and the second threshold value l th calculated from a Gaussian mixture model generated in advance.

次に、従来手法および本手法で得られたエッジ点と、予め用意した3次元モデルの対応するエッジ点と、をマッチングすることでカメラの姿勢情報(3つの並進パラメータt〜tと、3つの回転パラメータr〜r)を算出した。そして、予めC言語ライブラリ「ARToolKit」を用いて推定しておいた基準となるカメラの姿勢情報(3つの並進パラメータt〜tと、3つの回転パラメータr〜r)と、前記算出したカメラの姿勢情報との差を求めることで、カメラの姿勢誤差を求めた。また、同時に、カメラの姿勢誤差の時間的変化(標準偏差)についても算出した。その結果を表1に示す。なお、表1における「エラー」は、前記したカメラの姿勢誤差を示しており、「ジッター」は、前記したカメラの姿勢誤差の時間的変化を示している。 Next, by matching the edge points obtained by the conventional method and the present method with the corresponding edge points of the three-dimensional model prepared in advance, the camera posture information (three translation parameters t 1 to t 3 , Three rotation parameters r 1 to r 3 ) were calculated. Then, the camera posture information (three translation parameters t 1 to t 3 and three rotation parameters r 1 to r 3 ) as a reference, which has been estimated in advance using the C language library “ARTToolKit”, and the calculation The attitude error of the camera was obtained by calculating the difference from the attitude information of the camera. At the same time, the temporal change (standard deviation) of the camera posture error was also calculated. The results are shown in Table 1. “Error” in Table 1 indicates the attitude error of the camera described above, and “jitter” indicates a temporal change in the attitude error of the camera described above.

Figure 2013037658
Figure 2013037658

表1に示すように、従来手法では、並進パラメータと回転パラメータのエラーの平均は、それぞれ4.265mm、0.474度であり、並進パラメータと回転パラメータのジッターの平均は、それぞれ1.403mm/frame、0.183°/frameであった。一方、本手法では、並進パラメータと回転パラメータのエラーの平均は、それぞれ3.919mm、0.409度であり、並進パラメータと回転パラメータのジッターの平均は、それぞれ1.289mm/frame、0.166°/frameであった。   As shown in Table 1, in the conventional method, the average error of the translation parameter and the rotation parameter is 4.265 mm and 0.474 degrees, respectively, and the average jitter of the translation parameter and the rotation parameter is 1.403 mm / frame, 0.183 ° / frame. On the other hand, in this method, the average error of the translation parameter and the rotation parameter is 3.919 mm and 0.409 degrees, respectively, and the average jitter of the translation parameter and the rotation parameter is 1.289 mm / frame and 0.166, respectively. ° / frame.

このように、モデルベースカメラトラッキングにおいて、本手法を用いてエッジ検出を行うと、カメラ撮影映像からエッジ点を正確に検出することができるため、従来手法よりも、エラーとジッターが低下することがわかる。また、従来手法では、カメラ撮影映像から検出したエッジ点と、予め用意した3次元モデルのエッジ点と、をマッチングする際に、平均で1.8998個の対応する(類似する)エッジ点の候補があったが、本手法では、平均で1.793個であった。従って、本手法を用いてエッジ検出を行うと、従来手法よりも誤ったエッジ点を追跡する可能性が減少することがわかる。   In this way, in model-based camera tracking, if edge detection is performed using this method, edge points can be accurately detected from camera-captured images, so errors and jitter may be reduced compared to conventional methods. Recognize. Further, in the conventional method, when matching an edge point detected from a camera-captured video image and an edge point of a three-dimensional model prepared in advance, 1.8998 corresponding (similar) edge point candidates on average. However, in this method, the average number was 1.793. Therefore, it can be seen that when edge detection is performed using this method, the possibility of tracking an incorrect edge point is reduced as compared with the conventional method.

次に、本手法および従来手法によってエッジ検出を行った実際の画像を図5および図6に示す。ここで、図5(a)における右上の図は、本手法および従来手法によってエッジ検出を行った元の画像を示している。また、図6(a)、(b)は、それぞれ図5(a)、(b)の番号1〜3を拡大したものを示している。また、図5(b)および図6(b)におけるエッジに沿って描画された空の円と塗りつぶしの円は、それぞれ、予め用意した3次元モデルのエッジ点と本手法によって検出したエッジ点とを示しており、当該2つの円を通る短い線分は、本手法によって検出したエッジ点の追跡範囲を示している。   Next, FIGS. 5 and 6 show actual images obtained by performing edge detection by the present method and the conventional method. Here, the upper right diagram in FIG. 5A shows an original image in which edge detection is performed by the present method and the conventional method. FIGS. 6A and 6B show the enlarged numbers 1 to 3 in FIGS. 5A and 5B, respectively. In addition, the empty circle and the filled circle drawn along the edges in FIGS. 5B and 6B are the edge points of the three-dimensional model prepared in advance and the edge points detected by the present method, respectively. The short line segment passing through the two circles indicates the tracking range of the edge point detected by this method.

従来手法によるエッジ検出結果を参照すると、図6(a)における符号eおよび符号eに示すように、影の部分が誤ってエッジとして検出されていることがわかる。また、図6(a)の符号eに示すように、エッジではない部分が誤ってエッジとして検出されていることがわかる。 Referring to the edge detection result according to the conventional method, it can be seen that the shadow portion is erroneously detected as an edge, as indicated by reference numerals e 1 and e 2 in FIG. Further, as indicated by reference numeral e 3 of FIG. 6 (a), it is found that it is detected as an edge incorrectly moieties not an edge.

一方、本手法によるエッジ検出結果を参照すると、図6(b)に示すように、影の部分やエッジではない部分はエッジとして検出されていないことがわかる。図6(a)、(b)における箱の縁の部分のエッジB,Bを比較すると、図6(a)ではエッジB周辺に他のエッジが多数検出されているのに対し、図6(b)ではエッジB周辺に他のエッジが検出されていない。従って、モデルベースカメラトラッキングにおいて、例えばこの箱の3次元モデルを予め用意してトラッキングを行うと、周辺に他の無駄なエッジが検出されている従来手法(図6(a)参照)と比較して、周辺に他の無駄なエッジが検出されていない本手法(図6(b)参照)のほうがトラッキングの精度により優れていることがわかる。 On the other hand, referring to the edge detection result obtained by this method, as shown in FIG. 6B, it can be seen that a shadow portion or a non-edge portion is not detected as an edge. Comparing the edges B 1 and B 2 at the edge of the box in FIGS. 6A and 6B, many other edges are detected around the edge B 1 in FIG. 6A. another edge to the edge B 2 around in FIG 6 (b) is not detected. Therefore, in model-based camera tracking, for example, when a three-dimensional model of this box is prepared in advance and tracking is performed, it is compared with the conventional method in which other useless edges are detected in the vicinity (see FIG. 6A). Thus, it can be seen that the present technique (see FIG. 6B) in which no other useless edges are detected in the periphery is superior in tracking accuracy.

以上、本発明に係るエッジ検出装置について、発明を実施するための形態により具体的に説明したが、本発明の趣旨はこれらの記載に限定されるものではなく、特許請求の範囲の記載に基づいて広く解釈されなければならない。また、これらの記載に基づいて種々変更、改変等したものも本発明の趣旨に含まれることはいうまでもない。   The edge detection device according to the present invention has been specifically described above with reference to the embodiments for carrying out the invention. However, the gist of the present invention is not limited to these descriptions, and is based on the descriptions in the claims. Must be interpreted widely. Needless to say, various changes and modifications based on these descriptions are also included in the spirit of the present invention.

1 エッジ検出装置
10 映像入力手段
20 エッジ検出手段
30 検出結果出力手段
40 エッジ追跡手段
50 モデル生成・更新手段
60 閾値算出手段
DESCRIPTION OF SYMBOLS 1 Edge detection apparatus 10 Image | video input means 20 Edge detection means 30 Detection result output means 40 Edge tracking means 50 Model production | generation / update means 60 Threshold calculation means

Claims (6)

入力された映像からエッジを構成するエッジ点を検出するエッジ検出装置であって、
前記映像を構成するフレーム画像ごとに、第1閾値を超えるエッジ勾配強度を有する画素と、当該画素に隣接する画素であって、前記第1閾値以下かつ前記第1閾値より低い第2閾値以上のエッジ勾配強度を有する画素と、を前記エッジ点として検出するエッジ検出手段と、
現フレーム画像のエッジ点から、当該エッジ点とエッジ勾配強度およびエッジ方向が類似する前フレーム画像のエッジ点を追跡するエッジ追跡手段と、
前記エッジ検出手段によって検出されたエッジ点を分布化してガウス混合モデルを生成するとともに、前記エッジ追跡手段によって追跡が成功した前記現フレーム画像のエッジ点を前記ガウス混合モデルに追加することで前記ガウス混合モデルをフレーム画像ごとに順次更新するモデル生成・更新手段と、
前記モデル生成・更新手段によって生成および更新された前記ガウス混合モデルを構成する個々のガウスモデルから、予め定められた値以上の重みを有するとともに、最も大きい重みを有するガウスモデルを選択し、当該ガウスモデルの平均値から当該ガウスモデルの標準偏差を所定数倍したものを減じた値である第1算出値が、前記平均値を所定値で除した値である第2算出値を超える場合は、前記第1算出値を前記第1閾値とするとともに前記第2算出値を前記第2閾値とし、前記第1算出値が前記第2算出値以下である場合は、前記第2算出値を前記第1閾値とするとともに前記第1算出値を前記第2閾値とする閾値算出手段と、
を備えることを特徴とするエッジ検出装置。
An edge detection device for detecting edge points constituting an edge from input video,
For each frame image constituting the video, a pixel having an edge gradient strength exceeding a first threshold and a pixel adjacent to the pixel, the pixel being equal to or lower than the first threshold and lower than the second threshold lower than the first threshold Edge detection means for detecting pixels having edge gradient strength as the edge points;
Edge tracking means for tracking the edge point of the previous frame image whose edge gradient strength and edge direction are similar to the edge point from the edge point of the current frame image;
The Gaussian mixture model is generated by distributing the edge points detected by the edge detection unit, and the edge point of the current frame image that has been successfully tracked by the edge tracking unit is added to the Gaussian mixture model. Model generation / update means for sequentially updating the mixed model for each frame image;
A Gaussian model having a weight greater than or equal to a predetermined value and having the largest weight is selected from the individual Gaussian models constituting the Gaussian mixture model generated and updated by the model generation / update means, and the Gaussian is selected. When the first calculated value that is a value obtained by subtracting the standard deviation of the Gaussian model from the average value of the model by a predetermined number exceeds the second calculated value that is a value obtained by dividing the average value by the predetermined value, When the first calculated value is the first threshold value and the second calculated value is the second threshold value, and the first calculated value is less than or equal to the second calculated value, the second calculated value is the second threshold value. Threshold calculation means for setting the first calculated value as the second threshold and the first calculated value;
An edge detection apparatus comprising:
前記閾値算出手段は、前記平均値に前記標準偏差を所定数倍したものを加えることで、前記第1閾値よりも高い第3閾値を算出し、
前記エッジ検出手段は、前記映像を構成するフレーム画像ごとに、前記第3閾値以下かつ前記第1閾値を超えるエッジ勾配強度を有する画素と、当該画素に隣接する画素であって、前記第1閾値以下かつ前記第2閾値以上のエッジ勾配強度を有する画素と、を前記エッジ点として検出することを特徴とする請求項1に記載のエッジ検出装置。
The threshold value calculation means calculates a third threshold value higher than the first threshold value by adding a value obtained by multiplying the average value by a predetermined number of times to the average value,
The edge detection means includes, for each frame image constituting the video, a pixel having an edge gradient strength that is equal to or less than the third threshold and exceeds the first threshold, and a pixel adjacent to the pixel, the first threshold The edge detection apparatus according to claim 1, wherein a pixel having an edge gradient strength equal to or greater than the second threshold is detected as the edge point.
前記エッジ検出手段は、前記閾値算出手段によって前記第1閾値および前記第2閾値が算出された場合は、当該算出された前記第1閾値および前記第2閾値を用いて前記エッジ点を検出し、前記閾値算出手段によって前記第1閾値および前記第2閾値が算出されない場合は、予め定められた固定値を前記第1閾値および前記第2閾値として用いて前記エッジ点を検出することを特徴とする請求項1または請求項2に記載のエッジ検出装置。   When the first threshold value and the second threshold value are calculated by the threshold value calculation means, the edge detection means detects the edge point using the calculated first threshold value and the second threshold value, When the threshold value calculation unit does not calculate the first threshold value and the second threshold value, the edge point is detected using a predetermined fixed value as the first threshold value and the second threshold value. The edge detection apparatus according to claim 1 or 2. 前記モデル生成・更新手段は、前記エッジ検出手段によって前記エッジ点が検出できなかった場合、または、前記エッジ追跡手段によって追跡が成功したエッジ点が存在しない場合、前記ガウス混合モデルを破棄し、
前記エッジ検出手段は、前記ガウス混合モデルが破棄された場合、予め定められた固定値を前記第1閾値および前記第2閾値として用いて前記エッジ点を検出することを特徴とする請求項1から請求項3のいずれか一項に記載のエッジ検出装置。
The model generation / update unit discards the Gaussian mixture model when the edge point cannot be detected by the edge detection unit or when there is no edge point successfully tracked by the edge tracking unit,
The edge detection unit detects the edge point by using a predetermined fixed value as the first threshold and the second threshold when the Gaussian mixture model is discarded. The edge detection apparatus according to claim 3.
前記エッジ追跡手段は、現フレーム画像のエッジ点における予め指定されたエッジ点から、当該エッジ点とエッジ勾配強度およびエッジ方向が類似する前フレーム画像のエッジ点を追跡することを特徴とする請求項1から請求項4のいずれか一項に記載のエッジ検出装置。   The edge tracking means is configured to track an edge point of a previous frame image having a similar edge gradient strength and edge direction from an edge point designated in advance in an edge point of a current frame image. The edge detection apparatus as described in any one of Claims 1-4. 入力された映像からエッジを構成するエッジ点を検出するために、コンピュータを、
前記映像を構成するフレーム画像ごとに、第1閾値を超えるエッジ勾配強度を有する画素と、当該画素に隣接する画素であって、前記第1閾値以下かつ前記第1閾値より低い第2閾値以上のエッジ勾配強度を有する画素と、を前記エッジ点として検出するエッジ検出手段、
現フレーム画像のエッジ点から、当該エッジ点とエッジ勾配強度およびエッジ方向が類似する前フレーム画像のエッジ点を追跡するエッジ追跡手段、
前記エッジ検出手段によって検出されたエッジ点を分布化してガウス混合モデルを生成するとともに、前記エッジ追跡手段によって追跡が成功した前記現フレーム画像のエッジ点を前記ガウス混合モデルに追加することで前記ガウス混合モデルをフレーム画像ごとに順次更新するモデル生成・更新手段、
前記モデル生成・更新手段によって生成および更新された前記ガウス混合モデルを構成する個々のガウスモデルから、予め定められた値以上の重みを有するとともに、最も大きい重みを有するガウスモデルを選択し、当該ガウスモデルの平均値から当該ガウスモデルの標準偏差を所定数倍したものを減じた値である第1算出値が、前記平均値を所定値で除した値である第2算出値を超える場合は、前記第1算出値を前記第1閾値とするとともに前記第2算出値を前記第2閾値とし、前記第1算出値が前記第2算出値以下である場合は、前記第2算出値を前記第1閾値とするとともに前記第1算出値を前記第2閾値とする閾値算出手段、
として機能させることを特徴とするエッジ検出プログラム。
In order to detect the edge points that make up the edge from the input video,
For each frame image constituting the video, a pixel having an edge gradient strength exceeding a first threshold and a pixel adjacent to the pixel, the pixel being equal to or lower than the first threshold and lower than the second threshold lower than the first threshold Edge detection means for detecting pixels having edge gradient strength as the edge points;
Edge tracking means for tracking the edge point of the previous frame image whose edge gradient strength and edge direction are similar from the edge point of the current frame image,
The Gaussian mixture model is generated by distributing the edge points detected by the edge detection unit, and the edge point of the current frame image that has been successfully tracked by the edge tracking unit is added to the Gaussian mixture model. Model generation / update means for sequentially updating the mixed model for each frame image,
A Gaussian model having a weight greater than or equal to a predetermined value and having the largest weight is selected from the individual Gaussian models constituting the Gaussian mixture model generated and updated by the model generation / update means, and the Gaussian is selected. When the first calculated value that is a value obtained by subtracting the standard deviation of the Gaussian model from the average value of the model by a predetermined number exceeds the second calculated value that is a value obtained by dividing the average value by the predetermined value, When the first calculated value is the first threshold value and the second calculated value is the second threshold value, and the first calculated value is less than or equal to the second calculated value, the second calculated value is the second threshold value. Threshold calculation means for setting the first calculated value as the second threshold and the first calculated value;
Edge detection program characterized by functioning as
JP2011175745A 2011-08-11 2011-08-11 Edge detection device and program thereof Expired - Fee Related JP5677234B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2011175745A JP5677234B2 (en) 2011-08-11 2011-08-11 Edge detection device and program thereof

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2011175745A JP5677234B2 (en) 2011-08-11 2011-08-11 Edge detection device and program thereof

Publications (2)

Publication Number Publication Date
JP2013037658A true JP2013037658A (en) 2013-02-21
JP5677234B2 JP5677234B2 (en) 2015-02-25

Family

ID=47887194

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2011175745A Expired - Fee Related JP5677234B2 (en) 2011-08-11 2011-08-11 Edge detection device and program thereof

Country Status (1)

Country Link
JP (1) JP5677234B2 (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108369414A (en) * 2015-10-15 2018-08-03 施耐德电气美国股份有限公司 The visual monitoring system of load centre
JP2018147199A (en) * 2017-03-03 2018-09-20 ブラザー工業株式会社 Image processing device, and computer program
JP2020052731A (en) * 2018-09-27 2020-04-02 キヤノン電子株式会社 Image processing device, control method for image processing device, and program

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10271286A (en) * 1997-03-06 1998-10-09 Xerox Corp Method and system for automatically detecting document edge
JP2011118890A (en) * 2009-11-04 2011-06-16 Valeo Schalter & Sensoren Gmbh Method and system for detecting whole lane boundary

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10271286A (en) * 1997-03-06 1998-10-09 Xerox Corp Method and system for automatically detecting document edge
JP2011118890A (en) * 2009-11-04 2011-06-16 Valeo Schalter & Sensoren Gmbh Method and system for detecting whole lane boundary

Non-Patent Citations (5)

* Cited by examiner, † Cited by third party
Title
CSNG200701216003; 多々良 友英 大橋 剛介: 'Cannyエッジ検出による多重解像度エッジ画像を用いたスケッチ画像検索' 電気学会論文誌C Vol.127 No.11 EIS, Vol.127, No.11, 20071101, P.1880-1887, (社)電気学会 *
CSNG201100090021; 松濤 智明 山崎 俊彦 相澤 清晴: '天井カメラ映像を用いた公共空間の人物属性解析' 電子情報通信学会技術研究報告 Vol.110 No.414 PRMU 2010-229, 20110210, P.135-140, 社団法人電子情報通信学会 *
JPN6014045789; JOHN CANNY: 'A Computational Approach to Edge Detection' IEEE TRANSACTIONS ON PETTERN ANALYSIS AND MACHINE INTELLIGENCE VOL.PAMI-8, NO.6, NOVEMBER 1986, 19861101, P.679-698, IEEE *
JPN6014045790; 多々良 友英 大橋 剛介: 'Cannyエッジ検出による多重解像度エッジ画像を用いたスケッチ画像検索' 電気学会論文誌C Vol.127 No.11 EIS, Vol.127, No.11, 20071101, P.1880-1887, (社)電気学会 *
JPN6014045792; 松濤 智明 山崎 俊彦 相澤 清晴: '天井カメラ映像を用いた公共空間の人物属性解析' 電子情報通信学会技術研究報告 Vol.110 No.414 PRMU 2010-229, 20110210, P.135-140, 社団法人電子情報通信学会 *

Cited By (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108369414A (en) * 2015-10-15 2018-08-03 施耐德电气美国股份有限公司 The visual monitoring system of load centre
CN108369414B (en) * 2015-10-15 2021-05-04 施耐德电气美国股份有限公司 Visual monitoring system of load center
JP2018147199A (en) * 2017-03-03 2018-09-20 ブラザー工業株式会社 Image processing device, and computer program
JP2020052731A (en) * 2018-09-27 2020-04-02 キヤノン電子株式会社 Image processing device, control method for image processing device, and program
JP7149047B2 (en) 2018-09-27 2022-10-06 キヤノン電子株式会社 IMAGE PROCESSING DEVICE, CONTROL METHOD FOR IMAGE PROCESSING DEVICE, AND PROGRAM

Also Published As

Publication number Publication date
JP5677234B2 (en) 2015-02-25

Similar Documents

Publication Publication Date Title
US11538232B2 (en) Tracker assisted image capture
US20180005015A1 (en) Sparse simultaneous localization and matching with unified tracking
US8755630B2 (en) Object pose recognition apparatus and object pose recognition method using the same
CN109977833B (en) Object tracking method, object tracking device, storage medium, and electronic apparatus
EP3182371B1 (en) Threshold determination in for example a type ransac algorithm
US11037325B2 (en) Information processing apparatus and method of controlling the same
EP3104332A1 (en) Digital image manipulation
WO2015006224A1 (en) Real-time 3d computer vision processing engine for object recognition, reconstruction, and analysis
WO2018139461A1 (en) Moving object detection device, moving object detection method and storage medium
CN104981680A (en) Camera Aided Motion Direction And Speed Estimation
JP2013524593A (en) Methods and configurations for multi-camera calibration
JPWO2005043466A1 (en) Estimation system, estimation method, and estimation program for estimating object state
JP2011039918A (en) Apparatus and method for processing image and program
CN113312973B (en) Gesture recognition key point feature extraction method and system
JP2018113021A (en) Information processing apparatus and method for controlling the same, and program
US20130083162A1 (en) Depth fusion method and apparatus using the same
JP2015138319A (en) Object detection device, object detection method, and object detection program
US20230237777A1 (en) Information processing apparatus, learning apparatus, image recognition apparatus, information processing method, learning method, image recognition method, and non-transitory-computer-readable storage medium
JP2018005357A (en) Information processor and information processing method
CN110505398A (en) A kind of image processing method, device, electronic equipment and storage medium
US20080226159A1 (en) Method and System For Calculating Depth Information of Object in Image
JP5677234B2 (en) Edge detection device and program thereof
JP6395429B2 (en) Image processing apparatus, control method thereof, and storage medium
JP2009237846A (en) Information processor, information processing method, and computer program
KR20180127185A (en) Method and apparatus for processing 360 degree image

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140130

RD02 Notification of acceptance of power of attorney

Free format text: JAPANESE INTERMEDIATE CODE: A7422

Effective date: 20140326

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141022

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20141104

A521 Written amendment

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20141117

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20141226

R150 Certificate of patent or registration of utility model

Ref document number: 5677234

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

LAPS Cancellation because of no payment of annual fees