JPWO2013105205A1 - 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
JPWO2013105205A1
JPWO2013105205A1 JP2013553114A JP2013553114A JPWO2013105205A1 JP WO2013105205 A1 JPWO2013105205 A1 JP WO2013105205A1 JP 2013553114 A JP2013553114 A JP 2013553114A JP 2013553114 A JP2013553114 A JP 2013553114A JP WO2013105205 A1 JPWO2013105205 A1 JP WO2013105205A1
Authority
JP
Japan
Prior art keywords
reference point
image
conversion
coordinates
orientation
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.)
Pending
Application number
JP2013553114A
Other languages
Japanese (ja)
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.)
NEC Corp
Original Assignee
NEC 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 NEC Corp filed Critical NEC Corp
Priority to JP2013553114A priority Critical patent/JPWO2013105205A1/en
Publication of JPWO2013105205A1 publication Critical patent/JPWO2013105205A1/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06TIMAGE DATA PROCESSING OR GENERATION, IN GENERAL
    • G06T3/00Geometric image transformation in the plane of the image

Abstract

画像処理装置は、注目物体を設置する回転台、加速度センサ等の他の装置を用いずに、単一のカメラで自由な方向から注目物体を撮影した画像から位置合わせ画像を生成する。幾何変換手法決定手段16は、各変換対象画像について、第1基準点射影手段13によって決定された第1基準点と、第2基準点設定手段15によって設定された第2基準点とに基づいて、所定の幾何変換式のパラメータを算出する。幾何変換手段17は、幾何変換手法決定手段16が算出したパラメータによる幾何変換式を用いて変換対象画像を幾何変換する。The image processing apparatus generates a registration image from an image obtained by capturing an object of interest from any direction with a single camera without using other devices such as a turntable and an acceleration sensor on which the object of interest is installed. The geometric transformation method determination means 16 is based on the first reference point determined by the first reference point projection means 13 and the second reference point set by the second reference point setting means 15 for each conversion target image. Then, parameters of a predetermined geometric transformation formula are calculated. The geometric conversion unit 17 performs geometric conversion on the conversion target image using the geometric conversion formula based on the parameters calculated by the geometric conversion method determination unit 16.

Description

本発明は、画像処理装置、画像処理方法および画像処理用プログラムに関し、特に、注目物体を含む複数の変換対象画像から、画像中の任意の位置に注目物体の位置合わせが行われた画像を生成するための画像処理装置、画像処理方法および画像処理用プログラムに関する。   The present invention relates to an image processing apparatus, an image processing method, and an image processing program, and in particular, generates an image in which a target object is aligned at an arbitrary position in the image from a plurality of conversion target images including the target object. The present invention relates to an image processing apparatus, an image processing method, and an image processing program.

様々な距離や角度から撮影した注目物体の画像に対し、注目物体の位置と回転方向と大きさを合わせた画像を連続的に切り替えることによって、ユーザに見やすい映像提示ができる。以下、注目物体の位置と回転方向と大きさを合わせた画像を、位置合わせ画像と呼ぶ。   By continuously switching the image of the object of interest photographed from various distances and angles, and combining the position of the object of interest, the rotation direction, and the size, it is possible to present a video that is easy to see for the user. Hereinafter, an image obtained by combining the position, rotation direction, and size of the object of interest is referred to as an alignment image.

注目物体が画像の中心に位置するような位置合わせ画像を撮影する方法の一例が特許文献1〜3、および非特許文献1に記載されている。特許文献1に記載されている撮影方法では、複数のカメラとそれらを支える支持部を用いて注目物体が様々な角度から撮影される。   One example of a method for capturing an alignment image in which the object of interest is located at the center of the image is described in Patent Documents 1 to 3 and Non-Patent Document 1. In the imaging method described in Patent Document 1, an object of interest is imaged from various angles using a plurality of cameras and a supporting unit that supports them.

特許文献2に記載されている撮影装置は、複数のカメラと計算機に接続された回転台とを用いて注目物体を様々な角度から撮影する。   The imaging device described in Patent Document 2 captures an object of interest from various angles using a plurality of cameras and a turntable connected to a computer.

特許文献3に記載されている画像入力方法では、固定されていないカメラで注目物体が様々な角度から撮影され、姿勢検出部で検出されたカメラの姿勢情報から画像中の注目物体の中心位置を揃えるための2次元幾何変換行列が算出され、画像変換が施される。   In the image input method described in Patent Document 3, the object of interest is photographed from various angles with an unfixed camera, and the center position of the object of interest in the image is determined from the camera posture information detected by the posture detector. A two-dimensional geometric transformation matrix for alignment is calculated and image transformation is performed.

非特許文献1に記載されている画像変換方法では、水平方向に動く固定されていないカメラで注目物体と正方マーカが様々な距離と角度から撮影され、正方マーカから計算されたカメラの姿勢情報から位置合わせ画像を生成するための2次元幾何変換行列が算出され、画像変換が施される。   In the image conversion method described in Non-Patent Document 1, an object of interest and a square marker are photographed from various distances and angles with an unfixed camera that moves in the horizontal direction, and based on camera posture information calculated from the square marker. A two-dimensional geometric transformation matrix for generating a registration image is calculated, and image transformation is performed.

特開2004−264492号公報JP 2004-264492 A 特開2007−72537号公報JP 2007-72537 A 特開2005−49999号公報Japanese Patent Laid-Open No. 2005-49999 特開2000−97637号公報JP 2000-97637 A

中野 学、田治米純二、仙田裕三、“単眼カメラとARマーカによる低演算自由視点映像生成”、情報科学技術フォーラム講演論文集9(3)、189-190、2010-08-20Manabu Nakano, Junji Taji, Yuzo Senda, “Generation of Low Computation Free Viewpoint Images Using Monocular Cameras and AR Markers”, Proc. 9 (3), 189-190, 2010-08-20

しかし、特許文献1〜3に記載されている方法および装置では、注目物体の位置合わせ画像を生成するために、単一のカメラ以外に、設置場所が固定された複数のカメラや注目物体を設置する回転台、加速度センサ等の多数の装置が必要である。   However, in the methods and apparatuses described in Patent Documents 1 to 3, in order to generate the alignment image of the target object, a plurality of cameras and target objects whose installation locations are fixed are installed in addition to the single camera. A large number of devices such as a turntable and an acceleration sensor are required.

例えば、特許文献1に記載されている撮影方法では、支持部はカメラを固定する複数の雲台と、雲台を支える支持フレームと支持アームおよび支柱などの多数の装置が必要である。また、撮影者は複数のカメラを同一直線上、同一円弧状、同一平面上、同一形状のいずれかに配置しなければならず、撮影にいたるまでの準備が非常に複雑である。   For example, in the photographing method described in Patent Document 1, the support unit requires a number of devices such as a plurality of camera platforms for fixing the camera, a support frame that supports the camera platform, support arms, and columns. In addition, the photographer must arrange a plurality of cameras on the same straight line, in the same arc shape, on the same plane, or in the same shape, and preparation for taking a picture is very complicated.

また、特許文献2に記載されている撮影装置では、回転台は計算機により動作を制御される。またカメラは、円弧状の撮像装置設置台に等間隔に設置されている。撮影者は注目物体を回転台に載せるだけで撮影を開始できるので、カメラや工作の知識は必要ない。しかし、特許文献1に記載されている撮影方法と同様にカメラ以外にも多数の装置が必要である。   In the photographing apparatus described in Patent Document 2, the operation of the turntable is controlled by a computer. The cameras are installed at equal intervals on the arcuate imaging device installation base. Since the photographer can start photographing simply by placing the object of interest on the turntable, knowledge of the camera and work is not necessary. However, in the same way as the photographing method described in Patent Document 1, many devices other than the camera are required.

また、特許文献3に記載されている画像入力方法では、複数のカメラやカメラを固定するための設置台は不要である。従って、撮影者はカメラで撮影するだけでよい。しかし、特許文献1や特許文献2に記載されている撮影装置と同様に、加速度センサや磁気センサといった姿勢検出装置等のカメラ以外の装置が必要である。   In addition, the image input method described in Patent Document 3 does not require a plurality of cameras or an installation base for fixing the cameras. Therefore, the photographer only needs to photograph with the camera. However, similarly to the imaging devices described in Patent Literature 1 and Patent Literature 2, devices other than cameras such as an attitude detection device such as an acceleration sensor and a magnetic sensor are required.

また、非特許文献1に記載されている画像変換方法では、複数のカメラやカメラを固定するための設置台は不要であり、単一のカメラのみで画像を生成可能である。しかし、カメラは水平方向のみしか移動撮影できず、上下方向に移動撮影した場合、注目物体の大きさを合わせることができない。   In addition, the image conversion method described in Non-Patent Document 1 does not require a plurality of cameras and an installation base for fixing the cameras, and can generate an image with only a single camera. However, the camera can move and shoot only in the horizontal direction, and the size of the object of interest cannot be adjusted when moving and shooting in the vertical direction.

そこで、本発明は、注目物体を設置する回転台、加速度センサ等の他の装置を用いずに、単一のカメラで自由な方向から注目物体を撮影した画像から位置合わせ画像を生成することができる画像処理装置、画像処理方法および画像処理用プログラムを提供することを目的とする。   Therefore, the present invention can generate a registration image from an image obtained by capturing an object of interest from a free direction with a single camera without using other devices such as a turntable or an acceleration sensor for installing the object of interest. An object is to provide an image processing apparatus, an image processing method, and an image processing program.

本発明による画像処理装置は、注目物体を含む複数の変換対象画像から注目物体の位置合わせ画像を生成する画像処理装置であって、各変換対象画像について、撮影時のカメラ位置姿勢を推定するカメラ位置姿勢推定手段と、カメラ位置姿勢推定手段によって推定されたカメラ位置姿勢に基づいて、各変換対象画像における3次元座標で表現される第1基準点空間座標を各変換対象画像に射影し、各変換対象画像における画像座標で表現される第1基準点を生成する第1基準点射影手段と、画像座標で表現される第2基準点変換元座標とカメラ位置姿勢を受け付け、カメラ位置姿勢に応じて第1基準点の変換先である画像座標で表現される第2基準点を設定する第2基準点設定手段と、各変換対象画像について、第1基準点射影手段によって決定された第1基準点と、第2基準点設定手段によって設定された第2基準点とに基づいて、所定の幾何変換式のパラメータを算出する幾何変換手法決定手段と、幾何変換手法決定手段が算出したパラメータによる幾何変換式を用いて変換対象画像を幾何変換する幾何変換手段とを備えたことを特徴とする。   An image processing apparatus according to the present invention is an image processing apparatus that generates a registration image of a target object from a plurality of conversion target images including the target object, and for each conversion target image, a camera that estimates a camera position and orientation at the time of shooting Based on the position and orientation estimation means and the camera position and orientation estimated by the camera position and orientation estimation means, the first reference point space coordinates represented by the three-dimensional coordinates in each conversion target image are projected onto each conversion target image, First reference point projection means for generating a first reference point expressed by image coordinates in the conversion target image, second reference point conversion source coordinates expressed by image coordinates, and camera position and orientation are received, and the camera position and orientation are accepted. A second reference point setting means for setting a second reference point expressed by image coordinates that is a conversion destination of the first reference point, and a first reference point projecting means for each conversion target image. A geometric transformation method determining means for calculating a parameter of a predetermined geometric transformation formula based on the set first reference point and the second reference point set by the second reference point setting means; And a geometric transformation means for geometrically transforming the transformation target image using a geometric transformation formula based on the parameters calculated by the above.

本発明による画像処理方法は、注目物体を含む複数の画像である変換対象画像それぞれに幾何変換を施して位置合わせ画像を生成するための画像処理方法であって、各変換対象画像について、撮影時のカメラ位置姿勢を推定し、推定されたカメラ位置姿勢に基づいて、各変換対象画像における3次元座標で表現される第1基準点空間座標を各変換対象画像に射影し、各変換対象画像における画像座標で表現される第1基準点を生成し、画像座標で表現される第2基準点変換元座標とカメラ位置姿勢を受け付け、カメラ位置姿勢に応じて第1基準点の変換先である画像座標で表現される第2基準点を設定し、各変換対象画像について、第1基準点と第2基準点とに基づいて、所定の幾何変換式のパラメータを算出し、算出されたパラメータによる幾何変換式を用いて変換対象画像を幾何変換することを特徴とする。   An image processing method according to the present invention is an image processing method for generating a registration image by performing geometric transformation on each of conversion target images, which are a plurality of images including an object of interest. The first reference point space coordinates represented by the three-dimensional coordinates in each conversion target image are projected on each conversion target image based on the estimated camera position and posture, and The first reference point expressed by the image coordinates is generated, the second reference point conversion source coordinates and the camera position and orientation expressed by the image coordinates are received, and the image that is the conversion destination of the first reference point according to the camera position and orientation A second reference point expressed in coordinates is set, and a parameter of a predetermined geometric transformation formula is calculated for each conversion target image based on the first reference point and the second reference point. Characterized by geometric transformation the converted image using the geometric transformation formula.

本発明による画像処理用プログラムは、注目物体を含む複数の画像である変換対象画像それぞれに幾何変換を施して位置合わせ画像を生成するための画像処理用プログラムであって、コンピュータに、各変換対象画像について、撮影時のカメラ位置姿勢を推定する処理と、推定されたカメラ位置姿勢に基づいて、各変換対象画像における3次元座標で表現される第1基準点空間座標を各変換対象画像に射影し、各変換対象画像における画像座標で表現される第1基準点を生成する処理と、画像座標で表現される第2基準点変換元座標とカメラ位置姿勢を受け付け、カメラ位置姿勢に応じて第1基準点の変換先である画像座標で表現される第2基準点を設定する処理と、各変換対象画像について、第1基準点と第2基準点とに基づいて、所定の幾何変換式のパラメータを算出する処理と、算出されたパラメータによる幾何変換式を用いて変換対象画像を幾何変換する処理とを実行させることを特徴とする。   An image processing program according to the present invention is an image processing program for generating a registration image by performing geometric transformation on each of conversion target images, which are a plurality of images including an object of interest. For the image, the process for estimating the camera position and orientation at the time of shooting and the first reference point space coordinates expressed by the three-dimensional coordinates in each conversion target image are projected onto each conversion target image based on the estimated camera position and orientation Then, the first reference point expressed by the image coordinates in each conversion target image, the second reference point conversion source coordinates expressed by the image coordinates, and the camera position / posture are received, and the first reference point is received according to the camera position / posture. Based on the first reference point and the second reference point for each conversion target image, a process for setting a second reference point expressed by image coordinates that is a conversion destination of one reference point, and a predetermined reference point A process for calculating what parameters of the conversion formulas, characterized in that to execute a process of geometric transformation the converted image using the geometric conversion equation according to the calculated parameters.

本発明によれば、注目物体を設置する回転台、加速度センサ等のカメラに内蔵または装着されていない装置を用いずに、単一のカメラで自由な方向から注目物体を撮影した画像から位置合わせ画像を生成することができる。   According to the present invention, alignment is performed from an image obtained by capturing an object of interest from a free direction with a single camera without using a device such as a turntable on which the object of interest is installed or an acceleration sensor. An image can be generated.

第1の実施形態の構成例を示すブロック図である。It is a block diagram which shows the structural example of 1st Embodiment. 第1の実施形態の動作の一例を示すフローチャートである。It is a flowchart which shows an example of operation | movement of 1st Embodiment. 第1の実施例の変換処理の概要を示す説明図である。It is explanatory drawing which shows the outline | summary of the conversion process of a 1st Example. 第1の実施例の変換処理の概要を示す説明図である。It is explanatory drawing which shows the outline | summary of the conversion process of a 1st Example. 第1の実施例の変換処理の概要を示す説明図である。It is explanatory drawing which shows the outline | summary of the conversion process of a 1st Example. 本発明を情報処理システムに適用した場合のブロック図である。It is a block diagram at the time of applying this invention to an information processing system. 本発明の概要を示すブロック図である。It is a block diagram which shows the outline | summary of this invention.

以下、本発明の実施形態を図面を参照して説明する。図1は、本発明の一実施形態の画像処理装置の構成例を示すブロック図である。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. FIG. 1 is a block diagram illustrating a configuration example of an image processing apparatus according to an embodiment of the present invention.

図1に示す画像処理装置は、カメラ位置姿勢推定手段11と、第1基準点受付決定手段12と、第1基準点空間座標射影手段13と、画像表示手段14と、第2基準点設定手段15と、幾何変換手法決定手段16と、幾何変換手段17とを備える。   The image processing apparatus shown in FIG. 1 includes a camera position / posture estimation unit 11, a first reference point reception determination unit 12, a first reference point space coordinate projection unit 13, an image display unit 14, and a second reference point setting unit. 15, a geometric transformation method determining means 16, and a geometric transformation means 17.

カメラ位置姿勢推定手段11は、注目物体を含む複数の画像(以下、変換対象画像という。)のそれぞれについて、当該変換対象画像を撮影したカメラの位置および姿勢を推定し、推定位置および推定姿勢を第1基準点空間座標射影手段13に出力する。カメラの位置および姿勢を推定するために、既定のマーカを用いる手法や既知の3次元座標とそれが観測された画像座標の対応を用いる手法など、様々な手法を利用可能である。また、カメラに加速度センサやジャイロセンサ等のセンサが内蔵または装着され、別途センサ類を用意する必要がない場合、それらから得られるデータを利用できる。   The camera position / orientation estimation unit 11 estimates the position and orientation of the camera that captured the conversion target image for each of a plurality of images including the target object (hereinafter referred to as a conversion target image), and determines the estimated position and the estimated orientation. Output to the first reference point space coordinate projection means 13. In order to estimate the position and orientation of the camera, various methods such as a method using a predetermined marker and a method using a correspondence between a known three-dimensional coordinate and an image coordinate where the coordinate is observed can be used. In addition, when a sensor such as an acceleration sensor or a gyro sensor is built in or attached to the camera and it is not necessary to prepare sensors separately, data obtained from them can be used.

第1基準点受付決定手段12は、ユーザからの入力として、当該変換対象画像について、3次元座標で表された第1基準点空間座標を受け付ける。また、第1基準点受付決定手段12は、受け付けた第1基準点空間座標に対する決定信号を受け付けて、第1基準点空間座標を決定する。   The first reference point reception determination unit 12 receives first reference point space coordinates represented by three-dimensional coordinates for the conversion target image as an input from the user. The first reference point reception determination means 12 receives a determination signal for the received first reference point space coordinates, and determines the first reference point space coordinates.

第1基準点は、幾何変換の入力の基準となる点と出力の基準となる点のうち、入力側の基準点である。すなわち、第1基準点は、変換対象画像の座標系における位置情報(画像座標)によって表される基準点である。なお、基準点は、それぞれの変換対象画像に対して設定される。基準点は、例えば、変換画像で表現したい位置合わせ画像(例えば、注目物体の360度回転画像など)においてカメラの回転軸を構成する2以上の点であってもよい。   The first reference point is a reference point on the input side among points that serve as a reference for input of geometric transformation and points that serve as a reference for output. That is, the first reference point is a reference point represented by position information (image coordinates) in the coordinate system of the conversion target image. The reference point is set for each conversion target image. The reference point may be, for example, two or more points that constitute the rotation axis of the camera in an alignment image (for example, a 360-degree rotated image of the object of interest) that is desired to be represented by a converted image.

なお、カメラの回転軸は、実際に撮影した際のカメラの回転軸ではなく、目的とする位置合わせ画像においてユーザがカメラの移動の中心としたい軸である。また、基準点として必要な点の数(対応点数)は、幾何変換の方式に応じて設定可能であるが、いずれの方式においても2以上である。第2基準点は、出力側の基準点であり、第1基準点の変換先となる点である。すなわち、第2基準点は、変換画像の座標系における位置情報によって表される基準点である。第1基準点の各点と第2基準点の各点とは、同一の3次元座標が投影された画像座標であるという対応関係をもつ。また、位置合わせ画像の生成において、カメラの回転軸を構成する2以上の点のような、各変換対象画像間で同一の3次元座標を示す画像座標を基準点とすることがより望ましい。   Note that the rotation axis of the camera is not the rotation axis of the camera at the time of actual shooting, but the axis that the user wants to use as the center of camera movement in the target alignment image. Further, the number of points necessary as reference points (number of corresponding points) can be set according to the geometric transformation method, but is 2 or more in any method. The second reference point is a reference point on the output side, and is a point to which the first reference point is converted. That is, the second reference point is a reference point represented by position information in the coordinate system of the converted image. Each point of the first reference point and each point of the second reference point have a correspondence relationship that they are image coordinates on which the same three-dimensional coordinates are projected. Further, in the generation of the alignment image, it is more preferable that the image coordinates indicating the same three-dimensional coordinates between the conversion target images, such as two or more points constituting the rotation axis of the camera, be used as the reference point.

第1基準点空間座標射影手段13は、入力された第1基準点空間座標の情報と変換対象画像のカメラ位置姿勢とに基づいて、第1基準点空間座標(またはそれらを結んだ線分)を当該変換対象画像へ射影し、第1基準点として画像表示手段14に出力する。   The first reference point space coordinate projecting means 13 is configured to generate first reference point space coordinates (or a line segment connecting them) based on the input first reference point space coordinate information and the camera position and orientation of the conversion target image. Is projected onto the image to be converted and output to the image display means 14 as the first reference point.

第1基準点空間座標射影手段13は、例えば、画像表示手段14に表示される各変換対象画像に対して行われるユーザ操作に応じて、第1基準点空間座標の情報(位置情報等)を入力することによって、第1基準点空間座標を受け付けてもよい。第1基準点空間座標射影手段13は、例えば、受け付けた第1基準点空間座標を、カメラ位置姿勢推定手段11が推定したカメラ位置姿勢に基づいて画像座標に射影し、画像表示手段14を介して変換対象画像上に表示させる。   For example, the first reference point space coordinate projection unit 13 obtains information (position information and the like) of the first reference point space coordinates in accordance with a user operation performed on each conversion target image displayed on the image display unit 14. The first reference point space coordinates may be received by inputting. The first reference point space coordinate projecting means 13 projects the received first reference point space coordinates to image coordinates based on the camera position and orientation estimated by the camera position and orientation estimating means 11, for example, and passes through the image display means 14. To display on the image to be converted.

なお、第1基準点空間座標射影手段13は、第1基準点空間座標の情報が変更された場合には、その情報を基に変換対象画像上で第1基準点を移動させる。第1基準点空間座標の情報入力は、例えば、マウス等によるポインティングやキーボード等を介して行われる。第1基準点空間座標射影手段13は、最終的に、第1基準点決定信号(当該第1基準点決定信号の対象とする第1基準点を決定する旨を指示する情報)を受け付けることによって、そのときの第1基準点空間座標を第1基準点として決定すればよい。なお、第1基準点空間座標射影手段13は、第1基準点として少なくとも2点を決定する。   The first reference point space coordinate projection means 13 moves the first reference point on the conversion target image based on the information when the information of the first reference point space coordinate is changed. The information input of the first reference point space coordinates is performed, for example, through pointing with a mouse or the like or a keyboard. The first reference point space coordinate projecting means 13 finally receives a first reference point determination signal (information for instructing to determine the first reference point as a target of the first reference point determination signal). The first reference point space coordinates at that time may be determined as the first reference point. The first reference point space coordinate projection means 13 determines at least two points as the first reference point.

また、第1基準点空間座標射影手段13は、操作画面の描画領域に予め第1基準点空間座標の初期値として設定しておいた2点を射影し、表示した上で、その2点の位置をユーザに移動させてもよい。   The first reference point space coordinate projecting means 13 projects and displays two points set as initial values of the first reference point space coordinates in advance in the drawing area of the operation screen, and then displays the two points. The position may be moved to the user.

第1基準点空間座標射影手段13は、第1基準点を決定すると、決定した第1基準点を幾何変換手法決定手段16に出力する。   When the first reference point space coordinate projection unit 13 determines the first reference point, the first reference point space coordinate projection unit 13 outputs the determined first reference point to the geometric transformation method determination unit 16.

画像表示手段14は、画像を表示する。本実施形態では、画像表示手段14は、変換対象画像を表示したり、変換対象画像に第1基準点空間座標や後述する第2基準点変換元座標を重ねた画像を表示する。また、変換後の画像である変換画像の枠内に第2基準点を表示したり、変換画像を表示してもよい。画像表示手段14は、例えば、これらの表示を含む操作画面の画像情報を表示すればよい。   The image display means 14 displays an image. In the present embodiment, the image display means 14 displays a conversion target image, or displays an image in which first reference point space coordinates and second reference point conversion source coordinates described later are superimposed on the conversion target image. Further, the second reference point may be displayed within the frame of the converted image that is the image after conversion, or the converted image may be displayed. For example, the image display unit 14 may display image information of an operation screen including these displays.

第2基準点設定手段15は、カメラ位置姿勢と第2基準点変換元座標に基づいて、第1基準点の変換先である第2基準点を計算し、幾何変換手法決定手段16に出力する。また、第2基準点設定手段15は、第2基準点変換元座標決定信号を受け付けて第2基準点変換元座標を決定する。   The second reference point setting unit 15 calculates a second reference point that is a conversion destination of the first reference point based on the camera position and orientation and the second reference point conversion source coordinates, and outputs the second reference point to the geometric conversion method determination unit 16. . The second reference point setting unit 15 receives the second reference point conversion source coordinate determination signal and determines the second reference point conversion source coordinates.

第2基準点は、例えば、第1基準点が変換対象画像においてカメラの回転軸を構成する点(2以上)の位置を示す複数の画像座標である場合には、変換画像においてそのカメラの回転軸を構成する各点を投影したい位置を示す複数の画像座標とすればよい。   For example, when the first reference point is a plurality of image coordinates indicating the positions of points (two or more) constituting the rotation axis of the camera in the conversion target image, the rotation of the camera in the converted image is performed. What is necessary is just to set it as the some image coordinate which shows the position which projects each point which comprises an axis | shaft.

第2基準点変換元座標は、例えば、カメラが任意の位置姿勢であるときに回転軸を構成する各点の画像座標とすればよい。ただし、第2基準点設定手段15は、第2基準点変換元座標を設定したときとは異なるカメラ位置姿勢が入力されたときに、カメラ位置姿勢に基づいて第2基準点変換元座標から適切な第2基準点を設定する。   The second reference point conversion source coordinates may be, for example, the image coordinates of each point constituting the rotation axis when the camera is in an arbitrary position and orientation. However, the second reference point setting means 15 appropriately selects the second reference point conversion source coordinate based on the camera position and orientation when a camera position and orientation different from that when the second reference point conversion source coordinate is set is input. A second reference point is set.

第2基準点決定信号は、計算された第2基準点に対するユーザによる良否の判定を示す信号である。例えば、画像表示手段14を介して変換対象画像とともに第2基準点を表示し、ユーザは満足した場合に決定信号を入力する。第2基準点決定信号の情報入力は、例えば、マウス等によるポインティングやキーボード等を介して行われる。   The second reference point determination signal is a signal indicating whether the user has determined whether the second reference point is calculated or not. For example, the second reference point is displayed together with the conversion target image via the image display means 14, and the user inputs a determination signal when satisfied. Information input of the second reference point determination signal is performed, for example, through pointing with a mouse or the like, a keyboard, or the like.

なお、第2基準点変換元座標は、予め設定されていてもよい。第2基準点の各点は第1基準点の各点に対応づけて設定される。なお、予め設定される場合には、その設定情報の読み出しが、第2基準点変換元座標の入力に相当する。   Note that the second reference point conversion source coordinates may be set in advance. Each point of the second reference point is set in correspondence with each point of the first reference point. If preset, reading of the setting information corresponds to inputting the second reference point conversion source coordinates.

幾何変換手法決定手段16は、第1基準点空間座標射影手段13から出力される第1基準点と、第2基準点設定手段15から出力される第2基準点とに基づいて、各変換対象画像に施す幾何変換手法を決定する。具体的には、幾何変換手法決定手段16は、変換対象画像に施す幾何変換の変換式(座標変換式)のパラメータを決定する。幾何変換手法決定手段16は、例えば、予め設定された変換手法に従って、各変換対象画像に対して設定された必要な数の第1基準点および第2基準点を基に、当該変換手法において使用される所定の変換式(座標変換式)のパラメータを決定してもよい。幾何変換手法決定手段16は、決定したパラメータまたは決定したパラメータを含む座標変換式を、幾何変換手法を示す情報として幾何変換手段17に出力する。   Based on the first reference point output from the first reference point space coordinate projection means 13 and the second reference point output from the second reference point setting means 15, the geometric conversion method determination means 16 Determine the geometric transformation method to be applied to the image. Specifically, the geometric transformation method determination means 16 determines a parameter of a transformation formula (coordinate transformation formula) for geometric transformation to be applied to the transformation target image. The geometric transformation technique determination means 16 is used in the transformation technique based on a necessary number of first reference points and second reference points set for each conversion target image, for example, according to a preset transformation technique. A parameter of a predetermined conversion formula (coordinate conversion formula) may be determined. The geometric transformation technique determination means 16 outputs the decided parameter or a coordinate transformation formula including the decided parameter to the geometric transformation means 17 as information indicating the geometric transformation technique.

幾何変換手段17は、幾何変換手法決定手段16によって決定された幾何変換手法に基づいて各変換対象画像に幾何変換を施し、変換画像を出力する。幾何変換手段17は、例えば、幾何変換手法を示す情報として入力される座標変換式を用いて、変換対象画像の画素情報を変換することにより変換画像を得る。この変換処理は、変換後の画像座標に対して内挿を行い画素の欠損を補償する処理を含む。なお、幾何変換手段17が、幾何変換手法決定手段16の機能を含んで構成されてもよい。すなわち、幾何変換手法決定手段16は、幾何変換手段17に実装されていてもよい。   The geometric conversion unit 17 performs geometric conversion on each conversion target image based on the geometric conversion method determined by the geometric conversion method determination unit 16 and outputs a converted image. The geometric conversion unit 17 obtains a converted image by converting pixel information of the conversion target image using, for example, a coordinate conversion formula input as information indicating a geometric conversion method. This conversion process includes a process of interpolating the converted image coordinates to compensate for pixel loss. The geometric conversion unit 17 may be configured to include the function of the geometric conversion method determination unit 16. That is, the geometric transformation method determining unit 16 may be mounted on the geometric transformation unit 17.

第1基準点受付決定手段12および第2基準点設定手段15は、例えば、マウスやキーボード、タッチパネルなどの情報入力装置と、プログラムによって動作するCPU(Central Processing Unit )とによって実現される。また、画像表示手段14は、例えば、モニタやプロジェクタなどの画像表示装置と、プログラムに従って動作するCPUによって実現される。また、幾何変換手法決定手段16、幾何変換手段17は、例えば、特定の演算処理等を行うよう設計されたハードウェアや、プログラムに従って動作するCPUによって実現される。   The first reference point reception determination unit 12 and the second reference point setting unit 15 are realized by, for example, an information input device such as a mouse, a keyboard, and a touch panel, and a CPU (Central Processing Unit) operated by a program. Moreover, the image display means 14 is implement | achieved by CPU which operate | moves according to image display apparatuses, such as a monitor and a projector, and a program, for example. Further, the geometric transformation method determining means 16 and the geometric transformation means 17 are realized by, for example, hardware designed to perform specific arithmetic processing or the like, or a CPU that operates according to a program.

次に、本実施形態の動作について図2を参照して説明する。図2は、本実施形態の画像処理装置の動作の一例を示すフローチャートである。   Next, the operation of this embodiment will be described with reference to FIG. FIG. 2 is a flowchart showing an example of the operation of the image processing apparatus according to the present embodiment.

図2に示す例では、まず、カメラ位置姿勢推定手段11が、変換対象画像のカメラ位置姿勢を推定する(ステップS11)。本実施形態では、カメラ位置姿勢推定手段11は、入力された各変換対象画像についてカメラの位置姿勢を推定する。カメラ位置姿勢推定手段11は、例えば、撮影された画像情報から、カメラの位置として、ワールド座標系における3次元座標(X,Y,Z)を推定し、かつ、カメラの姿勢として、ワールド座標系に対する回転を表す3×3行列を推定する。   In the example shown in FIG. 2, first, the camera position / orientation estimation means 11 estimates the camera position / orientation of the conversion target image (step S11). In the present embodiment, the camera position / orientation estimation unit 11 estimates the position / orientation of the camera for each input conversion target image. The camera position / orientation estimation means 11 estimates, for example, the three-dimensional coordinates (X, Y, Z) in the world coordinate system as the camera position from the captured image information, and uses the world coordinate system as the camera attitude. Estimate a 3 × 3 matrix representing the rotation with respect to.

次に、第1基準点受付決定手段12は、少なくとも1つの画像に対する第1基準点空間座標の情報として、変換対象画像においてカメラの回転軸の候補を構成する複数の3次元座標を入力する(ステップS12)。第1基準点受付決定手段12は、例えば、使用する幾何変換式で必要な対応点数分の第1基準点空間座標の情報入力用の入力フィールドを含む操作画面を表示して、ユーザに第1基準点空間座標の情報を入力させてもよいし、予め設定されている初期値を読み込むことによって、第1基準点空間座標の情報を得てもよい。そして、入力された第1基準点空間座標の情報は、第1基準点空間座標射影手段13に出力される。   Next, the first reference point acceptance determination means 12 inputs a plurality of three-dimensional coordinates constituting the rotation axis candidates of the camera in the conversion target image as information on the first reference point space coordinates for at least one image ( Step S12). For example, the first reference point reception determination unit 12 displays an operation screen including an input field for inputting information on the first reference point space coordinates corresponding to the number of corresponding points necessary for the geometric conversion formula to be used, and displays the first screen to the user. Reference point space coordinate information may be input, or first reference point space coordinate information may be obtained by reading a preset initial value. Then, the inputted information on the first reference point space coordinate is output to the first reference point space coordinate projecting means 13.

第1基準点空間座標射影手段13は、ある変換対象画像に対する第1基準点空間座標の情報が入力されると、入力された第1基準点空間座標をカメラ位置姿勢に基づき画像に射影し、第1基準点とする(ステップS13)。   The first reference point space coordinate projecting means 13 projects the input first reference point space coordinates on the image based on the camera position and orientation when information on the first reference point space coordinates for a certain conversion target image is input. The first reference point is set (step S13).

次に、画像表示手段14が、第1基準点とその画像とを重ねて表示する(ステップS14)。画像表示手段14は、例えば、変換対象画像上で第1基準点の位置等を調節するための操作画面を表示する。画像表示手段14は、複数の第1基準点を結ぶことによって画像上に射影した回転軸(線分)を生成したものを含む操作画面を表示してもよい。   Next, the image display means 14 displays the first reference point and the image so as to overlap each other (step S14). For example, the image display unit 14 displays an operation screen for adjusting the position of the first reference point on the conversion target image. The image display means 14 may display an operation screen including a rotation axis (line segment) projected on the image by connecting a plurality of first reference points.

ユーザは、ステップS14の処理で表示された第1基準点の変換対象画像における位置等を確認し、満足すれば第1基準点決定信号を入力する。また、ユーザは、複数の第1基準点を結んだ線分の長さ、傾き、位置がカメラの回転軸として適切となるように、第1基準点の位置を移動させるなどの調節を行う。このとき、第1基準点の情報が変更される。なお、第1基準点の情報として第1基準点空間座標を直接変更し、再度射影させてもよい。第1基準点決定信号は、第1基準点受付決定手段12および第1基準点空間座標射影手段13に入力される。   The user confirms the position of the first reference point displayed in the process of step S14 in the conversion target image, and inputs the first reference point determination signal if satisfied. In addition, the user performs adjustment such as moving the position of the first reference point so that the length, inclination, and position of the line segment connecting the plurality of first reference points are appropriate as the rotation axis of the camera. At this time, the information on the first reference point is changed. Note that the first reference point space coordinates may be directly changed as the information of the first reference point and projected again. The first reference point determination signal is input to the first reference point reception determination unit 12 and the first reference point space coordinate projection unit 13.

第1基準点受付決定手段12または第1基準点空間座標射影手段13は、第1基準点決定信号を受け付けると、第1基準点空間座標に対応する第1基準点を決定する(ステップS15)。第1基準点受付決定手段12または第1基準点空間座標射影手段13は、例えば、当該第1基準点決定信号の対象とされた第1基準点として、そのとき表示している第1基準点(より具体的には、第1基準点を結んだ線分)を選択してもよい。本実施形態では、1つの変換対象画像について第1基準点空間座標から第1基準点が決定されると、その第1基準点空間座標を表す3次元座標が決定されることになり、その3次元座標と各画像のカメラ位置姿勢とに基づいて、他の変換対象画像についても第1基準点を算出することができる。   When receiving the first reference point determination signal, the first reference point reception determining unit 12 or the first reference point space coordinate projecting unit 13 determines the first reference point corresponding to the first reference point space coordinate (step S15). . The first reference point reception determination means 12 or the first reference point space coordinate projection means 13 is, for example, the first reference point displayed at that time as the first reference point that is the target of the first reference point determination signal. (More specifically, a line segment connecting the first reference points) may be selected. In the present embodiment, when the first reference point is determined from the first reference point space coordinates for one conversion target image, three-dimensional coordinates representing the first reference point space coordinates are determined. Based on the dimensional coordinates and the camera position and orientation of each image, the first reference point can be calculated for other conversion target images.

次いで、第2基準点設定手段15は、第2基準点変換元座標を入力する(ステップS16)。第2基準点設定手段15は、予め設定されている第2基準点変換元座標の情報を記憶手段等から読み出すことによって第2基準点変換元座標を入力してもよい。また、第2基準点設定手段15は、第1基準点受付決定手段12が用いた方法と同様の方法で、すなわち、ユーザから第2基準点変換元座標の情報を受け付けることによって、第2基準点変換元座標を入力してもよい。   Next, the second reference point setting means 15 inputs the second reference point conversion source coordinates (step S16). The second reference point setting means 15 may input the second reference point conversion source coordinates by reading information on the preset second reference point conversion source coordinates from the storage means or the like. Further, the second reference point setting means 15 is the same as the method used by the first reference point reception determination means 12, that is, by receiving information on the second reference point conversion source coordinates from the user, Point conversion source coordinates may be input.

第2基準点設定手段15は、第2基準点変換元座標を受け付けると、カメラ位置姿勢に基づいて第2基準点を設定する(ステップS17)。   When receiving the second reference point conversion source coordinates, the second reference point setting means 15 sets the second reference point based on the camera position and orientation (step S17).

次に、画像表示手段14が、第1基準点と第2基準点と変換対象画像とを重ねて表示する(ステップS18)。画像表示手段14は、ステップS14の処理と同様に、変換対象画像上で第2基準点の位置等を調節するための操作画面を表示してもよい。また、画像表示手段14は、第1基準点と第2基準点の両方、もしくは片方のみを表示してもよい。   Next, the image display unit 14 displays the first reference point, the second reference point, and the conversion target image in an overlapping manner (step S18). The image display unit 14 may display an operation screen for adjusting the position or the like of the second reference point on the conversion target image, as in the process of step S14. Further, the image display means 14 may display both or only one of the first reference point and the second reference point.

ユーザは、表示された第2基準点が適切であると判断した場合、第2基準点変換元座標決定信号を入力する(ステップS19)。本実施形態では、1つの変換対象画像について第2基準点変換元座標が決定されると、第2基準点を設定する元となる画像座標が決定されることになり、その画像座標と各画像のカメラ位置姿勢に基づいて、他の変換対象画像についても第2基準点を算出することができる。また、ステップS15の第1基準点決定信号を、ステップS19の処理で受け付けることも可能である。   When the user determines that the displayed second reference point is appropriate, the user inputs a second reference point conversion source coordinate determination signal (step S19). In the present embodiment, when the second reference point conversion source coordinates are determined for one conversion target image, the image coordinates from which the second reference points are set are determined, and the image coordinates and each image are determined. The second reference point can be calculated for other conversion target images based on the camera position and orientation. In addition, the first reference point determination signal in step S15 can be received in the process in step S19.

各変換対象画像に対して必要な対応点数分の第1基準点と第2基準点とが決まると、幾何変換手法決定手段16は、第1基準点と第2基準点とから、各変換対象画像に対して施す幾何変換手法を決定する(ステップS20)。幾何変換手法決定手段16は、例えば、基準点の数やそれらの画像における位置(画像座標)に基づいて、各変換対象画像に施す幾何変換の変換式のパラメータを決定することにより、変換式を生成する。   When the first reference points and the second reference points corresponding to the number of corresponding points required for each conversion target image are determined, the geometric conversion method determining means 16 determines each conversion target from the first reference point and the second reference point. A geometric transformation method to be applied to the image is determined (step S20). The geometric transformation method determining means 16 determines the transformation formula by determining the parameters of the transformation formula of the geometric transformation to be applied to each transformation target image based on, for example, the number of reference points and the positions (image coordinates) in those images. Generate.

最後に、幾何変換手段17は、ステップS20の処理で決定された変換手法(変換式)を用いて各変換対象画像に幾何変換を施し、その結果生成される画像を変換画像として出力する(ステップS21)。   Finally, the geometric conversion means 17 performs geometric conversion on each conversion target image using the conversion method (conversion formula) determined in step S20, and outputs the resulting image as a converted image (step). S21).

なお、本実施形態では、各ステップにおいて、複数ある変換対象画像全てに対して処理が行われるが、図2に例示する処理を1つの変換対象画像に対する一連の処理として実行することも可能である。そのような場合には、変換対象画像の数分上記ステップ(ステップS11〜S21)を繰り返せばよい。   In this embodiment, processing is performed for all the plurality of conversion target images in each step. However, the processing illustrated in FIG. 2 can be performed as a series of processing for one conversion target image. . In such a case, the above steps (steps S11 to S21) may be repeated for the number of conversion target images.

また、ステップS16、ステップS18、ステップS19については、変換対象画像群のうちのいずれかの画像に対して既に処理済みであれば、他の変換対象画像についての当該処理を省略することができる。ユーザに第2基準点変換元座標を改めて入力させなくても、ステップS17で当該変換対象画像における第2基準点を求めることができるからである。つまり、ある変換対象画像について第2基準点変換元座標を一度決定すれば、画像毎のカメラ位置姿勢に基づき、画像毎の第2基準点は一意に定まるからである。   In addition, with regard to step S16, step S18, and step S19, if processing has already been performed on any image in the conversion target image group, the processing for other conversion target images can be omitted. This is because the second reference point in the conversion target image can be obtained in step S17 without requiring the user to input the second reference point conversion source coordinates again. That is, once the second reference point conversion source coordinates are determined for a certain conversion target image, the second reference point for each image is uniquely determined based on the camera position and orientation for each image.

また、本実施形態において、各手段は、例えば、特定の演算処理等を行うよう設計されたハードウェアや、プログラムに従って動作するCPUによって実現される。   In the present embodiment, each unit is realized by, for example, hardware designed to perform specific arithmetic processing or the like, or a CPU that operates according to a program.

以下、具体的な実施例を説明する。図3は、第1の実施例において変換対象画像に施す幾何変換の概要を示す説明図である。図3に示す例では、カメラは下から上方向に向かって撮影を行う。{画像1,・・・,画像m,・・・,画像n,・・・}が変換対象画像として入力される。   Hereinafter, specific examples will be described. FIG. 3 is an explanatory diagram showing an outline of the geometric transformation performed on the transformation target image in the first embodiment. In the example illustrated in FIG. 3, the camera performs shooting from the bottom to the top. {Image 1,..., Image m,..., Image n,.

一例として、第1基準点空間座標を、3次元空間において、地面に垂直で注目物体の重心を通る線分(上端の3次元座標をq1、下端の3次元座標をq2)とし、第1基準点を、変換対象画像中における第1基準点空間座標を構成する2点の画像座標(当該変換対象画像軸における座標)とする。   As an example, the first reference point space coordinate is a line segment perpendicular to the ground and passing through the center of gravity of the object of interest in the three-dimensional space (the top three-dimensional coordinate is q1 and the bottom three-dimensional coordinate is q2). The points are set as the image coordinates (coordinates on the conversion target image axis) of two points constituting the first reference point space coordinates in the conversion target image.

また、{画像1,・・・,画像m,・・・,画像n,・・・}を撮影したカメラの位置を{t1、・・・、tm、・・・、tn、・・・}、カメラの姿勢を{R1、・・・、Rm、・・・、Rn、・・・}とする。カメラの位置tは、例えば、ワールド座標系における3次元座標である。カメラの姿勢Rは、例えば、ワールド座標系に対する回転を表す3×3行列である。   In addition, the positions of the cameras that photographed {image 1, ..., image m, ..., image n, ...} are represented by {t1, ..., tm, ..., tn, ...}. , The camera posture is {R1,..., Rm,..., Rn,. The camera position t is, for example, a three-dimensional coordinate in the world coordinate system. The camera posture R is, for example, a 3 × 3 matrix representing rotation with respect to the world coordinate system.

図3において、上段の変換対象画像(画像1、m、n)上に記された◇印と×印は、その変換対象画像に対して設定された第1基準点(◇印が上端、×印が下端)を表す。なお、◇印の方を第1基準点の第1の点(上端基準点)とし、×印を第1基準点の第2の点(下端基準点)とする。また、下段の変換画像1,m,nに記された◇印と×印は、変換対象画像1,m,nに対して設定された第1基準点の変換先である第2基準点を表す。   In FIG. 3, the ◇ mark and the X mark written on the upper conversion target image (images 1, m, n) are the first reference points set for the conversion target image (the ◇ mark is the upper end, × Represents the lower end). The symbol ◇ is the first point (first reference point) of the first reference point, and the symbol X is the second point (lower reference point) of the first reference point. Also, the ◇ and x marks on the lower converted images 1, m, n indicate the second reference point that is the conversion destination of the first reference point set for the conversion target images 1, m, n. Represent.

なお、図3では、第1基準点を”P1”、第2基準点を”P2”と表し、つづく[A][B]の添字で、A=画像のインデックスとB=基準点のインデックスが表わされている。図3に示す例では、インデックスは、ともに1から始まる値で示されている。例えば、P1[1][1]は、第1の変換対象画像(画像1)における第1基準点のうちの第1の点(上端基準点)の情報である画像座標を表す。P1[1][2]は、画像1における第1基準点のうちの第2の点(下端基準点)の情報である画像座標を表す。   In FIG. 3, the first reference point is represented as “P1”, the second reference point is represented as “P2”, and the subscripts [A] and [B] are used, where A = image index and B = reference point index. It is represented. In the example shown in FIG. 3, the indexes are indicated by values starting from 1. For example, P1 [1] [1] represents image coordinates that are information of the first point (upper reference point) among the first reference points in the first conversion target image (image 1). P1 [1] [2] represents image coordinates which are information of the second point (lower end reference point) of the first reference points in the image 1.

また、例えばP2[m][1]は、第mの変換対象画像(画像m)から生成される変換画像mにおける第2基準点の第1の点(上端基準点)の情報である画像座標を表す。P2[m][2]は、画像mから生成される変換画像mにおける第2基準点の第2の点(下端基準点)の情報である画像座標を表す。   Further, for example, P2 [m] [1] is an image coordinate that is information on the first point (upper reference point) of the second reference point in the converted image m generated from the mth conversion target image (image m). Represents. P2 [m] [2] represents image coordinates which are information of the second point (lower end reference point) of the second reference point in the converted image m generated from the image m.

本実施例では、まず、カメラ位置姿勢推定手段11は、変換対象画像それぞれについて、その画像を撮影したカメラ位置姿勢を推定する。カメラ位置姿勢推定手段11は、例えば、紙などに印刷するなどして事前に登録したマーカの画像上の見え方に基づいてカメラの位置tおよび姿勢Rを推定する。また、カメラ位置姿勢推定手段11は、例えば、既知の3次元座標とそれが観測された画像座標との対応点の複数の組み合わせからカメラの位置tおよび姿勢Rを推定する。なお、カメラの姿勢Rは、ロール・ピッチ・ヨーによる表現によれば、以下の式(1)のように表現される。また、4元数による表現によれば、以下の式(2)のように表現される。   In the present embodiment, first, the camera position / orientation estimation unit 11 estimates the camera position / orientation of each of the conversion target images by capturing the image. The camera position / orientation estimation means 11 estimates the camera position t and orientation R based on the appearance of the marker on the image registered in advance, for example, by printing on paper or the like. Further, the camera position / orientation estimation means 11 estimates the camera position t and orientation R from a plurality of combinations of corresponding points of known three-dimensional coordinates and image coordinates at which they are observed, for example. The posture R of the camera is expressed by the following expression (1) according to the expression by roll, pitch, and yaw. Moreover, according to the expression by the quaternion, it is expressed as the following expression (2).

Figure 2013105205
Figure 2013105205

なお、φはZ軸回りの回転(roll)を表し、θは新しいY軸回りの回転(pitch )を表し、ψは新しいX軸回りの回転(yaw )を表す。   Φ represents rotation about the Z axis (roll), θ represents new rotation about the Y axis (pitch), and ψ represents rotation about the new X axis (yaw).

Figure 2013105205
Figure 2013105205

また、カメラに加速度センサやジャイロセンサ等のセンサが内蔵または装着され、別途センサ類を用意する必要がない場合、それらから得られるデータをカメラ位置推定に利用できる。例えば、加速度センサから得られる角加速度を時間方向に2度積分することによって、カメラ位置tを推定できる。また、ジャイロセンサから得られる角速度を時間方向に積分することによって、カメラ姿勢Rを推定できる。また、加速度センサやジャイロセンサと変換対象画像を併用してカメラ位置推定を行う方法が上記の特許文献4に記載されている。   In addition, when a sensor such as an acceleration sensor or a gyro sensor is built in or attached to the camera and it is not necessary to separately prepare sensors, data obtained from them can be used for camera position estimation. For example, the camera position t can be estimated by integrating the angular acceleration obtained from the acceleration sensor twice in the time direction. Further, the camera posture R can be estimated by integrating the angular velocity obtained from the gyro sensor in the time direction. Further, Patent Document 4 discloses a method for estimating a camera position by using an acceleration sensor or a gyro sensor together with a conversion target image.

次に、第1基準点受付決定手段12は、第1基準点空間座標をユーザから入力として受け付け、第1基準点空間座標射影手段13に出力する。   Next, the first reference point reception determination unit 12 receives the first reference point space coordinates as an input from the user, and outputs the first reference point space coordinates to the first reference point space coordinate projection unit 13.

第1基準点空間座標射影手段13は、カメラ位置姿勢と第1基準点空間座標に基づいて、第1基準点を計算し、画像表示手段14に第1基準点を出力する。   The first reference point space coordinate projection means 13 calculates a first reference point based on the camera position and orientation and the first reference point space coordinates, and outputs the first reference point to the image display means 14.

第1基準点は、以下の式(3)で求めることができる。   The first reference point can be obtained by the following equation (3).

Figure 2013105205
Figure 2013105205

K[R−Rt]Xの左側の符合は、定数倍に等しいことを表す。なお、添字のは、行列の転置を表す。また、Kはカメラの内部パラメータである。Kは、例えば、射影変換を利用してカメラの内部パラメータを推定する方法(例えば、Zhang らの手法)を用いて予め決定されていてもよいし、3枚以上の画像からカメラの内部パラメータを推定する方法(例えば、Pollefeys らの手法)を用いて撮影と同時に求められてもよい。カメラの内部パラメータを推定する場合、カメラ位置姿勢推定手段11は、カメラ位置姿勢に加え、カメラの内部パラメータを第1基準点空間座標射影手段13に出力する。The sign on the left side of K [R T −R T t] X i represents equal to a constant multiple. Note that the subscript T represents transposition of the matrix. K is an internal parameter of the camera. K may be determined in advance using, for example, a method of estimating camera internal parameters using projective transformation (for example, the method of Zhang et al.), Or the camera internal parameters may be calculated from three or more images. An estimation method (for example, the method of Pollefeys et al.) May be used at the same time as shooting. When estimating the camera internal parameters, the camera position / posture estimation means 11 outputs the camera internal parameters to the first reference point space coordinate projection means 13 in addition to the camera position / posture.

ユーザは、画像表示手段14に表示された変換対象画像と第1基準点を見ながら、マウスやキーボードなどを用いて第1基準点空間座標(q1とq2の3次元座標)を入力する。ユーザは、例えば、第1基準点空間座標の第1の点(上端基準点)の初期値として3次元座標(0,0,0)を、第2の点(下端基準点)の初期値として3次元座標(0,1,0)を入力する。   The user inputs first reference point space coordinates (three-dimensional coordinates of q1 and q2) using a mouse or a keyboard while viewing the conversion target image displayed on the image display means 14 and the first reference point. The user, for example, uses the three-dimensional coordinate (0, 0, 0) as the initial value of the first point (upper reference point) of the first reference point space coordinates as the initial value of the second point (lower reference point). Enter three-dimensional coordinates (0, 1, 0).

画像表示手段14は、当該画像表示手段14が有するモニタやプロジェクタなどの画像表示装置を介して、変換対象画像として入力された注目物体を含む画像を表示する。このとき、画像表示手段14は、変換対象画像と、ツールバー、カーソル等の入力用インタフェースとを含む操作画面を表示する。   The image display unit 14 displays an image including the target object input as the conversion target image via an image display device such as a monitor or a projector included in the image display unit 14. At this time, the image display means 14 displays an operation screen including the conversion target image and an input interface such as a toolbar or a cursor.

ユーザは、画像表示手段14に表示された第1基準点と注目物体とを比較し、第1基準点を結んだ線分の長さ、傾き、位置がカメラの回転軸として適切となるように第1基準点空間座標を調節し、満足すれば第1基準点決定信号を入力する。   The user compares the first reference point displayed on the image display unit 14 with the object of interest so that the length, inclination, and position of the line segment connecting the first reference point are appropriate as the rotation axis of the camera. The first reference point space coordinates are adjusted, and if satisfied, a first reference point determination signal is input.

第1基準点受付決定手段12は、例えば、現在表示中の画像#1に対する第1基準点空間座標の情報(q1とq2の3次元座標)をユーザから入力として受け付ける。このとき、画像表示手段14は、入力された第1基準点を変換対象画像に重ねて表示するなどして、ユーザがその変換対象画像における第1基準点空間座標の位置を確認できるようにする。ユーザは、表示された変換対象画像に対する第1基準点の位置等を確認し、現在表示されている第1基準点に満足した場合には、第1基準点決定信号を入力する。なお、ユーザは、位置関係が満足できなければ、マウスやキーボードなどを用いてツールバー、カーソル等の入力用インタフェースを操作して、第1基準点空間座標の有効/無効を切り替えたり、位置を調節すればよい。   The first reference point reception determination means 12 receives, for example, information on the first reference point space coordinates (three-dimensional coordinates of q1 and q2) for the currently displayed image # 1 as an input from the user. At this time, the image display means 14 displays the input first reference point on the conversion target image so that the user can confirm the position of the first reference point space coordinates in the conversion target image. . The user confirms the position and the like of the first reference point with respect to the displayed conversion target image, and inputs a first reference point determination signal when satisfied with the currently displayed first reference point. If the positional relationship is not satisfied, the user operates the input interface such as a toolbar or a cursor by using a mouse or a keyboard to switch validity / invalidity of the first reference point space coordinate or adjust the position. do it.

第1基準点決定信号が入力されると、第1基準点空間座標射影手段13は、第1基準点空間座標が射影された画像座標を第1基準点とし、幾何変換手法決定手段16に出力する。   When the first reference point determination signal is input, the first reference point space coordinate projection means 13 sets the image coordinates on which the first reference point space coordinates are projected as the first reference point, and outputs the image coordinates to the geometric transformation technique determination means 16. To do.

次に、第2基準点設定手段15は、第2基準点変換元座標とカメラ位置姿勢に基づいて、第1基準点の変換先である第2基準点を設定する。本実施例では、ユーザがマウスやキーボードなどを用いて第2基準点変換元座標を入力し、第2基準点変換元座標とカメラ位置姿勢に基づいて第2基準点を設定する。本実施例において、ユーザは、計算された第2基準点に満足すれば第2基準点決定信号を入力し、それ以降の第2基準点変換元座標の入力は省略される。   Next, the second reference point setting unit 15 sets a second reference point that is a conversion destination of the first reference point, based on the second reference point conversion source coordinates and the camera position and orientation. In this embodiment, the user inputs the second reference point conversion source coordinates using a mouse, a keyboard, or the like, and sets the second reference point based on the second reference point conversion source coordinates and the camera position and orientation. In the present embodiment, if the user is satisfied with the calculated second reference point, the user inputs a second reference point determination signal, and the subsequent input of the second reference point conversion source coordinates is omitted.

以下、変換画像の幅をw画素、高さをh画素とする。   Hereinafter, the width of the converted image is w pixels and the height is h pixels.

ユーザは、例えば、注目物体を正面から撮影した場合(図3のカメラ位置t1)に、幾何変換後の注目物体が横方向の中央、注目物体の重心gが画像の中央(0.5w、0.5h)に位置し、縦方向の8割の長さであるように第2基準点変換元座標を入力する。例えば、第2基準点変換元座標の上端基準点の画像座標を(0.5w,0.9h)とし、下端基準点の画像座標を(0.5w,0.1h)とする。または、上記の設定を事前に決めておき、このような第2基準点変換元座標の情報を外部記録媒体等の記憶手段から読み込んでもよい。   For example, when the user has photographed the target object from the front (camera position t1 in FIG. 3), the target object after geometric transformation is the center in the horizontal direction, and the center of gravity g of the target object is the center of the image (0.5w, 0). .2h) and input the second reference point conversion source coordinates so that the length is 80% in the vertical direction. For example, the image coordinates of the upper reference point of the second reference point conversion source coordinates are (0.5 w, 0.9 h), and the image coordinates of the lower reference point are (0.5 w, 0.1 h). Alternatively, the above setting may be determined in advance, and information on the second reference point conversion source coordinates may be read from a storage unit such as an external recording medium.

例えば、変換対象画像が、注目物体を斜めから撮影した場合(図3のカメラ位置tm)、t1からtmへ高さが上昇した割合に応じて、変換画像の注目物体が縮小されるように第2基準点の上端基準点と下端基準点を計算すればよい。   For example, when the conversion target image is obtained by photographing the target object from an oblique direction (camera position tm in FIG. 3), the conversion target image is reduced so that the target object of the converted image is reduced in accordance with the rate of height increase from t1 to tm. What is necessary is just to calculate the upper end reference point and the lower end reference point of two reference points.

計算例を、図4を用いて説明する。まず、注目物体の重心gは、q1とq2の中点であると仮定し、その3次元座標をg=(q1+q2)/2とする。重心gを原点とした球座標系におけるカメラ位置は、tm’=tm-gと表される。   A calculation example will be described with reference to FIG. First, it is assumed that the center of gravity g of the object of interest is the midpoint between q1 and q2, and its three-dimensional coordinate is g = (q1 + q2) / 2. The camera position in the spherical coordinate system with the center of gravity g as the origin is expressed as tm ′ = tm−g.

次に、第1基準点空間座標の長さL0=|q1-q2|は、tm' において見かけの長さLmとして式(4)で表される。Next, the length L 0 = | q1-q2 | of the first reference point space coordinates is expressed by Expression (4) as an apparent length L m at tm ′.

Figure 2013105205
Figure 2013105205

θは、図5に示すような、重心gを座標系の中心としたtm' の偏角である。L0の画像座標系における長さは、l0=0.9h-0.1h=0.8h であるため、Liの画像座標系における長さは、lm=0.8h*cosθ である。θ is a declination of tm ′ with the center of gravity g as the center of the coordinate system as shown in FIG. Since the length of L 0 in the image coordinate system is l 0 = 0.9h−0.1h = 0.8h, the length of Li in the image coordinate system is l m = 0.8 h * cos θ.

よって、カメラ位置tmで撮影された画像mにおける第2基準点は、上端基準点P2[m][1] =(0.5w 、0.5h+0.5lm)、下端基準点P2[m][2] =(0.5w 、0.5h-0.5lm)として計算される。Therefore, the second reference point in the image m taken at the camera position tm is the upper reference point P2 [m] [1] = (0.5w, 0.5h + 0.5l m ), and the lower reference point P2 [m] [2 ] = (0.5w, 0.5h-0.5l m )

なお、ここでは、カメラ位置姿勢に応じて第2基準点を動的に計算する方法が示されたが、上記計算を事前に行なっておき、第2基準点の情報を外部記録媒体等の記憶手段から読み込み、出力してもよい。例えば、適当な間隔でカメラ位置姿勢を量子化し、それらに対して式(4)に基づいてl0を事前に計算しておき、記憶手段にルックアップテーブルとして記憶する。そして、入力されたカメラ位置姿勢にもっとも近いテーブルからloを読み込み、出力する。記憶手段から読み込む場合、入力毎の式(4)の計算を省略することができる。Although the method for dynamically calculating the second reference point according to the camera position and orientation is shown here, the above calculation is performed in advance and information on the second reference point is stored in an external recording medium or the like. It may be read from the means and output. For example, the camera position and orientation are quantized at an appropriate interval, and l 0 is calculated in advance based on the camera position and orientation based on Equation (4) and stored as a lookup table in the storage means. Then, lo is read from the table closest to the input camera position and orientation and output. When reading from the storage means, the calculation of equation (4) for each input can be omitted.

また、第2基準点を動的に計算する方法と記憶手段から読み込む方法を組み合わせてもよい。例えば、まず記憶手段から読み込む方法により第2基準点を出力し、ユーザがより高精度な第2基準点を要求した場合、動的に計算する方法に切り替えてもよい。逆に、まず動的に計算する方法で第2基準点を出力し、ユーザがより低精度を要求した場合、記憶手段から読み込む方法に切り替えてもよい。   Further, the method of dynamically calculating the second reference point and the method of reading from the storage means may be combined. For example, when the second reference point is first output by a method of reading from the storage unit and the user requests a second reference point with higher accuracy, the method may be switched to a method of dynamically calculating. Conversely, the second reference point may be first output by a method of dynamic calculation, and when the user requests lower accuracy, the method may be switched to a method of reading from the storage means.

また、ユーザによる要求がない場合、計算機の性能や記憶手段の容量に応じて切り替えてもよい。例えば、本実施例の画像処理装置の起動時に記憶手段の容量を確認し、ルックアップテーブルの確保が困難である場合、動的に計算する方法を用いてもよい。   Moreover, when there is no request | requirement by a user, you may switch according to the performance of a computer, or the capacity | capacitance of a memory | storage means. For example, when the image processing apparatus according to the present exemplary embodiment is activated, the capacity of the storage unit is confirmed, and when it is difficult to secure a lookup table, a method of dynamically calculating may be used.

また、本実施例の画像処理装置の動作中に何らかの要因により記憶手段の容量を増やす必要が出た場合、ルックアップテーブルを解放し動的に計算する方法に切り替えてもよい。   Further, when it is necessary to increase the capacity of the storage means for some reason during the operation of the image processing apparatus according to the present embodiment, the method may be switched to a method in which the lookup table is released and dynamically calculated.

次に、幾何変換手法決定手段16は、第1基準点と第2基準点からの幾何変換手法を決定し、幾何変換手段17に出力する。本実施例では第1基準点、第2基準点でそれぞれ2点が選択されているので、幾何変換手法決定手段16は、相似変換を利用する。相似変換は以下の式(5)で与えられる。   Next, the geometric transformation method determination unit 16 determines a geometric transformation method based on the first reference point and the second reference point, and outputs the geometric transformation method to the geometric conversion unit 17. In the present embodiment, since two points are selected as the first reference point and the second reference point, the geometric transformation method determining means 16 uses similarity transformation. The similarity transformation is given by the following equation (5).

’=au−bv+c
’=bu+av+d・・・式(5)
u i '= au i −bv i + c
v i ′ = bu i + av i + d (5)

(u,v)は処理対象とした変換対象画像における第1基準点の上端基準点P1[m][1]と下端基準点P1[m][2]を表し、(u’,v’)は処理対象とした変換対象画像から生成される変換画像における第2基準点の上端基準点P2[m][1]と下端基準点P2[m][2]を表す。また、(a,b,c,d)は相似変換パラメータである。添字のiはi=1で第1の点(上端基準点)を、i=2で第2の点(下端基準点)を表す。(U i , v i ) represents the upper reference point P1 [m] [1] and the lower reference point P1 [m] [2] of the first reference point in the conversion target image to be processed, and (u i , v i ′) represents the upper reference point P2 [m] [1] and the lower reference point P2 [m] [2] of the second reference point in the converted image generated from the conversion target image to be processed. Further, (a, b, c, d) are similarity transformation parameters. The subscript i represents the first point (upper reference point) when i = 1, and the second point (lower reference point) when i = 2.

幾何変換手法決定手段16は、第1基準点と第2基準点の点数がそれぞれ2点である場合は、式(5)の(a,b,c,d)についての線形な連立方程式を解くと(a,b,c,d)を得ることができる。   The geometric transformation method determining means 16 solves the linear simultaneous equations for (a, b, c, d) in the equation (5) when the number of points of the first reference point and the second reference point is 2, respectively. And (a, b, c, d) can be obtained.

また、幾何変換手法決定手段16は、第1基準点と第2基準点の点数がそれぞれ3点以上である場合は、(a,b,c,d)の最小二乗解を求める。   Further, when the number of points of the first reference point and the second reference point is 3 or more, the geometric transformation method determination means 16 obtains a least square solution of (a, b, c, d).

なお、幾何変換手法決定手段16は、相似変換パラメータを幾何変換手段17を出力してもよいが、相似変換式を出力してもよい。   The geometric transformation method determining means 16 may output the similarity transformation parameters to the geometric transformation means 17 or may output a similarity transformation expression.

幾何変換手段17は、このようにして得られた相似変換パラメータ(a,b,c,d)を用いて、処理対象とした変換対象画像に幾何変換を施し、変換画像を出力する。本実施例では、得られた相似変換パラメータを式(5)に代入し、画像の全画素に対して実行することで相似変換が施された画像を得ることができる。ここで、変換後の画像座標は一般に整数値にならないため、幾何変換手段17は、内挿を行いて画素の欠損を補償する。内挿の手法には、内挿点に最も近い観測点の画素値を内挿点の画素値とする方法である最近隣法や、内挿点周囲の観測点4点の画素値の線形補間を内挿点の画素値とする方法であるバイリニア法など様々な手法が利用可能である。幾何変換手段17は、相似変換が施された画像を変換画像として出力する。   The geometric conversion means 17 performs geometric conversion on the conversion target image to be processed using the similarity conversion parameters (a, b, c, d) thus obtained, and outputs a converted image. In the present embodiment, the obtained similarity transformation parameter is substituted into the equation (5), and an image subjected to the similarity transformation can be obtained by executing it on all the pixels of the image. Here, since the image coordinates after conversion generally do not become integer values, the geometric conversion means 17 performs interpolation to compensate for pixel loss. Interpolation methods include a nearest neighbor method that uses the pixel value of the observation point closest to the interpolation point as the pixel value of the interpolation point, and linear interpolation of the pixel values of the four observation points around the interpolation point. Various methods such as a bilinear method, which is a method of setting the pixel value of the interpolation point, can be used. The geometric transformation means 17 outputs the image subjected to the similarity transformation as a transformed image.

以上のように、本実施形態では、上下左右方向に自由に撮影した画像群から、簡単なユーザ操作により、回転台やカメラに内蔵または装着されていない加速度センサなどの機材がなくても単一のカメラで位置合わせ画像を生成することができる。   As described above, in the present embodiment, a single user operation can be performed from a group of images photographed freely in the up / down / left / right directions even without equipment such as an accelerometer built in or attached to a turntable or camera. An alignment image can be generated with the camera.

その理由は、注目物体を含む複数の画像のそれぞれについて、カメラの回転軸を構成する複数の3次元座標をユーザに指定させ、指定された3次元座標の画像座標系における長さを撮影したカメラ位置に応じて計算し、3次元座標の重心が複数の画像において一致するように幾何変換を施すためである。また、画像情報のみを利用して幾何変換パラメータを算出することによって、撮影時にカメラ以外の機材を不要としたためである。また、ユーザは第1基準点と第2基準点を1度だけ決定すればよい。その理由は、第1基準点と第2基準点を一度決定すれば、画像毎のカメラ位置姿勢に基づき、第1基準点と第2基準点は一意に定まるためである。   The reason is that, for each of a plurality of images including the target object, the user designates a plurality of three-dimensional coordinates constituting the rotation axis of the camera, and a camera that captures the length of the designated three-dimensional coordinates in the image coordinate system This is because the calculation is performed according to the position and the geometric transformation is performed so that the centroids of the three-dimensional coordinates coincide in a plurality of images. In addition, by calculating the geometric transformation parameters using only the image information, no equipment other than the camera is required at the time of shooting. Further, the user only needs to determine the first reference point and the second reference point once. The reason is that once the first reference point and the second reference point are determined, the first reference point and the second reference point are uniquely determined based on the camera position and orientation for each image.

なお、上記の説明では、具体的な例として相似変換を行う例を示したが、相似変換以外にもアフィン変換、射影変換など任意の幾何変換を選択可能である。その場合、第1基準点受付決定手段12と第2基準点設定手段15とがそれぞれ2点以上の画像座標を受け付けて、幾何変換手法決定手段16に出力すればよい。そして、選択した幾何変換のパラメータ数と変換式により、幾何変換手法決定手段16の計算方法を変更することで対応することが可能である。   In the above description, an example in which similarity transformation is performed is shown as a specific example. However, any geometric transformation such as affine transformation or projective transformation can be selected in addition to the similarity transformation. In that case, the first reference point reception determination unit 12 and the second reference point setting unit 15 may each receive two or more image coordinates and output them to the geometric transformation method determination unit 16. Then, it is possible to cope with this by changing the calculation method of the geometric transformation method determining means 16 according to the selected number of geometric transformation parameters and the transformation formula.

例えば、アフィン変換を選択する場合、必要な対応点数(基準点の数)は最低3点である。第1基準点受付決定手段12と第2基準点設定手段15とは、それぞれ3点以上の画像座標を受け付けて、幾何変換手法決定手段16に出力すればよい。幾何変換手法決定手段16は、出力される第1基準点および第2基準点の情報に基づき、以下の式(6)によって変換パラメータ(a,b,c,d,e,f)を求めればよい。   For example, when affine transformation is selected, the required number of corresponding points (number of reference points) is at least three. The first reference point reception determination unit 12 and the second reference point setting unit 15 may each receive three or more image coordinates and output them to the geometric transformation method determination unit 16. The geometric transformation method determining means 16 obtains the transformation parameters (a, b, c, d, e, f) by the following formula (6) based on the output information of the first reference point and the second reference point. Good.

’=au+bv+c
’=du+ev+f・・・式(6)
u i '= au i + bv i + c
v i ′ = du i + ev i + f (6)

また、例えば、射影変換を選択する場合、必要な対応点数は最低4点である。第1基準点受付決定手段12と第2基準点設定手段15とは、それぞれ4点以上の画像座標を受け付けて、幾何変換手法決定手段16に出力すればよい。幾何変換手法決定手段16は、出力される第1基準点および第2基準点の情報に基づき、以下の式(7)によって変換パラメータ(a1〜a8)を求めればよい。   Further, for example, when selecting projective transformation, the required number of corresponding points is at least four. The first reference point reception determination unit 12 and the second reference point setting unit 15 may each receive four or more image coordinates and output them to the geometric transformation method determination unit 16. The geometric transformation method determining means 16 may obtain the transformation parameters (a1 to a8) by the following equation (7) based on the output information on the first reference point and the second reference point.

’=(a1*u+a2*v+a3)/(a7*u+a8*v+1)
’=(a4*u+a5*v+a6)/(a7*u+a8*v+1)
・・・式(7)
u i '= (a1 * u i + a2 * v i + a3) / (a7 * u i + a8 * v i +1)
v i ′ = (a4 * u i + a5 * v i + a6) / (a7 * u i + a8 * v i +1)
... Formula (7)

なお、本実施形態は、各手段に対応したハードウェア等により実現される画像処理装置に限らず、図6に示すような情報処理システムによっても実現可能である。   Note that the present embodiment is not limited to an image processing apparatus realized by hardware or the like corresponding to each means, but can also be realized by an information processing system as shown in FIG.

図6は、本発明による画像処理装置を情報処理システムに実装した場合のブロック図である。図6に示す情報処理システムは、プロセッサ400と、プログラムメモリ401と、記憶媒体402とを備える一般的な情報処理システムである。   FIG. 6 is a block diagram when the image processing apparatus according to the present invention is mounted in an information processing system. The information processing system illustrated in FIG. 6 is a general information processing system including a processor 400, a program memory 401, and a storage medium 402.

記憶媒体402は、別個の記憶媒体からなる記憶領域であってもよいし、同一の記憶媒体からなる記憶領域であってもよい。記憶媒体として、RAM(Random Access Memory)や、ハードディスク等の磁気記憶媒体を用いることができる。   The storage medium 402 may be a storage area composed of separate storage media, or may be a storage area composed of the same storage medium. As the storage medium, a RAM (Random Access Memory) or a magnetic storage medium such as a hard disk can be used.

プログラムメモリ401には、上述したカメラ位置姿勢推定手段11と、第1基準点受付決定手段12と、第1基準点空間座標射影手段13と、画像表示手段14と、第2基準点設定手段15と、幾何変換手法決定手段16と、幾何変換手段17との各部の処理を、プロセッサ400に行わせるためのプログラムが格納されており、このプログラムに従ってプロセッサ400は動作する。   In the program memory 401, the camera position / orientation estimation means 11, the first reference point reception determination means 12, the first reference point space coordinate projection means 13, the image display means 14, and the second reference point setting means 15 described above. In addition, a program for causing the processor 400 to perform processing of each part of the geometric transformation method determining unit 16 and the geometric transformation unit 17 is stored, and the processor 400 operates according to this program.

プロセッサ400は、例えば、CPU等のプログラムに従って動作するプロセッサであればよい。   The processor 400 may be a processor that operates according to a program such as a CPU, for example.

このように、本発明は、コンピュータプログラムにより実現することも可能である。なお、プログラムによる動作が可能な手段(例えば、カメラ位置姿勢推定手段11、第1基準点受付決定手段12、第2基準点設定手段15、幾何変換手法決定手段16、幾何変換手段17など)の全てをプログラムで動作させる必要はなく、一部をハードウェアで構成してもよい。また、それぞれ別々のユニットとして実現されていてもよい。   Thus, the present invention can also be realized by a computer program. It should be noted that a means capable of operating by a program (for example, camera position / posture estimation means 11, first reference point reception determination means 12, second reference point setting means 15, geometric conversion method determination means 16, geometric conversion means 17, etc.) It is not necessary to operate all with a program, and a part may be configured with hardware. Moreover, you may implement | achieve as a separate unit, respectively.

次に、本発明の概要について説明する。図7は、本発明の概要を示すブロック図である。図7に示すように、画像処理装置は、各変換対象画像について、撮影時のカメラ位置姿勢を推定するカメラ位置姿勢推定部111と、カメラ位置姿勢推定部111によって推定されたカメラ位置姿勢に基づいて、各変換対象画像における3次元座標で表現される第1基準点空間座標を各変換対象画像に射影し、各変換対象画像における画像座標で表現される第1基準点を生成する第1基準点射影部113(実施形態では、第1基準点受付決定手段12および第1基準点空間座標射影手段13で実現される。)と、画像座標で表現される第2基準点変換元座標とカメラ位置姿勢を受け付け、カメラ位置姿勢に応じて第1基準点の変換先である画像座標で表現される第2基準点を設定する第2基準点設定部115と、各変換対象画像について、第1基準点射影部113によって決定された第1基準点と、第2基準点設定部115によって設定された第2基準点とに基づいて、所定の幾何変換式のパラメータを算出する幾何変換手法決定部116と、幾何変換手法決定部116が算出したパラメータによる幾何変換式を用いて変換対象画像を幾何変換する幾何変換部117とを備える。   Next, the outline of the present invention will be described. FIG. 7 is a block diagram showing an outline of the present invention. As illustrated in FIG. 7, the image processing apparatus, for each conversion target image, is based on the camera position and orientation estimation unit 111 that estimates the camera position and orientation at the time of shooting, and the camera position and orientation estimated by the camera position and orientation estimation unit 111. Then, the first reference point space coordinates expressed by the three-dimensional coordinates in each conversion target image are projected onto each conversion target image, and the first reference point expressed by the image coordinates in each conversion target image is generated. The point projection unit 113 (in the embodiment, realized by the first reference point reception determination unit 12 and the first reference point space coordinate projection unit 13), the second reference point conversion source coordinates represented by the image coordinates, and the camera A second reference point setting unit 115 that receives a position and orientation and sets a second reference point expressed by image coordinates that is a conversion destination of the first reference point according to the camera position and orientation; A geometric transformation method determination unit that calculates parameters of a predetermined geometric transformation formula based on the first reference point determined by the reference point projection unit 113 and the second reference point set by the second reference point setting unit 115 116 and a geometric conversion unit 117 that performs geometric conversion on the conversion target image using the geometric conversion formula based on the parameters calculated by the geometric conversion method determination unit 116.

上記の実施形態の一部又は全部は以下の付記のようにも記載されうるが、本発明の構成は以下の構成に限定されない。   Although a part or all of the above embodiments can be described as the following supplementary notes, the configuration of the present invention is not limited to the following configurations.

(付記1)各変換対象画像について、撮影時のカメラ位置姿勢を推定するカメラ位置姿勢推定手段と、前記カメラ位置姿勢推定手段によって推定されたカメラ位置姿勢に基づいて、各変換対象画像における3次元座標で表現される第1基準点空間座標を各変換対象画像に射影し、各変換対象画像における画像座標で表現される第1基準点を生成する第1基準点射影手段と、画像座標で表現される第2基準点変換元座標と前記カメラ位置姿勢を受け付け、前記カメラ位置姿勢に応じて前記第1基準点の変換先である画像座標で表現される第2基準点を設定する第2基準点設定手段と、各変換対象画像について、前記第1基準点射影手段によって決定された前記第1基準点と、前記第2基準点設定手段によって設定された前記第2基準点とに基づいて、所定の幾何変換式のパラメータを算出する幾何変換手法決定手段と、前記幾何変換手法決定手段が算出したパラメータによる幾何変換式を用いて変換対象画像を幾何変換する幾何変換手段とを備え、さらに、少なくとも1つの変換対象画像を表示する画像表示手段を備えた画像処理装置。 (Supplementary note 1) For each conversion target image, based on the camera position and orientation estimation means for estimating the camera position and orientation at the time of shooting, and the camera position and orientation estimated by the camera position and orientation estimation means, three-dimensional in each conversion target image A first reference point projecting means for projecting the first reference point space coordinates expressed by coordinates onto each conversion target image and generating a first reference point expressed by the image coordinates in each conversion target image; A second reference point that receives the second reference point conversion source coordinates and the camera position and orientation, and sets a second reference point expressed by image coordinates that are the conversion destination of the first reference point according to the camera position and orientation Based on the point setting means, the first reference point determined by the first reference point projection means, and the second reference point set by the second reference point setting means for each conversion target image. A geometric transformation method determining means for calculating a parameter of a predetermined geometric transformation formula; and a geometric transformation means for geometrically transforming the conversion target image using the geometric transformation formula based on the parameter calculated by the geometric transformation method decision means, Furthermore, an image processing apparatus comprising image display means for displaying at least one conversion target image.

(付記2)付記1の画像処理装置であって、前記画像表示手段が、前記第1基準点射影手段により生成された前記第1基準点と前記第2基準点設定手段により設定された前記第2基準点の一方または両方を表示する画像処理装置。 (Supplementary note 2) The image processing apparatus according to Supplementary note 1, wherein the image display means is set by the first reference point generated by the first reference point projection means and the second reference point setting means. An image processing apparatus that displays one or both of two reference points.

(付記3)付記1または付記2の画像処理装置であって、幾何変換手段が、内挿を行い画素の欠損を補償する画像処理装置。 (Supplementary note 3) The image processing device according to Supplementary note 1 or Supplementary note 2, wherein the geometric transformation means performs interpolation to compensate for pixel loss.

以上、実施形態および実施例を参照して本願発明を説明したが、本願発明は上記実施形態および実施例に限定されるものではない。本願発明の構成や詳細には、本願発明のスコープ内で当業者が理解し得る様々な変更をすることができる。   While the present invention has been described with reference to the embodiments and examples, the present invention is not limited to the above embodiments and examples. Various changes that can be understood by those skilled in the art can be made to the configuration and details of the present invention within the scope of the present invention.

この出願は、2012年1月10日に出願された日本特許出願2012−2559を基礎とする優先権を主張し、その開示の全てをここに取り込む。   This application claims the priority on the basis of the JP Patent application 2012-2559 for which it applied on January 10, 2012, and takes in those the indications of all here.

本発明は、単一のカメラで自由な方向から注目物体を撮影した画像から位置合わせ画像を生成する用途に好適に適用可能である。   The present invention can be suitably applied to an application for generating a registration image from an image obtained by photographing a target object from a free direction with a single camera.

11 カメラ位置姿勢推定手段
12 第1基準点受付決定手段
13 第1基準点空間座標射影手段
14 画像表示手段
15 第2基準点設定手段
16 幾何変換手法決定手段
17 幾何変換手段
111 カメラ位置姿勢推定部
113 第1基準点射影部
115 第2基準点設定部
116 幾何変換手法決定部
117 幾何変換部
400 プロセッサ
401 プログラムメモリ
402 記録媒体
DESCRIPTION OF SYMBOLS 11 Camera position and orientation estimation means 12 First reference point reception determination means 13 First reference point space coordinate projection means 14 Image display means 15 Second reference point setting means 16 Geometric transformation method determination means 17 Geometric transformation means 111 Camera position and orientation estimation section 113 First reference point projection unit 115 Second reference point setting unit 116 Geometric transformation method determination unit 117 Geometric transformation unit 400 Processor 401 Program memory 402 Recording medium

Claims (10)

注目物体を含む複数の変換対象画像から注目物体の位置合わせ画像を生成する画像処理装置であって、
各変換対象画像について、撮影時のカメラ位置姿勢を推定するカメラ位置姿勢推定手段と、
前記カメラ位置姿勢推定手段によって推定されたカメラ位置姿勢に基づいて、各変換対象画像における3次元座標で表現される第1基準点空間座標を各変換対象画像に射影し、各変換対象画像における画像座標で表現される第1基準点を生成する第1基準点射影手段と、
画像座標で表現される第2基準点変換元座標と前記カメラ位置姿勢を受け付け、前記カメラ位置姿勢に応じて前記第1基準点の変換先である画像座標で表現される第2基準点を設定する第2基準点設定手段と、
各変換対象画像について、前記第1基準点射影手段によって決定された前記第1基準点と、前記第2基準点設定手段によって設定された前記第2基準点とに基づいて、所定の幾何変換式のパラメータを算出する幾何変換手法決定手段と、
前記幾何変換手法決定手段が算出したパラメータによる幾何変換式を用いて変換対象画像を幾何変換する幾何変換手段とを備えた
ことを特徴とする画像処理装置。
An image processing device that generates a registration image of a target object from a plurality of conversion target images including the target object,
Camera position and orientation estimation means for estimating the camera position and orientation at the time of shooting for each conversion target image;
Based on the camera position and orientation estimated by the camera position and orientation estimation means, the first reference point space coordinates expressed by the three-dimensional coordinates in each conversion target image are projected onto each conversion target image, and the image in each conversion target image is displayed. First reference point projection means for generating a first reference point represented by coordinates;
Accepts the second reference point conversion source coordinates and the camera position and orientation expressed by image coordinates, and sets the second reference point expressed by the image coordinates that are the conversion destination of the first reference point according to the camera position and orientation Second reference point setting means for
Based on the first reference point determined by the first reference point projection means and the second reference point set by the second reference point setting means for each conversion target image, a predetermined geometric conversion formula Geometric transformation method determination means for calculating the parameters of
An image processing apparatus comprising: a geometric conversion unit configured to perform geometric conversion on a conversion target image using a geometric conversion formula based on a parameter calculated by the geometric conversion method determination unit.
前記第2基準点設定手段は、前記カメラ位置姿勢に応じて前記第1基準点の変換先である画像座標で表現される前記第2基準点を動的に計算して設定する
請求項1に記載の画像処理装置。
The second reference point setting means dynamically calculates and sets the second reference point expressed by image coordinates that are conversion destinations of the first reference point according to the camera position and orientation. The image processing apparatus described.
前記第2基準点設定手段は、前記カメラ位置姿勢に応じて前記第1基準点の変換先である画像座標で表現される前記第2基準点を記憶装置から読み込むことによって設定する
請求項1または請求項2に記載の画像処理装置。
The second reference point setting means sets the second reference point by reading from the storage device the second reference point expressed by image coordinates that are the conversion destination of the first reference point according to the camera position and orientation. The image processing apparatus according to claim 2.
前記カメラ位置姿勢推定手段は、各変換対象画像と、外部の装置から読み込んだカメラ位置姿勢のパラメータ情報の一方または両方に基づいて前記変換対象画像のカメラ位置姿勢を推定する
請求項1から請求項3のうちのいずれか1項に記載の画像処理装置。
The camera position and orientation estimation unit estimates the camera position and orientation of the conversion target image based on one or both of each conversion target image and camera position and orientation parameter information read from an external device. The image processing apparatus according to claim 1.
各変換対象画像における3次元座標で表現される第1基準点空間座標の少なくとも1つの候補を受け付け、候補の中から1つの第1基準点空間座標を決定する第1基準点空間座標受付決定手段を備えた
請求項1から請求項4のうちのいずれか1項に画像処理装置。
First reference point space coordinate reception determining means for receiving at least one candidate of first reference point space coordinates expressed by three-dimensional coordinates in each conversion target image and determining one first reference point space coordinate from the candidates. The image processing apparatus according to any one of claims 1 to 4.
前記第1基準点受付決定手段は、前記第1基準点空間座標の少なくとも1つの候補から、少なくとも1つの変換対象画像上に表示される前記第1基準点空間座標が射影された画像座標に対する決定信号を受け付け、前記決定信号を受け付けた場合に当該決定信号の対象とされた前記第1基準点をそれぞれ各変換対象画像における前記第1基準点として決定する
請求項5に記載の画像処理装置。
The first reference point reception determination means determines the image coordinates obtained by projecting the first reference point space coordinates displayed on at least one conversion target image from at least one candidate of the first reference point space coordinates. The image processing apparatus according to claim 5, wherein a signal is received, and when the determination signal is received, the first reference point that is a target of the determination signal is determined as the first reference point in each conversion target image.
前記第2基準点設定手段は、設定された前記第2基準点に対する前記決定信号を受け付け、前記第2基準点を決定する
請求項1から請求項6のうちのいずれか1項に記載の画像処理装置。
The image according to any one of claims 1 to 6, wherein the second reference point setting unit receives the determination signal for the set second reference point and determines the second reference point. Processing equipment.
前記第2基準点設定手段は、少なくとも1つの画像座標を前記第2基準点変換元座標として受け付ける
請求項1から請求項7のうちのいずれか1項に記載の画像処理装置。
The image processing apparatus according to claim 1, wherein the second reference point setting unit accepts at least one image coordinate as the second reference point conversion source coordinate.
注目物体を含む複数の画像である変換対象画像それぞれに幾何変換を施して位置合わせ画像を生成するための画像処理方法であって、
各変換対象画像について、撮影時のカメラ位置姿勢を推定し、
推定されたカメラ位置姿勢に基づいて、各変換対象画像における3次元座標で表現される第1基準点空間座標を各変換対象画像に射影し、各変換対象画像における画像座標で表現される第1基準点を生成し、
画像座標で表現される第2基準点変換元座標と前記カメラ位置姿勢を受け付け、前記カメラ位置姿勢に応じて前記第1基準点の変換先である画像座標で表現される第2基準点を設定し、
各変換対象画像について、前記第1基準点と前記第2基準点とに基づいて、所定の幾何変換式のパラメータを算出し、
算出されたパラメータによる幾何変換式を用いて変換対象画像を幾何変換する
ことを特徴とする画像処理方法。
An image processing method for generating a registration image by performing geometric transformation on each of conversion target images, which are a plurality of images including a target object,
Estimate the camera position and orientation at the time of shooting for each conversion target image,
Based on the estimated camera position and orientation, the first reference point space coordinates expressed by the three-dimensional coordinates in each conversion target image are projected onto each conversion target image, and the first reference is expressed by the image coordinates in each conversion target image. Generate a reference point,
Accepts the second reference point conversion source coordinates and the camera position and orientation expressed by image coordinates, and sets the second reference point expressed by the image coordinates that are the conversion destination of the first reference point according to the camera position and orientation And
For each image to be converted, a parameter of a predetermined geometric transformation equation is calculated based on the first reference point and the second reference point,
An image processing method characterized by geometrically transforming a conversion target image using a geometric transformation formula based on a calculated parameter.
注目物体を含む複数の画像である変換対象画像それぞれに幾何変換を施して位置合わせ画像を生成するための画像処理用プログラムであって、
コンピュータに、
各変換対象画像について、撮影時のカメラ位置姿勢を推定する処理と、
推定されたカメラ位置姿勢に基づいて、各変換対象画像における3次元座標で表現される第1基準点空間座標を各変換対象画像に射影し、各変換対象画像における画像座標で表現される第1基準点を生成する処理と、
画像座標で表現される第2基準点変換元座標と前記カメラ位置姿勢を受け付け、前記カメラ位置姿勢に応じて前記第1基準点の変換先である画像座標で表現される第2基準点を設定する処理と、
各変換対象画像について、前記第1基準点と前記第2基準点とに基づいて、所定の幾何変換式のパラメータを算出する処理と、
算出されたパラメータによる幾何変換式を用いて変換対象画像を幾何変換する処理と
を実行させるための画像処理用プログラム。
An image processing program for generating a registration image by performing geometric transformation on each of conversion target images, which are a plurality of images including a target object,
On the computer,
For each conversion target image, a process for estimating the camera position and orientation at the time of shooting,
Based on the estimated camera position and orientation, the first reference point space coordinates expressed by the three-dimensional coordinates in each conversion target image are projected onto each conversion target image, and the first reference expressed by the image coordinates in each conversion target image. Processing to generate a reference point;
Accepts the second reference point conversion source coordinates and the camera position and orientation expressed by image coordinates, and sets the second reference point expressed by the image coordinates that are the conversion destination of the first reference point according to the camera position and orientation Processing to
A process for calculating a parameter of a predetermined geometric transformation equation based on the first reference point and the second reference point for each conversion target image;
An image processing program for executing a process of geometrically transforming an image to be transformed using a geometric transformation expression based on a calculated parameter.
JP2013553114A 2012-01-10 2012-12-28 Image processing apparatus, image processing method, and image processing program Pending JPWO2013105205A1 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2013553114A JPWO2013105205A1 (en) 2012-01-10 2012-12-28 Image processing apparatus, image processing method, and image processing program

Applications Claiming Priority (3)

Application Number Priority Date Filing Date Title
JP2012002559 2012-01-10
JP2012002559 2012-01-10
JP2013553114A JPWO2013105205A1 (en) 2012-01-10 2012-12-28 Image processing apparatus, image processing method, and image processing program

Publications (1)

Publication Number Publication Date
JPWO2013105205A1 true JPWO2013105205A1 (en) 2015-05-11

Family

ID=48781184

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2013553114A Pending JPWO2013105205A1 (en) 2012-01-10 2012-12-28 Image processing apparatus, image processing method, and image processing program

Country Status (2)

Country Link
JP (1) JPWO2013105205A1 (en)
WO (1) WO2013105205A1 (en)

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2005049999A (en) * 2003-07-30 2005-02-24 Ricoh Co Ltd Image input system, image input method, program described to execute method on information processing device, and storage medium with program stored
JP2008217243A (en) * 2007-03-01 2008-09-18 Mitsubishi Electric Corp Image creation device
JP4678404B2 (en) * 2007-12-27 2011-04-27 ソニー株式会社 Imaging apparatus, control method thereof, and program
US9053522B2 (en) * 2010-05-26 2015-06-09 Nec Corporation Image processing device, image processing method, and image processing program
JP4783859B1 (en) * 2010-08-30 2011-09-28 楽天株式会社 Image conversion apparatus, image processing system, image conversion method, program, and information recording medium

Also Published As

Publication number Publication date
WO2013105205A1 (en) 2013-07-18

Similar Documents

Publication Publication Date Title
JP5825256B2 (en) Image processing apparatus, image processing method, and image processing program
JP4508049B2 (en) 360 ° image capturing device
WO2013111229A1 (en) Camera calibration device, camera calibration method, and camera calibration program
JP5872923B2 (en) AR image processing apparatus and method
JP6658001B2 (en) Position estimation device, program, position estimation method
US11122195B2 (en) Camera parameter estimation device, method, and program
JP5781682B2 (en) Method for aligning at least a portion of a first image and at least a portion of a second image using a collinear transform warp function
US11373335B2 (en) Camera parameter estimation device, method and program
JP2020067978A (en) Floor detection program, floor detection method, and terminal device
JP3957888B2 (en) Imaging apparatus and captured image composition method
JP6467612B2 (en) In-place image processing system and structure maintenance management business system
JP2005049999A (en) Image input system, image input method, program described to execute method on information processing device, and storage medium with program stored
JP6486603B2 (en) Image processing device
JP7192526B2 (en) Image processing device, image processing method and program
JP4776983B2 (en) Image composition apparatus and image composition method
WO2013105205A1 (en) Image processing apparatus, image processing method, and image processing program
JP6073121B2 (en) 3D display device and 3D display system
JP2018032991A (en) Image display unit, image display method and computer program for image display
JP4135934B2 (en) Electronics
JP7059829B2 (en) Information processing equipment, information processing methods and programs
JP5636966B2 (en) Error detection apparatus and error detection program
JP6340113B2 (en) Measuring device and program thereof
JP7259498B2 (en) Information processing device, information processing method and program
JP2008014825A (en) Method and program for measurement
JP2003177019A (en) Method for camera posture calculation by free photographing