JP6054831B2 - Image processing apparatus, image processing method, and image processing program - Google Patents

Image processing apparatus, image processing method, and image processing program Download PDF

Info

Publication number
JP6054831B2
JP6054831B2 JP2013181938A JP2013181938A JP6054831B2 JP 6054831 B2 JP6054831 B2 JP 6054831B2 JP 2013181938 A JP2013181938 A JP 2013181938A JP 2013181938 A JP2013181938 A JP 2013181938A JP 6054831 B2 JP6054831 B2 JP 6054831B2
Authority
JP
Japan
Prior art keywords
edge
line segments
rectangular area
image processing
coordinate system
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
Application number
JP2013181938A
Other languages
Japanese (ja)
Other versions
JP2015049776A (en
Inventor
裕明 矢口
裕明 矢口
雅幸 稲葉
雅幸 稲葉
清宏 宗玄
清宏 宗玄
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
University of Tokyo NUC
Toyota Motor Corp
Original Assignee
University of Tokyo NUC
Toyota Motor 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 University of Tokyo NUC, Toyota Motor Corp filed Critical University of Tokyo NUC
Priority to JP2013181938A priority Critical patent/JP6054831B2/en
Publication of JP2015049776A publication Critical patent/JP2015049776A/en
Application granted granted Critical
Publication of JP6054831B2 publication Critical patent/JP6054831B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Description

本発明は、画像処理装置、画像処理方法及び画像処理プログラムに関し、特に、画像に含まれる所定領域を検出する画像処理装置、画像処理方法及び画像処理プログラムに関する。   The present invention relates to an image processing apparatus, an image processing method, and an image processing program, and more particularly, to an image processing apparatus, an image processing method, and an image processing program for detecting a predetermined area included in an image.

対象空間を撮像した画像から所望の形状や物体等を検出する画像処理技術が知られている。例えば、特許文献1には、画像内の矩形領域を検出する技術が開示されている。特許文献1では、入力画像に含まれるエッジ画素を抽出し、エッジ画素に基づいて直線検出を行い、略直交する4本の直線から矩形領域を検出している。   An image processing technique for detecting a desired shape or object from an image obtained by imaging a target space is known. For example, Patent Document 1 discloses a technique for detecting a rectangular area in an image. In Patent Document 1, edge pixels included in an input image are extracted, straight lines are detected based on the edge pixels, and a rectangular region is detected from four lines that are substantially orthogonal.

特開2013−106160号公報JP 2013-106160 A

特許文献1は、画像から原稿を読み取るための技術であるため、撮像対象とカメラが略対面していることを想定し、略対面で撮像した2次元画像上で直線が略直交しているかを判定している。すなわち、図32に示すように、特許文献1では、原稿の紙面(平面)に対向する位置から撮像した画像900を取得し、画像900の2次元平面における水平方向及び垂直方向の直線を検出し、これらの直線から原稿を示す矩形領域901を検出する。   Since Patent Document 1 is a technique for reading a document from an image, it is assumed that an imaging target and a camera are substantially facing each other, and whether a straight line is substantially orthogonal on a two-dimensional image captured substantially facing each other. Judgment. That is, as shown in FIG. 32, in Patent Document 1, an image 900 captured from a position facing a paper surface (plane) of a document is acquired, and horizontal and vertical straight lines in a two-dimensional plane of the image 900 are detected. Then, a rectangular area 901 indicating a document is detected from these straight lines.

しかしながら、特許文献1では、撮像対象とカメラが対面していないような3次元環境については考慮されていない。例えば、図33の画像910に示すように、3次元環境における食器棚など矩形の平面(3次元平面)911を斜めから計測(撮像)した場合、遠近法により2次元画像(画像平面)としては、平面911における水平方向及び垂直方向の直線が90度を成さず、平面911の角911aが必ずしも直交しない(直角とならない)。このため、特許文献1などの従来技術を3次元環境へ適用し、矩形領域を検出することは困難である。すなわち、従来技術では、対象物とカメラとが対面していることが前提となっており、対面していない場合には、直線検出を行って検出された直線が他の直線と直交しないため、矩形領域を検出することが難しい。   However, Patent Document 1 does not consider a three-dimensional environment in which the imaging target and the camera do not face each other. For example, as shown in an image 910 in FIG. 33, when a rectangular plane (three-dimensional plane) 911 such as a cupboard in a three-dimensional environment is measured (imaged) from an oblique direction, a two-dimensional image (image plane) is obtained by perspective. The horizontal and vertical straight lines in the plane 911 do not form 90 degrees, and the corners 911a of the plane 911 are not necessarily orthogonal (not at right angles). For this reason, it is difficult to detect a rectangular region by applying the conventional technique such as Patent Document 1 to a three-dimensional environment. That is, in the prior art, it is assumed that the object and the camera are facing each other, and when not facing, the straight line detected by performing straight line detection is not orthogonal to the other straight lines, It is difficult to detect a rectangular area.

また、特許文献1の実施例として直線検出に(標準的)ハフ変換を使用しているが、(標準的)ハフ変換では一般に直線として検出するか否かの閾値設定が難しい。例えば、図33のように、略同一方向を向く複数の小さな模様911bを含む画像910に対しハフ変換を用いて直線を検出すると、図34のように、矩形のエッジに対応した直線912に加えて、模様911bにも直線912aが検出されてしまう。このため、不要な直線により複数の矩形の“角”候補が検出される恐れがあり、結果として誤検出が多くなる。すなわち、従来技術では、対象物の模様等も直線検出により直線と抽出されてしまい、対象物の形状を正確に検出することができない場合がある。   In addition, although (standard) Hough transform is used for straight line detection as an embodiment of Patent Document 1, it is generally difficult to set a threshold value for whether or not to detect as a straight line in (standard) Hough transform. For example, when a straight line is detected using Hough transform for an image 910 including a plurality of small patterns 911b facing substantially the same direction as shown in FIG. 33, in addition to a straight line 912 corresponding to a rectangular edge as shown in FIG. Thus, the straight line 912a is also detected in the pattern 911b. For this reason, a plurality of rectangular “corner” candidates may be detected due to an unnecessary straight line, resulting in an increase in false detection. That is, in the prior art, the pattern of the object is extracted as a straight line by the straight line detection, and the shape of the object may not be accurately detected.

したがって、従来技術では、検出対象と対面しない位置から画像を取得するような3次元環境において、正確に矩形領域を検出することができないという問題があった。   Therefore, the conventional technique has a problem that a rectangular region cannot be accurately detected in a three-dimensional environment in which an image is acquired from a position that does not face the detection target.

本発明に係る画像処理装置は、計測画像情報に含まれる3次元平面内の複数のエッジ画素を検出するエッジ画素検出部と、前記検出した複数のエッジ画素間を接続する複数のエッジ線分を検出するエッジ線分検出部と、前記検出した複数のエッジ線分の座標系を、前記3次元平面の法線方向から見た平面座標系に変換する座標系変換部と、前記平面座標系における複数のエッジ線分の分布に基づいて、前記3次元平面内の矩形領域を検出する矩形領域検出部と、を備えるものである。   An image processing apparatus according to the present invention includes an edge pixel detection unit that detects a plurality of edge pixels in a three-dimensional plane included in measurement image information, and a plurality of edge line segments that connect the plurality of detected edge pixels. An edge line detection unit for detecting, a coordinate system conversion unit for converting the coordinate system of the detected plurality of edge line segments into a plane coordinate system viewed from the normal direction of the three-dimensional plane, and a plane coordinate system A rectangular area detecting unit for detecting a rectangular area in the three-dimensional plane based on a plurality of edge line segments.

本発明に係る画像処理方法は、計測画像情報に含まれる3次元平面内の複数のエッジ画素を検出し、前記検出した複数のエッジ画素間を接続する複数のエッジ線分を検出し、前記検出した複数のエッジ線分の座標系を、前記3次元平面の法線方向から見た平面座標系に変換し、前記平面座標系における複数のエッジ線分の分布に基づいて、前記3次元平面内の矩形領域を検出するものである。   The image processing method according to the present invention detects a plurality of edge pixels in a three-dimensional plane included in measurement image information, detects a plurality of edge line segments connecting the plurality of detected edge pixels, and detects the detection. The coordinate system of the plurality of edge line segments is converted into a plane coordinate system viewed from the normal direction of the three-dimensional plane, and based on the distribution of the plurality of edge line segments in the plane coordinate system, The rectangular area is detected.

本発明に係る画像処理プログラムは、計測画像情報に含まれる3次元平面内の複数のエッジ画素を検出し、前記検出した複数のエッジ画素間を接続する複数のエッジ線分を検出し、前記検出した複数のエッジ線分の座標系を、前記3次元平面の法線方向から見た平面座標系に変換し、前記平面座標系における複数のエッジ線分の分布に基づいて、前記3次元平面内の矩形領域を検出する、画像処理方法をコンピュータに実行させるためのものである。   An image processing program according to the present invention detects a plurality of edge pixels in a three-dimensional plane included in measurement image information, detects a plurality of edge line segments connecting the plurality of detected edge pixels, and detects the detection The coordinate system of the plurality of edge line segments is converted into a plane coordinate system viewed from the normal direction of the three-dimensional plane, and based on the distribution of the plurality of edge line segments in the plane coordinate system, This is for causing a computer to execute an image processing method for detecting a rectangular area.

本発明によれば、精度良く矩形領域を検出することが可能な画像処理装置、画像処理方法及び画像処理プログラムを提供することができる。   According to the present invention, it is possible to provide an image processing apparatus, an image processing method, and an image processing program that can detect a rectangular region with high accuracy.

実施の形態に係る矩形領域検出方法の概要を示すフローチャートである。It is a flowchart which shows the outline | summary of the rectangular area detection method which concerns on embodiment. 実施の形態に係る矩形領域検出方法で処理する画像の一例を示す図である。It is a figure which shows an example of the image processed with the rectangular area detection method which concerns on embodiment. 実施の形態に係る矩形領域検出方法で処理する画像の一例を示す図である。It is a figure which shows an example of the image processed with the rectangular area detection method which concerns on embodiment. 実施の形態に係る矩形領域検出方法で処理する画像の一例を示す図である。It is a figure which shows an example of the image processed with the rectangular area detection method which concerns on embodiment. 実施の形態に係る矩形領域検出方法で処理する画像の一例を示す図である。It is a figure which shows an example of the image processed with the rectangular area detection method which concerns on embodiment. 実施の形態に係る矩形領域検出方法で処理する画像の一例を示す図である。It is a figure which shows an example of the image processed with the rectangular area detection method which concerns on embodiment. 実施の形態に係る矩形領域検出方法で処理する画像の一例を示す図である。It is a figure which shows an example of the image processed with the rectangular area detection method which concerns on embodiment. 実施の形態に係る矩形領域検出方法を説明するための説明図である。It is explanatory drawing for demonstrating the rectangular area detection method which concerns on embodiment. 実施の形態1に係る矩形領域検出装置の構成を示すブロック図である。1 is a block diagram illustrating a configuration of a rectangular area detection device according to a first embodiment. 実施の形態1に係る矩形領域検出装置の動作を説明するための説明図である。FIG. 6 is an explanatory diagram for explaining an operation of the rectangular area detection device according to the first embodiment. 実施の形態1に係る矩形領域検出装置の動作を説明するための説明図である。FIG. 6 is an explanatory diagram for explaining an operation of the rectangular area detection device according to the first embodiment. 実施の形態1に係る矩形領域検出装置の動作を説明するための説明図である。FIG. 6 is an explanatory diagram for explaining an operation of the rectangular area detection device according to the first embodiment. 実施の形態1に係る矩形領域検出方法を示すフローチャートである。3 is a flowchart illustrating a rectangular area detection method according to the first embodiment. 実施の形態1に係る矩形領域検出方法で処理する画像の一例を示す図である。6 is a diagram illustrating an example of an image processed by the rectangular area detection method according to Embodiment 1. FIG. 実施の形態1に係る矩形領域検出方法を説明するための説明図である。FIG. 6 is an explanatory diagram for explaining a rectangular area detection method according to the first embodiment. 実施の形態1に係る矩形領域検出方法を説明するための説明図である。FIG. 6 is an explanatory diagram for explaining a rectangular area detection method according to the first embodiment. 実施の形態1に係る矩形領域検出方法を説明するための説明図である。FIG. 6 is an explanatory diagram for explaining a rectangular area detection method according to the first embodiment. 実施の形態1に係る矩形領域検出方法を説明するための説明図である。FIG. 6 is an explanatory diagram for explaining a rectangular area detection method according to the first embodiment. 実施の形態1に係る矩形領域検出方法を説明するための説明図である。FIG. 6 is an explanatory diagram for explaining a rectangular area detection method according to the first embodiment. 実施の形態1に係る矩形領域検出方法を説明するための説明図である。FIG. 6 is an explanatory diagram for explaining a rectangular area detection method according to the first embodiment. 実施の形態1に係る矩形領域検出方法を説明するための説明図である。FIG. 6 is an explanatory diagram for explaining a rectangular area detection method according to the first embodiment. 実施の形態1に係る矩形領域検出方法を説明するための説明図である。FIG. 6 is an explanatory diagram for explaining a rectangular area detection method according to the first embodiment. 実施の形態2に係る家具モデル処理システムの構成を示すブロック図である。It is a block diagram which shows the structure of the furniture model processing system which concerns on Embodiment 2. FIG. 実施の形態2に係る家具モデル生成方法を示すフローチャートである。It is a flowchart which shows the furniture model production | generation method which concerns on Embodiment 2. FIG. 実施の形態2に係る家具モデル生成方法を示すフローチャートである。It is a flowchart which shows the furniture model production | generation method which concerns on Embodiment 2. FIG. 実施の形態2に係る家具モデル生成方法で処理する画像の一例を示す図である。It is a figure which shows an example of the image processed with the furniture model production | generation method concerning Embodiment 2. FIG. 実施の形態2に係る家具モデル生成方法で使用するユーザインタフェースの一例を示す図である。It is a figure which shows an example of the user interface used with the furniture model production | generation method concerning Embodiment 2. FIG. 実施の形態2に係る家具モデル生成方法で使用するユーザインタフェースの一例を示す図である。It is a figure which shows an example of the user interface used with the furniture model production | generation method concerning Embodiment 2. FIG. 実施の形態2に係る家具モデル生成方法で使用するユーザインタフェースの一例を示す図である。It is a figure which shows an example of the user interface used with the furniture model production | generation method concerning Embodiment 2. FIG. 実施の形態2に係る家具モデル生成方法で使用するユーザインタフェースの一例を示す図である。It is a figure which shows an example of the user interface used with the furniture model production | generation method concerning Embodiment 2. FIG. 実施の形態2に係る家具モデル生成方法で使用するユーザインタフェースの一例を示す図である。It is a figure which shows an example of the user interface used with the furniture model production | generation method concerning Embodiment 2. FIG. 従来の矩形領域検出方法を示す図である。It is a figure which shows the conventional rectangular area detection method. 従来の矩形領域検出方法を示す図である。It is a figure which shows the conventional rectangular area detection method. 従来の矩形領域検出方法を示す図である。It is a figure which shows the conventional rectangular area detection method.

(実施の形態の概要)
実施の形態の説明に先立って、実施の形態の特徴についてその概要を説明する。実施の形態では、環境を計測した距離画像センサの情報から環境内の矩形領域を検出する。図1は、実施の形態に係る矩形領域検出方法の概要を示している。この矩形領域検出方法は、後述するように矩形領域検出装置などにより実行される。
(Outline of the embodiment)
Prior to the description of the embodiment, an outline of features of the embodiment will be described. In the embodiment, a rectangular area in the environment is detected from information of a distance image sensor that measures the environment. FIG. 1 shows an outline of a rectangular area detecting method according to the embodiment. This rectangular area detecting method is executed by a rectangular area detecting device or the like as will be described later.

図1に示すように、まず、距離画像センサにより環境を計測した距離画像から3次元注目平面を検出する(S11)。例えば、矩形領域検出装置は、図2に示すような距離画像が入力されると、図3に示すような注目平面(図3の白地部分)を検出する。   As shown in FIG. 1, first, a three-dimensional attention plane is detected from a distance image obtained by measuring the environment with a distance image sensor (S11). For example, when a distance image as shown in FIG. 2 is input, the rectangular area detection device detects a target plane (a white background portion in FIG. 3) as shown in FIG.

続いて、S11で検出した3次元注目平面から、平面のマスク画像を生成し(S12)、生成したマスク画像に対しエッジ検出を行う(S13)。例えば、矩形領域検出装置は、図2の距離画像及び図3の3次元注目平面に基づいて、距離画像から平面画像を抽出したマスク画像を生成し、図4に示すようにマスク画像のエッジを検出したエッジ画像を検出する。   Subsequently, a planar mask image is generated from the three-dimensional target plane detected in S11 (S12), and edge detection is performed on the generated mask image (S13). For example, the rectangular area detection device generates a mask image obtained by extracting a planar image from the distance image based on the distance image of FIG. 2 and the three-dimensional attention plane of FIG. The detected edge image is detected.

続いて、矩形領域検出装置は、S13で検出したエッジ画像に対し、確率的ハフ変換などの線分検出手段を用いてエッジ断片群(エッジ線分の集合)を検出する(S14)。例えば、矩形領域検出装置は、図4のエッジ画像に確率的ハフ変換を行い、図5に示すようなエッジ断片群を検出する。図8(a)は、2次元計測座標系(センサから見た座標系)のエッジ断片群を模式的に示している。   Subsequently, the rectangular area detection apparatus detects an edge fragment group (a set of edge line segments) using line segment detection means such as probabilistic Hough transform for the edge image detected in S13 (S14). For example, the rectangular area detection device performs a probabilistic Hough transform on the edge image of FIG. 4 and detects an edge fragment group as shown in FIG. FIG. 8A schematically shows an edge fragment group of a two-dimensional measurement coordinate system (a coordinate system viewed from a sensor).

続いて、矩形領域検出装置は、S14で検出した2次元のエッジ断片群を3次元平面座標系(平面の法線方向から見た座標系)へ変換する(S15)。例えば、矩形領域検出装置は、図8(a)の2次元計測座標系のエッジ断片群を、図8(b)に示すような3次元平面座標系へ変換する。   Subsequently, the rectangular area detection apparatus converts the two-dimensional edge fragment group detected in S14 into a three-dimensional plane coordinate system (a coordinate system viewed from the normal direction of the plane) (S15). For example, the rectangular area detection apparatus converts the edge fragment group of the two-dimensional measurement coordinate system in FIG. 8A into a three-dimensional plane coordinate system as shown in FIG.

続いて、矩形領域検出装置は、S15で変換した3次元平面座標系において、X,Y軸方向にエッジ存在位置ヒストグラムを作成し、平均シフト法などを使ってX,Y軸方向のエッジ存在ピーク位置を求める(S16)。例えば、矩形領域検出装置は、図8(b)の3次元平面座標系におけるエッジ断片群について、図8(c)に示すようなX,Y軸方向のエッジ断片の分布を示すエッジ存在位置ヒストグラムを生成し、このヒストグラムのピーク位置を求める。   Subsequently, the rectangular area detection apparatus creates an edge presence position histogram in the X and Y axis directions in the three-dimensional plane coordinate system converted in S15, and uses an average shift method or the like to detect edge presence peaks in the X and Y axis directions. The position is obtained (S16). For example, the rectangular area detection apparatus uses the edge presence position histogram indicating the distribution of the edge fragments in the X and Y axis directions as shown in FIG. 8C for the edge fragment group in the three-dimensional plane coordinate system of FIG. And the peak position of this histogram is obtained.

続いて、矩形領域検出装置は、S16で求めたX,Y軸方向のエッジ存在ピーク位置を結ぶ最小線分(ピーク線分)を求める(S17)。例えば、矩形領域検出装置は、図8(c)のエッジ存在位置ヒストグラムのピーク位置を接続し、図8(d)や図6に示すような最小線分を生成する。   Subsequently, the rectangular area detecting device obtains the minimum line segment (peak line segment) connecting the edge presence peak positions in the X and Y axis directions obtained in S16 (S17). For example, the rectangular area detection apparatus connects the peak positions of the edge presence position histogram of FIG. 8C, and generates a minimum line segment as shown in FIG. 8D or FIG.

続いて、矩形領域検出装置は、S17で求めた最小線分上に、S14で検出したエッジ断片群が存在するか否かを照合することで、正しい矩形(長方形)領域を検出する(S18)。例えば、矩形領域検出装置は、図8(d)や図6の最小線分と図8(a)や図5のエッジ断片群を照合し、有効な最小線分に囲まれた領域を求めることで、図8(e)や図7に示すような矩形領域を検出する。   Subsequently, the rectangular area detection device detects a correct rectangular (rectangular) area by collating whether or not the edge fragment group detected in S14 exists on the minimum line segment obtained in S17 (S18). . For example, the rectangular area detection apparatus collates the minimum line segment in FIG. 8D or FIG. 6 with the edge fragment group in FIG. 8A or FIG. 5 to obtain an area surrounded by the effective minimum line segment. Thus, a rectangular area as shown in FIG. 8E or FIG. 7 is detected.

このように、実施の形態では、環境を計測した距離画像センサの情報から環境内の矩形領域を検出する方法において、2次元の画像から抽出したエッジ断片群を、3次元の平面座標系へ変換し、平面座標系で直交する2軸方向に対して、エッジ存在位置の分布を示すヒストグラムを作成することで、信頼性高く矩形領域を検出することができる。   As described above, in the embodiment, in a method for detecting a rectangular region in an environment from information of a distance image sensor that measures the environment, an edge fragment group extracted from a two-dimensional image is converted into a three-dimensional plane coordinate system. Then, a rectangular region can be detected with high reliability by creating a histogram indicating the distribution of edge presence positions in two axial directions orthogonal to each other in the plane coordinate system.

(実施の形態1)
以下、図面を参照して実施の形態1について説明する。図9は、本実施の形態に係る画像処理システム(矩形領域検出システム)の構成を示している。
(Embodiment 1)
The first embodiment will be described below with reference to the drawings. FIG. 9 shows a configuration of an image processing system (rectangular area detection system) according to the present embodiment.

図9に示すように、本実施の形態に係る画像処理システム1は、矩形領域検出装置100と距離画像センサ200とを備えている。なお、矩形領域検出装置100と距離画像センサ200は、一体の装置であってもよいし、各々独立した装置であってもよい。例えば、矩形領域検出装置100と距離画像センサ200は、ロボットなどに備えられている。   As shown in FIG. 9, the image processing system 1 according to the present embodiment includes a rectangular area detection device 100 and a distance image sensor 200. The rectangular area detection device 100 and the distance image sensor 200 may be an integrated device or may be independent devices. For example, the rectangular area detection device 100 and the distance image sensor 200 are provided in a robot or the like.

距離画像センサ(距離画像計測部)200は、3次元環境を計測して得られる距離画像(距離画像データ、計測画像データ)を生成する。距離画像は、センサ(計測点)から計測対象を撮像した画像情報(入力画像)とセンサから計測対象までの距離情報とを含んでおり、例えば、1画素につき、“RGBD(カラー+距離)”または“グレースケール(輝度値)+距離“を含んでいる。距離画像センサ200は、ステレオカメラ(3次元カメラ)、LRF(レーザレンジファインダ)+カメラ、Microsoft Kinect(登録商標)などで構成される。   The distance image sensor (distance image measurement unit) 200 generates a distance image (distance image data, measurement image data) obtained by measuring a three-dimensional environment. The distance image includes image information (input image) obtained by imaging the measurement target from the sensor (measurement point) and distance information from the sensor to the measurement target. For example, “RGBD (color + distance)” per pixel. Or, “Grayscale (luminance value) + distance” is included. The distance image sensor 200 includes a stereo camera (three-dimensional camera), an LRF (laser range finder) + camera, Microsoft Kinect (registered trademark), and the like.

矩形領域検出装置100は、距離画像取得部101、平面検出部102、平面マスク画像生成部103、平面座標系計算部104、エッジ検出部105、エッジ断片検出部106、座標系変換部107、エッジ存在位置ヒストグラム生成部108、ヒストグラムピーク推定部109、線分生成部110、近傍エッジ断片抽出部111、エッジ照合部112、矩形領域検出部113を備えている。   The rectangular area detection apparatus 100 includes a distance image acquisition unit 101, a plane detection unit 102, a plane mask image generation unit 103, a plane coordinate system calculation unit 104, an edge detection unit 105, an edge fragment detection unit 106, a coordinate system conversion unit 107, an edge An existence position histogram generation unit 108, a histogram peak estimation unit 109, a line segment generation unit 110, a neighboring edge fragment extraction unit 111, an edge matching unit 112, and a rectangular area detection unit 113 are provided.

なお、後述の本実施の形態に係る矩形領域検出方法が実現できれば、その他の機能ブロックで構成してもよい。図9の矩形領域検出装置100における各機能(各処理)は、ハードウェア又はソフトウェア、もしくはその両方によって構成され、1つのハードウェア又はソフトウェアから構成してもよいし、複数のハードウェア又はソフトウェアから構成してもよい。矩形領域検出装置100の各機能を、CPU(Central Processing Unit)やメモリ等を有するコンピュータにより実現してもよい。例えば、記憶装置に後述する矩形領域検出方法を行うための矩形領域検出プログラムを格納し、矩形領域検出装置100の各機能を、記憶装置に格納された矩形領域検出プログラムをCPUで実行することにより実現してもよい。   Note that other functional blocks may be used as long as a rectangular area detection method according to the present embodiment described later can be realized. Each function (each process) in the rectangular area detection apparatus 100 in FIG. 9 is configured by hardware and / or software, and may be configured by one piece of hardware or software, or by a plurality of pieces of hardware or software. It may be configured. Each function of the rectangular area detection device 100 may be realized by a computer having a CPU (Central Processing Unit), a memory, and the like. For example, a rectangular area detection program for performing a rectangular area detection method described later is stored in the storage device, and each function of the rectangular area detection device 100 is executed by the CPU executing the rectangular area detection program stored in the storage device. It may be realized.

距離画像取得部101は、距離画像センサ200が環境を計測して生成した距離画像(距離画像データ)を取得する。平面検出部102は、距離画像取得部101が取得した距離画像に含まれる入力画像に対し、平面検出処理を行い、注目平面(3次元平面)を検出する。平面マスク画像生成部(抽出画像生成部)103は、平面検出部102が検出した注目平面の領域をマスクとして、入力画像から注目平面に対応するマスク画像(抽出画像)を抽出する。平面座標系計算部104は、平面検出部102が検出した注目平面について、平面を基準とした平面座標系を計算する。   The distance image acquisition unit 101 acquires a distance image (distance image data) generated by the distance image sensor 200 measuring the environment. The plane detection unit 102 performs plane detection processing on the input image included in the distance image acquired by the distance image acquisition unit 101 to detect a target plane (three-dimensional plane). The plane mask image generation unit (extraction image generation unit) 103 extracts a mask image (extraction image) corresponding to the target plane from the input image using the region of the target plane detected by the plane detection unit 102 as a mask. The plane coordinate system calculation unit 104 calculates a plane coordinate system based on the plane for the target plane detected by the plane detection unit 102.

エッジ検出部(エッジ画素検出部)105は、平面マスク画像生成部103が生成したマスク画像に対し、エッジ検出処理を行い、検出したエッジ画素を含むエッジ画像を生成する。エッジ断片検出部(エッジ線分検出部)106は、エッジ検出部105が検出したエッジ画像に対し、確率的ハフ変換処理を行い、エッジ画像に含まれるエッジ画素を接続するエッジ断片群(エッジ線分群)を検出する。   The edge detection unit (edge pixel detection unit) 105 performs edge detection processing on the mask image generated by the planar mask image generation unit 103, and generates an edge image including the detected edge pixel. An edge fragment detection unit (edge line segment detection unit) 106 performs a probabilistic Hough transform process on the edge image detected by the edge detection unit 105, and an edge fragment group (edge line) that connects edge pixels included in the edge image. Subgroup) is detected.

座標系変換部107は、エッジ断片検出部106が検出した2次元のエッジ断片群の座標系を、3次元の平面座標系に変換する。座標系変換部107は、2次元座標系を3次元座標系に変換し、また、3次元座標系を2次元座標系にも変換する。   The coordinate system conversion unit 107 converts the coordinate system of the two-dimensional edge fragment group detected by the edge fragment detection unit 106 into a three-dimensional plane coordinate system. The coordinate system conversion unit 107 converts the two-dimensional coordinate system into a three-dimensional coordinate system, and also converts the three-dimensional coordinate system into a two-dimensional coordinate system.

座標系変換部107における3次元座標(X,Y,Z)から2次元座標(u,v)への変換処理は、例えば、ピンホールカメラモデルを使った透視投影変換により行われる。ピンホールカメラモデルでは、図10に示すように、カメラ座標系(センサ座標系)、グローバル座標系(ワールド座標系)、座標系間の位置・姿勢を行列で表現した同時変換行列を使用するカメラはセンサ(距離画像センサ)に相当し、カメラ座標系はカメラを基準とした座標系である。グローバル座標系は、3次元の基準となる座標であり、計測対象(例えば注目平面)を基準とした座標系である。次の式1に、同時変換行列を用いて3次元座標を2次元座標に変換する変換式を示す。カメラ外部パラメータ行列(同時変換行列)は、カメラ座標系から見たグローバル座標系の位置・姿勢を示している。
The conversion processing from the three-dimensional coordinates (X, Y, Z) to the two-dimensional coordinates (u, v) in the coordinate system conversion unit 107 is performed by, for example, perspective projection conversion using a pinhole camera model. In the pinhole camera model, as shown in FIG. 10, a camera that uses a camera coordinate system (sensor coordinate system), a global coordinate system (world coordinate system), and a simultaneous conversion matrix that expresses the position and orientation between coordinate systems as a matrix. Corresponds to a sensor (distance image sensor), and the camera coordinate system is a coordinate system based on the camera. The global coordinate system is a coordinate serving as a three-dimensional reference, and is a coordinate system based on a measurement target (for example, a target plane). Formula 1 below shows a conversion formula for converting three-dimensional coordinates into two-dimensional coordinates using a simultaneous conversion matrix. The camera external parameter matrix (simultaneous conversion matrix) indicates the position and orientation of the global coordinate system viewed from the camera coordinate system.

また、座標系変換部107における2次元座標から3次元座標への変換処理についても、ピンホールカメラモデルを用いて変換が行われる。図11に示すように、カメラから画像面までの焦点距離をf、カメラから物体(計測対象)までの距離をDとすると、カメラから見た2次元座標(u,v)は次の式2となる。
The conversion processing from the two-dimensional coordinates to the three-dimensional coordinates in the coordinate system conversion unit 107 is also performed using a pinhole camera model. As shown in FIG. 11, when the focal distance from the camera to the image plane is f and the distance from the camera to the object (measurement target) is D, the two-dimensional coordinates (u, v) viewed from the camera are expressed by the following equation (2). It becomes.

本実施の形態における距離画像センサでは画素と対象物体の距離Dが計測でき、1ピクセルの(u,v,D)の値が得られるため、3次元座標(X,Y,Z)の値を次の式3により計算できる。
In the distance image sensor according to the present embodiment, the distance D between the pixel and the target object can be measured, and the value of (u, v, D) for one pixel can be obtained. It can be calculated by the following equation 3.

エッジ存在位置ヒストグラム生成部(ヒストグラム生成部)108は、座標系変換部107が変換した3次元平面座標系において、エッジ断片群の分布を示すエッジ存在位置ヒストグラムを生成する。ヒストグラムピーク推定部(ピーク検出部)109は、エッジ存在位置ヒストグラム生成部108生成したエッジ存在位置ヒストグラムにおけるエッジが存在する位置のピークを推定する。線分生成部(ピーク線分生成部)110は、ヒストグラムピーク推定部109が推定したヒストグラムのピーク位置を結ぶ最小線分(ピーク線分)を生成する。   An edge presence position histogram generation unit (histogram generation unit) 108 generates an edge presence position histogram indicating the distribution of edge fragment groups in the three-dimensional planar coordinate system converted by the coordinate system conversion unit 107. A histogram peak estimation unit (peak detection unit) 109 estimates a peak at a position where an edge exists in the edge presence position histogram generated by the edge presence position histogram generation unit 108. The line segment generation unit (peak line segment generation unit) 110 generates a minimum line segment (peak line segment) that connects the peak positions of the histogram estimated by the histogram peak estimation unit 109.

近傍エッジ断片抽出部(近傍エッジ線分抽出部)111は、エッジ断片検出部106が検出したエッジ断片群を参照し、線分生成部110が生成した最小線分近傍のエッジ断片群を抽出する。近傍エッジ断片抽出部111は、最小線分をエッジ断片群のエッジ画像へ投影した距離に基づいて、最小線分近傍のエッジ断片群を抽出する。最小線分(エッジ断片群)を画像へ投影した距離は、2次元画像または3次元画像における、点から線分(直線)までの距離として求めることができる。   The neighborhood edge fragment extraction unit (neighboring edge line segment extraction unit) 111 refers to the edge fragment group detected by the edge fragment detection unit 106 and extracts the edge fragment group near the minimum line segment generated by the line segment generation unit 110. . The neighboring edge fragment extraction unit 111 extracts an edge fragment group near the minimum line segment based on the distance obtained by projecting the minimum line segment onto the edge image of the edge fragment group. The distance at which the minimum line segment (edge fragment group) is projected onto the image can be obtained as the distance from the point to the line segment (straight line) in the two-dimensional image or the three-dimensional image.

2次元画像(2次元座標系)に投影する場合、点から直線の距離は、次の式4により求まる。式4では、点A(x,y)から、直線L(ax+by+c=0)に下ろした垂線の長さ(距離)dを示している。
When projecting onto a two-dimensional image (two-dimensional coordinate system), the distance from the point to the straight line is obtained by the following equation (4). Formula 4 shows the length (distance) d of the perpendicular line drawn from the point A (x 0 , y 0 ) to the straight line L (ax + by + c = 0).

点と線分の距離は、点から線分上に垂線を下ろせるかどうかで場合分けし、線分上に垂線が下ろせる場合は上記の式4で距離が計算でき、線分上に垂線が下ろせない場合は、線分の端点(始点または終点)と点との距離が線分と点との距離となる。近傍エッジ断片抽出部111は、この計算方法により、エッジ断片の中心位置と最小線分の距離を計算する。   The distance between a point and a line segment is divided according to whether or not a perpendicular line can be dropped from the point to the line segment. If a perpendicular line can be dropped on the line segment, the distance can be calculated by the above equation 4, and the perpendicular line can be lowered on the line segment. If not, the distance between the end point (start point or end point) of the line segment and the point is the distance between the line segment and the point. The neighboring edge fragment extraction unit 111 calculates the distance between the center position of the edge fragment and the minimum line segment by this calculation method.

3次元画像(3次元座標系)に投影する場合、図12に示すように、注目点Pから最小線分Eへ下ろした垂線はVP→Hと書くことができ、点と線分の距離|VP→H|は次の式5のように計算できる。
When projecting to a three-dimensional image (three-dimensional coordinate system), as shown in FIG. 12, a perpendicular line drawn from the point of interest P to the minimum line segment E can be written as VP → H, and the distance between the point and the line segment | V P → H | can be calculated as shown in Equation 5 below.

エッジ照合部112は、近傍エッジ断片抽出部111が抽出した近傍エッジ断片群と最小線分とを照合し、有効な最小線分かどうか(照合の成功/失敗を)判定する。エッジ照合部112は、3次元画像のエッジ断片群を最小線分へ射影した長さに基づいて、最小線分の有効性を判定し、無効な(照合が失敗した)最小線分は除去する。矩形領域検出部113は、エッジ照合部112が有効な最小線分であると判定した(照合が成功した)線分に囲まれた領域を矩形領域と判定する。   The edge collating unit 112 collates the neighboring edge fragment group extracted by the neighboring edge fragment extracting unit 111 with the minimum line segment, and determines whether or not it is a valid minimum line segment (success / failure of collation). The edge matching unit 112 determines the validity of the minimum line segment based on the length of the edge fragment group of the three-dimensional image projected onto the minimum line segment, and removes the invalid minimum line segment (matching has failed). . The rectangular area detection unit 113 determines that the area surrounded by the line segment that the edge matching unit 112 determines to be the effective minimum line segment (successful verification) is a rectangular area.

図13は、本実施の形態に係る画像処理システム(矩形領域検出装置)で実行される矩形領域検出方法(矩形領域検出処理)を示している。   FIG. 13 shows a rectangular area detection method (rectangular area detection process) executed by the image processing system (rectangular area detection apparatus) according to the present embodiment.

図13に示すように、まず、距離画像センサ200は、3次元環境を計測する(S101)。距離画像センサ200は、3次元環境を計測することにより、図2のような入力画像と距離を含む距離画像を生成し、距離画像取得部101が、この距離画像を取得する。   As shown in FIG. 13, first, the distance image sensor 200 measures a three-dimensional environment (S101). The distance image sensor 200 measures a three-dimensional environment to generate a distance image including the input image and the distance as shown in FIG. 2, and the distance image acquisition unit 101 acquires the distance image.

続いて、平面検出部102は、S101で取得した距離画像に含まれる入力画像から注目平面を検出し、注目平面上の距離点群を特定する(S102)。例えば、平面検出部102は、図2のような入力画像に対して、RANSAC(RANdom SAmple Consensus)等の手法を用いて、図3のように、平面パラメータ(ax+by+cz+d=0のa,b,c,d)と平面上の距離点群(図3の白地部分)を特定する。RANSAC法では、任意の点から平面パラメータを求め、平面パラメータ上に多くの点が含まれるものが平面であると特定する。RANSACアルゴリズムを利用することで、ノイズの多い入力画像から精度良く平面を検出できる。   Subsequently, the plane detection unit 102 detects the attention plane from the input image included in the distance image acquired in S101, and specifies a distance point group on the attention plane (S102). For example, the plane detection unit 102 uses a method such as RANSAC (RANdom SAmple Consensus) on the input image as shown in FIG. 2 to obtain the plane parameters (ax + by + cz + d = 0) a, b, c as shown in FIG. , D) and a distance point group on the plane (white background portion in FIG. 3). In the RANSAC method, a plane parameter is obtained from an arbitrary point, and a plane that includes many points on the plane parameter is specified as a plane. By using the RANSAC algorithm, a plane can be detected with high accuracy from a noisy input image.

続いて、平面マスク画像生成部103は、S101で取得した入力画像から、S102で検出した注目平面領域の画像のみを抽出する(S103)。平面マスク画像生成部103は、図3のように検出した平面上に距離点群が存在する画素を“1”(図3の白地部分)、平面の距離点群が存在しない画素を“0”(図3の黒地部分)とすることで2値マスクを作成し、図2のような入力画像とこの2値マスクとのANDを取ることで(“1”の画素の色情報のみ残す)、図14のような平面マスク画像を生成する。   Subsequently, the plane mask image generation unit 103 extracts only the image of the target plane area detected in S102 from the input image acquired in S101 (S103). The plane mask image generating unit 103 sets “1” (a white background portion in FIG. 3) for pixels where the distance point group exists on the detected plane as shown in FIG. 3, and “0” for pixels where the distance point group for the plane does not exist. By creating (a black background portion in FIG. 3) a binary mask and by ANDing the input image and this binary mask as shown in FIG. 2 (leaving only the color information of the pixel “1”), A planar mask image as shown in FIG. 14 is generated.

続いて、平面座標系計算部104は、S102で検出した注目平面の平面座標系を計算する(S104)。平面座標系計算部104は、S102で求めた平面パラメータをもとに、図15に示すような平面座標系を計算する。ここでは、一例として、平面の法線方向をZ軸、垂直方向(重力方向)をY軸、水平方向をX軸とする。これら3次元の座標軸について、X,Y,Zの順番は変えても良い。矩形領域を検出したい方向の(矩形の平面の)任意の2軸をX,Y軸としてよい。少なくとも平面の法線は、(3軸のうちの)1軸として選択される。例えば、図2のような入力画像から家具の扉や引き出し等の矩形領域を検出する場合、垂直方向(重力方向)をY軸とすることが好ましい。垂直面の矩形領域を検出することで、矩形領域を家具候補と仮定することができる。   Subsequently, the plane coordinate system calculation unit 104 calculates the plane coordinate system of the plane of interest detected in S102 (S104). The plane coordinate system calculation unit 104 calculates a plane coordinate system as shown in FIG. 15 based on the plane parameters obtained in S102. Here, as an example, the normal direction of the plane is the Z axis, the vertical direction (gravity direction) is the Y axis, and the horizontal direction is the X axis. For these three-dimensional coordinate axes, the order of X, Y, and Z may be changed. Any two axes (in the rectangular plane) in the direction in which the rectangular area is to be detected may be set as the X and Y axes. At least the plane normal is selected as one axis (out of three axes). For example, when a rectangular area such as a furniture door or drawer is detected from the input image as shown in FIG. 2, the vertical direction (gravity direction) is preferably the Y axis. By detecting the rectangular area on the vertical plane, the rectangular area can be assumed as a furniture candidate.

続いて、エッジ検出部105は、S103で生成したマスク画像に対し、エッジ画像を検出する(S105)。エッジ検出部105は、任意のエッジフィルタを使うことができ、例えばCannyフィルタやラプラシアンフィルタを用いてエッジを検出し、図4のようなエッジ画像を生成する。Cannyフィルタでは、ガウス型の微分フィルタを用いることで、ノイズに強いエッジ画像を検出できる。図16はエッジ画像の拡大図である。図16のように、エッジ画像は、エッジを検出した画素(位置)をエッジ画素として示した(例えば白地)画像である。すなわち、エッジ画像では、各画素がエッジであるか否かを示している。   Subsequently, the edge detection unit 105 detects an edge image from the mask image generated in S103 (S105). The edge detection unit 105 can use an arbitrary edge filter. For example, the edge detection unit 105 detects an edge using a Canny filter or a Laplacian filter, and generates an edge image as shown in FIG. The Canny filter can detect an edge image resistant to noise by using a Gaussian differential filter. FIG. 16 is an enlarged view of the edge image. As shown in FIG. 16, the edge image is an image (for example, white background) in which the pixel (position) where the edge is detected is shown as the edge pixel. That is, the edge image indicates whether each pixel is an edge.

続いて、エッジ断片検出部106は、S105で生成したエッジ画像に対し、エッジ断片群を検出する(S106)。エッジ断片検出部106は、図4のようなエッジ画像に対し、確率的ハフ変換を使って、図5のようなエッジ断片群(エッジ線分の集合)を検出する。図17は、図16のエッジ画像(エッジ画素)に対するエッジ断片群である。図17のように、エッジ断片は、エッジ画素を接続する線分(エッジ線分)である。すなわち、エッジ断片は、第1のエッジ画素を始点とし、第2のエッジ画素を終点とした線分(直線)である。なお、エッジ画素を接続する線分は複数存在するためエッジ断片群と称するが、この線分の1つまたは複数をエッジ断片と称する場合もある。   Subsequently, the edge fragment detection unit 106 detects an edge fragment group for the edge image generated in S105 (S106). The edge fragment detection unit 106 detects a group of edge fragments (set of edge line segments) as shown in FIG. 5 by using probabilistic Hough transform for the edge image as shown in FIG. FIG. 17 shows a group of edge fragments for the edge image (edge pixel) of FIG. As shown in FIG. 17, an edge fragment is a line segment (edge line segment) connecting edge pixels. That is, the edge fragment is a line segment (straight line) starting from the first edge pixel and ending at the second edge pixel. Note that although there are a plurality of line segments connecting the edge pixels, they are referred to as edge fragment groups, but one or more of the line segments may be referred to as edge fragments.

ハフ変換には、標準的ハフ変換と確率的ハフ変換があり、本実施の形態では確率的ハフ変換を用いる。確率的ハフ変換では、ランダムに選択したエッジ画素を用いて、パラメータ平面に投票し、投票結果に基づいて画像上の特徴を検出する。確率的ハフ変換を用いることにより、エッジ画像の中からエッジ画素を端点に持つ線分を検出できる。このため、従来技術の図34のように、標準的ハフ変換を用いた場合と比べて、不要な直線の検出を防ぐことができる。なお、確率的ハフ変換に限らず、エッジ画素を接続する線分を検出するその他の線分検出方法を用いてもよい。   The Hough transform includes a standard Hough transform and a probabilistic Hough transform, and the present embodiment uses the stochastic Hough transform. In the probabilistic Hough transform, a randomly selected edge pixel is used for voting on a parameter plane, and features on the image are detected based on the voting result. By using the probabilistic Hough transform, a line segment having an edge pixel as an end point can be detected from the edge image. For this reason, as shown in FIG. 34 of the prior art, it is possible to prevent detection of an unnecessary straight line as compared with the case where standard Hough transform is used. In addition, you may use not only a probabilistic Hough transformation but the other line segment detection method of detecting the line segment which connects an edge pixel.

続いて、座標系変換部107は、S106で検出した(2次元の)エッジ断片群を(3次元の)平面座標系に変換する(S107)。座標系変換部107は、上記式1のようなピンホールカメラモデルを用いて、図8(a)のような、距離画像センサから見たエッジ断片の(2次元の)座標系(カメラ座標系)を、図8(b)のような、注目平面をZ方向(法線方向)から見た(3次元の)平面座標系(グローバル座標系)に変換する。   Subsequently, the coordinate system conversion unit 107 converts the (two-dimensional) edge fragment group detected in S106 into a (three-dimensional) plane coordinate system (S107). The coordinate system conversion unit 107 uses a pinhole camera model as in Equation 1 above, and uses a (two-dimensional) coordinate system (camera coordinate system) of an edge fragment viewed from the distance image sensor as shown in FIG. 8) is converted into a (three-dimensional) plane coordinate system (global coordinate system) as seen from the Z direction (normal direction) as shown in FIG. 8B.

距離画像センサ200が計測した距離画像では1画素に距離情報も含まれているため、エッジ断片の「中心位置」、「エッジ始点」、「エッジ終点」の画素に対応する3次元位置について、上記式1を次の式6として、それぞれ座標変換を行う。
式6の同時変換行列は、平面座標系計算部104で計算される。なお、ここでは、エッジ断片の「中心位置」、「エッジ始点」、「エッジ終点」の3点の座標を変換するが、エッジ断片を3次元座標に変換するために、少なくとも「エッジ始点」、「エッジ終点」の2点の座標を変換してもよい。本実施の形態では、次のS108で、エッジ断片の中心位置を使用するため、この中心位置の座標についても3次元座標に変換する。
In the distance image measured by the distance image sensor 200, distance information is also included in one pixel. Therefore, the three-dimensional positions corresponding to the “center position”, “edge start point”, and “edge end point” pixels of the edge fragment are described above. Coordinate transformation is performed for each of Equation 1 as Equation 6 below.
The simultaneous transformation matrix of Expression 6 is calculated by the plane coordinate system calculation unit 104. Here, the coordinates of the three points of the “edge position”, “edge start point”, and “edge end point” of the edge fragment are converted. However, in order to convert the edge fragment into three-dimensional coordinates, at least the “edge start point”, The coordinates of the two points “edge end point” may be converted. In the present embodiment, since the center position of the edge fragment is used in the next S108, the coordinates of this center position are also converted into three-dimensional coordinates.

続いて、エッジ存在位置ヒストグラム生成部108は、S107で変換した平面座標系のエッジ断片群について、エッジの存在位置を示すエッジ存在位置ヒストグラムを生成する(S108)。エッジ存在位置ヒストグラム生成部108は、図8(b)のような平面座標系におけるエッジ断片群に対し、図8(c)のようなエッジ存在位置ヒストグラムを生成する。   Subsequently, the edge presence position histogram generation unit 108 generates an edge presence position histogram indicating the edge presence position for the edge fragment group in the plane coordinate system converted in S107 (S108). The edge presence position histogram generation unit 108 generates an edge presence position histogram as shown in FIG. 8C for the edge fragment group in the planar coordinate system as shown in FIG.

ここでは、エッジ断片の中心位置を3DC=(x,y,z)、その始点と終点を結ぶベクトルを3DSとし、3次元の垂直軸(Y軸)の単位ベクトルと、水平軸(X軸)の単位ベクトルをそれぞれ、n、nとする。次の式7のように、エッジ断片の“始点と終点を結ぶベクトル”と、“X,Y軸方向単位ベクトル”との内積をw、wとする。
Here, the center position of the edge fragment is 3D C = (x c , y c , z c ), the vector connecting the start point and the end point is 3D S, the unit vector of the three-dimensional vertical axis (Y axis), and the horizontal The unit vectors of the axis (X axis) are n v and n h , respectively. As shown in the following Expression 7, the inner product of the “vector connecting the start point and the end point” of the edge fragment and the “X, Y axis direction unit vector” is h w and v w.

図18に示すように、内積w、wを、それぞれの位置x,yにおけるエッジ断片の重みとする。図18の例では、エッジ断片がX方向(水平方向)に向いて(傾いて)いるため、X方向の重みが大きくなる。図8(c)のように、内積w、wを重みとしたX方向、Y方向の分布を示すヒストグラムをエッジ存在位置ヒストグラムとする。すなわち、エッジ存在位置ヒストグラムは、X軸、Y軸に対するエッジ断片の傾きの分布(傾きに応じた重みの分布)を示している。 As shown in FIG. 18, the inner product h w, a v w, each position x c, the weight of edge fragments in y c. In the example of FIG. 18, since the edge fragment is oriented (tilted) in the X direction (horizontal direction), the weight in the X direction is increased. As shown in FIG. 8C, a histogram indicating the distribution in the X direction and the Y direction using the inner products h w and v w as weights is referred to as an edge presence position histogram. That is, the edge presence position histogram shows the distribution of the inclination of the edge fragment with respect to the X axis and the Y axis (the distribution of the weight according to the inclination).

続いて、ヒストグラムピーク推定部109は、S108で生成したエッジ存在位置ヒストグラムにおけるエッジ存在位置のピーク位置を推定する(S109)。ヒストグラムピーク推定部109は、任意のピーク検出方法を使用する。例えば、ヒストグラムピーク推定部109は、図8(c)のようなエッジ存在位置ヒストグラムに対し、ピーク検出方法である平均シフト法を用いてX,Y軸方向のピーク位置の集合(P,P)を推定する。図8(c)のX方向、Y方向の分布の山部分(頂点部分)がピーク位置である。 Subsequently, the histogram peak estimation unit 109 estimates the peak position of the edge presence position in the edge presence position histogram generated in S108 (S109). The histogram peak estimation unit 109 uses an arbitrary peak detection method. For example, the histogram peak estimation unit 109 uses a mean shift method, which is a peak detection method, for the edge presence position histogram as shown in FIG. 8C, and a set of peak positions in the X and Y axis directions ( h P, v P) is estimated. A peak portion (vertex portion) of the distribution in the X direction and the Y direction in FIG. 8C is the peak position.

続いて、線分生成部110は、S109で推定したエッジ存在位置ヒストグラムにおけるX,Y軸の各ピーク位置を結ぶ最小線分を生成する(S110)。線分生成部110は、図19に示すように、エッジ存在位置ヒストグラムにおけるX,Y軸の各ピーク位置から交点Iを求め、交点IをX,Y軸方向に接続する最小線分の集合(L、L)を計算する。 Subsequently, the line segment generation unit 110 generates the minimum line segment that connects the X and Y axis peak positions in the edge presence position histogram estimated in S109 (S110). As shown in FIG. 19, the line segment generation unit 110 obtains an intersection point I from the X and Y axis peak positions in the edge presence position histogram, and sets a minimum line segment connecting the intersection points I in the X and Y axis directions ( hL , vL ).

以下、S110で生成したL,L内の全ての最小線分について、順次選択し、S111〜S114の処理を繰り返す。まず、近傍エッジ断片抽出部111は、選択した最小線分近傍のエッジ断片群を抽出する(S111)。近傍エッジ断片抽出部111は、2次元画像または3次元画像上において、最小線分とエッジ断片との距離を求め、距離が閾値ピクセル以下に収まっているエッジ断片群Eを全て抽出する。 Thereafter, all the minimum line segments in h L and v L generated in S110 are sequentially selected, and the processes of S111 to S114 are repeated. First, the neighboring edge fragment extraction unit 111 extracts an edge fragment group near the selected minimum line segment (S111). The neighboring edge fragment extraction unit 111 obtains the distance between the minimum line segment and the edge fragment on the two-dimensional image or the three-dimensional image, and extracts all the edge fragment groups E in which the distance is less than or equal to the threshold pixel.

近傍エッジ断片抽出部111は、2次元画像上で距離を求める場合、最小線分(3次元)を2次元画像へ投影し、2次元画像上の最小線分からの距離が閾値ピクセル以下のエッジ断片を求める。具体的には、例えば、座標系変換部107により、上記式1を用いて、最小線分(始点と終点)の3次元座標を2次元座標へ変換する。次に、図20のように、最小線分と点(エッジ断片中心)の距離を、上記式4の計算方法で計算し、その距離が閾値(例えば8ピクセル)より小さければ、そのエッジ断片を「最小線分の近傍エッジ断片」として抽出する。   When obtaining the distance on the two-dimensional image, the neighboring edge fragment extraction unit 111 projects the minimum line segment (three-dimensional) onto the two-dimensional image, and the edge fragment whose distance from the minimum line segment on the two-dimensional image is a threshold pixel or less. Ask for. Specifically, for example, the coordinate system conversion unit 107 converts the three-dimensional coordinates of the minimum line segment (start point and end point) into two-dimensional coordinates using Equation 1 above. Next, as shown in FIG. 20, the distance between the minimum line segment and the point (edge fragment center) is calculated by the calculation method of Equation 4, and if the distance is smaller than a threshold value (for example, 8 pixels), the edge fragment is Extracted as “neighboring edge fragment of minimum line segment”.

また、近傍エッジ断片抽出部111は、3次元画像上で距離を求める場合、エッジ断片群(2次元)を3次元画像へ投影し、3次元画像上の最小線分からの距離が閾値ピクセル以下のエッジ断片を求める。具体的には、例えば、座標系変換部107により、上記式3を用いて、エッジ断片群の2次元座標を3次元座標へ変換する。次に、図21のように、3次元へ変換したエッジ断片中心点と最小線分の距離を、上記式5の計算で求め、その距離が閾値(例えば0.02mm)より小さければ、そのエッジ断片を「最小線分の近傍エッジ断片」として抽出する。   Further, when obtaining the distance on the 3D image, the neighboring edge fragment extraction unit 111 projects the edge fragment group (2D) onto the 3D image, and the distance from the minimum line segment on the 3D image is equal to or less than the threshold pixel. Find edge fragments. Specifically, for example, the coordinate system conversion unit 107 converts the two-dimensional coordinates of the edge fragment group into the three-dimensional coordinates using the above Equation 3. Next, as shown in FIG. 21, the distance between the center point of the edge fragment converted into three dimensions and the minimum line segment is obtained by the calculation of the above formula 5, and if the distance is smaller than a threshold (for example, 0.02 mm), the edge Fragments are extracted as “neighboring edge fragments of the minimum line segment”.

続いて、エッジ照合部112は、S111で抽出したエッジ断片群と最小線分を照合する(S112)。エッジ照合部112は、2次元画像または3次元画像上において、最小線分またはエッジ断片を射影した長さが閾値以上の最小線分を有効と判定する。2次元画像または3次元画像上のいずれにおいて最小線分とエッジ断片を照合してもよいが、3次元的なエッジの傾きも評価するため、3次元画像上において照合することが好ましい。このため、3次元画像の場合について説明する。   Subsequently, the edge collating unit 112 collates the edge fragment group extracted in S111 with the minimum line segment (S112). The edge matching unit 112 determines that the minimum line segment or the minimum line segment whose length projected from the edge fragment on the two-dimensional image or the three-dimensional image is equal to or greater than a threshold value is valid. The minimum line segment and the edge fragment may be collated in either the two-dimensional image or the three-dimensional image, but it is preferable to collate on the three-dimensional image in order to evaluate the three-dimensional edge inclination. Therefore, the case of a three-dimensional image will be described.

なお、S111において2次元画像上で距離を求めた場合には、「最小線分の近傍エッジ断片」として抽出後、エッジ断片中心位置、エッジ断片始点・終点をそれぞれ、座標系変換部107により上記式3の計算を用いて、2次元座標を3次元座標へ座標変換し、変換した座標をエッジ照合部112へ入力する。また、S111において3次元画像上で距離を求めた場合には、抽出した「最小線分の近傍エッジ断片」は既に3次元座標のため、そのままの座標をエッジ照合部112へ入力する。   Note that when the distance is obtained on the two-dimensional image in S111, after extracting as the “closest edge fragment of the minimum line segment”, the edge fragment center position and the edge fragment start point / end point are respectively obtained by the coordinate system conversion unit 107. Using the calculation of Equation 3, the two-dimensional coordinates are converted into three-dimensional coordinates, and the converted coordinates are input to the edge collating unit 112. Further, when the distance is obtained on the three-dimensional image in S111, since the extracted “neighboring edge fragment of the minimum line segment” is already the three-dimensional coordinate, the coordinate as it is is input to the edge matching unit 112.

S112において、エッジ照合部112は、図22に示すように、3次元座標のエッジ断片を最小線分へ射影し、最小線分上のエッジ断片の“射影した長さ”を計算する。最小線分の長さに対し、射影した長さが一定閾値以上であれば、有効な最小線分(エッジが存在する線分)であると判定する。例えば、最小線分の長さを1とし、射影した長さ0.3を閾値とする。   In S112, as shown in FIG. 22, the edge matching unit 112 projects the edge fragment of the three-dimensional coordinates onto the minimum line segment, and calculates the “projected length” of the edge fragment on the minimum line segment. If the projected length is equal to or greater than a certain threshold with respect to the length of the minimum line segment, it is determined to be an effective minimum line segment (a line segment where an edge exists). For example, the length of the minimum line segment is set to 1, and the projected length of 0.3 is set as the threshold value.

続いて、エッジ照合部112は、S112の照合の結果、線分上にエッジ断片が無ければ、その最小線分を除去する(S113)。続いて、エッジ照合部112は、未照合の最小線分があるか否か判定し(S114)、未照合の最小線分がある場合、次の線分を選択してS111以降の処理を繰り返す。   Subsequently, if there is no edge fragment on the line segment as a result of the collation in S112, the edge collating unit 112 removes the minimum line segment (S113). Subsequently, the edge matching unit 112 determines whether or not there is an unmatched minimum line segment (S114), and if there is an unmatched minimum line segment, selects the next line segment and repeats the processing from S111 onward. .

続いて、全ての最小線分の照合が終了すると、矩形領域検出部113は、残った最小線分に基づいて、4つの最小線分に囲まれた領域を矩形領域として検出する(S115)。   Subsequently, when all the minimum line segments have been collated, the rectangular area detection unit 113 detects an area surrounded by the four minimum line segments as a rectangular area based on the remaining minimum line segments (S115).

以上のように、本実施の形態では、エッジ画像に基づいてエッジ断片群を検出し、エッジ断片群の分布を示すエッジ存在位置ヒストグラムを生成し、エッジ存在位置ヒストグラムのピークを結ぶ最小線分とエッジ断片群とを照合することで、3次元環境における矩形検出を可能とした。本実施の形態では、直交2軸のヒストグラムのピークを取ることで信頼性高く矩形を検出することができる。   As described above, in the present embodiment, the edge fragment group is detected based on the edge image, the edge presence position histogram indicating the distribution of the edge fragment group is generated, and the minimum line segment connecting the peaks of the edge presence position histogram is Rectangle detection in a three-dimensional environment was made possible by collating with edge fragment groups. In the present embodiment, a rectangle can be detected with high reliability by taking a peak of a histogram of orthogonal two axes.

すなわち、対象物を3次元座標件で表すことでエッジ断片を結ぶ線分同士が直交し合い、矩形領域が現れる。また、線分は、エッジ存在位置ヒストグラムのピーク位置を結んでいるため、対象物の模様等を直線として認識することはない。そのため、対象と対面しない位置から画像を取得するような3次元環境であっても、矩形領域を検出でき、また、模様等を直線と認識せずに正確に矩形領域を検出することができる。   That is, by representing the object as a three-dimensional coordinate item, the line segments connecting the edge fragments are orthogonal to each other, and a rectangular region appears. In addition, since the line segment connects the peak positions of the edge presence position histogram, the pattern of the object is not recognized as a straight line. Therefore, even in a three-dimensional environment in which an image is acquired from a position that does not face the target, a rectangular area can be detected, and a rectangular area can be accurately detected without recognizing a pattern or the like as a straight line.

(実施の形態2)
以下、図面を参照して実施の形態2について説明する。本実施の形態では、ロボットが家具を操作するために、実施の形態1により検出した矩形領域を家具候補として、家具候補の操作情報を設定可能とする。
(Embodiment 2)
The second embodiment will be described below with reference to the drawings. In the present embodiment, in order for the robot to operate the furniture, it is possible to set the operation information of the furniture candidate using the rectangular area detected in the first embodiment as the furniture candidate.

図23は、本実施の形態に係る家具モデル処理システムの構成を示している。図23に示すように、本実施の形態に係る家具モデル処理システム2は、実施の形態1の矩形領域検出装置100、距離画像センサ200に加えて、家具モデル生成装置300を備えている。   FIG. 23 shows a configuration of the furniture model processing system according to the present embodiment. As shown in FIG. 23, the furniture model processing system 2 according to the present embodiment includes a furniture model generation device 300 in addition to the rectangular area detection device 100 and the distance image sensor 200 of the first embodiment.

家具モデル生成装置(3次元モデル生成想定)300は、HMI(Human Machine Interface)部301、操作情報付与部302、操作表示部303、モデル記憶部304を備えている。例えば、家具モデル生成装置300は、PC(パーソナルコンピュータ)、タブレットPC、スマートフォンなどで構成される。家具モデル生成装置300の各機能は、矩形領域検出装置100と同様に、ハードウェア又はソフトウェアによって構成され、各機能を、記憶装置に格納されたプログラムをコンピュータで実行することにより実現してもよい。家具モデル生成装置300は、1つまたは複数の装置で構成され、例えば、HMI部301、操作情報付与部302、操作表示部303をユーザが操作する端末装置に備え、モデル記憶部304をロボットに備えてもよい。   The furniture model generation apparatus (3D model generation assumption) 300 includes an HMI (Human Machine Interface) unit 301, an operation information addition unit 302, an operation display unit 303, and a model storage unit 304. For example, the furniture model generation apparatus 300 includes a PC (personal computer), a tablet PC, a smartphone, and the like. Each function of the furniture model generation device 300 is configured by hardware or software similarly to the rectangular area detection device 100, and each function may be realized by executing a program stored in the storage device by a computer. . The furniture model generation device 300 includes one or a plurality of devices. For example, the furniture model generation device 300 includes a HMI unit 301, an operation information addition unit 302, and an operation display unit 303 in a terminal device operated by a user, and a model storage unit 304 as a robot You may prepare.

HMI部301は、タッチパネルやマウス等で構成されるユーザインタフェースである。HMI部301は、ユーザへ情報を表示(出力)するとともに、ユーザからの入力操作を受け付ける。   The HMI unit 301 is a user interface configured with a touch panel, a mouse, or the like. The HMI unit 301 displays (outputs) information to the user and accepts an input operation from the user.

操作情報付与部(動作指定部)302は、HMI部301を介したユーザの操作指示に応じて、家具モデルに操作情報を付与する。操作表示部303は、操作情報付与部302が操作情報を付与した家具モデルを、HMI部301を介してユーザへ表示する。   The operation information adding unit (operation specifying unit) 302 adds operation information to the furniture model in response to a user operation instruction via the HMI unit 301. The operation display unit 303 displays the furniture model to which the operation information adding unit 302 has added the operation information to the user via the HMI unit 301.

モデル記憶部304は、メモリやハードディスク等で構成される記憶部であり、家具モデルを記憶する。モデル記憶部304は、操作情報付与部302が操作情報を付与し、操作表示部303が表示した家具モデルを記憶する。家具モデル(家具モデル情報)には、家具(物体)の3次元の位置及び形状、操作情報等が含まれる。   The model storage unit 304 is a storage unit configured with a memory, a hard disk, and the like, and stores a furniture model. The model storage unit 304 stores the furniture model to which the operation information adding unit 302 has given operation information and the operation display unit 303 has displayed. The furniture model (furniture model information) includes the three-dimensional position and shape of furniture (object), operation information, and the like.

図24は、本実施の形態に係る家具モデル処理システム(家具モデル処理装置)で実行される家具モデル処理方法を示しており、図25は、図24の操作方法指示処理(S203)の詳細を示している。   FIG. 24 shows a furniture model processing method executed by the furniture model processing system (furniture model processing apparatus) according to the present embodiment, and FIG. 25 shows details of the operation method instruction processing (S203) of FIG. Show.

図24に示すように、まず、矩形領域検出装置100は、実施の形態1と同様に矩形領域を特定する(S201)。ロボットに搭載された距離画像センサ200が、ロボット周辺の3次元環境を計測し、例えば図26のような距離画像を生成する。そして、矩形領域検出装置100が、この距離画像に含まれる矩形領域を検出する。   As shown in FIG. 24, first, the rectangular area detection device 100 identifies a rectangular area as in the first embodiment (S201). A distance image sensor 200 mounted on the robot measures a three-dimensional environment around the robot, and generates a distance image as shown in FIG. 26, for example. Then, the rectangular area detection device 100 detects a rectangular area included in the distance image.

続いて、S201で検出した矩形領域を家具候補として、HMI部301へ提示する(S202)。3次元環境中において床面に垂直な矩形の平面は家具またはその一部を構成している可能性が高いため、検出した矩形領域を家具候補とする。例えば、矩形領域検出装置100もしくは家具モデル生成装置300は、複数の家具候補(家具テンプレート)を記憶しており、検出した矩形領域と一致する候補を家具候補として選択してもよい。   Subsequently, the rectangular area detected in S201 is presented as a furniture candidate to the HMI unit 301 (S202). Since a rectangular plane perpendicular to the floor surface in a three-dimensional environment is likely to constitute furniture or a part thereof, the detected rectangular area is set as a furniture candidate. For example, the rectangular area detection apparatus 100 or the furniture model generation apparatus 300 may store a plurality of furniture candidates (furniture templates) and select a candidate that matches the detected rectangular area as a furniture candidate.

矩形領域検出装置100は、検出した矩形領域を家具候補として特定し、HMI部301は、図27のように、特定した家具候補400をユーザへ表示する。図26では、矩形領域401、402が、検出された矩形領域である。例えば、矩形領域401は回転扉の平面であり、矩形領域402は引き出しの平面である。ここでは、回転扉である矩形領域401の操作を指定する例について説明する。   The rectangular area detection device 100 specifies the detected rectangular area as a furniture candidate, and the HMI unit 301 displays the specified furniture candidate 400 to the user as shown in FIG. In FIG. 26, rectangular areas 401 and 402 are detected rectangular areas. For example, the rectangular area 401 is a plane of a revolving door, and the rectangular area 402 is a plane of a drawer. Here, an example in which an operation of the rectangular area 401 that is a revolving door is designated will be described.

続いて、S202で表示した家具(家具候補)の操作方法を、HMI部301を通してユーザが指示し、操作情報付与部302が操作情報を付与する(S203)。   Subsequently, the user instructs the operation method of the furniture (furniture candidate) displayed in S202 through the HMI unit 301, and the operation information adding unit 302 adds the operation information (S203).

S203の処理では、具体的に図28に示すように、ユーザがHMI部301を通して可動軸を選択する(S211)。例えば、図28のように、マウスクリックやタッチパネルに対しタッチ操作を行うことで、矩形領域401の端(辺)を選択し回転軸401aとして指示する。図28では、一例として、矩形領域401の上下左右4端(4辺)の内、右端(右辺)を選択することで、選択した端(辺)を回転軸401aとして、ヒンジ周りの回転動作することを指示する。   In the process of S203, as shown in FIG. 28, the user selects a movable axis through the HMI unit 301 (S211). For example, as shown in FIG. 28, by performing a mouse click or a touch operation on the touch panel, the end (side) of the rectangular area 401 is selected and designated as the rotation axis 401a. In FIG. 28, as an example, by selecting the right end (right side) of the top, bottom, left, and right four ends (four sides) of the rectangular area 401, the selected end (side) rotates about the hinge around the selected end (side). Instruct.

次に、ユーザがHMI部301を通してハンドル位置を指示する(S212)。例えば、図29のように、矩形領域401の左上部分をクリックやタッチ操作により選択することで、選択部分をハンドル位置401bとして指示する。なお、ユーザがハンドル位置401bを選択したときに、ハンドル位置401bにハンドルを表示してもよい。図29のように、回転軸401a及びハンドル位置401bを選択すると、矩形領域401の回転量を指示するための回転リング401cが表示される。   Next, the user instructs the handle position through the HMI unit 301 (S212). For example, as shown in FIG. 29, the selected portion is designated as the handle position 401b by selecting the upper left portion of the rectangular area 401 by clicking or touching. Note that a handle may be displayed at the handle position 401b when the user selects the handle position 401b. As shown in FIG. 29, when the rotation axis 401a and the handle position 401b are selected, a rotation ring 401c for instructing the rotation amount of the rectangular area 401 is displayed.

次に、ユーザがHMI部301を通して回転量を指示する(S213)。例えば、図30のように、表示された回転リング401cをドラッグ操作することで“矩形領域401の回転軸401a周りの回転量401d“を指示する(S213)。   Next, the user instructs the amount of rotation through the HMI unit 301 (S213). For example, as shown in FIG. 30, the “rotation amount 401d around the rotation axis 401a of the rectangular area 401” is instructed by dragging the displayed rotation ring 401c (S213).

図24のS203に続いて、操作量示部303は、S203における“ユーザの操作指示”によって矩形領域がどのように動くかを、HMI部301を介してユーザへ表示する(S204)。例えば、図31のように、ハンドル位置401bを操作すると回転軸401aを軸として、指定した回転量401dで矩形領域401の扉が開放状態となることを表示する。   Subsequent to S203 in FIG. 24, the operation amount display unit 303 displays to the user via the HMI unit 301 how the rectangular area moves in response to the “user operation instruction” in S203 (S204). For example, as shown in FIG. 31, when the handle position 401b is operated, it is displayed that the door of the rectangular area 401 is opened with the specified rotation amount 401d around the rotation axis 401a.

続いて、ユーザが操作指示を最終確定すると、モデル記憶部304へ“矩形領域の位置・形状”、“ユーザの操作指示情報”を記憶する(S205)。S204で表示された動作を確認したことを示す操作をユーザが行うと、矩形領域401の位置及び形状と、回転軸401a、ハンドル位置401b、回転量401dを、家具モデル(3次元モデル)として記憶する。   Subsequently, when the user finally finalizes the operation instruction, “the position / shape of the rectangular area” and “user operation instruction information” are stored in the model storage unit 304 (S205). When the user performs an operation indicating that the operation displayed in S204 has been confirmed, the position and shape of the rectangular area 401, the rotation axis 401a, the handle position 401b, and the rotation amount 401d are stored as a furniture model (three-dimensional model). To do.

その後、ロボットがこの家具モデル情報を使って家具の操作を行う。例えば、ロボットは、制御部や記憶部、アクチュエータ等を備えており、ロボットの記憶部に、生成された家具モデル情報を記憶する。制御部が家具モデル情報にしたがってアクチュエータ等の動作を制御する。例えば、ロボットは、家具モデル情報にしたがい、図31のようにハンドル位置401bのハンドルを操作し矩形領域401の回転扉の開閉を行う。   Thereafter, the robot uses the furniture model information to operate the furniture. For example, the robot includes a control unit, a storage unit, an actuator, and the like, and stores the generated furniture model information in the storage unit of the robot. The control unit controls the operation of the actuator and the like according to the furniture model information. For example, according to the furniture model information, the robot opens and closes the revolving door in the rectangular area 401 by operating the handle at the handle position 401b as shown in FIG.

以上のように、本実施の形態では、入力画像から検出された矩形領域を家具候補とし、HMIを介して家具候補の操作を指示することにより、家具の推定や構造を含む家具モデルの構築を簡易に行うことができる。   As described above, in the present embodiment, a rectangular model detected from an input image is set as a furniture candidate, and an operation of the furniture candidate is instructed via the HMI, thereby building a furniture model including furniture estimation and structure. It can be done easily.

近年、社会の高齢化が急速に進んでおり、介護者等を支援するための生活支援ロボットHSR(Human Support Robot)が注目されている。例えば、一般的なロボットにおいて、生活支援のために遠隔操縦で物体操作を行うと、ロボット頭部のカメラ画像だけからでは対象物までの距離、環境物とのスペースがわかりにくいという問題や、家具を認識するためにマーカーを付ける必要があるという問題、物体操作において、ロボットの手先を目標位置に合わせることが困難であるという問題が生じる。   In recent years, the aging of society is rapidly progressing, and a life support robot HSR (Human Support Robot) for supporting caregivers and the like has been attracting attention. For example, in general robots, when manipulating objects by remote control for life support, it is difficult to understand the distance to the target object and the space with the environmental object only from the camera image of the robot head. There is a problem that it is necessary to attach a marker for recognizing the image and a problem that it is difficult to adjust the hand of the robot to the target position in the object operation.

そこで、このようなロボットに本実施の形態を適用することで、家具候補により、ロボット周辺の広範囲な環境情報をわかりやすく提示することができ、矩形検出を用いることにより、マーカーを付けることなく家具を認識することができ、操作情報を付与した家具モデル(インタラクティブ家具モデル)を用いることにより、ロボットが家具を正確に認識して操作することが可能となる。   Therefore, by applying this embodiment to such a robot, furniture candidates can present a wide range of environmental information around the robot in an easy-to-understand manner, and by using rectangle detection, furniture without a marker can be provided. By using a furniture model (interactive furniture model) provided with operation information, the robot can accurately recognize and operate the furniture.

特に、家具の構造をモデル化するためには人間が家具を動かしてみせたりロボットで実際に動かしたりする必要があるため、家具の構造を遠隔でロボットに教示することは非常に困難である。本実施の形態をロボットに適用することにより、未知の家庭環境における家具配置の推定と構造の教示が容易になり、遠隔操縦の大幅な省力化が可能となる。   In particular, in order to model the structure of furniture, it is necessary for a human to move the furniture or actually move it with a robot. Therefore, it is very difficult to remotely teach the furniture structure to the robot. By applying this embodiment to a robot, furniture arrangement estimation and structure teaching in an unknown home environment can be facilitated, and remote control can be greatly labor-saving.

なお、本発明は上記実施の形態に限られたものではなく、趣旨を逸脱しない範囲で適宜変更することが可能である。   Note that the present invention is not limited to the above-described embodiment, and can be changed as appropriate without departing from the spirit of the present invention.

1 画像処理システム
2 家具モデル処理システム
100 矩形領域検出装置
101 距離画像取得部
102 平面検出部
103 平面マスク画像生成部
104 平面座標系計算部
105 エッジ検出部
106 エッジ断片検出部
107 座標系変換部
108 エッジ存在位置ヒストグラム生成部
109 ヒストグラムピーク推定部
110 線分生成部
111 近傍エッジ断片抽出部
112 エッジ照合部
113 矩形領域検出部
200 距離画像センサ
300 家具モデル生成装置
301 HMI部
302 操作情報付与部
303 操作表示部
304 モデル記憶部
DESCRIPTION OF SYMBOLS 1 Image processing system 2 Furniture model processing system 100 Rectangular area detection apparatus 101 Distance image acquisition part 102 Plane detection part 103 Plane mask image generation part 104 Plane coordinate system calculation part 105 Edge detection part 106 Edge fragment detection part 107 Coordinate system conversion part 108 Edge presence position histogram generation unit 109 Histogram peak estimation unit 110 Line segment generation unit 111 Neighborhood edge fragment extraction unit 112 Edge collation unit 113 Rectangular area detection unit 200 Distance image sensor 300 Furniture model generation device 301 HMI unit 302 Operation information addition unit 303 Operation Display unit 304 Model storage unit

Claims (17)

計測画像情報に含まれる3次元平面内の複数のエッジ画素を検出するエッジ画素検出部と、
前記検出した複数のエッジ画素間を接続する複数のエッジ線分を検出するエッジ線分検出部と、
前記検出した複数のエッジ線分の座標系を、前記3次元平面の法線方向から見た平面座標系に変換する座標系変換部と、
前記平面座標系における複数のエッジ線分の分布に基づいて、前記3次元平面内の矩形領域を検出する矩形領域検出部と、
を備える画像処理装置。
An edge pixel detection unit for detecting a plurality of edge pixels in a three-dimensional plane included in the measurement image information;
An edge line segment detection unit for detecting a plurality of edge line segments connecting the detected plurality of edge pixels;
A coordinate system conversion unit that converts the coordinate system of the detected plurality of edge line segments into a plane coordinate system viewed from the normal direction of the three-dimensional plane;
A rectangular area detector for detecting a rectangular area in the three-dimensional plane based on a distribution of a plurality of edge line segments in the planar coordinate system;
An image processing apparatus comprising:
前記計測画像情報には、計測点から前記3次元平面を撮像した画像情報と、前記計測点から前記3次元平面までの距離情報とが含まれる、
請求項1に記載の画像処理装置。
The measurement image information includes image information obtained by imaging the three-dimensional plane from a measurement point, and distance information from the measurement point to the three-dimensional plane.
The image processing apparatus according to claim 1.
前記計測画像情報に含まれる前記3次元平面を検出する平面検出部を備え、
前記エッジ画素検出部は、前記検出した3次元平面に基づいて前記複数のエッジ画素を検出する、
請求項1または2に記載の画像処理装置。
A plane detection unit that detects the three-dimensional plane included in the measurement image information;
The edge pixel detection unit detects the plurality of edge pixels based on the detected three-dimensional plane;
The image processing apparatus according to claim 1.
前記計測画像情報の中から、前記検出した3次元平面領域の画像を抽出した抽出画像を生成する抽出画像生成部を備え、
前記エッジ画素検出部は、前記生成した抽出画像に対してエッジ検出処理を行い、前記複数のエッジ画素を検出する、
請求項3に記載の画像処理装置。
An extracted image generation unit that generates an extracted image obtained by extracting the image of the detected three-dimensional plane region from the measurement image information;
The edge pixel detection unit performs edge detection processing on the generated extracted image and detects the plurality of edge pixels.
The image processing apparatus according to claim 3.
前記エッジ線分検出部は、前記複数のエッジ画素に対して確率的ハフ変換を行い、前記複数のエッジ線分を検出する、
請求項1乃至4のいずれか一項に記載の画像処理装置。
The edge line segment detection unit performs a probabilistic Hough transform on the plurality of edge pixels and detects the plurality of edge line segments;
The image processing apparatus according to claim 1.
前記平面座標系における複数のエッジ線分の位置の分布を示すヒストグラムを生成するヒストグラム生成部を備え、
前記矩形領域検出部は、前記生成されたヒストグラムに基づいて、前記矩形領域を検出する、
請求項1乃至5のいずれか一項に記載の画像処理装置。
A histogram generation unit that generates a histogram indicating a distribution of positions of a plurality of edge line segments in the planar coordinate system;
The rectangular area detection unit detects the rectangular area based on the generated histogram.
The image processing apparatus according to claim 1.
前記ヒストグラムは、前記平面座標系の軸方向に対する前記複数のエッジ線分の傾きを重みとする分布である、
請求項6に記載の画像処理装置。
The histogram is a distribution having a weight as an inclination of the plurality of edge line segments with respect to an axial direction of the planar coordinate system.
The image processing apparatus according to claim 6.
前記ヒストグラムの重みは、前記複数のエッジ線分と前記平面座標系の軸方向の単位ベクトルとの内積である、
請求項7に記載の画像処理装置。
The histogram weight is an inner product of the plurality of edge line segments and an axial unit vector of the planar coordinate system.
The image processing apparatus according to claim 7.
前記ヒストグラムの複数のピーク位置を検出するピーク検出部と、
前記検出した複数のピーク位置間を、前記平面座標系の軸方向へ接続する複数のピーク線分を生成するピーク線分生成部と、を備え、
前記矩形領域検出部は、前記生成された複数のピーク線分に基づいて、前記矩形領域を検出する、
請求項6乃至8のいずれか一項に記載の画像処理装置。
A peak detector for detecting a plurality of peak positions of the histogram;
A peak line segment generation unit that generates a plurality of peak line segments that connect between the detected peak positions in the axial direction of the planar coordinate system, and
The rectangular area detecting unit detects the rectangular area based on the plurality of generated peak line segments;
The image processing apparatus according to claim 6.
前記矩形領域検出部は、前記生成された複数のピーク線分のうち、前記複数のエッジ線分に対応するピーク線分に基づいて、前記矩形領域を検出する、
請求項9に記載の画像処理装置。
The rectangular area detection unit detects the rectangular area based on peak line segments corresponding to the plurality of edge line segments among the generated plurality of peak line segments.
The image processing apparatus according to claim 9.
前記生成された複数のピーク線分と前記複数のエッジ線分とを照合するエッジ照合部と、
前記矩形領域検出部は、前記照合が成功した前記ピーク線分に基づいて、前記矩形領域を検出する、
請求項9または10に記載の画像処理装置。
An edge matching unit for matching the generated plurality of peak line segments and the plurality of edge line segments;
The rectangular area detection unit detects the rectangular area based on the peak line segment that has been successfully verified.
The image processing apparatus according to claim 9 or 10.
前記複数のエッジ線分から、前記生成された複数のピーク線分近傍のエッジ線分を抽出する近傍エッジ線分抽出部を備え、
前記エッジ照合部は、前記複数のピーク線分と前記抽出されたエッジ線分とを照合する、
請求項11に記載の画像処理装置。
A neighborhood edge line segment extraction unit that extracts edge line segments in the vicinity of the generated plurality of peak line segments from the plurality of edge line segments,
The edge matching unit matches the plurality of peak line segments with the extracted edge line segments;
The image processing apparatus according to claim 11.
前記検出された矩形領域の一辺を回転軸として回転可能な3次元モデルを生成する3次元モデル生成部を備える、
請求項1乃至12のいずれか一項に記載の画像処理装置。
A three-dimensional model generation unit that generates a three-dimensional model that can rotate around one side of the detected rectangular area;
The image processing apparatus according to claim 1.
ユーザの入力操作に応じて、前記矩形領域に対して前記回転軸と回転動作を指定する動作指定部を備える、
請求項13に記載の画像処理装置。
An operation designating unit that designates the rotation axis and the rotation operation with respect to the rectangular region according to a user input operation;
The image processing apparatus according to claim 13.
前記3次元モデル生成部は、前記検出された矩形領域を家具候補として認識し、前記3次元モデルとして家具モデルを生成する、
請求項13または14に記載の画像処理装置。
The three-dimensional model generation unit recognizes the detected rectangular area as a furniture candidate, and generates a furniture model as the three-dimensional model.
The image processing apparatus according to claim 13 or 14.
計測画像情報に含まれる3次元平面内の複数のエッジ画素を検出し、
前記検出した複数のエッジ画素間を接続する複数のエッジ線分を検出し、
前記検出した複数のエッジ線分の座標系を、前記3次元平面の法線方向から見た平面座標系に変換し、
前記平面座標系における複数のエッジ線分の分布に基づいて、前記3次元平面内の矩形領域を検出する、
画像処理方法。
Detecting a plurality of edge pixels in a three-dimensional plane included in the measurement image information;
Detecting a plurality of edge line segments connecting the detected plurality of edge pixels;
Converting the detected coordinate system of the plurality of edge line segments into a plane coordinate system viewed from the normal direction of the three-dimensional plane;
Detecting a rectangular region in the three-dimensional plane based on a distribution of a plurality of edge line segments in the plane coordinate system;
Image processing method.
計測画像情報に含まれる3次元平面内の複数のエッジ画素を検出し、
前記検出した複数のエッジ画素間を接続する複数のエッジ線分を検出し、
前記検出した複数のエッジ線分の座標系を、前記3次元平面の法線方向から見た平面座標系に変換し、
前記平面座標系における複数のエッジ線分の分布に基づいて、前記3次元平面内の矩形領域を検出する、
画像処理方法をコンピュータに実行させるための画像処理プログラム。
Detecting a plurality of edge pixels in a three-dimensional plane included in the measurement image information;
Detecting a plurality of edge line segments connecting the detected plurality of edge pixels;
Converting the detected coordinate system of the plurality of edge line segments into a plane coordinate system viewed from the normal direction of the three-dimensional plane;
Detecting a rectangular region in the three-dimensional plane based on a distribution of a plurality of edge line segments in the plane coordinate system;
An image processing program for causing a computer to execute an image processing method.
JP2013181938A 2013-09-03 2013-09-03 Image processing apparatus, image processing method, and image processing program Active JP6054831B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013181938A JP6054831B2 (en) 2013-09-03 2013-09-03 Image processing apparatus, image processing method, and image processing program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2013181938A JP6054831B2 (en) 2013-09-03 2013-09-03 Image processing apparatus, image processing method, and image processing program

Publications (2)

Publication Number Publication Date
JP2015049776A JP2015049776A (en) 2015-03-16
JP6054831B2 true JP6054831B2 (en) 2016-12-27

Family

ID=52699718

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013181938A Active JP6054831B2 (en) 2013-09-03 2013-09-03 Image processing apparatus, image processing method, and image processing program

Country Status (1)

Country Link
JP (1) JP6054831B2 (en)

Families Citing this family (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP6604147B2 (en) * 2015-11-04 2019-11-13 トヨタ自動車株式会社 Operation object state estimation device
JP6815793B2 (en) * 2016-09-05 2021-01-20 国立大学法人 東京大学 Rectangular area detection method, rectangular area detection device and program
JP6874987B2 (en) * 2017-07-04 2021-05-19 Necソリューションイノベータ株式会社 Feature shape extraction device, feature shape extraction method, and program
JP7081140B2 (en) 2017-12-25 2022-06-07 富士通株式会社 Object recognition device, object recognition method and object recognition program
EP4130648A4 (en) * 2020-03-24 2023-09-06 Panasonic Intellectual Property Management Co., Ltd. Dimension measurement method and dimension measurement device
JP7452797B2 (en) 2020-08-06 2024-03-19 株式会社イクシス measurement system
JP7449506B2 (en) 2020-08-06 2024-03-14 株式会社イクシス measurement system
US11734850B2 (en) * 2021-04-26 2023-08-22 Ubtech North America Research And Development Center Corp On-floor obstacle detection method and mobile machine using the same
CN117053687A (en) * 2023-08-17 2023-11-14 广州市西克传感器有限公司 Cell height level difference detection method based on laser line scanning 3D camera

Family Cites Families (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH10124670A (en) * 1996-10-18 1998-05-15 Nippon Telegr & Teleph Corp <Ntt> Method for recognizing drawing
JP4712487B2 (en) * 2005-08-25 2011-06-29 株式会社リコー Image processing method and apparatus, digital camera apparatus, and recording medium recording image processing program
JP4888023B2 (en) * 2006-10-02 2012-02-29 大日本印刷株式会社 Method and apparatus for creating reflection characteristic data of object
US8265425B2 (en) * 2008-05-20 2012-09-11 Honda Motor Co., Ltd. Rectangular table detection using hybrid RGB and depth camera sensors

Also Published As

Publication number Publication date
JP2015049776A (en) 2015-03-16

Similar Documents

Publication Publication Date Title
JP6054831B2 (en) Image processing apparatus, image processing method, and image processing program
US10762386B2 (en) Method of determining a similarity transformation between first and second coordinates of 3D features
CN108875133B (en) Determining building layout
US10456918B2 (en) Information processing apparatus, information processing method, and program
US10469829B2 (en) Information processor and information processing method
KR101410273B1 (en) Method and apparatus for environment modeling for ar
EP2774379A1 (en) Surface segmentation from rgb and depth images
EP3239931A1 (en) Image processing apparatus and image processing method
JP2012526335A (en) Object recognition method, object recognition device, autonomous mobile robot
JP6185385B2 (en) Spatial structure estimation apparatus, spatial structure estimation method, and spatial structure estimation program
JP2014235634A (en) Finger operation detection device, finger operation detection method, finger operation detection program, and virtual object processing system
JP2017151648A5 (en)
KR101330531B1 (en) Method of virtual touch using 3D camera and apparatus thereof
Ozbay et al. A hybrid method for skeleton extraction on Kinect sensor data: Combination of L1-Median and Laplacian shrinking algorithms
JP2022517050A (en) How to remotely control a display device via head gestures, systems and computer programs
JP2015184054A (en) Identification device, method, and program
JP5762099B2 (en) Posture recognition apparatus, work robot, posture recognition method, program, and recording medium
JP6237122B2 (en) Robot, image processing method and robot system
JP5083715B2 (en) 3D position and orientation measurement method and apparatus
JP2015132544A (en) Image processing apparatus and three-dimensional space information acquisition method
JP7161857B2 (en) Information processing device, information processing method, and program
JP7003455B2 (en) Template creation device, object recognition processing device, template creation method and program
CN113297952B (en) Measuring method and system for rope-driven flexible robot in complex environment
Masuta et al. Unknown object extraction for robot partner using depth sensor
JP2014235680A (en) Image processor, image processing method, robot and program

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20151217

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20161027

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20161201

R150 Certificate of patent or registration of utility model

Ref document number: 6054831

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

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250