JP2015139006A - Information processing apparatus and program - Google Patents

Information processing apparatus and program Download PDF

Info

Publication number
JP2015139006A
JP2015139006A JP2014008036A JP2014008036A JP2015139006A JP 2015139006 A JP2015139006 A JP 2015139006A JP 2014008036 A JP2014008036 A JP 2014008036A JP 2014008036 A JP2014008036 A JP 2014008036A JP 2015139006 A JP2015139006 A JP 2015139006A
Authority
JP
Japan
Prior art keywords
line
line group
missing
projection
image
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
JP2014008036A
Other languages
Japanese (ja)
Inventor
長谷川 史裕
Fumihiro Hasegawa
史裕 長谷川
澁谷 竹志
Takeshi Shibuya
竹志 澁谷
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.)
Ricoh Co Ltd
Original Assignee
Ricoh Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Ricoh Co Ltd filed Critical Ricoh Co Ltd
Priority to JP2014008036A priority Critical patent/JP2015139006A/en
Publication of JP2015139006A publication Critical patent/JP2015139006A/en
Pending legal-status Critical Current

Links

Images

Abstract

PROBLEM TO BE SOLVED: To prevent reduction of correction accuracy even if a pattern image partially includes a portion that is not imaged.SOLUTION: An information processing apparatus includes: projection image acquisition means 11 for acquiring a first pickup image that images a first line group and a second pickup image that images a second line group crossing the first line group; defective part detection means 19 which detects a partial or entire defect for each line of the first line group and detects a partial or entire defect for each line of the second line group in the second pickup image; interpolation means 15 for interpolating the defect of the line; intersection detection means 18 for detecting a first intersection of the line of the first line group and the line of the second line group, the defect of the line being interpolated, and a second intersection of the line of the first line group and the line of the second line group in the projection image; correction coefficient calculation means 20 for calculating a correction coefficient by comparing a range formed from a plurality of first intersections with a range formed from a plurality of second intersections; and correction means 21 for correcting the projection image while using the correction coefficient.

Description

本発明は、投影対象物に投影される投影画像を投影前に補正する情報処理装置に関する。   The present invention relates to an information processing apparatus that corrects a projection image projected on a projection object before projection.

プロジェクタは、画像をスクリーン等の投影対象物に投影する装置である。プロジェクタには、投影したパターン画像を撮像し、撮像画像に基づいて画像の歪みなどを補正してから投影するものがある(例えば、特許文献1参照。)。特許文献1には、等間隔に配列した特徴点を含むパターン画像を投影し、投射面が撮像された撮像画像の特徴点の歪み量を算出し、算出した歪み量に応じて、投影する画像を補正する技術が開示されている。特許文献1ではさらに、特徴点を抽出するために二値画像を作成する際の閾値を算出することで、環境光が変化しても画像歪みすることを図っている。   A projector is a device that projects an image onto a projection object such as a screen. Some projectors project a projected pattern image, correct the distortion of the image based on the captured image, and then project the image (see, for example, Patent Document 1). In Patent Document 1, a pattern image including feature points arranged at equal intervals is projected, a distortion amount of a feature point of a captured image in which a projection surface is captured is calculated, and an image to be projected according to the calculated distortion amount A technique for correcting the above is disclosed. Further, in Patent Document 1, a threshold value for creating a binary image for extracting feature points is calculated, so that image distortion occurs even if ambient light changes.

しかしながら、特許文献1では、パターン画像として離散した複数の点を用いているため、パターン画像から1つの点が欠落した際の情報量の低下量が大きく、補正精度が低下するおそれがあるという問題がある。   However, in Patent Document 1, since a plurality of discrete points are used as a pattern image, there is a problem that a reduction amount of information amount when one point is missing from the pattern image is large and correction accuracy may be reduced. There is.

本発明は上記課題に鑑み、パターン画像の一部に撮像されない部分があっても、補正精度の低下を抑制できる情報処理装置を提供することを目的とする。   In view of the above problems, an object of the present invention is to provide an information processing apparatus that can suppress a reduction in correction accuracy even when a part of a pattern image is not captured.

上記課題に鑑み、本発明は、投影対象物に投影される投影画像を投影前に補正する情報処理装置であって、投影された第1の線群が撮像された第1の撮像画像と、前記第1の線群と交差する第2の線群が撮像された第2の撮像画像とを取得する投影画像取得手段と、 前記第1の撮像画像における前記第1の線群の線毎に一部又は全体の欠損を検出し、前記第2の撮像画像における前記第2の線群の線毎に一部又は全体の欠損を検出する欠損部検出手段と、前記第1の線群の線又は前記第2の線群の線の欠損を補間する補間手段と、欠損が補間された前記第1の線群の線と前記第2の線群の線との第1の交点、及び、前記投影画像の前記第1の線群の線と前記第2の線群の線との第2の交点、を検出する交点検出手段と、複数の前記第1の交点により形成される範囲と、複数の前記第2の交点により形成される範囲とを比較して補正係数を算出する補正係数算出手段と、前記補正係数を用いて前記投影画像を補正する補正手段と、を有することを特徴とする。   In view of the above problems, the present invention is an information processing apparatus that corrects a projection image projected onto a projection object before projection, and includes a first captured image in which the projected first line group is captured; Projection image acquisition means for acquiring a second captured image obtained by capturing a second line group that intersects the first line group; and for each line of the first line group in the first captured image Defect portion detection means for detecting a partial or entire defect and detecting a partial or entire defect for each line of the second line group in the second captured image; and a line of the first line group Or an interpolating means for interpolating the defect of the line of the second line group, a first intersection of the line of the first line group and the line of the second line group in which the defect is interpolated, and Intersection detection means for detecting a second intersection of the line of the first line group and the line of the second line group of the projection image; and a plurality of the first intersections A correction coefficient calculation unit that calculates a correction coefficient by comparing a range formed by the plurality of second intersections, and a correction unit that corrects the projection image using the correction coefficient. It is characterized by having.

パターン画像の一部に撮像されない部分があっても、補正精度の低下を抑制できる情報処理装置を提供することができる。   It is possible to provide an information processing apparatus that can suppress a decrease in correction accuracy even if a part of the pattern image is not captured.

本実施形態のプロジェクタが用いられる画像補正システムの構成例を示す図である。It is a figure which shows the structural example of the image correction system in which the projector of this embodiment is used. 本実施形態に係るプロジェクタの一例を示す前面の概略外観図及び背面の概略外観図である。2A and 2B are a schematic external view of a front surface and a schematic external view of a back surface showing an example of a projector according to the present embodiment. 情報処理装置の概略外観図の一例である。1 is an example of a schematic external view of an information processing apparatus. プロジェクタの投影動作の一例を説明する説明図である。It is explanatory drawing explaining an example of the projection operation | movement of a projector. プロジェクタが補正パラメータを算出する動作の一例を説明する説明図である。It is explanatory drawing explaining an example of the operation | movement which a projector calculates a correction parameter. プロジェクタが補正した投影画像(補正画像)を投影する動作の一例を説明する説明図である。It is explanatory drawing explaining an example of the operation | movement which projects the projection image (correction image) which the projector correct | amended. プロジェクタと情報処理装置のハードウェア構成を説明する図の一例である。It is an example of the figure explaining the hardware constitutions of a projector and information processing apparatus. 情報処理装置の機能ブロック図の一例を示す図である。It is a figure which shows an example of the functional block diagram of information processing apparatus. 投影パターンAと投影パターンBの一例を示す図である。It is a figure which shows an example of the projection pattern A and the projection pattern B. 投影パターンAとBの合成パターンの一例を示す図である。It is a figure which shows an example of the synthetic | combination pattern of the projection patterns A and B. FIG. バイナリーコードの一例を示す図である。It is a figure which shows an example of a binary code. プロジェクタが投影した投影画像の歪みを説明する図の一例である。It is an example of the figure explaining distortion of the projection image which the projector projected. 投影パターンが投影された撮像画像の一例を示す図である。It is a figure which shows an example of the captured image on which the projection pattern was projected. 準備段階の手順を示すフローチャート図の一例である。It is an example of the flowchart figure which shows the procedure of a preparation stage. 投影段階の手順を示すフローチャート図の一例である。It is an example of the flowchart figure which shows the procedure of a projection stage. 図14のステップS4の対応点抽出処理の手順を説明するフローチャート図の一例である。It is an example of the flowchart figure explaining the procedure of the corresponding point extraction process of step S4 of FIG. 線パターン領域の一例を説明する図である。It is a figure explaining an example of a line pattern area. 一部が欠損した水平線の一例を示す図である。It is a figure which shows an example of the horizontal line in which one part was missing. 合成パターン画像の特徴点の座標と、投影パターンAとBの合成パターンの交点の座標の対応を説明する図の一例である。It is an example of the figure explaining the correspondence between the coordinates of the feature points of the composite pattern image and the coordinates of the intersection of the composite patterns of the projection patterns A and B. 射影変換行列Hの算出を説明するための図の一例である。It is an example of the figure for demonstrating calculation of the projective transformation matrix H. FIG. 投影画像の補正について説明する図の一例である。It is an example of the figure explaining correction | amendment of a projection image. 図14のステップS4の特徴点抽出処理の手順を説明するフローチャート図の一例である(実施例2)。FIG. 15 is an example of a flowchart for explaining the procedure of feature point extraction processing in step S4 in FIG. 14 (Example 2); 欠損部よりも手前の途切れていない点の座標値を説明する図の一例である。It is an example of the figure explaining the coordinate value of the point which is not interrupted before a missing part. 水平線の欠損部の右側に端点がない水平線の一例を示す図である。It is a figure which shows an example of the horizontal line which does not have an end point on the right side of the defect | deletion part of a horizontal line. 欠損部の補間について説明する図の一例である(実施例3)。It is an example of the figure explaining the interpolation of a defect | deletion part (Example 3). n番目とn+1番目の水平線が欠損している場合の補間を説明する図の一例である。It is an example of the figure explaining the interpolation in case the nth and n + 1th horizontal line is missing. 本実施例と実施例1又は2を組み合わせた場合の補間について説明する図の一例である(実施例3)。It is an example of the figure explaining the interpolation at the time of combining a present Example and Example 1 or 2 (Example 3). 最も上又は下の水平線が完全に検出されない場合の補間について説明する図の一例である。It is an example of the figure explaining the interpolation when the uppermost or lower horizontal line is not completely detected. 図14のステップS4の特徴点抽出処理の手順を説明するフローチャート図の一例である(実施例3)。FIG. 15 is an example of a flowchart for explaining the procedure of feature point extraction processing in step S4 of FIG. 14 (Example 3); プロジェクタのハードウェア構成と機能ブロックを説明する図の一例である。It is an example of the figure explaining the hardware constitutions and functional block of a projector. 本実施例の情報処理装置の処理手順について説明する図の一例である。It is an example of the figure explaining the process sequence of the information processing apparatus of a present Example. 3次元形状の計測について説明する図の一例である。It is an example of the figure explaining measurement of a three-dimensional shape. 撮像手段の座標系を模式的に示す図の一例である。It is an example of the figure which shows the coordinate system of an imaging means typically. プロジェクタを仮想的に動かした場合の透視投影行列を説明する図の一例である。It is an example of the figure explaining the perspective projection matrix at the time of moving a projector virtually.

以下、本発明を実施するための形態について図面を参照しながら実施例を挙げて説明する。本実施形態では、投影パターンが投影されている投影対象物を撮像し、撮像したパターン画像を用いて投影画像を補正する情報処理装置を用いて、本発明の限定的でない例示の実施形態について説明する。   DESCRIPTION OF EMBODIMENTS Hereinafter, embodiments for carrying out the present invention will be described with reference to the drawings. In the present embodiment, a non-limiting exemplary embodiment of the present invention will be described using an information processing apparatus that captures an image of a projection target onto which a projection pattern is projected and corrects the projection image using the captured pattern image. To do.

本実施形態において画像とは、静止画、動画、連続静止画などを含む。音声は付随してもしなくてもよい。画像を投影するとは、投射、投写、映写、照射などを含む。   In the present embodiment, the image includes a still image, a moving image, a continuous still image, and the like. Audio may or may not accompany. Projecting an image includes projection, projection, projection, irradiation, and the like.

画像を撮像するとは、撮影、取得などを含む。また、投影対象物には、スクリーン、壁、及び、ホワイトボート、建物の外壁などの外形表面、並びに、移動する物体の表面で画像を投影することができるものを含む。   Taking an image includes taking and acquiring images. Projection objects include those that can project an image on a screen, a wall, an outer surface such as a white boat, an outer wall of a building, and the surface of a moving object.

本実施形態において、投影画像はプロジェクタ100が投影する歪みのない画像をいい、撮像画像は投影対象物で投影された歪みがある画像をいい、補正画像は投影対象物に投影された際に歪みが低減されるように補正された投影画像をいう。投影画像には、補正パラメータを算出するための投影パターンがあり、撮像画像には投影パターンが撮像されたパターン画像がある。   In the present embodiment, the projected image refers to an image without distortion projected by the projector 100, the captured image refers to an image with distortion projected on the projection object, and the corrected image is distorted when projected onto the projection object. Refers to a projection image that has been corrected so as to be reduced. The projection image includes a projection pattern for calculating a correction parameter, and the captured image includes a pattern image obtained by capturing the projection pattern.

[プロジェクタ、並びに、投影動作及び撮像動作]
図1〜図6を用いて、本発明に係るプロジェクタ100を説明する。図1は、本実施形態のプロジェクタが用いられる画像補正システム200の構成例を示す図である。図2(a)及び図2(b)は、本実施形態に係るプロジェクタ100の一例を示す前面の概略外観図及び背面の概略外観図である。図3は、情報処理装置99の概略外観図の一例である。図4は、プロジェクタ100の投影動作の一例を説明する説明図である。図5(a)は、プロジェクタ100が補正パラメータを算出する動作の一例を説明する説明図である。図5(b)は、プロジェクタ100が投影画像を補正する動作の一例を説明する説明図である。図6は、プロジェクタ100が補正した投影画像(補正画像)を投影する動作の一例を説明する説明図である。
[Projector, projection operation, and imaging operation]
A projector 100 according to the present invention will be described with reference to FIGS. FIG. 1 is a diagram illustrating a configuration example of an image correction system 200 in which the projector according to the present embodiment is used. 2A and 2B are a schematic external view of the front and a schematic external view of the back showing an example of the projector 100 according to the present embodiment. FIG. 3 is an example of a schematic external view of the information processing apparatus 99. FIG. 4 is an explanatory diagram for explaining an example of the projection operation of the projector 100. FIG. 5A is an explanatory diagram illustrating an example of an operation in which the projector 100 calculates a correction parameter. FIG. 5B is an explanatory diagram illustrating an example of an operation in which the projector 100 corrects a projection image. FIG. 6 is an explanatory diagram for explaining an example of an operation of projecting a projection image (corrected image) corrected by the projector 100.

図1に示すように、画像補正システム200はプロジェクタ100と情報処理装置99とを有している。画像補正システム200は以下のように動作する。
(i) プロジェクタ100が投影パターンを投影する。
(ii) 情報処理装置99が投影されたパターン画像を撮像する。
(iii) 情報処理装置99が射影変換行列Hを算出する。
(iv) 情報処理装置99が射影変換行列Hで投影画像を補正する(補正された投影画像を補正画像という)。
(v) プロジェクタ100が補正画像を投影する。
As shown in FIG. 1, the image correction system 200 includes a projector 100 and an information processing device 99. The image correction system 200 operates as follows.
(i) The projector 100 projects a projection pattern.
(ii) The information processing apparatus 99 captures the projected pattern image.
(iii) The information processing apparatus 99 calculates a projective transformation matrix H.
(iv) The information processing apparatus 99 corrects the projected image with the projective transformation matrix H (the corrected projected image is referred to as a corrected image).
(v) The projector 100 projects a corrected image.

なお、画像補正システム200の構成例や、情報処理装置99でなくプロジェクタ100が射影変換行列Hを算出する構成も可能である。このような構成については実施例4にて後述する。   A configuration example of the image correction system 200 or a configuration in which the projector 100 instead of the information processing apparatus 99 calculates the projective transformation matrix H is possible. Such a configuration will be described later in a fourth embodiment.

情報処理装置99は、撮像手段と射影変換行列Hを算出する機能を備えていればよく、例えば、タブレット型の情報処理装置、スマートフォン、ノートPC(Personal Computer)、PDA(Personal Digital Assistant)、携帯電話、電子書籍端末などどのようなものでもよい。   The information processing apparatus 99 only needs to have an imaging means and a function for calculating the projective transformation matrix H. For example, a tablet-type information processing apparatus, a smartphone, a notebook PC (Personal Computer), a PDA (Personal Digital Assistant), a mobile phone Any device such as a telephone or an electronic book terminal may be used.

図2(a)に示すように、プロジェクタ100は、プロジェクタ100の前面に、投影画像を投影する投影部100PJを有する。また、図2(b)に示すように、プロジェクタ100は、プロジェクタ100の背面に、ユーザーが所望の動作の実施タイミングを入力する開始ボタン100Baと、ユーザーが所望の動作を設定する設定ボタン100Bbと、ユーザーが所望の情報を選択する選択ボタン100Bcと、を有する。   As illustrated in FIG. 2A, the projector 100 includes a projection unit 100 </ b> PJ that projects a projection image on the front surface of the projector 100. Further, as shown in FIG. 2B, the projector 100 has a start button 100Ba on the back of the projector 100 for inputting a desired operation execution timing and a setting button 100Bb for setting a desired operation by the user. A selection button 100Bc for the user to select desired information.

なお、図2(a)(b)は説明のために簡略化された外観図にすぎず、本実施形態を用いることができるプロジェクタの外観等は図2に示すものに限定されるものではない。また、プロジェクタ100は図2に示すようにハード的なキー以外に、投影部100PJからメニュー画面を投影しメニューの選択を受け付けるソフトキーを有していてもよい。ソフトキーにより、設定ボタン100Bbと選択ボタン100Bcと同等以上の操作を受け付けることができる。また、プロジェクタ100は液晶などの表示装置を有していてもよく、表示装置と一体のタッチパネルから操作を受け付けてもよい。   2A and 2B are merely external views simplified for the sake of explanation, and the external appearance and the like of the projector that can use this embodiment are not limited to those shown in FIG. . In addition to the hardware keys, the projector 100 may have soft keys that project a menu screen from the projection unit 100PJ and accept menu selections as shown in FIG. Operation equivalent to or higher than that of the setting button 100Bb and the selection button 100Bc can be received by the soft key. Further, the projector 100 may have a display device such as a liquid crystal, and may accept an operation from a touch panel integrated with the display device.

図3に示すように、情報処理装置99は投影対象物を撮像するレンズや撮像素子を備えた撮像手段110と撮像などのユーザの操作を受け付ける操作ボタン106を有している。なお、撮像手段110は背面側に設けられてもよく、前面と背面の両方に設けられていてもよい。この情報処理装置99の外観は主にタブレット型の情報処理装置99であり、図示する外観には限られない。情報処理装置99のディスプレイ120はタッチパネルと一体であり撮像などの他、ユーザの操作を受け付けることができる。   As illustrated in FIG. 3, the information processing apparatus 99 includes an imaging unit 110 that includes a lens and an imaging device for imaging a projection target, and an operation button 106 that receives a user operation such as imaging. Note that the imaging unit 110 may be provided on the back side, or may be provided on both the front side and the back side. The appearance of the information processing apparatus 99 is mainly a tablet-type information processing apparatus 99, and is not limited to the illustrated appearance. The display 120 of the information processing apparatus 99 is integrated with the touch panel and can accept user operations in addition to imaging.

図4に示すように、プロジェクタ100は、スクリーン等(以下、「投影対象物」という。)に画像を投影する。プロジェクタ100は、例えばユーザーが開始ボタン100Baを押下したときに、画像を投影することを開始する。図4では、プロジェクタ100は、投影部100PJを用いて、投影領域Rng−PJに画像を投影している。   As shown in FIG. 4, the projector 100 projects an image on a screen or the like (hereinafter referred to as “projection object”). For example, when the user presses the start button 100Ba, the projector 100 starts projecting an image. In FIG. 4, the projector 100 projects an image onto the projection region Rng-PJ using the projection unit 100PJ.

また、図4では、情報処理装置99が、撮像手段110を用いて、撮像領域Rng−CM(投影された領域)を撮像している。情報処理装置99は、例えばユーザーが操作ボタン106を押下したときに、画像を撮像することを開始する。   Further, in FIG. 4, the information processing apparatus 99 images the imaging region Rng-CM (projected region) using the imaging unit 110. The information processing apparatus 99 starts capturing an image when the user presses the operation button 106, for example.

更に、図4では、プロジェクタ100は、投影画像を投影させる領域として、投影対象領域Rng−Tgの選択を受け付けることができる。プロジェクタ100は、例えばユーザーによって選択ボタン100Bcを用いて投影対象領域Rng−Tgの大きさ及び位置を選択され、設定ボタン100Bbを用いて投影対象領域Rng−Tgが設定される。   Further, in FIG. 4, the projector 100 can accept selection of a projection target region Rng-Tg as a region on which a projection image is projected. In the projector 100, for example, the size and position of the projection target region Rng-Tg are selected by the user using the selection button 100Bc, and the projection target region Rng-Tg is set using the setting button 100Bb.

図5(a)に示すように、情報処理装置99は、撮像手段110を用いて撮像領域Rng−CMを撮像した場合に、例えば図に示す撮像画像Img−CMを撮像する。すなわち、撮像手段110は、投影対象物の形状(例えば外形)に対応して変形される撮像画像Img−CMを撮像する。情報処理装置99は、撮像画像Img−CMが撮像画像Img−CMrとなるように、歪み補正のための後述する射影変換行列Hを算出する。   As illustrated in FIG. 5A, the information processing apparatus 99 captures, for example, a captured image Img-CM illustrated in the drawing when the imaging unit Rng-CM is captured using the imaging unit 110. That is, the imaging unit 110 captures a captured image Img-CM that is deformed corresponding to the shape (for example, the outer shape) of the projection target. The information processing apparatus 99 calculates a projective transformation matrix H described later for distortion correction so that the captured image Img-CM becomes the captured image Img-CMr.

図5(b)に示すように、情報処理装置99は、算出した射影変換行列Hを用いて、投影画像Img−PJを補正して、補正画像Img−RVを新たに生成する。情報処理装置99は、例えば撮像画像Img−CMの撮像後、自動的に、又は、ユーザーが操作ボタン106を押下した場合に、射影変換行列Hを算出する。   As illustrated in FIG. 5B, the information processing apparatus 99 corrects the projection image Img-PJ using the calculated projective transformation matrix H, and newly generates a corrected image Img-RV. The information processing apparatus 99 calculates the projective transformation matrix H automatically, for example, after the captured image Img-CM is captured or when the user presses the operation button 106.

図6に示すように、プロジェクタ100は、投影画像Img−PJとして、新たに生成した補正画像Img−RVを用いる。すなわち、プロジェクタ100は、補正画像Img−RVを投影することによって、投影対象物の形状に対応する変形を相殺する投影画像Img−PJを投影する。   As shown in FIG. 6, the projector 100 uses the newly generated corrected image Img-RV as the projected image Img-PJ. That is, the projector 100 projects the corrected image Img-RV, thereby projecting a projection image Img-PJ that cancels the deformation corresponding to the shape of the projection target.

以後に、本発明の実施形態に係るプロジェクタ100の構成、機能及び動作を具体的に説明する。   Hereinafter, the configuration, function, and operation of the projector 100 according to the embodiment of the present invention will be specifically described.

図7は、プロジェクタ100と情報処理装置99のハードウェア構成を説明する図の一例である。   FIG. 7 is an example of a diagram illustrating the hardware configuration of the projector 100 and the information processing apparatus 99.

まず、プロジェクタ100は、通信手段35、投影制御手段36、記憶手段37、投影用レンズ31、カラーホイール32、DMD(Digital microMirror Device)33、及び、光源34を有している。   First, the projector 100 includes a communication unit 35, a projection control unit 36, a storage unit 37, a projection lens 31, a color wheel 32, a DMD (Digital microMirror Device) 33, and a light source 34.

通信手段35は、情報処理装置99と通信して投影パターン、又は、補正画像等を受信する。通信の実現方法はどのようなものでもよいが、例えば無線LAN、Bluetooth(登録商標)、赤外線通信、IC通信、WiGig (Wireless Gigabit)などが使用される。なお、有線LANやUSBケーブルなどの有線で通信してもよい。   The communication unit 35 communicates with the information processing apparatus 99 and receives a projection pattern, a corrected image, or the like. Any communication implementation method may be used. For example, wireless LAN, Bluetooth (registered trademark), infrared communication, IC communication, WiGig (Wireless Gigabit), or the like is used. In addition, you may communicate by wire, such as wired LAN and a USB cable.

投影制御手段36は、プロジェクタ100の全体を制御する制御部として動作する。例えば、プロジェクタ100が投影パターンや補正画像を受信した場合、又は、例えばユーザーが開始ボタン100Baを押下したときに投影パターンや補正画像に基づいてDMD33を制御し投影画像(補正画像としての投影画像を含む)をスクリーンに投影する。   The projection control unit 36 operates as a control unit that controls the entire projector 100. For example, when the projector 100 receives a projection pattern or a correction image, or when the user presses the start button 100Ba, for example, the DMD 33 is controlled based on the projection pattern or the correction image, and the projection image (the projection image as the correction image is displayed). Project) onto the screen.

記憶手段37は、情報処理装置99から受信した投影画像(補正画像としての投影画像を含む)を記憶する。   The storage unit 37 stores the projection image (including the projection image as the correction image) received from the information processing apparatus 99.

光源34、DMD33、カラーホイール32、及び、投影用レンズ31は、DLP(Digital Light Processing)方式の投影手段である。光源34が照射する白色光は、RGBに分解された投影画像によりON/OFFが制御されるDMD33に照射され、カラーホイール32を通過して投影用レンズ31で集光された後、投影対象物に投影される。なお、投影手段の実現方法は、LCD方式などで実現してもよい。   The light source 34, the DMD 33, the color wheel 32, and the projection lens 31 are DLP (Digital Light Processing) type projection means. The white light emitted from the light source 34 is applied to the DMD 33 whose ON / OFF is controlled by the projection image decomposed into RGB, passes through the color wheel 32, and is condensed by the projection lens 31, and then the projection object. Projected on. Note that the projection unit may be realized by an LCD method or the like.

情報処理装置99は、CPU101、ROM102、RAM103、SSD(Solid State Drive)104、メディアドライブ105、操作ボタン106、電源スイッチ107、電話通信部108、ネットワークI/F109、撮像手段110、マイク111、スピーカ112、ディスプレイI/F113、外部装置I/F114、及び、GPS受信部115を有している。   The information processing apparatus 99 includes a CPU 101, a ROM 102, a RAM 103, an SSD (Solid State Drive) 104, a media drive 105, an operation button 106, a power switch 107, a telephone communication unit 108, a network I / F 109, an imaging unit 110, a microphone 111, a speaker. 112, a display I / F 113, an external device I / F 114, and a GPS receiver 115.

CPU101は、SSD104に記憶されていプログラム116を実行して情報処理装置全体の動作を制御する。ROM102は例えば起動用のプログラムやユーザ設定が記憶されている。RAM103はCPU101のワークエリアとして使用される。SSD104はプログラム116を記憶している。プログラム116は不図示のサーバからダウンロードされる態様で配布されるか、又は、記録メディア117に記憶された状態で配布される。   The CPU 101 executes a program 116 stored in the SSD 104 and controls the operation of the entire information processing apparatus. The ROM 102 stores, for example, a startup program and user settings. The RAM 103 is used as a work area for the CPU 101. The SSD 104 stores a program 116. The program 116 is distributed in the form of being downloaded from a server (not shown), or is distributed in a state stored in the recording medium 117.

メディアドライブ105は、記録メディア117に対するデータの読み出し又は書き込みを制御する。記録メディア117はフラッシュメモリ等の不揮発性のメモリである。操作ボタン106はユーザによる情報処理装置99への操作を受け付けるボタンであり、後述するタッチパネルが含まれる。電源スイッチ107は情報処理装置99の電源のON/OFFを切り換えるためのスイッチである。電話通信部108は、携帯電話網などの基地局を介してサーバや他の情報処理装置などの情報処理装置99と通信する。通信により音声データや各種のデータを送受信する。   The media drive 105 controls reading or writing of data with respect to the recording medium 117. The recording medium 117 is a non-volatile memory such as a flash memory. The operation button 106 is a button for accepting an operation on the information processing apparatus 99 by the user, and includes a touch panel described later. The power switch 107 is a switch for switching on / off the power of the information processing apparatus 99. The telephone communication unit 108 communicates with an information processing apparatus 99 such as a server or another information processing apparatus via a base station such as a mobile phone network. Audio data and various data are transmitted and received by communication.

ネットワークI/F109は、無線LAN網などのアクセスポイントを介してプロジェクタ100の通信手段35と通信する通信カードである。通信により補正画像などを送信する。撮像手段110はCPU101の制御に従って撮像画像Img−CMを撮像する。マイク111は、音声を集音して電気的な信号に変換する。スピーカ112は、音声を出力する。   The network I / F 109 is a communication card that communicates with the communication unit 35 of the projector 100 via an access point such as a wireless LAN network. A corrected image or the like is transmitted by communication. The imaging unit 110 captures the captured image Img-CM according to the control of the CPU 101. The microphone 111 collects sound and converts it into an electrical signal. The speaker 112 outputs sound.

ディスプレイI/F113は、CPU101の制御に従ってディスプレイ120に撮像画像Img−CMを出力する。ディスプレイ120は液晶素子や有機EL素子等を用いて構成されている。ディスプレイ120はタッチパネルを一体に有しており、操作用アイコン等を表示する他、ユーザの操作を検出する。   Display I / F 113 outputs captured image Img-CM to display 120 under the control of CPU 101. The display 120 is configured using a liquid crystal element, an organic EL element, or the like. The display 120 integrally has a touch panel, displays operation icons and the like, and detects user operations.

外部装置I/F114は、外部の装置との間で各種データを送受信する、例えば、USBホスト、Bluetooth(登録商標)、NFC(Near Field Communication)、TransferJet(登録商標)などである。GPS(Global Positioning System)受信部115は、GPS衛星からの電波を受信して情報処理装置99の位置を推定する。   The external device I / F 114 is, for example, a USB host, Bluetooth (registered trademark), NFC (Near Field Communication), TransferJet (registered trademark), or the like that transmits and receives various data to and from an external device. A GPS (Global Positioning System) receiving unit 115 receives radio waves from GPS satellites and estimates the position of the information processing apparatus 99.

また、上記各構成要素を相互に電気的に接続するためのアドレスバスやデータバス等のバスライン118を備えている。記録メディア117は、情報処理装置99に対して着脱自在な構成となっている。   In addition, a bus line 118 such as an address bus or a data bus is provided for electrically connecting the above components. The recording medium 117 is detachable from the information processing apparatus 99.

なお、撮像手段110は、情報処理装置99に内蔵されているほか、例えば外部装置I/F114を介して外付けされていてもよい。   Note that the imaging unit 110 may be externally connected via the external device I / F 114, for example, in addition to being built in the information processing device 99.

図8は、情報処理装置99の機能ブロック図の一例を示す図である。情報処理装置99は、パターン撮像部11、通信部12、二値化部13、パターン選別部14、パターン補間部15、画像加工部16、撮像制御部17、対応点抽出部18、欠損部抽出部19、補正係数算出部20、投影対象画像化部21、及び、記憶部22を有している。これらの各機能は、図7のCPU101がプログラム116を実行しハードウェアと協働することで実現される機能又は手段である。   FIG. 8 is a diagram illustrating an example of a functional block diagram of the information processing apparatus 99. The information processing apparatus 99 includes a pattern imaging unit 11, a communication unit 12, a binarization unit 13, a pattern selection unit 14, a pattern interpolation unit 15, an image processing unit 16, an imaging control unit 17, a corresponding point extraction unit 18, and a missing part extraction. A unit 19, a correction coefficient calculation unit 20, a projection target imaging unit 21, and a storage unit 22. Each of these functions is a function or means realized by the CPU 101 in FIG. 7 executing the program 116 and cooperating with hardware.

パターン撮像部11は、撮像手段110を用いて投影対象物に投影された投影パターンを撮像し、パターン画像を作成する。   The pattern imaging unit 11 captures an image of the projection pattern projected onto the projection target using the imaging unit 110 and creates a pattern image.

通信部12は、ネットワークI/F109により実現される機能又は手段であり、プロジェクタ100の通信手段35と通信して、投影パターンや歪みが補正された補正画像をプロジェクタ100に送信する。通信方法は、1対1通信の他、ネットワークを介する通信であってもよい。   The communication unit 12 is a function or means realized by the network I / F 109 and communicates with the communication unit 35 of the projector 100 to transmit a corrected image in which the projection pattern and distortion are corrected to the projector 100. The communication method may be communication via a network in addition to one-to-one communication.

二値化部13は、パターン画像を二値化する。パターン選別部14は、水平線の投影パターンと垂直線の投影パターンを選別して、通信部12に対しプロジェクタ100に送信させる。また、二値化部13が二値化したパターン画像が水平線の投影パターンか垂直線の投影パターンかを選別する。   The binarization unit 13 binarizes the pattern image. The pattern selection unit 14 selects a horizontal line projection pattern and a vertical line projection pattern, and causes the communication unit 12 to transmit the projection pattern to the projector 100. Also, the binarization unit 13 selects whether the binarized pattern image is a horizontal line projection pattern or a vertical line projection pattern.

パターン補間部15は、二値化部13が二値化したパターン画像の水平線又は垂直線の欠損部を補間する。画像加工部16は、補正係数算出部20が算出した射影変換行列Hを用いて投影画像を補正する。   The pattern interpolation unit 15 interpolates a horizontal line or vertical line missing part of the pattern image binarized by the binarization unit 13. The image processing unit 16 corrects the projection image using the projective transformation matrix H calculated by the correction coefficient calculation unit 20.

撮像制御部17は、例えばユーザの操作ボタン106の操作を検出するとパターン撮像部11に投影パターンを撮像させ撮像画像(後述するパターン画像である)を作成させる。   For example, when detecting the operation of the operation button 106 by the user, the imaging control unit 17 causes the pattern imaging unit 11 to capture a projection pattern and create a captured image (which will be described later).

対応点抽出部18は、欠損部が補間された水平線と垂直線の撮像画像を合成して、撮像画像における水平線と垂直線の交点を求める。また、この交点と、投影画像の水平線と垂直線の交点とを対応づける。   The corresponding point extraction unit 18 combines the captured image of the horizontal line and the vertical line in which the missing part is interpolated, and obtains the intersection of the horizontal line and the vertical line in the captured image. Further, this intersection point is associated with the intersection point of the horizontal line and the vertical line of the projection image.

欠損部抽出部19は、二値化部が二値化した撮像画像の水平線又は垂直線の欠損部を抽出する。   The missing part extraction unit 19 extracts a missing part of a horizontal line or a vertical line of the captured image binarized by the binarization unit.

補正係数算出部20は、投影画像が投影対象物で歪まないように投影画像を補正する射影変換行列Hを算出する。投影対象画像化部21は、投影対象である投影用コンテンツを画像化する。   The correction coefficient calculation unit 20 calculates a projective transformation matrix H that corrects the projection image so that the projection image is not distorted by the projection target. The projection target imaging unit 21 images the projection content that is the projection target.

記憶部22は、図7のRAM103、SSD104又は記録メディア117の1つ以上により実現される機能又は手段である。記憶部22には、投影画像(投影パターンを含む)、及び、後述するバイナリーコードが記憶されている。また、記憶部22には、投影パターンが撮像された撮像画像であるパターン画像が記憶される。この他、投影用コンテンツや投影画像が記憶される。   The storage unit 22 is a function or means realized by one or more of the RAM 103, the SSD 104, or the recording medium 117 in FIG. The storage unit 22 stores a projection image (including a projection pattern) and a binary code described later. Further, the storage unit 22 stores a pattern image that is a captured image obtained by capturing the projection pattern. In addition, projection content and projection images are stored.

<パターン画像>
図9、10を用いてパターン画像について説明する。パターン画像は、射影変換行列Hを作成するため(投影対象物における投影画像の歪みを補正するため)に使用される。図9(a)は投影画像として投影される投影パターンAと投影パターンBの一例を示す。投影パターンAでは、垂直な同じ長さの線分が等間隔で並んだ線群がパターンを形成している。投影パターンBでは、水平な同じ長さの線分が等間隔で並んだ線群がパターンを形成している。また、水平線と垂直線は長手方向に重畳した線を有している。
<Pattern image>
The pattern image will be described with reference to FIGS. The pattern image is used to create a projective transformation matrix H (to correct distortion of the projection image on the projection target). FIG. 9A shows an example of projection patterns A and B projected as projection images. In the projection pattern A, a group of lines in which vertical line segments having the same length are arranged at equal intervals form a pattern. In the projection pattern B, a line group in which line segments of the same horizontal length are arranged at equal intervals forms a pattern. Further, the horizontal line and the vertical line have lines superimposed in the longitudinal direction.

図9(b)は、パターン撮像部11が投影パターンを撮像した撮像画像であるパターン画像の一例を示す。パターン画像Aは投影パターンAが撮像されたものである。パターン画像Bは投影パターンBが撮像されたものである。   FIG. 9B illustrates an example of a pattern image that is a captured image obtained by capturing an image of the projection pattern by the pattern imaging unit 11. The pattern image A is obtained by capturing the projection pattern A. The pattern image B is an image of the projection pattern B.

図10(a)は投影パターンAとBの合成パターンの一例を示す図である。投影パターンAとBを合成することで、垂直な線分と水平な線分が交差し、複数の矩形が縦横に整列配置された格子状の合成パターンが得られる。換言すると、投影パターンAとBは、図10(a)の合成パターンから垂直な線分と水平な線分がそれぞれ取りだされたものである。格子の1つをメッシュと称する場合がある。   FIG. 10A shows an example of a combined pattern of projection patterns A and B. FIG. By combining the projection patterns A and B, a vertical line segment and a horizontal line segment intersect, and a lattice-shaped combined pattern in which a plurality of rectangles are arranged vertically and horizontally is obtained. In other words, the projection patterns A and B are obtained by taking out a vertical line segment and a horizontal line segment from the composite pattern in FIG. One of the grids may be referred to as a mesh.

図10(b)は、パターン画像Aとパターン画像Bが合成された合成パターン画像の一例を示す図である。投影対象物の凹凸に起因して、パターン画像AとBが歪むため、格子状の合成パターン画像に歪みが生じている。   FIG. 10B is a diagram illustrating an example of a combined pattern image in which the pattern image A and the pattern image B are combined. Because the pattern images A and B are distorted due to the projections and depressions of the projection object, the lattice-shaped composite pattern image is distorted.

本実施例では、合成パターンの格子の交点と対応する、合成パターン画像の格子の交点を特定し、射影変換行列Hを作成する。   In this embodiment, the intersection of the lattice of the composite pattern image corresponding to the intersection of the lattice of the composite pattern is specified, and the projective transformation matrix H is created.

なお、投影パターンAと投影パターンBは、それぞれ平行線や等間隔である必要はなく、投影パターンAと投影パターンBが交差すればよい。いくつかの交点が求められることで対応点を抽出できれば、射影変換可能である。   Note that the projection pattern A and the projection pattern B do not need to be parallel lines or at equal intervals, and the projection pattern A and the projection pattern B only need to intersect. If corresponding points can be extracted by obtaining several intersections, projective transformation is possible.

<バイナリーコード>
図11を用いてバイナリーコードについて説明する。図11は、バイナリーコードの一例を示す図である。図11の点線は実際には存在しない説明のための線である。図11(a)はバイナリーコードAを、図11(b)はバイナリーコードBを、図11(c)はバイナリーコードCを、それぞれ示す。バイナリーコードは白黒の縞の2値画像であり、水平線と垂直線を検出する領域を決定するために使用される。
<Binary code>
The binary code will be described with reference to FIG. FIG. 11 is a diagram illustrating an example of a binary code. The dotted lines in FIG. 11 are explanatory lines that do not actually exist. 11A shows the binary code A, FIG. 11B shows the binary code B, and FIG. 11C shows the binary code C. The binary code is a binary image with black and white stripes, and is used to determine a region for detecting horizontal and vertical lines.

バイナリーコードA〜Cは白黒の縞である。バイナリーコードAは、投影パターンと同じサイズの領域に、上半分の黒画素と下半分の白画素を有する縞である。バイナリコードBは、バイナリーコードAの黒画素を白黒に等分し、白画素を白黒に等分した縞である。バイナリーコードCは、バイナリーコードBの黒画素を白黒に等分し、白画素を白黒に等分した縞である。このようにバイナリーコードA〜Cは、密度が倍ずつ増える縞の画像データである。   The binary codes A to C are black and white stripes. The binary code A is a stripe having an upper half black pixel and a lower half white pixel in an area having the same size as the projection pattern. The binary code B is a stripe in which the black pixels of the binary code A are equally divided into black and white and the white pixels are equally divided into black and white. The binary code C is a stripe obtained by equally dividing the black pixels of the binary code B into black and white and equally dividing white pixels into black and white. In this way, the binary codes A to C are fringe image data whose density increases by a factor of two.

なお、図11ではバイナリーコードA〜Cは横縞だが、90度回転することで縦縞を得られる。以下では、バイナリーコードA〜Cが横縞なので水平線の検出を例に説明するが、垂直線も同様に検出される。   In FIG. 11, the binary codes A to C are horizontal stripes, but vertical stripes can be obtained by rotating 90 degrees. In the following, since the binary codes A to C are horizontal stripes, the detection of the horizontal line will be described as an example, but the vertical line is also detected in the same manner.

まず、図9(a)の投影パターンBの各水平線は、もっとも細かいバイナリコードCの縞の境界部に位置する。すなわち、投影パターンBの各水平線は、バイナリコードCの縞の境界部に形成されている(又は、バイナリコードCの縞はの境界に投影パターンBの各水平線が形成されている)。これにより、情報処理装置99はバイナリーコードA〜Cを用いることで、水平線又は垂直線の位置を推定できる。   First, each horizontal line of the projection pattern B in FIG. 9A is located at the boundary of the finest binary code C stripes. That is, each horizontal line of the projection pattern B is formed at the boundary of the binary code C stripes (or each horizontal line of the projection pattern B is formed at the boundary of the binary code C stripes). Thereby, the information processing apparatus 99 can estimate the position of the horizontal line or the vertical line by using the binary codes A to C.

また、バイナリーコードA〜Cは、投影パターンBの線幅の整数倍の幅を有している。バイナリーコードAは4倍、バイナリーコードBは2倍、バイナリーコードAは1倍である。したがって、バイナリコードA〜Cを重ね合わせると、重ねた方向に重複しない白黒のパターンが得られる。この白黒のパターンの1つを帯領域という。バイナリーコードA〜Cによれば帯領域1〜8が得られる。バイナリーコードA〜Cにより得られる帯領域1〜8の白黒のパターンは以下になる。
帯領域1:黒 白 黒
帯領域2:黒 白 白
帯領域3:黒 黒 黒
帯領域4:黒 黒 白
帯領域5:白 白 黒
帯領域6:白 白 白
帯領域7:白 黒 黒
帯領域8:白 黒 白
したがって、この白黒パターンが切り替わる位置に水平線が存在すると予想できる。水平線が存在すると予想された位置に図17の線パターン領域61が形成される。
The binary codes A to C have a width that is an integral multiple of the line width of the projection pattern B. The binary code A is 4 times, the binary code B is 2 times, and the binary code A is 1 time. Therefore, when the binary codes A to C are superimposed, a monochrome pattern that does not overlap in the overlapping direction is obtained. One of the black and white patterns is called a band area. According to the binary codes A to C, band regions 1 to 8 are obtained. The black and white patterns of the band regions 1 to 8 obtained by the binary codes A to C are as follows.
Belt region 1: Black White Black belt region 2: Black White White belt region 3: Black Black Black belt region 4: Black Black White belt region 5: White White Black belt region 6: White White White belt region 7: White Black Black belt Region 8: White Black White Therefore, it can be expected that a horizontal line exists at a position where the monochrome pattern is switched. A line pattern region 61 of FIG. 17 is formed at a position where a horizontal line is expected to exist.

<撮像画像の歪み>
図12を用いて撮像画像の歪みについて説明する。図12は、プロジェクタ100が投影した投影画像の歪みを説明する図の一例である。図12(a)は、短焦点(又は、超短焦点)のプロジェクタ100が投影対象物Scrに投影画像を投影している例を示す。図12(b)は、短焦点(又は、超短焦点)のプロジェクタ100が投影対象物Scrに投影した投影画像を投影対象物Scrと正対して撮像した撮像画像の例を示す。図12(c)は、通常の焦点(又は、焦点距離)のプロジェクタ100が投影対象物Scrに投影画像を投影している例を示す。図12(d)は、通常の焦点(又は、焦点距離)のプロジェクタ100が投影対象物Scrに投影した投影画像を投影対象物Scrと正対して撮像した撮像画像の例を示す。
<Distortion of captured image>
The distortion of the captured image will be described with reference to FIG. FIG. 12 is an example of a diagram for explaining distortion of a projected image projected by the projector 100. FIG. 12A shows an example in which the short focus (or ultra short focus) projector 100 projects a projection image onto the projection target Scr. FIG. 12B shows an example of a captured image obtained by capturing a projection image projected onto the projection object Scr by the short-focus (or ultra-short focus) projector 100 directly facing the projection object Scr. FIG. 12C shows an example in which the projector 100 with a normal focus (or focal length) projects a projection image onto the projection object Scr. FIG. 12D shows an example of a captured image obtained by capturing the projection image projected onto the projection object Scr by the projector 100 having a normal focus (or focal distance) directly facing the projection object Scr.

図12(c)に示すように、通常の焦点距離のプロジェクタ100では、投影対象物Scrの投影面に投影光(投影画像)La、Lb、Lcを照射(投影)する場合、投影光La、Lb、Lcは反射光Lar、Lbr、Lcrで反射する。すなわち、通常のプロジェクタ100では、図12(d)に示すように、投影対象物の投影面の形状(歪み)の影響をあまり受けない。   As shown in FIG. 12C, in the projector 100 having a normal focal length, when the projection light (projection images) La, Lb, and Lc is irradiated (projected) onto the projection surface of the projection object Scr, the projection light La, Lb and Lc are reflected by the reflected light Lar, Lbr and Lcr. That is, the normal projector 100 is not significantly affected by the shape (distortion) of the projection surface of the projection target as shown in FIG.

これに対し、図12(a)に示すように、短焦点のプロジェクタ100では、投影対象物の投影面に投影光(投影画像)L1、L2、L3を照射(投影)する場合に、投影対象物の投影面の形状(歪み)によって、投影光L2が反射光L2raで反射する。すなわち、短焦点のプロジェクタ100では、投影対象物の投影面の形状(歪み)によって、投影光L2の反射位置がずれて、反射光L2raではなく、反射光L2rで反射する。これにより、図12(b)に示すように、短焦点のプロジェクタ100では、投影対象物Scrと正対した位置で、(例えば視覚者が)撮像画像Img−CMの局所的な部分がL2raからL2rに歪む。なお、プロジェクタ100では、特に短焦点の場合に投影光の入射角が小さくなるため、投影面のわずかな歪みでも反射位置のずれ(画像の歪み)が大きくなる。   On the other hand, as shown in FIG. 12A, in the short-focus projector 100, when the projection light (projection images) L1, L2, and L3 is irradiated (projected) onto the projection surface of the projection target, the projection target Depending on the shape (distortion) of the projection surface of the object, the projection light L2 is reflected by the reflected light L2ra. That is, in the short-focus projector 100, the reflection position of the projection light L2 is shifted depending on the shape (distortion) of the projection surface of the projection object, and the reflected light L2r is reflected instead of the reflected light L2ra. As a result, as shown in FIG. 12B, in the short-focus projector 100, the local portion of the captured image Img-CM (from the viewer, for example) is displayed from L2ra at the position facing the projection object Scr. Distorted to L2r. In the projector 100, since the incident angle of the projection light becomes small particularly in the case of a short focal point, the reflection position shift (image distortion) increases even with a slight distortion of the projection surface.

本実施形態に係るプロジェクタ100は、補正パラメータとして、撮像画像Img−CMの局所的な部分の歪みを相殺する補正パラメータを算出する。すなわち、プロジェクタ100は、撮像される図12(b)の歪みL2rがL2raとなるように変形する補正パラメータを算出する。この補正パラメータが射影変換行列Hである。   The projector 100 according to the present embodiment calculates a correction parameter that cancels out local distortion of the captured image Img-CM as a correction parameter. That is, the projector 100 calculates a correction parameter that is deformed so that the distortion L2r in FIG. This correction parameter is the projective transformation matrix H.

<パターン画像の検出>
図13は、投影パターンが投影された撮像画像の一例を示す図である。撮像画像には、パターン画像B、スクリーン52、スクリーン52を収納する収納部54、時計55、及び、カレンダ56などが撮影されている。
<Detection of pattern image>
FIG. 13 is a diagram illustrating an example of a captured image on which a projection pattern is projected. The captured image includes a pattern image B, a screen 52, a storage unit 54 that stores the screen 52, a clock 55, a calendar 56, and the like.

図13では投影パターンが四角い黒枠51で囲まれている。壁に吊り下げられたスクリーン52にこのような投影パターンが投影される場合を考えると、撮像画像の中心付近にある連結成分の外接矩形(黒枠51)に囲まれる領域内に投影パターンBが含まれる。また、このパターン画像Bの黒枠51が定められたサイズ以上であれば、認識可能なサイズのパターン要素が撮影されていると推測できる。また、当然ながらユーザは、スクリーン52の中心部に投影パターンBを投影し、撮像画像の中央を占めるようにパターン画像Bを撮像すると考えられる。   In FIG. 13, the projection pattern is surrounded by a square black frame 51. Considering the case where such a projection pattern is projected on the screen 52 suspended from the wall, the projection pattern B is included in the area surrounded by the circumscribed rectangle (black frame 51) of the connected component near the center of the captured image. It is. If the black frame 51 of the pattern image B is larger than a predetermined size, it can be estimated that a recognizable pattern element has been captured. Naturally, the user may project the projection pattern B on the center of the screen 52 and capture the pattern image B so as to occupy the center of the captured image.

従って、例えば、所定画素数以上の黒画素連結成分(黒枠51の部分)が検出できれば、それを黒枠51として検出でき、黒枠内のパターン画像Bを安定して抽出できる。   Therefore, for example, if a black pixel connected component (a portion of the black frame 51) having a predetermined number of pixels or more can be detected, it can be detected as the black frame 51, and the pattern image B in the black frame can be stably extracted.

なお、黒枠51は、矩形でなく円や楕円などでもよい。また、投影パターンBを投影して撮像された撮像画像と、投影パターンBが投影されていない状態で撮像された撮像画像とを比較して、2つの画像を比較してパターン画像Bを抽出してもよい。   The black frame 51 may be a circle or an ellipse instead of a rectangle. Further, the captured image captured by projecting the projection pattern B is compared with the captured image captured in a state where the projection pattern B is not projected, and the pattern image B is extracted by comparing the two images. May be.

<準備段階>
以下、射影変換行列Hの作成について準備段階と投影段階に分けて説明する。
<Preparation stage>
Hereinafter, the creation of the projective transformation matrix H will be described separately in a preparation stage and a projection stage.

図14は準備段階の手順を示すフローチャート図の一例である。
S1:プロジェクタ100の投影制御手段36はパターン画像を投影する。パターン画像は情報処理装置99が記憶しているので、情報処理装置99の通信部12がプロジェクタ100に送信する。
S2:例えばユーザが操作ボタン106を押下することで、情報処理装置99のパターン撮像部11が投影パターンを含む領域を撮像する。なお、情報処理装置99は三脚などで固定され、投影パターンA,B及びバイナリーコードA〜Cを撮像する間は、撮像位置が固定されている。
S3:パターン撮像部11は撮った撮像画像(パターン画像)を記憶部22に保存する。パターン撮像部11は、ステップS2、S3を繰り返し、投影パターンA,B及びバイナリーコードA〜Cを撮像して保存する。
S4:対応点抽出部18は、パターン画像A,Bを合成した合成パターン画像の交点と、投影パターンA,Bを合成した合成パターンの水平線と垂直線の交点との対応付けを行い、互いの座標値を対応付けるペアを記録する。この処理を対応点抽出と呼ぶ。対応点抽出について詳しくは後述する。
S5:合成パターン画像と合成パターンのそれぞれの交点を頂点に見立て、対応する4点で囲まれる領域同士の射影変換の係数(射影変換行列H)を求める。この係数は、画像変換の係数であり補正係数又は補正パラメータと呼んでも良い。
S6:パターン画像A、Bは図9(a)のように撮像されていることが理想的だが、上記のスクリーンの凹凸により図9(b)のように歪んでいる場合を考慮して、投影画像を射影変換行列Hを用いて補正する。すなわち、概念的には逆方向の歪みを投影画像に施すことで、スクリーンの凹凸による歪みと打ち消しあって、歪みのない投影画像が投影される。詳しくは後述する。
S7:射影変換行列Hを情報処理装置99の記憶部22に保存する。
FIG. 14 is an example of a flowchart showing the preparation stage procedure.
S1: The projection control means 36 of the projector 100 projects a pattern image. Since the information processing apparatus 99 stores the pattern image, the communication unit 12 of the information processing apparatus 99 transmits it to the projector 100.
S2: For example, when the user presses the operation button 106, the pattern imaging unit 11 of the information processing apparatus 99 captures an area including the projection pattern. The information processing apparatus 99 is fixed by a tripod or the like, and the imaging position is fixed while the projection patterns A and B and the binary codes A to C are imaged.
S3: The pattern imaging unit 11 stores the captured image (pattern image) in the storage unit 22. The pattern imaging unit 11 repeats steps S2 and S3 to capture and store the projection patterns A and B and the binary codes A to C.
S4: The corresponding point extraction unit 18 associates the intersection of the combined pattern image obtained by combining the pattern images A and B with the intersection of the horizontal line and the vertical line of the combined pattern obtained by combining the projection patterns A and B. Record the pair that associates coordinate values. This process is called corresponding point extraction. Details of the corresponding point extraction will be described later.
S5: Assume that each intersection of the composite pattern image and the composite pattern is a vertex, and obtain a projective transformation coefficient (projective transformation matrix H) between regions surrounded by the corresponding four points. This coefficient is an image conversion coefficient and may be called a correction coefficient or a correction parameter.
S6: The pattern images A and B are ideally captured as shown in FIG. 9A, but are projected in consideration of the case where the pattern is distorted as shown in FIG. The image is corrected using the projective transformation matrix H. That is, conceptually, by applying distortion in the reverse direction to the projection image, the distortion due to the unevenness of the screen cancels out, and a projection image without distortion is projected. Details will be described later.
S7: The projective transformation matrix H is stored in the storage unit 22 of the information processing apparatus 99.

<投影段階>
図15は投影段階の手順を示すフローチャート図の一例である。
S11:画像加工部16は記憶部22に記憶されている射影変換行列Hを読み出す。
S12:投影対象画像化部21は情報処理装置99内に用意された、投影用コンテンツを投影画像に画像化する。投影用コンテンツは、例えば静止画、動画、連続静止画などである。
S13:画像加工部16は、投影画像を射影変換行列Hに従って加工(変形)する。
S14:通信部12は、変形した投影画像をプロジェクタ100に投影させるために、プロジェクタ100に送信する。
S15:プロジェクタ100は受信した投影画像を記憶手段37に記憶する。
S16:プロジェクタ100の投影制御手段36は、光源34、DMD33、カラーホイール32を制御し、投影用レンズ31を通して投影対象物に投影画像を投影する。以上のような手順により、ユーザは歪みが低減された投影画像を認識できる。
<Projection stage>
FIG. 15 is an example of a flowchart showing the procedure of the projection stage.
S11: The image processing unit 16 reads the projective transformation matrix H stored in the storage unit 22.
S12: The projection target imaging unit 21 images the projection content prepared in the information processing apparatus 99 into a projection image. The projection content is, for example, a still image, a moving image, a continuous still image, or the like.
S13: The image processing unit 16 processes (deforms) the projection image according to the projective transformation matrix H.
S14: The communication unit 12 transmits the deformed projection image to the projector 100 in order to cause the projector 100 to project the deformed projection image.
S15: The projector 100 stores the received projection image in the storage unit 37.
S16: The projection control means 36 of the projector 100 controls the light source 34, the DMD 33, and the color wheel 32, and projects a projection image onto the projection object through the projection lens 31. With the above procedure, the user can recognize a projection image with reduced distortion.

〔対応点の抽出〕
図16は、図14のステップS4の対応点抽出処理の手順を説明するフローチャート図の一例である。図9(b)のパターン画像A,Bのように歪みながらも水平線や垂直線が欠損することなく撮像される場合、特徴点抽出と射影変換行列Hにより歪みを補正することができる。しかしながら、パターン画像A,Bの一部が欠損した場合、投影パターンとパターン画像との間で、対応する領域を正しく対応付けられないおそれがある。
[Extraction of corresponding points]
FIG. 16 is an example of a flowchart for explaining the procedure of corresponding point extraction processing in step S4 of FIG. When the image is captured without losing the horizontal and vertical lines while being distorted as in the pattern images A and B in FIG. 9B, the distortion can be corrected by the feature point extraction and the projective transformation matrix H. However, when part of the pattern images A and B is lost, there is a possibility that the corresponding area cannot be correctly associated between the projection pattern and the pattern image.

そこで、図16の手順ではパターン画像A,Bの一部が欠損していても、射影変換行列Hを作成可能なように、欠損部を補間してから特徴点を抽出する。   Therefore, in the procedure of FIG. 16, feature points are extracted after interpolating the missing portion so that the projective transformation matrix H can be created even if part of the pattern images A and B is missing.

なお、図16の処理は投影パターンB(水平線)、投影パターンA(垂直線)の順で行われているが、順番はどちらが先でもよい。   Note that the processing in FIG. 16 is performed in the order of the projection pattern B (horizontal line) and the projection pattern A (vertical line).

対応点抽出部18は、バイナリコードA〜Cの撮像画像を二値化して、二値画像をバイナリーコードA〜Cの数だけ作成する(S4−1)。   The corresponding point extraction unit 18 binarizes the captured images of the binary codes A to C, and creates binary images for the number of binary codes A to C (S4-1).

次に、二値化した3つのバイナリコード画像の組から帯領域1〜8を特定する(S4−2)。上記のように、バイナリコードA〜Cを重ねると重複しない白黒パターンが得られるので、帯領域1〜8を特定できる。   Next, band regions 1 to 8 are specified from a set of three binarized binary code images (S4-2). As described above, when the binary codes A to C are overlapped, black and white patterns that do not overlap are obtained, so that the band regions 1 to 8 can be specified.

次に、帯領域1〜8の境界部を決定し、境界部から予め定められた画素数分だけ上下に広げた範囲を線パターン領域61として設定する(S4−3)。   Next, a boundary portion of the band regions 1 to 8 is determined, and a range widened up and down by a predetermined number of pixels from the boundary portion is set as the line pattern region 61 (S4-3).

図17(a)は線パターン領域61の一例を説明する図である。予め定められた画素数は、歪みにより水平線が移動しうる範囲として設定されている。図示するように線パターン領域61は、帯領域1〜8の境界を中心に設定される。多くの場合、帯領域1〜8の境界部に水平線が検出されるが、次述するパターン画像の二値化結果や、撮影時の外光の影響などによって、必ずしも境界部に水平線が存在しない場合がある。このため、バイナリーコードで決定された帯領域1〜8の境界に対し水平線が移動しうる範囲として線パターン領域61を決定する。そして、線パターン領域61内で水平線を検出する。   FIG. 17A is a diagram for explaining an example of the line pattern region 61. The predetermined number of pixels is set as a range in which the horizontal line can move due to distortion. As shown in the figure, the line pattern region 61 is set around the boundary between the band regions 1 to 8. In many cases, a horizontal line is detected at the boundary between the band regions 1 to 8, but the horizontal line does not necessarily exist at the boundary due to the binarization result of the pattern image described below and the influence of external light during photographing. There is a case. For this reason, the line pattern region 61 is determined as a range in which the horizontal line can move with respect to the boundaries of the band regions 1 to 8 determined by the binary code. Then, a horizontal line is detected in the line pattern area 61.

図16に戻り、対応点抽出部はパターン画像Bを二値化する(S4−4)。所定の閾値未満を黒画素、閾値以上を白画素に二値化する。   Returning to FIG. 16, the corresponding point extraction unit binarizes the pattern image B (S4-4). Binarization is performed on black pixels below a predetermined threshold and white pixels above the threshold.

次に、対応点抽出部18は、線パターン領域61内の黒画素を抽出し、連続している黒画素を抽出する(S4−5)。連続した黒画素は任意の黒画素から出発し、隣接した画素のうち黒画素を検出して連結する。黒画素があれば、その画素に隣接した画素のうち黒画素を検出する処理を繰り返す。隣接した画素に黒画素がない場合、まだ連結されていない黒画素から同じ処理を繰り返す。これにより、水平線が検出される。なお、水平線が欠損している場合、2本以上の水平線が検出される場合がある。   Next, the corresponding point extraction unit 18 extracts black pixels in the line pattern region 61 and extracts continuous black pixels (S4-5). Consecutive black pixels start from an arbitrary black pixel and detect and connect black pixels among adjacent pixels. If there is a black pixel, the process of detecting the black pixel among the pixels adjacent to the pixel is repeated. If there is no black pixel in the adjacent pixel, the same processing is repeated from the black pixel that is not yet connected. Thereby, a horizontal line is detected. When the horizontal line is missing, two or more horizontal lines may be detected.

次に、欠損部抽出部19は、帯領域1〜8の境界の線パターン領域61から水平線が欠損している線パターン領域61を検出する(S4−6)。   Next, the missing part extracting unit 19 detects the line pattern area 61 in which the horizontal line is missing from the line pattern area 61 at the boundary of the band areas 1 to 8 (S4-6).

図17(b)は欠損の有無の判定について説明する図の一例である。連続した黒画素の検出により、線パターン領域61には長手方向に水平線に相当する黒画素が連続していると推定される。欠損部抽出部19は、線パターン領域61の始端又は終端から黒画素を探索する。欠損の判断基準は適宜設定されるが、例えば線パターン領域61の幅方向(行方向)に黒画素が一切ない場合に欠損していると判断する。
(i) 1列目から5列目までは2つ行で黒画素が存在する。
(ii) 6列目には上から3行目に黒画素がある。
(iii) 7列目には上から4行目に黒画素がある。
(iv) 8列目には上から6行目に黒画素がある。
(v) 9列目には一切、黒画素がないので欠損部抽出部19は9列目で水平線が欠損していると判断する。
FIG. 17B is an example of a diagram illustrating determination of the presence / absence of a defect. By detecting the continuous black pixels, it is estimated that the black pixels corresponding to the horizontal lines are continuous in the longitudinal direction in the line pattern region 61. The missing part extraction unit 19 searches for a black pixel from the start or end of the line pattern region 61. The determination criterion of the defect is set as appropriate. For example, it is determined that the defect is present when there is no black pixel in the width direction (row direction) of the line pattern region 61.
(i) There are black pixels in two rows from the first column to the fifth column.
(ii) The sixth column has black pixels in the third row from the top.
(iii) There is a black pixel in the fourth row from the top in the seventh column.
(iv) There is a black pixel in the sixth row from the top in the eighth column.
(v) Since there is no black pixel in the ninth column, the missing part extracting unit 19 determines that the horizontal line is missing in the ninth column.

この後、さらに列方向に探索し、12列目に黒画素があるので12列目から水平線の探索を再開する。したがって、9〜11列目が欠損部であると判断される。このように水平線毎に欠損部を全て検出する。   Thereafter, the search is further performed in the column direction. Since there is a black pixel in the 12th column, the search for the horizontal line is resumed from the 12th column. Therefore, it is determined that the ninth to eleventh columns are missing portions. In this way, all missing portions are detected for each horizontal line.

なお、欠損部の判断としては、黒画素がない列が所定数以上の場合に欠損があると判断してもよい。また、1列内に黒画素があっても、手前の列と同じ行に黒画素がない場合には欠損があると判断してもよい。   In addition, as the determination of the missing part, it may be determined that there is a defect when the number of columns without black pixels is equal to or greater than a predetermined number. Even if there is a black pixel in one column, it may be determined that there is a defect if there is no black pixel in the same row as the previous column.

図18(a)は、一部が欠損した水平線の欠損部303の一例を示す図である。図18(a)では帯領域4と5の間の水平線が一部欠損している。このように、途切れている部分がある場合、パターン補間部15は欠損部以外の水平線301と302を用いて欠損部を補間する。   FIG. 18A is a diagram illustrating an example of a missing part 303 of a horizontal line partially missing. In FIG. 18A, the horizontal line between the band regions 4 and 5 is partially missing. As described above, when there is an interrupted portion, the pattern interpolation unit 15 interpolates the missing portion using the horizontal lines 301 and 302 other than the missing portion.

図16に戻り、パターン補間部15は補間対象となる途切れている水平線を補間する(S4−7)。すなわち、連続する黒画素の端点同士(水平線301と302の端点)を直線で結ぶ。これにより、パターン画像は全ての線分が欠損なく撮影された画像となる。図18(b)は欠損部303が補間されたパターン画像の一例を示す。図18(b)では直線で補間されている。直線による補間は端点を結ぶだけでよいので処理負荷を低減できる。   Returning to FIG. 16, the pattern interpolation unit 15 interpolates the broken horizontal line to be interpolated (S4-7). That is, the end points of the continuous black pixels (the end points of the horizontal lines 301 and 302) are connected by a straight line. As a result, the pattern image is an image in which all line segments are photographed without any defects. FIG. 18B shows an example of a pattern image in which the missing portion 303 is interpolated. In FIG. 18B, interpolation is performed with a straight line. Since interpolation by straight lines only needs to connect the end points, the processing load can be reduced.

次に、対応点抽出部18は、着目している線パターン領域61について全ての欠損部を補間したか否かを判定する(S4−8)。   Next, the corresponding point extraction unit 18 determines whether or not all missing portions have been interpolated for the focused line pattern region 61 (S4-8).

着目している線パターン領域61について欠損部が残っている場合(S4−8のNo)、欠損部を補間する。すなわち、複数の欠損部がある場合、全ての欠損部にに対し補間を行う。   When a missing part remains in the focused line pattern region 61 (No in S4-8), the missing part is interpolated. That is, when there are a plurality of missing portions, interpolation is performed for all the missing portions.

次に、対応点抽出部18は、全ての線パターン領域61について欠損部を補間したか否かを判定する(S4−9)。   Next, the corresponding point extraction unit 18 determines whether or not the missing portion has been interpolated for all the line pattern regions 61 (S4-9).

全ての線パターン領域61について欠損部を補間していない場合(S4−9のNo)、次の線パターン領域61について連続黒画素を検出する処理から繰り返す(S4−5)。   When the missing portion is not interpolated for all the line pattern areas 61 (No in S4-9), the process is repeated from the process of detecting continuous black pixels for the next line pattern area 61 (S4-5).

次に、対応点抽出部18は垂直線についても同様の処理を行う(S4−10)。すなわち、投光パターンAが撮像されたパターン画像Aから垂直線を検出し、欠損部を補間する。なお、バイナリーコードA〜Cは90°回転させることで、垂直線に対応できる。   Next, the corresponding point extraction unit 18 performs the same process on the vertical line (S4-10). That is, a vertical line is detected from the pattern image A in which the light projection pattern A is captured, and the missing portion is interpolated. The binary codes A to C can correspond to a vertical line by rotating by 90 °.

次に、対応点抽出部18は、パターン画像A,Bを合成する(S4−11)。合成は、水平線のパターン画像Aと垂直線のパターン画像Bの同じ座標の画素値を比較して、両方とも白画素なら白画素に、一方が黒画素なら黒画素に置き換えることで行う。これにより、図10(a)(b)のような合成パターン画像が得られる。なお、水平線の端部が垂直線と交差するように、又は、垂直線の端部が水平線と交差するように、合成前に水平線と垂直線の両端をそれぞれ延長してもよい。   Next, the corresponding point extraction unit 18 combines the pattern images A and B (S4-11). The composition is performed by comparing pixel values of the same coordinates in the horizontal line pattern image A and the vertical line pattern image B and replacing both with white pixels if they are white pixels, and replacing them with black pixels if one is a black pixel. Thereby, a composite pattern image as shown in FIGS. 10A and 10B is obtained. Note that both ends of the horizontal line and the vertical line may be extended before synthesis so that the end of the horizontal line intersects the vertical line, or the end of the vertical line intersects the horizontal line.

次に、対応点抽出部18は水平線と垂直線の交点を求め、その座標を特徴点として抽出する(S4−12)。   Next, the corresponding point extraction unit 18 obtains the intersection of the horizontal line and the vertical line, and extracts the coordinates as feature points (S4-12).

図19(a)は交点の検出について説明する図の一例である。交点の求め方は種々考えられるが、例えば、パターン画像Aとパターン画像Bの黒画素の座標を利用する。パターン画像Aの黒画素(水平線)の座標と、パターン画像Bの黒画素(垂直線)の座標が分かっているので、パターン画像AとパターンBの両方にある重複点が黒画素が交点である(図の黒マス)。   FIG. 19A is an example of a diagram illustrating the detection of the intersection. There are various ways of obtaining the intersection point. For example, the coordinates of the black pixels of the pattern image A and the pattern image B are used. Since the coordinates of the black pixels (horizontal line) of the pattern image A and the coordinates of the black pixels (vertical line) of the pattern image B are known, the overlapping point in both the pattern image A and the pattern B is the intersection of the black pixels. (Black square in the figure).

例えば、図のように座標を取ると(x、y)=(1,1)(1,2)(2,1)(2,2)が交点の1つである。重複点は1画素とは限らないので、これらの交点の例えば重心(複数の重複点x座標の平均と、y座標の平均)を交点として決定する。   For example, taking coordinates as shown in the figure, (x, y) = (1, 1) (1, 2) (2, 1) (2, 2) is one of the intersections. Since the overlapping point is not limited to one pixel, for example, the center of gravity (the average of a plurality of overlapping points x-coordinates and the average of y-coordinates) is determined as the intersection.

同じ処理を合成パターンについて行うことで、合成パターンから特徴点を検出できる。なお、合成パターンには歪みなどが生じないので予め特徴点を検出しておいてもよい。   By performing the same process on the composite pattern, the feature point can be detected from the composite pattern. Note that feature points may be detected in advance because no distortion or the like occurs in the composite pattern.

対応点抽出部18は、交点を特徴点として補正係数算出部20に出力する(S4−13)。
以上により、図10(b)に示したような合成パターン画像の交点が特徴点として得られる。
The corresponding point extraction unit 18 outputs the intersection as a feature point to the correction coefficient calculation unit 20 (S4-13).
As described above, the intersection point of the composite pattern image as shown in FIG. 10B is obtained as the feature point.

<交点の対応づけ>
対応点抽出部18は、合成パターン画像の特徴点の座標と、図10(a)の合成パターンの交点の座標を対応づける。具体的には、例えば、水平線の始端から水平線に沿って、合成パターン画像の特徴点の座標をX方向に順番に読み出し、合成パターンの始端から交点の座標に順番に対応づければよい。右端の特徴点(終端)まで到達したら、1つ下の水平線について同じように対応付けを行う。
<Associating intersections>
The corresponding point extraction unit 18 associates the coordinates of the feature points of the composite pattern image with the coordinates of the intersection of the composite pattern in FIG. Specifically, for example, the coordinates of the feature points of the composite pattern image are sequentially read in the X direction along the horizontal line from the start end of the horizontal line, and the coordinates of the intersection point may be sequentially associated with the coordinates of the intersection point from the start end of the composite pattern. When the rightmost feature point (end) is reached, the next horizontal line is similarly associated.

図19(b)は合成パターン画像の特徴点の座標と、投影パターンAとBの合成パターンの特徴点の座標の対応を説明する図の一例である。水平線と垂直線が共に9本なので、「81=9×9」の座標が対応づけられている。特徴点を対応させることで、4つの特徴点で囲まれる領域同士を対応させ、射影変換行列Hを算出することができる。   FIG. 19B is an example for explaining the correspondence between the coordinates of the feature points of the composite pattern image and the coordinates of the feature points of the composite pattern of the projection patterns A and B. Since there are nine horizontal lines and nine vertical lines, the coordinates of “81 = 9 × 9” are associated. By making the feature points correspond to each other, the regions surrounded by the four feature points can be made to correspond to each other, and the projective transformation matrix H can be calculated.

なお、合成パターン画像の画素数が、合成パターンの画素数と一致しない場合は、合成パターン画像の画素数を合成パターンの画素数に一致させ、両者を同じサイズに正規化しておく。   If the number of pixels of the composite pattern image does not match the number of pixels of the composite pattern, the number of pixels of the composite pattern image is matched with the number of pixels of the composite pattern, and both are normalized to the same size.

〔射影変換行列Hの算出〕
図20は、射影変換行列Hの算出を説明するための図の一例である。補正係数算出部20は、まず、図19の特徴点の対応に基づき、各領域毎に対応付けを行う。合成パターン画像の1メッシュと合成パターンの1メッシュの対応関係は、射影変換で記述する。パターン画像の点をmp=(xp,yp)、撮像画像の点をmc(xc,yc)とすると射影変換により点mpはmcを用いて以下のように表すことができる。
[Calculation of projective transformation matrix H]
FIG. 20 is an example of a diagram for explaining the calculation of the projective transformation matrix H. First, the correction coefficient calculation unit 20 performs association for each region based on the correspondence of the feature points in FIG. The correspondence between one mesh of the composite pattern image and one mesh of the composite pattern is described by projective transformation. If the point of the pattern image is mp = (xp, yp) and the point of the captured image is mc (xc, yc), the point mp can be expressed as follows using projective transformation using mc.

Figure 2015139006
h1〜h8は未知の射影変換パラメータである。また、同次座標を用いて次のように表現できる。
Figure 2015139006
h1 to h8 are unknown projective transformation parameters. Also, it can be expressed as follows using homogeneous coordinates.

Figure 2015139006
Hが射影変換行列である。
Figure 2015139006
H is a projective transformation matrix.

また、パターン画像のパターン要素と投影パターン画像のパターン要素同士の1つの対応点から以下の拘束が得られる。   Further, the following constraint is obtained from one corresponding point between the pattern elements of the pattern image and the pattern elements of the projection pattern image.

Figure 2015139006
この式により、8つの未知パラメータに対して2つの拘束が得られる。したがって、1つのメッシュの頂点である4つの対応点が得られればHの全ての要素を決定できる。射影変換の式は、全画素の対応関係を記録したテーブルとして保持しておくことができる。
Figure 2015139006
This equation gives two constraints on the eight unknown parameters. Therefore, if four corresponding points that are the vertices of one mesh are obtained, all elements of H can be determined. The expression for projective transformation can be held as a table in which the correspondence of all pixels is recorded.

図21は、投影画像の補正について説明する図の一例である。投影されるコンテンツの投影画像の補正は、プロジェクタ100が投影する投影画像を予め変形させることで行う。まず、補正係数算出部20は、撮像画像内でパターン画像の領域が長方形になるように投影領域を決める。投影領域は、パターン画像の最大内接長方形とする。ただし、投影対象物のアスペクト比と同じとすることが好ましいので、実際には最大内接長方形よりも小さくなる。したがって、補正された投影画像は、元の投影画像よりも小さくなる。   FIG. 21 is an example of a diagram illustrating correction of a projected image. The projection image of the content to be projected is corrected by deforming the projection image projected by the projector 100 in advance. First, the correction coefficient calculation unit 20 determines the projection area so that the pattern image area is rectangular in the captured image. The projection area is the maximum inscribed rectangle of the pattern image. However, since it is preferable to have the same aspect ratio as the projection object, the aspect ratio is actually smaller than the maximum inscribed rectangle. Therefore, the corrected projection image becomes smaller than the original projection image.

以下では、補正画像上の点Aの画素値を、投影画像から読み出して決定する手順を説明する。
(1)まず、点Aが撮像画像上のどの位置にあたるかを決定する。この点を点Acと呼ぶ。射影変換により点Acの座標(xc、yc)をパターン画像の点Apに変換することができたので、射影変換とは逆に点Apの座標を撮像画像の点Acの座標に変換できる。点Acの座標(xc、yc)は、撮像画像の左上を原点(0,0)とした座標系の座標である。
(2)次に、求めた撮像画像の点Acが、投影領域内ではどの位置に相当するかを算出する。投影領域の左上を原点(x0,y0)とする。この原点に対する点Acの座標を(xc1,yc1)とする。
(3)点Acに対応する元の画像(投影画像)の点Apの座標を(xp、yp)とする。投影領域は元の画像とアスペクト比が一致し、大きさだけが異なるので、投影画像の横方向の長さWpと撮像画像の投影領域の横方向の長さWcから、点Apの座標は以下のように表すことができる。
(xp、yp)=Wp/Wc(xc1,yc1) …(a)
(4)撮像画像における投影領域の原点は(x0,y0)なので、点Acの座標値は以下のように表すことができる。
(xc、yc)=(x0,y0)+(xc1,yc1) …(b)
(5) 点Acの座標(xc、yc)は求められているので、式(b)により(xc1,yc1)が求められ、式(a)により点Apの座標(xp、yp)を求めることができる。この座標(xp、yp)の画素値を、補正画像の点Aの画素値とする。
Hereinafter, a procedure for reading and determining the pixel value of the point A on the corrected image from the projection image will be described.
(1) First, the position on the captured image where the point A corresponds is determined. This point is called a point Ac. Since the coordinates (xc, yc) of the point Ac can be converted to the point Ap of the pattern image by the projective transformation, the coordinates of the point Ap can be converted to the coordinates of the point Ac of the captured image contrary to the projective transformation. The coordinates (xc, yc) of the point Ac are coordinates in the coordinate system with the upper left corner of the captured image as the origin (0, 0).
(2) Next, it is calculated which position in the projection area the point Ac of the obtained captured image corresponds to. The upper left of the projection area is the origin (x0, y0). The coordinates of the point Ac with respect to this origin are (xc1, yc1).
(3) Let the coordinates of the point Ap of the original image (projection image) corresponding to the point Ac be (xp, yp). Since the projection area has the same aspect ratio as the original image and is different only in size, the coordinates of the point Ap are as follows from the horizontal length Wp of the projection image and the horizontal length Wc of the projection area of the captured image: It can be expressed as
(Xp, yp) = Wp / Wc (xc1, yc1) (a)
(4) Since the origin of the projection area in the captured image is (x0, y0), the coordinate value of the point Ac can be expressed as follows.
(Xc, yc) = (x0, y0) + (xc1, yc1) (b)
(5) Since the coordinates (xc, yc) of the point Ac are obtained, (xc1, yc1) is obtained from the equation (b), and the coordinates (xp, yp) of the point Ap are obtained from the equation (a). Can do. The pixel value of the coordinates (xp, yp) is set as the pixel value of the point A of the corrected image.

なお、点Aに対応する点Apの座標は整数とは限らないので、その場合は点Apの周囲の画素の画素値から補間して求める。   Note that the coordinates of the point Ap corresponding to the point A are not necessarily integers. In this case, the coordinates are obtained by interpolation from the pixel values of the pixels around the point Ap.

したがって、射影変換の式、投影領域、式(a)(b)などが補正情報に相当する。なお、補正情報の算出については、「投影画像の幾何補正に関する実験的検討」,計測自動制御学会東北支部第235回研究集会(2007.5.18)に記載がある。   Therefore, the projection transformation formula, projection area, formulas (a) and (b), and the like correspond to the correction information. The calculation of correction information is described in “Experimental study on geometric correction of projected image”, Society of Instrument and Control Engineers Tohoku Branch 235th Research Meeting (2007.5.18).

以上説明したように、本実施例の情報処理装置99は、点パターンではなく複数の線を有する投影パターンで投影画像の補正係数を算出するので、欠損部があっても補間が可能になる。また、点パターンの点は離散的だが、線は連続しているので、欠損していても近傍にある線の端点を用いて補間することができる。したがって、補正の精度が向上し、スクリーンに凹凸があったり投影パターンを高画質に撮影できなくても安定して射影変換行列Hを算出できる。   As described above, since the information processing apparatus 99 according to the present embodiment calculates the correction coefficient of the projection image using a projection pattern having a plurality of lines instead of a point pattern, interpolation is possible even if there is a missing portion. Further, although the points of the point pattern are discrete, the lines are continuous, so even if they are missing, interpolation can be performed using the end points of the nearby lines. Therefore, the accuracy of correction is improved, and the projection transformation matrix H can be calculated stably even if the screen has irregularities or the projection pattern cannot be photographed with high image quality.

実施例1では欠損部の補間を直線で行ったが、本実施例では3次スプライン曲線で結ぶ情報処理装置99について説明する。スプライン曲線は滑らかな補間ができることが特徴である。スクリーンの歪みは極端な折れ曲がりがない限り滑らかな変動により生じるので、直線補間の場合に発生しがちな端点部での急な方向変化(線パターンの折れ曲がり)が発生せず、補正の精度を向上させることができる。   In the first embodiment, the missing portion is interpolated by a straight line. In this embodiment, an information processing apparatus 99 connected by a cubic spline curve will be described. The spline curve is characterized by smooth interpolation. Screen distortion is caused by smooth fluctuations as long as there is no extreme bend, so there is no sudden direction change (bending of the line pattern) at the end point that tends to occur in the case of linear interpolation, improving the accuracy of correction. Can be made.

また、本実施例において、実施例1にて説明した構成要素は同様の機能を果たすので、主に本実施例の主要な構成要素についてのみ説明する場合がある。   In the present embodiment, the components described in the first embodiment perform the same function, and therefore, only the main components of the present embodiment may be mainly described.

図22は、図14のステップS4の特徴点抽出処理の手順を説明するフローチャート図の一例である。図22は、図16のステップS4−7の処理がS4−71〜4−73におき変わっている。   FIG. 22 is an example of a flowchart for explaining the procedure of the feature point extraction process in step S4 of FIG. In FIG. 22, the process of step S4-7 in FIG. 16 is changed to S4-71 to 4-73.

ステップS4−6において線パターン領域61の線分に欠損部がある場合、パターン補間部15は欠損部よりも手前の部分の座標値を1つずつ(計2つ)求める(S4−71)。   If there is a missing part in the line segment of the line pattern area 61 in step S4-6, the pattern interpolation part 15 obtains the coordinate values of the part in front of the missing part one by one (two in total) (S4-71).

図23(a)は、欠損部よりも手前の点の座標値を説明する図の一例である。この点を、座標取得点と称す。欠損部を中心に左側の端点305よりさらに左側の点が座標取得点311であり、欠損部を中心に右の端点306よりさらに右側の点が座標取得点312である。   FIG. 23A is an example of a diagram illustrating the coordinate value of a point in front of the missing part. This point is referred to as a coordinate acquisition point. A point further to the left of the left end point 305 centering on the missing portion is the coordinate acquisition point 311, and a point further to the right of the right end point 306 centering on the missing portion is the coordinate acquisition point 312.

端点からどのくらい離れた点を座標取得点とするかは、例えば、投影パターンの隣接する線同士の距離程度にする。なお、この距離の位置に黒画素がない場合は、該位置から最も近い黒画素を選ぶ。   How far away from the end point is the coordinate acquisition point is, for example, about the distance between adjacent lines of the projection pattern. If there is no black pixel at this distance, the black pixel closest to the position is selected.

次に、パターン補間部15は2つの端点305,306と、2つの座標取得点311の計4つの座標を使って、3次スプライン曲線を求める(S4−72)。3次スプライン曲線は、4つの座標の間にある3つの区間が、それぞれ独立した3次曲線で結ばれる曲線を作成するという考え方に基づく。求める区間は3つ(うち真ん中の区間が補間対象)なので、それぞれの部分区間の両端を通る3次直線の式を3つ求めることを考える。それぞれの直線の式を
y = a1x^3 +b1x^2+c1x+d1
y = a2x^3 +b2x^2+c2x+d2
y = a3x^3 +b3x^2+c3x+d3
などとおき、それぞれの区間の境界点(この場合は端点と座標取得点)で座標値が一致することを使ってa1~a3,b1~b3,c1~c3,d1~d3を変数とする連立方程式を立てる。これにより、6個の式が得られる。
Next, the pattern interpolation unit 15 obtains a cubic spline curve by using a total of four coordinates of the two end points 305 and 306 and the two coordinate acquisition points 311 (S4-72). A cubic spline curve is based on the idea that three sections between four coordinates are connected by independent cubic curves. Since there are three sections to be obtained (of which the middle section is to be interpolated), it is assumed that three cubic straight-line equations passing through both ends of each partial section are obtained. Each straight line equation
y = a1x ^ 3 + b1x ^ 2 + c1x + d1
y = a2x ^ 3 + b2x ^ 2 + c2x + d2
y = a3x ^ 3 + b3x ^ 2 + c3x + d3
Using the fact that the coordinate values match at the boundary points of each section (in this case, the end points and the coordinate acquisition points), a1 ~ a3, b1 ~ b3, c1 ~ c3, d1 ~ d3 Establish an equation. As a result, six equations are obtained.

続いて、3つの曲線が端点と座標取得点で滑らかに接続されるように、それぞれの微分、2階微分が端点又は座標取得点で一致するように式を立てる。これで4個の式が得られる。変数の数に対し式の数が足りないのでさらに端点前後の2点の2次微分が0になる条件を加える。これにより式が12個できるので12元1次連立方程式を解くことで変数a1~a3,b1~b3,c1~c3,d1~d3を決定できる。   Subsequently, an equation is established so that the respective derivatives and second-order derivatives coincide at the end points or the coordinate acquisition points so that the three curves are smoothly connected at the end points and the coordinate acquisition points. This gives four equations. Since the number of formulas is not enough for the number of variables, a condition is added in which the second derivative before and after the end point becomes zero. As a result, twelve equations can be obtained, so that the variables a1 to a3, b1 to b3, c1 to c3, and d1 to d3 can be determined by solving the 12-ary linear simultaneous equations.

なお、スプライン曲線は3次でなく4次以上でもよいし、3次スプライン曲線を算出する際の座標取得点の数を増やしてもよい。   Note that the spline curve may not be cubic but may be quaternary or higher, and the number of coordinate acquisition points when calculating the cubic spline curve may be increased.

パターン補間部15は、求めた3つの曲線の式のうち欠損部の式を使って、欠損部を補間する(S4−73)。すなわち、パターン画像A,Bの欠損部をスプライン直線の黒画素で埋める。以降の処理は、図16のステップS4−8と同様である。   The pattern interpolation unit 15 interpolates the missing part using the missing part expression among the obtained three curve equations (S4-73). That is, the missing portions of the pattern images A and B are filled with black pixels of spline straight lines. The subsequent processing is the same as step S4-8 in FIG.

図23(b)はスプライン曲線による欠損部の補間例を示す図の一例である。スプライン曲線で補間することで水平線301と302を滑らかに補間できる。なお、スプライン曲線以外に、ラグランジュ補間やエルミート補間を使用してもよい。   FIG. 23B is an example of a diagram illustrating an example of interpolation of a missing portion by a spline curve. By interpolating with the spline curve, the horizontal lines 301 and 302 can be smoothly interpolated. In addition to the spline curve, Lagrange interpolation or Hermite interpolation may be used.

また、図23(a)では、欠損部の左右に水平線が検出されていると仮定したが、一方の端点に水平線がない場合も考えられる。すなわち、欠損部303があっても端点が1つしかない。   Further, in FIG. 23A, it is assumed that a horizontal line is detected on the left and right of the missing part, but there may be a case where there is no horizontal line at one end point. That is, there is only one end point even if the missing portion 303 exists.

図24は、水平線の欠損部303の右側に端点がない水平線の一例を示す図である。この場合は、図24(a)に示すように、水平線がある側で端点のほかに3つの座標取得点313を求め同じ処理を行う。そして、図24(b)に示すように、一番外側(端点側)の区間(最右の座標取得点313と端点305の間)のスプライン曲線により、水平線のX座標の最後まで外挿を行う。こうすることで、欠損部の一方に端点306がなくても補間することができる。   FIG. 24 is a diagram illustrating an example of a horizontal line having no end point on the right side of the horizontal line defect portion 303. In this case, as shown in FIG. 24A, three coordinate acquisition points 313 are obtained in addition to the end points on the side where the horizontal line exists, and the same processing is performed. Then, as shown in FIG. 24B, extrapolation is performed to the end of the X coordinate of the horizontal line by the spline curve in the outermost (end point side) section (between the rightmost coordinate acquisition point 313 and the end point 305). Do. By doing so, it is possible to perform interpolation even if there is no end point 306 in one of the missing portions.

なお、実施例1においても、欠損部に端点が1つしかない場合は、例えば水平線の端点にX軸方向に平行な直線を外挿することができる。同様に、垂直線の端点にY軸方向に平行な直線を外挿することができる。   In the first embodiment as well, when the missing portion has only one end point, for example, a straight line parallel to the X-axis direction can be extrapolated to the end point of the horizontal line. Similarly, a straight line parallel to the Y-axis direction can be extrapolated to the end point of the vertical line.

以上説明したように、本実施例によれば、実施例1の効果に加え、直線による補間の場合に欠損部で発生しうる水平線の急な方向変化が発生しにくいので補正精度を向上できる。   As described above, according to the present embodiment, in addition to the effects of the first embodiment, it is possible to improve the correction accuracy because it is difficult for a sudden change in the direction of the horizontal line that may occur at the missing portion in the case of interpolation using a straight line.

本実施例では、欠損部がある水平線・垂直線だけでなく、隣り合う水平線・垂直線をも用いて欠損部を補間する情報処理装置99について説明する。   In the present embodiment, an information processing apparatus 99 that interpolates a missing part using not only a horizontal line / vertical line with a missing part but also adjacent horizontal lines / vertical lines will be described.

図25は、本実施例の欠損部の補間について説明する図の一例である。図示するように上からn番目の水平線の一部が欠損しているものとする。この場合、パターン補間部15は、上側に隣接した上からn−1番目の水平線と、下側に隣接した上からn+1番目の水平線を使用して欠損部を補間する。   FIG. 25 is an example of a diagram for explaining the interpolation of the missing part in the present embodiment. It is assumed that a part of the nth horizontal line from the top is missing as shown. In this case, the pattern interpolation unit 15 interpolates the missing part using the (n−1) th horizontal line from the top adjacent to the upper side and the (n + 1) th horizontal line from the top adjacent to the lower side.

欠損している水平線のX座標の範囲は既知なので、このX座標の範囲で、補間したいX座標と同じX座標を持つ、n-1番目とn+ 1番目の水平線の参照点307のY座標を参照し、2つの参照点307のY座標の中点(平均)を算出する。   Since the range of the X coordinate of the missing horizontal line is known, the Y coordinate of the reference point 307 of the (n−1) th and (n + 1) th horizontal lines having the same X coordinate as the X coordinate to be interpolated in this X coordinate range. With reference, the midpoint (average) of the Y coordinates of the two reference points 307 is calculated.

すなわち、欠損部内の任意のX座標において、n-1番目の水平線のY座標をY(n−1)、n+1番目の水平線のY座標をY(n+1)とする。したがって、n番目の水平線のY座標であるY(n)は、以下の演算により表すことができる。
Y(n)={Y(n−1)+Y(n+1)}/2
本実施例の補間方法では、1本の水平線が長く欠損している場合でも、隣接する水平線の座標を使うことで精度よく補間することが可能となる。
That is, in an arbitrary X coordinate in the missing part, the Y coordinate of the (n−1) th horizontal line is Y (n−1), and the Y coordinate of the (n + 1) th horizontal line is Y (n + 1). Therefore, Y (n) that is the Y coordinate of the nth horizontal line can be expressed by the following calculation.
Y (n) = {Y (n-1) + Y (n + 1)} / 2
In the interpolation method of the present embodiment, even when one horizontal line is missing for a long time, it is possible to accurately interpolate by using the coordinates of adjacent horizontal lines.

また、図25(b)に示すように、隣接していない水平線の参照点を用いて補間してもよい。n-2番目の水平線のY座標をY(n−2)、n+1番目の水平線のY座標をY(n+1)とする。水平線の間隔がほぼ等間隔であることを利用して、n番目の水平線のY座標であるY(n)は以下のように表すことができる。
Y(n)={Y(n−2)+2Y(n+1)}/3
図25(b)ではn−1番目の水平線に欠損部がないので、このような算出は不要であるが、n−1番目の水平線が欠損している場合(隣接した水平線の欠損部が重複している場合)、n−2番目とn+1番目の水平線で補間することができる。したがって、補間には必ずしも隣接した水平線を使用しなければならないわけではない。
Further, as shown in FIG. 25B, interpolation may be performed using reference points of non-adjacent horizontal lines. The Y coordinate of the (n−2) th horizontal line is Y (n−2), and the Y coordinate of the (n + 1) th horizontal line is Y (n + 1). Using the fact that the intervals of the horizontal lines are substantially equal, Y (n) which is the Y coordinate of the nth horizontal line can be expressed as follows.
Y (n) = {Y (n-2) + 2Y (n + 1)} / 3
In FIG. 25B, since there is no missing portion in the (n−1) th horizontal line, such a calculation is not necessary, but when the n−1th horizontal line is missing (the missing portion in the adjacent horizontal line overlaps). ), It can be interpolated with the (n−2) th and (n + 1) th horizontal lines. Therefore, it is not always necessary to use adjacent horizontal lines for interpolation.

一方、図26のように隣接した水平線の欠損部が重複している場合、図27のように補間することも有効である。図26に示すように、n−1番目又はn+1番目の水平線の片方が、n番目の水平線と共に欠損している場合がある。図26は、n番目とn+1番目の水平線が欠損している場合の補間を説明する図の一例である。n番目とn+1番目の水平線の欠損部に重複した部分があるため、本実施例の方法ではn番目の水平線の欠損部を補間できない(n+1番目の水平線の欠損部も補間できない。)。   On the other hand, when adjacent horizontal lines are overlapped as shown in FIG. 26, interpolation as shown in FIG. 27 is also effective. As shown in FIG. 26, one of the (n−1) th and (n + 1) th horizontal lines may be missing together with the nth horizontal line. FIG. 26 is an example of a diagram illustrating interpolation when the nth and (n + 1) th horizontal lines are missing. Since there are overlapping portions in the nth and n + 1th horizontal line deficits, the method of this embodiment cannot interpolate the nth horizontal line deficit (the n + 1th horizontal line deficit cannot be interpolated).

この場合、パターン補間部15は、実施例1又は2の方法で補間する。すなわち、本実施例の方法で優先的に補間して、隣接した水平線の欠損部が重複している部分では、補間を行わずに保留にしておく。そして、その後、実施例1又は2の方法(内挿又は外挿)で補間する。   In this case, the pattern interpolation unit 15 performs interpolation by the method of the first or second embodiment. That is, interpolation is performed preferentially by the method of the present embodiment, and a portion where adjacent horizontal line missing portions are overlapped is held without being interpolated. Thereafter, interpolation is performed by the method of the first or second embodiment (interpolation or extrapolation).

図27は、本実施例と実施例1又は2を組み合わせた場合の補間について説明する図の一例である。図27(a)はn番目の水平線の欠損部の一部の補間を説明する図の一例である。「n番目の水平線の欠損部の長さ>n+1番目の水平線の欠損部の長さ」の関係があるので、n+1番目の水平線が検出されている範囲321,322では、図25の方法でn番目の水平線の欠損部を補間できる。   FIG. 27 is an example of a diagram illustrating interpolation when the present embodiment and the first or second embodiment are combined. FIG. 27A is an example for explaining the interpolation of a part of the missing part of the nth horizontal line. Since there is a relationship of “the length of the missing portion of the n-th horizontal line> the length of the missing portion of the n + 1-th horizontal line”, in the ranges 321 and 322 where the n + 1-th horizontal line is detected, the method of FIG. Interpolate the missing part of the horizon.

n番目とn+1番目の水平線の両方が欠損している範囲323については保留される。これにより、図27(b)に示すように、n番目の水平線の欠損部の一部(n+1番目の水平線がある範囲321,322)では水平線が補間される。   A range 323 in which both the nth and n + 1th horizontal lines are missing is reserved. As a result, as shown in FIG. 27B, the horizontal line is interpolated in a part of the missing part of the nth horizontal line (ranges 321 and 322 where the n + 1th horizontal line is present).

こうすることで、水平線が長く欠損している場合でも、n番目の水平線の欠損部の一部は、高精度に補間できる。   In this way, even when the horizontal line is long missing, a part of the missing part of the nth horizontal line can be interpolated with high accuracy.

また、パターン補間部15は、欠損したままの範囲323を実施例1又は2の方法で補間するので、n番目の水平線の欠損部の全てとn+1番目の水平線の欠損部を補間することができる。   In addition, since the pattern interpolation unit 15 interpolates the missing range 323 by the method of the first or second embodiment, it is possible to interpolate all of the nth horizontal line deficiency and the n + 1th horizontal line deficiency. .

n+1番目の水平線の欠損部については、n番目の水平線と同様に、実施例1又は2の方法で補間される。   The missing portion of the (n + 1) th horizontal line is interpolated by the method of the first or second embodiment, similarly to the nth horizontal line.

ところで、図28に示すように、最も上又は下の水平線(最外の水平線)が完全に検出されない場合も生じうる。図28は、最も上の水平線が完全に検出されない場合の補間について説明する図の一例である。   By the way, as shown in FIG. 28, the uppermost or lowermost horizontal line (outermost horizontal line) may not be detected completely. FIG. 28 is an example of a diagram illustrating interpolation when the uppermost horizontal line is not completely detected.

1番目の水平線よりも上側には水平線が存在しないので、本実施例の補間が困難になる。そこで、最も上又は下の水平線が完全に検出されない場合は、パターン補間部は、2,3番目の水平線の座標から外挿して1番目の水平線の座標を求める。2番目の水平線のY座標はY(2)、3番目の水平線のY座標はY(3)である。したがって、水平線の間隔は「Y(3)−Y(2)」である。1番目の水平線と2番目の水平線のY方向の距離も同程度なので、Y(1)は以下のようにして求めることができる。
Y(1)=Y(2)−{Y(3)−Y(2)}
なお、図28では1番目の全ての水平線が欠損しているが、1番目の水平線の一部が欠損している場合も同様に補間できる。
Since there is no horizontal line above the first horizontal line, the interpolation of this embodiment becomes difficult. Therefore, when the uppermost or lowermost horizontal line is not completely detected, the pattern interpolation unit extrapolates from the coordinates of the second and third horizontal lines to obtain the coordinates of the first horizontal line. The Y coordinate of the second horizontal line is Y (2), and the Y coordinate of the third horizontal line is Y (3). Therefore, the interval between the horizontal lines is “Y (3) −Y (2)”. Since the first horizontal line and the second horizontal line have the same distance in the Y direction, Y (1) can be obtained as follows.
Y (1) = Y (2)-{Y (3) -Y (2)}
In FIG. 28, all the first horizontal lines are missing, but the interpolation can be similarly performed when a part of the first horizontal line is missing.

図29は、図14のステップS4の特徴点抽出処理の手順を説明するフローチャート図の一例である。本実施例では、隣り合う水平線又は垂直線を使って補間できるところは全て補間し、その後、改めて欠損部を探して、実施例1又は2のように欠損部の前後の水平線又は垂直線を使って補間を行う。このため、ステップS4−7aとS4−23の2つのステップで補間処理が行われる。以下、主要なステップを説明する。   FIG. 29 is an example of a flowchart for explaining the procedure of the feature point extraction process in step S4 of FIG. In this embodiment, all the places that can be interpolated using adjacent horizontal lines or vertical lines are interpolated, and then the missing portion is searched again, and the horizontal lines or vertical lines before and after the missing portion are used as in the first or second embodiment. Interpolation. For this reason, the interpolation processing is performed in two steps of steps S4-7a and S4-23. The main steps are described below.

ステップS4−6において線パターン領域61の線分に欠損部がある場合、パターン補間部15は欠損している水平線の両隣の水平線から欠損部を補間する(S4−7a)。この処理を、全ての欠損部と全ての水平線に対して行う(S4−8、S4−9)。また、垂直線についても同じ処理を行う(S4−10)。   If there is a missing portion in the line segment of the line pattern region 61 in step S4-6, the pattern interpolation unit 15 interpolates the missing portion from the horizontal lines adjacent to the missing horizontal line (S4-7a). This process is performed for all missing portions and all horizontal lines (S4-8, S4-9). The same process is performed for the vertical line (S4-10).

次に、残っている欠損部を検出し、補間するため、ステップS4−5、S4−6が行われる。すなわち、対応点抽出部18は、線パターン領域61内の黒画素を抽出し、連続している黒画素を抽出する(S4−5)。   Next, steps S4-5 and S4-6 are performed in order to detect and interpolate the remaining missing part. That is, the corresponding point extraction unit 18 extracts black pixels in the line pattern region 61 and extracts continuous black pixels (S4-5).

対応点抽出部18は、帯領域1〜8の境界の線パターン領域61から水平線が欠損している線パターン領域61を検出する(S4−6)。   The corresponding point extraction unit 18 detects the line pattern region 61 in which the horizontal line is missing from the line pattern region 61 at the boundary of the band regions 1 to 8 (S4-6).

そして、パターン補間部15は、実施例1又は2の方法で欠損部を補間する(S4−23)。   And the pattern interpolation part 15 interpolates a missing part by the method of Example 1 or 2 (S4-23).

以降は、S4−23の処理を、全ての欠損部と全ての水平線に対して行う(S4−24、S4−25)。また、垂直線についても同じ処理を行う(S4−26)。   Thereafter, the process of S4-23 is performed for all the missing portions and all the horizontal lines (S4-24, S4-25). The same process is performed for the vertical line (S4-26).

対応点抽出部18は、パターン画像A,Bを合成する(S4−11)。対応点抽出部18は、交点を特徴点として補正係数算出部20に出力する(S4−12)。   The corresponding point extraction unit 18 combines the pattern images A and B (S4-11). The corresponding point extraction unit 18 outputs the intersection as a feature point to the correction coefficient calculation unit 20 (S4-12).

したがって、本実施例の情報処理装置99は、1本の水平線又は垂直線が長く欠損している場合でも、隣接する水平線又は垂直線を使うことにより、精度よく補間することが可能となる。   Therefore, even when one horizontal line or vertical line is long missing, the information processing apparatus 99 according to the present embodiment can accurately interpolate by using the adjacent horizontal line or vertical line.

プロジェクタ100が投影した投影パターンとパターン撮像部11がパターン画像による歪み補正では、ユーザが情報処理装置99(パターン撮像部)の位置にいることが前提であった。このため、ユーザの位置が固定されるなどの不都合が生じる場合がある。   In the distortion correction using the projection pattern projected by the projector 100 and the pattern imaging unit 11 by the pattern image, it is assumed that the user is at the position of the information processing apparatus 99 (pattern imaging unit). For this reason, inconveniences such as fixing the position of the user may occur.

そこで、本実施例では、投影対象物の3次元計測を行い得られた3次元情報を用いた歪み補正を行うことで、ユーザが位置を移動しても視聴可能な歪み補正について説明する。   In this embodiment, therefore, distortion correction that can be viewed even when the user moves the position by performing distortion correction using three-dimensional information obtained by performing three-dimensional measurement of the projection target will be described.

3次元計測を行うため、本実施例では、情報処理装置99の機能が搭載されたプロジェクタ100による投影画像の補正について説明する。   In order to perform three-dimensional measurement, in this embodiment, correction of a projected image by the projector 100 equipped with the function of the information processing apparatus 99 will be described.

図30は、プロジェクタ100のハードウェア構成と機能ブロックを説明する図の一例である。なお、プロジェクタ100は図7の情報処理装置99と同様のハードウェア構成を有している。   FIG. 30 is an example of a diagram for explaining the hardware configuration and functional blocks of the projector 100. The projector 100 has the same hardware configuration as the information processing apparatus 99 in FIG.

図示するように、投影画像は、プロジェクタ100の記憶部22に記憶されている。記憶部22は、例えばUSBメモリなどの着脱可能な可搬型のメモリである。また、プロジェクタ100に接続されたPCが投影画像をプロジェクタ100に送信してもよい。プロジェクタ100とPCは、HDMI(登録商標)などの映像ケーブルで接続されてもよいし、無線LANなどの無線通信で接続されてもよい。   As illustrated, the projection image is stored in the storage unit 22 of the projector 100. The storage unit 22 is a removable portable memory such as a USB memory. Further, a PC connected to the projector 100 may transmit the projection image to the projector 100. The projector 100 and the PC may be connected by a video cable such as HDMI (registered trademark) or may be connected by wireless communication such as a wireless LAN.

また、プロジェクタ100は、3次元形状計測部23及び透視投影行列算出部24を有している。3次元形状計測部23は投影対象物の3次元形状の計測を行う(距離情報の取得を行う)。また、透視投影行列算出部24は透視投影行列を算出する。   In addition, the projector 100 includes a three-dimensional shape measurement unit 23 and a perspective projection matrix calculation unit 24. The three-dimensional shape measurement unit 23 measures the three-dimensional shape of the projection target (acquires distance information). Further, the perspective projection matrix calculation unit 24 calculates a perspective projection matrix.

図31は、本実施例の情報処理装置99の処理手順について説明する図の一例である。本実施例では、図14のステップS4にて対応点抽出後、3次元形状計測部23が3次元計測を行い、透視投影行列を算出し、それにより得られた仮想位置のプロジェクタの撮像画像(パターン画像)を用いて、補正係数算出部20が射影変換行列Hを算出する。以下、順に説明する。   FIG. 31 is an example of a diagram illustrating the processing procedure of the information processing apparatus 99 according to the present embodiment. In this embodiment, after extracting corresponding points in step S4 of FIG. 14, the three-dimensional shape measurement unit 23 performs three-dimensional measurement, calculates a perspective projection matrix, and obtains a captured image of the projector at the virtual position obtained thereby ( Using the pattern image, the correction coefficient calculation unit 20 calculates the projective transformation matrix H. Hereinafter, it demonstrates in order.

・S100
まず、図32を用いて3次元形状の計測について説明する。図32(a)は、3次元形状の計測について説明する図の一例である。投影素子上の点Aが、撮像素子上で点Bにて撮像されたとすると、点Aと点Bの水平方向の距離の差が視差dに相当する。
・ S100
First, measurement of a three-dimensional shape will be described with reference to FIG. FIG. 32A is an example of a diagram for explaining measurement of a three-dimensional shape. If the point A on the projection element is imaged at the point B on the image sensor, the difference in the horizontal distance between the point A and the point B corresponds to the parallax d.

図32(b)に示すように、投影素子(DMD)は投影パターン(投影画像)を投影し、パターン撮像部11はパターン画像(撮像画像)を撮像している。また、上述のようにメッシュの交点同士の対応が検出されている。したがって、視差dは対応する交点の水平方向の距離として求められる。交点と交点の間の画素の視差は、隣接した交点の視差を線形補間することなどで求められる。   As shown in FIG. 32B, the projection element (DMD) projects a projection pattern (projection image), and the pattern imaging unit 11 captures a pattern image (captured image). Further, as described above, the correspondence between the mesh intersections is detected. Accordingly, the parallax d is obtained as the horizontal distance between the corresponding intersections. The parallax of the pixels between the intersections can be obtained by linearly interpolating the parallax between the adjacent intersections.

基線長(投影素子と撮像素子の距離)をDとすると三角測量の原理によりスクリーン上の投影点までの距離Zを求めることができる。なお、fは撮像手段110の焦点距離である。
Z = Df/d
したがって、プロジェクタから見たスクリーン上の投影画像の画素毎に(又は適当な画素ブロック毎に)三次元座標を算出することができる。
When the base line length (distance between the projection element and the imaging element) is D, the distance Z to the projection point on the screen can be obtained by the principle of triangulation. Note that f is a focal length of the imaging unit 110.
Z = Df / d
Therefore, the three-dimensional coordinates can be calculated for each pixel of the projected image on the screen viewed from the projector (or for each appropriate pixel block).

・S200
これで、撮像手段110上の撮像画像と投影対象物上の投影画像との対応が得られた。しかし、撮像手段上の撮像画像は、画素間に画素ピッチが配置された画素単位で構成されている。また、投影画像の中心位置や画素の縦横比などは撮像手段110に固有である。これらカメラ内部パラメータのため、得られた撮像手段上の撮像画像と投影対象物上の投影画像の対応は、単純に焦点距離fだけでは表せないと考えられる。
・ S200
Thus, correspondence between the captured image on the imaging unit 110 and the projected image on the projection object is obtained. However, the captured image on the imaging unit is configured in units of pixels in which a pixel pitch is arranged between pixels. Further, the center position of the projected image, the aspect ratio of the pixels, and the like are specific to the imaging unit 110. Because of these camera internal parameters, the correspondence between the obtained captured image on the imaging means and the projected image on the projection object cannot be expressed simply by the focal length f.

そこで、カメラの内部パラメータを考慮して、透視投影行列算出部24は、撮像手段上の撮像画像と投影対象物上の投影画像の対応関係を求める。   Therefore, the perspective projection matrix calculation unit 24 calculates the correspondence between the captured image on the imaging unit and the projected image on the projection target in consideration of the internal parameters of the camera.

図33(a)は、撮像手段の座標系を模式的に示している。撮像手段の座標系をカメラ座標系という。まず、上記の焦点距離fを用いた撮像手段上の撮像画像と投影対象物上の投影画像の対応について説明する。例えば、撮像手段の中央を原点とする座標系(Xc,Yc,Zc)をカメラ座標系とする。カメラ座標系の三次元空間の点Mは、焦点距離fにより撮像手段の画素上の点M'(u'、v')に対応づけられる。このような関係を投影と称する。   FIG. 33A schematically shows the coordinate system of the imaging means. The coordinate system of the imaging means is called a camera coordinate system. First, the correspondence between the captured image on the imaging means using the focal length f and the projected image on the projection target will be described. For example, a coordinate system (Xc, Yc, Zc) with the center of the imaging means as the origin is taken as the camera coordinate system. The point M in the three-dimensional space of the camera coordinate system is associated with the point M ′ (u ′, v ′) on the pixel of the imaging means by the focal length f. Such a relationship is called projection.

M'(u'、v') ← M(Xc,Yc,Zc)
この変換係数をAとすると式(4−1)のように表すことができる。なお、行列で取り扱うため式(4−1)は同次座標系で表している。
M ′ (u ′, v ′) ← M (Xc, Yc, Zc)
If this conversion coefficient is A, it can be expressed as in equation (4-1). Since it is handled as a matrix, equation (4-1) is expressed in a homogeneous coordinate system.

次に、カメラ内部パラメータAによる変換について説明する。図33(b)に示すように、カメラ内部パラメータAにより、点M'(u'、v')を撮像手段の点mに変換できる。したがって、
m=AM'
と表せる。カメラ内部パラメータAについては種々の表現があるが、例えば式(4−2)により点M'の並進とスケーリング(変倍)で表すことができる。
Next, conversion by the camera internal parameter A will be described. As shown in FIG. 33 (b), the point M ′ (u ′, v ′) can be converted to the point m of the imaging means by the camera internal parameter A. Therefore,
m = AM '
It can be expressed. Although there are various expressions for the camera internal parameter A, for example, it can be expressed by translation and scaling (magnification) of the point M ′ according to the equation (4-2).

ところで、このままではカメラ座標系の点Mをカメラ内部パラメータが考慮された画像座標の点mに変換できるが、点Mをカメラ座標系の中で扱わなければならない。プロジェクタを任意の場所に移動させる場合、プロジェクタの場所に関係ない共通の座標系(以下、ワールド座標系という)で点Mを表すことで、プロジェクタを移動させた場合にも適切に歪み補正された投影画像を投影できる。   By the way, although the point M in the camera coordinate system can be converted into the image coordinate point m in consideration of the camera internal parameters, the point M must be handled in the camera coordinate system. When the projector is moved to an arbitrary location, the point M is represented in a common coordinate system (hereinafter referred to as the world coordinate system) regardless of the location of the projector, so that the distortion is appropriately corrected even when the projector is moved. Projected images can be projected.

そこで、予めワールド座標系(Xw,Yw,Zw)をカメラ座標系の点M(Xc,Yc,Zc)に変換しておく。図33(c)に示すように三次元座標の変換は回転と並進で表すことができる。式(4−3)によりワールド座標系の点Mwが、回転・並進されたカメラ座標系の点Mに変換される。ワールド座標系の点Mwをカメラ座標系の点Mに変換する変換行列は回転部分のRと並進部分のtにより表す(この行列をR|Tと表す)。図のRはZ軸周りの回転の回転行列であり、X軸周り、Y軸周りの回転行列も同様に表すことができる。なお、この説明ではカメラ内部パラメータによる変換前にワールド座標系をカメラ座標系に変換しているが、カメラ内部パラメータによる変換後に、ワールド座標系をカメラ座標系に変換してもよい。   Therefore, the world coordinate system (Xw, Yw, Zw) is converted in advance to a point M (Xc, Yc, Zc) in the camera coordinate system. As shown in FIG. 33C, the transformation of the three-dimensional coordinates can be expressed by rotation and translation. The point Mw in the world coordinate system is converted into a point M in the camera coordinate system that has been rotated and translated by Expression (4-3). A transformation matrix for converting the point Mw in the world coordinate system to the point M in the camera coordinate system is represented by R in the rotation part and t in the translation part (this matrix is represented as R | T). R in the figure is a rotation matrix of rotation around the Z axis, and rotation matrices around the X axis and Y axis can be similarly expressed. In this description, the world coordinate system is converted to the camera coordinate system before conversion using the camera internal parameters. However, the world coordinate system may be converted to the camera coordinate system after conversion using the camera internal parameters.

したがって、「m=A×(R|T)×Mw」により、ワールド座標系の点を撮像手段上の点mに変換することができる。より詳細には、以下のようになる。   Therefore, a point in the world coordinate system can be converted to a point m on the imaging means by “m = A × (R | T) × Mw”. In more detail, it is as follows.

Figure 2015139006
また、
P=A×(R|T) …(4−5)
とおけば、m=P・Mwと表記できる。Pは透視投影行列と呼ばれる3×4の行列である。
Figure 2015139006
Also,
P = A × (R | T) (4-5)
Then, it can be expressed as m = P · Mw. P is a 3 × 4 matrix called a perspective projection matrix.

Figure 2015139006
変数(要素数)が12個あるが、三次元計測により、少なくとも交点の数(例えば81)の、Mwとmの対応が得られているので、12個全ての要素を求めることができる。
Figure 2015139006
Although there are twelve variables (number of elements), the correspondence between Mw and m of at least the number of intersections (for example, 81) is obtained by three-dimensional measurement, so that all twelve elements can be obtained.

・S300
式(4−6)により三次元空間の点が撮像画像上の点に変換されるが、ユーザが異なる視点から投影対象物を見る場合も、その視点における透視投影行列Pを求めれば、その位置で得られる撮像手段上の点を算出できる。
・ S300
Although the point in the three-dimensional space is converted into a point on the captured image by Expression (4-6), even when the user views the projection object from a different viewpoint, if the perspective projection matrix P at the viewpoint is obtained, the position It is possible to calculate the points on the imaging means obtained by

図34は、プロジェクタを仮想的に動かした場合の透視投影行列を説明する図の一例である。図ではプロジェクタの他に仮想プロジェクタ100Aが図示されている。プロジェクタを仮想プロジェクタ100Aの位置に仮想的に移動した場合の透視投影行列P2は行列(R|T)を、移動位置に応じて更新することで求めることができる。   FIG. 34 is an example of a diagram for explaining a perspective projection matrix when the projector is virtually moved. In the figure, a virtual projector 100A is shown in addition to the projector. The perspective projection matrix P2 when the projector is virtually moved to the position of the virtual projector 100A can be obtained by updating the matrix (R | T) according to the movement position.

カメラ内部パラメータAがキャリブレーションなどで分かっている場合、プロジェクタ100の位置を仮想プロジェクタ100Aの位置に移動した場合の(R|T)で式(4−5)のP=A×(R|T)を更新することで、仮想プロジェクタ100Aの位置にある場合透視投影行列を求めることができる。(R|T)は変位情報の一例である。   When the camera internal parameter A is known by calibration or the like, P = A × (R | T) in Expression (4-5) by (R | T) when the position of the projector 100 is moved to the position of the virtual projector 100A. ), The perspective projection matrix can be obtained when the virtual projector 100A is at the position. (R | T) is an example of displacement information.

また、カメラ内部パラメータAが知られていない場合、ワールド座標系に対するカメラ座標系の(R|T)を求め、式(4−5)に代入することでカメラ内部パラメータAを求めることができる。カメラ内部パラメータAが分かれば、式(4−5)に仮想プロジェクタ100Aの位置に移動した場合の(R|T)を代入して仮想プロジェクタ100Aの透視投影行列P2を求めることができる。   If the camera internal parameter A is not known, the camera internal parameter A can be obtained by obtaining (R | T) of the camera coordinate system with respect to the world coordinate system and substituting it into the equation (4-5). If the camera internal parameter A is known, the perspective projection matrix P2 of the virtual projector 100A can be obtained by substituting (R | T) when moved to the position of the virtual projector 100A into Expression (4-5).

・S400
仮想プロジェクタの透視投影行列P2が求められたら、透視投影行列算出部24は、仮想プロジェクタの撮像手段に投影対象物の投影画像を投影し、仮想プロジェクタ100Aの撮像手段が撮像した撮像画像を得ることができる。
・ S400
When the perspective projection matrix P2 of the virtual projector is obtained, the perspective projection matrix calculation unit 24 projects the projection image of the projection target onto the imaging unit of the virtual projector, and obtains the captured image captured by the imaging unit of the virtual projector 100A. Can do.

以上で、処理は図14のS3の撮像画像の保存までが終了したことになる。したがって、この後、処理は図14のS4に進み、再度、対応点が抽出される。対応点の抽出処理の中で実施例1〜3で説明した、欠損部の検出、欠損部の補間、対応点の抽出が行われる。そして、補正係数算出部20は対応点に基づき射影変換行列Hを算出し(S5)、画像加工部16が投影画像を補正する(S6)。   This completes the process up to storing the captured image in S3 of FIG. Therefore, after this, the process proceeds to S4 in FIG. 14, and corresponding points are extracted again. In the corresponding point extraction process, the detection of the missing portion, the interpolation of the missing portion, and the extraction of the corresponding points described in the first to third embodiments are performed. Then, the correction coefficient calculation unit 20 calculates a projective transformation matrix H based on the corresponding points (S5), and the image processing unit 16 corrects the projection image (S6).

したがって、本実施例のプロジェクタは、投影対象物を三次元計測することでユーザの位置を固定することなく歪み補正することが可能である。   Therefore, the projector of the present embodiment can correct distortion without fixing the position of the user by measuring the projection object three-dimensionally.

なお、本実施例では投影素子と撮像素子の視差で三次元計測したが、ステレオカメラやTOF(Time Of Flight)を計測可能なカメラで三次元計測してもよい。   In this embodiment, the three-dimensional measurement is performed using the parallax between the projection element and the imaging element. However, the three-dimensional measurement may be performed using a stereo camera or a camera capable of measuring TOF (Time Of Flight).

11 パターン撮像部
12 通信部
13 二値化部
14 パターン選別部
15 パターン補間部
16 画像加工部
17 撮像制御部
18 対応点抽出部
19 欠損部抽出部
20 補正係数算出部
21 投影対象画像化部
22 記憶部
99 情報処理装置
100 プロジェクタ
200 画像補正システム
DESCRIPTION OF SYMBOLS 11 Pattern imaging part 12 Communication part 13 Binarization part 14 Pattern selection part 15 Pattern interpolation part 16 Image processing part 17 Imaging control part 18 Corresponding point extraction part 19 Defect part extraction part 20 Correction coefficient calculation part 21 Projection object imaging part 22 Storage unit 99 Information processing apparatus 100 Projector 200 Image correction system

特開2013-065277号公報JP 2013-065277 A

高橋徹、他3名、「投影画像の幾何補正に関する実験的検討」、計測自動制御学会東北支部第235回研究集会、2007.5.18、資料番号235−5Toru Takahashi and three others, “Experimental study on geometric correction of projected images”, Society of Instrument and Control Engineers Tohoku Branch, 235th Research Meeting, 2007.5.18, Document No. 235-5

Claims (10)

投影対象物に投影される投影画像を補正する情報処理装置であって、
投影された第1の線群が撮像された第1の撮像画像と、前記第1の線群と交差する第2の線群が撮像された第2の撮像画像とを取得する投影画像取得手段と、
前記第1の撮像画像における前記第1の線群の線毎に一部又は全体の欠損を検出し、前記第2の撮像画像における前記第2の線群の線毎に一部又は全体の欠損を検出する欠損部検出手段と、
前記第1の線群の線又は前記第2の線群の線の欠損を補間する補間手段と、
欠損が補間された前記第1の線群の線と前記第2の線群の線との第1の交点、及び、前記投影画像の前記第1の線群の線と前記第2の線群の線との第2の交点、を検出する交点検出手段と、
複数の前記第1の交点により形成される範囲と、複数の前記第2の交点により形成される範囲とを比較して補正係数を算出する補正係数算出手段と、
前記補正係数を用いて前記投影画像を補正する補正手段と、
を有することを特徴とする情報処理装置。
An information processing apparatus for correcting a projection image projected on a projection object,
Projected image acquisition means for acquiring a first captured image in which the projected first line group is captured, and a second captured image in which the second line group intersecting the first line group is captured. When,
A partial or total defect is detected for each line of the first line group in the first captured image, and a partial or total defect is detected for each line of the second line group in the second captured image. Deficient part detecting means for detecting
Interpolating means for interpolating a defect in the line of the first line group or the line of the second line group;
A first intersection of the line of the first line group and the line of the second line group in which a defect is interpolated, and the line of the first line group and the second line group of the projection image Intersection detection means for detecting a second intersection with the line of
Correction coefficient calculating means for calculating a correction coefficient by comparing a range formed by a plurality of the first intersections with a range formed by the plurality of the second intersections;
Correction means for correcting the projection image using the correction coefficient;
An information processing apparatus comprising:
前記補間手段は、前記第1の線群の線の欠損部を欠損している線の欠損部以外の座標を用いて補間し、前記第2の線群の線の欠損部を欠損している線の欠損部以外の座標を用いて補間する、ことを特徴とする請求項1に記載の情報処理装置。   The interpolating means interpolates the missing portion of the line of the first line group using coordinates other than the missing portion of the missing line, and lacks the missing portion of the line of the second line group. The information processing apparatus according to claim 1, wherein interpolation is performed using coordinates other than a missing part of a line. 前記第1の線群は長手方向の少なくとも一部が重畳したほぼ平行な複数の線を有し、
前記第2の線群は長手方向の少なくとも一部が重畳したほぼ平行な複数の線を有し、
前記補間手段は、前記第1の線群の線の欠損部を、前記第1の線群の他の線の座標を用いて補間し、前記第2の線群の線の欠損部を、前記第2の線群の他の線の座標を用いて補間する、ことを特徴とする請求項1に記載の情報処理装置。
The first line group has a plurality of substantially parallel lines on which at least a part of the longitudinal direction is superimposed,
The second line group has a plurality of substantially parallel lines on which at least a part of the longitudinal direction is superimposed,
The interpolating means interpolates the missing portion of the line of the first line group using the coordinates of the other lines of the first line group, and the missing portion of the line of the second line group is The information processing apparatus according to claim 1, wherein interpolation is performed using coordinates of other lines of the second line group.
前記補間手段は、前記第1の線群の線の欠損部を、該欠損部の両端を直線又は曲線で結ぶことで補間し、前記第2の線群の線の欠損部を、該欠損部の両端を直線又は曲線で結ぶことで補間する、ことを特徴とする請求項2に記載の情報処理装置。   The interpolation means interpolates the missing portion of the line of the first line group by connecting both ends of the missing portion with a straight line or a curve, and replaces the missing portion of the line of the second line group with the missing portion. The information processing apparatus according to claim 2, wherein interpolation is performed by connecting both ends of the line with a straight line or a curve. 前記補間手段は、前記第1の線群の線が始端又は終端を含んで欠損している場合、欠損している線の欠損していない部分を欠損している始端又は終端の側に外挿することで補間し、
前記第2の線群の線が始端又は終端を含んで欠損している場合、欠損している線の欠損していない部分を欠損している始端又は終端側に外挿することで補間する、
ことを特徴とする請求項4記載の情報処理装置。
When the line of the first line group is missing including the start or end, the interpolation means extrapolates the missing part of the missing line to the start or end side that is missing. To interpolate
If the line of the second line group is missing including the start or end, interpolate by extrapolating the missing part of the missing line to the missing start or end,
The information processing apparatus according to claim 4.
前記補間手段は、欠損している前記第1の線群の線の欠損部を、前記第1の線群の他の線の、線の長手方向と垂直な方向の座標を演算して求めた点で補間し、
欠損している前記第2の線群の線の欠損部を、前記第2の線群の他の線の、線の長手方向と垂直な方向の座標を演算して求めた点で補間する、
ことを特徴とする請求項3に記載の情報処理装置。
The interpolating means calculates the missing portion of the line of the first line group that is missing by calculating the coordinates of the other lines of the first line group in the direction perpendicular to the longitudinal direction of the line. Interpolate at points,
Interpolating the missing part of the line of the second line group that is missing by calculating the coordinates of the other lines of the second line group in the direction perpendicular to the longitudinal direction of the line,
The information processing apparatus according to claim 3.
欠損している前記第1の線群の第1の線の欠損部と、前記第1の線群の他の線の欠損部が、線の長手方向で重複しているため、前記第1の線の欠損部の一部を、前記第1の線群の前記他の線の座標から補間できない場合、前記補間手段は、前記第1の線の欠損部の前記一部を、該一部の両端を直線又は曲線で補間し、
欠損している前記第2の線群の第2の線の欠損部と、前記第2の線群の他の線の欠損部が、線の長手方向で重複しているため、前記第2の線の欠損部の一部を、前記第2の線群の前記他の線の座標から補間できない場合、前記補間手段は、前記第2の線の欠損部の前記一部を、該一部の両端を直線又は曲線で補間する、
ことを特徴とする請求項6に記載の情報処理装置。
Since the missing part of the first line of the first line group missing and the missing part of the other line of the first line group overlap in the longitudinal direction of the line, the first line group When a part of the missing part of the line cannot be interpolated from the coordinates of the other line of the first line group, the interpolation means replaces the part of the missing part of the first line with the part of the part. Interpolate both ends with straight lines or curves,
Since the missing part of the second line of the second line group that is missing and the missing part of the other line of the second line group overlap in the longitudinal direction of the line, the second line group When a part of the missing part of the line cannot be interpolated from the coordinates of the other line of the second line group, the interpolation means replaces the part of the missing part of the second line with the part of the part. Interpolate both ends with straight lines or curves,
The information processing apparatus according to claim 6.
前記第1の線群の最外の線が欠損している場合、
前記補間手段は、前記第1の線群の最外から2番目と3番目の線の、線の長手方向と垂直な方向の座標を演算して求めた点で、最外の線の欠損部を補間し、
前記第2の線群の最外の線が欠損している場合、
前記第2の線群の最外から2番目と3番目の線の、線の長手方向と素直な方向の座標を演算して求めた点で、最外の線の欠損部を補間する、
ことを特徴とする請求項3に記載の情報処理装置。
If the outermost line of the first line group is missing,
The interpolating means calculates the coordinates of the second and third lines from the outermost side of the first group of lines in the direction perpendicular to the longitudinal direction of the line, and the missing part of the outermost line. Interpolate
If the outermost line of the second line group is missing,
Interpolate the missing part of the outermost line at the point obtained by calculating the coordinates of the second and third lines from the outermost side of the second line group in the longitudinal direction and the straight direction of the line,
The information processing apparatus according to claim 3.
前記投影対象物と当該情報処理装置との距離情報を取得する距離情報取得手段と、
当該情報処理装置を第1の場所に配置した際の前記距離情報を用いて、前記投影対象物上の点を、撮像手段上の点に投影する第1の透視投影行列を算出する算出手段と、を有し、
前記算出手段は、当該情報処理装置が前記第1の場所から第2の場所に配置された際の変位情報を用いて前記第2の場所における第2の透視投影行列を算出し、
前記投影対象物上の点を、前記第2の透視投影行列を用いて前記第2の場所における撮像手段上の点に投影することで前記第1の撮像画像と前記第2の撮像画像を取得し、
前記欠損部検出手段は、前記第1の線群の線毎に一部又は全体の欠損を検出し、前記第2の線群の線毎に一部又は全体の欠損を検出し、
前記補間手段は、前記第1の線群の線又は前記第2の線群の線の欠損を補間し、
前記交点検出手段は、欠損が補間された前記第1の線群の線と前記第2の線群の線との第1の交点、及び、前記投影画像の前記第1の線群の線と前記第2の線群の線との第2の交点を検出し、
前記補正係数算出手段は、複数の前記第1の交点により形成される範囲と、複数の前記第2の交点により形成される範囲とを比較して補正係数を算出し、
前記補正手段は、前記補正係数を用いて前記投影画像を補正する、
ことを特徴とする請求項1〜8いずれか1項記載の情報処理装置。
Distance information acquisition means for acquiring distance information between the projection object and the information processing apparatus;
Calculating means for calculating a first perspective projection matrix for projecting a point on the projection object onto a point on the imaging means, using the distance information when the information processing apparatus is arranged at the first location; Have
The calculation means calculates a second perspective projection matrix at the second location using displacement information when the information processing apparatus is arranged from the first location to the second location,
The first captured image and the second captured image are obtained by projecting a point on the projection object onto a point on the imaging means in the second location using the second perspective projection matrix. And
The defect detection means detects a partial or total defect for each line of the first line group, detects a partial or entire defect for each line of the second line group,
The interpolating means interpolates a loss of the line of the first line group or the line of the second line group,
The intersection detection means includes a first intersection of the line of the first line group and the line of the second line group in which a defect is interpolated, and the line of the first line group of the projection image. Detecting a second intersection with a line of the second line group;
The correction coefficient calculation means calculates a correction coefficient by comparing a range formed by a plurality of the first intersections with a range formed by a plurality of the second intersections,
The correction means corrects the projection image using the correction coefficient;
The information processing apparatus according to claim 1, wherein the information processing apparatus is an information processing apparatus.
投影対象物に投影される投影画像を補正する情報処理装置に、
投影された第1の線群が撮像された第1の撮像画像と、前記第1の線群と交差する第2の線群が撮像された第2の撮像画像とを取得する投影画像取得ステップと、
前記第1の撮像画像における前記第1の線群の線毎に一部又は全体の欠損を検出し、前記第2の撮像画像における前記第2の線群の線毎に一部又は全体の欠損を検出する欠損部検出ステップと、
前記第1の線群の線又は前記第2の線群の線の欠損を補間する補間ステップと、
欠損が補間された前記第1の線群の線と前記第2の線群の線との第1の交点、及び、前記投影画像の前記第1の線群の線と前記第2の線群の線との第2の交点、を検出する交点検出ステップと、
複数の前記第1の交点により形成される範囲と、複数の前記第2の交点により形成される範囲とを比較して補正係数を算出する補正係数算出ステップと、
前記補正係数を用いて前記投影画像を補正する補正ステップと、
を実行させることを特徴とするプログラム。
In an information processing apparatus that corrects a projection image projected on a projection object,
A projected image acquisition step of acquiring a first captured image in which the projected first line group is captured and a second captured image in which the second line group intersecting with the first line group is captured. When,
A partial or total defect is detected for each line of the first line group in the first captured image, and a partial or total defect is detected for each line of the second line group in the second captured image. A defect detection step for detecting
An interpolation step for interpolating a defect in the line of the first line group or the line of the second line group;
A first intersection of the line of the first line group and the line of the second line group in which a defect is interpolated, and the line of the first line group and the second line group of the projection image An intersection detection step for detecting a second intersection with the line of
A correction coefficient calculating step of calculating a correction coefficient by comparing a range formed by a plurality of the first intersections with a range formed by the plurality of the second intersections;
A correction step of correcting the projection image using the correction coefficient;
A program characterized by having executed.
JP2014008036A 2014-01-20 2014-01-20 Information processing apparatus and program Pending JP2015139006A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014008036A JP2015139006A (en) 2014-01-20 2014-01-20 Information processing apparatus and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014008036A JP2015139006A (en) 2014-01-20 2014-01-20 Information processing apparatus and program

Publications (1)

Publication Number Publication Date
JP2015139006A true JP2015139006A (en) 2015-07-30

Family

ID=53769769

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014008036A Pending JP2015139006A (en) 2014-01-20 2014-01-20 Information processing apparatus and program

Country Status (1)

Country Link
JP (1) JP2015139006A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017085234A (en) * 2015-10-23 2017-05-18 セイコーエプソン株式会社 Portable terminal, projector, projection system, projection system control method, and program
JP6750920B1 (en) * 2019-02-28 2020-09-02 Rita Technology株式会社 Waste sorting support device, waste sorting support system and waste sorting support method
JP2021021845A (en) * 2019-07-29 2021-02-18 セイコーエプソン株式会社 Projector control method, and projector
US11327272B2 (en) 2019-03-20 2022-05-10 Ricoh Company, Ltd. Mirror driving device of imaging apparatus and method for controlling driving of mirror of imaging apparatus

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09163134A (en) * 1995-12-11 1997-06-20 Kokusai Electric Co Ltd Interpolation method for image data
JP2005020314A (en) * 2003-06-25 2005-01-20 Olympus Corp Calculating method, calculating program and calculating apparatus for display characteristic correction data
JP2010136105A (en) * 2008-12-04 2010-06-17 Seiko Epson Corp Projector, method and program for adjusting display, and recording medium
JP2011147125A (en) * 2010-01-15 2011-07-28 Seiko Epson Corp Method of calibrating projector system, program, computer system, and projector system
JP2012047485A (en) * 2010-08-24 2012-03-08 Toyota Auto Body Co Ltd Workpiece contour shape detection method and image processing system
JP2013026824A (en) * 2011-07-21 2013-02-04 Mitsubishi Precision Co Ltd Method of correcting distortion in video, device of correcting distortion in video, simulated visual field display device and simulator for operation training
JP2013168922A (en) * 2012-01-18 2013-08-29 Sony Corp Projection type image display device and image projection method, and computer program

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPH09163134A (en) * 1995-12-11 1997-06-20 Kokusai Electric Co Ltd Interpolation method for image data
JP2005020314A (en) * 2003-06-25 2005-01-20 Olympus Corp Calculating method, calculating program and calculating apparatus for display characteristic correction data
JP2010136105A (en) * 2008-12-04 2010-06-17 Seiko Epson Corp Projector, method and program for adjusting display, and recording medium
JP2011147125A (en) * 2010-01-15 2011-07-28 Seiko Epson Corp Method of calibrating projector system, program, computer system, and projector system
JP2012047485A (en) * 2010-08-24 2012-03-08 Toyota Auto Body Co Ltd Workpiece contour shape detection method and image processing system
JP2013026824A (en) * 2011-07-21 2013-02-04 Mitsubishi Precision Co Ltd Method of correcting distortion in video, device of correcting distortion in video, simulated visual field display device and simulator for operation training
JP2013168922A (en) * 2012-01-18 2013-08-29 Sony Corp Projection type image display device and image projection method, and computer program

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2017085234A (en) * 2015-10-23 2017-05-18 セイコーエプソン株式会社 Portable terminal, projector, projection system, projection system control method, and program
JP6750920B1 (en) * 2019-02-28 2020-09-02 Rita Technology株式会社 Waste sorting support device, waste sorting support system and waste sorting support method
WO2020175623A1 (en) * 2019-02-28 2020-09-03 Rita Technology株式会社 Waste sorting assistance device, waste sorting assistance system, and waste sorting assistance method
US11327272B2 (en) 2019-03-20 2022-05-10 Ricoh Company, Ltd. Mirror driving device of imaging apparatus and method for controlling driving of mirror of imaging apparatus
JP2021021845A (en) * 2019-07-29 2021-02-18 セイコーエプソン株式会社 Projector control method, and projector
JP7243510B2 (en) 2019-07-29 2023-03-22 セイコーエプソン株式会社 Projector control method and projector

Similar Documents

Publication Publication Date Title
US11798130B2 (en) User feedback for real-time checking and improving quality of scanned image
US20220103709A1 (en) Method and apparatus for scanning and printing a 3d object
US10841551B2 (en) User feedback for real-time checking and improving quality of scanned image
EP3092603B1 (en) Dynamic updating of composite images
EP3092790B1 (en) Adaptive camera control for reducing motion blur during real-time image capture
US20140267593A1 (en) Method for processing image and electronic device thereof
US9691357B2 (en) Information processing method and electronic device thereof, image calibration method and apparatus, and electronic device thereof
CN114663618A (en) Three-dimensional reconstruction and correction method, device, equipment and storage medium
JP2015139006A (en) Information processing apparatus and program
JP2019087945A (en) Information processing apparatus, program, and information processing method
JP2015026914A (en) Program, information processing device, and system
KR101082545B1 (en) Mobile communication terminal had a function of transformation for a picture
CN114979616B (en) Display method, information processing apparatus, and recording medium
EP3748953B1 (en) Adaptive camera control for reducing motion blur during real-time image capture
JP2021149797A (en) Support device, support method, and support program
JP2021149798A (en) Support device, support method, and support program
JP2016092807A (en) Image processing apparatus and control method of image processing apparatus

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20170110

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20170807

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20170912

A02 Decision of refusal

Free format text: JAPANESE INTERMEDIATE CODE: A02

Effective date: 20180306