JP2019012516A - Image processor and image processing method - Google Patents

Image processor and image processing method Download PDF

Info

Publication number
JP2019012516A
JP2019012516A JP2018076383A JP2018076383A JP2019012516A JP 2019012516 A JP2019012516 A JP 2019012516A JP 2018076383 A JP2018076383 A JP 2018076383A JP 2018076383 A JP2018076383 A JP 2018076383A JP 2019012516 A JP2019012516 A JP 2019012516A
Authority
JP
Japan
Prior art keywords
image data
image
processing apparatus
interest
image processing
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
JP2018076383A
Other languages
Japanese (ja)
Other versions
JP2019012516A5 (en
JP7150460B2 (en
Inventor
祐二 加藤
Yuji Kato
祐二 加藤
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.)
Canon Inc
Original Assignee
Canon 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 Canon Inc filed Critical Canon Inc
Priority to US16/007,323 priority Critical patent/US10664947B2/en
Publication of JP2019012516A publication Critical patent/JP2019012516A/en
Publication of JP2019012516A5 publication Critical patent/JP2019012516A5/ja
Application granted granted Critical
Publication of JP7150460B2 publication Critical patent/JP7150460B2/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

To appropriately convert an entire celestial sphere image into a plane image.SOLUTION: Provided are: acquisition means for acquiring at least one or more pieces of input image data for expressing a spherical image; determination means for determining a focus region in the input image data; and conversion means for converting, based on the focus region, the input image data into output image data expressing at least part of the spherical image by a positive pyramid projection technique.SELECTED DRAWING: Figure 2

Description

本発明は、球状の画像表す平面の画像データを保持するための画像処理技術に関する。   The present invention relates to an image processing technique for holding plane image data representing a spherical image.

ヘッドマウントディスプレイなどを装着した視聴者に対して、視聴者の視線の動きに合わせて画像を表示する技術が知られている。ある位置における周囲360度すべての画像を表す全天球画像のうち、視聴者の視線の方向に合わせて一部の画像を表示することにより、視聴者はその場にいるかのような臨場感を体感することができる。全天球画像は、全方向の画像を表すため、データ量が膨大である。そこで近年、全天球画像を適切に保存する方法が検討されている。特許文献1に開示された方法では、全天球画像を複数の断片画像に分割し、変化の乏しい空や地面などの上下の極部分は平面円に投影して極座標で表現し、極部分以外の部分は長方形に補間して直交座標系に基づく圧縮処理を適用する。これにより、全天球画像を効率的に圧縮している。   A technique for displaying an image in accordance with the movement of the viewer's line of sight for a viewer wearing a head-mounted display or the like is known. By displaying a part of the omnidirectional image representing all 360-degree images at a certain position in accordance with the direction of the viewer's line of sight, the viewer can feel as if they are present. You can experience it. Since the omnidirectional image represents an image in all directions, the amount of data is enormous. Therefore, in recent years, methods for appropriately storing omnidirectional images have been studied. In the method disclosed in Patent Document 1, the omnidirectional image is divided into a plurality of fragment images, and the upper and lower pole portions such as the sky and the ground with little change are projected on a plane circle and expressed in polar coordinates, and other than the pole portions. This part is interpolated into a rectangle and a compression process based on an orthogonal coordinate system is applied. Thereby, the omnidirectional image is efficiently compressed.

特開2001−298652号公報Japanese Patent Laid-Open No. 2001-298652

しかしながら特許文献1に開示された方法では、全天球画像が領域によって異なる座標系で表現されているため、全天球画像から表示画像を生成するためには、領域ごとに異なる処理が必要になってしまう。そこで本発明は、全天球画像を分割して領域ごとに異なる処理を必要とせず、適切に平面画像に変換することを目的とする。   However, in the method disclosed in Patent Document 1, since the omnidirectional image is expressed in different coordinate systems depending on the region, different processing is required for each region in order to generate a display image from the omnidirectional image. turn into. Therefore, an object of the present invention is to divide the omnidirectional image and appropriately convert it into a planar image without requiring different processing for each region.

上記課題を解決するため本発明は、球状の画像を表すための少なくとも1つ以上の入力画像データを取得する取得手段と、前記入力画像データにおける注目領域を決定する決定手段と、前記注目領域に基づいて、前記入力画像データを、正距円筒図法により球状の画像の少なくとも一部を表す出力画像データに変換する変換手段とを有することを特徴とする。   In order to solve the above problems, the present invention provides an acquisition unit that acquires at least one input image data for representing a spherical image, a determination unit that determines a region of interest in the input image data, And converting means for converting the input image data into output image data representing at least a part of a spherical image by equirectangular projection.

本発明によれば、全天球画像を適切に平面画像に変換することができる。   According to the present invention, an omnidirectional image can be appropriately converted into a planar image.

画像処理装置の構成を示すブロック図。1 is a block diagram illustrating a configuration of an image processing apparatus. 画像処理装置の詳細な論理構成を示すブロック図。FIG. 2 is a block diagram showing a detailed logical configuration of the image processing apparatus. 画像処理装置における処理の流れを示すフローチャート。3 is a flowchart showing a flow of processing in the image processing apparatus. 回転量算出処理の流れを示すフローチャート。The flowchart which shows the flow of rotation amount calculation processing. 正距円筒図法の全天球画像の例を示す図。The figure which shows the example of the omnidirectional image of equirectangular projection. 正距円筒図法の仰角に対する分解能の変化を示すグラフ。The graph which shows the change of the resolution with respect to the elevation angle of equirectangular projection. 表示画像の例を示す図。The figure which shows the example of a display image. 入力画像データを示す図。The figure which shows input image data. 注目点が1つである場合の回転処理後の画像を示す図。The figure which shows the image after a rotation process in case there is one attention point. 2つの注目点の角度差が90度未満の場合の回転処理後の画像を示す図。The figure which shows the image after a rotation process in case the angle difference of two attention points is less than 90 degree | times. 2つの注目点の角度差が90度以上の場合の回転処理後の画像を示す図。The figure which shows the image after a rotation process in case the angle difference of two attention points is 90 degree | times or more. 画像処理装置の論理構成を示すブロック図。1 is a block diagram showing a logical configuration of an image processing apparatus. 画像処理装置における処理の流れを示すフローチャート。3 is a flowchart showing a flow of processing in the image processing apparatus. 画像処理装置の詳細な論理構成を示すブロック図。FIG. 2 is a block diagram showing a detailed logical configuration of the image processing apparatus. 画像処理装置における処理の流れを示すフローチャート。3 is a flowchart showing a flow of processing in the image processing apparatus.

以下、本発明の実施形態について、図面を参照して説明する。なお、以下の実施形態は本発明を必ずしも限定するものではなく、また、本実施形態で説明されている特徴の組み合わせの全てが本発明の解決手段に必須のものとは限らない。なお、同一の構成については、同じ符号を付して説明する。   Hereinafter, embodiments of the present invention will be described with reference to the drawings. It should be noted that the following embodiments do not necessarily limit the present invention, and not all combinations of features described in the present embodiment are essential for the solution means of the present invention. In addition, about the same structure, the same code | symbol is attached | subjected and demonstrated.

<第1実施形態>
第1実施形態では、全天球画像において高解像度に保存したい注目領域を決定し、注目領域が極付近の位置に相当するように全天球画像の軸を変更した上で、正距円筒法により平面画像に変換する方法について説明する。なお全天球画像とは、球状の画像であり全方位画像、全天周画像などとも呼ばれ、ある位置からの360度全方位のシーンを表す画像を意味する。また本実施形態における画像処理装置は、頭に装着して画像を視聴できるヘッドマウントディスプレイ(以下、HMD)に用いられる全天球画像を保存する。HMDでは、装着した視聴者の視線に応じて、本実施形態により適切に保存された全天球画像における視線方向の部分的な画像がディスプレイに表示される。HMDに表示する画像は、HMDあるいはHMDへの画像出力を実行する画像処理装置が行うものとする。HMDに表示される画像は、本実施形態における画像処理が保存する全天球画像、またはその一部に各種画像処理を施した後に得られる画像である。
<First Embodiment>
In the first embodiment, an attention area to be stored at a high resolution is determined in the omnidirectional image, the axis of the omnidirectional image is changed so that the attention area corresponds to a position near the pole, and then the equirectangular cylinder method is used. A method for converting to a flat image will be described. The omnidirectional image is a spherical image and is also called an omnidirectional image, an omnidirectional image, or the like, and means an image representing a 360-degree omnidirectional scene from a certain position. In addition, the image processing apparatus according to the present embodiment stores an omnidirectional image used in a head mounted display (hereinafter, HMD) that can be worn on the head and viewed. In the HMD, a partial image in the line-of-sight direction in the omnidirectional image appropriately stored according to the present embodiment is displayed on the display according to the line of sight of the viewer who wears it. The image displayed on the HMD is assumed to be performed by the image processing apparatus that executes image output to the HMD or HMD. The image displayed on the HMD is an omnidirectional image stored by image processing in the present embodiment, or an image obtained after various image processing is performed on a part thereof.

本実施形態における画像処理装置のハードウェア構成について、図1を用いて説明する。本実施形態における画像処理装置は、画像データを読み込んで各種画像処理を実行するパーソナルコンピュータを例に説明する。CPU101は、RAM102をワークメモリとして、ROM103及びハードディスクドライブ(HDD)105に格納されたプログラムを実行し、システムバス110を介して後述する各構成を制御する。これにより、後述する様々な処理が実行される。HDDインタフェイス(I/F)104は、HDD105や光ディスクドライブなどの二次記憶装置を接続する。例えばシリアルATA(SATA)等のインタフェイスである。CPU101は、HDDI/F104を介して、HDD105からのデータ読み出し、およびHDD105へのデータ書き込みが可能である。さらにCPU101は、HDD105に格納されたデータをRAM102に展開し、同様に、RAM102に展開されたデータをHDD105に保存することが可能である。そしてCPU101は、RAM102に展開したデータをプログラムとみなし、実行することができる。入力インタフェイス(I/F)106は、キーボードやマウス、デジタルカメラ、スキャナなどの入力デバイス107を接続する、例えばUSBやIEEE1394等のシリアルバスインタフェイスである。CPU101は、入力I/F106を介して入力デバイス107からデータを読み込むことが可能である。出力インタフェイス(I/F)108は、ディスプレイなどの画像表示装置の出力デバイス109を接続する。出力インタフェイス108は例えばDVIやHDMI(登録商標)等の映像出力インタフェイスである。CPU101は、出力I/F108を介して出力デバイス109にデータを送り、表示を実行させることができる。前述の通り本実施形態では、出力デバイス109としてHMDを想定している。   A hardware configuration of the image processing apparatus according to the present embodiment will be described with reference to FIG. The image processing apparatus according to the present embodiment will be described using a personal computer that reads image data and executes various image processes as an example. The CPU 101 executes programs stored in the ROM 103 and the hard disk drive (HDD) 105 using the RAM 102 as a work memory, and controls each component to be described later via the system bus 110. Thereby, various processes described later are executed. The HDD interface (I / F) 104 connects a secondary storage device such as the HDD 105 or an optical disk drive. For example, an interface such as serial ATA (SATA). The CPU 101 can read data from the HDD 105 and write data to the HDD 105 via the HDD I / F 104. Further, the CPU 101 can expand the data stored in the HDD 105 in the RAM 102 and similarly store the data expanded in the RAM 102 in the HDD 105. The CPU 101 can execute the data expanded in the RAM 102 as a program. An input interface (I / F) 106 is a serial bus interface such as USB or IEEE 1394 for connecting an input device 107 such as a keyboard, a mouse, a digital camera, and a scanner. The CPU 101 can read data from the input device 107 via the input I / F 106. An output interface (I / F) 108 connects an output device 109 of an image display device such as a display. The output interface 108 is a video output interface such as DVI or HDMI (registered trademark). The CPU 101 can send data to the output device 109 via the output I / F 108 to execute display. As described above, in the present embodiment, an HMD is assumed as the output device 109.

図2は、本実施形態における画像処理装置の論理構成を示すブロック図である。CPU101は、ROM103又はHDD105に格納されたプログラムを読み出してRAM102をワークエリアとして実行することで、図2に示す各機能ブロックとしての役割を果たす。なお、全ての機能ブロックの役割をCPU101が果たす必要はなく、各機能ブロックに対応する専用の処理回路を設けるようにしてもよい。   FIG. 2 is a block diagram illustrating a logical configuration of the image processing apparatus according to the present embodiment. The CPU 101 plays a role as each functional block shown in FIG. 2 by reading a program stored in the ROM 103 or the HDD 105 and executing the RAM 102 as a work area. Note that the CPU 101 does not have to play the role of all the functional blocks, and a dedicated processing circuit corresponding to each functional block may be provided.

画像取得部201は、全天球を表す入力画像データを取得する。全天球を表す入力画像データは、ある地点における全ての向きの入射光線の色を保存した画像データのことである。ここで取得する入力画像データは、正距円筒図法により平面に展開された画像データである。図5は、正距円筒図法により表された全天球画像を示す。正距円筒図法とは、地図投影法の1つとして知られ、地球の緯度・経度を平面の縦・横それぞれに割り当てることで平面に展開する図法である。全天球画像の画像データを保存する方式として、正距円筒図法が用いられることが知られている。正距円筒図法では画像データの横軸を方位角θとする。方位角θの範囲は[−π π]である。また、縦軸を仰角φとし、仰角φの範囲は[−π/2 π/2]である。画像データは、方位角θおよび仰角φを離散化した位置における色情報を画素値として格納された画素からなる。画像データにおいて幅はw画素、高さはh画素とする。正距円筒図法における仰角φの変化に対する分解能の変化を示すグラフを図6に示す。分解能とは、全天球画像の1画素に入射する光線の角度を表す。図6に示すグラフは、仰角0度における画像の分解能に対する各仰角における分解能の比率を表している。図6に示すグラフによれば、仰角の絶対値が70度を超えるような領域では、仰角が0度の領域と比べて分解能が3倍以上になっている。このように仰角の絶対値が大きな領域ほど分解能が高くなることがわかる。   The image acquisition unit 201 acquires input image data representing the omnidirectional sphere. Input image data representing the omnidirectional sphere is image data in which the colors of incident light rays in all directions at a certain point are stored. The input image data acquired here is image data developed on a plane by equirectangular projection. FIG. 5 shows an omnidirectional image represented by equirectangular projection. The equirectangular projection is known as one of map projection methods, and is a method of developing on a plane by assigning the latitude and longitude of the earth to the vertical and horizontal planes. It is known that equirectangular projection is used as a method for storing image data of omnidirectional images. In equirectangular projection, the horizontal axis of the image data is the azimuth angle θ. The range of the azimuth angle θ is [−ππ]. The vertical axis is the elevation angle φ, and the range of the elevation angle φ is [−π / 2 π / 2]. The image data consists of pixels that store color information as pixel values at positions where the azimuth angle θ and elevation angle φ are discretized. In the image data, the width is w pixels and the height is h pixels. FIG. 6 is a graph showing a change in resolution with respect to a change in elevation angle φ in equirectangular projection. The resolution represents the angle of light incident on one pixel of the omnidirectional image. The graph shown in FIG. 6 represents the ratio of the resolution at each elevation angle to the resolution of the image at an elevation angle of 0 degrees. According to the graph shown in FIG. 6, in the region where the absolute value of the elevation angle exceeds 70 degrees, the resolution is three times or more compared to the region where the elevation angle is 0 degree. It can be seen that the resolution increases as the absolute value of the elevation angle increases.

正距円筒図法により平面に展開された全天球画像を球面にマッピングしたときに、北極(天頂)、南極(天底)にあたる位置を極と呼ぶことにする。正距円筒図法により表された画像においては、極は1点ではなく広がりを持っており、画像の最上部の行と最下部の行が極の位置に相当する。一方、球面における赤道の位置は、全天球画像における中央横線に相当する。図6に示す通り、正距円筒図法により平面に展開された全天球画像では、極の位置が最も高い分解能を持ち、赤道に相当する領域に比べて、極に近い領域ほど分解能は高くなる。従って、極領域に色情報を格納された被写体は、そのほかの領域に色情報を格納された被写体と比較して、多くの画素を使って高い解像度で保存することができることになる。   The positions corresponding to the north pole (zenith) and the south pole (nadir) when the omnidirectional image developed on a plane by equirectangular projection is mapped to a spherical surface are called poles. In an image represented by equirectangular projection, the poles are not single points but have a spread, and the uppermost row and the lowermost row of the image correspond to the positions of the poles. On the other hand, the position of the equator on the spherical surface corresponds to the central horizontal line in the omnidirectional image. As shown in FIG. 6, in the omnidirectional image developed on a plane by equirectangular projection, the position of the pole has the highest resolution, and the resolution is higher in the region closer to the pole than in the region corresponding to the equator. . Therefore, a subject whose color information is stored in the polar region can be stored with a higher resolution using more pixels than a subject whose color information is stored in other regions.

HMDを装着した視聴者の視線方向に合わせて、全天球画像の部分的な領域(以降、部分画像とする)をHMDのディスプレイに表示する際には、部分画像に対して各種画像処理を施されることが想定される。縮小などの画像処理を全天球画像または部分画像に実行した結果、部分画像の画質は低下してしまう場合がある。そこで本実施形態では、正距円筒図法により展開された平面の画像では、極に近い領域ほど分解能が高いことを利用する。全天球画像においてより高解像度に保存しておくことが望ましい領域を注目領域として特定し、注目領域の位置が極領域の位置に相当するように、全天球画像を変換した上で保存しておく。   When displaying a partial area of the omnidirectional image (hereinafter referred to as a partial image) on the display of the HMD in accordance with the viewing direction of the viewer wearing the HMD, various image processing is performed on the partial image. It is assumed that it will be applied. As a result of performing image processing such as reduction on the omnidirectional image or the partial image, the image quality of the partial image may deteriorate. Therefore, in the present embodiment, it is used that the resolution closer to the pole is higher in the planar image developed by the equirectangular projection. Identify the region of the omnidirectional image that should be stored at a higher resolution as the region of interest, convert the omnidirectional image so that the position of the region of interest corresponds to the position of the polar region, and save it. Keep it.

注目領域決定部202は、入力画像データにおいて高解像度に保存したい領域を特定する。本実施形態では、出力I/F108を介して出力デバイス109であるディスプレイに処理対象とする全天球画像を表示し、ユーザに高解像度に保存したい被写体を指定させる。指定は、マウスやタッチなどの入力デバイス107を介して行う。本実施形態では、ユーザは注目領域としたい被写体を、マウスを用いてクリックするものとする。   The attention area determination unit 202 specifies an area to be stored at high resolution in the input image data. In the present embodiment, the omnidirectional image to be processed is displayed on the display that is the output device 109 via the output I / F 108, and the user is allowed to specify the subject to be stored at high resolution. The designation is performed via the input device 107 such as a mouse or a touch. In the present embodiment, it is assumed that the user clicks on a subject to be set as a region of interest using a mouse.

変換部206は、入力画像データを注目領域の位置に応じて変換する。変換部206は、回転量算出部203と画像回転部204からなる。回転量算出部203は、指定された注目点の位置を全天球画像の極領域に対応づけるための回転量を算出する。なお全天球画像は、正距円筒図法によって平面図に展開されているものの、球状の画像と対応している。ここで回転量とは、全天球画像を球面にマッピングした場合に座標軸を回転させ、極の位置を変更するために必要な回転の角度を意味するものである。画像回転部204は、回転量算出部203が算出した回転量に従って、画像取得部206が取得した全天球画像を実質的に回転させる。   The conversion unit 206 converts the input image data according to the position of the attention area. The conversion unit 206 includes a rotation amount calculation unit 203 and an image rotation unit 204. The rotation amount calculation unit 203 calculates a rotation amount for associating the position of the designated attention point with the polar region of the omnidirectional image. Note that the omnidirectional image is developed in a plan view by equirectangular projection, but corresponds to a spherical image. Here, the amount of rotation means the angle of rotation necessary for rotating the coordinate axis and changing the position of the pole when the omnidirectional image is mapped onto the spherical surface. The image rotation unit 204 substantially rotates the omnidirectional image acquired by the image acquisition unit 206 according to the rotation amount calculated by the rotation amount calculation unit 203.

出力部205は、画像回転部204により指定された注目点の位置を全天球画像の極領域に対応づけるように入力画像データを変換した出力画像データを出力する。   The output unit 205 outputs output image data obtained by converting the input image data so that the position of the target point designated by the image rotation unit 204 is associated with the polar region of the omnidirectional image.

また、図7に全天球画像から作成した表示画像の例を示す。前述の通り、本実施形態における画像処理装置が保持する全天球画像を、他の画像処理装置またはHMDが読み出し、図7に示すような表示画像を生成する。表示画像は、内側に全天球画像を張り付けた球を仮想カメラで撮影することで作成できる。図7からわかるように、表示画像は全天球画像の一部の領域を参照して作成される。従って本実施形態では球状の全天球画像を入力としているが、表示画像に必要な半球状の画像など全天球のうちの一部だけが画素データを持ち、一部の領域の画素データが無くても構わない。   FIG. 7 shows an example of a display image created from the omnidirectional image. As described above, the omnidirectional image held by the image processing apparatus according to the present embodiment is read by another image processing apparatus or HMD, and a display image as shown in FIG. 7 is generated. A display image can be created by shooting a sphere with a celestial sphere image on the inside with a virtual camera. As can be seen from FIG. 7, the display image is created with reference to a partial region of the omnidirectional image. Therefore, in this embodiment, a spherical omnidirectional image is input, but only a part of the omnisphere such as a hemispherical image necessary for the display image has pixel data, and pixel data of a part of the region has pixel data. It does n’t matter.

図3は、第1実施形態における画像処理の流れを示すフローチャートである。CPU101は、図3に示すフローチャートを実行可能なプログラムを読み出して実行することによって実現される。なお、以下のフローチャートの説明において、各ステップの符号をSと表記することとする。まずS301において画像取得部201は、全天球を平面画像に展開した入力画像データを取得する。   FIG. 3 is a flowchart showing the flow of image processing in the first embodiment. The CPU 101 is realized by reading and executing a program capable of executing the flowchart shown in FIG. In the following description of the flowchart, the symbol for each step is denoted as S. First, in S301, the image acquisition unit 201 acquires input image data in which the omnidirectional sphere is developed into a planar image.

S302において注目領域決定部202は、ユーザによる入力に従い、注目したい領域を定義可能な注目点を決定する。注目点とは、注目領域を代表する点である。前述の通りユーザは、ディスプレイに表示された全天球画像において、注目被写体の位置をクリックする。注目領域決定部202は、クリックされた位置を注目点(x、y)とする。ここでxとyは、画像中の座標を示し、iは決定した注目点のインデックスを示す。なお、クリックではなく、被写体を含む領域を注目領域として指定された場合は、領域の重心位置を注目点(x、y)とする。 In step S <b> 302, the attention area determination unit 202 determines an attention point capable of defining an area of interest according to an input by the user. A point of interest is a point that represents a region of interest. As described above, the user clicks the position of the subject of interest in the omnidirectional image displayed on the display. The attention area determination unit 202 sets the clicked position as the attention point (x i , y i ). Here, x and y indicate the coordinates in the image, and i indicates the index of the determined point of interest. In addition, when the area including the subject is designated as the attention area instead of the click, the center of gravity of the area is set as the attention point (x i , y i ).

S303において回転量算出部203は、注目点の位置に基づいて入力画像データの回転量を算出する。本実施形態では画像の回転は回転行列Rを使って表す。回転はオイラー角やクォータニオンなど、別の表現形式を用いてもよい。この回転量算出処理の詳細については後述する。   In S303, the rotation amount calculation unit 203 calculates the rotation amount of the input image data based on the position of the target point. In the present embodiment, image rotation is represented using a rotation matrix R. For the rotation, another expression format such as Euler angle or quaternion may be used. Details of this rotation amount calculation processing will be described later.

S304において画像回転部204は、全天球画像である入力画像データIに回転処理を実行して、画像における極領域に注目被写体が相当するように変換した全天球画像である出力画像データI’を出力する。ここで、全天球画像の回転処理は画像座標系で回転するのではなく、球面座標系で回転させる。すなわち、2次元平面上で回転するのではなく、全天球画像を球面にマッピングして、マッピングした球を回転させ、回転させた後に再度正距円筒図法により展開した平面上の画像に変換する。回転後の出力画像データI’における各画素は回転を考慮して入力画像データIから画素値をサンプリングして算出する。これは、まず、回転後の出力画像データI’における各画素(x’,y’)に対して、その画素に対応する取得した入力画像データIの座標(x、y)を計算する。次に、座標(x、y)の画素値をサンプリングして出力画像データI’における画素(x’,y’)の画素値とする。以下では、回転処理後の出力画像データI’の座標(x’,y’)に対応する入力画像データIの座標(x、y)を求める方法について述べる。まず、画像座標系の(x’,y’)を方位角と仰角に変換する。入力画像データIの幅をw、高さをhとすると、(x’,y’)に対応する方位角θ’、仰角φ’は式(1)により計算する。   In S304, the image rotation unit 204 performs a rotation process on the input image data I that is an omnidirectional image, and output image data I that is an omnidirectional image converted so that the subject of interest corresponds to a polar region in the image. 'Is output. Here, the omnidirectional image is rotated not in the image coordinate system but in the spherical coordinate system. In other words, instead of rotating on a two-dimensional plane, the omnidirectional image is mapped to a spherical surface, the mapped sphere is rotated, rotated, and then converted again to an image on a plane developed by equirectangular projection. . Each pixel in the output image data I ′ after rotation is calculated by sampling pixel values from the input image data I in consideration of rotation. First, for each pixel (x ′, y ′) in the output image data I ′ after rotation, the coordinates (x, y) of the acquired input image data I corresponding to the pixel are calculated. Next, the pixel value of the coordinates (x, y) is sampled to obtain the pixel value of the pixel (x ′, y ′) in the output image data I ′. Hereinafter, a method for obtaining the coordinates (x, y) of the input image data I corresponding to the coordinates (x ′, y ′) of the output image data I ′ after the rotation processing will be described. First, (x ′, y ′) in the image coordinate system is converted into an azimuth angle and an elevation angle. When the width of the input image data I is w and the height is h, the azimuth angle θ ′ and the elevation angle φ ′ corresponding to (x ′, y ′) are calculated by the equation (1).

Figure 2019012516
Figure 2019012516

次に方位角θ’、仰角φ’を回転行列で表し、S303において算出した全天球画像の回転行列Rの逆行列R−1と積算した行列Mを方位角、仰角の表現に変換することにより、取得した全天球画像における方位角θ、仰角φを算出する。方位角θ、仰角φを算出は、式(2)により算出される。 Next, the azimuth angle θ ′ and the elevation angle φ ′ are represented as rotation matrices, and the matrix M integrated with the inverse matrix R −1 of the rotation matrix R of the omnidirectional image calculated in S303 is converted into representations of azimuth angles and elevation angles. Thus, the azimuth angle θ and the elevation angle φ in the acquired omnidirectional image are calculated. The azimuth angle θ and the elevation angle φ are calculated by equation (2).

Figure 2019012516
Figure 2019012516

ここで、atanはアークタンジェント、asinはアークサイン関数を表す。   Here, atan represents an arc tangent and asin represents an arc sine function.

そして方位角θ、仰角φを取得した全天球画像における座標(x、y)に変換する。この変換は式(3)で計算できる。   Then, the azimuth angle θ and the elevation angle φ are converted into coordinates (x, y) in the acquired omnidirectional image. This conversion can be calculated by equation (3).

Figure 2019012516
Figure 2019012516

最後に、取得した入力画像データIの座標(x、y)の画素値を算出し、回転後の出力画像データI’の座標(x’,y’)の画素値とする。ここでは、座標(x、y)近傍の4画素から先見補間により画素値を算出し、回転後の出力画像データI’の座標(x’,y’)の画素値とする。ただし、線形補間に限らず、バイキュービックなどの補間法を利用してもよい。   Finally, the pixel value at the coordinates (x, y) of the acquired input image data I is calculated and set as the pixel value at the coordinates (x ′, y ′) of the output image data I ′ after rotation. Here, a pixel value is calculated by look-ahead interpolation from four pixels in the vicinity of the coordinates (x, y), and set as the pixel value of the coordinates (x ′, y ′) of the output image data I ′ after rotation. However, not only linear interpolation but also an interpolation method such as bicubic may be used.

S305において出力部205は、回転処理後の出力画像データと回転処理に用いた回転行列RをHDD105またはRAM102に出力する。以上が本実施形態の画像処理装置で行われる処理の流れである。   In step S <b> 305, the output unit 205 outputs the output image data after the rotation process and the rotation matrix R used for the rotation process to the HDD 105 or the RAM 102. The above is the flow of processing performed by the image processing apparatus of this embodiment.

ここで、S303において回転量算出部203が実行する回転量算出処理の詳細について説明する。回転量算出処理は、注目被写体が分解能の高い領域に相当するように入力画像データの回転量を算出する。全天球画像が正距円筒図法の場合は球の極である上下に近づくほど分解能が高く、全天球画像の中心の高さ(赤道付近)では分解能が低い。そのため、注目被写体が画像の上か下の領域、すなわち仰角の絶対値が大きくなる位置へ移動するような回転量を算出する。注目被写体が1つである場合はその点が片方の極に移動するように回転量を算出し、注目被写体が複数ある場合は1つもしくは2つの極に振り分けられるように回転量を算出する。図4は、回転量算出処理のフローチャートである。   Here, details of the rotation amount calculation processing executed by the rotation amount calculation unit 203 in S303 will be described. In the rotation amount calculation process, the rotation amount of the input image data is calculated so that the subject of interest corresponds to an area with high resolution. When the omnidirectional image is an equirectangular projection, the resolution increases as it approaches the top and bottom of the sphere pole, and the resolution is low at the center height (near the equator) of the omnidirectional image. Therefore, a rotation amount is calculated so that the subject of interest moves to a region above or below the image, that is, a position where the absolute value of the elevation angle is large. When there is only one subject of interest, the amount of rotation is calculated so that the point moves to one of the poles. When there are a plurality of subjects of interest, the amount of rotation is calculated so as to be distributed to one or two poles. FIG. 4 is a flowchart of the rotation amount calculation process.

S401において、注目点の数に応じて次に行う処理を選択する。注目領域決定部202が出力した注目点の数が1つの場合はS402、2つの場合はS403、3つ以上の場合はS409を実行する。   In step S401, a process to be performed next is selected according to the number of attention points. When the number of attention points output by the attention area determination unit 202 is one, S402 is executed, when it is two, S403 is executed, and when it is three or more, S409 is executed.

S402では注目点を極の位置へ移動する回転行列を算出する。極は正距円筒図法により表された画像において上下の2つあるが、どちらを選択してもよい。図8は、取得した全天球画像の一例を示す。点801が与えられた1点の注目点であったとする。図9は、正距円筒図法により展開された全天球画像において、点801を極のうちの天頂の1点を表す点901に移動するように回転した場合の例を示す。S402では、注目点801が点901の位置に移動する回転量を算出する。全天球画像を球として考えたとき、極は全天球画像の1番上の行に相当するため、任意の位置にある点を極に移動するような回転はピッチ方向のみの回転で表せる。この場合の回転は、注目点801の仰角φから点901の仰角π/2まで移動する回転であるため、回転量はπ/2−φである。以上の通り、1つの注目点を極に移動するような回転量は、ピッチ方向π/2−φにより算出する。 In S402, a rotation matrix for moving the attention point to the pole position is calculated. There are two poles at the top and bottom in the image represented by equirectangular projection, either of which may be selected. FIG. 8 shows an example of the acquired omnidirectional image. Assume that the point 801 is a given point of interest. FIG. 9 shows an example of a case where the point 801 is rotated so as to move to a point 901 representing one point of the zenith among the poles in the omnidirectional image developed by the equirectangular projection. In S402, the amount of rotation by which the point of interest 801 moves to the position of the point 901 is calculated. When the omnidirectional image is considered as a sphere, the pole corresponds to the top row of the omnidirectional image. Therefore, rotation that moves a point at an arbitrary position to the pole can be expressed by rotation only in the pitch direction. . Rotation in this case, since the elevation angle phi a of the point of interest 801 to elevation [pi / 2 of the point 901 is rotated to move, the rotation amount is π / 2-φ a. As described above, the rotation amount as to move the poles of one target point is calculated by the pitch direction π / 2-φ a.

S403において、指定された2つの注目点の角度差に応じてさらに処理を分岐する。2点の角度差が90度未満であればS404へ、角度差が90度以上であればS409へ進む。S404では、2つの注目点が同じ極に近づくような回転量を算出する。一方S405からS407の処理では、2つの注目点が異なる極に近づくような回転量を算出する。   In S403, the process is further branched according to the angle difference between the two specified points of interest. If the angle difference between the two points is less than 90 degrees, the process proceeds to S404, and if the angle difference is 90 degrees or more, the process proceeds to S409. In S404, a rotation amount is calculated such that the two attention points approach the same pole. On the other hand, in the processing from S405 to S407, the rotation amount is calculated such that the two attention points approach different poles.

S404において、2つ注目点(θ、φ)(θ、φ)の中点を、片方の極へ移動するような回転量を算出する。この場合の極は上下2つのどちらを選択してもよい。球の回転を考えるため、2つの注目点の中点は画像座標上ではなく、球面座標上で計算する必要がある。たとえば中点の計算には、球面線形補間などが利用できる。中点(θ、φ)の1つを極に移動する回転量は、S402と同様に、仰角がπ/2になるようにピッチ方向にのみπ/2−φを回転量として算出する。図10は、注目点802および803の2つを指定された場合の回転結果を示す図である。2つの注目点の中点が点1001のように天頂の極すなわち先頭の行に移動する回転量を算出する。一方S405では、指定された2つの注目点(θ、φ)(θ、φ)のうち、一方の注目点を極へ移動するための回転量を算出する。選択する注目点はどちらでもよいが、ここでは最初に指定された注目点(θ、φ)を選択するものとする。注目点の方位角と仰角をそれぞれθ、φとすると、方位角はθのまま、仰角をπ/2になるように、ピッチ方向にπ/2−φだけ回転するような回転行列Rを式(4)の通りに算出する。 In S404, the amount of rotation is calculated so that the middle point of the two points of interest (θ a , φ a ) (θ b , φ b ) moves to one pole. In this case, either the upper or lower pole may be selected. In order to consider the rotation of the sphere, the midpoint of the two points of interest must be calculated on the spherical coordinates, not on the image coordinates. For example, spherical linear interpolation can be used to calculate the midpoint. The amount of rotation to move one of the midpoints (θ c , φ c ) to the pole is calculated as π / 2−φ a only in the pitch direction so that the elevation angle is π / 2, as in S402. To do. FIG. 10 is a diagram illustrating a rotation result when two attention points 802 and 803 are designated. The amount of rotation by which the midpoint of the two points of interest moves to the zenith pole, that is, the top row, as indicated by point 1001, is calculated. On the other hand, in S405, the amount of rotation for moving one of the two points of interest (θ a , φ a ) (θ b , φ b ) to the pole is calculated. The attention point to be selected may be either, but here, the attention point (θ a , φ a ) designated first is selected. When the azimuth angle and elevation angle of the point of interest are θ a and φ a respectively, the rotation is such that the azimuth angle is θ a and the elevation angle is π / 2 and the pitch direction is rotated by π / 2−φ a. Matrix R A is calculated as in equation (4).

Figure 2019012516
Figure 2019012516

S406では、S405において算出した回転行列Rを入力画像データに適用した後、全天球画像においてS405で選択されなかった注目点(θ、φ)の方位角が0度となるようなヨー方向の回転量を算出する。これは、注目点の方位角をθとしたとき、−θだけ回転する回転行列Rを式(5)の通りに計算する。 In S406, after applying the rotation matrix RA calculated in S405 to the input image data, the azimuth of the attention point (θ b , φ b ) not selected in S405 in the omnidirectional image becomes 0 degree. The amount of rotation in the yaw direction is calculated. This is to calculate a rotation matrix R B that rotates by −θ b when the azimuth angle of the target point is θ b as shown in Equation (5).

Figure 2019012516
Figure 2019012516

S407において、入力画像データに回転行列RA、を適用した後の2つの注目点の中点(θ、φ)が正面となるようなピッチ方向の回転を行う回転行列Rを算出する。回転行列RA、を適用することで、1つの注目点は極に移動し、もう1つの注目点は方位角0の位置(0、φB2)に移動している。そのため、2つの注目点の中点は式(6)によって表される。
(θ、φ)=(0、(π/2−φb2)×1/2) (6)
In step S407, a rotation matrix R c that performs rotation in the pitch direction so that the midpoints (θ c , φ c ) of the two attention points after applying the rotation matrices R A and R B to the input image data is the front surface. calculate. By applying the rotation matrices R A and R B , one point of interest has moved to the pole, and the other point of interest has moved to the position (0, φ B2 ) at the azimuth angle 0. Therefore, the midpoint between the two attention points is expressed by Equation (6).
(Θ, φ) = (0, (π / 2−φ b2 ) × 1/2) (6)

中点を正面(θ、φ)=(0、0)に移動するための回転を求めるには、ピッチ方向に−(π/2−φb2)×1/2だけ回転を行う回転行列Rを式(7)の通りに計算する。 In order to obtain rotation for moving the midpoint to the front (θ, φ) = (0, 0), a rotation matrix R C that rotates by − (π / 2−φ b2 ) × 1/2 in the pitch direction. Is calculated as in equation (7).

Figure 2019012516
Figure 2019012516

S408では、2つの注目点(θ、φ)(θ、φ)が互いに異なる極に近づくような回転を計算する。これはS405〜S407で計算した回転行列RA、、Rを積算することで計算できる。 In S408, the rotation is calculated such that the two points of interest (θ a , φ a ) (θ b , φ b ) approach different poles. This can be calculated by accumulating the rotation matrices R A, R B , and R C calculated in S405 to S407.

S409では、指定された3つ以上の注目点を2つのグループに分類する。本実施形態では、k−means法を用いて分類する。その際の注目点間の距離は球面座標上での距離を利用する。S409以降の処理では、分類された2つのグループの重心をそれぞれ2つの注目点として扱う。これにより、注目点が2つの場合と同様の処理を行うことができる。例えば、図8の点802、803、804が注目点として入力された場合、1つ目のグループが点804、2つ目のグループが点802と点803となる。1つ目のグループは点804が注目点となり、2つ目のグループは点802と点803の重心位置が注目点となる。以上が本実施形態の回転量算出部203で行われる回転量算出処理を完了する。   In S409, the specified three or more attention points are classified into two groups. In this embodiment, classification is performed using the k-means method. In this case, the distance between the points of interest uses the distance on the spherical coordinates. In the processing after S409, the centroids of the two classified groups are treated as two attention points, respectively. As a result, the same processing as in the case where there are two attention points can be performed. For example, when the points 802, 803, and 804 in FIG. 8 are input as points of interest, the first group is the point 804 and the second group is the point 802 and the point 803. In the first group, the point 804 is an attention point, and in the second group, the center of gravity positions of the points 802 and 803 are the attention points. The above completes the rotation amount calculation process performed by the rotation amount calculation unit 203 of the present embodiment.

以上の通り第1実施形態では、全天球画像など球状の画像において分解能の高い領域に保存しておくことが望まれる被写体(領域)を特定し、特定した被写体が全天球画像において極領域に相当するように回転した全天球画像に変換して保存しておく。これにより、全天球画像または全天球画像の部分画像に対して、縮小などの画像処理を行う際には、注目被写体を高解像度に維持することができる。   As described above, in the first embodiment, a subject (region) that is desired to be stored in a high-resolution region in a spherical image such as a spherical image is specified, and the specified subject is a polar region in the spherical image. Is converted into a omnidirectional image rotated so as to correspond to and saved. Thereby, when performing image processing such as reduction on the omnidirectional image or a partial image of the omnidirectional image, the subject of interest can be maintained at a high resolution.

<第2実施形態>
第1実施形態では、1枚の全天球画像を入力画像データとして、所望の回転処理後の全天球画像を保存する方法について説明した。第2実施形態においては、複数枚の全天球画像ではない撮像画像を合成して全天球画像を保存する場合に、注目被写体を高解像度に保存する方法について説明する。この例では、合成後の画像ではなく、合成前に座標系を回転して全天球画像を生成する。なお、第1実施形態と同様の構成、処理については同一の符号を付し、詳細な説明を省略する。
Second Embodiment
In the first embodiment, the method of storing a omnidirectional image after a desired rotation process using one omnidirectional image as input image data has been described. In the second embodiment, a method for storing a subject of interest with high resolution when a plurality of captured images that are not omnidirectional images are combined and the omnidirectional image is stored will be described. In this example, not the synthesized image but the omnidirectional image is generated by rotating the coordinate system before the synthesis. In addition, about the structure and process similar to 1st Embodiment, the same code | symbol is attached | subjected and detailed description is abbreviate | omitted.

図12は、第2実施形態における画像処理装置の論理構成を示すブロック図である。また、図13は、図12に示す各構成が実行する処理のフローチャートを示す。CPU101は、ROM103又はHDD105に格納された図13のフローチャートを実現できるプログラムを読み出してRAM102をワークエリアとして実行することで、図12に示す各構成としての役割を果たす。   FIG. 12 is a block diagram illustrating a logical configuration of the image processing apparatus according to the second embodiment. FIG. 13 is a flowchart of processing executed by each configuration shown in FIG. The CPU 101 plays a role as each component shown in FIG. 12 by reading a program that can realize the flowchart of FIG. 13 stored in the ROM 103 or the HDD 105 and executing the RAM 102 as a work area.

S1301において画像取得部1201は、HDD105またはRAM102から取得した複数枚の画像データを姿勢取得部1202へ出力する。なお、複数枚の画像データは同じ視点から撮影したものとする。本実施形態でも第1実施形態と同様に全天球画像は正距円筒図法により展開された平面画像であるものとして扱う。また、説明を簡単にするため、画像データはレンズの光軸と画像面の交点が画像の中心で、歪みがなく、同一視点から撮影されたものを考えるが、以下のステップでは、これらを考慮した処理を行うようにしてもよい。   In step S <b> 1301, the image acquisition unit 1201 outputs a plurality of pieces of image data acquired from the HDD 105 or the RAM 102 to the posture acquisition unit 1202. Note that a plurality of pieces of image data are taken from the same viewpoint. In this embodiment as well, as in the first embodiment, the omnidirectional image is treated as a flat image developed by equirectangular projection. In addition, for the sake of simplicity, the image data is taken from the same viewpoint with the intersection of the optical axis of the lens and the image plane being the center of the image without distortion, but these are taken into consideration in the following steps. You may make it perform the process which carried out.

S1302において姿勢取得部1202は、画像取得部1201から入力された画像を撮影した際のカメラの姿勢を示す姿勢情報をHDD105またはRAM102から取得する。カメラの姿勢はカメラがどちらを向いているかという情報であり、回転行列で表現される。ここでは、カメラの姿勢があらかじめ計算されているものとしたが、画像から算出しても構わない。   In step S <b> 1302, the posture acquisition unit 1202 acquires posture information indicating the posture of the camera when the image input from the image acquisition unit 1201 is captured from the HDD 105 or the RAM 102. The posture of the camera is information indicating which direction the camera is facing, and is represented by a rotation matrix. Here, the posture of the camera is calculated in advance, but may be calculated from an image.

S1303において注目領域決定部1203は、1つ以上の注目領域を注目点として決定する。注目点(x、y)を極座標系に変換し、方位角θ,仰角φ算出する。これは、注目点を含む画像を撮影したカメラの姿勢を表す回転行列Rを基にカメラの視点から画像中の注目点(x、y)を通る光線の角度θ,φを算出することで取得する。ここで、jは画像のインデックスを表す。カメラの焦点距離をfとすると、光線と画像平面の交点の座標Xは式(8)により計算できる。 In step S1303, the attention area determination unit 1203 determines one or more attention areas as attention points. The point of interest (x i , y i ) is converted into a polar coordinate system, and the azimuth angle θ i and elevation angle φ i are calculated. This is based on the rotation matrix R j representing the posture of the camera that captured the image including the attention point, and the angles θ i and φ i of the light rays passing through the attention point (x i , y i ) in the image from the camera viewpoint. Obtain by calculating. Here, j represents an image index. Assuming that the focal length of the camera is f, the coordinate X of the intersection of the light beam and the image plane can be calculated by equation (8).

Figure 2019012516
Figure 2019012516

原点からみたときの3次元点Xの方位角と仰角をθ,φとし、注目領域決定部1203は注目点(θi,φi)を回転量算出部1204に出力する。 The azimuth and elevation angles of the three-dimensional point X when viewed from the origin are θ i and φ i , and the attention area determination unit 1203 outputs the attention point (θi, φi) to the rotation amount calculation unit 1204.

S1304において回転量算出部1204は、注目点(θi,φi)の位置に基づいて画像の回転量を算出し、姿勢更新部1205に出力する。本実施形態では、第1実施形態と同様にして全天球画像の回転量を計算する。   In step S <b> 1304, the rotation amount calculation unit 1204 calculates the rotation amount of the image based on the position of the target point (θi, φi), and outputs it to the posture update unit 1205. In the present embodiment, the rotation amount of the omnidirectional image is calculated in the same manner as in the first embodiment.

S1305において姿勢更新部1205は、全天球画像の回転量を表す回転行列Rと各画像を撮影したカメラの姿勢Rに基づいて、カメラの姿勢情報を更新する。カメラの姿勢Rに画像の回転量を表す回転行列Rを積算した姿勢R’次の処理でカメラの姿勢として利用する。この更新により、入力画像の座標系を回転した座標系で合成できるため、合成で得られる全天球画像を回転することができる。 Attitude updating unit 1205 in S1305, on the basis of the position R j of the cameras taking the rotation matrix R and the image representing the amount of rotation of the celestial sphere image, and updates the posture information of the camera. Utilized as the posture of the camera rotation matrix R the integrated posture R j 'next processing indicating the amount of rotation of the posture R j to the image of the camera. By this update, since the coordinate system of the input image can be synthesized with the rotated coordinate system, the omnidirectional image obtained by the synthesis can be rotated.

S1306において画像合成部1206は、複数の画像データIと更新した姿勢Rを入力として、画像を合成する。画像合成部1206は、入力された各カメラの姿勢に基づいて各カメラにより撮像された画像を球面座標系の全天球画像に投影する。そして、各画像を投影した際の重複領域において、重複する画像の画素値をブレンドする。画像合成部1206は、合成した全天球画像データを出力部1207に出力する。 In step S < b> 1306, the image composition unit 1206 composes an image by using the plurality of image data I j and the updated posture R j as inputs. The image composition unit 1206 projects an image captured by each camera based on the input posture of each camera onto an omnidirectional image in a spherical coordinate system. Then, the pixel values of the overlapping images are blended in the overlapping region when each image is projected. The image composition unit 1206 outputs the synthesized omnidirectional image data to the output unit 1207.

S1307では、出力部1207が回転後の全天球画像とその回転行列RをHDD105またはRAM102に出力する。以上で第2実施形態における画像処理は完了する。本実施形態によれば、複数枚の入力画像から全天球画像を合成する際においても、注目領域が高解像度に保存できる位置に格納されるような座標系で合成することで、注目被写体を高解像度に保存することができる。   In step S <b> 1307, the output unit 1207 outputs the rotated spherical image and its rotation matrix R to the HDD 105 or RAM 102. Thus, the image processing in the second embodiment is completed. According to the present embodiment, even when synthesizing an omnidirectional image from a plurality of input images, by synthesizing in a coordinate system such that the region of interest is stored at a position where it can be stored at high resolution, It can be saved in high resolution.

<第3実施形態>
上述の実施形態では、手動で設定した注目領域に基づいて1枚の全天球画像に回転処理した後に保存する方法について説明した。第3実施形態においては、自動で注目被写体を検出して保存する方法について説明する。この例では、設定した検出モードに基づいて注目被写体を検出する。なお、第1実施形態と同様の構成、処理については同一の符号を付し、詳細な説明を省略する。
<Third Embodiment>
In the above-described embodiment, a method has been described in which a single omnidirectional image is stored after being rotated based on a manually set attention area. In the third embodiment, a method for automatically detecting and storing a subject of interest will be described. In this example, the subject of interest is detected based on the set detection mode. In addition, about the structure and process similar to 1st Embodiment, the same code | symbol is attached | subjected and detailed description is abbreviate | omitted.

図14は、第3実施形態における画像処理装置の論理構成を示すブロック図である。また、図15は、図14に示す各構成が実行する処理のフローチャートを示す。CPU101は、ROM103又はHDD105に格納された図14のフローチャートを実現できるプログラムを読み出してRAM102をワークエリアとして実行することで、図14に示す各構成としての役割を果たす。   FIG. 14 is a block diagram illustrating a logical configuration of the image processing apparatus according to the third embodiment. FIG. 15 is a flowchart of processing executed by each configuration shown in FIG. The CPU 101 plays a role as each component shown in FIG. 14 by reading a program that can realize the flowchart of FIG. 14 stored in the ROM 103 or the HDD 105 and executing the RAM 102 as a work area.

S1401では、検出モード選択部1401は画像から注目領域を検出する方法を決定するためのモードを選択する。検出モードは、入力された全天球画像において注目領域として設定する特徴を特定するモードである。ここでは検出モードの例として、人の顔を検出する人物モード、動物を検出するペットモードがあるものとする。人物モードとペットモードのうちいずれかをユーザが選択する。検出モード選択部1401は、指定されたモードを注目領域決定部1402に出力する。検出モードは、統計情報を検出に利用する統計モード、撮影時の情報を利用する撮影時着目モード、周波数の高い領域を検出する風景モードなど別のモードを選択できるようにしてもよい。また実施形態では、指定した検出モードにおいて注目領域が検出されない場合に使用される既定の検出モードも設定する。   In S1401, the detection mode selection unit 1401 selects a mode for determining a method for detecting a region of interest from an image. The detection mode is a mode for specifying a feature to be set as a region of interest in the input omnidirectional image. Here, as examples of the detection mode, there are a person mode for detecting a human face and a pet mode for detecting an animal. The user selects either the portrait mode or the pet mode. The detection mode selection unit 1401 outputs the designated mode to the attention area determination unit 1402. As the detection mode, another mode such as a statistical mode that uses statistical information for detection, a focus mode at the time of shooting that uses information at the time of shooting, or a landscape mode that detects a high-frequency region may be selected. In the embodiment, a default detection mode used when the attention area is not detected in the designated detection mode is also set.

S1402において、注目領域決定部1402が検出モード選択部1401から出力された検出モードに基づいて、自動的に入力画像データから注目点を決定する。検出モードが人物モードである場合、入力画像データに対して顔検出処理を行い、検出された顔領域を注目領域とする。ペットモードである場合、入力画像データから動物検出処理を行い、検出された動物領域を注目領域とする。注目領域が1つも検出されない場合は、既定の検出モードを使用して検出を行う。ここでは既定の検出モードとして、風景モードが設定されている。風景モードでは、入力された全天球画像を、複数の領域に分割して、各領域において周波数を計算し、高周波成分の多い領域を注目領域とする。注目領域決定部1402は、全天球画像において検出された領域の重心位置を注目点(xi、yi)とする。   In step S <b> 1402, the attention area determination unit 1402 automatically determines a point of interest from the input image data based on the detection mode output from the detection mode selection unit 1401. When the detection mode is the person mode, face detection processing is performed on the input image data, and the detected face area is set as the attention area. In the case of the pet mode, an animal detection process is performed from the input image data, and the detected animal region is set as a region of interest. If no region of interest is detected, detection is performed using a predetermined detection mode. Here, the landscape mode is set as the default detection mode. In the landscape mode, the input omnidirectional image is divided into a plurality of regions, the frequency is calculated in each region, and a region having a high frequency component is set as a region of interest. The attention area determination unit 1402 sets the position of the center of gravity of the area detected in the omnidirectional image as the attention point (xi, yi).

以上で第3実施形態における画像処理は完了する。本実施形態によれば、検出モードに基づいて注目領域を自動で指定することができ、シーンに合わせて注目被写体を高解像度に保存することができる。   Thus, the image processing in the third embodiment is completed. According to the present embodiment, the attention area can be automatically specified based on the detection mode, and the subject of interest can be stored at a high resolution according to the scene.

<その他の実施形態>
前述の実施形態では、高解像度に保存しておくことが望ましい注目領域を特定し、注目領域が極付近の位置に相当するように、全天球画像を生成した。前述の通り、正距円筒図法により展開された平面図面では、赤道付近はもっとも分解能が低い。そこで全天球画像における被写体のうち、地面や床、または空など非注目領域を特定し、非注目領域を優先的に赤道付近の位置に相当するように全天球画像を生成してもよい。これは、分解能が高い位置に非注目領域が対応することのないように全天球画像を生成することで、分解能が高い位置に保存しておくことが望まれる注目領域を間接的に特定していることに他ならない。
<Other embodiments>
In the above-described embodiment, an attention area that is desired to be stored at a high resolution is specified, and an omnidirectional image is generated so that the attention area corresponds to a position near the pole. As described above, in the plan view developed by the equirectangular projection, the resolution near the equator is the lowest. Therefore, among the subjects in the omnidirectional image, a non-focused area such as the ground, floor, or sky may be specified, and the omnidirectional image may be generated so that the non-focused area preferentially corresponds to a position near the equator. . This is because an omnidirectional image is generated so that a non-attention area does not correspond to a position with a high resolution, thereby indirectly identifying an attention area that is desired to be stored at a position with a high resolution. It is none other than that.

本発明は、上述の実施形態の1以上の機能を実現するプログラムを、ネットワーク又は記憶媒体を介してシステム又は装置に供給し、そのシステム又は装置のコンピュータにおける1つ以上のプロセッサーがプログラムを読出し実行する処理でも実現可能である。また、1以上の機能を実現する回路(例えば、ASIC)によっても実現可能である。   The present invention supplies a program that realizes one or more functions of the above-described embodiments to a system or apparatus via a network or a storage medium, and one or more processors in a computer of the system or apparatus read and execute the program This process can be realized. It can also be realized by a circuit (for example, ASIC) that realizes one or more functions.

201 画像取得部
202 注目領域決定部
203 回転量算出部
204 画像回転部
205 出力部
DESCRIPTION OF SYMBOLS 201 Image acquisition part 202 Attention area determination part 203 Rotation amount calculation part 204 Image rotation part 205 Output part

Claims (20)

画像を表すための少なくとも1つ以上の入力画像データを取得する取得手段と、
前記入力画像データにおける注目領域を決定する決定手段と、
前記注目領域に基づいて、前記入力画像データを、正距円筒図法により前記画像の少なくとも一部を表す出力画像データに変換する変換手段とを有することを特徴とする画像処理装置。
Obtaining means for obtaining at least one or more input image data for representing an image;
Determining means for determining a region of interest in the input image data;
An image processing apparatus comprising: conversion means for converting the input image data into output image data representing at least a part of the image by equirectangular projection based on the attention area.
前記変換手段は、前記出力画像データを球にマッピングした場合に、前記注目領域が球の極付近の位置に相当するように、前記入力画像データを前記出力画像データに変換することを特徴とする請求項1に記載の画像処理装置。   The converting means converts the input image data into the output image data so that the region of interest corresponds to a position near the pole of the sphere when the output image data is mapped to a sphere. The image processing apparatus according to claim 1. 前記入力画像データおよび前記出力画像データは、全天球画像を表し、
前記出力画像データが表す全天球画像は、前記入力画像データが表す全天球画像における被写体の位置を変更された画像であることを特徴とする請求項1または2に記載の画像処理装置。
The input image data and the output image data represent a spherical image,
The image processing apparatus according to claim 1, wherein the omnidirectional image represented by the output image data is an image obtained by changing a position of a subject in the omnidirectional image represented by the input image data.
前記変換手段は、前記入力画像データが表す画像における前記注目領域の位置を変更することを特徴とする請求項1乃至3の何れか一項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the conversion unit changes a position of the region of interest in an image represented by the input image data. 前記決定手段が前記注目領域を2つ指定した場合、前記変換手段は、前記2つの注目領域の角度差に応じて、前記入力画像データを前記出力画像データに変換することを特徴とする請求項1乃至4の何れか一項に記載の画像処理装置。   The said determining means converts the said input image data into the said output image data according to the angle difference of the said 2 attention area, when the said determination means designates the said 2 attention area. The image processing apparatus according to any one of 1 to 4. 前記変換手段は、2つの注目領域の角度差が90度以上である場合は異なる極の位置に、角度差が90度未満である場合は同じ極の位置に近づけるように、前記入力画像データを前記出力画像データに変換することを特徴とする請求項5に記載の画像処理装置。   The conversion means converts the input image data so that the angle difference between the two regions of interest is 90 degrees or more, and the position of the different poles approaches the position of the same pole when the angle difference is less than 90 degrees. The image processing apparatus according to claim 5, wherein the image processing apparatus converts the output image data. 前記決定手段が3つ以上の前記注目領域を指定した場合、前記変換手段は、前記注目領域の位置に応じて2つのグループに分類することを特徴とする請求項5または6に記載の画像処理装置。   7. The image processing according to claim 5, wherein when the determining unit specifies three or more regions of interest, the converting unit classifies the regions into two groups according to the positions of the regions of interest. apparatus. 前記取得手段は、球状の画像を表す1つの入力画像データを取得し、
前記変換手段は、前記取得手段が取得した入力画像データを球面座標系において回転することにより、前記出力画像データを得ることを特徴とする請求項1乃至7の何れか一項に記載の画像処理装置。
The acquisition means acquires one input image data representing a spherical image,
The image processing according to claim 1, wherein the conversion unit obtains the output image data by rotating the input image data acquired by the acquisition unit in a spherical coordinate system. apparatus.
前記変換手段は、前記注目領域を代表する注目点の座標が前記出力画像データの上部または下部に近づくように、球面座標系での前記注目点の回転量を算出する算出手段と、
前記回転量に従って前記入力画像データを回転する回転処理手段とを有することを特徴とする請求項8に記載の画像処理装置。
The conversion means calculates a rotation amount of the attention point in a spherical coordinate system so that the coordinates of the attention point representing the attention area approach the upper part or the lower part of the output image data;
The image processing apparatus according to claim 8, further comprising a rotation processing unit that rotates the input image data according to the rotation amount.
さらに、前記注目領域を決定するためのモードを選択する選択手段を有し、
前記決定手段は、前記検出モードに基づいて複数の注目領域を自動で検出することを特徴とする請求項1乃至9の何れか一項に記載の画像処理装置。
Furthermore, it has a selection means for selecting a mode for determining the region of interest,
The image processing apparatus according to claim 1, wherein the determination unit automatically detects a plurality of regions of interest based on the detection mode.
前記決定手段は、前記選択手段によって選択された検出モードでは前記注目領域を検出できなかった場合、予め設定された検出モードを利用して注目領域を検出することを特徴とする請求項10に記載の画像処理装置。   The said determination means detects an attention area | region using the preset detection mode, when the said attention area cannot be detected in the detection mode selected by the said selection means. Image processing apparatus. 前記決定手段は、ユーザからの指定に応じて前記注目領域を決定することを特徴とする請求項1乃至9の何れか一項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the determination unit determines the region of interest in accordance with a designation from a user. 前記出力画像データが表す平面画像において、最上部および最下部の付近に位置する画素の分解能の方が、中央横線の付近に位置する画素の分解能よりも高く、前記変換手段は、前記注目領域が前記平面画像における最上部および最下部の付近に位置するように変換することを特徴とする請求項1乃至12の何れか一項に記載の画像処理装置。   In the planar image represented by the output image data, the resolution of the pixels located near the top and bottom is higher than the resolution of the pixels located near the central horizontal line. The image processing apparatus according to claim 1, wherein the image processing apparatus performs conversion so as to be positioned in a vicinity of an uppermost part and a lowermost part of the planar image. 前記入力画像データは、視点の異なる複数の撮像画像であり、前記変換手段は、前記複数の撮像画像から前記出力画像データを生成することを特徴とする請求項1または2に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the input image data is a plurality of captured images having different viewpoints, and the conversion unit generates the output image data from the plurality of captured images. . さらに、前記複数の撮像装置それぞれを撮影した際のカメラの姿勢を示す姿勢情報を取得する姿勢取得手段と、
前記姿勢情報に基づいて、前記複数の撮像装置から全天球画像を合成する合成手段を有し、
前記変換手段は、前記合成手段が合成した全天球画像を、前記出力画像データに変換することを特徴とする請求項14に記載の画像処理装置。
Furthermore, posture acquisition means for acquiring posture information indicating the posture of the camera when each of the plurality of imaging devices is photographed,
Based on the posture information, comprising a synthesizing unit for synthesizing an omnidirectional image from the plurality of imaging devices;
The image processing apparatus according to claim 14, wherein the conversion unit converts the omnidirectional image synthesized by the synthesis unit into the output image data.
前記選択手段は、人物を検出し、検出した人物の少なくとも1つを前記注目領域とする人物モードを含むことを特徴とする請求項10または11に記載の画像処理装置。   The image processing apparatus according to claim 10, wherein the selection unit includes a person mode that detects a person and uses at least one of the detected persons as the attention area. 前記選択手段は、前記入力画像データを複数の領域に分割し、各領域で周波数を計算し、高周波成分の多い領域を前記注目領域とすることを特徴とする請求項10または11に記載の画像処理装置。   12. The image according to claim 10, wherein the selection unit divides the input image data into a plurality of regions, calculates a frequency in each region, and sets a region having a high frequency component as the region of interest. Processing equipment. 前記入力画像データおよび前記出力画像データは、ある視点から全方位の光線情報を保持する全天球画像であることを特徴とする請求項1乃至8の何れか一項に記載の画像処理装置。   The image processing apparatus according to claim 1, wherein the input image data and the output image data are omnidirectional images that hold light information in all directions from a certain viewpoint. コンピュータを請求項1乃至9の何れか一項に記載された画像処理装置として機能させるためのプログラム。   A program for causing a computer to function as the image processing apparatus according to any one of claims 1 to 9. 球状の画像を表すための少なくとも1つ以上の入力画像データを取得する取得工程と、前記入力画像データにおける注目領域を決定する決定工程と、
前記注目領域に基づいて、前記入力画像データを、正距円筒図法により球状の画像を表す出力画像データに変換する変換工程とを有し、
前記変換工程は、前記出力画像データを球面にマッピングした場合に、前記注目領域が球面の極付近の位置に相当するように、前記入力画像データを前記出力画像データに変換することを特徴とする画像処理方法。
An acquisition step of acquiring at least one or more input image data for representing a spherical image; a determination step of determining a region of interest in the input image data;
Converting the input image data into output image data representing a spherical image by equirectangular projection based on the region of interest;
The converting step converts the input image data into the output image data so that the region of interest corresponds to a position near a pole of a spherical surface when the output image data is mapped onto a spherical surface. Image processing method.
JP2018076383A 2017-06-30 2018-04-11 Image processing device and image processing method Active JP7150460B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
US16/007,323 US10664947B2 (en) 2017-06-30 2018-06-13 Image processing apparatus and image processing method to represent part of spherical image in planar image using equidistant cylindrical projection

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
JP2017128956 2017-06-30
JP2017128956 2017-06-30

Publications (3)

Publication Number Publication Date
JP2019012516A true JP2019012516A (en) 2019-01-24
JP2019012516A5 JP2019012516A5 (en) 2021-05-27
JP7150460B2 JP7150460B2 (en) 2022-10-11

Family

ID=65228014

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2018076383A Active JP7150460B2 (en) 2017-06-30 2018-04-11 Image processing device and image processing method

Country Status (1)

Country Link
JP (1) JP7150460B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022259296A1 (en) * 2021-06-07 2022-12-15 三菱電機株式会社 Image generation system and image processing method

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012129814A (en) * 2010-12-15 2012-07-05 Sanyo Electric Co Ltd Image processor
JP2015220706A (en) * 2014-05-21 2015-12-07 三菱電機株式会社 Imaging apparatus
JP2016167739A (en) * 2015-03-10 2016-09-15 株式会社リコー Image processing system, image processing method, and program

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2012129814A (en) * 2010-12-15 2012-07-05 Sanyo Electric Co Ltd Image processor
JP2015220706A (en) * 2014-05-21 2015-12-07 三菱電機株式会社 Imaging apparatus
JP2016167739A (en) * 2015-03-10 2016-09-15 株式会社リコー Image processing system, image processing method, and program

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
中澤正和. 外1名: ""全天球ボールカメラによる撮影動画の視点固定手法の提案"", 第24回インタラクティブシステムとソフトウェアに関するワークショップ, JPN6022011780, 16 December 2016 (2016-12-16), JP, ISSN: 0004736579 *

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2022259296A1 (en) * 2021-06-07 2022-12-15 三菱電機株式会社 Image generation system and image processing method

Also Published As

Publication number Publication date
JP7150460B2 (en) 2022-10-11

Similar Documents

Publication Publication Date Title
KR101885778B1 (en) Image stitching for three-dimensional video
AU2017246470B2 (en) Generating intermediate views using optical flow
US11748906B2 (en) Gaze point calculation method, apparatus and device
JP6672315B2 (en) Image generation device and image display control device
TW200825984A (en) Modeling and texturing digital surface models in a mapping application
US10664947B2 (en) Image processing apparatus and image processing method to represent part of spherical image in planar image using equidistant cylindrical projection
JP2010109783A (en) Electronic camera
US11272153B2 (en) Information processing apparatus, method for controlling the same, and recording medium
WO2022242395A1 (en) Image processing method and apparatus, electronic device and computer-readable storage medium
CN110945868B (en) Apparatus and method for generating a tiled three-dimensional image representation of a scene
CN110998671B (en) Three-dimensional reconstruction method, device, system and storage medium
WO2020151268A1 (en) Generation method for 3d asteroid dynamic map and portable terminal
JP6708444B2 (en) Image processing apparatus and image processing method
CN107862652B (en) Aerial view generation method and device
WO2020262392A1 (en) Information processing device, information processing method, and program
JP7150460B2 (en) Image processing device and image processing method
KR20210115281A (en) Apparatus and Method for Selecting Camera Providing Input Images to Synthesize Virtual View Images
JP6685814B2 (en) Imaging device and control method thereof
JP3660108B2 (en) Image storage method and machine-readable medium
WO2018150086A2 (en) Methods and apparatuses for determining positions of multi-directional image capture apparatuses
JP2005063012A (en) Full azimuth camera motion and method and device for restoring three-dimensional information and program and recording medium with the same recorded
EP3591609B1 (en) Horizontal calibration method and system for panoramic image or video, and portable terminal
JP5001400B2 (en) Shield removal display device
JP2020088571A (en) Management system, information processing system, information processing method and program
JP2020160756A (en) Image generation device, image generation method, and program

Legal Events

Date Code Title Description
A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20210409

A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20210409

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20220314

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20220329

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20220527

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20220928

R151 Written notification of patent or utility model registration

Ref document number: 7150460

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151