Deprecated: The each() function is deprecated. This message will be suppressed on further calls in /home/zhenxiangba/zhenxiangba.com/public_html/phproxy-improved-master/index.php on line 456
JP6872239B2 - Image processing equipment, image processing method and image processing program - Google Patents
[go: Go Back, main page]

JP6872239B2 - Image processing equipment, image processing method and image processing program - Google Patents

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

Info

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
Application number
JP2017146103A
Other languages
Japanese (ja)
Other versions
JP2019029789A (en
Inventor
橋本 直己
直己 橋本
幸機 河阪
幸機 河阪
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
THE UNIVERSITY OF ELECTRO-COMUNICATINS
Original Assignee
THE UNIVERSITY OF ELECTRO-COMUNICATINS
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 THE UNIVERSITY OF ELECTRO-COMUNICATINS filed Critical THE UNIVERSITY OF ELECTRO-COMUNICATINS
Priority to JP2017146103A priority Critical patent/JP6872239B2/en
Publication of JP2019029789A publication Critical patent/JP2019029789A/en
Application granted granted Critical
Publication of JP6872239B2 publication Critical patent/JP6872239B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

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 Patent Document 1, the response function is obtained from the luminance value of each color component for each projected image, and the color correction is performed by using the light distribution map showing the rate of change of the luminance from the reference point. As a result, Patent Document 1 makes it possible to display an image without being affected by the pattern on the screen even when the image data is projected on a screen whose one surface is not white, such as a pattern on the screen.

特許第5590668号公報Japanese Patent No. 5590668

しかしながら一般的には、投影対象の形状が変化すると、適切に補正を行うことができない場合がある。例えば、カーテンなどの固定されていない投影対象に画像を投影する際、投影対象が揺れ、投影対象の形状が変化する場合がある。カーテンの揺れにより投影対象の形状が変化すると、プロジェクタの投影による結像までの距離が変化する。プロジェクタに入力された画像データの画素と、カメラで撮影された画像データの画素との対応関係が壊れてしまい、各画素に対して、適切な光学補正を行うことができず、形状が変化可能な投影対象に、適切に画像を投影できない問題がある。 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であっても良い。

Figure 0006872239
The response function may be Equation 1.
Figure 0006872239

撮影画像取得部、ずれ量決定部および応答関数更新部の処理を繰り返す場合、反射率算出部は、式2により反射率を算出しても良い。

Figure 0006872239
When the processing of the captured image acquisition unit, the deviation amount determination unit, and the response function update unit is repeated, the reflectance calculation unit may calculate the reflectance by Equation 2.
Figure 0006872239

元画像データが、映像データの一つのフレームデータであり、ずれ量決定部が、映像データの複数のフレームデータについて逐次ずれ量を決定する場合、反射率算出部は、式2により反射率を算出しても良い。

Figure 0006872239
When the original image data is one frame data of the video data and the deviation amount determining unit determines the sequential deviation amount for a plurality of frame data of the video data, the reflectance calculation unit calculates the reflectance by Equation 2. You may.
Figure 0006872239

本発明の第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.

本発明の実施の形態に係る画像処理装置のハードウエア構成および機能ブロックを説明する図である。It is a figure explaining the hardware composition and the functional block of the image processing apparatus which concerns on embodiment of this invention. 本発明の実施の形態に係る画像処理装置が用いられる画像処理システムを説明する図である。It is a figure explaining the image processing system which uses the image processing apparatus which concerns on embodiment of this invention. 本発明の実施の形態に係る画像処理装置の処理に関連する画像を説明する図である。It is a figure explaining the image which concerns the processing of the image processing apparatus which concerns on embodiment of this invention. 本発明の実施の形態に係る画像処理装置の処理を説明するフローチャートである。It is a flowchart explaining the processing of the image processing apparatus which concerns on embodiment of this invention. 本発明の実施の形態に係る光学的補正部による光学的補正処理を説明するフローチャートである。It is a flowchart explaining the optical correction process by the optical correction part which concerns on embodiment of this invention. エピポーラ幾何におけるエピポーラ線を説明する図である。It is a figure explaining the epipolar line in the epipolar geometry. 本発明の実施の形態に係る光学的補正部が、ずれを探索する方向を説明する図である。It is a figure explaining the direction which the optical correction part which concerns on embodiment of this invention searches for a deviation. 本発明の実施の形態に係る応答関数のパラメータを説明する図である。It is a figure explaining the parameter of the response function which concerns on embodiment of this invention. 本発明の実施の形態に係る光学的補正部が、最適なずれを選択する処理の一例を説明する図である。It is a figure explaining an example of the process which the optical correction part which concerns on embodiment of this invention selects the optimum deviation.

次に、図面を参照して、本発明の実施の形態を説明する。以下の図面の記載において、同一または類似の部分には同一または類似の符号を付している。 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 image processing apparatus 1 according to the embodiment of the present invention shown in FIG. 1 projects an image capable of suppressing the influence of the shape change on a projection target whose shape can be changed. The image processing device 1 optically corrects the original image data 22 in the projector 2 to generate the corrected image data 23, inputs the corrected image data 23 into the projector 2, and the projector 2 outputs the corrected image data 23. The captured image data 24 captured by the camera 3 in the projected state is acquired from the camera 3. The image processing device 1 estimates the deviation of the correspondence between pixels due to the shape change of the projection target, and considers the estimated deviation of the correspondence between pixels to suppress the influence of the shape change of the projection target on the corrected image data 23. The generated and corrected image data 23 is input to the projector 2. As a result, the image processing apparatus 1 according to the embodiment of the present invention can perform projection while suppressing the influence of the shape change of the projection target.

本発明の実施の形態においては、プロジェクタ2が静止画に光学的補正を施して投影する場合を説明するが、これに限られない。例えば、プロジェクタ2が映像を投影する場合に、本発明の実施の形態に係る光学的補正を、映像のフレームデータに適用して、先行するフレームで得られた光学的補正を、後続のフレームに適用しても良い。 In the embodiment of the present invention, the case where the projector 2 applies optical correction to the still image and projects the image will be described, but the present invention is not limited to this. For example, when the projector 2 projects an image, the optical correction according to the embodiment of the present invention is applied to the frame data of the image, and the optical correction obtained in the preceding frame is applied to the subsequent frame. May be applied.

図2を参照して、本発明の実施の形態に係る画像処理装置1が用いられる画像処理システム9を説明する。画像処理システム9は、図1に示す画像処理装置1のほか、プロジェクタ2、カメラ3および投影対象4を備える。プロジェクタ2は、光学的補正により得られた補正後画像データ23を、投影対象4に投影する。カメラ3は、プロジェクタ2の投影により投影対象4で結像された状態を撮影し、撮影で得られた撮影画像データ24を、画像処理装置1に入力する。画像処理装置1は、入力された撮影画像データ24に基づいて適切に応答関数と画素間対応を更新して、更新された応答関数と画素間対応を用いて光学的補正を行い、光学的補正の結果得られた補正後画像データ23を、プロジェクタ2に投影させる。 The image processing system 9 in which the image processing apparatus 1 according to the embodiment of the present invention is used will be described with reference to FIG. The image processing system 9 includes a projector 2, a camera 3, and a projection target 4 in addition to the image processing device 1 shown in FIG. The projector 2 projects the corrected image data 23 obtained by the optical correction onto the projection target 4. The camera 3 photographs the state of being imaged by the projection target 4 by the projection of the projector 2, and inputs the captured image data 24 obtained by the imaging to the image processing device 1. The image processing device 1 appropriately updates the response function and the pixel-to-pixel correspondence based on the input captured image data 24, and performs optical correction using the updated response function and the pixel-to-pixel correspondence to perform optical correction. The corrected image data 23 obtained as a result of the above is projected onto the projector 2.

本発明の実施の形態において投影対象4は、形状変化するものであって、例えば、カーテンである。一般的にカーテンは、上端がレールからつり下げられ、下端は、何ら固定されず解放される。従って、風や接触などの影響を受けて、カーテンは、揺れて形状が変化する場合があり、形状の変化は、下方ほど顕著に観察される。 In the embodiment of the present invention, the projection target 4 is a shape-changing object, for example, a curtain. Generally, the upper end of the curtain is suspended from the rail, and the lower end is released without being fixed at all. Therefore, the curtain may sway and change its shape under the influence of wind, contact, etc., and the change in shape is more noticeably observed downward.

例えば、図3(a)に示す画像データを、プロジェクタ2がカーテンに投影する場合を説明する。図3(b)は、形状変化していないカーテンに投影された状態をカメラ3が撮影した画像示し、図3(a)の画像データが、適切に投影されている。 For example, a case where the projector 2 projects the image data shown in FIG. 3A onto the curtain will be described. FIG. 3B shows an image taken by the camera 3 in a state of being projected onto a curtain whose shape has not changed, and the image data of FIG. 3A is appropriately projected.

図3(c)は、左側において、カーテンが揺れて形状変化が生じた投影対象4に投影された状態を示し、右側において、本発明の実施の形態に係る画像処理装置1によって光学的補正された画像が投影された状態を示す。左側においては、下方に縞模様が形成されており、下方ほど形状変化が生じやすいカーテンの特性と一致する。一方右側においては、左側で生じたような縞模様は観察されず、投影対象4の形状変化による影響が抑制されていることがわかる。 FIG. 3C shows a state in which the curtain sways and is projected onto the projection target 4 in which the shape is changed on the left side, and is optically corrected by the image processing device 1 according to the embodiment of the present invention on the right side. Shows the projected state of the image. On the left side, a striped pattern is formed at the bottom, which matches the characteristics of the curtain, which tends to change shape toward the bottom. On the other hand, on the right side, the striped pattern that occurred on the left side is not observed, and it can be seen that the influence of the shape change of the projection target 4 is suppressed.

また図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 projection target 4 in which the shape is changed and a state in which the image corrected by the image processing device 1 is projected, as in FIG. 3C. Compared with FIG. 3C, the projection target 4 is different in that the shape is further changed. On the left side of FIG. 3D, a striped pattern is formed not only below but also as a whole. On the other hand, on the right side, as in FIG. 3C, the striped pattern generated on the left side is not observed, and it can be seen that the influence of the shape change of the projection target 4 is suppressed.

投影対象4が形状変化すると、図3(c)および(d)の左側のように一般的に縞模様が観察される原因としては、図3(a)に示す、プロジェクタ2に入力された画像の画素と、図3(b)に示す、カメラ3が撮影した画像の画素との対応づけがくずれることが考えられる。 When the shape of the projection target 4 changes, the reason why the striped pattern is generally observed as shown on the left side of FIGS. 3 (c) and 3 (d) is the image input to the projector 2 shown in FIG. 3 (a). It is conceivable that the correspondence between the pixels of the above and the pixels of the image taken by the camera 3 shown in FIG. 3B is broken.

一般的な光学的補正においては、プロジェクタ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 projector 2 and the image output by the camera 3 are different, the pixels of the image input to the projector 2 shown in FIG. 3A are used in advance. , The pixel-to-pixel correspondence, which is the correspondence with the pixels of the image taken by the camera 3 as shown in FIG. 3 (b), is performed. After that, the pixel to be corrected is specified with reference to the image taken by the camera 3 shown in FIG. 3 (b). Based on the pixel-to-pixel correspondence calculated in advance, the pixel to be corrected in the image input to the projector 2 shown in FIG. 3A is specified, and the specified pixel is corrected.

投影対象4の形状変化が発生しない場合、プロジェクタ2およびカメラ3の位置も変わらないので、予め算出された画素間対応が維持される。従って、プロジェクタ2、カメラ3および投影対象4の位置関係が決まった状態で、画素間対応を特定し、その特定された画素間対応を用いて光学的補正を行えば良い。 When the shape of the projection target 4 does not change, the positions of the projector 2 and the camera 3 do not change, so that the pixel-to-pixel correspondence calculated in advance is maintained. Therefore, in a state where the positional relationship between the projector 2, the camera 3, and the projection target 4 is determined, the pixel-to-pixel correspondence may be specified, and the optical correction may be performed using the specified pixel-to-pixel correspondence.

しかしながら投影対象4の形状に変化が生じると、プロジェクタ2と投影対象4上の結像との距離、およびカメラ3と投影対象4上の結像との距離が変更されてしまう。その結果、投影対象4上の色(反射率)が変更し、投影対象4が形状変化しない状態で算出された画素間対応から変更が生じる。従って、投影対象4の形状が変化したにもかかわらず、投影対象4の形状が変化していない状態で算出された画素間対応を用いて補正を行うと、補正対象の画素とは異なる画素を補正することになる。 However, when the shape of the projection target 4 changes, the distance between the projector 2 and the image formation on the projection target 4 and the distance between the camera 3 and the image formation on the projection target 4 are changed. As a result, the color (reflectance) on the projection target 4 changes, and the change occurs from the pixel-to-pixel correspondence calculated in a state where the projection target 4 does not change its shape. Therefore, if the correction is performed using the pixel-to-pixel correspondence calculated in the state where the shape of the projection target 4 has not changed even though the shape of the projection target 4 has changed, a pixel different from the pixel to be corrected is obtained. It will be corrected.

その結果、例えば、プロジェクタ2に入力される画像の所定画素について明るくなるように補正をしたつもりが、他の画素について明るくなるように補正をすることになり、その所定画素が適切に補正されず、暗いままの状態になり、明るくする必要のない画素がさらに明るく補正される。同様に、プロジェクタ2に入力される画像の所定画素について暗くなるように補正をしたつもりが、他の画素について暗くなるように補正をすることになり、その所定画素が適切に補正されず、明るいままの状態になり、暗くする必要のない画素がさらに暗く補正される。従って、図3(c)および図3(d)の左側に示すように、明暗が明確に形成され、縞模様が観察される。 As a result, for example, the predetermined pixel of the image input to the projector 2 is corrected so as to be bright, but the other pixels are corrected so as to be bright, and the predetermined pixel is not corrected appropriately. , It remains dark and the pixels that do not need to be brightened are corrected to be brighter. Similarly, although it was intended that the predetermined pixels of the image input to the projector 2 were corrected to be dark, the other pixels were corrected to be dark, and the predetermined pixels were not properly corrected and were bright. Pixels that do not need to be darkened are corrected to be darker. Therefore, as shown on the left side of FIGS. 3 (c) and 3 (d), light and dark are clearly formed and a striped pattern is observed.

そこで本発明の実施の形態に係る画像処理装置1は、投影対象4の形状変化に応じて、画素間対応が変更されても、変更後の画素間対応を推測し、推測された画素間対応に従って応答関数と画素間対応を更新し、更新された応答関数と画素間対応を用いて光学的補正を行う。これにより図3(c)および(d)の右側に示すように、本発明の実施の形態に係る画像処理装置1は、形状変化が生じた投影対象に投影した場合でも、投影対象4の形状変化に伴う影響を抑制することができる。 Therefore, the image processing device 1 according to the embodiment of the present invention estimates the changed pixel-to-pixel correspondence even if the pixel-to-pixel correspondence is changed according to the shape change of the projection target 4, and the estimated pixel-to-pixel correspondence is estimated. The response function and the pixel-to-pixel correspondence are updated according to the above, and optical correction is performed using the updated response function and the pixel-to-pixel correspondence. As a result, as shown on the right side of FIGS. 3 (c) and 3 (d), the image processing apparatus 1 according to the embodiment of the present invention has the shape of the projection target 4 even when projected onto the projection target in which the shape has changed. The effect of change can be suppressed.

一般的に、プロジェクタ2による投影対象4は、形状変化の生じない壁や、張られたスクリーンなどが用いられていたが、本発明の実施の形態に係る画像処理装置1によれば、カーテンなど形状変化が生じるものでも投影対象4とすることが可能になる。従って本発明の実施の形態に係る画像処理装置1によれば、投影対象4の選択肢を広げることができ、様々なシーンでプロジェクタ2による投影を実現することが可能になる。 Generally, as the projection target 4 by the projector 2, a wall whose shape does not change, a stretched screen, or the like is used, but according to the image processing device 1 according to the embodiment of the present invention, a curtain or the like is used. Even if the shape changes, it can be the projection target 4. Therefore, according to the image processing apparatus 1 according to the embodiment of the present invention, the options of the projection target 4 can be expanded, and the projection by the projector 2 can be realized in various scenes.

(処理の概要)
図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 image processing device 1 calculates in advance the data required for optical correction as preprocessing. When the installation of the projector 2, the camera 3 and the projection target 4 is completed, the positional relationship between the projector 2, the camera 3 and the projection target 4 is determined, and this positional relationship is not changed during the processing of the image processing method. Therefore, in step S1, the image processing device 1 generates inter-pixel correspondence data (inter-region correspondence data) 11, epipolar line data 12, response function data 13, and the like based on this positional relationship.

ステップ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 inter-pixel correspondence data 11. Further, in order to calculate the response function data 13, for example, the method described in Patent Document 1 is used.

画素間対応データ11は、プロジェクタ2に入力される画像データの領域(画素)と、形状変化していない投影対象に画像データが投影された状態をカメラ3が撮影する画像データの領域とを対応づけるデータである。ステップS1の前処理において、プロジェクタ2にパターン画像が投影されることによって、画素間対応データ11は、生成される。 The inter-pixel correspondence data 11 corresponds to an image data area (pixel) input to the projector 2 and an image data area in which the camera 3 captures a state in which the image data is projected onto a projection target whose shape has not changed. It is the data to be attached. In the preprocessing of step S1, the inter-pixel correspondence data 11 is generated by projecting the pattern image on the projector 2.

エピポーラ線データ12は、エピポーラ幾何に基づくエピポーラ線Eのデータである。前処理において、各画素のエピポーラ線Eが算出され、エピポーラ線データ12として記憶される。 The epipolar line data 12 is the data of the epipolar line E based on the epipolar geometry. In the preprocessing, the epipolar line E of each pixel is calculated and stored as the epipolar line data 12.

応答関数データ13は、所定の画素についての、プロジェクタ2に入力される画像データの値、投影対象の反射率、およびカメラ3が撮影した画像データの値との関係を示す応答関数に関するデータである。ステップS1の前処理は、例えば特許文献1に記載の方法等で、投影対象4の模様等を考慮して、初期の応答関数を生成する。なお、応答関数データ13と画素間対応データ11は、後続の処理において、投影対象4の形状変化に応じて適宜更新される。 The response function data 13 is data relating to a response function indicating the relationship between the value of the image data input to the projector 2, the reflectance of the projection target, and the value of the image data captured by the camera 3 for a predetermined pixel. .. In the preprocessing of step S1, for example, by the method described in Patent Document 1, an initial response function is generated in consideration of the pattern of the projection target 4 and the like. The response function data 13 and the pixel-to-pixel correspondence data 11 are appropriately updated in the subsequent processing according to the shape change of the projection target 4.

前処理が終了すると、ステップS2において画像処理装置1は、理想的な応答関数(図示せず)を使って、元画像データ22から目標画像データ21を生成する。ステップS3において画像処理装置1は、応答関数で、元画像データ22から補正後画像データ23を生成する。理想的な応答関数は、プロジェクタ2の光量および出力可能な色の範囲等内で、生成される。 When the preprocessing is completed, in step S2, the image processing apparatus 1 generates the target image data 21 from the original image data 22 by using an ideal response function (not shown). In step S3, the image processing device 1 generates the corrected image data 23 from the original image data 22 by the response function. The ideal response function is generated within the light intensity of the projector 2, the outputable color range, and the like.

ステップS4において画像処理装置1は、ステップS3で生成した補正後画像データ23をプロジェクタ2に入力し、プロジェクタ2は補正後画像データ23を投影対象4に投影する。カメラ3は、補正後画像データ23が投影対象4に投影された状態を撮影し、ステップS5において画像処理装置1は、カメラ3から補正後画像データ23を取得する。 In step S4, the image processing device 1 inputs the corrected image data 23 generated in step S3 to the projector 2, and the projector 2 projects the corrected image data 23 onto the projection target 4. The camera 3 photographs the state in which the corrected image data 23 is projected onto the projection target 4, and in step S5, the image processing device 1 acquires the corrected image data 23 from the camera 3.

次に、ステップS6において画像処理装置1は、撮影画像データ24の処理対象の画素と、目標画像データ21の処理対象の画素について、画素値の差異が所定の閾値以上であるか否かを判定する。ステップS6において画像処理装置1が、画素値の差異が所定の閾値以上であると判定すると、ステップS7に進む。各画素値の差が所定の閾値以上であれば、画像処理装置1は、この画素において、投影対象4の形状変化により画素間対応に変更が生じている、より具体的には、投影対象4の対応位置において形状変化が生じていると判断する。画像処理装置1は、ステップS7において、処理対象の画素について、変更が生じた画素間対応と反射率を推定して、ステップS8において、応答関数と画素間対応を更新する。 Next, in step S6, the image processing device 1 determines whether or not the difference in pixel values between the pixel to be processed of the captured image data 24 and the pixel to be processed of the target image data 21 is equal to or greater than a predetermined threshold value. To do. If the image processing device 1 determines in step S6 that the difference in pixel values is equal to or greater than a predetermined threshold value, the process proceeds to step S7. If the difference between the pixel values is equal to or greater than a predetermined threshold value, the image processing apparatus 1 changes the correspondence between pixels due to the shape change of the projection target 4 in this pixel. More specifically, the projection target 4 It is judged that the shape has changed at the corresponding position of. In step S7, the image processing device 1 estimates the changed pixel-to-pixel correspondence and reflectance for the pixel to be processed, and updates the response function and the pixel-to-pixel correspondence in step S8.

各画素値の差が所定の閾値以内であれば、この画素において、画素間対応の変更が生じていない、より具体的には、投影対象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 projection target 4. , Step S6 to step S8 are performed on the next pixel.

各画素について、ステップS6ないしステップS8の処理が終了すると、画像処理装置1は、ステップS9において終了条件を満たすか否かを判定する。終了条件は、例えば、画像データを表示する時間または回数であっても良いし、入力装置(図示せず)等から入力される終了指示である。 When the processing of steps S6 to S8 is completed for each pixel, the image processing device 1 determines whether or not the end condition is satisfied in step S9. The end condition may be, for example, the time or the number of times to display the image data, or is an end instruction input from an input device (not shown) or the like.

終了条件を満たさないと判定された場合、ステップ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 image processing device 1 generates the corrected image data 23 from the original image data 22 by the response function and the pixel-to-pixel correspondence. The response function and the pixel-to-pixel correspondence used in step S3 are different from the initial response function and the pixel-to-pixel correspondence generated in step S1 used in the processing in the first step S3, and the updated response function and the pixel-to-pixel correspondence in step S8. It may be pixel-to-pixel correspondence.

ステップS4において画像処理装置1は、ステップS3で生成した補正後画像データ23をプロジェクタ2に入力し、プロジェクタ2は補正後画像データ23を投影対象4に投影する。カメラ3は、補正後画像データ23が投影対象4に投影された状態を撮影し、ステップS5において画像処理装置1は、カメラ3から補正後画像データ23を取得し、各画素について、ステップS6ないしステップS8を繰り返す。 In step S4, the image processing device 1 inputs the corrected image data 23 generated in step S3 to the projector 2, and the projector 2 projects the corrected image data 23 onto the projection target 4. The camera 3 photographs the state in which the corrected image data 23 is projected onto the projection target 4, and in step S5, the image processing device 1 acquires the corrected image data 23 from the camera 3, and for each pixel, steps S6 to S6 to Step S8 is repeated.

なお、先に記載したステップ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 projection target 4 whose shape has not changed without being affected by wind or the like. The captured image data 24 of the corrected image data 23 and the target image data 21 are compared.

これに対し、投影対象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 projection target 4, the projection target 4 when the response function and the pixel-to-pixel correspondence are updated most recently. Is determined according to the degree of difference between the shape of the above and the shape of the projection target 4 at the time of processing this time. When the captured image data 24 corresponding to the corrected image data 23 projected using the most recently updated response function and the pixel-to-pixel correspondence is not different from the target image data 21, the response function and the pixel-to-pixel correspondence are updated. It is determined that there is no difference between the shape of the projection target 4 and the shape of the projection target 4 at the time of shooting the captured image data 24, and the correction is appropriately performed.

一方、直近に更新された応答関数と画素間対応を使って投影される補正後画像データ23に対応する撮影画像データ24が、目標画像データ21と差異がある場合、撮影画像データ24の撮影時において、直近で応答関数と画素間対応を更新した時から、投影対象4の形状に変化が生じ、画素間対応および反射率にずれが生じたと考えられる。このような場合、画像処理装置1は、ステップS7およびステップS8において、直近に更新された応答関数と画素間対応をさらに更新して、元画像データ22が適切に補正される応答関数と画素間対応を探索する。 On the other hand, when the captured image data 24 corresponding to the corrected image data 23 projected using the recently updated response function and the pixel-to-pixel correspondence is different from the target image data 21, when the captured image data 24 is captured. It is considered that the shape of the projection target 4 has changed since the latest update of the response function and the inter-pixel correspondence, and the inter-pixel correspondence and the reflectance have shifted. In such a case, the image processing apparatus 1 further updates the most recently updated response function and the pixel-to-pixel correspondence in steps S7 and S8, and the response function and the pixel-to-pixel correspondence in which the original image data 22 is appropriately corrected. Search for correspondence.

このような本発明の実施の形態においては、形状変化が可能な投影対象4に投影する場合でも、応答関数と画素間対応の更新と、更新された応答関数と画素間対応を用いて補正された画像データの投影とを繰り返す。これにより、投影対象4の形状変化に追従して応答関数と画素間対応を逐次更新することができるので、投影対象4の形状変化の影響を受けにくい光学的補正を実現することができる。 In such an embodiment of the present invention, even when projecting onto the projection target 4 whose shape can be changed, the response function and the pixel-to-pixel correspondence are updated, and the updated response function and the pixel-to-pixel correspondence are used for correction. The projection of the image data is repeated. As a result, the response function and the inter-pixel correspondence can be sequentially updated following the shape change of the projection target 4, so that optical correction that is not easily affected by the shape change of the projection target 4 can be realized.

(画像処理装置)
図1を参照して、本発明の実施の形態に係る画像処理装置1を説明する。
(Image processing device)
The image processing apparatus 1 according to the embodiment of the present invention will be described with reference to FIG.

画像処理装置1は、記憶装置10、処理装置30および入出力インタフェース50を備える一般的なコンピュータである。一般的なコンピュータが所定の処理を実行する画像処理プログラムを実行することにより、図1に示す機能を実現する。 The image processing device 1 is a general computer including a storage device 10, a processing device 30, and an input / output interface 50. The function shown in FIG. 1 is realized by executing an image processing program in which a general computer executes a predetermined process.

記憶装置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 storage device 10 is a ROM (Read Only Memory), a RAM (Random access memory), a hard disk, or the like, and stores various data such as input data, output data, and intermediate data for the processing device 30 to execute processing. .. The processing device 30 is a CPU (Central Processing Unit) that reads and writes data stored in the storage device 10 and inputs and outputs data to and from the input / output interface 50 to execute processing in the image processing device 1. To do. In particular, in the embodiment of the present invention, a GPU (Graphics Processing Unit) may be used as the processing device 30 for processing related to images. At this time, a three-dimensional graphics library such as OpenGL (registered trademark) may be used, and GLSL (OpenGL (registered trademark) Shading Language) or the like may be used to perform calculations on the shader.

記憶装置10は、所定の処理を実行する画像処理プログラムを記憶するとともに、画素間対応データ11、エピポーラ線データ12、応答関数データ13、目標画像データ21、元画像データ22、補正後画像データ23、撮影画像データ24、ずれ候補データ25、反射率データ26および選択ずれデータ27を記憶する。 The storage device 10 stores an image processing program that executes a predetermined process, and also stores inter-pixel correspondence data 11, epipolar line data 12, response function data 13, target image data 21, original image data 22, and corrected image data 23. , Captured image data 24, deviation candidate data 25, reflectance data 26, and selection deviation data 27 are stored.

画素間対応データ11、エピポーラ線データ12および応答関数データ13は、後述する前処理部31によって、プロジェクタ2、カメラ3および投影対象4の位置が決まった際に、予め算出されるデータである。 The inter-pixel correspondence data 11, the epipolar line data 12, and the response function data 13 are data calculated in advance when the positions of the projector 2, the camera 3, and the projection target 4 are determined by the preprocessing unit 31, which will be described later.

元画像データ22は、画像処理装置1の処理対象の画像データである。元画像データ22を光学的補正した補正後画像データ23を、プロジェクタ2に入力し、投影させる。目標画像データ21および補正後画像データ23は、元画像データ22から生成されるデータである。撮影画像データ24は、補正後画像データ23をプロジェクタ2が投影した状態を、カメラ3が撮影した画像データである。ずれ候補データ25、反射率データ26および選択ずれデータ27は、後述のずれ量決定部36により出力されるデータである。 The original image data 22 is image data to be processed by the image processing device 1. The corrected image data 23 obtained by optically correcting the original image data 22 is input to the projector 2 and projected. The target image data 21 and the corrected image data 23 are data generated from the original image data 22. The captured image data 24 is image data captured by the camera 3 in a state in which the projector 2 projects the corrected image data 23. The deviation candidate data 25, the reflectance data 26, and the selection deviation data 27 are data output by the deviation amount determining unit 36 described later.

処理装置30は、前処理部31、目標画像生成部32、光学的補正部33、投影画像出力部34、撮影画像取得部35、ずれ量決定部36および応答関数更新部37を備える。 The processing device 30 includes a preprocessing unit 31, a target image generation unit 32, an optical correction unit 33, a projected image output unit 34, a captured image acquisition unit 35, a deviation amount determination unit 36, and a response function update unit 37.

前処理部31は、プロジェクタ2、カメラ3および投影対象4の位置が決まった際に、画素間対応データ11、エピポーラ線データ12および応答関数データ13予め算出する。 When the positions of the projector 2, the camera 3, and the projection target 4 are determined, the preprocessing unit 31 calculates in advance the inter-pixel correspondence data 11, the epipolar line data 12, and the response function data 13.

画素間対応データ11は、プロジェクタ2に入力される画像データの画素(領域)と、形状変化していない投影対象4に画像データが投影された状態をカメラ3が撮影する画像データの画素(領域)とを対応づけたデータである。プロジェクタ2とカメラ3のそれぞれで用いる画像の座標系が異なるため、前処理部31は、画素間対応データ11を生成して、これらの異なる座標系における画素の変換を可能とする。画素間対応データ11は、具体的には、プロジェクタ2に入力される画像データの各画素について、この画像データの画素の識別子と、カメラ3が撮影する画像データにおいて対応する画素の識別子とを対応づける。ここで、画素の識別子は、例えば、各画像データにおける画素の座標である。本発明の実施の形態において画素間対応データ11は、投影対象4の形状が変化に伴って、逐次更新される。 The inter-pixel correspondence data 11 is a pixel (area) of the image data input to the projector 2 and a pixel (area) of the image data in which the camera 3 captures a state in which the image data is projected on the projection target 4 whose shape has not changed. ) And the data. Since the coordinate systems of the images used by the projector 2 and the camera 3 are different, the preprocessing unit 31 generates the inter-pixel correspondence data 11 and enables the conversion of pixels in these different coordinate systems. Specifically, the pixel-to-pixel correspondence data 11 corresponds to the pixel identifier of the image data and the corresponding pixel identifier in the image data captured by the camera 3 for each pixel of the image data input to the projector 2. Attach. Here, the pixel identifier is, for example, the coordinates of the pixel in each image data. In the embodiment of the present invention, the pixel-to-pixel correspondence data 11 is sequentially updated as the shape of the projection target 4 changes.

前処理部31は、例えば、テスト画像データをプロジェクタ2に入力して、テスト画像データと、カメラ3が撮影した画像データを対比して、画素間対応データ11を生成する。なお、前処理部31は、投影対象4の形状は変化しない状態で、画素間対応データ11を生成する。 For example, the preprocessing unit 31 inputs test image data to the projector 2 and compares the test image data with the image data taken by the camera 3 to generate inter-pixel correspondence data 11. The preprocessing unit 31 generates the inter-pixel correspondence data 11 in a state where the shape of the projection target 4 does not change.

エピポーラ線データ12は、カメラ3が撮影した画像データにおいて、エピポーラ幾何に基づいて算出されるエピポーラ線Eの情報である。前処理部31は、画素間対応データ11において対応づけられた各画素についてエピポーラ線Eを算出し、各画素のエピポーラ線Eの情報を含むエピポーラ線データ12を生成する。 The epipolar line data 12 is information on the epipolar line E calculated based on the epipolar geometry in the image data taken by the camera 3. The preprocessing unit 31 calculates the epipolar line E for each pixel associated with the pixel-to-pixel correspondence data 11, and generates epipolar line data 12 including information on the epipolar line E of each pixel.

応答関数データ13は、画素間対応データ11において対応づけられた画素について、プロジェクタ2に入力される画像データの値、形状が変化可能な投影対象4の反射率、および投影対象4に画像データが投影された状態をカメラ3が撮影した画像データの値との関係を示す応答関数に関するデータである。応答関数データ13で用いられる画像データの値は、RGBで表現される画素値であっても良いし、RGBの画素値から算出される輝度の値であっても良い。 The response function data 13 includes the value of the image data input to the projector 2, the reflectance of the projection target 4 whose shape can be changed, and the image data on the projection target 4 for the pixels associated with the pixel-to-pixel correspondence data 11. This is data related to a response function indicating the relationship between the projected state and the value of the image data captured by the camera 3. The value of the image data used in the response function data 13 may be a pixel value expressed in RGB or a brightness value calculated from the pixel value of RGB.

応答関数データ13は、プロジェクタ2の特性と投影対象4の模様等を考慮して、元画像データ22を、プロジェクタ2に入力する補正後画像データ23に変換するための応答関数のデータである。前処理部31は、例えば特許文献1などに記載の方法によって応答関数データ13を生成する。前処理部31において生成される応答関数は、例えば投影対象4に模様がある場合、その模様による影響を抑制する補正後画像データ23を生成するために用いられる。本発明の実施の形態において応答関数データ13は、投影対象4の形状が変化に伴って、逐次更新される。 The response function data 13 is data of a response function for converting the original image data 22 into the corrected image data 23 to be input to the projector 2 in consideration of the characteristics of the projector 2 and the pattern of the projection target 4. The preprocessing unit 31 generates the response function data 13 by the method described in, for example, Patent Document 1. The response function generated by the preprocessing unit 31 is used to generate corrected image data 23 that suppresses the influence of the pattern, for example, when the projection target 4 has a pattern. In the embodiment of the present invention, the response function data 13 is sequentially updated as the shape of the projection target 4 changes.

目標画像生成部32は、元画像データ22から、カメラ3で撮影された状態の目標となる目標画像データ21を生成する。目標画像生成部32は、元画像データ22を、プロジェクタ2の特性を考慮した理想的な応答関数に基づいて、目標画像データ21を生成する。 The target image generation unit 32 generates target target image data 21 in a state of being photographed by the camera 3 from the original image data 22. The target image generation unit 32 generates the target image data 21 from the original image data 22 based on an ideal response function in consideration of the characteristics of the projector 2.

目標画像データ21は、カメラ3が撮影した撮影画像データ24において、適切に光学的補正がなされているか否かを比較する際の比較対象となる。目標画像データ21は、カメラ3が撮影する画像と同様の座標系で生成される。 The target image data 21 is a comparison target when comparing whether or not the captured image data 24 captured by the camera 3 is appropriately optically corrected. The target image data 21 is generated in the same coordinate system as the image captured by the camera 3.

光学的補正部33は、元画像データ22を、応答関数を用いて光学的補正を行い、補正後画像データ23を生成する。光学的補正部33は、応答関数データ13が特定する応答関数を用いる。具体的には、光学的補正部33は、まず、前処理部31が生成した初期の応答関数に基づいて補正後画像データ23を生成する。その後、投影対象4の形状変化に伴って応答関数と画素間対応が更新されると、更新された応答関数と画素間対応を用いて、元画像データ22から補正後画像データ23を生成する。 The optical correction unit 33 optically corrects the original image data 22 using the response function to generate the corrected image data 23. The optical correction unit 33 uses the response function specified by the response function data 13. Specifically, the optical correction unit 33 first generates the corrected image data 23 based on the initial response function generated by the preprocessing unit 31. After that, when the response function and the pixel-to-pixel correspondence are updated according to the shape change of the projection target 4, the corrected image data 23 is generated from the original image data 22 by using the updated response function and the pixel-to-pixel correspondence.

投影画像出力部34は、光学的補正部33が出力した補正後画像データ23を、プロジェクタ2に入力する。プロジェクタ2は、入力された補正後画像データ23を投影対象4に投影する。 The projected image output unit 34 inputs the corrected image data 23 output by the optical correction unit 33 to the projector 2. The projector 2 projects the input corrected image data 23 onto the projection target 4.

撮影画像取得部35は、形状が変化可能な投影対象4にプロジェクタ2が補正後画像データ23を投影した状態を、カメラ3が撮影した撮影画像データ24を、取得する。補正後画像データ23がプロジェクタ2に入力されると、プロジェクタ2は、投影対象4に補正後画像データ23を投影する。カメラ3は、プロジェクタ2によって投影対象4に撮影された状態を撮影して、撮影画像データ24を生成する、撮影画像取得部35は、カメラ3から撮影画像データ24を取得し、撮影画像データ24を、記憶装置10に記憶する。 The captured image acquisition unit 35 acquires the captured image data 24 captured by the camera 3 in a state in which the projector 2 projects the corrected image data 23 onto the projection target 4 whose shape can be changed. When the corrected image data 23 is input to the projector 2, the projector 2 projects the corrected image data 23 on the projection target 4. The camera 3 captures a state captured by the projection target 4 by the projector 2 and generates captured image data 24. The captured image acquisition unit 35 acquires the captured image data 24 from the camera 3 and captures the captured image data 24. Is stored in the storage device 10.

ずれ量決定部36は、画素間対応データ11での処理対象画素の対応関係と、補正後画像データ23および撮影画像データ24との各処理対象画素間の対応関係のずれ量および処理対象領域の反射率を決定する。処理対象画素は、補正後画像データ23のすべての画素であっても良いし、一部の画素であっても良い。処理対象画素が補正後画像データ23の一部の画素である場合、一部の画素は、撮影画像データ24の所定画素の値と、画素間対応データ11において所定画素に対応する目標画像データ21の領域の値とを比較して、所定の閾値以上の差分のある所定画素である。 The deviation amount determining unit 36 determines the deviation amount and the processing target area of the correspondence relationship between the processing target pixels in the pixel-to-pixel correspondence data 11 and the correspondence relationship between the corrected image data 23 and the captured image data 24 between the processing target pixels. Determine the reflectance. The processing target pixels may be all the pixels of the corrected image data 23, or may be some pixels. When the processing target pixel is a part of the corrected image data 23, the part of the pixel is the value of the predetermined pixel of the captured image data 24 and the target image data 21 corresponding to the predetermined pixel in the inter-pixel correspondence data 11. It is a predetermined pixel having a difference of a predetermined threshold value or more by comparing with the value in the region of.

直近で応答関数と画素間対応を更新した後、投影対象4の形状が変化しない場合、所定画素について、目標画像データ21と撮影画像データ24とで大きな差異は生じない。一方、直近で応答関数と画素間対応を更新した後、投影対象4の形状が変化すると、画素間対応がくずれることにより、所定画素について、目標画像データ21と撮影画像データ24とで大きな差異が生じてしまう。本発明の実施の形態においてずれ量決定部36は、目標画像データ21と撮影画像データ24とで、画素値の差異が大きい画素が、投影対象4の形状の変化の影響を受けたと判断して、その画素について、画素間対応を変更して光学的補正を行う。これにより、画像処理装置1の処理負荷を軽減し、効率的に適切な応答関数を算出することが可能になる。 If the shape of the projection target 4 does not change after the response function and the pixel-to-pixel correspondence have been updated most recently, there is no significant difference between the target image data 21 and the captured image data 24 for the predetermined pixel. On the other hand, if the shape of the projection target 4 changes after the response function and the pixel-to-pixel correspondence have been updated most recently, the pixel-to-pixel correspondence collapses, so that there is a large difference between the target image data 21 and the captured image data 24 for a predetermined pixel. It will occur. In the embodiment of the present invention, the deviation amount determining unit 36 determines that the pixel having a large difference in pixel value between the target image data 21 and the captured image data 24 is affected by the change in the shape of the projection target 4. , The pixel is optically corrected by changing the correspondence between pixels. This makes it possible to reduce the processing load of the image processing device 1 and efficiently calculate an appropriate response function.

応答関数更新部37は、ずれ量決定部36が決定したずれ量および処理対象画素の反射率に従って、応答関数と画素間対応を更新する。応答関数更新部37は、ずれ量決定部36が決定したずれ量および処理対象画素の反射率に基づいて、応答関数データ13の応答関数と、画素間対応データ11の画素間対応を更新する。その後、光学的補正部33は、更新された応答関数と画素間対応に従って、元画像データ22から補正後画像データ23を生成し、補正後画像データ23がプロジェクタ2に入力される。 The response function updating unit 37 updates the correspondence between the response function and the pixels according to the deviation amount determined by the deviation amount determining unit 36 and the reflectance of the pixel to be processed. The response function update unit 37 updates the response function of the response function data 13 and the pixel-to-pixel correspondence of the pixel-to-pixel correspondence data 11 based on the deviation amount determined by the shift amount determination unit 36 and the reflectance of the pixel to be processed. After that, the optical correction unit 33 generates the corrected image data 23 from the original image data 22 according to the updated response function and the inter-pixel correspondence, and the corrected image data 23 is input to the projector 2.

(ずれ量決定部)
本発明の実施の形態に係るずれ量決定部36の処理の概要を、図5を参照して説明する。
(Deviation amount determination unit)
An outline of the processing of the deviation amount determining unit 36 according to the embodiment of the present invention will be described with reference to FIG.

まずステップS11においてずれ量決定部36は、画素間対応データ11における画素間対応について、撮影画像データ24における画素をエピポーラ線E方向にずらすための、複数のずれ量の候補を生成する。例えば、画素間対応データ11における対応付けに対して、エピポーラ線Eの左側方向に3画素ずらす、0画素ずらす(ずらさない)、右側方向に3画素ずらすなどと、複数のずれ量の候補を生成する。 First, in step S11, the shift amount determining unit 36 generates a plurality of shift amount candidates for shifting the pixels in the captured image data 24 in the epipolar line E direction with respect to the pixel-to-pixel correspondence in the pixel-to-pixel correspondence data 11. For example, with respect to the correspondence in the pixel-to-pixel correspondence data 11, a plurality of deviation amount candidates are generated, such as shifting 3 pixels to the left side of the epipolar line E, shifting 0 pixels (not shifting), shifting 3 pixels to the right side, and the like. To do.

ステップS12においてずれ量決定部36は、ステップS11で生成した複数のずれ量の候補のそれぞれについて、応答関数データ13を参照して反射率を算出する。ステップS11において3つのずれ量の候補を生成した場合、ずれ量決定部36は、3つのずれ量の候補に対して3つの反射率を算出する。 In step S12, the deviation amount determining unit 36 calculates the reflectance for each of the plurality of deviation amount candidates generated in step S11 with reference to the response function data 13. When three deviation amount candidates are generated in step S11, the deviation amount determining unit 36 calculates three reflectances for the three deviation amount candidates.

ステップS13においてずれ量決定部36は、ステップS12において算出された各ずれ量の候補に対応する反射率から、尤もらしい反射率のずれ量を選択する。ずれ量決定部36は、例えば、処理対象の画素を含む近傍領域の各画素について、反射率を算出する処理を、各ずれ量の候補について行い、各ずれ量の候補について、近傍領域の各画素の反射率を比較して、最も反射率の分散の少ないずれ量の候補を、尤もらしい反射率のずれ量と推定する。 In step S13, the deviation amount determining unit 36 selects a plausible reflectance deviation amount from the reflectances corresponding to the candidates for each deviation amount calculated in step S12. For example, the deviation amount determining unit 36 performs a process of calculating the reflectance for each pixel in the neighborhood region including the pixel to be processed for each deviation amount candidate, and for each deviation amount candidate, each pixel in the neighborhood region. The candidates for the deviation amount with the smallest reflectance dispersion are estimated as the plausible reflectance deviation amounts.

ずれ量決定部36は、ステップS13において選択されたずれ量を、補正後画像データ23および撮影画像データ24との各処理対象画素間の対応関係のずれ量として、出力する。またステップS12で算出された反射率のうち、決定されたずれ量に対応する反射率も、ずれ量決定部36は出力する。出力されたずれ量および反射率は、応答関数更新部37によって処理される。 The deviation amount determining unit 36 outputs the deviation amount selected in step S13 as the deviation amount of the correspondence relationship between the corrected image data 23 and the captured image data 24 between the pixels to be processed. Further, among the reflectances calculated in step S12, the deviation amount determining unit 36 also outputs the reflectance corresponding to the determined deviation amount. The output deviation amount and reflectance are processed by the response function update unit 37.

ずれ量決定部36は、図1に示すように、ずれ量候補生成部41、反射率算出部42、およびずれ量選択部43を備える。図5のステップS11ないしS13の処理は、それぞれ、ずれ量候補生成部41、反射率算出部42およびずれ量選択部43の処理に対応する。 As shown in FIG. 1, the deviation amount determining unit 36 includes a deviation amount candidate generation unit 41, a reflectance calculation unit 42, and a deviation amount selection unit 43. The processes of steps S11 to S13 of FIG. 5 correspond to the processes of the deviation amount candidate generation unit 41, the reflectance calculation unit 42, and the deviation amount selection unit 43, respectively.

なお、ずれ量決定部36の処理は、CPUを用いても良いが、GPUを用いても良い。GPUで並列処理を行うことにより、処理の更なる高速化が期待できるので、通常のCPUを用いる場合と比べて、効果的に処理することが可能になる。 Although the CPU may be used for the processing of the deviation amount determining unit 36, the GPU may be used. By performing parallel processing on the GPU, further speeding up of processing can be expected, so that processing can be performed more effectively than when a normal CPU is used.

ずれ量候補生成部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 image data 23 and the captured image data 24 between the processing target pixels. The deviation amount candidate generation unit 41 generates a plurality of deviation amount candidate candidates on the epipolar line E passing through the processing target pixel in the captured image data 24.

投影対象4の形状が変化することによって、目標画像データ21における処理対象の画素と、撮影画像データ24における画素の対応にずれが生じ、画素間対応データ11における対応関係に変更が生じてしまう。目標画像データ21における処理対象画素に対応する撮影画像データ24における画素は、エピポーラ線E上でずれることが知られているが、そのずれ量は不明である。そこでずれ量候補生成部41は、目標画像データ21の処理対象画素と、撮影画像データ24の処理対象画素に対応する、複数の画素のずれ量の候補を作成する。ずれ量候補生成部41は、生成したずれ量の候補の情報を含むずれ候補データ25を生成し、記憶装置10に記憶する。 Due to the change in the shape of the projection target 4, the correspondence between the pixel to be processed in the target image data 21 and the pixel in the captured image data 24 is deviated, and the correspondence relationship in the pixel-to-pixel correspondence data 11 is changed. It is known that the pixels in the captured image data 24 corresponding to the pixels to be processed in the target image data 21 are displaced on the epipolar line E, but the amount of the deviation is unknown. Therefore, the deviation amount candidate generation unit 41 creates a plurality of pixel deviation amount candidates corresponding to the processing target pixel of the target image data 21 and the processing target pixel of the captured image data 24. The deviation amount candidate generation unit 41 generates deviation candidate data 25 including the generated deviation amount candidate information and stores it in the storage device 10.

ここで図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 projector 2 is a point c projected onto the captured image data 24 captured by the camera 3, regardless of whether the image is formed by X, X', X'', or the like. It is known that c'and c'are observed on a specific line. Specifically, when the image formation at the point p of the image coordinates projected by the projector 2 is changed from X to X', the projection on the captured image data 24 taken by the camera 3 is changed from the point c to c'. Be changed. The specific line obtained by connecting the points c, c ′, and c ″ in this way is referred to as an epipolar line E. Since the colors observed at each coordinate on the epipolar line E correspond to different imaging positions, they are different from each other. The position of the projector 2 as seen from the camera 3 is referred to as an epipolar point. The epipolar point is the intersection of the straight line connecting the camera 3 and the projector 2 and the image plane.

エピポーラ線Eは、プロジェクタ2およびカメラ3の位置関係に依存する。投影対象4の形状が変化した場合であっても、処理対象画素は、撮影画像データ24のエピポーラ線E上のいずれかの点にずれる。そこで本発明の実施の形態においては、図7に示すように、撮影画像データ24のエピポーラ線E上を探索すれば、処理対象画素がずれた位置を特定できることを利用している。 The epipolar line E depends on the positional relationship between the projector 2 and the camera 3. Even when the shape of the projection target 4 changes, the processing target pixel shifts to any point on the epipolar line E of the captured image data 24. Therefore, in the embodiment of the present invention, as shown in FIG. 7, it is utilized that the position where the processing target pixel is displaced can be specified by searching on the epipolar line E of the captured image data 24.

投影対象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 projection target 4, the pixel in the target image data 21 and the pixel in the captured image data 24 are shifted. The pixel-to-pixel correspondence in the pixel-to-pixel correspondence data 11 cannot be used as it is. The pixels in the captured image data 24 are displaced on the epipolar line E, but the amount of the deviation is unknown. Therefore, the deviation amount candidate generation unit 41 generates some deviation amount candidates between the processing target pixel of the target image data 21 and the pixel of the captured image data 24 corresponding to the processing target pixel. The deviation amount candidate generation unit 41 stores the deviation candidate data 25 including the generated deviation amount candidate information in the storage device 10. The deviation amount determining unit 36 determines the candidate with the highest accuracy as an appropriate deviation amount in the process of assuming that each deviation amount candidate is correct.

ずれ量候補生成部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 projection target 4, or randomly generate deviation amount candidates. Is also good. Since a shift occurs on the epipolar line E of the captured image data 24, the shift amount candidate generation unit 41 does not need to specify the shift amount in both the horizontal direction and the vertical direction. You only have to generate candidates.

なお本発明の実施の形態においては、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 image processing device 1 have a margin and the transfer speed between the projector 2 and the camera 3 also has a margin, a larger number of candidates for the amount of deviation may be generated. Further, the number of deviation amount candidates generated by the deviation amount candidate generation unit 41 may be arbitrarily set in consideration of the resources of the image processing device 1 and the transfer speed with the projector 2 and the camera 3.

反射率算出部42は、画素間対応データ11での処理対象画素の対応関係を、複数のずれ量の候補のそれぞれについてずらした対応関係のそれぞれに基づいて、応答関数を用いて、複数のずれ量の候補のそれぞれに対応する反射率を算出する。反射率算出部42は複数のずれ量の候補のそれぞれについて算出した反射率を含む反射率データ26を、記憶装置10に記憶する。 The reflectance calculation unit 42 uses a response function to shift the correspondence relationship of the pixels to be processed in the pixel-to-pixel correspondence data 11 for each of the plurality of deviation amount candidates, and uses a response function to perform a plurality of deviations. Calculate the reflectance corresponding to each of the quantity candidates. The reflectance calculation unit 42 stores the reflectance data 26 including the reflectance calculated for each of the plurality of deviation amount candidates in the storage device 10.

ここで反射率算出部42は、撮影画像データ24の処理対象画素を通るエピポーラ線E上で、複数のずれ量の候補のそれぞれについてずらした対応関係のそれぞれに基づいて、複数のずれ量の候補のそれぞれに対応する反射率を算出する。 Here, the reflectance calculation unit 42 is a plurality of deviation amount candidates based on each of the correspondence relationships shifted for each of the plurality of deviation amount candidates on the epipolar line E passing through the processing target pixel of the captured image data 24. Calculate the reflectance corresponding to each of the above.

本発明の実施の形態に係る応答関数は、(式1)である。

Figure 0006872239
The response function according to the embodiment of the present invention is (Equation 1).
Figure 0006872239

(式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 projector 2, and C relates to the output of the camera 3 when the camera 3 takes a picture of the state in which the input image to the projector 2 is projected onto the projection target 4.

ここで、前処理部31が応答関数を予め算出するので、プロジェクタ出力特性Lは、既知である。投影対象4の形状が変化することに伴い、処理対象画素は、エピポーラ線E上にずれて色が変わるので、(式1)の応答関数において、反射率Ku,vおよび画素対応u,vが変更されることになる。ここで、画素対応u,vは、ずれ量候補生成部41により生成されたずれ量の候補により仮定されるので、(式1)の応答関数から、各ずれ量候補に対する反射率Ku,vを算出することができる。 Here, since the preprocessing unit 31 calculates the response function in advance, the projector output characteristic L is known. As the shape of the projection target 4 changes, the pixel to be processed shifts on the epipolar line E and the color changes. Therefore, in the response function of (Equation 1), the reflectances Ku and v and the pixel correspondence u and v are used. Will be changed. Here, since the pixel correspondence u and v are assumed by the deviation amount candidates generated by the deviation amount candidate generation unit 41, the reflectance Ku and v for each deviation amount candidate can be obtained from the response function of (Equation 1). Can be calculated.

ここで、撮影画像取得部35、ずれ量決定部36および応答関数更新部37の処理を繰り返す場合、(式2)に示すように、逐次最小二乗法(Recursive Least Square Algorithm: RLS)により、直前の処理で用いた算出結果を用いることにより、精度高く、反射率を算出することが可能になる。(式2)は、所定の元画像データ22を補正して補正後画像データ23を生成し、補正後画像データ23をプロジェクタ2に入力して新たな補正後画像データ23を生成するように、フィードバックを繰り返す場合に好適である。

Figure 0006872239
Here, when the processing of the captured image acquisition unit 35, the deviation amount determination unit 36, and the response function update unit 37 is repeated, as shown in (Equation 2), immediately before the process is performed by the sequential least squares method (Recursive Least Square Algorithm: RLS). By using the calculation result used in the above process, it is possible to calculate the reflectance with high accuracy. (Equation 2) corrects the predetermined original image data 22 to generate the corrected image data 23, and inputs the corrected image data 23 to the projector 2 to generate a new corrected image data 23. It is suitable when the feedback is repeated.
Figure 0006872239

逐次最小二乗法は、他の適応アルゴリズムに比べ、目標までの収束が早い特徴を有するので、逐次最小二乗法により反射率を適切に計算することが可能になる。また(式2)では、直前の処理で用いたRおよびSのみを保持すれば足り、過去の結果を全て保持する必要がない。従って、逐次最小二乗法により、精度向上を実現するとともに、メモリ消費を抑制し、高速処理を実現することが可能になる。 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 image processing device 1 according to the embodiment of the present invention repeats feedback between the projector 2 and the camera 3, and repeats optical correction using the sequential least squares method. Therefore, even if there is a part where the effect is weak with one optical correction, the correction effect can be expected to be improved by repeating the optical correction.

ずれ量候補生成部41によって生成された複数のずれ量の候補のそれぞれについて、反射率算出部42は、各ずれ量の候補に従って画素間対応データ11を変更した画素間対応に基づいて、それぞれ反射率を算出する。 For each of the plurality of deviation amount candidates generated by the deviation amount candidate generation unit 41, the reflectance calculation unit 42 reflects each pixel-to-pixel correspondence in which the pixel-to-pixel correspondence data 11 is changed according to each deviation amount candidate. Calculate the rate.

ずれ量選択部43は、反射率算出部42による結果に基づいて、ずれ量候補生成部41が生成した複数のずれ量の候補から、撮影画像データ24におけるずれ量を選択する。ずれ量選択部43は、複数のずれ量の候補のそれぞれに対応する反射率を比較して、複数のずれ量の候補から、撮影画像データ24におけるずれ量を選択する。ずれ量選択部43は、選択されたずれ量の情報を含む選択ずれデータ27を生成して、記憶装置10に記憶する。ずれ量選択部43が選択するずれ量は、実際のずれ量とは異なる場合もあるが、少なくともずれ量候補生成部41が生成したずれ量の候補のうち、最も実際のずれ量に近いと推測される。 The deviation amount selection unit 43 selects the deviation amount in the captured image data 24 from the plurality of deviation amount candidates generated by the deviation amount candidate generation unit 41 based on the result of the reflectance calculation unit 42. The deviation amount selection unit 43 compares the reflectances corresponding to each of the plurality of deviation amount candidates, and selects the deviation amount in the captured image data 24 from the plurality of deviation amount candidates. The deviation amount selection unit 43 generates selection deviation data 27 including information on the selected deviation amount and stores it in the storage device 10. The deviation amount selected by the deviation amount selection unit 43 may differ from the actual deviation amount, but it is estimated that at least the deviation amount candidate generation unit 41 is closest to the actual deviation amount among the deviation amount candidates generated. Will be done.

ずれ量選択部43が、適切なずれ量を選択する方法はいくつか考えられる。例えば、撮影画像データ24における近傍画素の各反射率の分散の小さい画像を出力できるずれ量を、適切なずれ量として選択する方法と、各ずれ量から生成された補正画像を比較して、適切なずれ量として選択する方法がある。 There are several possible methods for the deviation amount selection unit 43 to select an appropriate deviation amount. For example, a method of selecting an appropriate amount of deviation that can output an image having a small variance of each reflectance of neighboring pixels in the captured image data 24 as an appropriate amount of deviation is appropriately compared with a corrected image generated from each amount of deviation. There is a method of selecting as the amount of 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 amount selection unit 43 selects and selects from the reflectances corresponding to each of the plurality of deviation amount candidates the reflectance having the smallest reflectance dispersion in the vicinity region including the reflectance corresponding to the pixel to be processed. The amount of deviation corresponding to the reflectance is selected as an appropriate amount of 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 reflectance calculation unit 42, the deviation amount selection unit 43 reflects with the smallest dispersion of reflectance in the vicinity region including the pixel corresponding to the pixel to be processed. Select the rate and select the amount of deviation corresponding to the selected reflectance as the appropriate amount of deviation. This utilizes the fact that when the correspondence between pixels is incorrect, the dispersion of reflectance (color) becomes large. For example, the dispersion of the color (reflectance) of each pixel in each image shown in FIGS. 9A to 9C is the smallest in FIG. 9A. Therefore, in the case of the example shown in FIG. 9, the deviation amount selection unit 43 can determine that the deviation of -4 pixels is caused by the shape change of the projection target 4.

なお、反射率を用いてずれ量を選択する方法を採用する場合、反射率算出部42は、処理対象画素の反射率のみならず、周辺領域の各画素の反射率も算出するのが好ましい。あるいは、反射率算出部42が、処理対象画素の反射率のみを算出し、ずれ量選択部43が、処理対象画素の周辺領域の各画素の反射率を算出しても良い。 When a method of selecting the amount of deviation using the reflectance is adopted, it is preferable that the reflectance calculation unit 42 calculates not only the reflectance of the pixel to be processed but also the reflectance of each pixel in the peripheral region. Alternatively, the reflectance calculation unit 42 may calculate only the reflectance of the processing target pixel, and the deviation amount selection unit 43 may calculate the reflectance of each pixel in the peripheral region of the processing target pixel.

次に、各ずれ量から生成された補正画像を比較して、適切なずれ量として選択する方法を説明する。ずれ量選択部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 amount selection unit 43 generates a corrected image for each deviation amount candidate generated by the deviation amount candidate generation unit 41 by using each reflectance calculated by the reflectance calculation unit 42. The deviation amount selection unit 43 compares the corrected images corresponding to each deviation amount candidate. The deviation amount selection unit 43 selects, as an appropriate deviation amount, a deviation amount candidate corresponding to the corrected image in which the striped pattern observed in FIGS. 3C and 3D is not observed or the striped pattern is small. ..

反射率の分散を利用する方法は、各ずれ量から生成された補正画像を比較して、適切なずれ量を選択する方法と比べて、処理量を抑制できるメリットがある。各ずれ量から生成された補正画像を比較して、適切なずれ量を選択する方法では、算出した反射率を反映した画像データを、ずれ候補の数だけ作成する必要があり、画像処理装置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 image processing apparatus 1 May be burdensome. On the other hand, in the method using the reflectance dispersion, the calculated reflectance dispersion may be compared for each deviation candidate, and it is not necessary to generate a corrected image, so that the burden on the image processing device 1 is reduced. To.

このように、ずれ量決定部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 amount determination unit 36, among the parameters of the response function in (Equation 1), the reflectance Ku, v , the projector output characteristic L, and the pixel correspondence u, v are obtained, and the response function update unit 37 updates the response function data 13 and the inter-pixel correspondence data 11. Thus, optical correction unit 33, the camera observations C u, the v, by setting the value of the image as a target, the projector input value P u, v can be calculated. Here, the value of the target image set in the camera observation values Cu and v is the value of the target image data 21, and is represented by the coordinates of the camera coordinate system. The projector input values Pu and v calculated in this way form the pixel values of the corrected image data 23 output by the optical correction unit 33.

このように本発明の実施の形態に係る画像処理装置1は、投影対象4の形状が変化し、画素間対応がずれた場合であっても、画素間対応のずれ量の候補を作成し、各候補について反射率を算出して評価する。これにより画像処理装置1は、ずれ量の候補から、尤もらしいずれ量を決定して補正後画像データ23を出力できるので、投影対象4の形状の変化を抑制した画像を表示することができる。 As described above, the image processing apparatus 1 according to the embodiment of the present invention creates a candidate for the amount of deviation between pixels even when the shape of the projection target 4 changes and the correspondence between pixels shifts. The reflectance is calculated and evaluated for each candidate. As a result, the image processing device 1 can determine the amount of deviation from the candidates for the amount of deviation and output the corrected image data 23, so that it is possible to display an image in which the change in the shape of the projection target 4 is suppressed.

(第1の変形例)
本発明の実施の形態において、画像処理装置1が、画素単位で、プロジェクタに入力される画像データの領域と、形状変化していない投影対象に画像データが投影された状態をカメラが撮影する画像データを対応づけて、補正する場合を説明したがこれに限られない。例えば画像処理装置1が、2画素×2画素、8画素×8画素など、複数の画素で構成される複数画素単位で対応づけて、補正しても良い。
(First modification)
In the embodiment of the present invention, the image processing device 1 captures a region 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, on a pixel-by-pixel basis. The case of associating data and correcting it has been described, but the present invention is not limited to this. For example, the image processing device 1 may make corrections by associating with a plurality of pixels composed of a plurality of pixels such as 2 pixels × 2 pixels and 8 pixels × 8 pixels.

このように、本発明の実施の形態において、画像処理装置1による処理単位となる領域は、1画素で構成されても良いし、複数画素で構成されても良い。 As described above, in the embodiment of the present invention, the region serving as the processing unit by the image processing apparatus 1 may be composed of one pixel or a plurality of pixels.

画素単位で補正する場合、高精細な補正画像を得ることができ、複数の画素単位で補正する場合、処理の高速化が期待できる。画像処理装置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 image processing device 1 includes the performance of various devices such as the image processing device 1, the projector 2 and the camera 3, the characteristics of the original image data 22, or the characteristics of the projection target 4, and the connection between the image processing device 1 and the projector 2 and the camera 3. The size of the area to be the processing unit may be set as appropriate according to the environment and the like.

(第2の変形例)
本発明の実施の形態においては、プロジェクタ2が静止画を投影する場合を説明したが、映像の各フレームデータについても適用することができる。本発明の実施の形態に係る元画像データ22が、映像データの一つのフレームデータに対応し、光学的補正部33が、映像データの複数のフレームデータについて補正を逐次行う処理に適用することができる。
(Second modification)
In the embodiment of the present invention, the case where the projector 2 projects a still image has been described, but it can also be applied to each frame data of an image. The original image data 22 according to the embodiment of the present invention corresponds to one frame data of the video data, and the optical correction unit 33 can be applied to a process of sequentially correcting a plurality of frame data of the video data. it can.

この場合、光学的補正部33は、先行するフレームについて算出したずれ量を、後続のフレームに適用して、補正後の後続のフレームを、プロジェクタ2に入力する。また光学的補正部33は、(式2)におけるRおよびSに、先行のフレームに関する処理結果を適用して、後続のフレームについてRt+1およびSt+1を算出する。 In this case, the optical correction unit 33 applies the deviation amount calculated for the preceding frame to the succeeding frame, and inputs the corrected succeeding frame to the projector 2. The optical correction unit 33, the R t and S t in Equation (2), by applying the processing result relating to the previous frame, and calculates the R t + 1 and S t + 1 for the subsequent frame.

このように本発明の実施の形態に係る画像処理装置1は、静止画を投影対象4に投影中に投影対象4の形状が変化した場合のみならず、映像を投影対象4に投影中に投影対象4の形状が変化した場合にも適用することができる。 As described above, the image processing device 1 according to the embodiment of the present invention projects not only when the shape of the projection target 4 changes while the still image is projected on the projection target 4, but also when the image is projected on the projection target 4. It can also be applied when the shape of the object 4 changes.

(第3の変形例)
本発明の実施の形態においては、画素間対応データ11が、プロジェクタ2に入力される画像データの各画素について、この画像データの画素の識別子と、カメラ3が撮影する画像データにおいて対応する画素の識別子とを対応づける場合を説明したが、これに限られない。例えば、画素間対応データ11は、前処理部31が算出した画素間対応と、ずれ量決定部36が決定したずれ量の履歴を含むデータであっても良い。また画素間対応データ11は、ずれ量決定部36が決定したずれ量が反映された画素間対応を表す変換関数に関するデータであっても良い。画素間対応データ11は、前処理部31が画素間対応データ11を算出した後に、最新の画素間対応を把握できれば、どのような形式であっても良い。
(Third variant)
In the embodiment of the present invention, the pixel-to-pixel correspondence data 11 is, for each pixel of the image data input to the projector 2, the pixel identifier of the image data and the corresponding pixel in the image data captured by the camera 3. The case of associating with an identifier has been described, but the present invention is not limited to this. For example, the inter-pixel correspondence data 11 may be data including the inter-pixel correspondence calculated by the preprocessing unit 31 and the history of the deviation amount determined by the deviation amount determination unit 36. Further, the inter-pixel correspondence data 11 may be data related to a conversion function representing the inter-pixel correspondence in which the deviation amount determined by the deviation amount determining unit 36 is reflected. The inter-pixel correspondence data 11 may be in any format as long as the latest inter-pixel correspondence can be grasped after the preprocessing unit 31 calculates the inter-pixel correspondence data 11.

(その他の実施の形態)
上記のように、本発明の実施の形態とその第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 Image processing device 2 Projector 3 Camera 4 Projection target 9 Image processing system 10 Storage device 11 Interpixel correspondence data 12 Epipolar line data 13 Response function data 21 Target image data 22 Original image data 23 Corrected image data 24 Captured image data 25 Candidate data 26 Reflectivity data 27 Selection deviation data 30 Processing device 31 Preprocessing unit 32 Target image generation unit 33 Optical correction unit 34 Projection image output unit 35 Captured image acquisition unit 36 Deviation amount determination unit 37 Response function update unit 41 Deviation amount Candidate generation unit 42 Reflectivity calculation unit 43 Deviation amount selection unit

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.
前記応答関数は、式1であることを特徴とする請求項1に記載の画像処理装置。
Figure 0006872239
The image processing apparatus according to claim 1, wherein the response function is the equation 1.
Figure 0006872239
前記撮影画像取得部、前記ずれ量決定部および前記応答関数更新部の処理を繰り返す場合、
前記反射率算出部は、式2により前記反射率を算出することを特徴とする請求項5に記載の画像処理装置。
Figure 0006872239
When the processing of the captured image acquisition unit, the deviation amount determination unit, and the response function update unit is repeated,
The image processing apparatus according to claim 5, wherein the reflectance calculation unit calculates the reflectance by the formula 2.
Figure 0006872239
前記元画像データが、映像データの一つのフレームデータであり、前記ずれ量決定部が、前記映像データの複数のフレームデータについて逐次ずれ量を決定する場合、
前記反射率算出部は、式2により前記反射率を算出することを特徴とする請求項5に記載の画像処理装置。
Figure 0006872239
When the original image data is one frame data of the video data and the deviation amount determining unit determines the sequential deviation amount for a plurality of frame data of the video data.
The image processing apparatus according to claim 5, wherein the reflectance calculation unit calculates the reflectance by the formula 2.
Figure 0006872239
形状が変化可能な投影対象に、画像を投影する画像処理方法であって、
コンピュータが、プロジェクタに入力される画像データの領域と、形状変化していない投影対象に前記画像データが投影された状態をカメラが撮影する画像データの領域とを対応づけた領域間対応データを記憶装置に記憶するステップと、
前記コンピュータが、前記領域間対応データにおいて対応づけられた領域について、前記プロジェクタに入力される画像データの値、形状が変化可能な投影対象の反射率、および前記投影対象に前記画像データが投影された状態を前記カメラが撮影した画像データの値との関係を示す応答関数に関する応答関数データを前記記憶装置に記憶するステップと、
前記コンピュータが、元画像データを、前記応答関数を用いて光学的補正を行い、補正後画像データを生成するステップと、
前記コンピュータが、前記補正後画像データを、前記プロジェクタに入力するステップと、
前記コンピュータが、前記形状が変化可能な投影対象に前記プロジェクタが前記補正後画像データを投影した状態を、前記カメラが撮影した撮影画像データを、取得するステップと、
前記コンピュータが、前記領域間対応データでの処理対象領域間の対応関係と、前記補正後画像データおよび前記撮影画像データとの各処理対象領域間の対応関係のずれ量および前記処理対象領域の反射率を決定するステップと、
前記コンピュータが、決定したずれ量および前記処理対象領域の反射率に従って、前記応答関数と領域間対応データを更新するステップを備え、
前記決定するステップは、
前記ずれ量について、複数のずれ量の候補を生成するステップと、
前記領域間対応データでの前記処理対象領域の対応関係を、前記複数のずれ量の候補のそれぞれについてずらした対応関係のそれぞれに基づいて、前記応答関数を用いて、前記複数のずれ量の候補のそれぞれに対応する反射率を算出するステップと、
前記複数のずれ量の候補のそれぞれに対応する反射率を比較して、前記複数のずれ量の候補から、前記撮影画像データにおけるずれ量と反射率を選択するステップを備える
ことを特徴とする画像処理方法。
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.
コンピュータに、請求項1ないし請求項7のいずれか1項に記載の画像処理装置として機能させるための画像処理プログラム。 An image processing program for causing a computer to function as the image processing device according to any one of claims 1 to 7.
JP2017146103A 2017-07-28 2017-07-28 Image processing equipment, image processing method and image processing program Active JP6872239B2 (en)

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)

* Cited by examiner, † Cited by third party
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)

* Cited by examiner, † Cited by third party
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

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