JP6872239B2 - Image processing equipment, image processing method and image processing program - Google Patents
Image processing equipment, image processing method and image processing program Download PDFInfo
- Publication number
- JP6872239B2 JP6872239B2 JP2017146103A JP2017146103A JP6872239B2 JP 6872239 B2 JP6872239 B2 JP 6872239B2 JP 2017146103 A JP2017146103 A JP 2017146103A JP 2017146103 A JP2017146103 A JP 2017146103A JP 6872239 B2 JP6872239 B2 JP 6872239B2
- Authority
- JP
- Japan
- Prior art keywords
- image data
- deviation amount
- data
- reflectance
- pixel
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Active
Links
Images
Landscapes
- Projection Apparatus (AREA)
- Transforming Electric Information Into Light Information (AREA)
- Image Analysis (AREA)
Description
本発明は、形状が変化可能な投影対象に、画像を投影する画像処理装置、画像処理方法および画像処理プログラムに関する。 The present invention relates to an image processing apparatus, an image processing method, and an image processing program that project an image onto a projection object whose shape can be changed.
一般的に、画像データをプロジェクタが投影対象に投影した状態をカメラで撮影し、プロジェクタに入力された画像データと、カメラで撮影された画像データとを比較して、画像データを補正するProjector−Camera(ProCam)システムが知られている。ProCamシステムにおいては、プロジェクタに入力された画像データの画素と、カメラで撮影された画像データの画素とを対応づけることにより、各画素に対して色を補正して、適切な光学的補正を行うことができる。 Generally, a projector that corrects image data by taking a picture of the image data projected by the projector onto a projection target with a camera, comparing the image data input to the projector with the image data taken by the camera. The Camera (ProCam) system is known. In the ProCam system, by associating the pixels of the image data input to the projector with the pixels of the image data taken by the camera, the color is corrected for each pixel and appropriate optical correction is performed. be able to.
またProCamシステムを用いて、投影面の反射特性や投影面の動的な変化に対応できるような光学的補正を行う方法がある(例えば特許文献1参照。)。特許文献1に記載された方法では、投影映像ごとの各色成分の輝度値から応答関数を求めると共に、基準点からの輝度の変化率を示す配光マップを使用して、色補正を行う。これにより特許文献1は、スクリーンに模様があるなど、一面が白色でないスクリーンに画像データが投影された場合でも、スクリーンの模様の影響を受けないように画像を表示することが可能になる。
Further, there is a method of using the ProCam system to perform optical correction so as to cope with the reflection characteristics of the projection surface and the dynamic change of the projection surface (see, for example, Patent Document 1). In the method described in
しかしながら一般的には、投影対象の形状が変化すると、適切に補正を行うことができない場合がある。例えば、カーテンなどの固定されていない投影対象に画像を投影する際、投影対象が揺れ、投影対象の形状が変化する場合がある。カーテンの揺れにより投影対象の形状が変化すると、プロジェクタの投影による結像までの距離が変化する。プロジェクタに入力された画像データの画素と、カメラで撮影された画像データの画素との対応関係が壊れてしまい、各画素に対して、適切な光学補正を行うことができず、形状が変化可能な投影対象に、適切に画像を投影できない問題がある。 However, in general, if the shape of the projection target changes, it may not be possible to make an appropriate correction. For example, when an image is projected onto an unfixed projection object such as a curtain, the projection object may shake and the shape of the projection object may change. When the shape of the projection target changes due to the shaking of the curtain, the distance to the image formation by the projection of the projector changes. The correspondence between the pixels of the image data input to the projector and the pixels of the image data taken by the camera is broken, and it is not possible to perform appropriate optical correction for each pixel, and the shape can be changed. There is a problem that an image cannot be projected properly on a suitable projection target.
従って本発明の目的は、形状が変化可能な投影対象に、適切に画像を投影する画像処理装置、画像処理方法および画像処理プログラムを提供することである。 Therefore, an object of the present invention is to provide an image processing apparatus, an image processing method, and an image processing program that appropriately project an image onto a projection object whose shape can be changed.
上記課題を解決するために、本発明の第1の特徴は、形状が変化可能な投影対象に、画像を投影する画像処理装置に関する。本発明の第1の特徴に係る画像処理装置は、プロジェクタに入力される画像データの領域と、形状変化していない投影対象に画像データが投影された状態をカメラが撮影する画像データの領域とを対応づけた領域間対応データと、領域間対応データにおいて対応づけられた領域について、プロジェクタに入力される画像データの値、形状が変化可能な投影対象の反射率、および投影対象に画像データが投影された状態をカメラが撮影した画像データの値との関係を示す応答関数に関する応答関数データを記憶する記憶装置と、元画像データを、応答関数を用いて光学的補正を行い、補正後画像データを生成する光学的補正部と、補正後画像データを、プロジェクタに入力する投影画像出力部と、形状が変化可能な投影対象にプロジェクタが補正後画像データを投影した状態を、カメラが撮影した撮影画像データを、取得する撮影画像取得部と、領域間対応データでの処理対象領域間の対応関係と、補正後画像データおよび撮影画像データとの各処理対象領域間の対応関係のずれ量および処理対象領域の反射率を決定するずれ量決定部と、ずれ量決定部が決定したずれ量および処理対象領域の反射率に従って、応答関数と領域間対応データを更新する応答関数更新部を備える。ずれ量決定部は、ずれ量について、複数のずれ量の候補を生成するずれ量候補生成部と、領域間対応データでの処理対象領域の対応関係を、複数のずれ量の候補のそれぞれについてずらした対応関係のそれぞれに基づいて、応答関数を用いて、複数のずれ量の候補のそれぞれに対応する反射率を算出する反射率算出部と、複数のずれ量の候補のそれぞれに対応する反射率を比較して、複数のずれ量の候補から、撮影画像データにおけるずれ量と反射率を選択するずれ量選択部を備える。 In order to solve the above problems, the first feature of the present invention relates to an image processing device that projects an image onto a projection target whose shape can be changed. The image processing apparatus according to the first feature of the present invention includes an area of image data input to a projector and an area of image data captured by a camera in a state where the image data is projected onto a projection target whose shape has not changed. The value of the image data input to the projector, the reflectance of the projection target whose shape can be changed, and the image data on the projection target for the region-to-region correspondence data associated with A storage device that stores response function data related to the response function that indicates the relationship between the projected state and the value of the image data captured by the camera, and the original image data is optically corrected using the response function, and the corrected image. The camera photographed an optical correction unit that generates data, a projection image output unit that inputs corrected image data to the projector, and a state in which the projector projects the corrected image data onto a projection target whose shape can be changed. The amount of deviation between the captured image acquisition unit that acquires the captured image data, the correspondence between the processing target regions in the inter-region correspondence data, and the correspondence between the corrected image data and the captured image data between the processing target regions. It includes a deviation amount determining unit that determines the reflectance of the processing target area, and a response function updating unit that updates the response function and the inter-region correspondence data according to the deviation amount determined by the deviation amount determining unit and the reflectance of the processing target area. Regarding the deviation amount, the deviation amount determination unit shifts the correspondence relationship between the deviation amount candidate generation unit that generates a plurality of deviation amount candidates and the processing target area in the inter-region correspondence data for each of the plurality of deviation amount candidates. A reflectance calculation unit that calculates the reflectance corresponding to each of a plurality of deviation amount candidates using a response function based on each of the correspondence relationships, and a reflectance corresponding to each of the plurality of deviation amount candidates. Is provided, and a deviation amount selection unit for selecting the deviation amount and the reflectance in the captured image data from a plurality of deviation amount candidates is provided.
元画像データから、カメラで撮影された状態の目標となる目標画像データを生成する目標画像生成部をさらに備え、処理対象領域は、撮影画像データの所定領域の値と、領域間対応データにおいて所定領域に対応する目標画像データの領域の値とを比較して、所定の閾値以上の差分のある所定領域であっても良い。 A target image generation unit for generating a target target image data in a state of being photographed by a camera from the original image data is further provided, and a processing target area is determined by a value of a predetermined area of the photographed image data and inter-region correspondence data. It may be a predetermined region having a difference of a predetermined threshold or more by comparing with the value of the region of the target image data corresponding to the region.
ずれ量候補生成部は、撮影画像データにおける処理対象領域を通るエピポーラ線上での、複数のずれ量の候補を生成し、反射率算出部は、エピポーラ線上で、複数のずれ量の候補のそれぞれについてずらした対応関係のそれぞれに基づいて、複数のずれ量の候補のそれぞれに対応する反射率を算出しても良い。 The deviation amount candidate generation unit generates a plurality of deviation amount candidates on the epipolar line passing through the processing target area in the captured image data, and the reflectance calculation unit generates the deviation amount candidate for each of the plurality of deviation amount candidates on the epipolar line. The reflectance corresponding to each of the plurality of deviation amount candidates may be calculated based on each of the shifted correspondences.
ずれ量選択部は、複数のずれ量の候補のそれぞれに対応する反射率から、処理対象領域に対応する領域を含む近傍領域における反射率の分散が最も小さい反射率を選択し、選択された反射率に対応するずれ量を、適切なずれ量として選択しても良い。 The deviation amount selection unit selects the reflectance having the smallest reflectance dispersion in the neighboring region including the region corresponding to the processing target region from the reflectances corresponding to each of the plurality of deviation amount candidates, and the selected reflection. The deviation amount corresponding to the rate may be selected as an appropriate deviation amount.
応答関数は、式1であっても良い。
撮影画像取得部、ずれ量決定部および応答関数更新部の処理を繰り返す場合、反射率算出部は、式2により反射率を算出しても良い。
元画像データが、映像データの一つのフレームデータであり、ずれ量決定部が、映像データの複数のフレームデータについて逐次ずれ量を決定する場合、反射率算出部は、式2により反射率を算出しても良い。
本発明の第2の特徴は、形状が変化可能な投影対象に、画像を投影する画像処理方法に関する。本発明の第2の糖朝にかかる画像処理方法は、コンピュータが、プロジェクタに入力される画像データの領域と、形状変化していない投影対象に画像データが投影された状態をカメラが撮影する画像データの領域とを対応づけた領域間対応データを記憶装置に記憶するステップと、コンピュータが、領域間対応データにおいて対応づけられた領域について、プロジェクタに入力される画像データの値、形状が変化可能な投影対象の反射率、および投影対象に画像データが投影された状態をカメラが撮影した画像データの値との関係を示す応答関数に関する応答関数データを記憶装置に記憶するステップと、コンピュータが、元画像データを、応答関数を用いて光学的補正を行い、補正後画像データを生成するステップと、コンピュータが、補正後画像データを、プロジェクタに入力するステップと、コンピュータが、形状が変化可能な投影対象にプロジェクタが補正後画像データを投影した状態を、カメラが撮影した撮影画像データを、取得するステップと、コンピュータが、領域間対応データでの処理対象領域間の対応関係と、補正後画像データおよび撮影画像データとの各処理対象領域間の対応関係のずれ量および処理対象領域の反射率を決定するステップと、コンピュータが、決定したずれ量および処理対象領域の反射率に従って、応答関数と領域間対応データを更新するステップを備える。決定するステップは、ずれ量について、複数のずれ量の候補を生成するステップと、領域間対応データでの処理対象領域の対応関係を、複数のずれ量の候補のそれぞれについてずらした対応関係のそれぞれに基づいて、応答関数を用いて、複数のずれ量の候補のそれぞれに対応する反射率を算出するステップと、複数のずれ量の候補のそれぞれに対応する反射率を比較して、複数のずれ量の候補から、撮影画像データにおけるずれ量と反射率を選択するステップを備える。 A second feature of the present invention relates to an image processing method for projecting an image onto a projection object whose shape can be changed. In the second sugar morning image processing method of the present invention, the camera captures an area of image data input to the projector and a state in which the image data is projected onto a projection target whose shape has not changed. The value and shape of the image data input to the projector can be changed for the step of storing the inter-regional correspondence data associated with the data area in the storage device and the area associated with the inter-regional correspondence data by the computer. The step of storing the response function data related to the response function indicating the relationship between the reflectance of the projection target and the value of the image data taken by the camera in the state where the image data is projected on the projection target in the storage device, and the computer The shape of the original image data can be changed between a step of optically correcting the original image data using a response function and generating the corrected image data, a step of the computer inputting the corrected image data to the projector, and a step of the computer inputting the corrected image data. The step of acquiring the captured image data taken by the camera from the state in which the projector projects the corrected image data on the projection target, the correspondence relationship between the processing target areas in the inter-region correspondence data, and the corrected image. The step of determining the deviation amount of the correspondence between the data and the captured image data and the reflectance of the processing target area, and the response function according to the deviation amount determined by the computer and the reflectance of the processing target area. A step of updating the inter-regional correspondence data is provided. The steps to determine are the step of generating a plurality of deviation amount candidates for the deviation amount, and the correspondence relationship in which the correspondence relationship of the processing target area in the inter-region correspondence data is shifted for each of the plurality of deviation amount candidates. Based on, the response function is used to compare the step of calculating the reflectance corresponding to each of the plurality of deviation amount candidates with the reflectance corresponding to each of the plurality of deviation amount candidates, and to compare the plurality of deviations. A step of selecting the amount of deviation and the reflectance in the captured image data from the quantity candidates is provided.
本発明の第3の特徴は、コンピュータに、本発明の第1の特徴に記載の画像処理装置として機能させるための画像処理プログラムに関する。 A third feature of the present invention relates to an image processing program for causing a computer to function as the image processing device according to the first feature of the present invention.
本発明によれば、形状が変化可能な投影対象に、適切に画像を投影する画像処理装置、画像処理方法および画像処理プログラムを提供することができる。 According to the present invention, it is possible to provide an image processing device, an image processing method, and an image processing program that appropriately project an image onto a projection target whose shape can be changed.
次に、図面を参照して、本発明の実施の形態を説明する。以下の図面の記載において、同一または類似の部分には同一または類似の符号を付している。 Next, embodiments of the present invention will be described with reference to the drawings. In the description of the drawings below, the same or similar parts are designated by the same or similar reference numerals.
(概要)
図1に示す本発明の実施の形態に係る画像処理装置1は、形状が変化可能な投影対象に、形状変化の影響を抑制可能な画像を投影する。画像処理装置1は、プロジェクタ2に、元画像データ22を光学的補正して補正後画像データ23を生成し、補正後画像データ23をプロジェクタ2に入力し、プロジェクタ2が補正後画像データ23を投影した状態をカメラ3が撮影した撮影画像データ24を、カメラ3から取得する。画像処理装置1は、投影対象の形状変化に伴う画素間対応のずれを推定し、推定された画素間対応のずれを考慮して投影対象の形状変化の影響を抑制した補正後画像データ23を生成し、補正後画像データ23をプロジェクタ2に入力する。これにより本発明の実施の形態に係る画像処理装置1は、投影対象の形状変化の影響を抑制して投影することが可能になる。
(Overview)
The
本発明の実施の形態においては、プロジェクタ2が静止画に光学的補正を施して投影する場合を説明するが、これに限られない。例えば、プロジェクタ2が映像を投影する場合に、本発明の実施の形態に係る光学的補正を、映像のフレームデータに適用して、先行するフレームで得られた光学的補正を、後続のフレームに適用しても良い。
In the embodiment of the present invention, the case where the
図2を参照して、本発明の実施の形態に係る画像処理装置1が用いられる画像処理システム9を説明する。画像処理システム9は、図1に示す画像処理装置1のほか、プロジェクタ2、カメラ3および投影対象4を備える。プロジェクタ2は、光学的補正により得られた補正後画像データ23を、投影対象4に投影する。カメラ3は、プロジェクタ2の投影により投影対象4で結像された状態を撮影し、撮影で得られた撮影画像データ24を、画像処理装置1に入力する。画像処理装置1は、入力された撮影画像データ24に基づいて適切に応答関数と画素間対応を更新して、更新された応答関数と画素間対応を用いて光学的補正を行い、光学的補正の結果得られた補正後画像データ23を、プロジェクタ2に投影させる。
The
本発明の実施の形態において投影対象4は、形状変化するものであって、例えば、カーテンである。一般的にカーテンは、上端がレールからつり下げられ、下端は、何ら固定されず解放される。従って、風や接触などの影響を受けて、カーテンは、揺れて形状が変化する場合があり、形状の変化は、下方ほど顕著に観察される。
In the embodiment of the present invention, the
例えば、図3(a)に示す画像データを、プロジェクタ2がカーテンに投影する場合を説明する。図3(b)は、形状変化していないカーテンに投影された状態をカメラ3が撮影した画像示し、図3(a)の画像データが、適切に投影されている。
For example, a case where the
図3(c)は、左側において、カーテンが揺れて形状変化が生じた投影対象4に投影された状態を示し、右側において、本発明の実施の形態に係る画像処理装置1によって光学的補正された画像が投影された状態を示す。左側においては、下方に縞模様が形成されており、下方ほど形状変化が生じやすいカーテンの特性と一致する。一方右側においては、左側で生じたような縞模様は観察されず、投影対象4の形状変化による影響が抑制されていることがわかる。
FIG. 3C shows a state in which the curtain sways and is projected onto the
また図3(d)は、図3(c)と同様に、形状変化が生じた投影対象4に投影された状態と、画像処理装置1によって補正された画像が投影された状態を示すが、図3(c)と比べて、投影対象4がさらに大きく形状変化している点が異なる。図3(d)の左側において、下方のみならず、全体的に縞模様が形成される。一方、右側において、図3(c)と同様に、左側で生じたような縞模様は観察されず、投影対象4の形状変化による影響が抑制されていることがわかる。
Further, FIG. 3D shows a state in which the image is projected onto the
投影対象4が形状変化すると、図3(c)および(d)の左側のように一般的に縞模様が観察される原因としては、図3(a)に示す、プロジェクタ2に入力された画像の画素と、図3(b)に示す、カメラ3が撮影した画像の画素との対応づけがくずれることが考えられる。
When the shape of the
一般的な光学的補正においては、プロジェクタ2に入力される画像とカメラ3が出力する画像とで座標系が異なるため、予め、図3(a)に示すプロジェクタ2に入力された画像の画素と、図3(b)に示す、カメラ3が撮影した画像の画素との対応付けである、画素間対応が行われる。その後、図3(b)に示す、カメラ3によって撮影された画像を参照して、補正対象の画素を特定する。予め算出した画素間対応に基づいて、図3(a)に示す、プロジェクタ2に入力される画像における、補正対象の画素を特定し、その特定された画素を補正する。
In general optical correction, since the coordinate system of the image input to the
投影対象4の形状変化が発生しない場合、プロジェクタ2およびカメラ3の位置も変わらないので、予め算出された画素間対応が維持される。従って、プロジェクタ2、カメラ3および投影対象4の位置関係が決まった状態で、画素間対応を特定し、その特定された画素間対応を用いて光学的補正を行えば良い。
When the shape of the
しかしながら投影対象4の形状に変化が生じると、プロジェクタ2と投影対象4上の結像との距離、およびカメラ3と投影対象4上の結像との距離が変更されてしまう。その結果、投影対象4上の色(反射率)が変更し、投影対象4が形状変化しない状態で算出された画素間対応から変更が生じる。従って、投影対象4の形状が変化したにもかかわらず、投影対象4の形状が変化していない状態で算出された画素間対応を用いて補正を行うと、補正対象の画素とは異なる画素を補正することになる。
However, when the shape of the
その結果、例えば、プロジェクタ2に入力される画像の所定画素について明るくなるように補正をしたつもりが、他の画素について明るくなるように補正をすることになり、その所定画素が適切に補正されず、暗いままの状態になり、明るくする必要のない画素がさらに明るく補正される。同様に、プロジェクタ2に入力される画像の所定画素について暗くなるように補正をしたつもりが、他の画素について暗くなるように補正をすることになり、その所定画素が適切に補正されず、明るいままの状態になり、暗くする必要のない画素がさらに暗く補正される。従って、図3(c)および図3(d)の左側に示すように、明暗が明確に形成され、縞模様が観察される。
As a result, for example, the predetermined pixel of the image input to the
そこで本発明の実施の形態に係る画像処理装置1は、投影対象4の形状変化に応じて、画素間対応が変更されても、変更後の画素間対応を推測し、推測された画素間対応に従って応答関数と画素間対応を更新し、更新された応答関数と画素間対応を用いて光学的補正を行う。これにより図3(c)および(d)の右側に示すように、本発明の実施の形態に係る画像処理装置1は、形状変化が生じた投影対象に投影した場合でも、投影対象4の形状変化に伴う影響を抑制することができる。
Therefore, the
一般的に、プロジェクタ2による投影対象4は、形状変化の生じない壁や、張られたスクリーンなどが用いられていたが、本発明の実施の形態に係る画像処理装置1によれば、カーテンなど形状変化が生じるものでも投影対象4とすることが可能になる。従って本発明の実施の形態に係る画像処理装置1によれば、投影対象4の選択肢を広げることができ、様々なシーンでプロジェクタ2による投影を実現することが可能になる。
Generally, as the
(処理の概要)
図4を参照して、本発明の実施の形態に係る画像処理方法の処理の概要を説明する。
(Outline of processing)
An outline of the processing of the image processing method according to the embodiment of the present invention will be described with reference to FIG.
まずステップS1において、画像処理装置1は、前処理として、光学的補正に必要なデータを予め算出する。プロジェクタ2、カメラ3および投影対象4の設置が完了した時点で、プロジェクタ2、カメラ3および投影対象4の位置関係が決まり、画像処理方法の処理中において、この位置関係は変更しない。そこで、画像処理装置1は、ステップS1において、この位置関係に基づいて、画素間対応データ(領域間対応データ)11、エピポーラ線データ12および応答関数データ13などを生成する。
First, in step S1, the
ステップS1においては、各データを算出するために適切なテスト画像データが投影される。例えば、画素間対応データ11を算出するために、パターン画像が投影される。また応答関数データ13を算出するために、例えば、特許文献1に記載の方法が用いられる。
In step S1, appropriate test image data is projected to calculate each data. For example, a pattern image is projected to calculate the
画素間対応データ11は、プロジェクタ2に入力される画像データの領域(画素)と、形状変化していない投影対象に画像データが投影された状態をカメラ3が撮影する画像データの領域とを対応づけるデータである。ステップS1の前処理において、プロジェクタ2にパターン画像が投影されることによって、画素間対応データ11は、生成される。
The
エピポーラ線データ12は、エピポーラ幾何に基づくエピポーラ線Eのデータである。前処理において、各画素のエピポーラ線Eが算出され、エピポーラ線データ12として記憶される。
The
応答関数データ13は、所定の画素についての、プロジェクタ2に入力される画像データの値、投影対象の反射率、およびカメラ3が撮影した画像データの値との関係を示す応答関数に関するデータである。ステップS1の前処理は、例えば特許文献1に記載の方法等で、投影対象4の模様等を考慮して、初期の応答関数を生成する。なお、応答関数データ13と画素間対応データ11は、後続の処理において、投影対象4の形状変化に応じて適宜更新される。
The
前処理が終了すると、ステップS2において画像処理装置1は、理想的な応答関数(図示せず)を使って、元画像データ22から目標画像データ21を生成する。ステップS3において画像処理装置1は、応答関数で、元画像データ22から補正後画像データ23を生成する。理想的な応答関数は、プロジェクタ2の光量および出力可能な色の範囲等内で、生成される。
When the preprocessing is completed, in step S2, the
ステップS4において画像処理装置1は、ステップS3で生成した補正後画像データ23をプロジェクタ2に入力し、プロジェクタ2は補正後画像データ23を投影対象4に投影する。カメラ3は、補正後画像データ23が投影対象4に投影された状態を撮影し、ステップS5において画像処理装置1は、カメラ3から補正後画像データ23を取得する。
In step S4, the
次に、ステップS6において画像処理装置1は、撮影画像データ24の処理対象の画素と、目標画像データ21の処理対象の画素について、画素値の差異が所定の閾値以上であるか否かを判定する。ステップS6において画像処理装置1が、画素値の差異が所定の閾値以上であると判定すると、ステップS7に進む。各画素値の差が所定の閾値以上であれば、画像処理装置1は、この画素において、投影対象4の形状変化により画素間対応に変更が生じている、より具体的には、投影対象4の対応位置において形状変化が生じていると判断する。画像処理装置1は、ステップS7において、処理対象の画素について、変更が生じた画素間対応と反射率を推定して、ステップS8において、応答関数と画素間対応を更新する。
Next, in step S6, the
各画素値の差が所定の閾値以内であれば、この画素において、画素間対応の変更が生じていない、より具体的には、投影対象4の対応位置において形状変化が生じていないと判断し、次の画素について、ステップS6ないしステップS8の処理を行う。
If the difference between the pixel values is within a predetermined threshold value, it is determined that the correspondence between pixels has not changed in this pixel, and more specifically, the shape has not changed at the corresponding position of the
各画素について、ステップS6ないしステップS8の処理が終了すると、画像処理装置1は、ステップS9において終了条件を満たすか否かを判定する。終了条件は、例えば、画像データを表示する時間または回数であっても良いし、入力装置(図示せず)等から入力される終了指示である。
When the processing of steps S6 to S8 is completed for each pixel, the
終了条件を満たさないと判定された場合、ステップS3に戻り、画像処理装置1は、応答関数と画素間対応で、元画像データ22から補正後画像データ23を生成する。ステップS3で用いられる応答関数と画素間対応は、最初のステップS3での処理に用いたステップS1で生成した初期の応答関数と画素間対応とは異なり、ステップS8において、更新された応答関数と画素間対応である場合がある。
If it is determined that the end condition is not satisfied, the process returns to step S3, and the
ステップS4において画像処理装置1は、ステップS3で生成した補正後画像データ23をプロジェクタ2に入力し、プロジェクタ2は補正後画像データ23を投影対象4に投影する。カメラ3は、補正後画像データ23が投影対象4に投影された状態を撮影し、ステップS5において画像処理装置1は、カメラ3から補正後画像データ23を取得し、各画素について、ステップS6ないしステップS8を繰り返す。
In step S4, the
なお、先に記載したステップS6、すなわち最初に実行するステップS6では、風などの影響を受けずに形状変化が生じていない投影対象4について生成された、初期の応答関数を使って投影された補正後画像データ23の撮影画像データ24と、目標画像データ21を比較している。
In step S6 described above, that is, step S6 to be executed first, the image was projected using the initial response function generated for the
これに対し、投影対象4に形状変化が生じた画素において応答関数と画素間対応が更新された後のステップS6の処理では、直近に応答関数と画素間対応が更新された際の投影対象4の形状と、今回処理する際の投影対象4の形状との差分の程度に応じて、判定される。直近に更新された応答関数と画素間対応を使って投影される補正後画像データ23に対応する撮影画像データ24が、目標画像データ21と差異がない場合、応答関数と画素間対応更新時の投影対象4の形状と、撮影画像データ24撮影時の投影対象4の形状に差異がなく、適切に補正されていると判定される。
On the other hand, in the process of step S6 after the response function and the pixel-to-pixel correspondence are updated in the pixel whose shape has changed in the
一方、直近に更新された応答関数と画素間対応を使って投影される補正後画像データ23に対応する撮影画像データ24が、目標画像データ21と差異がある場合、撮影画像データ24の撮影時において、直近で応答関数と画素間対応を更新した時から、投影対象4の形状に変化が生じ、画素間対応および反射率にずれが生じたと考えられる。このような場合、画像処理装置1は、ステップS7およびステップS8において、直近に更新された応答関数と画素間対応をさらに更新して、元画像データ22が適切に補正される応答関数と画素間対応を探索する。
On the other hand, when the captured
このような本発明の実施の形態においては、形状変化が可能な投影対象4に投影する場合でも、応答関数と画素間対応の更新と、更新された応答関数と画素間対応を用いて補正された画像データの投影とを繰り返す。これにより、投影対象4の形状変化に追従して応答関数と画素間対応を逐次更新することができるので、投影対象4の形状変化の影響を受けにくい光学的補正を実現することができる。
In such an embodiment of the present invention, even when projecting onto the
(画像処理装置)
図1を参照して、本発明の実施の形態に係る画像処理装置1を説明する。
(Image processing device)
The
画像処理装置1は、記憶装置10、処理装置30および入出力インタフェース50を備える一般的なコンピュータである。一般的なコンピュータが所定の処理を実行する画像処理プログラムを実行することにより、図1に示す機能を実現する。
The
記憶装置10は、ROM(Read Only Memory)、RAM(Random access memory)、ハードディスク等であって、処理装置30が処理を実行するための入力データ、出力データおよび中間データなどの各種データを記憶する。処理装置30は、CPU(Central Processing Unit)であって、記憶装置10に記憶されたデータを読み書きしたり、入出力インタフェース50とデータを入出力したりして、画像処理装置1における処理を実行する。本発明の実施の形態においては特に、画像に関する処理について、処理装置30としてGPU(Graphics Processing Unit)が用いられても良い。この際、OpenGL(登録商標)などによる三次元グラフィックスライブラリを利用し、GLSL(OpenGL(登録商標) Shading Language)などを用いて、シェーダ上で演算を行っても良い。
The
記憶装置10は、所定の処理を実行する画像処理プログラムを記憶するとともに、画素間対応データ11、エピポーラ線データ12、応答関数データ13、目標画像データ21、元画像データ22、補正後画像データ23、撮影画像データ24、ずれ候補データ25、反射率データ26および選択ずれデータ27を記憶する。
The
画素間対応データ11、エピポーラ線データ12および応答関数データ13は、後述する前処理部31によって、プロジェクタ2、カメラ3および投影対象4の位置が決まった際に、予め算出されるデータである。
The
元画像データ22は、画像処理装置1の処理対象の画像データである。元画像データ22を光学的補正した補正後画像データ23を、プロジェクタ2に入力し、投影させる。目標画像データ21および補正後画像データ23は、元画像データ22から生成されるデータである。撮影画像データ24は、補正後画像データ23をプロジェクタ2が投影した状態を、カメラ3が撮影した画像データである。ずれ候補データ25、反射率データ26および選択ずれデータ27は、後述のずれ量決定部36により出力されるデータである。
The
処理装置30は、前処理部31、目標画像生成部32、光学的補正部33、投影画像出力部34、撮影画像取得部35、ずれ量決定部36および応答関数更新部37を備える。
The
前処理部31は、プロジェクタ2、カメラ3および投影対象4の位置が決まった際に、画素間対応データ11、エピポーラ線データ12および応答関数データ13予め算出する。
When the positions of the
画素間対応データ11は、プロジェクタ2に入力される画像データの画素(領域)と、形状変化していない投影対象4に画像データが投影された状態をカメラ3が撮影する画像データの画素(領域)とを対応づけたデータである。プロジェクタ2とカメラ3のそれぞれで用いる画像の座標系が異なるため、前処理部31は、画素間対応データ11を生成して、これらの異なる座標系における画素の変換を可能とする。画素間対応データ11は、具体的には、プロジェクタ2に入力される画像データの各画素について、この画像データの画素の識別子と、カメラ3が撮影する画像データにおいて対応する画素の識別子とを対応づける。ここで、画素の識別子は、例えば、各画像データにおける画素の座標である。本発明の実施の形態において画素間対応データ11は、投影対象4の形状が変化に伴って、逐次更新される。
The
前処理部31は、例えば、テスト画像データをプロジェクタ2に入力して、テスト画像データと、カメラ3が撮影した画像データを対比して、画素間対応データ11を生成する。なお、前処理部31は、投影対象4の形状は変化しない状態で、画素間対応データ11を生成する。
For example, the preprocessing
エピポーラ線データ12は、カメラ3が撮影した画像データにおいて、エピポーラ幾何に基づいて算出されるエピポーラ線Eの情報である。前処理部31は、画素間対応データ11において対応づけられた各画素についてエピポーラ線Eを算出し、各画素のエピポーラ線Eの情報を含むエピポーラ線データ12を生成する。
The
応答関数データ13は、画素間対応データ11において対応づけられた画素について、プロジェクタ2に入力される画像データの値、形状が変化可能な投影対象4の反射率、および投影対象4に画像データが投影された状態をカメラ3が撮影した画像データの値との関係を示す応答関数に関するデータである。応答関数データ13で用いられる画像データの値は、RGBで表現される画素値であっても良いし、RGBの画素値から算出される輝度の値であっても良い。
The
応答関数データ13は、プロジェクタ2の特性と投影対象4の模様等を考慮して、元画像データ22を、プロジェクタ2に入力する補正後画像データ23に変換するための応答関数のデータである。前処理部31は、例えば特許文献1などに記載の方法によって応答関数データ13を生成する。前処理部31において生成される応答関数は、例えば投影対象4に模様がある場合、その模様による影響を抑制する補正後画像データ23を生成するために用いられる。本発明の実施の形態において応答関数データ13は、投影対象4の形状が変化に伴って、逐次更新される。
The
目標画像生成部32は、元画像データ22から、カメラ3で撮影された状態の目標となる目標画像データ21を生成する。目標画像生成部32は、元画像データ22を、プロジェクタ2の特性を考慮した理想的な応答関数に基づいて、目標画像データ21を生成する。
The target
目標画像データ21は、カメラ3が撮影した撮影画像データ24において、適切に光学的補正がなされているか否かを比較する際の比較対象となる。目標画像データ21は、カメラ3が撮影する画像と同様の座標系で生成される。
The
光学的補正部33は、元画像データ22を、応答関数を用いて光学的補正を行い、補正後画像データ23を生成する。光学的補正部33は、応答関数データ13が特定する応答関数を用いる。具体的には、光学的補正部33は、まず、前処理部31が生成した初期の応答関数に基づいて補正後画像データ23を生成する。その後、投影対象4の形状変化に伴って応答関数と画素間対応が更新されると、更新された応答関数と画素間対応を用いて、元画像データ22から補正後画像データ23を生成する。
The
投影画像出力部34は、光学的補正部33が出力した補正後画像データ23を、プロジェクタ2に入力する。プロジェクタ2は、入力された補正後画像データ23を投影対象4に投影する。
The projected
撮影画像取得部35は、形状が変化可能な投影対象4にプロジェクタ2が補正後画像データ23を投影した状態を、カメラ3が撮影した撮影画像データ24を、取得する。補正後画像データ23がプロジェクタ2に入力されると、プロジェクタ2は、投影対象4に補正後画像データ23を投影する。カメラ3は、プロジェクタ2によって投影対象4に撮影された状態を撮影して、撮影画像データ24を生成する、撮影画像取得部35は、カメラ3から撮影画像データ24を取得し、撮影画像データ24を、記憶装置10に記憶する。
The captured
ずれ量決定部36は、画素間対応データ11での処理対象画素の対応関係と、補正後画像データ23および撮影画像データ24との各処理対象画素間の対応関係のずれ量および処理対象領域の反射率を決定する。処理対象画素は、補正後画像データ23のすべての画素であっても良いし、一部の画素であっても良い。処理対象画素が補正後画像データ23の一部の画素である場合、一部の画素は、撮影画像データ24の所定画素の値と、画素間対応データ11において所定画素に対応する目標画像データ21の領域の値とを比較して、所定の閾値以上の差分のある所定画素である。
The deviation
直近で応答関数と画素間対応を更新した後、投影対象4の形状が変化しない場合、所定画素について、目標画像データ21と撮影画像データ24とで大きな差異は生じない。一方、直近で応答関数と画素間対応を更新した後、投影対象4の形状が変化すると、画素間対応がくずれることにより、所定画素について、目標画像データ21と撮影画像データ24とで大きな差異が生じてしまう。本発明の実施の形態においてずれ量決定部36は、目標画像データ21と撮影画像データ24とで、画素値の差異が大きい画素が、投影対象4の形状の変化の影響を受けたと判断して、その画素について、画素間対応を変更して光学的補正を行う。これにより、画像処理装置1の処理負荷を軽減し、効率的に適切な応答関数を算出することが可能になる。
If the shape of the
応答関数更新部37は、ずれ量決定部36が決定したずれ量および処理対象画素の反射率に従って、応答関数と画素間対応を更新する。応答関数更新部37は、ずれ量決定部36が決定したずれ量および処理対象画素の反射率に基づいて、応答関数データ13の応答関数と、画素間対応データ11の画素間対応を更新する。その後、光学的補正部33は、更新された応答関数と画素間対応に従って、元画像データ22から補正後画像データ23を生成し、補正後画像データ23がプロジェクタ2に入力される。
The response
(ずれ量決定部)
本発明の実施の形態に係るずれ量決定部36の処理の概要を、図5を参照して説明する。
(Deviation amount determination unit)
An outline of the processing of the deviation
まずステップS11においてずれ量決定部36は、画素間対応データ11における画素間対応について、撮影画像データ24における画素をエピポーラ線E方向にずらすための、複数のずれ量の候補を生成する。例えば、画素間対応データ11における対応付けに対して、エピポーラ線Eの左側方向に3画素ずらす、0画素ずらす(ずらさない)、右側方向に3画素ずらすなどと、複数のずれ量の候補を生成する。
First, in step S11, the shift
ステップS12においてずれ量決定部36は、ステップS11で生成した複数のずれ量の候補のそれぞれについて、応答関数データ13を参照して反射率を算出する。ステップS11において3つのずれ量の候補を生成した場合、ずれ量決定部36は、3つのずれ量の候補に対して3つの反射率を算出する。
In step S12, the deviation
ステップS13においてずれ量決定部36は、ステップS12において算出された各ずれ量の候補に対応する反射率から、尤もらしい反射率のずれ量を選択する。ずれ量決定部36は、例えば、処理対象の画素を含む近傍領域の各画素について、反射率を算出する処理を、各ずれ量の候補について行い、各ずれ量の候補について、近傍領域の各画素の反射率を比較して、最も反射率の分散の少ないずれ量の候補を、尤もらしい反射率のずれ量と推定する。
In step S13, the deviation
ずれ量決定部36は、ステップS13において選択されたずれ量を、補正後画像データ23および撮影画像データ24との各処理対象画素間の対応関係のずれ量として、出力する。またステップS12で算出された反射率のうち、決定されたずれ量に対応する反射率も、ずれ量決定部36は出力する。出力されたずれ量および反射率は、応答関数更新部37によって処理される。
The deviation
ずれ量決定部36は、図1に示すように、ずれ量候補生成部41、反射率算出部42、およびずれ量選択部43を備える。図5のステップS11ないしS13の処理は、それぞれ、ずれ量候補生成部41、反射率算出部42およびずれ量選択部43の処理に対応する。
As shown in FIG. 1, the deviation
なお、ずれ量決定部36の処理は、CPUを用いても良いが、GPUを用いても良い。GPUで並列処理を行うことにより、処理の更なる高速化が期待できるので、通常のCPUを用いる場合と比べて、効果的に処理することが可能になる。
Although the CPU may be used for the processing of the deviation
ずれ量候補生成部41は、補正後画像データ23および撮影画像データ24との各処理対象画素間の対応関係のずれ量について、複数のずれ量の候補を生成する。ずれ量候補生成部41は、撮影画像データ24における処理対象画素を通るエピポーラ線E上での、複数のずれ量の候補を生成する。
The deviation amount candidate generation unit 41 generates a plurality of deviation amount candidates for the deviation amount of the correspondence relationship between the corrected
投影対象4の形状が変化することによって、目標画像データ21における処理対象の画素と、撮影画像データ24における画素の対応にずれが生じ、画素間対応データ11における対応関係に変更が生じてしまう。目標画像データ21における処理対象画素に対応する撮影画像データ24における画素は、エピポーラ線E上でずれることが知られているが、そのずれ量は不明である。そこでずれ量候補生成部41は、目標画像データ21の処理対象画素と、撮影画像データ24の処理対象画素に対応する、複数の画素のずれ量の候補を作成する。ずれ量候補生成部41は、生成したずれ量の候補の情報を含むずれ候補データ25を生成し、記憶装置10に記憶する。
Due to the change in the shape of the
ここで図6を参照して、エピポーラ線Eを説明する。エピポーラ幾何において、プロジェクタ2が投影する画像座標のある点pは、X、X’、X’’などのいずれで結像されても、カメラ3が撮影した撮影画像データ24に射影した点c、c’、c’’は、特定の線上で観察されることが知られている。具体的には、プロジェクタ2が投影する画像座標の点pによる結像が、XからX’に変更されると、カメラ3が撮影した撮影画像データ24への射影は、点cからc’に変更される。このように、点c、c’、c’’を結ぶことで得られる特定の線を、エピポーラ線Eと称する。なお、エピポーラ線E上の各座標において観察される色は、それぞれ異なる結像位置に対応するので、互いに異なる。なお、カメラ3から見たプロジェクタ2の位置を、エピポーラ点と称する。エピポーラ点は、カメラ3とプロジェクタ2を結んだ直線と画像平面の交点である。
Here, the epipolar line E will be described with reference to FIG. In epipolar geometry, a point p having image coordinates projected by the
エピポーラ線Eは、プロジェクタ2およびカメラ3の位置関係に依存する。投影対象4の形状が変化した場合であっても、処理対象画素は、撮影画像データ24のエピポーラ線E上のいずれかの点にずれる。そこで本発明の実施の形態においては、図7に示すように、撮影画像データ24のエピポーラ線E上を探索すれば、処理対象画素がずれた位置を特定できることを利用している。
The epipolar line E depends on the positional relationship between the
投影対象4の形状が変化することによって、処理対象の画素は、エピポーラ線E上のいずれかの画素にずれるので、目標画像データ21における画素と、撮影画像データ24における画素とにずれが生じ、画素間対応データ11における画素間対応をそのまま用いることができなくなる。撮影画像データ24における画素は、エピポーラ線E上でずれるが、そのずれ量は不明である。そこでずれ量候補生成部41は、目標画像データ21の処理対象画素と、処理対象画素に対応する撮影画像データ24の画素とのずれ量の候補をいくつか生成する。ずれ量候補生成部41は、生成したずれ量の候補の情報を含むずれ候補データ25を記憶装置10に記憶する。ずれ量決定部36は、各ずれ量の候補が正しいと仮定して処理をする過程で、最も確度の高いずれ量の候補を適切なずれ量として確定する。
Since the pixel to be processed shifts to any pixel on the epipolar line E due to the change in the shape of the
ずれ量候補生成部41は、例えば、同様の光学系および投影対象4で計測されたずれ量に基づいて、ずれ量の候補を生成しても良いし、ランダムにずれ量の候補を生成しても良い。なお、撮影画像データ24のエピポーラ線E上でずれが生じるので、ずれ量候補生成部41は、水平方向および垂直方向の両方向についてのずれ量を特定する必要はなく、所定の方向におけるずれ量についてのみ候補を生成すれば良い。
The deviation amount candidate generation unit 41 may generate deviation amount candidates based on the deviation amount measured by the same optical system and the
なお本発明の実施の形態においては、3つのずれ量の候補を生成する場合を説明するがこれに限られない。例えば、画像処理装置1のリソースに余裕があり、プロジェクタ2およびカメラ3との転送速度にも余裕がある場合、さらに多くのずれ量の候補を生成しても良い。また、画像処理装置1のリソース、プロジェクタ2およびカメラ3との転送速度との兼ね合いから、ずれ量候補生成部41が生成するずれ量の候補の数が任意に設定されても良い。
In the embodiment of the present invention, the case where three candidates for the amount of deviation are generated will be described, but the present invention is not limited to this. For example, when the resources of the
反射率算出部42は、画素間対応データ11での処理対象画素の対応関係を、複数のずれ量の候補のそれぞれについてずらした対応関係のそれぞれに基づいて、応答関数を用いて、複数のずれ量の候補のそれぞれに対応する反射率を算出する。反射率算出部42は複数のずれ量の候補のそれぞれについて算出した反射率を含む反射率データ26を、記憶装置10に記憶する。
The
ここで反射率算出部42は、撮影画像データ24の処理対象画素を通るエピポーラ線E上で、複数のずれ量の候補のそれぞれについてずらした対応関係のそれぞれに基づいて、複数のずれ量の候補のそれぞれに対応する反射率を算出する。
Here, the
本発明の実施の形態に係る応答関数は、(式1)である。
(式1)におけるPおよびCの関係を、図8に示す。Pは、プロジェクタ2への入力に関し、Cは、プロジェクタ2への入力画像を投影対象4に投影した状態を、カメラ3が撮影した際の、カメラ3の出力に関する。
The relationship between P and C in (Equation 1) is shown in FIG. P relates to the input to the
ここで、前処理部31が応答関数を予め算出するので、プロジェクタ出力特性Lは、既知である。投影対象4の形状が変化することに伴い、処理対象画素は、エピポーラ線E上にずれて色が変わるので、(式1)の応答関数において、反射率Ku,vおよび画素対応u,vが変更されることになる。ここで、画素対応u,vは、ずれ量候補生成部41により生成されたずれ量の候補により仮定されるので、(式1)の応答関数から、各ずれ量候補に対する反射率Ku,vを算出することができる。
Here, since the
ここで、撮影画像取得部35、ずれ量決定部36および応答関数更新部37の処理を繰り返す場合、(式2)に示すように、逐次最小二乗法(Recursive Least Square Algorithm: RLS)により、直前の処理で用いた算出結果を用いることにより、精度高く、反射率を算出することが可能になる。(式2)は、所定の元画像データ22を補正して補正後画像データ23を生成し、補正後画像データ23をプロジェクタ2に入力して新たな補正後画像データ23を生成するように、フィードバックを繰り返す場合に好適である。
逐次最小二乗法は、他の適応アルゴリズムに比べ、目標までの収束が早い特徴を有するので、逐次最小二乗法により反射率を適切に計算することが可能になる。また(式2)では、直前の処理で用いたRtおよびStのみを保持すれば足り、過去の結果を全て保持する必要がない。従って、逐次最小二乗法により、精度向上を実現するとともに、メモリ消費を抑制し、高速処理を実現することが可能になる。 Since the sequential least-squares method has a feature that the convergence to the target is faster than other adaptive algorithms, the reflectance can be appropriately calculated by the sequential least-squares method. Also in (Equation 2), sufficient if held only the R t and S t that used in the previous process, there is no need to hold all the past results. Therefore, the sequential least squares method can improve accuracy, suppress memory consumption, and realize high-speed processing.
また本発明の実施の形態に係る画像処理装置1は、プロジェクタ2およびカメラ3間のフィードバックを繰り返し、逐次最小二乗法を用いて光学的補正を繰り返す。従って、一度の光学的補正では効果が弱い部分があっても、光学的補正を繰り返すことにより、補正効果の向上が期待できる。
Further, the
ずれ量候補生成部41によって生成された複数のずれ量の候補のそれぞれについて、反射率算出部42は、各ずれ量の候補に従って画素間対応データ11を変更した画素間対応に基づいて、それぞれ反射率を算出する。
For each of the plurality of deviation amount candidates generated by the deviation amount candidate generation unit 41, the
ずれ量選択部43は、反射率算出部42による結果に基づいて、ずれ量候補生成部41が生成した複数のずれ量の候補から、撮影画像データ24におけるずれ量を選択する。ずれ量選択部43は、複数のずれ量の候補のそれぞれに対応する反射率を比較して、複数のずれ量の候補から、撮影画像データ24におけるずれ量を選択する。ずれ量選択部43は、選択されたずれ量の情報を含む選択ずれデータ27を生成して、記憶装置10に記憶する。ずれ量選択部43が選択するずれ量は、実際のずれ量とは異なる場合もあるが、少なくともずれ量候補生成部41が生成したずれ量の候補のうち、最も実際のずれ量に近いと推測される。
The deviation
ずれ量選択部43が、適切なずれ量を選択する方法はいくつか考えられる。例えば、撮影画像データ24における近傍画素の各反射率の分散の小さい画像を出力できるずれ量を、適切なずれ量として選択する方法と、各ずれ量から生成された補正画像を比較して、適切なずれ量として選択する方法がある。
There are several possible methods for the deviation
まず、複数のずれ量の候補から尤もらしいずれ量を選択する際、反射率の分散を利用する方法を説明する。ずれ量選択部43は、複数のずれ量の候補のそれぞれに対応する反射率から、処理対象画素に対応する画素を含む近傍領域における反射率の分散が最も小さい反射率を選択し、選択された反射率に対応するずれ量を、適切なずれ量として選択する。
First, a method of utilizing the dispersion of reflectance when selecting a plausible amount from a plurality of candidates for a deviation amount will be described. The deviation
ずれ量選択部43は、反射率算出部42が算出した複数のずれ量の候補のそれぞれに対応する反射率から、処理対象画素に対応する画素を含む近傍領域における反射率の分散が最も小さい反射率を選択し、選択された反射率に対応するずれ量を、適切なずれ量として選択する。これは、画素間の対応が正しくない場合、反射率(色)の分散が大きくなることを利用している。例えば、図9(a)ないし(c)に示す各画像における各画素の色(反射率)の分散は、図9(a)が最も小さい。従って、図9に示す例の場合、ずれ量選択部43は、―4画素のずれが、投影対象4の形状変化により生じたと判断することができる。
From the reflectance corresponding to each of the plurality of deviation amount candidates calculated by the
なお、反射率を用いてずれ量を選択する方法を採用する場合、反射率算出部42は、処理対象画素の反射率のみならず、周辺領域の各画素の反射率も算出するのが好ましい。あるいは、反射率算出部42が、処理対象画素の反射率のみを算出し、ずれ量選択部43が、処理対象画素の周辺領域の各画素の反射率を算出しても良い。
When a method of selecting the amount of deviation using the reflectance is adopted, it is preferable that the
次に、各ずれ量から生成された補正画像を比較して、適切なずれ量として選択する方法を説明する。ずれ量選択部43は、ずれ量候補生成部41が生成した各ずれ量候補について、反射率算出部42で算出された各反射率を用いて、補正画像を生成する。ずれ量選択部43は、各ずれ量候補に対応する補正画像を比較する。ずれ量選択部43は、図3(c)および(d)で観察される縞模様が観察されてない、あるいは縞模様が少ない補正画像に対応するずれ量候補を、適切なずれ量として選択する。
Next, a method of comparing the corrected images generated from each deviation amount and selecting an appropriate deviation amount will be described. The deviation
反射率の分散を利用する方法は、各ずれ量から生成された補正画像を比較して、適切なずれ量を選択する方法と比べて、処理量を抑制できるメリットがある。各ずれ量から生成された補正画像を比較して、適切なずれ量を選択する方法では、算出した反射率を反映した画像データを、ずれ候補の数だけ作成する必要があり、画像処理装置1に負担が生じる場合がある。これに対し反射率の分散を利用する方法は、ずれ候補ごとに、算出した反射率の分散を比較すればよく、補正画像を生成するも必要ないので、画像処理装置1に生じる負担が軽減される。
The method using the dispersion of the reflectance has an advantage that the processing amount can be suppressed as compared with the method of comparing the corrected images generated from each deviation amount and selecting an appropriate deviation amount. In the method of comparing the corrected images generated from each deviation amount and selecting an appropriate deviation amount, it is necessary to create as many image data as the number of deviation candidates reflecting the calculated reflectance, and the
このように、ずれ量決定部36の処理によって、(式1)における応答関数の各パラメータのうち、反射率Ku,v、プロジェクタ出力特性Lおよび画素対応u,vが求まり、応答関数更新部37により、応答関数データ13と画素間対応データ11が更新される。従って、光学的補正部33は、カメラ観測値Cu,vに、目標となる画像の値を設定して、プロジェクタ入力値Pu,vを算出することができる。ここでカメラ観測値Cu,vに設定される、目標となる画像の値は、目標画像データ21の値であって、カメラ座標系の座標で表現される。このように算出されたプロジェクタ入力値Pu,vは、光学的補正部33が出力する補正後画像データ23の画素の値を形成する。
In this way, by the processing of the shift
このように本発明の実施の形態に係る画像処理装置1は、投影対象4の形状が変化し、画素間対応がずれた場合であっても、画素間対応のずれ量の候補を作成し、各候補について反射率を算出して評価する。これにより画像処理装置1は、ずれ量の候補から、尤もらしいずれ量を決定して補正後画像データ23を出力できるので、投影対象4の形状の変化を抑制した画像を表示することができる。
As described above, the
(第1の変形例)
本発明の実施の形態において、画像処理装置1が、画素単位で、プロジェクタに入力される画像データの領域と、形状変化していない投影対象に画像データが投影された状態をカメラが撮影する画像データを対応づけて、補正する場合を説明したがこれに限られない。例えば画像処理装置1が、2画素×2画素、8画素×8画素など、複数の画素で構成される複数画素単位で対応づけて、補正しても良い。
(First modification)
In the embodiment of the present invention, the
このように、本発明の実施の形態において、画像処理装置1による処理単位となる領域は、1画素で構成されても良いし、複数画素で構成されても良い。
As described above, in the embodiment of the present invention, the region serving as the processing unit by the
画素単位で補正する場合、高精細な補正画像を得ることができ、複数の画素単位で補正する場合、処理の高速化が期待できる。画像処理装置1は、画像処理装置1、プロジェクタ2およびカメラ3などの各種機器の性能、元画像データ22の特性、または投影対象4の特性、画像処理装置1とプロジェクタ2およびカメラ3との接続環境などに応じて、適宜、処理単位となる領域の大きさを設定しても良い。
When correcting in pixel units, a high-definition corrected image can be obtained, and when correcting in units of a plurality of pixels, speeding up of processing can be expected. The
(第2の変形例)
本発明の実施の形態においては、プロジェクタ2が静止画を投影する場合を説明したが、映像の各フレームデータについても適用することができる。本発明の実施の形態に係る元画像データ22が、映像データの一つのフレームデータに対応し、光学的補正部33が、映像データの複数のフレームデータについて補正を逐次行う処理に適用することができる。
(Second modification)
In the embodiment of the present invention, the case where the
この場合、光学的補正部33は、先行するフレームについて算出したずれ量を、後続のフレームに適用して、補正後の後続のフレームを、プロジェクタ2に入力する。また光学的補正部33は、(式2)におけるRtおよびStに、先行のフレームに関する処理結果を適用して、後続のフレームについてRt+1およびSt+1を算出する。
In this case, the
このように本発明の実施の形態に係る画像処理装置1は、静止画を投影対象4に投影中に投影対象4の形状が変化した場合のみならず、映像を投影対象4に投影中に投影対象4の形状が変化した場合にも適用することができる。
As described above, the
(第3の変形例)
本発明の実施の形態においては、画素間対応データ11が、プロジェクタ2に入力される画像データの各画素について、この画像データの画素の識別子と、カメラ3が撮影する画像データにおいて対応する画素の識別子とを対応づける場合を説明したが、これに限られない。例えば、画素間対応データ11は、前処理部31が算出した画素間対応と、ずれ量決定部36が決定したずれ量の履歴を含むデータであっても良い。また画素間対応データ11は、ずれ量決定部36が決定したずれ量が反映された画素間対応を表す変換関数に関するデータであっても良い。画素間対応データ11は、前処理部31が画素間対応データ11を算出した後に、最新の画素間対応を把握できれば、どのような形式であっても良い。
(Third variant)
In the embodiment of the present invention, the pixel-to-
(その他の実施の形態)
上記のように、本発明の実施の形態とその第1ないし第3の変形例によって記載したが、この開示の一部をなす論述および図面はこの発明を限定するものであると理解すべきではない。この開示から当業者には様々な代替実施の形態、実施例および運用技術が明らかとなる。
(Other embodiments)
As described above, although described by embodiments of the present invention and first to third modifications thereof, the statements and drawings that form part of this disclosure should be understood to limit the invention. Absent. This disclosure reveals to those skilled in the art various alternative embodiments, examples and operational techniques.
例えば、本発明の実施の形態に記載した画像処理装置は、図1に示すように一つのハードウエア上に構成されても良いし、その機能や処理数に応じて複数のハードウエア上に構成されても良い。また、他の処理を行うコンピュータ上に実現されても良い。 For example, the image processing apparatus described in the embodiment of the present invention may be configured on one hardware as shown in FIG. 1, or may be configured on a plurality of hardware according to its function and the number of processes. May be done. Further, it may be realized on a computer that performs other processing.
本発明はここでは記載していない様々な実施の形態等を含むことは勿論である。従って、本発明の技術的範囲は上記の説明から妥当な特許請求の範囲に係る発明特定事項によってのみ定められるものである。 It goes without saying that the present invention includes various embodiments not described here. Therefore, the technical scope of the present invention is defined only by the matters specifying the invention relating to the reasonable claims from the above description.
1 画像処理装置
2 プロジェクタ
3 カメラ
4 投影対象
9 画像処理システム
10 記憶装置
11 画素間対応データ
12 エピポーラ線データ
13 応答関数データ
21 目標画像データ
22 元画像データ
23 補正後画像データ
24 撮影画像データ
25 ずれ候補データ
26 反射率データ
27 選択ずれデータ
30 処理装置
31 前処理部
32 目標画像生成部
33 光学的補正部
34 投影画像出力部
35 撮影画像取得部
36 ずれ量決定部
37 応答関数更新部
41 ずれ量候補生成部
42 反射率算出部
43 ずれ量選択部
1
Claims (9)
プロジェクタに入力される画像データの領域と、形状変化していない投影対象に前記画像データが投影された状態をカメラが撮影する画像データの領域とを対応づけた領域間対応データと、
前記領域間対応データにおいて対応づけられた領域について、前記プロジェクタに入力される画像データの値、形状が変化可能な投影対象の反射率、および前記投影対象に前記画像データが投影された状態を前記カメラが撮影した画像データの値との関係を示す応答関数に関する応答関数データを記憶する記憶装置と、
元画像データを、前記応答関数を用いて光学的補正を行い、補正後画像データを生成する光学的補正部と、
前記補正後画像データを、前記プロジェクタに入力する投影画像出力部と、
前記形状が変化可能な投影対象に前記プロジェクタが前記補正後画像データを投影した状態を、前記カメラが撮影した撮影画像データを、取得する撮影画像取得部と、
前記領域間対応データでの処理対象領域間の対応関係と、前記補正後画像データおよび前記撮影画像データとの各処理対象領域間の対応関係のずれ量および前記処理対象領域の反射率を決定するずれ量決定部と、
前記ずれ量決定部が決定したずれ量および前記処理対象領域の反射率に従って、前記応答関数と領域間対応データを更新する応答関数更新部を備え、
前記ずれ量決定部は、
前記ずれ量について、複数のずれ量の候補を生成するずれ量候補生成部と、
前記領域間対応データでの前記処理対象領域の対応関係を、前記複数のずれ量の候補のそれぞれについてずらした対応関係のそれぞれに基づいて、前記応答関数を用いて、前記複数のずれ量の候補のそれぞれに対応する反射率を算出する反射率算出部と、
前記複数のずれ量の候補のそれぞれに対応する反射率を比較して、前記複数のずれ量の候補から、前記撮影画像データにおけるずれ量と反射率を選択するずれ量選択部を備える
ことを特徴とする画像処理装置。 An image processing device that projects an image onto a projection target whose shape can be changed.
Inter-regional correspondence data that associates the region of the image data input to the projector with the region of the image data captured by the camera when the image data is projected onto the projection target whose shape has not changed.
With respect to the regions associated with the inter-regional data, the value of the image data input to the projector, the reflectance of the projection target whose shape can be changed, and the state in which the image data is projected onto the projection target are described. A storage device that stores response function data related to a response function that indicates the relationship with the value of image data captured by the camera, and a storage device that stores the response function data.
An optical correction unit that optically corrects the original image data using the response function and generates corrected image data.
A projection image output unit that inputs the corrected image data to the projector, and
A captured image acquisition unit that acquires captured image data captured by the camera in a state in which the projector projects the corrected image data onto a projection target whose shape can be changed.
The amount of deviation of the correspondence relationship between the processing target areas in the inter-region correspondence data, the correspondence relationship between the corrected image data and the captured image data between the processing target areas, and the reflectance of the processing target area are determined. The deviation amount determination unit and
A response function update unit for updating the response function and inter-region correspondence data according to the deviation amount determined by the deviation amount determination unit and the reflectance of the processing target region is provided.
The deviation amount determining unit is
With respect to the deviation amount, a deviation amount candidate generation unit that generates a plurality of deviation amount candidates,
The correspondence relationship of the processing target area in the inter-region correspondence data is shifted for each of the plurality of deviation amount candidates, and the response function is used to shift the correspondence relationship of the plurality of deviation amount candidates. The reflectance calculation unit that calculates the reflectance corresponding to each of
It is characterized by including a deviation amount selection unit that compares the reflectances corresponding to each of the plurality of deviation amount candidates and selects the deviation amount and the reflectance in the captured image data from the plurality of deviation amount candidates. Image processing device.
前記処理対象領域は、前記撮影画像データの所定領域の値と、前記領域間対応データにおいて前記所定領域に対応する前記目標画像データの領域の値とを比較して、所定の閾値以上の差分のある前記所定領域である
ことを特徴とする請求項1に記載の画像処理装置。 A target image generation unit for generating target target image data in a state captured by the camera from the original image data is further provided.
The processing target region compares the value of the predetermined region of the captured image data with the value of the region of the target image data corresponding to the predetermined region in the inter-region correspondence data, and the difference is equal to or greater than the predetermined threshold value. The image processing apparatus according to claim 1, wherein the predetermined area is provided.
前記反射率算出部は、前記エピポーラ線上で、前記複数のずれ量の候補のそれぞれについてずらした対応関係のそれぞれに基づいて、前記複数のずれ量の候補のそれぞれに対応する反射率を算出する
ことを特徴とする請求項1に記載の画像処理装置。 The shift amount candidate generation unit generates the plurality of shift amount candidates on the epipolar line passing through the processing target region in the captured image data.
The reflectance calculation unit calculates the reflectance corresponding to each of the plurality of deviation amount candidates on the epipolar line based on each of the corresponding relationships shifted for each of the plurality of deviation amount candidates. The image processing apparatus according to claim 1.
ことを特徴とする請求項1に記載の画像処理装置。 The deviation amount selection unit selects and selects the reflectance having the smallest reflectance dispersion in the neighboring region including the region corresponding to the processing target region from the reflectance corresponding to each of the plurality of deviation amount candidates. The image processing apparatus according to claim 1, wherein a deviation amount corresponding to the reflected reflectance is selected as an appropriate deviation amount.
前記反射率算出部は、式2により前記反射率を算出することを特徴とする請求項5に記載の画像処理装置。
The image processing apparatus according to claim 5, wherein the reflectance calculation unit calculates the reflectance by the formula 2.
前記反射率算出部は、式2により前記反射率を算出することを特徴とする請求項5に記載の画像処理装置。
The image processing apparatus according to claim 5, wherein the reflectance calculation unit calculates the reflectance by the formula 2.
コンピュータが、プロジェクタに入力される画像データの領域と、形状変化していない投影対象に前記画像データが投影された状態をカメラが撮影する画像データの領域とを対応づけた領域間対応データを記憶装置に記憶するステップと、
前記コンピュータが、前記領域間対応データにおいて対応づけられた領域について、前記プロジェクタに入力される画像データの値、形状が変化可能な投影対象の反射率、および前記投影対象に前記画像データが投影された状態を前記カメラが撮影した画像データの値との関係を示す応答関数に関する応答関数データを前記記憶装置に記憶するステップと、
前記コンピュータが、元画像データを、前記応答関数を用いて光学的補正を行い、補正後画像データを生成するステップと、
前記コンピュータが、前記補正後画像データを、前記プロジェクタに入力するステップと、
前記コンピュータが、前記形状が変化可能な投影対象に前記プロジェクタが前記補正後画像データを投影した状態を、前記カメラが撮影した撮影画像データを、取得するステップと、
前記コンピュータが、前記領域間対応データでの処理対象領域間の対応関係と、前記補正後画像データおよび前記撮影画像データとの各処理対象領域間の対応関係のずれ量および前記処理対象領域の反射率を決定するステップと、
前記コンピュータが、決定したずれ量および前記処理対象領域の反射率に従って、前記応答関数と領域間対応データを更新するステップを備え、
前記決定するステップは、
前記ずれ量について、複数のずれ量の候補を生成するステップと、
前記領域間対応データでの前記処理対象領域の対応関係を、前記複数のずれ量の候補のそれぞれについてずらした対応関係のそれぞれに基づいて、前記応答関数を用いて、前記複数のずれ量の候補のそれぞれに対応する反射率を算出するステップと、
前記複数のずれ量の候補のそれぞれに対応する反射率を比較して、前記複数のずれ量の候補から、前記撮影画像データにおけるずれ量と反射率を選択するステップを備える
ことを特徴とする画像処理方法。 An image processing method that projects an image onto a projection target whose shape can be changed.
The computer stores the inter-regional correspondence data in which the region of the image data input to the projector is associated with the region of the image data captured by the camera when the image data is projected onto the projection target whose shape has not changed. Steps to store in the device and
The computer projects the value of the image data input to the projector, the reflectance of the projection target whose shape can be changed, and the image data onto the projection target for the region associated with the inter-region correspondence data. A step of storing the response function data relating to the response function indicating the relationship between the state and the value of the image data taken by the camera in the storage device, and
A step in which the computer optically corrects the original image data using the response function to generate the corrected image data.
A step in which the computer inputs the corrected image data to the projector.
A step in which the computer acquires the captured image data captured by the camera in a state in which the projector projects the corrected image data onto a projection target whose shape can be changed.
The computer causes the deviation amount of the correspondence relationship between the processing target areas in the inter-region correspondence data and the correspondence relationship between the corrected image data and the captured image data between the processing target areas and the reflection of the processing target area. Steps to determine the rate and
The computer comprises a step of updating the response function and the inter-region correspondence data according to the determined deviation amount and the reflectance of the processing target region.
The step to determine is
With respect to the deviation amount, a step of generating a plurality of deviation amount candidates and
The correspondence relationship of the processing target area in the inter-region correspondence data is shifted for each of the plurality of deviation amount candidates, and the response function is used to shift the correspondence relationship of the plurality of deviation amount candidates. Steps to calculate the reflectance corresponding to each of
An image comprising a step of comparing the reflectances corresponding to each of the plurality of deviation amount candidates and selecting the deviation amount and the reflectance in the captured image data from the plurality of deviation amount candidates. Processing method.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017146103A JP6872239B2 (en) | 2017-07-28 | 2017-07-28 | Image processing equipment, image processing method and image processing program |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017146103A JP6872239B2 (en) | 2017-07-28 | 2017-07-28 | Image processing equipment, image processing method and image processing program |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2019029789A JP2019029789A (en) | 2019-02-21 |
| JP6872239B2 true JP6872239B2 (en) | 2021-05-19 |
Family
ID=65478856
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2017146103A Active JP6872239B2 (en) | 2017-07-28 | 2017-07-28 | Image processing equipment, image processing method and image processing program |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6872239B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP7593382B2 (en) | 2022-09-20 | 2024-12-03 | セイコーエプソン株式会社 | Display method, display system, and program |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP4172684B2 (en) * | 2002-04-12 | 2008-10-29 | 富士重工業株式会社 | Image correction apparatus and image correction method |
| JP2009060258A (en) * | 2007-08-30 | 2009-03-19 | Sumitomo Electric Ind Ltd | Correction method and correction apparatus |
| JP2011044773A (en) * | 2009-08-19 | 2011-03-03 | Fuji Xerox Co Ltd | Projection system, projection control unit, and projection system control program |
| JP5273008B2 (en) * | 2009-10-16 | 2013-08-28 | 株式会社ニコン | Projector and projected image correction program |
| JP5590668B2 (en) * | 2010-07-20 | 2014-09-17 | 国立大学法人電気通信大学 | Projector apparatus, video signal correction apparatus, video signal correction method, and program |
| JP6798491B2 (en) * | 2015-07-08 | 2020-12-09 | ソニー株式会社 | Information processing equipment and methods, and programs |
-
2017
- 2017-07-28 JP JP2017146103A patent/JP6872239B2/en active Active
Also Published As
| Publication number | Publication date |
|---|---|
| JP2019029789A (en) | 2019-02-21 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8180145B2 (en) | Method for producing image with depth by using 2D images | |
| US20210281748A1 (en) | Information processing apparatus | |
| US11838674B2 (en) | Image processing system, image processing method and storage medium | |
| JP5960513B2 (en) | Video processing apparatus and method | |
| JP2018524896A (en) | Method and apparatus for determining a depth map of an image | |
| CN109636890B (en) | Texture fusion method and device, electronic equipment, storage medium and product | |
| JP7175637B2 (en) | Information processing device, robot system, information processing method and program | |
| US9383635B2 (en) | Image processing device, projector, and image processing method | |
| US11457158B2 (en) | Location estimation device, location estimation method, and program recording medium | |
| CN108076332B (en) | System and method for digital black level blending | |
| JP2016024052A (en) | Three-dimensional measurement system, three-dimensional measurement method and program | |
| JP2011237296A (en) | Three dimensional shape measuring method, three dimensional shape measuring device, and program | |
| CN117221466B (en) | Video stitching method and system based on grid transformation | |
| JP2020096325A (en) | Information processor, control method of information processor, and program | |
| JP4296617B2 (en) | Image processing apparatus, image processing method, and recording medium | |
| CN110784699B (en) | Projection processing method, device, projector and readable storage medium | |
| US20190162529A1 (en) | 3d scanning device and method | |
| JP6872239B2 (en) | Image processing equipment, image processing method and image processing program | |
| US7936357B2 (en) | Image display device, method of generating correction value of image display device, program for generating correction value of image display device, and recording medium recording program thereon | |
| CN112106115B (en) | Method for estimating light for augmented reality and electronic device thereof | |
| JP2016072691A (en) | Image processing apparatus, control method therefor, and program | |
| JP6991700B2 (en) | Information processing equipment, information processing method, program | |
| US9014464B2 (en) | Measurement device, measurement method, and computer program product | |
| US11800073B2 (en) | Setting support method, setting support system for projection region, and non-transitory computer-readable storage medium storing a program | |
| JP2007271771A (en) | Image display system and control method therefor |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200519 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20210312 |
|
| TRDD | Decision of grant or rejection written | ||
| A01 | Written decision to grant a patent or to grant a registration (utility model) |
Free format text: JAPANESE INTERMEDIATE CODE: A01 Effective date: 20210406 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210412 |
|
| R150 | Certificate of patent or registration of utility model |
Ref document number: 6872239 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R150 |