JP2014086097A - Image processing apparatus, image processing method, image processing program, and recording medium - Google Patents

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

Info

Publication number
JP2014086097A
JP2014086097A JP2014020497A JP2014020497A JP2014086097A JP 2014086097 A JP2014086097 A JP 2014086097A JP 2014020497 A JP2014020497 A JP 2014020497A JP 2014020497 A JP2014020497 A JP 2014020497A JP 2014086097 A JP2014086097 A JP 2014086097A
Authority
JP
Japan
Prior art keywords
image
input
unit
target image
reference image
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2014020497A
Other languages
Japanese (ja)
Other versions
JP5687370B2 (en
Inventor
shogo Sawai
省吾 澤井
Tadamoto Hiraga
督基 平賀
Takeshi Miura
健 三浦
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.)
Morpho Inc
Original Assignee
Morpho Inc
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 Morpho Inc filed Critical Morpho Inc
Priority to JP2014020497A priority Critical patent/JP5687370B2/en
Publication of JP2014086097A publication Critical patent/JP2014086097A/en
Application granted granted Critical
Publication of JP5687370B2 publication Critical patent/JP5687370B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Studio Devices (AREA)
  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

PROBLEM TO BE SOLVED: To provide an image processing apparatus configured to prevent accumulation of errors to obtain a high-quality panoramic image even if an image captured from a different direction is included when input images are sequentially joined.SOLUTION: An image processing apparatus includes an input unit, a selection unit, a matching unit, an estimation unit, and a synthesis unit. The input unit sequentially inputs images. The selection unit selects a reference image from the input images. The matching unit calculates correspondence relation between a feature point of the reference image and a feature point of a target image. The estimation unit estimates a transformation for associating a coordinate system of the reference image with the coordinate system of the target image, by use of position information of a pair of feature points whose correspondence relation has been calculated by the matching unit, on the assumption that motion between the reference image and the target image is only rotation of an imaging element. The synthesis unit generates a synthetic image by combining the input images with the target image on the basis of the transformation.

Description

本発明は、画像処理装置、画像処理方法、画像処理プログラム及び記録媒体に関するものである。   The present invention relates to an image processing apparatus, an image processing method, an image processing program, and a recording medium.

従来、画像処理装置として、撮像された画像をつなぎ合わせて一枚の広角な静止画像であるパノラマ静止画像を作成する装置が知られている(例えば、特許文献1参照)。特許文献1記載の画像処理装置は、同一地点から異なった方位を撮像した複数の画像を合成する。具体的には、2つの画像のそれぞれの座標系を、変換行列を用いて統一させた上で両画像を合成する。この変換行列は、最小二乗法で算出される。   2. Description of the Related Art Conventionally, as an image processing apparatus, an apparatus that creates a panoramic still image that is a single wide-angle still image by connecting captured images is known (see, for example, Patent Document 1). The image processing apparatus described in Patent Literature 1 combines a plurality of images obtained by imaging different directions from the same point. Specifically, both images are synthesized after unifying the coordinate systems of the two images using a transformation matrix. This transformation matrix is calculated by the least square method.

特開平11−73492号公報JP-A-11-73492

しかしながら、特許文献1記載の画像処理装置にあっては、変換行列の成分が特に限定されていないため、例えば最小二乗法を用いて変換後の2枚間の位置誤差を最小とさせる変換行列を求めると、画像の大きさを縮小方向へ変更する行列が解となる傾向にある。そうすると、特許文献1記載の画像処理装置にあっては、異なる方位で撮像された対象画像を順次入力し、入力済みの基準画像と対象画像とを逐次合成してパノラマ画像を生成する場合、入力された対象画像が縮小されて合成され、その縮小された対象画像を基準として次回の対象画像の変換行列が推定される。このため、合成の度に誤差が累積し、結果として良質のパノラマ画像を得ることができないおそれがある。   However, in the image processing apparatus described in Patent Document 1, since the components of the conversion matrix are not particularly limited, for example, a conversion matrix that minimizes the position error between two images after conversion using the least square method is used. As a result, a matrix that changes the size of the image in the reduction direction tends to be a solution. Then, in the image processing apparatus described in Patent Document 1, when inputting target images picked up in different orientations sequentially and generating a panoramic image by sequentially synthesizing the input reference image and the target image, The reduced target images are reduced and combined, and the transformation matrix of the next target image is estimated based on the reduced target images. For this reason, errors are accumulated at the time of synthesis, and as a result, a high-quality panoramic image may not be obtained.

本技術分野では、入力された画像を順次つなぎ合わせる際に、撮像方位の異なる画像が含まれていた場合であっても、誤差の蓄積を抑制し、良質なパノラマ画像を得ることが望まれている。   In this technical field, it is desired to suppress accumulation of errors and obtain a high-quality panoramic image even when images having different imaging directions are included when sequentially joining input images. Yes.

すなわち、本発明の一側面に係る画像処理装置は、撮像素子によって撮像された画像を順次入力し、入力の度につなぎ合わせて合成画像を生成する画像処理装置である。該装置は、入力部、選択部、マッチング部、推定部及び合成部を備える。入力部は、画像を順次入力する。選択部は、入力部によって新たに入力された処理対象の画像である対象画像よりも前に入力部によって入力された1又は複数の画像からなる入力済画像の中から基準画像を選択する。マッチング部は、基準画像の特徴点と対象画像の特徴点との対応関係を算出する。推定部は、基準画像と対象画像との間の動きが撮像素子の回転運動のみであるとして、マッチング部によって対応関係が算出された特徴点のペアの位置情報を用いて基準画像の座標系と対象画像の座標系とを対応させる変換式を推定する。合成部は、変換式に基づいて、基準画像と対象画像とを繋ぎ合わせて合成画像を生成する。   That is, an image processing apparatus according to an aspect of the present invention is an image processing apparatus that sequentially inputs images captured by an image sensor and generates a composite image by joining the images each time they are input. The apparatus includes an input unit, a selection unit, a matching unit, an estimation unit, and a synthesis unit. The input unit sequentially inputs images. The selection unit selects a reference image from input images including one or a plurality of images input by the input unit before the target image that is a processing target image newly input by the input unit. The matching unit calculates a correspondence relationship between the feature points of the reference image and the feature points of the target image. The estimation unit assumes that the movement between the reference image and the target image is only the rotational movement of the image sensor, and uses the positional information of the feature point pair whose correspondence is calculated by the matching unit, A conversion formula that matches the coordinate system of the target image is estimated. The synthesizing unit generates a synthesized image by connecting the reference image and the target image based on the conversion formula.

本発明の一側面に係る画像処理装置では、基準画像と対象画像との間の動きが撮像素子の回転運動のみに起因するとして両画像の座標系を対応させる変換式を推定する。このため、変換式には、拡大・縮小・平行移動等のパラメータが含まれないことになるので、入力された対象画像が縮小等されて誤差が生じることを回避することができる。さらに、回転成分のみに限定することで、縮小等された対象画像を次回以降の基準画像とすることを回避することが可能であるため、誤差の蓄積を回避することができる。よって、入力された画像を順次つなぎ合わせる際に、撮像方位の異なる画像が含まれていた場合であっても、誤差の蓄積を抑制し、良質なパノラマ画像を得ることが可能となる。   In the image processing apparatus according to one aspect of the present invention, a conversion equation that correlates the coordinate systems of both images is estimated on the assumption that the movement between the reference image and the target image is caused only by the rotational movement of the image sensor. For this reason, the conversion formula does not include parameters such as enlargement, reduction, and parallel movement, so that it is possible to avoid the occurrence of an error due to reduction of the input target image. Furthermore, by limiting to only the rotation component, it is possible to avoid the target image that has been reduced or the like as a reference image for the next time or later, and therefore it is possible to avoid accumulation of errors. Therefore, even when the input images are sequentially stitched together, even if images with different imaging orientations are included, accumulation of errors can be suppressed and a high-quality panoramic image can be obtained.

一実施形態では、推定部は、撮像素子の位置を原点とした三次元座標系の各軸の回転成分のみからなる変換式を推定してもよい。   In one embodiment, the estimation unit may estimate a conversion formula that includes only rotational components of each axis of a three-dimensional coordinate system with the position of the image sensor as the origin.

一実施形態では、推定部は、変換式を用いて変換された特徴点のペアのそれぞれの位置情報の差分を含む目的関数を用意し、最適化手法を用いて目的関数が最小値となるように収束演算することで変換式を推定してもよい。このように構成することで、基準画像と対象画像との間の座標系を対応させる変換式を精度良く推定することができる。   In one embodiment, the estimation unit prepares an objective function including a difference in position information of each pair of feature points converted using the conversion formula, and uses the optimization method so that the objective function becomes the minimum value. The conversion formula may be estimated by performing a convergence calculation. By comprising in this way, the conversion type | correspondence which makes the coordinate system between a reference | standard image and an object image correspond can be estimated with a sufficient precision.

一実施形態では、推定部は、対象画像よりも前に入力部によって入力された画像が複数存在する場合には、収束演算の初期値として、対象画像の直前に入力部によって入力された画像の変換式を採用してもよい。このように構成することで、演算の収束が早くなるため、計算コストの抑制と演算速度の向上を実現することができる。   In one embodiment, when there are a plurality of images input by the input unit before the target image, the estimation unit uses an image input by the input unit immediately before the target image as an initial value of the convergence calculation. A conversion formula may be adopted. By configuring in this way, the convergence of calculation is accelerated, so that the calculation cost can be suppressed and the calculation speed can be improved.

一実施形態では、推定部は、マッチング部によって対応関係が算出された特徴点のペアを球面に投影し、投影後の特徴点のペアの位置情報を用いて基準画像の座標系と対象画像の座標系とを対応させる変換式を推定してもよい。このように構成することで、変換式を用いた後の座標に変数の除算が含まれない形とすることができるため、計算コストの抑制と演算速度の向上を実現することができる。   In one embodiment, the estimation unit projects the feature point pair whose correspondence has been calculated by the matching unit onto a spherical surface, and uses the positional information of the projected feature point pair and the reference image coordinate system and the target image. You may estimate the conversion formula which makes a coordinate system correspond. By configuring in this way, the coordinates after using the conversion formula can be made into a form that does not include variable division, so that the calculation cost can be suppressed and the calculation speed can be improved.

一実施形態では、推定部は、対象画像よりも前に入力部によって入力された画像が複数存在し、かつ、対象画像よりも前に入力部によって入力された画像の中の少なくとも1つが基準画像及び対象画像と重なる場合には、基準画像、基準画像に重なる画像及び対象画像のそれぞれの特徴点のペアを用いて、基準画像の座標系と基準画像に重なる画像の座標系とを対応させる変換式、及び、基準画像の座標系と対象画像の座標系とを対応させる変換式を、互いに関連づけて推定してもよい。このように構成することで、基準画像と対象画像との位置関係のみならず、基準画像と他の画像との位置関係を考慮した上で、これらの画像の位置関係を推定することができるため、変換式の精度を向上させることが可能となる。   In one embodiment, the estimation unit includes a plurality of images input by the input unit before the target image, and at least one of the images input by the input unit before the target image is a reference image. When the image overlaps the target image, the reference image, the image overlapped with the reference image, and a pair of feature points of the target image are used to correspond the coordinate system of the reference image with the coordinate system of the image overlapped with the reference image. An equation and a conversion equation that associates the coordinate system of the reference image with the coordinate system of the target image may be estimated in association with each other. With this configuration, the positional relationship between these images can be estimated in consideration of not only the positional relationship between the reference image and the target image but also the positional relationship between the reference image and other images. The accuracy of the conversion formula can be improved.

一実施形態では、選択部は、基準画像と対象画像との距離が所定値以上である場合には、当該対象画像を入力部によって次回以降新たに入力される処理対象の画像である対象画像の基準画像として選択してもよい。このように選択することで、対象画像との重なり面積が大きい基準画像を選択することができる。   In one embodiment, when the distance between the reference image and the target image is equal to or greater than a predetermined value, the selection unit selects a target image that is a target image that is newly input from the next time by the input unit. It may be selected as a reference image. By selecting in this way, a reference image having a large overlapping area with the target image can be selected.

一実施形態では、選択部は、対象画像と基準画像との距離よりも対象画像と過去の基準画像との距離の方が小さい場合には、過去の基準画像を次回以降新たに入力される処理対象の画像である対象画像の基準画像として選択してもよい。このように選択することで、対象画像との重なり面積が大きい基準画像を選択することができる。   In one embodiment, when the distance between the target image and the past reference image is smaller than the distance between the target image and the reference image, the selection unit newly inputs the past reference image after the next time. You may select as a reference | standard image of the target image which is a target image. By selecting in this way, a reference image having a large overlapping area with the target image can be selected.

一実施形態では、マッチング部は、対象画像と過去の基準画像との距離が所定値以下の場合には、過去の基準画像の特徴点と対象画像の特徴点との対応関係をさらに算出し、推定部は、過去の基準画像と対象画像との特徴点のペアの位置情報を用いて、過去の基準画像の座標系と対象画像の座標系とを対応させる変換式をさらに推定し、基準画像の座標系と対象画像の座標系とを対応させる変換式、過去の基準画像の座標系と対象画像の座標系とを対応させる変換式を用いて、基準画像と過去の基準画像とを対応させてもよい。このように構成することで、本来重なりが非常に少ない基準画像同士を、対象画像を介してマッチングすることができるため、より良質なパノラマ画像を得ることが可能となる。   In one embodiment, the matching unit further calculates a correspondence relationship between the feature point of the past reference image and the feature point of the target image when the distance between the target image and the past reference image is a predetermined value or less, The estimation unit further estimates a conversion formula that associates the coordinate system of the past reference image with the coordinate system of the target image using the position information of the feature point pairs of the past reference image and the target image, The reference image and the past reference image are made to correspond to each other by using a conversion formula that associates the coordinate system of the target image with the coordinate system of the target image, and a conversion formula that matches the coordinate system of the past reference image and the coordinate system of the target image. May be. By configuring in this way, reference images that originally have very little overlap can be matched with each other through the target image, so that a higher quality panoramic image can be obtained.

一実施形態では、画像を表示する表示部に接続され、ユーザのカメラ操作を誘導する案内表示を前記表示部に表示させる案内部をさらに備え、推定部は、変換式を推定した基準画像と対象画像とをリンクさせ、相対位置を決定済みのペアであるとして記録し、合成部は、合成画像を表示部へ出力し、案内部は、相対位置を決定済みのペアのうち今回の基準画像とのホップ数が所定値以上でかつ今回の基準画像と重ならない第1画像が存在する場合には、現在の撮像位置から第1画像の画像位置へ撮像位置を誘導する案内表示を表示部へ表示させてもよい。このように構成することで、第1画像と基準画像との位置関係が複数枚の画像を介して相対的に決定されていることにより誤差が蓄積した状態で合成する状況を回避するようにユーザ操作を促すことができる。   In one embodiment, the image processing apparatus further includes a guide unit that is connected to a display unit that displays an image and displays a guide display that guides a user's camera operation on the display unit. The image is linked and the relative position is recorded as a determined pair, the combining unit outputs the combined image to the display unit, and the guide unit is connected to the current reference image of the pair whose relative position has been determined. When there is a first image whose number of hops is equal to or greater than a predetermined value and does not overlap with the current reference image, a guidance display for guiding the imaging position from the current imaging position to the image position of the first image is displayed on the display unit. You may let them. By configuring in this way, the user can avoid a situation where the error is accumulated because the positional relationship between the first image and the reference image is relatively determined via a plurality of images. The operation can be prompted.

本発明の他の側面に係る画像処理方法は、撮像素子によって撮像された画像を順次入力し、入力の度につなぎ合わせて合成画像を生成する画像処理方法である。該方法は、入力ステップ、選択ステップ、マッチングステップ、推定ステップ及び合成ステップを備える。入力ステップは、画像を順次入力する。選択ステップでは、入力ステップによって新たに入力された処理対象の画像である対象画像よりも前に入力ステップによって入力された1又は複数の画像からなる入力済画像の中から基準画像を選択する。マッチングステップでは、基準画像の特徴点と対象画像の特徴点との対応関係を算出する。推定ステップでは、基準画像と対象画像との間の動きが撮像素子の回転運動のみであるとして、マッチングステップによって対応関係が算出された特徴点のペアの位置情報を用いて基準画像の座標系と対象画像の座標系とを対応させる変換式を推定する。合成ステップでは、変換式に基づいて、基準画像と対象画像とを繋ぎ合わせて合成画像を生成する。   An image processing method according to another aspect of the present invention is an image processing method for sequentially inputting images picked up by an image sensor and connecting them each time they are input to generate a composite image. The method includes an input step, a selection step, a matching step, an estimation step, and a synthesis step. In the input step, images are sequentially input. In the selection step, a reference image is selected from input images including one or a plurality of images input in the input step before the target image that is a processing target image newly input in the input step. In the matching step, a correspondence relationship between the feature points of the reference image and the feature points of the target image is calculated. In the estimation step, it is assumed that the movement between the reference image and the target image is only the rotational movement of the image sensor, and the reference image coordinate system A conversion formula that matches the coordinate system of the target image is estimated. In the synthesis step, the reference image and the target image are connected based on the conversion formula to generate a synthesized image.

この画像処理方法によれば、上述した本発明の一側面に係る画像処理装置と同様の効果を奏する。   According to this image processing method, the same effects as those of the image processing apparatus according to one aspect of the present invention described above can be obtained.

本発明の他の側面に係る画像処理プログラムは、撮像素子によって撮像された画像を順次入力し、入力の度につなぎ合わせて合成画像を生成するようにコンピュータを機能させる画像処理プログラムである。該プログラムは、コンピュータを、入力部、選択部、マッチング部、推定部及び合成部として機能させる。入力部は、画像を順次入力する。選択部は、入力部によって新たに入力された処理対象の画像である対象画像よりも前に入力部によって入力された1又は複数の画像からなる入力済画像の中から基準画像を選択する。マッチング部は、基準画像の特徴点と対象画像の特徴点との対応関係を算出する。推定部は、基準画像と対象画像との間の動きが撮像素子の回転運動のみであるとして、マッチング部によって対応関係が算出された特徴点のペアの位置情報を用いて基準画像の座標系と対象画像の座標系とを対応させる変換式を推定する。合成部は、変換式に基づいて、基準画像と対象画像とを繋ぎ合わせて合成画像を生成する。   An image processing program according to another aspect of the present invention is an image processing program for causing a computer to function in such a manner that images captured by an image sensor are sequentially input and stitched together to generate a composite image. The program causes the computer to function as an input unit, a selection unit, a matching unit, an estimation unit, and a synthesis unit. The input unit sequentially inputs images. The selection unit selects a reference image from input images including one or a plurality of images input by the input unit before the target image that is a processing target image newly input by the input unit. The matching unit calculates a correspondence relationship between the feature points of the reference image and the feature points of the target image. The estimation unit assumes that the movement between the reference image and the target image is only the rotational movement of the image sensor, and uses the positional information of the feature point pair whose correspondence is calculated by the matching unit, A conversion formula that matches the coordinate system of the target image is estimated. The synthesizing unit generates a synthesized image by connecting the reference image and the target image based on the conversion formula.

この画像処理プログラムによれば、上述した本発明の一側面に係る画像処理装置と同様の効果を奏する。   According to this image processing program, the same effects as those of the image processing apparatus according to one aspect of the present invention described above can be obtained.

本発明の他の側面に係る記録媒体は、撮像素子によって撮像された画像を順次入力し、入力の度につなぎ合わせて合成画像を生成するようにコンピュータを機能させる画像処理プログラムを記録したコンピュータ読取可能な記録媒体である。該プログラムは、コンピュータを、入力部、選択部、マッチング部、推定部及び合成部として機能させる。入力部は、画像を順次入力する。選択部は、入力部によって新たに入力された処理対象の画像である対象画像よりも前に入力部によって入力された1又は複数の画像からなる入力済画像の中から基準画像を選択する。マッチング部は、基準画像の特徴点と対象画像の特徴点との対応関係を算出する。推定部は、基準画像と対象画像との間の動きが撮像素子の回転運動のみであるとして、マッチング部によって対応関係が算出された特徴点のペアの位置情報を用いて基準画像の座標系と対象画像の座標系とを対応させる変換式を推定する。合成部は、変換式に基づいて、入力済画像と対象画像とを合成して合成画像を生成する。   A recording medium according to another aspect of the present invention is a computer-readable recording of an image processing program that causes a computer to sequentially input images picked up by an image pickup device and connect them each time it is input to generate a composite image. It is a possible recording medium. The program causes the computer to function as an input unit, a selection unit, a matching unit, an estimation unit, and a synthesis unit. The input unit sequentially inputs images. The selection unit selects a reference image from input images including one or a plurality of images input by the input unit before the target image that is a processing target image newly input by the input unit. The matching unit calculates a correspondence relationship between the feature points of the reference image and the feature points of the target image. The estimation unit assumes that the movement between the reference image and the target image is only the rotational movement of the image sensor, and uses the positional information of the feature point pair whose correspondence is calculated by the matching unit, A conversion formula that matches the coordinate system of the target image is estimated. The combining unit combines the input image and the target image based on the conversion formula to generate a combined image.

この記録媒体によれば、上述した本発明の一側面に係る画像処理装置と同様の効果を奏する。   According to this recording medium, the same effects as those of the image processing apparatus according to one aspect of the present invention described above can be obtained.

本発明の種々の側面及び実施形態によれば、入力された画像を順次つなぎ合わせる際に、撮像方位の異なる画像が含まれていた場合であっても、誤差の蓄積を抑制し、良質なパノラマ画像を得ることができる画像処理装置、画像処理方法、画像処理プログラム及び記録媒体が提供される。   According to various aspects and embodiments of the present invention, when images that have been input are sequentially stitched together, even if images with different imaging orientations are included, error accumulation is suppressed, and a high-quality panorama is achieved. An image processing apparatus, an image processing method, an image processing program, and a recording medium that can obtain an image are provided.

実施形態に係る画像処理装置を搭載した携帯端末の機能ブロック図である。It is a functional block diagram of the portable terminal carrying the image processing apparatus which concerns on embodiment. 実施形態に係る画像処理装置が搭載される携帯端末のハードウェア構成図である。It is a hardware block diagram of the portable terminal by which the image processing apparatus which concerns on embodiment is mounted. 広角パノラマ合成画像を説明する概要図である。It is a schematic diagram explaining a wide-angle panoramic composite image. 対象画像の合成時の変形を説明する概要図である。It is a schematic diagram explaining the deformation | transformation at the time of the synthesis | combination of a target image. 基準画像と対象画像の位置合わせを説明する概要図である。It is a schematic diagram explaining alignment of a reference image and a target image. 対象画像の合成時の変形をカメラ回転に基づいて説明する概要図である。It is a schematic diagram explaining the deformation | transformation at the time of the synthesis | combination of a target image based on camera rotation. 基準画像と対象画像の対応点を説明する概要図である。It is a schematic diagram explaining the corresponding point of a reference image and a target image. 基準画像と対象画像の位置合わせの詳細を説明する概要図である。It is a schematic diagram explaining the detail of alignment of a reference image and a target image. 複数の画像の位置合わせを説明する概要図である。It is a schematic diagram explaining alignment of a some image. 基準画像の選択条件を説明する概要図である。It is a schematic diagram explaining the selection conditions of a reference image. 複数画像の動きを同時に推定する場合を説明する概要図である。It is a schematic diagram explaining the case where the motion of several images is estimated simultaneously. 基準画像同士の位置合わせを説明する概要図である。It is a schematic diagram explaining alignment of reference images. 案内表示を説明する概要図である。It is a schematic diagram explaining a guidance display. 合成処理を説明する概要図である。It is a schematic diagram explaining a synthetic | combination process. 実施形態に係る画像処理装置の動作を説明するフローチャートである。6 is a flowchart for explaining the operation of the image processing apparatus according to the embodiment. 実施形態に係る画像処理装置の動作を説明するフローチャートである。6 is a flowchart for explaining the operation of the image processing apparatus according to the embodiment.

以下、添付図面を参照して本発明の実施形態について説明する。なお、各図において同一又は相当部分には同一の符号を付し、重複する説明を省略する。   Hereinafter, embodiments of the present invention will be described with reference to the accompanying drawings. In addition, in each figure, the same code | symbol is attached | subjected to the same or an equivalent part, and the overlapping description is abbreviate | omitted.

本実施形態に係る画像処理装置は、入力画像を入力の度につなぎ合わせて一枚の画像を逐次作成する装置であって、例えば連続撮像された複数の画像をリアルタイムでつなぎ合わせ、1枚の撮像画像よりも広角なパノラマ画像を生成する場合に好適に採用されるものである。本実施形態に係る画像処理装置は、例えば、携帯電話、デジタルカメラ、PDA(Personal Digital Assistant)等、リソースに制限のあるモバイル端末に好適に搭載されるものであるが、これらに限られるものではなく、例えば通常のコンピュータシステムに搭載されてもよい。なお、以下では、説明理解の容易性を考慮し、本発明に係る画像処理装置の一例として、カメラ機能を備えた携帯端末に搭載される画像処理装置を説明する。   The image processing apparatus according to the present embodiment is an apparatus that sequentially creates a single image by joining input images every time it is input. For example, a plurality of continuously captured images are joined in real time. This is suitably employed when generating a panoramic image having a wider angle than the captured image. The image processing apparatus according to the present embodiment is preferably mounted on a mobile terminal with limited resources such as a mobile phone, a digital camera, and a PDA (Personal Digital Assistant), but is not limited thereto. For example, it may be mounted on a normal computer system. In the following, an image processing apparatus mounted on a portable terminal having a camera function will be described as an example of the image processing apparatus according to the present invention in consideration of ease of understanding.

図1は、本実施形態に係る画像処理装置1を備える携帯端末2の機能ブロック図である。図1に示す携帯端末2は、例えばユーザにより携帯される移動端末であり、図2に示すハードウェア構成を有する。図2は、携帯端末2のハードウェア構成図である。図2に示すように、携帯端末2は、物理的には、CPU(Central Processing Unit)100、ROM(Read Only Memory)101及びRAM(Random Access Memory)102等の主記憶装置、カメラ又はキーボード等の入力デバイス103、ディスプレイ等の出力デバイス104、ハードディスク等の補助記憶装置105などを含む通常のコンピュータシステムとして構成される。後述する携帯端末2及び画像処理装置1の各機能は、CPU100、ROM101、RAM102等のハードウェア上に所定のコンピュータソフトウェアを読み込ませることにより、CPU100の制御の元で入力デバイス103及び出力デバイス104を動作させるとともに、主記憶装置や補助記憶装置105におけるデータの読み出し及び書き込みを行うことで実現される。なお、上記の説明は携帯端末2のハードウェア構成として説明したが、画像処理装置1がCPU100、ROM101及びRAM102等の主記憶装置、入力デバイス103、出力デバイス104、補助記憶装置105などを含む通常のコンピュータシステムとして構成されてもよい。また、携帯端末2は、通信モジュール等を備えてもよい。   FIG. 1 is a functional block diagram of a mobile terminal 2 including an image processing apparatus 1 according to the present embodiment. A mobile terminal 2 shown in FIG. 1 is a mobile terminal carried by a user, for example, and has a hardware configuration shown in FIG. FIG. 2 is a hardware configuration diagram of the mobile terminal 2. As shown in FIG. 2, the portable terminal 2 physically includes a main storage device such as a CPU (Central Processing Unit) 100, a ROM (Read Only Memory) 101, and a RAM (Random Access Memory) 102, a camera, a keyboard, and the like. The input device 103, the output device 104 such as a display, the auxiliary storage device 105 such as a hard disk, and the like are configured as a normal computer system. Each function of the portable terminal 2 and the image processing apparatus 1 to be described later causes the input device 103 and the output device 104 to be controlled under the control of the CPU 100 by reading predetermined computer software on hardware such as the CPU 100, the ROM 101, and the RAM 102. This is realized by operating and reading and writing data in the main storage device and the auxiliary storage device 105. Although the above description has been given as a hardware configuration of the mobile terminal 2, the image processing apparatus 1 normally includes a CPU 100, a main storage device such as the ROM 101 and the RAM 102, an input device 103, an output device 104, an auxiliary storage device 105, and the like. It may be configured as a computer system. The mobile terminal 2 may include a communication module or the like.

図1に示すように、携帯端末2は、カメラ20、画像処理装置1及び表示部21を備えている。カメラ20は、画像を撮像する機能を有している。カメラ20として、例えば撮像素子等が用いられる。カメラ20は、例えばユーザ操作等により指定されたタイミングから所定の間隔で繰り返し撮像する連続撮像機能を有している。ユーザは、例えばカメラ20をスライド又は所定位置を原点として回転させて少なくとも上下左右において重なる連続画像を撮像することができる。そして、カメラ20は、例えば撮像された画像を撮像の度に画像処理装置1へ出力する機能を有している。表示部21は、合成画像等を表示可能なディスプレイ装置である。   As shown in FIG. 1, the mobile terminal 2 includes a camera 20, an image processing device 1, and a display unit 21. The camera 20 has a function of capturing an image. For example, an image sensor or the like is used as the camera 20. The camera 20 has a continuous imaging function that repeatedly captures images at a predetermined interval from a timing specified by a user operation or the like, for example. For example, the user can take a continuous image that overlaps at least in the vertical and horizontal directions by sliding the camera 20 or rotating the camera 20 around a predetermined position. For example, the camera 20 has a function of outputting a captured image to the image processing apparatus 1 every time it is captured. The display unit 21 is a display device that can display a composite image and the like.

画像処理装置1は、撮像された画像を順次つなぎ合わせて広角のパノラマ合成画像を生成する機能を有する。通常のカメラの視野角は約50〜65度(対角線画角)であるところ、画像処理装置1は、後述する機能を有することで、入力画像をつなぎ合わせて65度以上の画角の画像を生成する。例えば、図3に示すように、カメラ20の撮像方向が矢印Kに示すように変化した場合には、順次入力された画像をつなぎ合わせ、合成平面Spに合成画像を順次描画する。例えば今回入力された画像がIcであるとすると、画像Icが今までの合成画像Itと合成されて一枚の合成画像が生成される。なお、画像処理装置1は、合成する処理対象である対象画像Icを単に合成画像Itに繋げるだけではなく、変形処理を施した後に繋げる。例えば、図4に示すように、画像処理装置1は対象画像Icを(A)拡大/縮小、(B)平行四辺形(横方向)、(C)平行四辺形(縦方向)、(D)回転、(E)平行移動(横方向)、(F)平行移動(縦方向)、(G)台形(横方向)、(H)台形(縦方向)に変形する。これらの変形処理あるいは組み合わせた変形処理を施した対象画像Icが、合成平面Spへ描画される。(A)〜(H)の8自由度の変形を採用することで、画像のつなぎ目にてズレが生じにくくなり、自然な広角パノラマを得ることができる。   The image processing apparatus 1 has a function of sequentially joining captured images to generate a wide-angle panorama composite image. The viewing angle of a normal camera is about 50 to 65 degrees (diagonal angle of view). However, the image processing apparatus 1 has a function to be described later so that input images can be joined to form an image with an angle of view of 65 degrees or more. Generate. For example, as shown in FIG. 3, when the imaging direction of the camera 20 changes as indicated by the arrow K, the sequentially input images are connected and the combined images are sequentially drawn on the combining plane Sp. For example, if the image input this time is Ic, the image Ic is combined with the previous combined image It to generate a single combined image. Note that the image processing apparatus 1 does not simply connect the target image Ic, which is the processing target to be combined, to the composite image It, but also connects it after performing deformation processing. For example, as illustrated in FIG. 4, the image processing apparatus 1 (A) enlarges / reduces the target image Ic, (B) a parallelogram (horizontal direction), (C) a parallelogram (vertical direction), and (D). Rotation, (E) Parallel movement (horizontal direction), (F) Parallel movement (vertical direction), (G) Trapezoid (horizontal direction), (H) Trapezoid (vertical direction). The target image Ic that has undergone these deformation processes or a combination of the deformation processes is drawn on the composite plane Sp. By adopting the eight-degree-of-freedom deformations (A) to (H), it becomes difficult for displacement to occur at the joints of images, and a natural wide-angle panorama can be obtained.

以下では、画像処理装置1の詳細を説明する。画像処理装置1は、入力部10、選択部11、マッチング部12、推定部13、合成部14及び案内部15を備えている。   Below, the detail of the image processing apparatus 1 is demonstrated. The image processing apparatus 1 includes an input unit 10, a selection unit 11, a matching unit 12, an estimation unit 13, a synthesis unit 14, and a guide unit 15.

入力部10は、カメラ20により撮像された画像を入力する機能を有している。入力部10は、例えばカメラ20により撮像された画像を撮像の度に入力する機能を有している。また、入力部10は、最初に入力した画像を、携帯端末2に備わる第1の一時記憶領域(出力画像用バッファ)に保存する機能を有している。また、入力部10は、次回以降連続して入力される画像を、携帯端末に備わる第2の一時記憶領域(入力画像用バッファ)に保存する機能を有している。なお、第2の一時記憶領域に画像が保存されると、該画像の位置決めが行われるとともに該画像が描画対象であるか否かが判断され、描画対象の画像と判断された場合には、第1の一時記憶領域に格納された出力画像が合成により更新され上書き保存される。以下では、第1の一時記憶領域に格納された画像を合成画像It、第2の一時記憶領域に格納された画像を対象画像Ic(入力画像)として説明する。   The input unit 10 has a function of inputting an image captured by the camera 20. The input unit 10 has a function of inputting, for example, an image captured by the camera 20 every time it is captured. Further, the input unit 10 has a function of saving the first input image in a first temporary storage area (output image buffer) provided in the mobile terminal 2. Further, the input unit 10 has a function of saving images input continuously from the next time in a second temporary storage area (input image buffer) provided in the mobile terminal. When the image is stored in the second temporary storage area, positioning of the image is performed and whether or not the image is a drawing target is determined. When it is determined that the image is a drawing target, The output image stored in the first temporary storage area is updated by synthesis and overwritten. In the following description, the image stored in the first temporary storage area is described as a composite image It, and the image stored in the second temporary storage area is described as a target image Ic (input image).

選択部11は、位置合わせ用の基準画像を選択する機能を有する。基準画像とは、対象画像Icの位置合わせの基準となる画像である。例えば、選択部11は、入力済画像に関する情報を格納したメモリ18を参照可能に構成されている。入力済画像は、対象画像Icよりも前に入力部10によって入力された画像であり、1又は複数の画像であり得る。すなわち、n番目の対象画像IcをIc(n−1)とすると、入力済画像は、Ic(n−2),Ic(n−3),…Ic0となる。選択部11は、入力済画像が1枚の場合には、該画像Ic1を対象画像Ic2の基準画像Ir0として選択する。以降、所定条件を満たす場合を除き、選択部11は、当該基準画像を変更しない。所定条件とは、基準画像と対象画像Ic(n)との距離が所定値以上離れた場合である。この場合には、選択部11は、対象画像Ic(n)を次回の新たな対象画像Ic(n+1)の基準画像Ir(k)として選択し、対象画像Ic(n)に関する情報をメモリ18に保存する。対象画像Ic(n)に関する情報とは、例えば、後述するマッチング部12によって導出された特徴点の画素値及び位置情報のみであってもよい。このように、メモリ18に記録する情報を制限することで、基準画像Irそのものを保存する場合に比べて使用メモリ容量を削減することができる。そして、選択部11は、対象画像Ic(n+1)を入力した際には、メモリ18を参照し、基準画像Ir(k)として対象画像Ic(n)を選択する。以上、選択部11は、対象画像Icごとに1つの基準画像Irを選択する。一実施形態では、選択部11は、所定の条件を満たした場合、対象画像Ic(n)に対して一時基準画像も選択してもよい。一時基準画像は、入力済画像の中から選択される画像であって一時的な基準画像である。一時基準画像の選択処理の詳細については後述する。選択部11は、基準画像Irに関する画像情報(少なくとも特徴点の画素情報及び位置情報を含む情報)をマッチング部12へ出力する。   The selection unit 11 has a function of selecting a reference image for alignment. The reference image is an image serving as a reference for alignment of the target image Ic. For example, the selection unit 11 is configured to be able to refer to a memory 18 that stores information related to an input image. The input image is an image input by the input unit 10 before the target image Ic, and may be one or a plurality of images. That is, if the n-th target image Ic is Ic (n−1), the input images are Ic (n−2), Ic (n−3),. When there is one input image, the selection unit 11 selects the image Ic1 as the reference image Ir0 of the target image Ic2. Thereafter, unless the predetermined condition is satisfied, the selection unit 11 does not change the reference image. The predetermined condition is when the distance between the reference image and the target image Ic (n) is a predetermined value or more. In this case, the selection unit 11 selects the target image Ic (n) as the reference image Ir (k) of the next new target image Ic (n + 1), and stores information on the target image Ic (n) in the memory 18. save. The information related to the target image Ic (n) may be, for example, only the pixel values and position information of feature points derived by the matching unit 12 described later. As described above, by limiting the information to be recorded in the memory 18, it is possible to reduce the used memory capacity as compared with the case of storing the reference image Ir itself. When the target image Ic (n + 1) is input, the selection unit 11 refers to the memory 18 and selects the target image Ic (n) as the reference image Ir (k). As described above, the selection unit 11 selects one reference image Ir for each target image Ic. In one embodiment, the selection unit 11 may also select a temporary reference image for the target image Ic (n) when a predetermined condition is satisfied. The temporary reference image is an image selected from input images and is a temporary reference image. Details of the selection process of the temporary reference image will be described later. The selection unit 11 outputs image information related to the reference image Ir (information including at least pixel information and position information of feature points) to the matching unit 12.

マッチング部12は、基準画像Ir及び対象画像Icの対応関係を取得する。マッチング部12は、基準画像Irの特徴点及び対象画像Icの特徴点に関する情報を取得する。マッチング部12は、例えば特徴点の画素値に基づいて基準画像Ir及び対象画像Icの対応関係を取得する。マッチング方法としては、ブロックマッチング法等、従来の手法を用いることができる。一実施形態では、マッチング部12は、基準画像Ir及び対象画像Icを多重解像度化した上でマッチングしてもよい。例えば、マッチング部12は、基準画像Ir及び対象画像Icの解像度をそれぞれ段階的に変更して、解像度の異なる複数の画像を生成する。そして、マッチング部12は、最も解像度の小さい画像間で特徴点の平行移動量を取得し、より解像度の大きい画像間で特徴点のピクセル単位のマッチングを行ってもよい。この場合、処理高速化及び演算コストを低減させることができる。   The matching unit 12 acquires a correspondence relationship between the reference image Ir and the target image Ic. The matching unit 12 acquires information on the feature points of the reference image Ir and the feature points of the target image Ic. For example, the matching unit 12 acquires the correspondence between the reference image Ir and the target image Ic based on the pixel value of the feature point. As a matching method, a conventional method such as a block matching method can be used. In one embodiment, the matching unit 12 may perform matching after making the reference image Ir and the target image Ic multi-resolution. For example, the matching unit 12 changes the resolution of the reference image Ir and the target image Ic in stages, and generates a plurality of images having different resolutions. And the matching part 12 may acquire the amount of parallel movement of a feature point between images with the smallest resolution, and may perform the matching of the feature point in pixels between images with a higher resolution. In this case, the processing speed can be increased and the calculation cost can be reduced.

マッチング部12は、基準画像Irと対象画像Icとの対応関係が算出された特徴点のペアの位置情報(座標情報)を取得する。すなわち、マッチング部12は、基準画像Irのある特徴点の位置情報と、当該特徴点に対応する対象画像Icの特徴点の位置情報とを、ペアにして取得する。マッチング部12は、後述する位置合わせ処理のために、特徴点のペアを複数取得する。マッチング部12は、取得した特徴点のペアを推定部13へ出力する。なお、前述のとおり、選択部11が該対象画像Icを次回以降の基準画像Irとして追加する場合には、マッチング部12は、対象画像Icの特徴点の画素値及び位置情報を選択部11へ出力する。   The matching unit 12 acquires position information (coordinate information) of a feature point pair for which the correspondence relationship between the reference image Ir and the target image Ic is calculated. That is, the matching unit 12 acquires a pair of position information of a feature point of the reference image Ir and position information of a feature point of the target image Ic corresponding to the feature point. The matching unit 12 acquires a plurality of pairs of feature points for alignment processing described later. The matching unit 12 outputs the acquired feature point pair to the estimation unit 13. As described above, when the selection unit 11 adds the target image Ic as the reference image Ir for the next and subsequent times, the matching unit 12 sends the pixel values and position information of the feature points of the target image Ic to the selection unit 11. Output.

推定部13は、基準画像Irと対象画像Icとの対応関係に基づいて、基準画像Irと対象画像Icとの位置合わせを行う機能を有している。図5は、基準画像と対象画像Icの位置合わせの概要を説明する概要図である。例えば、図5の(A)に示すように、一枚目の画像のみが入力されている場合には、該画像が基準画像Ir0として選択される。そして、二枚目の画像(対象画像Ic)が入力された場合には、推定部13は、基準画像Ir0の位置を基準として、対象画像Icを位置合わせする。位置合わせとは、例えば図5の(B)に示すように、基準画像Ir0の所定点(ここでは中心C0)と、対象画像Icの所定点(ここでは中心C1)との相対位置を決定することである。推定部13は、マッチング部12によって取得された特徴点のペアが互いに最も重なる位置を探索する。そして、図5の(C)に示すように、推定部13によって、基準画像Ir0と対象画像Icとの位置合わせが完了した場合には、互いに位置関係がリンクされた旨(リンクRe1)を記録する。なお、前述のとおり、推定部13によって位置合わせが完了し基準画像Ir0と対象画像Icとの相対距離が所定値以上となっている場合には、選択部11が該対象画像Icを次回以降の基準画像Ir1として追加する必要があるため、マッチング部12は、対象画像Icの特徴点の画素値及び位置情報を選択部11へ出力する。   The estimation unit 13 has a function of aligning the reference image Ir and the target image Ic based on the correspondence relationship between the reference image Ir and the target image Ic. FIG. 5 is a schematic diagram for explaining an outline of alignment between the reference image and the target image Ic. For example, as shown in FIG. 5A, when only the first image is input, the image is selected as the reference image Ir0. When the second image (target image Ic) is input, the estimation unit 13 aligns the target image Ic with the position of the reference image Ir0 as a reference. In the alignment, for example, as shown in FIG. 5B, a relative position between a predetermined point (here, center C0) of the reference image Ir0 and a predetermined point (here, center C1) of the target image Ic is determined. That is. The estimation unit 13 searches for a position where the feature point pairs acquired by the matching unit 12 overlap each other most. Then, as shown in FIG. 5C, when the estimation unit 13 completes the alignment of the reference image Ir0 and the target image Ic, the fact that the positional relationship is linked to each other (link Re1) is recorded. To do. As described above, when the alignment is completed by the estimation unit 13 and the relative distance between the reference image Ir0 and the target image Ic is equal to or greater than a predetermined value, the selection unit 11 sets the target image Ic to the next and subsequent times. Since it is necessary to add as the reference image Ir1, the matching unit 12 outputs the pixel value and position information of the feature point of the target image Ic to the selection unit 11.

推定部13は、カメラの動きを考慮して基準画像Irと対象画像Icとの位置合わせを行う。図6は、カメラ20の回転による撮像面を説明する概要図である。例えば、図6に示すように、回転前のカメラ20の撮像面をS0、回転後のカメラ20の撮像面をS1とすると、撮像面S0と撮像面S1とが同一平面内に存在しない。したがって、特徴点のペアを平行移動によって重ねた位置は本来の重ね合わせ位置とは異なることになる。すなわち、位置合わせを行う場合には、カメラの動きを考慮して、基準画像Irの特徴点の位置と対象画像Icの特徴点の位置とが同一の三次元座標系上で一致するように位置合わせする必要がある。   The estimation unit 13 aligns the reference image Ir and the target image Ic in consideration of the camera movement. FIG. 6 is a schematic diagram for explaining an imaging surface by the rotation of the camera 20. For example, as shown in FIG. 6, if the imaging surface of the camera 20 before rotation is S0 and the imaging surface of the rotated camera 20 is S1, the imaging surface S0 and the imaging surface S1 do not exist in the same plane. Therefore, the position at which the feature point pairs are overlapped by translation is different from the original overlap position. That is, when positioning is performed, the position of the feature point of the reference image Ir and the position of the feature point of the target image Ic are aligned on the same three-dimensional coordinate system in consideration of the movement of the camera. It is necessary to match.

よって、推定部13は、基準画像Ir0の三次元の座標系と、対象画像Icの三次元の座標系とを一致させる変換式を推定する。図7に示すように、基準画像Ir0の特徴点の座標を(x,y,1)、当該特徴点に対応する対象画像Icの特徴点の座標を(x,y,1)とすると、推定部13は、(x,y,1)と(x,y,1)とが一致する変換式を推定する。ここで、カメラの自由度は、焦点距離が1自由度、カメラの動き(xy方向への平行移動、z方向への移動による拡大縮小)が3自由度、カメラの回転(x方向、y方向への画像の歪み(台形)、及びz軸における画像の回転が3自由度であり、7自由度である。ローリングシャッタ歪み(フォーカルプレーン歪み)を考慮して8自由度であると近似すると、以下の数式1で表現される。

上記変換行列(変換式)のパラメータa〜hは、上述した8自由度に関するパラメータである。推定部13は、複数の特徴点のペアが上記関係を満たすことができる変換行列のパラメータを最適化手法による収束演算により求める。具体的には、基準画像Irの特徴点の位置(x,y,1)と、対象画像Icの特徴点の位置(x,y,1)を変換した後の位置との差分を含む目的関数が最小値となるように収束演算を行う。最適化手法は、ニュートン法又はガウスニュートン法等、公知の手法が採用される。
Therefore, the estimation unit 13 estimates a conversion formula that matches the three-dimensional coordinate system of the reference image Ir0 with the three-dimensional coordinate system of the target image Ic. As shown in FIG. 7, the coordinates of the feature points of the reference image Ir0 are (x 0 , y 0 , 1), and the coordinates of the feature points of the target image Ic corresponding to the feature points are (x 1 , y 1 , 1). Then, the estimation unit 13 estimates a conversion formula in which (x 0 , y 0 , 1) matches (x 1 , y 1 , 1). Here, the degree of freedom of the camera is 1 degree of freedom for the focal length, 3 degrees of freedom for camera movement (parallel movement in the xy direction, enlargement / reduction by movement in the z direction), and rotation of the camera (x direction, y direction). The distortion of the image (trapezoid) and the rotation of the image in the z-axis are 3 degrees of freedom and 7 degrees of freedom, and considering the rolling shutter distortion (focal plane distortion) to be 8 degrees of freedom, It is expressed by the following formula 1.

The parameters a 1 to h 1 of the conversion matrix (conversion formula) are parameters related to the eight degrees of freedom described above. The estimation unit 13 obtains a parameter of a transformation matrix that allows a plurality of feature point pairs to satisfy the above relationship by convergence calculation using an optimization method. Specifically, the difference between the position (x 0 , y 0 , 1) of the feature point of the reference image Ir and the position after converting the position (x 1 , y 1 , 1) of the feature point of the target image Ic. Convergence calculation is performed so that the objective function including is the minimum value. As the optimization method, a known method such as Newton method or Gauss Newton method is adopted.

ここで、推定部13は、基準画像Irと対象画像Icとの間の動きがカメラ20の回転運動のみであるとして、カメラ20の動きを3自由度に限定し、特徴点のペアの位置情報を用い変換式を推定する機能を有している。例えば、図7に示すように、カメラ20の撮像位置を原点とすると、カメラの自由度をX軸,Y軸,Z軸の回転のみに限定する。各軸のパラメータを(β,α,γ)とすると、変換行列Rは以下のように表現することができる。

すなわち、基準画像Irの特徴点の位置(x,y,1)と対象画像Icの特徴点の位置(x,y,1)とは、変換行列Rを用いて以下の数式2のように対応させることができる。

ここで、(c,c)は、基準画像Ir及び対象画像Icの画像サイズを同一とした場合の、それぞれの中心座標である。また、Fは、焦点距離である。なお、焦点距離Fはカメラ20の諸元情報から得られる値を適用させてもよい。
Here, assuming that the movement between the reference image Ir and the target image Ic is only the rotational movement of the camera 20, the estimation unit 13 limits the movement of the camera 20 to three degrees of freedom, and position information of feature point pairs. Has the function of estimating the conversion equation. For example, as shown in FIG. 7, assuming that the imaging position of the camera 20 is the origin, the degree of freedom of the camera is limited to only rotation of the X axis, Y axis, and Z axis. If the parameters of each axis are (β, α, γ), the transformation matrix R can be expressed as follows.

That is, the position of the feature point (x 0 , y 0 , 1) of the reference image Ir and the position of the feature point (x 1 , y 1 , 1) of the target image Ic are expressed by the following formula 2 using the transformation matrix R: It can be made to correspond as follows.

Here, (c x , c y ) is the respective center coordinates when the reference image Ir and the target image Ic have the same image size. F is a focal length. The focal length F may be a value obtained from the specification information of the camera 20.

数式1のように、縮小成分が考慮された変換行列を用いて、かつ、さらに誤差を小さくすることを優先させて収束演算をした場合には、画像を縮小した方が誤差は相対的に小さくなることから、縮小成分の度合いが大きくなる変換行列が解となる傾向になる。この場合、逐次合成するごとに誤差が蓄積されていき、結果として良質なパノラマ画像とはならない。これに対して、数式2に示すように、変換行列Rを回転成分のみに限定することで、最適化手法による収束演算の際に縮小成分が考慮されることはないため、誤差の蓄積を回避でき、良質なパノラマ合成画像が生成される。なお、ガウスニュートン法等の最適化手法の収束演算の初期値として、前回の対象画像Icの変換行列を採用してもよい。この場合、収束演算がより早く収束しやすくなることから、演算速度を向上させることができる。   When the convergence calculation is performed using the transformation matrix in which the reduction component is considered as in Equation 1 and priority is given to further reducing the error, the error is relatively smaller when the image is reduced. Therefore, a transformation matrix having a large degree of reduction component tends to be a solution. In this case, errors are accumulated every time the images are sequentially combined, and as a result, a high-quality panoramic image is not obtained. On the other hand, as shown in Formula 2, by limiting the transformation matrix R to only the rotation component, the reduction component is not taken into account in the convergence calculation by the optimization method, so that accumulation of errors is avoided. And a high-quality panoramic composite image is generated. Note that the transformation matrix of the previous target image Ic may be adopted as the initial value of the convergence calculation of an optimization method such as the Gauss-Newton method. In this case, since the convergence calculation can be converged more quickly, the calculation speed can be improved.

一実施形態では、推定部13は、数式2を収束演算して変換行列を推定する際には、特徴点の二次元座標を三次元空間Spの球面に投影し、投影した座標の対応関係を用いて変換行列を推定する。図8は、基準画像Irと対象画像Icの位置合わせの詳細を説明する概要図である。図8の(A),(B)に示すように、推定部13は、二次元座標系の基準画像Irの特徴点の位置(x,y,1)と二次元座標系の対象画像Icの位置(x,y,1)とを三次元空間Spの球面へ透視射影する。x−cをベクトルx、y−cをベクトルyとし、投影後の座標を(X,Y,Z)とすると、座標(x,y,F)については、例えば以下の数式3で射影投影される。

また、変換行列Rによる変換後の座標点は以下のように表現できる。

このため、収束演算の目的関数が以下の差分rを含むことになる。

なお、数式3の変換は、対象画像Icが基準画像Irとの距離が近いと仮定した場合、省略することができる。この場合、上記差分rは除算を含まない形となるため、除算による桁落ちを考慮する必要がなくなる。このため、例えば目的関数をガウスニュートン法等による最適化処理により収束演算する際に、演算を容易とすることができる。よって、三次元空間の球面へ射影して演算する場合、演算コストを低減させることが可能となる。
In one embodiment, the estimation unit 13 projects the two-dimensional coordinates of the feature points on the spherical surface of the three-dimensional space Sp when the transformation matrix is estimated by performing the convergence calculation on Equation 2, and the correspondence relationship of the projected coordinates is expressed. To estimate the transformation matrix. FIG. 8 is a schematic diagram illustrating details of the alignment between the reference image Ir and the target image Ic. As shown in FIGS. 8A and 8B, the estimation unit 13 determines the position (x 0 , y 0 , 1) of the feature point of the reference image Ir in the two-dimensional coordinate system and the target image in the two-dimensional coordinate system. The position (x 1 , y 1 , 1) of Ic is perspectively projected onto the spherical surface of the three-dimensional space Sp. x n -c x the vector x n, the y n -c x and a vector y n, the coordinates of the projected (X n, Y n, Z n) When, for the coordinates (x 1, y 1, F ) Is projected and projected, for example, according to Equation 3 below.

Further, the coordinate points after conversion by the conversion matrix R can be expressed as follows.

For this reason, the objective function of the convergence calculation includes the following difference r.

Note that the conversion of Expression 3 can be omitted when it is assumed that the target image Ic is close to the reference image Ir. In this case, since the difference r does not include division, it is not necessary to consider the carry-over due to division. For this reason, for example, when the convergence calculation of the objective function is performed by an optimization process using a Gauss-Newton method or the like, the calculation can be facilitated. Therefore, when calculating by projecting onto a spherical surface in a three-dimensional space, the calculation cost can be reduced.

推定部13は、上記処理によって、変換行列Rを推定し、基準画像Irと対象画像Icとの位置合わせを行う。推定部13は、選択部11が選択した基準画像Irと入力された対象画像Icとを逐次位置合わせを行い、リンクを生成する(図8の(C))。図9は、8枚の入力画像間の位置決めを行ったリンクを示している。図9に示すように、8枚の入力画像の中心C0〜C7の間がリンクされている(リンクRe1〜Re7)。選択部11が基準画像を選択し、推定部13がリンクを形成するという動作を繰り返すことで、図9に示すように画像を位置合わせしながらつなぐことができる。   The estimation unit 13 estimates the transformation matrix R by the above processing, and aligns the reference image Ir and the target image Ic. The estimation unit 13 sequentially aligns the reference image Ir selected by the selection unit 11 and the input target image Ic to generate a link ((C) in FIG. 8). FIG. 9 shows a link in which positioning is performed between eight input images. As shown in FIG. 9, the centers C0 to C7 of the eight input images are linked (links Re1 to Re7). By repeating the operation in which the selection unit 11 selects the reference image and the estimation unit 13 forms a link, the images can be connected while being aligned as shown in FIG.

なお、推定部13は、球面に投影して変換行列Rを推定し、基準画像と対象画像とを位置合わせするため、二次元平面と球面との座標変換の際に、例えば図4に示す8自由度の画像変形が考慮される。言い換えれば、推定部13は、球面上で位置決めすることで、後述する合成部14が球面から平面へ投影する際に、図4に示す画像変形をすることができる。   Note that the estimation unit 13 estimates the transformation matrix R by projecting onto a spherical surface, and aligns the reference image and the target image. Therefore, when performing coordinate transformation between the two-dimensional plane and the spherical surface, for example, 8 shown in FIG. A degree of freedom of image deformation is considered. In other words, the estimating unit 13 can perform image deformation shown in FIG. 4 when the combining unit 14 described later projects from a spherical surface to a plane by positioning on the spherical surface.

以下では、選択部11及び推定部13の変形例について説明する。一実施形態では、選択部11は、基準画像Irだけでなく一時基準画像Itrを用いてもよい。図10は、基準画像Ir及び一時基準画像Itrを説明する概要図である。まず、図10の(A)に示すように、画像が入力された場合には、該画像が次回以降の基準画像Irとなる。次に、図10の(B)に示すように基準画像Irから一定値以上離れた対象画像Icが入力されたとする。この場合、図10の(C)に示すように、対象画像Icを次回以降の一時的な基準画像である一時基準画像Itrとする。一時基準画像Itrは、履歴として保存されない一時的な基準画像である。次に、図10の(D)に示すように一時基準画像Itrから離れた対象画像Icが入力され、図10の(E)に示すように一時基準画像Itrから一定値以上離れた対象画像Icが入力されたとする。この場合、図10の(F),(G)に示すように、今回までの一時基準画像Itrを破棄し、対象画像Icを次回以降の一時的な基準画像である一時基準画像Itrとする。次に、図10の(H)に示すように一時基準画像Itrのみならず基準画像Irからも一定値以上離れた対象画像Icが入力されたとする。この場合、図10の(I)に示すように、今回までの一時基準画像Itrを破棄し、対象画像Icを次回以降の基準画像Irとする。ここで、今回までの基準画像すなわち1番目の基準画像をIr0とし、次回以降の基準画像をIr1とする。基準画像Ir0,Ir1の特徴点に関する情報は位置合わせのために保存される。次に、図10の(J)に示すように基準画像Ir1からも一定値以上離れた対象画像Icが入力されたとする。この場合、図10の(C)と同様に、図10の(K)に示すように対象画像Icを次回以降の一時的な基準画像である一時基準画像Itrとする。次に、図10の(L)に示すように一時基準画像Itrよりも基準画像Ir0に近い対象画像Icが入力されたとする。この場合、今回までの一時基準画像Itrを破棄し、次回以降の基準画像を基準画像Ir0とする。このように、基準画像の情報を保持しておくことで、カメラ20が元の位置に戻ってきた場合であっても過去の基準画像を基準に対象画像を位置合わせすることができる。また、一時基準画像Itrと基準画像Irとを用いることで、記録しておく必要のあるデータを最小限にすることができる。   Below, the modification of the selection part 11 and the estimation part 13 is demonstrated. In one embodiment, the selection unit 11 may use not only the reference image Ir but also the temporary reference image Itr. FIG. 10 is a schematic diagram illustrating the reference image Ir and the temporary reference image Itr. First, as shown in FIG. 10A, when an image is input, the image becomes a reference image Ir for the next and subsequent times. Next, it is assumed that a target image Ic separated from the reference image Ir by a predetermined value or more is input as shown in FIG. In this case, as shown in FIG. 10C, the target image Ic is set as a temporary reference image Itr that is a temporary reference image after the next time. The temporary reference image Itr is a temporary reference image that is not saved as a history. Next, a target image Ic separated from the temporary reference image Itr is input as shown in (D) of FIG. 10, and the target image Ic separated from the temporary reference image Itr by a predetermined value or more as shown in (E) of FIG. Is entered. In this case, as shown in FIGS. 10F and 10G, the temporary reference image Itr thus far is discarded, and the target image Ic is set as a temporary reference image Itr that is a temporary reference image from the next time onward. Next, as shown in (H) of FIG. 10, it is assumed that the target image Ic separated from the reference image Ir as well as the temporary reference image Itr by a predetermined value or more is input. In this case, as shown in (I) of FIG. 10, the temporary reference image Itr up to this time is discarded, and the target image Ic is set as a reference image Ir for the next time and thereafter. Here, the reference image up to this time, that is, the first reference image is Ir0, and the next and subsequent reference images are Ir1. Information about the feature points of the reference images Ir0 and Ir1 is stored for alignment. Next, as shown in (J) of FIG. 10, it is assumed that the target image Ic separated from the reference image Ir1 by a certain value or more is input. In this case, as shown in FIG. 10C, the target image Ic is set as a temporary reference image Itr that is a temporary reference image after the next time, as shown in FIG. Next, it is assumed that the target image Ic closer to the reference image Ir0 than the temporary reference image Itr is input as shown in (L) of FIG. In this case, the temporary reference image Itr up to this time is discarded, and the next and subsequent reference images are set as the reference image Ir0. In this way, by holding the reference image information, the target image can be aligned based on the past reference image even when the camera 20 returns to the original position. Further, by using the temporary reference image Itr and the reference image Ir, it is possible to minimize the data that needs to be recorded.

また、一実施形態では、推定部13は、複数の画像が重なっている場合には、複数の画像間の動きを同時に推定してもよい。例えば、図11に示すように、基準画像Irと対象画像Icに重なる画像(過去の対象画像Ip1)が存在するとする。基準画像Irと過去の対象画像Ip1とは位置決めされた状態、すなわち、変換行列Rが既に導出されているとする。そして、基準画像Irの特徴点の座標を(x,y,1)、過去の対象画像Ip1の特徴点の座標を(x,y,1)、対象画像Icの特徴点の座標を(x,y,1)とする。ここで、基準画像Irの座標系と対象画像Icの座標系とを対応させる変換行列Rを導出する際に、以下の条件を設定する。

数式7によって、変換式Rと変換式Rとを関連付けしている。推定部13は、上記数式5〜7を満たすことができるR、Rを最適化手法による収束演算によって同時に推定する。この場合、基準画像Irと過去の対象画像Ip1との特徴点のペアに関する情報を無駄にすることを回避できる。また、複数の画像間を同時に推定することで、リンクが直列に繋がっていく場合に比べて誤差の蓄積を抑制することができる。
Moreover, in one embodiment, the estimation part 13 may estimate the motion between several images simultaneously, when several images have overlapped. For example, as shown in FIG. 11, it is assumed that there is an image (past target image Ip1) that overlaps the reference image Ir and the target image Ic. Reference image Ir and past state of being positioned in the target image Ip1, i.e., the conversion matrix R 1 have already been derived. Then, the coordinates of the feature points of the reference image Ir are (x 0 , y 0 , 1), the coordinates of the feature points of the past target image Ip1 are (x 1 , y 1 , 1), and the coordinates of the feature points of the target image Ic. Is (x 2 , y 2 , 1). Here, the coordinate system of the coordinate system and target image Ic of the reference image Ir in deriving the transformation matrix R 2 to correspond, set the following conditions.

Expression 7 associates conversion expression R 1 and conversion expression R 2 . The estimation unit 13 simultaneously estimates R 1 and R 2 that can satisfy the above mathematical expressions 5 to 7 by convergence calculation using an optimization method. In this case, it is possible to avoid wasting information on the feature point pairs of the reference image Ir and the past target image Ip1. Further, by simultaneously estimating between a plurality of images, it is possible to suppress accumulation of errors compared to a case where links are connected in series.

また、一実施形態では、推定部13は、対象画像Icが過去の基準画像Irにも近い場合には、現在の基準画像Irだけでなく過去の基準画像Irとも位置合わせを行う。例えば、図13の(A)に示すように、画像中心がC13の対象画像Ic13は、画像中心がC12の基準画像Ir12とリンクRe13が張られており、相対位置が決定している。ここで、推定部13は、図13の(B)に示すように、対象画像Ic13が画像中心C1の過去の基準画像Ir1とも近い場合には、基準画像Ir1と対象画像Ic13との位置合わせを行う。これにより、基準画像Ir1と対象画像Ic13との間にはリンクRe14が張られる。すなわち、基準画像Ir1と基準画像Ir12との位置合わせを、対象画像Ic13を用いて行うことができる。このように、基準画像Ir同士の位置合わせを、対象画像Icを用いて達成することで、本来重なりの少ない基準画像Ir同士の位置決めをすることが可能となる。   Further, in one embodiment, when the target image Ic is close to the past reference image Ir, the estimation unit 13 performs alignment with the past reference image Ir as well as the current reference image Ir. For example, as shown in FIG. 13A, the target image Ic13 whose image center is C13 has a link Re13 and a reference image Ir12 whose image center is C12, and the relative position is determined. Here, as shown in FIG. 13B, the estimation unit 13 aligns the reference image Ir1 and the target image Ic13 when the target image Ic13 is close to the past reference image Ir1 at the image center C1. Do. Thereby, the link Re14 is extended between the reference image Ir1 and the target image Ic13. That is, the reference image Ir1 and the reference image Ir12 can be aligned using the target image Ic13. As described above, by achieving the alignment between the reference images Ir using the target image Ic, it is possible to position the reference images Ir that originally have little overlap.

また、一実施形態では、推定部13は、全体位置の調整をする機能を有していてもよい。全体位置の調整とは、描画対象の画像(出力用画像バッファに書き出される画像)の全体の位置関係を調整することである。例えば、基準画像Ir間で新たなリンクが張られたタイミングや、複数画像の動きの同時推定を実行することにより、複数の過去の変換行列が更新されたタイミングで、全ての描画対象画像の全体位置が微調整される。すなわち、全ての描画対象画像の変換行列Rが再演算される。全体位置は、マッチング部12により出力された特徴点を用いるのではなく、位置合わせされた結果を元に画像から画像間の対応点をランダムに抽出又は所定位置から抽出し、抽出された点の位置情報に基づいて全体の位置合わせを行う。この場合、過去の特徴点のペアを保持する必要がないため、メモリ使用量を削減することができる。   Moreover, in one embodiment, the estimation part 13 may have the function to adjust the whole position. The adjustment of the overall position is to adjust the overall positional relationship of the drawing target image (the image written in the output image buffer). For example, the entire drawing target image is updated at a timing when a new link is established between the reference images Ir or when a plurality of past transformation matrices are updated by executing simultaneous estimation of movements of a plurality of images. The position is finely adjusted. That is, the conversion matrix R of all drawing target images is recalculated. The overall position does not use the feature points output by the matching unit 12, but randomly extracts corresponding points between images based on the result of the alignment or extracts from a predetermined position. The entire alignment is performed based on the position information. In this case, since it is not necessary to hold a pair of past feature points, the memory usage can be reduced.

次に、案内部15について説明する。案内部15は、ユーザ操作を案内する機能を有している。案内部15は、画像を表示する表示部21に接続され、ユーザのカメラ操作を誘導する案内表示を表示部21に表示させる。例えば、案内部15は、相対位置を決定済みの基準画像Irと対象画像Icとのペアのうち今回の基準画像Irとのホップ数が所定値以上でかつ今回の基準画像Irと重ならない第1画像が存在する場合には、現在の撮像位置から第1画像の画像位置へ撮像位置を誘導する案内表示を表示部へ表示させる。例えば、案内部15は、図13の(A)に示すように、画像中心C0の画像(第1画像)と、画像中心C8の現在の基準画像との間のホップ数(リンクReの数)をカウントする。そして、案内部15は、画像中心C0の画像と画像中心C8の現在の基準画像との間の距離を算出する。そして、案内部15は、カウント数が所定値以上であって、距離が所定値より小さい場合(例えば重ならない場合)には、画像が直列で長く繋がっていると判断する。直列で長く画像が繋がる場合には、誤差が蓄積されやすい。このため、案内部15は、図13の(B)に示すように、カメラ20の撮像位置が画像中心C0の画像(第1画像)の方に向くように案内表示Gaを表示する。案内表示Gaは、枠、矢印又はアイコン等が用いられ、音声を付与してもよい。ユーザが案内表示Gaに案内されてカメラ20の撮像方向を変えることで、図13の(C)に示すように、画像中心C0の画像と画像中心C8の画像との間にリンクを形成して位置調整することができる。このように、案内部15は、ユーザを案内することで誤差の蓄積を回避する。   Next, the guide unit 15 will be described. The guide unit 15 has a function of guiding user operations. The guide unit 15 is connected to a display unit 21 that displays an image, and causes the display unit 21 to display a guide display that guides the user's camera operation. For example, the guide unit 15 has a first hop count that is greater than or equal to a predetermined value and does not overlap with the current reference image Ir in the pair of the reference image Ir and the target image Ic whose relative positions have been determined. If an image exists, a guidance display for guiding the imaging position from the current imaging position to the image position of the first image is displayed on the display unit. For example, as illustrated in FIG. 13A, the guide unit 15 determines the number of hops (the number of links Re) between the image at the image center C0 (first image) and the current reference image at the image center C8. Count. Then, the guide unit 15 calculates the distance between the image at the image center C0 and the current reference image at the image center C8. Then, the guide unit 15 determines that the images are long in series when the count number is equal to or greater than the predetermined value and the distance is smaller than the predetermined value (for example, when they do not overlap). If images are long and connected in series, errors are likely to accumulate. Therefore, as shown in FIG. 13B, the guide unit 15 displays the guidance display Ga so that the imaging position of the camera 20 is directed toward the image (first image) at the image center C0. As the guidance display Ga, a frame, an arrow, an icon, or the like is used, and a voice may be given. When the user is guided by the guidance display Ga and changes the imaging direction of the camera 20, a link is formed between the image at the image center C0 and the image at the image center C8, as shown in FIG. The position can be adjusted. Thus, the guide unit 15 avoids accumulation of errors by guiding the user.

次に、合成部14について説明する。合成部14は、表示部21に接続されており、合成画像を表示部21に描画する機能を有する。合成部14は、推定部13によって推定された変換行列によって三次元空間の球面上で位置合わせした画像群(描画対象の画像)を二次元平面に投影する。球面から平面への投影の際に、例えば図4に示す画像変形がなされる。そして、描画対象の画像を一枚の合成画像として出力画像用バッファへ記録する。例えば図14に示すように、合成平面Spが格子状に分割されているとする。合成部14は、合成平面Spへ投影された画像Idに四隅が含まれるセルのみを描画する。また、合成部14は、画像間の境目ではブレンド比等を調整する。このようにして、複数の描画対象の画像Idを合成平面Spへ投影し、合成画像を生成する。   Next, the synthesis unit 14 will be described. The composition unit 14 is connected to the display unit 21 and has a function of drawing a composite image on the display unit 21. The synthesizing unit 14 projects an image group (image to be drawn) aligned on the spherical surface in the three-dimensional space by the transformation matrix estimated by the estimating unit 13 onto a two-dimensional plane. At the time of projection from a spherical surface to a plane, for example, image deformation shown in FIG. 4 is performed. Then, the drawing target image is recorded in the output image buffer as a single composite image. For example, as shown in FIG. 14, it is assumed that the composite plane Sp is divided into a lattice pattern. The synthesizing unit 14 draws only the cells whose four corners are included in the image Id projected onto the synthesis plane Sp. The synthesizing unit 14 adjusts the blend ratio and the like at the boundary between images. In this way, a plurality of drawing target images Id are projected onto the synthesis plane Sp to generate a synthesized image.

次に、本実施形態に係る画像処理装置1の動作について説明する。図15,図16は、本実施形態に係る画像処理装置1の動作を示すフローチャートである。図15,図16に示す制御処理は、例えば携帯端末2の撮像機能をONしたタイミングで実行され、所定の周期で繰り返し実行される。なお、説明理解の容易性を考慮して、対象画像Icは2番目以降の入力画像であるとする。   Next, the operation of the image processing apparatus 1 according to this embodiment will be described. 15 and 16 are flowcharts showing the operation of the image processing apparatus 1 according to this embodiment. The control processing shown in FIGS. 15 and 16 is executed, for example, at the timing when the imaging function of the mobile terminal 2 is turned on, and is repeatedly executed at a predetermined cycle. Note that the target image Ic is assumed to be the second and subsequent input images in consideration of ease of understanding.

図15に示すように、最初に画像処理装置1が画像入力処理を実行する(S10:入力ステップ)。S10の処理では、入力部10が、カメラ20から対象画像Icを入力する。S10の処理が終了すると、位置合わせ処理へ移行する(S12)。   As shown in FIG. 15, first, the image processing apparatus 1 executes an image input process (S10: input step). In the process of S <b> 10, the input unit 10 inputs the target image Ic from the camera 20. When the process of S10 ends, the process proceeds to the alignment process (S12).

S12の処理では、選択部11、マッチング部12及び推定部13が、基準画像Irと対象画像Icとの相対的な位置合わせを行う。この処理の詳細は図16となる。まず、選択部11が入力済画像から基準画像Irを選択する(S30:選択ステップ)。次に、マッチング部12及び推定部13が基準画像Irと対象画像Icとの位置合わせを行う(S32:マッチングステップ及び推定ステップ)。次に、推定部13は、過去(又は他の)の基準画像Irと対象画像Icとが比較できるか否かを判定する(S34)。S34の処理において、推定部13が比較可能であると判断した場合には、過去の基準画像Irと対象画像Icとの位置合わせを行う(S36、例えば図12の(B))。そして、推定部13は、全体位置の調整のために、再描画フラグを1にセットする(S38)。その後、選択部11は、対象画像Icと過去の基準画像Irとの距離が所定値以上であるか否かを判断する(S40)。S40の処理において、選択部11により距離が所定値以上であると判定された場合には、対象画像Icを次回以降の基準画像Irにすべく基準画像リストへ記録する(S42)。基準画像リストとは、基準画像の特徴点の画素値及び座標を記録したデータを参照するためのリストである。S42の処理が終了すると、図16に示す位置合わせ処理を終了する。   In the process of S12, the selection unit 11, the matching unit 12, and the estimation unit 13 perform relative alignment between the reference image Ir and the target image Ic. Details of this processing are shown in FIG. First, the selection unit 11 selects the reference image Ir from the input image (S30: selection step). Next, the matching unit 12 and the estimation unit 13 align the reference image Ir and the target image Ic (S32: matching step and estimation step). Next, the estimation unit 13 determines whether or not the past (or other) reference image Ir and the target image Ic can be compared (S34). In the process of S34, when the estimation unit 13 determines that the comparison is possible, the past reference image Ir and the target image Ic are aligned (S36, for example, FIG. 12B). Then, the estimation unit 13 sets a redraw flag to 1 for adjusting the overall position (S38). Thereafter, the selection unit 11 determines whether or not the distance between the target image Ic and the past reference image Ir is a predetermined value or more (S40). In the process of S40, when the selection unit 11 determines that the distance is greater than or equal to the predetermined value, the target image Ic is recorded in the reference image list to be the next reference image Ir (S42). The reference image list is a list for referring to data in which pixel values and coordinates of feature points of the reference image are recorded. When the process of S42 ends, the alignment process shown in FIG. 16 ends.

一方、S34の処理において、推定部13が比較可能でないと判断した場合には、対象画像Icと過去の基準画像Irとの距離を判断する処理へ移行する(S40)。一方、S40の処理において、選択部11により距離が所定値以上でないと判定された場合には、図16に示す位置合わせ処理を終了する。   On the other hand, when the estimation unit 13 determines in the process of S34 that the comparison is not possible, the process proceeds to a process of determining the distance between the target image Ic and the past reference image Ir (S40). On the other hand, in the process of S40, when the selection unit 11 determines that the distance is not greater than or equal to the predetermined value, the alignment process illustrated in FIG.

図15に戻り、S12の処理が終了すると判定処理へ移行する(S14)。   Returning to FIG. 15, when the process of S12 is completed, the process proceeds to a determination process (S14).

S14の処理では、合成部14が、S10の処理で入力した対象画像Icを描画用画像として追加するか否かを判定する。例えば、合成部14は、描画すべき画像の画像情報を参照可能とする描画用画像リストを参照可能に構成されており、該リストに記載されている画像のうち最も位置が近い画像との距離が所定値以上である場合には、S10の処理で入力した対象画像Icを描画用画像に追加する。S14の処理において、追加と判断した場合には、保存処理へ移行する(S16)。   In the process of S14, the synthesizing unit 14 determines whether or not to add the target image Ic input in the process of S10 as a drawing image. For example, the synthesizing unit 14 is configured to be able to refer to a drawing image list that can refer to image information of an image to be drawn, and the distance from the closest image among the images described in the list Is equal to or greater than the predetermined value, the target image Ic input in the process of S10 is added to the drawing image. If it is determined in the process of S14 that it is added, the process proceeds to a storage process (S16).

S16の処理では、合成部14が、描画用リストに該対象画像Icを追加し、対象画像Icを保存する。S16の処理が終了すると、再描画判定処理へ移行する(S18)。   In the process of S16, the synthesizing unit 14 adds the target image Ic to the drawing list and stores the target image Ic. When the process of S16 ends, the process proceeds to a redraw determination process (S18).

S18の処理では、推定部13が、再描画フラグ=0であるか否かを判定する。S18の処理において、再描画フラグ=1である場合には、描画位置の再計算処理へ移行する(S20)。   In the process of S18, the estimation unit 13 determines whether or not the redraw flag = 0. In the process of S18, when the redrawing flag = 1, the process proceeds to the drawing position recalculation process (S20).

S20の処理では、推定部13が、全体位置合わせの処理を行う。推定部13は、更新された変換行列を用いて全ての描画用画像の位置を調整する。S20の処理が終了すると、プレビュー画像描画処理へ移行する(S22)。   In the process of S20, the estimation unit 13 performs an overall alignment process. The estimation unit 13 adjusts the positions of all the drawing images using the updated conversion matrix. When the process of S20 ends, the process proceeds to a preview image drawing process (S22).

S22の処理では、合成部14が、例えば描画用画像リストから描画すべき画像を特定し、三次元空間の球面から二次元平面に投影してプレビュー用の合成画像を生成する(S22:合成ステップ)。その後、プレビュー用の画像が出力され、表示部21等に表示される(S24)。S24の処理が終了すると、画像入力の判定処理へ移行する(S26)。   In the process of S22, the synthesizing unit 14 specifies an image to be drawn from, for example, the drawing image list, and generates a preview synthesized image by projecting from the spherical surface of the three-dimensional space onto the two-dimensional plane (S22: synthesizing step). ). Thereafter, a preview image is output and displayed on the display unit 21 or the like (S24). When the processing of S24 is completed, the routine proceeds to image input determination processing (S26).

一方、S14の処理において、合成部14が追加と判断しない場合には、再描画判定処理へ移行する(S18)。また、S18の処理において、再描画フラグ=0である場合には、プレビュー画像描画処理へ移行する(S22)。   On the other hand, in the process of S14, when the synthesizing unit 14 does not determine addition, the process proceeds to a redraw determination process (S18). In the process of S18, when the redrawing flag = 0, the process proceeds to the preview image drawing process (S22).

S26の処理では、入力部10が、対象画像Icの入力が終了したか否かを判定する。S26の処理において、対象画像Icの入力が終了していない場合には、S10の処理へ再度移行する。一方、対象画像Icの入力が終了した場合には、結果画像出力処理へ移行する(S28)。   In the process of S26, the input unit 10 determines whether or not the input of the target image Ic has been completed. If the input of the target image Ic is not completed in the process of S26, the process proceeds to S10 again. On the other hand, when the input of the target image Ic is completed, the process proceeds to a result image output process (S28).

S28の処理では、合成部14が合成画像を表示部21等に表示する。以上で図15,16に示す制御処理を終了する。図15,16に示す制御処理を実行することで、誤差の蓄積を回避して良質なパノラマ合成画像を得ることができる。   In the process of S28, the synthesis unit 14 displays the synthesized image on the display unit 21 or the like. Thus, the control process shown in FIGS. 15 and 16 is completed. By executing the control processing shown in FIGS. 15 and 16, it is possible to avoid accumulation of errors and obtain a high-quality panoramic composite image.

次に、携帯端末(コンピュータ)2を上記画像処理装置1として機能させるための画像処理プログラムを説明する。   Next, an image processing program for causing the portable terminal (computer) 2 to function as the image processing apparatus 1 will be described.

画像処理プログラムは、メインモジュール、入力モジュール及び演算処理モジュールを備えている。メインモジュールは、画像処理を統括的に制御する部分である。入力モジュールは、入力画像を取得するように携帯端末2を動作させる。演算処理モジュールは、選択モジュール、マッチングモジュール、推定モジュール、合成モジュール及び案内モジュールを備えている。メインモジュール、入力モジュール及び演算処理モジュールを実行させることにより実現される機能は、上述した画像処理装置1の入力部10、選択部11、マッチング部12、推定部13、合成部14及び案内部15の機能とそれぞれ同様である。   The image processing program includes a main module, an input module, and an arithmetic processing module. The main module is a part that comprehensively controls image processing. The input module operates the mobile terminal 2 so as to acquire an input image. The arithmetic processing module includes a selection module, a matching module, an estimation module, a synthesis module, and a guidance module. Functions realized by executing the main module, the input module, and the arithmetic processing module are the input unit 10, the selection unit 11, the matching unit 12, the estimation unit 13, the synthesis unit 14, and the guide unit 15 of the image processing apparatus 1 described above. These functions are the same.

画像処理プログラムは、例えば、ROM等の記録媒体または半導体メモリによって提供される。また、画像処理プログラムは、データ信号としてネットワークを介して提供されてもよい。   The image processing program is provided by a recording medium such as a ROM or a semiconductor memory, for example. The image processing program may be provided as a data signal via a network.

以上、本実施形態に係る画像処理装置1、画像処理方法及び画像処理プログラムによれば、基準画像Irと対象画像Icとの間の動きがカメラ20の回転運動のみに起因するとして両画像の座標系を対応させる変換行列Rを推定する。このため、変換行列Rには、拡大・縮小・平行移動等のパラメータが含まれないことになるので、入力された対象画像Icが縮小等されて誤差が生じることを回避することができる。さらに、回転成分のみに限定することで、縮小等された対象画像Icを次回以降の基準画像Irとすることを回避することが可能であるため、誤差の蓄積を回避することができる。よって、入力された画像を順次つなぎ合わせる際に、撮像方位の異なる画像が含まれていた場合であっても、誤差の蓄積を抑制し、良質なパノラマ画像を得ることが可能となる。   As described above, according to the image processing device 1, the image processing method, and the image processing program according to the present embodiment, it is assumed that the movement between the reference image Ir and the target image Ic is caused only by the rotational movement of the camera 20. A transformation matrix R to which the system is associated is estimated. For this reason, the transformation matrix R does not include parameters such as enlargement, reduction, and parallel movement, so that it is possible to avoid the occurrence of an error due to the input target image Ic being reduced. Furthermore, by limiting to only the rotation component, it is possible to avoid the target image Ic that has been reduced or the like as the reference image Ir for the next and subsequent times, so that accumulation of errors can be avoided. Therefore, even when the input images are sequentially stitched together, even if images with different imaging orientations are included, accumulation of errors can be suppressed and a high-quality panoramic image can be obtained.

なお、上述した実施形態は本発明に係る画像処理装置の一例を示すものである。本発明に係る画像処理装置は、実施形態に係る画像処理装置1に限られるものではなく、各請求項に記載した要旨を変更しない範囲で、実施形態に係る画像処理装置を変形し、又は他のものに適用したものであってもよい。   The embodiment described above shows an example of the image processing apparatus according to the present invention. The image processing apparatus according to the present invention is not limited to the image processing apparatus 1 according to the embodiment, and the image processing apparatus according to the embodiment may be modified or otherwise changed without changing the gist described in each claim. It may be applied to the above.

例えば、上述した実施形態では、カメラ20が静止画像を連続撮像する例を説明したが、カメラ20は、動画を撮像するものであってもよい。この場合、入力部10は、撮像された動画から連続する画像を抽出する機能を有していてもよい。また、入力部10が入力する画像は、別の機器からネットワークを介して送信された画像であってもよい。   For example, in the above-described embodiment, an example in which the camera 20 continuously captures still images has been described, but the camera 20 may capture a moving image. In this case, the input unit 10 may have a function of extracting continuous images from the captured moving image. The image input by the input unit 10 may be an image transmitted from another device via a network.

また、上述した実施形態では、カメラ20により撮像された画像の大きさは同一であるとして説明したが、撮像された画像の大きさは撮像の度に異なる大きさであってもよい。   In the above-described embodiment, the size of the image captured by the camera 20 is described as being the same. However, the size of the captured image may be different for each imaging.

また、上述した実施形態では、入力部10、選択部11、マッチング部12、推定部13、合成部14及び案内部15を備える場合を説明したが、要求される性能に応じて適宜変更してもよい。例えば、必要に応じて案内部15は備えなくてもよい。   In the above-described embodiment, the case where the input unit 10, the selection unit 11, the matching unit 12, the estimation unit 13, the synthesis unit 14, and the guide unit 15 are provided has been described. Also good. For example, the guide unit 15 may not be provided as necessary.

さらに、上述した実施形態では、画像を図5に示す8自由度で変形する場合を説明したが、8自由度に限られるものではなく、例えば図5中の(A)〜(F)に示す6自由度であってもよい。   Furthermore, in the above-described embodiment, the case where the image is deformed with 8 degrees of freedom shown in FIG. 5 has been described. However, the image is not limited to 8 degrees of freedom. For example, as shown in FIGS. It may be 6 degrees of freedom.

1…画像処理装置、10…入力部、11…選択部、12…マッチング部、13…推定部、14…合成部、15…案内部、20…カメラ、21…表示部。   DESCRIPTION OF SYMBOLS 1 ... Image processing apparatus, 10 ... Input part, 11 ... Selection part, 12 ... Matching part, 13 ... Estimation part, 14 ... Composition part, 15 ... Guide part, 20 ... Camera, 21 ... Display part.

次に、案内部15について説明する。案内部15は、ユーザ操作を案内する機能を有している。案内部15は、画像を表示する表示部21に接続され、ユーザのカメラ操作を誘導する案内表示を表示部21に表示させる。例えば、案内部15は、相対位置を決定済みの基準画像Irと対象画像Icとのペアのうち今回の基準画像Irとのホップ数が所定値以上でかつ今回の基準画像Irと重ならない第1画像が存在する場合には、現在の撮像位置から第1画像の画像位置へ撮像位置を誘導する案内表示を表示部へ表示させる。例えば、案内部15は、図13の(A)に示すように、画像中心C0の画像(第1画像)と、画像中心C8の現在の基準画像との間のホップ数(リンクReの数)をカウントする。そして、案内部15は、画像中心C0の画像と画像中心C8の現在の基準画像との間の距離を算出する。そして、案内部15は、カウント数が所定値以上であって、距離が所定値より小さい場合(且つ、重ならない場合)には、画像が直列で長く繋がっていると判断する。直列で長く画像が繋がる場合には、誤差が蓄積されやすい。このため、案内部15は、図13の(B)に示すように、カメラ20の撮像位置が画像中心C0の画像(第1画像)の方に向くように案内表示Gaを表示する。案内表示Gaは、枠、矢印又はアイコン等が用いられ、音声を付与してもよい。ユーザが案内表示Gaに案内されてカメラ20の撮像方向を変えることで、図13の(C)に示すように、画像中心C0の画像と画像中心C8の画像との間にリンクを形成して位置調整することができる。このように、案内部15は、ユーザを案内することで誤差の蓄積を回避する。
Next, the guide unit 15 will be described. The guide unit 15 has a function of guiding user operations. The guide unit 15 is connected to a display unit 21 that displays an image, and causes the display unit 21 to display a guide display that guides the user's camera operation. For example, the guide unit 15 has a first hop count that is greater than or equal to a predetermined value and does not overlap with the current reference image Ir in the pair of the reference image Ir and the target image Ic whose relative positions have been determined. If an image exists, a guidance display for guiding the imaging position from the current imaging position to the image position of the first image is displayed on the display unit. For example, as illustrated in FIG. 13A, the guide unit 15 determines the number of hops (the number of links Re) between the image at the image center C0 (first image) and the current reference image at the image center C8. Count. Then, the guide unit 15 calculates the distance between the image at the image center C0 and the current reference image at the image center C8. Then, when the count number is equal to or greater than the predetermined value and the distance is smaller than the predetermined value ( and does not overlap), the guide unit 15 determines that the images are long and connected in series. If images are long and connected in series, errors are likely to accumulate. Therefore, as shown in FIG. 13B, the guide unit 15 displays the guidance display Ga so that the imaging position of the camera 20 is directed toward the image (first image) at the image center C0. As the guidance display Ga, a frame, an arrow, an icon, or the like is used, and a voice may be given. When the user is guided by the guidance display Ga and changes the imaging direction of the camera 20, a link is formed between the image at the image center C0 and the image at the image center C8, as shown in FIG. The position can be adjusted. Thus, the guide unit 15 avoids accumulation of errors by guiding the user.

Claims (13)

撮像素子によって撮像された画像を順次入力し、入力の度につなぎ合わせて合成画像を生成する画像処理装置であって、
前記画像を順次入力する入力部と、
前記入力部によって新たに入力された処理対象の画像である対象画像よりも前に前記入力部によって入力された1又は複数の画像からなる入力済画像の中から基準画像を選択する選択部と、
前記基準画像の特徴点と前記対象画像の特徴点との対応関係を算出するマッチング部と、
前記基準画像と前記対象画像との間の動きが前記撮像素子の回転運動のみであるとして、前記マッチング部によって前記対応関係が算出された前記特徴点のペアの位置情報を用いて前記基準画像の座標系と前記対象画像の座標系とを対応させる変換式を推定する推定部と、
前記変換式に基づいて、前記基準画像と前記対象画像とを繋ぎ合わせて前記合成画像を生成する合成部と、
を備える画像処理装置。
An image processing apparatus that sequentially inputs images picked up by an image pickup device and generates a composite image by stitching each time an input is performed,
An input unit for sequentially inputting the images;
A selection unit that selects a reference image from input images including one or a plurality of images input by the input unit before a target image that is a processing target image newly input by the input unit;
A matching unit that calculates a correspondence relationship between the feature points of the reference image and the feature points of the target image;
Assuming that the movement between the reference image and the target image is only the rotational movement of the imaging device, the position information of the reference image is calculated using the position information of the feature point pair for which the correspondence is calculated by the matching unit. An estimation unit that estimates a conversion formula that associates the coordinate system with the coordinate system of the target image;
Based on the conversion formula, a combining unit that connects the reference image and the target image to generate the combined image;
An image processing apparatus comprising:
前記推定部は、前記撮像素子の位置を原点とした三次元座標系の各軸の回転成分のみからなる変換式を推定する請求項1に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the estimation unit estimates a conversion equation including only rotational components of each axis of a three-dimensional coordinate system with the position of the image sensor as an origin. 前記推定部は、前記変換式を用いて変換された前記特徴点のペアのそれぞれの位置情報の差分を含む目的関数を用意し、最適化手法を用いて前記目的関数が最小値となるように収束演算することで前記変換式を推定する請求項1又は2に記載の画像処理装置。   The estimation unit prepares an objective function including a difference in position information of each pair of feature points converted using the conversion formula, and uses an optimization method so that the objective function becomes a minimum value. The image processing apparatus according to claim 1, wherein the conversion formula is estimated by performing a convergence calculation. 前記推定部は、前記対象画像よりも前に前記入力部によって入力された画像が複数存在する場合には、収束演算の初期値として、前記対象画像の直前に前記入力部によって入力された画像の前記変換式を採用する請求項3に記載の画像処理装置。   When there are a plurality of images input by the input unit before the target image, the estimation unit sets an initial value of the convergence calculation as an initial value of the image input by the input unit. The image processing apparatus according to claim 3, wherein the conversion formula is adopted. 前記推定部は、前記マッチング部によって前記対応関係が算出された前記特徴点のペアを球面に投影し、投影後の前記特徴点のペアの位置情報を用いて前記基準画像の座標系と前記対象画像の座標系とを対応させる変換式を推定する請求項3に記載の画像処理装置。   The estimation unit projects the feature point pair whose correspondence relationship has been calculated by the matching unit onto a spherical surface, and uses the positional information of the feature point pair after the projection, and the coordinate system of the reference image and the target The image processing apparatus according to claim 3, wherein a conversion formula that correlates with an image coordinate system is estimated. 前記推定部は、前記対象画像よりも前に前記入力部によって入力された画像が複数存在し、かつ、前記対象画像よりも前に前記入力部によって入力された画像の中の少なくとも1つが前記基準画像及び前記対象画像と重なる場合には、前記基準画像、前記基準画像に重なる画像及び前記対象画像のそれぞれの特徴点のペアを用いて、前記基準画像の座標系と前記基準画像に重なる画像の座標系とを対応させる変換式、及び、前記基準画像の座標系と前記対象画像の座標系とを対応させる変換式を、互いに関連づけて推定する請求項1〜5の何れか一項に記載の画像処理装置。   The estimation unit includes a plurality of images input by the input unit before the target image, and at least one of the images input by the input unit before the target image is the reference In the case of overlapping the image and the target image, a pair of feature points of the reference image, the image overlapping the reference image, and the target image are used, and a coordinate system of the reference image and an image overlapping the reference image 6. The conversion formula for associating a coordinate system and the conversion formula for associating the coordinate system of the reference image with the coordinate system of the target image are estimated in association with each other. Image processing device. 前記選択部は、前記基準画像と前記対象画像との距離が所定値以上である場合には、当該対象画像を前記入力部によって次回以降新たに入力される処理対象の画像である対象画像の前記基準画像として選択する請求項1〜6の何れか一項に記載の画像処理装置。   When the distance between the reference image and the target image is equal to or greater than a predetermined value, the selection unit selects the target image that is a processing target image newly input from the next time on by the input unit. The image processing apparatus according to claim 1, which is selected as a reference image. 前記選択部は、前記対象画像と前記基準画像との距離よりも前記対象画像と過去の前記基準画像との距離の方が小さい場合には、過去の基準画像を次回以降新たに入力される処理対象の画像である対象画像の前記基準画像として選択する請求項7に記載の画像処理装置。   When the distance between the target image and the past reference image is smaller than the distance between the target image and the reference image, the selection unit newly inputs a past reference image after the next time. The image processing apparatus according to claim 7, wherein the image is selected as the reference image of a target image that is a target image. 前記マッチング部は、前記対象画像と過去の前記基準画像との距離が所定値以下の場合には、過去の前記基準画像の特徴点と前記対象画像の特徴点との対応関係をさらに算出し、
前記推定部は、過去の前記基準画像と前記対象画像との前記特徴点のペアの位置情報を用いて、過去の前記基準画像の座標系と前記対象画像の座標系とを対応させる変換式をさらに推定し、
前記基準画像の座標系と前記対象画像の座標系とを対応させる変換式、過去の前記基準画像の座標系と前記対象画像の座標系とを対応させる変換式を用いて、前記基準画像と過去の前記基準画像とを対応させる請求項8に記載の画像処理装置。
When the distance between the target image and the past reference image is a predetermined value or less, the matching unit further calculates a correspondence relationship between the feature point of the past reference image and the feature point of the target image,
The estimation unit uses a positional information of the pair of feature points of the past reference image and the target image, and uses a conversion formula that associates the coordinate system of the past reference image with the coordinate system of the target image. Further estimate,
Using the conversion equation that associates the coordinate system of the reference image with the coordinate system of the target image, and the conversion equation that associates the coordinate system of the past reference image with the coordinate system of the target image, The image processing apparatus according to claim 8, wherein the reference image is associated with each other.
画像を表示する表示部に接続され、ユーザのカメラ操作を誘導する案内表示を前記表示部に表示させる案内部をさらに備え、
前記推定部は、前記変換式を推定した前記基準画像と前記対象画像とをリンクさせ、相対位置を決定済みのペアであるとして記録し、
前記合成部は、前記合成画像を前記表示部へ出力し、
前記案内部は、前記相対位置を決定済みのペアのうち今回の前記基準画像とのホップ数が所定値以上でかつ今回の前記基準画像と重ならない第1画像が存在する場合には、現在の撮像位置から前記第1画像の画像位置へ撮像位置を誘導する前記案内表示を前記表示部へ表示させる請求項1〜9の何れか一項に記載の画像処理装置。
A guidance unit that is connected to a display unit that displays an image and that displays a guidance display for guiding a user's camera operation on the display unit;
The estimation unit links the reference image that has estimated the conversion formula and the target image, and records the relative position as a determined pair,
The combining unit outputs the combined image to the display unit,
In the case where there is a first image in which the number of hops with the current reference image is equal to or greater than a predetermined value and the current reference image does not overlap with the current reference image among the pair whose relative position has been determined, The image processing apparatus according to claim 1, wherein the guidance display that guides the imaging position from the imaging position to the image position of the first image is displayed on the display unit.
撮像素子によって撮像された画像を順次入力し、入力の度につなぎ合わせて合成画像を生成する画像処理方法であって、
前記画像を順次入力する入力ステップと、
前記入力ステップによって新たに入力された処理対象の画像である対象画像よりも前に前記入力ステップによって入力された1又は複数の画像からなる入力済画像の中から基準画像を選択する選択ステップと、
前記基準画像の特徴点と前記対象画像の特徴点との対応関係を算出するマッチングステップと、
前記基準画像と前記対象画像との間の動きが前記撮像素子の回転運動のみであるとして、前記マッチングステップによって前記対応関係が算出された前記特徴点のペアの位置情報を用いて前記基準画像の座標系と前記対象画像の座標系とを対応させる変換式を推定する推定ステップと、
前記変換式に基づいて、前記基準画像と前記対象画像とを繋ぎ合わせて前記合成画像を生成する合成ステップと、
を備える画像処理方法。
An image processing method for sequentially inputting images picked up by an image pickup device and connecting them at each input to generate a composite image,
An input step for sequentially inputting the images;
A selection step of selecting a reference image from input images composed of one or a plurality of images input by the input step before a target image that is a processing target image newly input by the input step;
A matching step for calculating a correspondence relationship between the feature points of the reference image and the feature points of the target image;
Assuming that the movement between the reference image and the target image is only the rotational movement of the image sensor, the positional information of the reference image is obtained using the position information of the feature point pair whose correspondence is calculated by the matching step. An estimation step for estimating a conversion formula that associates the coordinate system with the coordinate system of the target image;
Based on the conversion formula, a combining step of connecting the reference image and the target image to generate the combined image;
An image processing method comprising:
撮像素子によって撮像された画像を順次入力し、入力の度につなぎ合わせて合成画像を生成するようにコンピュータを機能させる画像処理プログラムであって、
前記コンピュータを、
前記画像を順次入力する入力部、
前記入力部によって新たに入力された処理対象の画像である対象画像よりも前に前記入力部によって入力された1又は複数の画像からなる入力済画像の中から基準画像を選択する選択部、
前記基準画像の特徴点と前記対象画像の特徴点との対応関係を算出するマッチング部、
前記基準画像と前記対象画像との間の動きが前記撮像素子の回転運動のみであるとして、前記マッチング部によって前記対応関係が算出された前記特徴点のペアの位置情報を用いて前記基準画像の座標系と前記対象画像の座標系とを対応させる変換式を推定する推定部、及び、
前記変換式に基づいて、前記基準画像と前記対象画像とを繋ぎ合わせて前記合成画像を生成する合成部として機能させる画像処理プログラム。
An image processing program for sequentially inputting images picked up by an image pickup device and causing a computer to function to generate a composite image by stitching each time an input is performed,
The computer,
An input unit for sequentially inputting the images;
A selection unit that selects a reference image from input images composed of one or a plurality of images input by the input unit before a target image that is a processing target image newly input by the input unit;
A matching unit that calculates the correspondence between the feature points of the reference image and the feature points of the target image;
Assuming that the movement between the reference image and the target image is only the rotational movement of the imaging device, the position information of the reference image is calculated using the position information of the feature point pair for which the correspondence is calculated by the matching unit. An estimation unit that estimates a conversion formula that associates the coordinate system with the coordinate system of the target image; and
An image processing program that functions as a combining unit that connects the reference image and the target image to generate the combined image based on the conversion formula.
撮像素子によって撮像された画像を順次入力し、入力の度につなぎ合わせて合成画像を生成するようにコンピュータを機能させる画像処理プログラムを記録したコンピュータ読取可能な記録媒体であって、
前記コンピュータを、
前記画像を順次入力する入力部、
前記入力部によって新たに入力された処理対象の画像である対象画像よりも前に前記入力部によって入力された1又は複数の画像からなる入力済画像の中から基準画像を選択する選択部、
前記基準画像の特徴点と前記対象画像の特徴点との対応関係を算出するマッチング部、
前記基準画像と前記対象画像との間の動きが前記撮像素子の回転運動のみであるとして、前記マッチング部によって前記対応関係が算出された前記特徴点のペアの位置情報を用いて前記基準画像の座標系と前記対象画像の座標系とを対応させる変換式を推定する推定部、及び、
前記変換式に基づいて、前記基準画像と前記対象画像とを繋ぎ合わせて前記合成画像を生成する合成部として機能させる前記画像処理プログラムを記録した記録媒体。
A computer-readable recording medium on which an image processing program for causing a computer to function so as to sequentially input images picked up by an image pickup device and connect them at each input to generate a composite image,
The computer,
An input unit for sequentially inputting the images;
A selection unit that selects a reference image from input images composed of one or a plurality of images input by the input unit before a target image that is a processing target image newly input by the input unit;
A matching unit that calculates the correspondence between the feature points of the reference image and the feature points of the target image;
Assuming that the movement between the reference image and the target image is only the rotational movement of the imaging device, the position information of the reference image is calculated using the position information of the feature point pair for which the correspondence is calculated by the matching unit. An estimation unit that estimates a conversion formula that associates the coordinate system with the coordinate system of the target image; and
A recording medium on which the image processing program for causing the reference image and the target image to be connected to generate a composite image based on the conversion formula is generated.
JP2014020497A 2014-02-05 2014-02-05 Image processing apparatus, image processing method, image processing program, and recording medium Active JP5687370B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2014020497A JP5687370B2 (en) 2014-02-05 2014-02-05 Image processing apparatus, image processing method, image processing program, and recording medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2014020497A JP5687370B2 (en) 2014-02-05 2014-02-05 Image processing apparatus, image processing method, image processing program, and recording medium

Related Parent Applications (1)

Application Number Title Priority Date Filing Date
JP2013513456A Division JP5493114B1 (en) 2012-10-24 2012-10-24 Image processing apparatus, image processing method, image processing program, and recording medium

Publications (2)

Publication Number Publication Date
JP2014086097A true JP2014086097A (en) 2014-05-12
JP5687370B2 JP5687370B2 (en) 2015-03-18

Family

ID=50789018

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2014020497A Active JP5687370B2 (en) 2014-02-05 2014-02-05 Image processing apparatus, image processing method, image processing program, and recording medium

Country Status (1)

Country Link
JP (1) JP5687370B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113222878A (en) * 2021-06-04 2021-08-06 杭州海康威视数字技术股份有限公司 Image splicing method

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN113222878A (en) * 2021-06-04 2021-08-06 杭州海康威视数字技术股份有限公司 Image splicing method
CN113222878B (en) * 2021-06-04 2023-09-05 杭州海康威视数字技术股份有限公司 Image stitching method

Also Published As

Publication number Publication date
JP5687370B2 (en) 2015-03-18

Similar Documents

Publication Publication Date Title
JP5493114B1 (en) Image processing apparatus, image processing method, image processing program, and recording medium
US10452945B2 (en) Image generating device, electronic device, image generating method and recording medium
JP4196216B2 (en) Image composition system, image composition method and program
JP6100089B2 (en) Image processing apparatus, image processing method, and program
JP4620607B2 (en) Image processing device
JP4941950B1 (en) Image processing apparatus, image processing method, and image processing program
US20090225174A1 (en) Image processing apparatus, image processing method, hand shake blur area estimation device, hand shake blur area estimation method, and program
JP5493112B2 (en) Image processing apparatus, image processing method, and image processing program
JP5022498B2 (en) Image processing apparatus, image processing method, and image processing program
JP5566199B2 (en) Image processing apparatus, control method therefor, and program
JP5687370B2 (en) Image processing apparatus, image processing method, image processing program, and recording medium
JP2007323616A (en) Image processor and processing method therefor
JP4930304B2 (en) Image processing apparatus, image processing method, program, and recording medium
US20200310128A1 (en) Image processing apparatus, head-mounted display, and image displaying method
JP4813263B2 (en) Image processing apparatus and processing method thereof
CN110692235B (en) Image processing apparatus, image processing program, and image processing method
JP2018031803A (en) Projector device
JP2013042213A (en) Image processing device, image processing method, and program
JP2013172316A (en) Image processor and image processing method

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20140205

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20140305

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20141126

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20150121

R150 Certificate of patent or registration of utility model

Ref document number: 5687370

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R150

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

R250 Receipt of annual fees

Free format text: JAPANESE INTERMEDIATE CODE: R250

S531 Written request for registration of change of domicile

Free format text: JAPANESE INTERMEDIATE CODE: R313531

R350 Written notification of registration of transfer

Free format text: JAPANESE INTERMEDIATE CODE: R350