JP2018174429A - Image processing apparatus, photographing apparatus, and image processing method - Google Patents
Image processing apparatus, photographing apparatus, and image processing method Download PDFInfo
- Publication number
- JP2018174429A JP2018174429A JP2017070889A JP2017070889A JP2018174429A JP 2018174429 A JP2018174429 A JP 2018174429A JP 2017070889 A JP2017070889 A JP 2017070889A JP 2017070889 A JP2017070889 A JP 2017070889A JP 2018174429 A JP2018174429 A JP 2018174429A
- Authority
- JP
- Japan
- Prior art keywords
- image
- distortion correction
- image data
- distortion
- parameter
- 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
Links
Landscapes
- Studio Devices (AREA)
- Stereoscopic And Panoramic Photography (AREA)
- Image Processing (AREA)
Abstract
【課題】全天球画像を作成する際に、2つの半球画像を繋ぎ合わせる処理が必要である。各半球画像は、約210°の画角の魚眼レンズを介して得られているため、従来、特殊なデジタルカメラは、各半球画像の繋ぎ目領域の画像を取り出して、歪み補正処理を行った後に、テンプレートマッチングを行なっていた。この技術による繋ぎ目処理としては、対応するそれぞれの領域を基準画像及び比較画像として切り出して、歪み補正後の画像に対して、テンプレートマッチングを行っている。しかし、画像解像度が高解像度化していく中で、基準画像及び比較画像も、高解像度化に合わせて大きく取得していく方法を採用すると、デジタルカメラ内の画像処理装置におけるメモリ帯域を切迫する。【解決手段】撮影装置1に画像処理装置10を組み立てる際に、テストパターンTP(TPa,TPb)を撮影して外部記憶装置50に記憶しておき、パターンマッチング処理に利用する。【選択図】図25PROBLEM TO BE SOLVED: To create a spherical image, a process of connecting two hemispherical images is required. Since each hemispherical image is obtained through a fisheye lens with an angle of view of about 210 °, conventionally, a special digital camera takes out an image of the joint region of each hemispherical image and performs distortion correction processing. , I was doing template matching. As the seam processing by this technique, each corresponding area is cut out as a reference image and a comparison image, and template matching is performed on the image after distortion correction. However, as the image resolution increases, if a method of acquiring a large reference image and a comparative image in accordance with the increase in resolution is adopted, the memory band in the image processing device in the digital camera becomes imminent. When an image processing device 10 is assembled in a photographing device 1, a test pattern TP (TPa, TPb) is photographed and stored in an external storage device 50 for use in pattern matching processing. [Selection diagram] FIG. 25
Description
本発明は、第1及び第2の画像データによって表現される複数の画像をつなぎ合わせる合成を行う発明に関する。 The present invention relates to an invention for performing composition by joining a plurality of images expressed by first and second image data.
近年、一度の撮影で、360°の全天球画像の元になる2つの半球画像データを得る特殊なデジタルカメラが提供されている(特許文献1参照)。この特殊なデジタルカメラは、2つの半球画像データに基づいて1つの正距円筒射影画像データを作成し、スマートフォン等の通信端末に正距円筒射影画像データを送信する。正距円筒射影画像データを得た通信端末は、正距円筒射影画像データに基づいて全天球画像を作成する。但し、そのままでは画像が湾曲して利用者が見えづらいため、通信端末に全天球画像の一部の所定領域を示す所定領域画像を表示させることで、利用者は一般のデジタルカメラで撮影された平面画像と同じ感覚で閲覧することができる。 In recent years, there has been provided a special digital camera that obtains two hemispherical image data based on a 360-degree spherical image by one shooting (see Patent Document 1). This special digital camera creates one equirectangular projection image data based on two hemispherical image data, and transmits the equirectangular projection image data to a communication terminal such as a smartphone. The communication terminal that has obtained the equirectangular projection image data creates an omnidirectional image based on the equirectangular projection image data. However, since the image is curved as it is, it is difficult for the user to see. Therefore, by displaying a predetermined area image indicating a predetermined area of the omnidirectional image on the communication terminal, the user is photographed with a general digital camera. Can be viewed with the same feeling as a flat image.
また、全天球画像を作成する際に、2つの半球画像を繋ぎ合わせる処理が必要である。各半球画像は、180°以上の画角の魚眼レンズを介して得られているため、従来、特殊なデジタルカメラは、360°の全天球画像を作成するためには、各半球画像の繋ぎ目領域の画像を取り出して、歪み補正処理を行った後に、テンプレートマッチングを実施する事で高画質化を実現している(特許文献2参照)。この技術による繋ぎ目処理としては、対応するそれぞれの領域を基準画像及び比較画像として切り出して、歪み補正後の画像に対して、テンプレートマッチングを行っている。 In addition, when creating an omnidirectional image, a process for joining two hemispherical images is required. Since each hemisphere image is obtained through a fisheye lens having an angle of view of 180 ° or more, a special digital camera has conventionally used a joint of each hemisphere image to create a 360 ° omnidirectional image. Image quality is improved by extracting a region image and performing distortion correction processing and then performing template matching (see Patent Document 2). As a joint process by this technique, corresponding regions are cut out as a reference image and a comparison image, and template matching is performed on the image after distortion correction.
しかし、画像解像度が高解像度化していく中で、基準画像及び比較画像も、高解像度化に合わせて大きく取得していく方法を採用すると、特殊なデジタルカメラ内の画像処理装置におけるメモリ帯域を切迫する事になるという課題が生じる。 However, as the image resolution becomes higher, if the method of acquiring the reference image and the comparative image greatly in accordance with the higher resolution is adopted, the memory bandwidth in the image processing device in the special digital camera is imminent. The problem that it will be done arises.
上記課題を解決するために、請求項1に係る発明は、第1及び第2の画像データによって表現される複数の画像を繋ぎ合わせる画像処理装置であって、前記第1及び第2の画像データに対し、画像の歪みを補正する処理をそれぞれ行う第1の歪み補正部と、前記第1の歪み補正部による処理が行われた前記第1の画像データに係る第1の画像と前記第1の歪み補正部による処理が行われた前記第2の画像データに係る第2の画像とを繋ぎ合わせる場合の重複領域において、前記第2の画像のうちの比較領域を示す比較画像に対して、前記第1の画像のうちの基準領域を示す基準画像をパターンマッチング処理するパターンマッチング部と、前記パターンマッチング部によるパターンマッチング処理により、前記重複領域のズレ量を算出するズレ量算出部と、前記ズレ量に応じて、前記第1の画像及び第2の画像のうちの少なくとも一方の歪みを補正するための歪み補正パラメータを作成するパラメータ作成部と、前記パラメータ作成部によって作成された前記歪み補正パラメータを用いて、前記第1及び第2の画像データのうちの少なくとも一方に対して画像の歪みを補正する処理を行う第2の歪み補正部と、を有し、前記ズレ量算出部は、少なくとも前記第1の画像及び前記第2の画像の前記重複領域において、前記パターンマッチング処理に利用するテストパターンを利用して前記パターンマッチングすることを特徴とする画像処理装置である。 In order to solve the above-mentioned problem, an invention according to claim 1 is an image processing apparatus for joining a plurality of images expressed by first and second image data, wherein the first and second image data are connected. On the other hand, a first distortion correction unit that performs a process of correcting image distortion, a first image related to the first image data subjected to the process by the first distortion correction unit, and the first In the overlapping region when the second image related to the second image data that has been processed by the distortion correction unit is connected, a comparison image indicating a comparison region of the second image, A pattern matching unit that performs a pattern matching process on a reference image that represents a reference area of the first image, and a pattern matching process that is performed by the pattern matching unit calculates a shift amount of the overlapping area. An amount calculation unit, a parameter creation unit that creates a distortion correction parameter for correcting distortion of at least one of the first image and the second image according to the amount of deviation, and the parameter creation unit A second distortion correction unit that performs processing for correcting image distortion for at least one of the first and second image data using the generated distortion correction parameter, and The shift amount calculation unit is an image processing apparatus that performs the pattern matching using a test pattern used for the pattern matching process in at least the overlapping region of the first image and the second image. is there.
本発明によれば、特殊なデジタルカメラ等の撮影装置内の画像処理装置におけるメモリ帯域を切迫する事を回避することができるという効果を奏する。 According to the present invention, it is possible to avoid imminent memory bandwidth in an image processing apparatus in a photographing apparatus such as a special digital camera.
以下、図面を用いて、本発明の実施形態について説明する。 Hereinafter, embodiments of the present invention will be described with reference to the drawings.
<<実施形態の概略>>
まずは、図1乃至図7を用いて、本実施形態の概略について説明する。
<< Summary of Embodiment >>
First, the outline of this embodiment will be described with reference to FIGS. 1 to 7.
まず、図1を用いて、撮影装置1の外観を説明する。撮影装置1は、全天球画像の元になる撮影画像を得るためのデジタルカメラである。なお、図1(a)は特殊撮影装置の右側面図であり、図1(b)は特殊撮影装置の背面図であり、図1(c)は特殊撮影装置の平面図であり、図1(d)は特殊撮影装置の底面図である。 First, the external appearance of the photographing apparatus 1 will be described with reference to FIG. The photographing apparatus 1 is a digital camera for obtaining a photographed image that is a source of the omnidirectional image. 1A is a right side view of the special photographing apparatus, FIG. 1B is a rear view of the special photographing apparatus, and FIG. 1C is a plan view of the special photographing apparatus. (D) is a bottom view of the special photographing apparatus.
図1(a),図1(b),図1(c),図(d)に示されているように、特殊撮影装置1aの上部には、正面側(前側)に魚眼型のレンズ102a及び背面側(後側)に魚眼型のレンズ102bが設けられている。特殊撮影装置1aの内部には、後述の撮像素子(画像センサ)103a,103bが設けられており、それぞれレンズ102a、102bを介して被写体や風景を撮影することで、半球画像(画角180°以上)を得ることができる。特殊撮影装置1aの正面側と反対側の面には、シャッターボタン115aが設けられている。また、特殊撮影装置1aの側面には、電源ボタン115b、WiFi(Wireless Fidelity)ボタン115c、及び撮影モード切替ボタン115dが設けられている。電源ボタン115b、及びWiFiボタン115cは、いずれも押下される度に、オンとオフが切り替えられる。また、撮影モード切替ボタン115dは、押下される度に、静止画の撮影モードと動画の撮影モードが切り替えられる。なお、シャッターボタン115a、電源ボタン115b、WiFiボタン115c、及び撮影モード切替ボタン115dは、操作部115の一種であり、操作部115は、これらのボタンに限られない。 As shown in FIGS. 1 (a), 1 (b), 1 (c), and (d), a fish-eye lens is placed on the front side (front side) of the special photographing apparatus 1a. A fisheye lens 102b is provided on the rear side (rear side) 102a. Imaging devices (image sensors) 103a and 103b, which will be described later, are provided inside the special imaging device 1a, and a hemispherical image (angle of view 180 °) is obtained by shooting a subject or a landscape through the lenses 102a and 102b, respectively. Above). A shutter button 115a is provided on the surface opposite to the front side of the special imaging device 1a. Further, a power button 115b, a WiFi (Wireless Fidelity) button 115c, and a shooting mode switching button 115d are provided on the side surface of the special imaging device 1a. Each time the power button 115b and the WiFi button 115c are pressed, they are switched on and off. The shooting mode switching button 115d switches between a still image shooting mode and a moving image shooting mode each time the button is pressed. The shutter button 115a, the power button 115b, the WiFi button 115c, and the shooting mode switching button 115d are a kind of the operation unit 115, and the operation unit 115 is not limited to these buttons.
また、特殊撮影装置1aの底部150の中央には、カメラ用三脚又は一般撮影装置3aに特殊撮影装置1aを取り付けるための三脚ねじ穴151が設けられている。また、底部150の左端側には、Micro USB(Universal Serial Bus)端子152が設けられている。底部150の右端側には、HDMI(High-Definition Multimedia Interface)端子が設けられている。なお、HDMIは登録商標である。 Further, a tripod screw hole 151 for attaching the special imaging device 1a to the camera tripod or the general imaging device 3a is provided at the center of the bottom 150 of the special imaging device 1a. A micro USB (Universal Serial Bus) terminal 152 is provided on the left end side of the bottom 150. On the right end side of the bottom 150, an HDMI (High-Definition Multimedia Interface) terminal is provided. HDMI is a registered trademark.
次に、図2を用いて、特殊撮影装置1aの使用状況を説明する。なお、図2は、特殊撮影装置の使用イメージ図である。特殊撮影装置1aは、図2に示されているように、例えば、利用者(撮影者)が手に持って利用者の周りの被写体を撮影するために用いられる。この場合、図1に示されている撮像素子103a及び撮像素子103bによって、それぞれ利用者の周りの被写体が撮像されることで、2つの半球画像を得ることができる。 Next, the use situation of the special imaging device 1a will be described with reference to FIG. In addition, FIG. 2 is a use image figure of a special imaging device. As shown in FIG. 2, the special imaging device 1 a is used, for example, for a user (photographer) to take a subject around the user while holding it in his hand. In this case, two hemispherical images can be obtained by imaging the subject around the user by the imaging device 103a and the imaging device 103b shown in FIG.
次に、図3及び図4を用いて、特殊撮影装置1aで撮影された画像から正距円筒射影画像EC及び全天球画像CEが作成されるまでの処理の概略を説明する。なお、図3(a)は特殊撮影装置1aで撮影された半球画像(前側)、図3(b)は特殊撮影装置で撮影された半球画像(後側)、図3(c)は正距円筒図法により表された画像(以下、「正距円筒射影画像」という)を示した図である。図4(a)は正距円筒射影画像で球を被う状態を示した概念図、図4(b)は全天球画像を示した図である。 Next, an outline of processing from the image captured by the special imaging device 1a to the creation of the equirectangular projection image EC and the omnidirectional image CE will be described with reference to FIGS. 3A is a hemispheric image (front side) photographed by the special photographing apparatus 1a, FIG. 3B is a hemispheric image photographed by the special photographing apparatus (rear side), and FIG. It is the figure which showed the image (henceforth "an equirectangular projection image") represented by the cylindrical projection. FIG. 4A is a conceptual diagram showing a state where a sphere is covered with an equirectangular projection image, and FIG. 4B is a diagram showing an omnidirectional image.
図3(a)に示されているように、撮像素子103aによって得られた画像は、後述の魚眼レンズ102aによって湾曲した半球画像(前側)となる。また、図3(b)に示されているように、撮像素子103bによって得られた画像は、後述の魚眼レンズ102bによって湾曲した半球画像(後側)となる。そして、半球画像(前側)と、180度反転された半球画像(後側)とは、特殊撮影装置1aによって合成され、図3(c)に示されているように、正距円筒射影画像ECが作成される。 As shown in FIG. 3A, the image obtained by the image sensor 103a is a hemispherical image (front side) curved by a fish-eye lens 102a described later. Also, as shown in FIG. 3B, the image obtained by the image sensor 103b is a hemispherical image (rear side) curved by a fish-eye lens 102b described later. Then, the hemispherical image (front side) and the hemispherical image inverted by 180 degrees (rear side) are synthesized by the special imaging device 1a, and as shown in FIG. 3C, the equirectangular projection image EC. Is created.
そして、OpenGL ES(Open Graphics Library for Embedded Systems)等が利用されることで、図4(a)に示されているように、正距円筒射影画像が球面を覆うように貼り付けられ、図4(b)に示されているような全天球画像CEが作成される。このように、全天球画像CEは、正距円筒射影画像ECが球の中心を向いた画像として表される。なお、OpenGL ESは、2D(2-Dimensions)および3D(3-Dimensions)のデータを視覚化するために使用するグラフィックスライブラリである。なお、全天球画像CEは、静止画であっても動画であってもよい。 Then, by using OpenGL ES (Open Graphics Library for Embedded Systems) or the like, the equirectangular projection image is pasted so as to cover the spherical surface as shown in FIG. An omnidirectional image CE as shown in (b) is created. In this way, the omnidirectional image CE is represented as an image in which the equirectangular projection image EC faces the center of the sphere. OpenGL ES is a graphics library used for visualizing 2D (2-Dimensions) and 3D (3-Dimensions) data. Note that the omnidirectional image CE may be a still image or a moving image.
以上のように、全天球画像CEは、球面を覆うように貼り付けられた画像であるため、人間が見ると違和感を持ってしまう。そこで、全天球画像CEの一部の所定領域(以下、「所定領域画像」という)を湾曲の少ない平面画像として表示することで、人間に違和感を与えない表示をすることができる。これに関して、図5及び図6を用いて説明する。 As described above, since the omnidirectional image CE is an image that is pasted so as to cover the spherical surface, it is uncomfortable when viewed by a human. Therefore, by displaying a predetermined area (hereinafter referred to as “predetermined area image”) of a part of the omnidirectional image CE as a flat image with little curvature, a display that does not give a sense of discomfort to humans can be achieved. This will be described with reference to FIGS.
なお、図5は、全天球画像を三次元の立体球とした場合の仮想カメラ及び所定領域の位置を示した図である。仮想カメラICは、三次元の立体球として表示されている全天球画像CEに対して、その画像を見るユーザの視点の位置に相当するものである。また、図6(a)は図5の立体斜視図、図6(b)はディスプレイに表示された場合の所定領域画像を表す図である。また、図6(a)では、図4に示されている全天球画像が、三次元の立体球CSで表わされている。このように生成された全天球画像CEが、立体球CSであるとすると、図5に示されているように、仮想カメラICが全天球画像CEの内部に位置している。全天球画像CEにおける所定領域Tは、仮想カメラICの撮影領域である。所定領域Tのズームは、画角αの範囲(円弧)を広げたり縮めたりすることで表現することができる。また、所定領域Tのズームは、仮想カメラICを全天球画像CEに近づいたり、遠ざけたりすることで表現することもできる。所定領域画像Qは、全天球画像CEにおける所定領域Tの画像である。したがって、所定領域Tは画角αと、仮想カメラICから全天球画像CEまでの距離fにより特定できる(図7参照)。 FIG. 5 is a diagram showing the positions of the virtual camera and the predetermined area when the omnidirectional image is a three-dimensional solid sphere. The virtual camera IC corresponds to the position of the viewpoint of the user who views the omnidirectional image CE displayed as a three-dimensional solid sphere. FIG. 6A is a three-dimensional perspective view of FIG. 5, and FIG. 6B is a diagram showing a predetermined area image when displayed on the display. In FIG. 6A, the omnidirectional image shown in FIG. 4 is represented by a three-dimensional solid sphere CS. Assuming that the omnidirectional image CE generated in this way is a three-dimensional sphere CS, the virtual camera IC is positioned inside the omnidirectional image CE as shown in FIG. The predetermined area T in the omnidirectional image CE is a shooting area of the virtual camera IC. The zoom of the predetermined region T can be expressed by expanding or contracting the range (arc) of the angle of view α. The zoom of the predetermined area T can also be expressed by moving the virtual camera IC closer to or away from the omnidirectional image CE. The predetermined area image Q is an image of the predetermined area T in the omnidirectional image CE. Therefore, the predetermined area T can be specified by the angle of view α and the distance f from the virtual camera IC to the omnidirectional image CE (see FIG. 7).
そして、図6(a)に示されている所定領域画像Qは、図6(b)に示されているように、所定のディスプレイに、仮想カメラICの撮影領域の画像として表示される。図6(b)に示されている画像は、初期設定(デフォルト)された所定領域情報によって表された所定領域画像である。なお、所定領域Tは、画角αと距離fではなく、所定領域Tである仮想カメラICの撮影領域(X,Y,Z)によって示してもよい。 Then, the predetermined area image Q shown in FIG. 6A is displayed on the predetermined display as an image of the photographing area of the virtual camera IC as shown in FIG. 6B. The image shown in FIG. 6B is a predetermined area image represented by the predetermined (default) predetermined area information. The predetermined area T may be indicated not by the angle of view α and the distance f but by the imaging area (X, Y, Z) of the virtual camera IC that is the predetermined area T.
次に、図7を用いて、所定領域情報と所定領域Tの画像の関係について説明する。なお、図7は、所定領域情報と所定領域Tの画像の関係との関係を示した図である。図7に示されているように、仮想カメラICの画角αによって表される所定領域Tの対角画角をαとした場合の中心点CPが、所定領域情報の(x,y)パラメータとなる。fは仮想カメラICから中心点CPまでの距離である。Lは所定領域Tの任意の頂点と中心点CPとの距離である(2Lは対角線)。そして、図7では、一般的に以下の(式1)で示される三角関数が成り立つ。 Next, the relationship between the predetermined area information and the image of the predetermined area T will be described with reference to FIG. FIG. 7 is a diagram showing the relationship between the predetermined region information and the relationship between the images of the predetermined region T. As shown in FIG. 7, the center point CP when the diagonal field angle of the predetermined region T represented by the field angle α of the virtual camera IC is α is the (x, y) parameter of the predetermined region information. It becomes. f is the distance from the virtual camera IC to the center point CP. L is a distance between an arbitrary vertex of the predetermined region T and the center point CP (2L is a diagonal line). In FIG. 7, a trigonometric function represented by the following (formula 1) is generally established.
L/f=tan(α/2)・・・(式1)
以下、本発明の実施形態の詳細内容について説明する。
L / f = tan (α / 2) (Formula 1)
Hereinafter, the detailed content of the embodiment of the present invention will be described.
<<実施形態の詳細>>
<ハードウェア構成>
続いて、図8を用いて、画像処理装置1のハードウェア構成につい説明する。図8は、本実施形態に係る撮影装置内の画像処理装置のハードウェア構成図である。図8に示されているように、撮影装置1内の画像処理装置10は、入力I/F11a、11b、各ISP(Image Signal Processor)12a,12b、各DMAC(Direct Memory Access Controler)13a〜13g、マッチング処理ブロック14、歪み補正ブロック15、インターコネクト20,30、MEMC(Motion Estimation Motion Com- pensation)21、CPU40を有している。また、撮影装置1は、画像処理装置10以外に、撮像素子103a,103b、外部記憶装置50、フラッシュROM(Read Only Memory)60を有している。外部記憶装置50は、例えば、DRAM(Dynamic Random Access Memory)である。
<< Details of Embodiment >>
<Hardware configuration>
Next, the hardware configuration of the image processing apparatus 1 will be described with reference to FIG. FIG. 8 is a hardware configuration diagram of the image processing apparatus in the photographing apparatus according to the present embodiment. As shown in FIG. 8, the image processing apparatus 10 in the photographing apparatus 1 includes input I / Fs 11a and 11b, ISPs (Image Signal Processors) 12a and 12b, and DMACs (Direct Memory Access Controllers) 13a to 13g. , A matching processing block 14, a distortion correction block 15, interconnects 20 and 30, a MEMC (Motion Estimation Motion Combination) 21, and a CPU 40. In addition to the image processing apparatus 10, the photographing apparatus 1 includes image pickup devices 103 a and 103 b, an external storage device 50, and a flash ROM (Read Only Memory) 60. The external storage device 50 is, for example, a DRAM (Dynamic Random Access Memory).
そして、各撮像素子103a,103bからそれぞれ入力された半球画像A,Bのデータとしてのフレーム画像データがISP(Image Signal Processing)回路11a、11bを経由する事で、マッチング処理0ブロック14及び歪み補正ブロック15で画像処理が行われ、最終的にMEMC21を利用して外部記憶装置50へ転送される構成になっている。 Then, the frame image data as the data of the hemispherical images A and B respectively input from the imaging elements 103a and 103b passes through the ISP (Image Signal Processing) circuits 11a and 11b, so that the matching processing 0 block 14 and the distortion correction are performed. Image processing is performed in the block 15 and finally transferred to the external storage device 50 using the MEMC 21.
マッチング処理ブロック14、歪み補正ブロック15は、共に、歪み補正処理を行った画像を使用する為、インターコネクト30は、マッチング用の歪み補正を行うパラメータ(以降、「パラメータPa」という)を予めフラッシュROM60に格納しておく、そして、電源の投入後に、マッチング処理ブロック14は、インターコネクト30,20によってフラッシュROM60から外部記憶装置50に展開された各半球画像データを読み込むと共に、フレッシュROM60からパラメータPaを読み込む。 Since both the matching processing block 14 and the distortion correction block 15 use an image on which distortion correction processing has been performed, the interconnect 30 preliminarily sets parameters for performing distortion correction for matching (hereinafter referred to as “parameter Pa”) to the flash ROM 60. After the power is turned on, the matching processing block 14 reads each hemispherical image data developed from the flash ROM 60 to the external storage device 50 by the interconnects 30 and 20, and also reads the parameter Pa from the fresh ROM 60. .
更に、マッチング処理ブロック14は、パラメータPaに従って、各半球画像のマッチング対象領域(重複領域)を歪み補正処理を行ない、半球画像A側を基準画像として、半球画像B側を比較画像とすることで、パターンマッチング処理を行なう。このとき、マッチング処理ブロック14は、半球画像A,Bの魚眼画像で重複領域は円状になっているものを、それぞれEqui画像(正距円筒射影画像)に変換する。なお、各Equi画像の作成に関し、分割エリア数は任意である。マッチング処理ブロック14に搭載されたSRAM(Static Random Access Memory:歪み補正後の画像格納領域)のサイズによって影響を受ける為である。分割エリア数のマッチング処理を繰り返し行う事で、重複領域の各々のズレ量を算出する事ができるため、フラッシュROM60に格納して外部記憶装置50に展開しているレンズの種パラメータを使用する。CPU40は、算出されたズレ量に基づいて、予め外部記憶装置50に記憶されていた半球画像Bの歪み補正パラメータPaをずらす(補間する)ことで、半球画像Bの最終的な歪み補正パラメータ(以下、「パラメータPb」という)を作成し、外部記憶装置50に記憶する。 Further, the matching processing block 14 performs distortion correction processing on the matching target region (overlapping region) of each hemispherical image according to the parameter Pa, and sets the hemispherical image A side as a reference image and the hemispherical image B side as a comparative image. Then, pattern matching processing is performed. At this time, the matching processing block 14 converts the fisheye images of the hemispherical images A and B that have a circular overlapping area into Equi images (equirectangular projection images), respectively. Note that the number of divided areas is arbitrary for the creation of each Equi image. This is because it is affected by the size of SRAM (Static Random Access Memory: image storage area after distortion correction) mounted in the matching processing block 14. By repeatedly performing the matching process of the number of divided areas, it is possible to calculate the amount of deviation of each overlapping region, and therefore the lens seed parameter stored in the flash ROM 60 and developed in the external storage device 50 is used. The CPU 40 shifts (interpolates) the distortion correction parameter Pa of the hemispheric image B stored in advance in the external storage device 50 based on the calculated amount of deviation, so that the final distortion correction parameter ( (Hereinafter referred to as “parameter Pb”) is created and stored in the external storage device 50.
そして、歪み補正ブロック15は、外部記憶装置50に予め記憶されていた半球画像A用のパラメータPaと、作成されて外部記憶装置50に記憶された半球画像B用のパラメータPbとを、外部記憶装置50から読み出す。更に、歪み補正ブロック15は、外部記憶装置50に記憶されていた半球画像A,Bのデータを読み出す。そして、歪み補正ブロック15は、歪み補正パラメータPa,Pbを利用して、図3(a)、(b)に示されているように歪んでいる半球画像A,Bに対して繋ぎ処理を行なうことで、図3(c)に示されている1枚のEqui画像(正距円筒射影画像)を作成する。この作成された1枚のEqui画像のデータは、一旦外部記憶装置50に記憶され、その後、インターコネクト回路20及びDMAC13gを介して、画像処理装置10から出力される。なお、歪み補正ブロック15が、1枚になったEqui画像のデータを外部記憶装置50に記憶せずに、インターコネクト回路20及びDMAC13gを介して、画像処理装置10から出力してもよい。 Then, the distortion correction block 15 stores the parameter Pa for the hemispheric image A that has been stored in advance in the external storage device 50 and the parameter Pb for the hemispheric image B that has been created and stored in the external storage device 50. Read from device 50. Further, the distortion correction block 15 reads the data of the hemispheric images A and B stored in the external storage device 50. Then, the distortion correction block 15 uses the distortion correction parameters Pa and Pb to perform joint processing on the distorted hemisphere images A and B as shown in FIGS. 3 (a) and 3 (b). Thus, one Equi image (an equirectangular projection image) shown in FIG. 3C is created. The created Equi image data is temporarily stored in the external storage device 50 and then output from the image processing device 10 via the interconnect circuit 20 and the DMAC 13g. The distortion correction block 15 may output the single Equi image data from the image processing apparatus 10 via the interconnect circuit 20 and the DMAC 13g without storing the Equi image data in the external storage apparatus 50.
<機能構成>
続いて、図9を用いて、画像処理装置10の機能構成につい説明する。図9は、本実施形態に係る撮影装置内の画像処理装置の機能ブロック図である。
<Functional configuration>
Next, the functional configuration of the image processing apparatus 10 will be described with reference to FIG. FIG. 9 is a functional block diagram of the image processing apparatus in the photographing apparatus according to the present embodiment.
図9に示されているように、マッチング処理ブロック14は、第1の歪み補正部24、パターンマッチング部25、ズレ量算出部26、パラメータ作成部27の各機能を実現することができる。また、歪み補正ブロック15は、第2の歪み補正部28の機能を実現することができる。なお、外部記憶装置50は、記憶部の一例であり、工場で、撮影装置1に組み付けられた後、所定のテストパターンを撮影することで得られたテストパターンの画像データが記憶されている。このテストパターンについては、後ほど詳細に説明する。 As shown in FIG. 9, the matching processing block 14 can realize the functions of the first distortion correction unit 24, the pattern matching unit 25, the deviation amount calculation unit 26, and the parameter creation unit 27. Further, the distortion correction block 15 can realize the function of the second distortion correction unit 28. The external storage device 50 is an example of a storage unit, and stores image data of a test pattern obtained by photographing a predetermined test pattern after being assembled to the photographing device 1 at a factory. This test pattern will be described in detail later.
第1の歪み補正部24は、インターコネクト回路30を介して半球画像A,B(画像データ)を記憶部としての外部記憶装置50から読み出して、円状の画像から矩形状の画像(Equi画像)に変形させる歪み補正を行う。その歪み補正は、予め用意された(マッチング用歪み補正)パラメータPaを用いて行われる。その歪み補正を行った後の各画像は、インターコネクト回路20を介して外部記憶装置50に保存される。予め用意されたパラメータPa、撮影装置1の光学系に合わせたものであることから、固定である。この第1の歪み補正部24は、図8のマッチング処理ブロック24によって実現される機能である。 The first distortion correction unit 24 reads hemispherical images A and B (image data) from the external storage device 50 as a storage unit via the interconnect circuit 30, and converts the circular image into a rectangular image (Equi image). Distortion correction to be deformed. The distortion correction is performed using a parameter Pa prepared in advance (matching distortion correction). Each image after the distortion correction is stored in the external storage device 50 via the interconnect circuit 20. Since the parameter Pa prepared in advance is matched with the optical system of the photographing apparatus 1, it is fixed. The first distortion correction unit 24 is a function realized by the matching processing block 24 of FIG.
なお、以降、半球画像Aが第1の歪み補正部24によって歪み補正された後の画像データに係る画像を「変形画像A」として示し、半球画像Bが第1の歪み補正部24によって歪み補正された後の画像データに係る画像を「変形画像B」として示す。 Hereinafter, an image related to the image data after the hemispheric image A has been subjected to distortion correction by the first distortion correction unit 24 will be referred to as “deformed image A”, and the hemispheric image B will be subjected to distortion correction by the first distortion correction unit 24. An image related to the image data after being processed is shown as “deformed image B”.
パターンマッチング部25は、変形画像Aと変形画像Bとを繋ぎ合わせる場合の重複領域において、変形画像Bのうちの比較領域を示す比較画像に対して、変形画像Aのうちの基準領域を示す基準画像をパターンマッチング処理する。 The pattern matching unit 25 is a reference indicating the reference region of the modified image A with respect to the comparison image indicating the comparison region of the deformed image B in the overlapping region when the deformed image A and the deformed image B are connected. Perform pattern matching on the image.
ズレ量算出部26は、パターンマッチング部25によるパターンマッチング処理により、
重複領域のズレ量を算出(特定)する機能である。
The deviation amount calculation unit 26 performs pattern matching processing performed by the pattern matching unit 25.
This is a function for calculating (specifying) the shift amount of the overlapping area.
パラメータ作成部27は、ズレ量算出部26によって算出されたズレ量に応じて、変形画像A及び変形画像Bのうちの少なくとも一方の歪みを補正するための(歪み補正)パラメータPbを作成する。このパラメータPbは、補正後の重複部分を除く変形画像Bが変形画像Aと自然な感じで連続するように、変形画像Bの歪み補正を行うためのものである。それにより、パラメータ補正部17は、予め用意されたパラメータPaで想定するズレ量(例えば重複部分の幅)と、実際のズレ量との差を用いて、その予め用意されたパラメータPaの補間処理により、歪み補正に用いるべきパラメータPbを領域単位で作成する。 The parameter creation unit 27 creates a (distortion correction) parameter Pb for correcting the distortion of at least one of the deformed image A and the deformed image B in accordance with the shift amount calculated by the shift amount calculating unit 26. This parameter Pb is for performing distortion correction of the deformed image B so that the deformed image B excluding the overlapped portion after correction is continuous with the deformed image A with a natural feeling. Thereby, the parameter correction unit 17 uses the difference between the deviation amount assumed by the parameter Pa prepared in advance (for example, the width of the overlapping portion) and the actual deviation amount, and performs interpolation processing of the parameter Pa prepared in advance. Thus, the parameter Pb to be used for distortion correction is created for each region.
第2の歪み補正部28は、確定した後の領域毎のパラメータPbを用いて、変形画像Bに対し、領域単位の歪み補正を行うことで変形画像B’を作成する。この変形画像B’のデータは、インターコネクト回路20を介して外部記憶装置50に保存される。この変形画像B’のデータは、例えば重複部分の画像データを除いたものである。変形画像Aのデータ及び変形画像B’のデータは、外部記憶装置50から、インターコネクト回路20及びDMAC13gを介して外部に出力される。なお、変形画像Aのデータ及び変形画像B’のデータは、外部記憶装置50に一旦記憶されないで、歪み補正ブロック15から、インターコネクト回路20及びDMAC13gを介して直接外部に出力されるようにしてもよい。 The second distortion correction unit 28 creates a deformed image B ′ by performing distortion correction in units of regions on the deformed image B using the parameter Pb for each region after being determined. The data of the deformed image B ′ is stored in the external storage device 50 via the interconnect circuit 20. The data of the deformed image B 'is obtained by excluding, for example, image data of overlapping portions. The data of the deformed image A and the data of the deformed image B ′ are output from the external storage device 50 to the outside via the interconnect circuit 20 and the DMAC 13g. The data of the deformed image A and the data of the deformed image B ′ are not temporarily stored in the external storage device 50, but may be directly output to the outside from the distortion correction block 15 via the interconnect circuit 20 and the DMAC 13g. Good.
<<実施形態の処理>>
続いて、図10乃至図25を用いて、本実施形態の処理について説明する。図10は、マッチング処理を終えるまでのフローについて説明する図である。
<< Process of Embodiment >>
Next, the processing of this embodiment will be described with reference to FIGS. FIG. 10 is a diagram illustrating a flow until the matching process is completed.
図10において、「開始」は、画像処理装置10が搭載された撮影装置1の電源を投入することを示している。色々な部品で撮影装置1等の製品を組み立てる為、製品それぞれに組み付け誤差を含んだズレが発生する。繋ぎ目の(マッチング用歪み補正)パラメータPaを最初に作成する際には、製品の出荷前に所定のテストパターン(又は、テストチャート、又はガイド)のテンプレート用いて作成する必要がある。テストパターンを撮影したフレーム画像から、半球画像A,Bのズレ量(水平方向、垂直方向)を算出し、パラメータPaが作成される(ステップS11)。この作成されたパラメータPaを製品で使用できるように、フラッシュROMのデータに格納される(ステップS12)。そして、撮影装置1を使用する際に電源をONされた場合に、ソフト処理にてフラッシュROM60に格納されたパラメータPaが外部記憶装置に展開される(ステップS13)。そして、マッチング処理ブロック14は、パラメータPa等を各々のDMAC13e,13f介して読み出す(ステップS14)。また、マッチング処理ブロック14は、パラメータPaに基づき、半球画像A,BからそれぞれEqui画像を作成する(ステップS15)。半球画像AのEqui画像は基準画像となり、半球画像BのEqui画像は比較画像となる。更に、マッチング処理ブロック14は、比較画像に対して基準画像のパターンマッチングを行なう(ステップS16)。なお、半球画像Aと半球画像Bのうち、どちらが基準画像であるかは、パラメータPaの作り方次第である。そして、マッチング処理ブロック14は、パターンマッチング後に、ズレ量を得ることで、パラメータPbが作成される(ステップS17)。これにより、マッチング処理を終えるまでの一通りの処理は終了する。以降、上述のパターンマッチングに関して、更に詳細に説明する。 In FIG. 10, “Start” indicates that the imaging apparatus 1 in which the image processing apparatus 10 is mounted is turned on. Since a product such as the photographing apparatus 1 is assembled with various parts, a shift including an assembly error occurs in each product. When the joint (matching distortion correction) parameter Pa is first created, it is necessary to create it using a template of a predetermined test pattern (or test chart or guide) before shipping the product. The amount of deviation (horizontal direction and vertical direction) between the hemispherical images A and B is calculated from the frame image obtained by photographing the test pattern, and a parameter Pa is created (step S11). The created parameter Pa is stored in the data of the flash ROM so that it can be used in the product (step S12). Then, when the power is turned on when using the photographing apparatus 1, the parameter Pa stored in the flash ROM 60 by software processing is expanded in the external storage device (step S13). Then, the matching processing block 14 reads out the parameter Pa and the like via the respective DMACs 13e and 13f (step S14). The matching processing block 14 creates Equi images from the hemispherical images A and B based on the parameter Pa (step S15). The Equi image of the hemispherical image A is a reference image, and the Equi image of the hemispherical image B is a comparative image. Further, the matching processing block 14 performs pattern matching of the reference image with respect to the comparison image (step S16). Note that which of the hemispherical image A and the hemispherical image B is the reference image depends on how the parameter Pa is created. Then, after the pattern matching, the matching processing block 14 obtains the deviation amount, thereby creating the parameter Pb (step S17). Thereby, a series of processes until the matching process is completed. Hereinafter, the above-described pattern matching will be described in more detail.
まず、パターンマッチングを説明するにあたって、図11及び図12を用いて、各半球画像(魚眼画像)A,Bの重複領域について説明する。図11及び図12は、各半球画像の重複領域について説明する図である。 First, in describing pattern matching, overlapping regions of hemispherical images (fisheye images) A and B will be described with reference to FIGS. 11 and 12. FIG. 11 and FIG. 12 are diagrams for explaining overlapping regions of the respective hemispherical images.
図11に示されている半球画像A,Bの一番外側の円は、画像領域が配置されている範囲を示している。画角が180°を超える広角レンズの場合、黒線で示されている部分が重複領域である事を示す。半球画像A,Bをマッチングする為には、図12ように歪み補正を行い、半球画像A,Bそれぞれの重複領域に対してマッチング処理を行う。図12に示されている画像を生成する為に使用するのが(マッチング用歪み補正)パラメータPaとなる。 The outermost circles of the hemispherical images A and B shown in FIG. 11 indicate the range where the image area is arranged. In the case of a wide-angle lens having an angle of view exceeding 180 °, the portion indicated by the black line is an overlapping region. In order to match the hemispherical images A and B, distortion correction is performed as shown in FIG. 12, and matching processing is performed on the overlapping regions of the hemispherical images A and B. The parameter Pa (distortion correction for matching) is used to generate the image shown in FIG.
続いて、図13乃至図15を用いて、テンプレートマッチング方法について説明する。図13は、各半球画像でそれぞれ重複領域を分割した場合の図である。 Next, a template matching method will be described with reference to FIGS. FIG. 13 is a diagram when the overlapping area is divided in each hemisphere image.
図13では、重複領域(黒塗り箇所)に対して、パターンマッチング(テンプレートマッチング)を行うために、基準画像としての半球画像A、比較画像としての半球画像Bのそれぞれの重複領域に対して、任意の分割数でエリア分けしていることを示している。分割エリア数の考え方は、半球画像A、半球画像Bのそれぞれに写っている画像をマッチングすることになり、遠方に写るもの、近方に写るもの、または、レンガ調のように繰り返しているものに対してのマッチングとなる。その際に、マッチング領域が小さすぎると繰り返しパターンのマッチングでは精度が落ちるのに対し、マッチング領域を大きくすると動的な物体が繋ぎ目領域に入っていた場合に、遠方及び近方でのマッチング処理にて大きなズレ量及び小さなズレ量が発生し、どちらを優先するべきかを判断する必要がある。そのため、一概にマッチングサイズを決めるのは困難である。 In FIG. 13, in order to perform pattern matching (template matching) on the overlapping region (blacked portion), for each overlapping region of the hemispherical image A as the reference image and the hemispherical image B as the comparison image, It shows that the area is divided by an arbitrary number of divisions. The idea of the number of divided areas is to match the images in the hemispherical image A and hemispherical image B, and those that appear far away, those that appear closer, or those that repeat like a brick tone It becomes matching for. At this time, if the matching area is too small, the accuracy of the repeated pattern matching will be reduced, but if the matching area is enlarged, a dynamic object enters the joint area, and the matching process in the far and near areas A large amount of shift and a small amount of shift occur at, and it is necessary to determine which should be given priority. Therefore, it is difficult to determine the matching size in general.
図14(a)は基準画像の概念図、図14(b)は比較画像の概念図である。基準画像に対して、比較画像は、マッチング処理の際に上下左右にマッチング探索する為の領域が必要となる。基準画像の一つのエリアを”Aエリア0”とすると、このAエリア0のXSIZE,YSIZEを設定は、画素数とライン数になる。また、比較画像において、基準画像の”Aエリア0”と比較するエリアを”Bエリア0”とすると、水平方向に±α、垂直方向に±βの領域幅を持つ。精度を上げるためには、時間をかけてより広範囲でのマッチングを進めるべきであるが、マッチング領域のサイズを大きくするという事は、前エリアのマッチング処理に時間を要する事になる。処理時間を短くするためには、並列処理で行えば良いという考えもあるが、マッチングするエリア毎に基準画像及び比較画像は処理が終わるまで保持しておかなければならず、更に、撮影装置1の設計を考慮すると、マッチング処理ブロック14に内蔵されたSRAMの容量が大きくなることにもつながる。 FIG. 14A is a conceptual diagram of a reference image, and FIG. 14B is a conceptual diagram of a comparative image. Compared to the reference image, the comparison image requires an area for matching search in the vertical and horizontal directions during the matching process. Assuming that one area of the reference image is “A area 0”, XSIZE and YSIZE of A area 0 are set by the number of pixels and the number of lines. Further, in the comparison image, if the area to be compared with “A area 0” of the reference image is “B area 0”, it has a region width of ± α in the horizontal direction and ± β in the vertical direction. In order to increase the accuracy, matching over a wider range should be advanced over time, but increasing the size of the matching region requires time for matching processing of the previous area. In order to shorten the processing time, there is an idea that parallel processing may be performed. However, the reference image and the comparison image must be retained for each matching area until the processing is completed. In consideration of this design, the capacity of the SRAM built in the matching processing block 14 is also increased.
図15は、マッチング処理ブロックによるズレ量の算出方法例を説明する図である。図15では、重複領域をN分割し、エリア毎に処理を行いN個のズレ量が出力される事になる。
半球画像Bの±α,±β領域を含んだ画像領域をマッチング用歪み補正パラメータPaで画像生成をする必要がある。すなわち、マッチング処理ブロック14は、領域単位でズレ量の算出を行う。図5中の「α」「β」は、ズレ量を探索するうえでのX方向上、Y方向上の幅を示すシンボルである。
FIG. 15 is a diagram for explaining an example of a method for calculating a deviation amount by the matching processing block. In FIG. 15, the overlapping area is divided into N, and processing is performed for each area, and N shift amounts are output.
It is necessary to generate an image area including the ± α and ± β regions of the hemispherical image B with the matching distortion correction parameter Pa. That is, the matching processing block 14 calculates the amount of deviation for each region. “Α” and “β” in FIG. 5 are symbols indicating the width in the X direction and the Y direction when searching for the amount of deviation.
以上までが、図2に示されたフローに沿った処理内容となる。 The above is the processing content along the flow shown in FIG.
続いて、図16乃至図18を用いて、画像解像度について説明する。図16は、被写体を表した画像を示した図である。図17(a)は被写体を表したFHD(Full High Definition)画像における基本画像を示した図であり、図17(b)は被写体を表した4K画像における基本画像を示した図である。図18(a)は被写体を表したFHD画像の場合の比較画像におけるマッチングエリアを示した図であり、図18(b)は被写体を表した4K画像の場合の比較画像におけるマッチングエリアを示した図である。 Subsequently, the image resolution will be described with reference to FIGS. 16 to 18. FIG. 16 is a diagram illustrating an image representing a subject. FIG. 17A is a diagram showing a basic image in an FHD (Full High Definition) image representing a subject, and FIG. 17B is a diagram showing a basic image in a 4K image representing the subject. FIG. 18A is a diagram showing a matching area in a comparison image in the case of an FHD image representing a subject, and FIG. 18B is a diagram showing a matching area in a comparison image in the case of a 4K image representing the subject. FIG.
まず、図16に示されているように、被写体を表す画像があり、上述したマッチングエリアの一つを示しているものとする。画像解像度は、年々高解像度化が進んでおり、FHD画像が主流であった時代から、4K画像が主流となる時代へと変化が進んでいる中で、図17に示す画像のような課題が発生する。即ち、マッチングエリアをFHD画像の場合に指定している画像領域全てを含む事が必要であると単純に考えた場合、4K画像の場合には、4倍の画素数(画像フォーマットは、任意)が必要になるという課題が生じる。また、図18に示されているように、比較画像の時も同様に、4倍の画素数が必要になるという課題も生じる。更に、探索幅(±α,±β)の範囲を大きくすることも、高解像度化すると一つのエリア処理に必要な画像サイズが大きくなる事に影響を与えてしまうという課題も生じる。 First, as shown in FIG. 16, it is assumed that there is an image representing a subject and shows one of the matching areas described above. Image resolution is increasing year by year, and changes from an era when FHD images were mainstream to an era where 4K images are mainstream, there are problems like the image shown in FIG. Occur. In other words, when it is simply considered that the matching area needs to include all of the designated image area in the case of an FHD image, in the case of a 4K image, the number of pixels is four times as many (the image format is arbitrary) The problem arises that is necessary. Further, as shown in FIG. 18, similarly, there is a problem that the number of pixels is four times as large as that of the comparative image. Furthermore, increasing the range of the search width (± α, ± β) also causes a problem that if the resolution is increased, the image size required for one area process is increased.
続いて、図19を用いて、メモリ領域について説明する。図19は、図8の構成図を基にメモリ帯域に関連するデータ転送イメージを示した図である。なお、CPUなど他の機能からのメモリアクセスに関しては、画像転送量に対して微量と判断し、省略している。 Subsequently, the memory area will be described with reference to FIG. FIG. 19 is a diagram showing a data transfer image related to the memory band based on the configuration diagram of FIG. Note that memory access from other functions such as a CPU is omitted because it is determined that the image transfer amount is very small.
図19では、フレーム単位での処理を示しており、入力された画像が出力されるのは3フレーム後になる。1フレーム目では、入力された半球画像A,Bがメモリに格納される。2フレーム目では、マッチング処理が行なわれる。3フレーム目では、歪み補正が行なわれる。4フレーム目では、作成後のパラメータPbが外部記憶装置50へ出力される。 FIG. 19 shows processing in units of frames, and the input image is output three frames later. In the first frame, the input hemispherical images A and B are stored in the memory. In the second frame, matching processing is performed. In the third frame, distortion correction is performed. In the fourth frame, the created parameter Pb is output to the external storage device 50.
入力I/F11a,11bからのフレーム画像転送は、フレーム期間内にデータを転送してくる為、図19にライン単位でのメモリアクセス処理を示していないが、一定の間隔でメモリアクセスを行なっている。 In the frame image transfer from the input I / Fs 11a and 11b, data is transferred within the frame period. Therefore, the memory access processing for each line is not shown in FIG. 19, but the memory access is performed at regular intervals. Yes.
図19で示すように、7つのDMAC13a〜13gからメモリアクセスのコマンド発行が行なわれるシステムが通常のシステムとして考えられる。画像解像度が高解像度化し、フレームレートが高速化する事によってメモリ帯域が切迫している。メモリの動作周波数を高速化し、データ幅を広く設定する事で対応可能な範囲を広げる事は可能であるが、撮影装置1の製品としての消費電力の増加、実装面積の増加など撮影装置1全体に対するメリットが見いだせなくなる。これに対して、歪み補正処理に関するメモリ帯域削減の検討及び実施は行っている為、本実施形態は、マッチング精度を落とすことなく、最適なマッチング領域を設定する事でメモリ帯域を削減するができる。そこで、メモリ帯域を削減するための方法を以下に示す。 As shown in FIG. 19, a system in which memory access commands are issued from seven DMACs 13a to 13g is considered as a normal system. As the image resolution becomes higher and the frame rate becomes faster, the memory bandwidth is imminent. Although it is possible to widen the applicable range by increasing the operating frequency of the memory and setting a wide data width, the entire photographing apparatus 1 such as an increase in power consumption and an increase in mounting area as a product of the photographing apparatus 1 is possible. It is impossible to find any merit for. On the other hand, since the memory bandwidth reduction related to the distortion correction processing is being studied and implemented, the present embodiment can reduce the memory bandwidth by setting an optimal matching area without lowering the matching accuracy. . Therefore, a method for reducing the memory bandwidth is shown below.
図20は、テンプレートのテストパターンの概念図である。図21は、図20の右上部の拡大図である。このテストパターンTPは、同心円上に同じ中心から放射状の複数の直線が表されている。まず、矢印が示している範囲は、テンプレートマッチングを行うエリアの範囲である。そのため、図20では、テンプレートマッチングを行うエリア数が8である事を示している。 FIG. 20 is a conceptual diagram of a template test pattern. FIG. 21 is an enlarged view of the upper right part of FIG. The test pattern TP has a plurality of radial straight lines from the same center on concentric circles. First, the range indicated by the arrow is an area range for template matching. For this reason, FIG. 20 shows that the number of areas for template matching is eight.
なお、撮影装置1に実装されている回路に見合ったサイズである必要はあるが、特に分割数は、任意であってもよい。ここでは、説明の便宜上、8分割にしている。円状の太い黒線部分が、今回のマッチング領域を決定する為のテストパターンである。半球画像A,Bそれぞれに、図20に示されているように、黒線部が現れるテストパターンTPを用意している。なお、黒線部分がクロスする点もまた任意であり、個数に制約ない。 Although the size needs to be suitable for the circuit mounted on the photographing apparatus 1, the number of divisions may be arbitrary. Here, for convenience of explanation, it is divided into eight. A circle-shaped thick black line portion is a test pattern for determining the current matching region. As shown in FIG. 20, test patterns TP in which black line portions appear are prepared for the hemispherical images A and B, respectively. The point where the black line portion crosses is also arbitrary, and the number is not limited.
マッチング処理ブロック14は、入力された半球画像A,Bのそれぞれに対して、歪み補正を行なう。同じテストパターンTPを使用して入力された画像に対して、それぞれにパラメータPaを使用すると、図22及び図23に示すようになる。 The matching processing block 14 performs distortion correction on each of the input hemispherical images A and B. When parameters Pa are used for images input using the same test pattern TP, the results are as shown in FIGS.
図22は、基準画像(半球画像A)の重複領域を歪み補正した場合の例を示した図である。図23は、比較画像(半球画像B)の重複領域を歪み補正した場合の例示した図である。このままであれば、基本画像のグレーで塗りつぶされた領域Aaと比較画像のグレーで塗りつぶされた領域Abとをテンプレートマッチングすることになるが、基本画像のテストパターンTPaと比較画像のテストパターンTPbとで予めズレ量を確認する事が、上述のマッチング処理ブロック14によるズレ量の算出方法で可能となる。ここで、図24及び図25を用いて、テストパターンTPa,TPbを利用したズレ量の算出方法について説明する。 FIG. 22 is a diagram illustrating an example when distortion correction is performed on the overlapping region of the reference image (hemisphere image A). FIG. 23 is a diagram exemplifying a case where the overlapping region of the comparative image (hemispheric image B) is corrected for distortion. If it remains as it is, template matching is performed between the area Aa filled in gray of the basic image and the area Ab filled in gray of the comparison image, but the test pattern TPa of the basic image and the test pattern TPb of the comparison image It is possible to check the amount of deviation in advance by the method of calculating the amount of deviation by the matching processing block 14 described above. Here, a method of calculating the deviation amount using the test patterns TPa and TPb will be described with reference to FIGS.
図24は、図22に示されている領域Aaと、図23に示されている領域Abとを重ね合わせた場合の拡大図である。領域Aaにおける一画素Piaと領域Abにおける一画素Pibが、本来重なっている事が理想である。ところが、図24のように各画素Pia,Pibがずれることがある。ずれる主な原因は、画像処理装置1の撮像装置1への組み付け誤差によるものであり、本来は3画素分のずれ量を想定している。また、利用者が撮像装置1を使用する場合に誤って落としたりすることで、ずれ量が3画素分よりも拡大することがあるため、より広い範囲でのパターンマッチングを行なう必要がある。更に、図18に示したように、4K画像による撮影の場合、FHD画像に比べて、画素が4倍になるだけでなく、ずれ量も考慮すると、より広い範囲の画素部分までパターンマッチングしなければならない。これに対して、本実施形態では、撮影装置1の組み立て工程において、図21乃至図23に示すように、テストパターンTP(TPa,TPb)を撮影して外部記憶装置50に記憶しておき、パターンマッチング処理の際に利用することで、図25に示すように、マッチング領域を小さくすることができる。 FIG. 24 is an enlarged view when the region Aa shown in FIG. 22 and the region Ab shown in FIG. 23 are overlapped. Ideally, one pixel Pia in the area Aa and one pixel Pib in the area Ab overlap each other. However, the pixels Pia and Pib may be shifted as shown in FIG. The main cause of the shift is due to an assembly error of the image processing apparatus 1 to the image pickup apparatus 1, and a deviation amount of 3 pixels is assumed originally. In addition, when the user uses the image pickup apparatus 1, the amount of shift may be larger than that of three pixels due to an accidental drop, and thus pattern matching needs to be performed in a wider range. Furthermore, as shown in FIG. 18, in the case of shooting with a 4K image, not only the pixels are four times that of an FHD image, but also considering the amount of displacement, pattern matching must be performed over a wider range of pixels. I must. On the other hand, in the present embodiment, in the assembly process of the photographing apparatus 1, as shown in FIGS. 21 to 23, the test pattern TP (TPa, TPb) is photographed and stored in the external storage device 50. By using the pattern matching process, the matching area can be reduced as shown in FIG.
図25は、本実施形態と従来のマッチング領域を設定した図である。ここでは、半球画像Aである基準画像がXa×Yaサイズであるのに対し、半球画像Bである比較画像がXb×Ybサイズとして設定されている。図25において、テンプレートマッチングに以前必要としていた領域である分割した1つのエリア幅W1に対して、今回必要な領域である分割した1つのエリア幅W2を小さくすることができる。 FIG. 25 is a diagram in which a matching area according to the present embodiment and the prior art is set. Here, the reference image that is the hemispherical image A is set to Xa × Ya size, while the comparative image that is the hemispherical image B is set to Xb × Yb size. In FIG. 25, one divided area width W2, which is a region required this time, can be made smaller than one divided area width W1, which is a region previously required for template matching.
<<実施形態の効果>>
以上説明したように、本実施形態によれば、メモリ帯域の圧迫を軽減する事が出来る。更に、マッチング処理ブロック14は、図25に示されているように、エリア幅W1においてエリア幅W2を除く両脇の無駄な領域W3,W4を、外部記憶装置から読み出して来る必要が無くなるため、テンプレートマッチングの処理速度が向上するという効果を奏する。
<< Effects of Embodiment >>
As described above, according to the present embodiment, the compression of the memory band can be reduced. Further, as shown in FIG. 25, the matching processing block 14 does not need to read the useless areas W3 and W4 on both sides of the area width W1 excluding the area width W2 from the external storage device. There is an effect that the processing speed of template matching is improved.
1 撮影装置
10 画像処理装置
14 マッチング処理ブロック
15 歪み補正ブロック
24 第1の歪み補正部
25 パターンマッチング部
50 外部記憶装置
DESCRIPTION OF SYMBOLS 1 Image pick-up device 10 Image processing device 14 Matching processing block 15 Distortion correction block 24 1st distortion correction part 25 Pattern matching part 50 External storage device
Claims (6)
前記第1及び第2の画像データに対し、画像の歪みを補正する処理をそれぞれ行う第1の歪み補正部と、
前記第1の歪み補正部による処理が行われた前記第1の画像データに係る第1の画像と前記第1の歪み補正部による処理が行われた前記第2の画像データに係る第2の画像とを繋ぎ合わせる場合の重複領域において、前記第2の画像のうちの比較領域を示す比較画像に対して、前記第1の画像のうちの基準領域を示す基準画像をパターンマッチング処理するパターンマッチング部と、
前記パターンマッチング部によるパターンマッチング処理により、前記重複領域のズレ量を算出するズレ量算出部と、
前記ズレ量に応じて、前記第1の画像及び第2の画像のうちの少なくとも一方の歪みを補正するための歪み補正パラメータを作成するパラメータ作成部と、
前記パラメータ作成部によって作成された前記歪み補正パラメータを用いて、前記第1及び第2の画像データのうちの少なくとも一方に対して画像の歪みを補正する処理を行う第2の歪み補正部と、
を有し、
前記ズレ量算出部は、少なくとも前記第1の画像及び前記第2の画像の前記重複領域において、前記パターンマッチング処理に利用するテストパターンを利用して前記パターンマッチングすることを特徴とする画像処理装置。 An image processing apparatus for joining a plurality of images represented by first and second image data,
A first distortion correction unit that performs a process of correcting image distortion for the first and second image data;
The first image related to the first image data processed by the first distortion correction unit and the second image data related to the second image data processed by the first distortion correction unit. Pattern matching for performing a pattern matching process on a reference image indicating a reference area of the first image with respect to a comparison image indicating a comparison area of the second image in an overlapping area when the images are joined together And
A shift amount calculation unit that calculates a shift amount of the overlapping region by pattern matching processing by the pattern matching unit;
A parameter creating unit that creates a distortion correction parameter for correcting distortion of at least one of the first image and the second image according to the amount of deviation;
A second distortion correction unit that performs a process of correcting image distortion on at least one of the first and second image data using the distortion correction parameter generated by the parameter generation unit;
Have
The shift amount calculation unit performs the pattern matching using a test pattern used for the pattern matching process at least in the overlapping region of the first image and the second image. .
被写体を撮影して得られた前記第1の画像データを前記画像処理装置に送る第1の撮像部と、
被写体を撮影して得られた前記第2の画像データを前記画像処理装置に送る第2の撮像部と、
を有する撮影装置。 An image processing apparatus according to any one of claims 1 to 4,
A first imaging unit that sends the first image data obtained by photographing a subject to the image processing device;
A second imaging unit for sending the second image data obtained by photographing a subject to the image processing device;
A photographing apparatus having
前記第1及び第2の画像データに対し、画像の歪みを補正する処理をそれぞれ行う第1の歪み補正ステップと、
前記第1の歪み補正ステップによる処理が行われた前記第1の画像データに係る第1の画像と前記第1の歪み補正ステップによる処理が行われた前記第2の画像データに係る第2の画像とを繋ぎ合わせる場合の重複領域において、前記第2の画像のうちの比較領域を示す比較画像に対して、前記第1の画像のうちの基準領域を示す基準画像をパターンマッチング処理することで、前記重複領域のズレ量を算出するズレ量算出ステップと、
前記ズレ量に応じて、前記第1の画像及び第2の画像のうちの少なくとも一方の歪みを補正するための歪み補正パラメータを作成するパラメータ作成ステップと、
前記パラメータ作成ステップによって作成された前記歪み補正パラメータを用いて、前記第1及び第2の画像データのうちの少なくとも一方に対して画像の歪みを補正する処理を行う第2の歪み補正ステップと、
を実行し、
前記ズレ量算出ステップは、少なくとも前記第1の画像及び前記第2の画像の前記重複領域において前記パターンマッチング処理に利用するテストパターンを利用して、前記パターンマッチングする処理を含むことを特徴とする画像処理装置。 An image processing method for joining a plurality of images expressed by first and second image data,
A first distortion correction step for performing a process of correcting image distortion for each of the first and second image data;
The first image related to the first image data processed by the first distortion correction step and the second image data related to the second image data processed by the first distortion correction step. By performing a pattern matching process on the reference image indicating the reference region of the first image with respect to the comparison image indicating the comparison region of the second image in the overlapping region when connecting the images. , A deviation amount calculating step for calculating a deviation amount of the overlapping area;
A parameter creating step for creating a distortion correction parameter for correcting the distortion of at least one of the first image and the second image in accordance with the shift amount;
A second distortion correction step for performing a process of correcting image distortion for at least one of the first and second image data using the distortion correction parameter created by the parameter creation step;
Run
The shift amount calculating step includes a process of performing the pattern matching using a test pattern used for the pattern matching process in at least the overlapping region of the first image and the second image. Image processing device.
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017070889A JP6885158B2 (en) | 2017-03-31 | 2017-03-31 | Image processing device, photographing device, and image processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2017070889A JP6885158B2 (en) | 2017-03-31 | 2017-03-31 | Image processing device, photographing device, and image processing method |
Publications (2)
| Publication Number | Publication Date |
|---|---|
| JP2018174429A true JP2018174429A (en) | 2018-11-08 |
| JP6885158B2 JP6885158B2 (en) | 2021-06-09 |
Family
ID=64108908
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2017070889A Expired - Fee Related JP6885158B2 (en) | 2017-03-31 | 2017-03-31 | Image processing device, photographing device, and image processing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP6885158B2 (en) |
Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005027154A (en) * | 2003-07-04 | 2005-01-27 | Hitachi Ltd | Multi-camera system and adjustment device thereof |
| JP2015046044A (en) * | 2013-08-28 | 2015-03-12 | 株式会社リコー | Image processing apparatus, image processing method, program, and imaging system |
| JP2015176559A (en) * | 2014-03-18 | 2015-10-05 | 株式会社リコー | information processing method, information processing apparatus, and program |
-
2017
- 2017-03-31 JP JP2017070889A patent/JP6885158B2/en not_active Expired - Fee Related
Patent Citations (3)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JP2005027154A (en) * | 2003-07-04 | 2005-01-27 | Hitachi Ltd | Multi-camera system and adjustment device thereof |
| JP2015046044A (en) * | 2013-08-28 | 2015-03-12 | 株式会社リコー | Image processing apparatus, image processing method, program, and imaging system |
| JP2015176559A (en) * | 2014-03-18 | 2015-10-05 | 株式会社リコー | information processing method, information processing apparatus, and program |
Also Published As
| Publication number | Publication date |
|---|---|
| JP6885158B2 (en) | 2021-06-09 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| JP6721065B2 (en) | Imaging device, image processing device and method | |
| US9436973B2 (en) | Coordinate computation device and method, and an image processing device and method | |
| JP2017208619A (en) | Image processing apparatus, image processing method, program and imaging system | |
| JP2019057903A (en) | Image processing apparatus, photographing system, image processing method, and program | |
| JP5846172B2 (en) | Image processing apparatus, image processing method, program, and imaging system | |
| US12456160B2 (en) | Imaging system, image processing apparatus, imaging device, and recording medium | |
| JP2019164782A (en) | Image processing apparatus, image capturing system, image processing method, and program | |
| JP2018152782A (en) | Image processing system, imaging apparatus, image processing method, and program | |
| JP2019057264A (en) | Image processing apparatus, photographing system, image processing method, and program | |
| JP2019185757A (en) | Image processing device, imaging system, image processing method, and program | |
| JP2018109946A (en) | Display device, program, and display method | |
| US10701286B2 (en) | Image processing device, image processing system, and non-transitory storage medium | |
| TW201824178A (en) | Image processing method for immediately producing panoramic images | |
| JPWO2017159014A1 (en) | Image processing apparatus, image processing method, and image processing system | |
| JP2016053978A (en) | Image processor | |
| JP2018110384A (en) | Image processing apparatus, photographing system, image processing method, and program | |
| JP6291748B2 (en) | Imaging apparatus, imaging method, and program | |
| JP2019053758A (en) | Image processing apparatus | |
| TW201911239A (en) | Method and apparatus for generating three-dimensional panoramic video | |
| JP6885158B2 (en) | Image processing device, photographing device, and image processing method | |
| JP2019164783A (en) | Image processing apparatus, image capturing system, image processing method, and program | |
| JP2017103695A (en) | Image processing apparatus, image processing method, and program thereof | |
| JP2019087984A (en) | Information processing apparatus, imaging system, program | |
| JP6992829B2 (en) | Image processing system, image processing method and program | |
| JP6825458B2 (en) | Image processing device, photographing device, and image processing method |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20200109 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20200903 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20200915 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20201112 |
|
| 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: 20210413 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20210426 |
|
| R151 | Written notification of patent or utility model registration |
Ref document number: 6885158 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
| LAPS | Cancellation because of no payment of annual fees |