JP2022068983A - Video processing device and program thereof - Google Patents
Video processing device and program thereof Download PDFInfo
- Publication number
- JP2022068983A JP2022068983A JP2020177854A JP2020177854A JP2022068983A JP 2022068983 A JP2022068983 A JP 2022068983A JP 2020177854 A JP2020177854 A JP 2020177854A JP 2020177854 A JP2020177854 A JP 2020177854A JP 2022068983 A JP2022068983 A JP 2022068983A
- Authority
- JP
- Japan
- Prior art keywords
- image
- memory block
- pixel
- pixels
- conversion
- 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.)
- Pending
Links
- 238000012545 processing Methods 0.000 title claims abstract description 49
- 238000006243 chemical reaction Methods 0.000 claims abstract description 73
- 230000002093 peripheral effect Effects 0.000 claims abstract description 11
- 238000000034 method Methods 0.000 claims description 11
- 230000009466 transformation Effects 0.000 claims description 4
- 230000006870 function Effects 0.000 claims 1
- 238000010586 diagram Methods 0.000 description 6
- 238000012986 modification Methods 0.000 description 6
- 230000004048 modification Effects 0.000 description 6
- 239000004065 semiconductor Substances 0.000 description 2
- 238000007796 conventional method Methods 0.000 description 1
- 230000000694 effects Effects 0.000 description 1
- 238000013507 mapping Methods 0.000 description 1
Images
Abstract
Description
本発明は、バーチャルリアリティ映像を生成する映像処理装置およびそのプログラムに関する。 The present invention relates to a video processing device for generating virtual reality video and a program thereof.
近年、ヘッドマウントディスプレイ(以下、HMD)、ドーム型ディスプレイ等を利用して、遠隔地の様子をユーザがその場にいるように体験できるバーチャルリアリティ(VR;Virtual Reality)サービスが普及してきている。
従来、VR用の実写円天周動映像は、広角レンズ(魚眼レンズ)を使用したカメラを複数配置して、それぞれのカメラが撮影した映像を、フレーム画像(広角画像)ごとに正距円筒図法(エクイレクタングラー;equirectangular)により平面展開した後、同一の領域を画素単位で結合(スティッチング)することで、平面映像として生成される。
なお、正距円筒図法は、変換後の画素を、変換前の画素を用いて補間する。この補間の手法として、変換前の複数の画素を用いてバイリニア補間等を行う手法が開示されている(特許文献1参照)。
そして、HMD等は、平面映像を1天球の360度全体に逆変換してマッピングすることで、VR映像の表示を行う。
In recent years, a virtual reality (VR) service that allows a user to experience a remote location as if he / she is there by using a head-mounted display (hereinafter, HMD), a dome-shaped display, or the like has become widespread.
Conventionally, for live circular celestial motion images for VR, multiple cameras using wide-angle lenses (fisheye lenses) are arranged, and the images taken by each camera are equirectangular projection (wide-angle image) for each frame image (wide-angle image). It is generated as a flat image by expanding the plane with an equirectangular (equirectangular) and then joining (stitching) the same region on a pixel-by-pixel basis.
In the equirectangular projection, the converted pixels are interpolated using the unconverted pixels. As a method of this interpolation, a method of performing bilinear interpolation or the like using a plurality of pixels before conversion is disclosed (see Patent Document 1).
Then, the HMD or the like displays the VR image by inversely converting the planar image to the entire 360 degrees of one celestial sphere and mapping it.
正距円筒図法を用いて画像を正距円筒図に変換する場合、従来のように、バイリニア補間等を用いると、入力画像から変換前の複数の画素を読み込む必要がある。
特に、入力画像を記憶するメモリには、一般的に1ライン単位で読み出しが行われるDRAMが用いられる。例えば、バイリニア補間を行うには、変換後の1画素の画素値を計算する際に、DRAMから4画素(2×2画素)の画素値を参照するために、1画素ごとに1ラインの読み出しが必要になる。
そのため、従来の手法では、高速に補間演算を行うことができないという問題がある。
When converting an image into an equirectangular projection using equirectangular projection, it is necessary to read a plurality of pixels before conversion from the input image when bilinear interpolation or the like is used as in the conventional case.
In particular, as a memory for storing an input image, a DRAM that is read out in units of one line is generally used. For example, in order to perform bilinear interpolation, when calculating the pixel value of one pixel after conversion, one line is read out for each pixel in order to refer to the pixel value of four pixels (2 × 2 pixels) from the DRAM. Is required.
Therefore, there is a problem that the conventional method cannot perform the interpolation calculation at high speed.
本発明は、このような問題点に鑑みてなされたもので、DRAMへのアクセスを減らして、高速に補間を伴う映像の変換処理を行うことが可能な映像処理装置およびそのプログラムを提供することを課題とする。 The present invention has been made in view of such problems, and provides a video processing apparatus and a program thereof capable of reducing access to DRAM and performing video conversion processing accompanied by interpolation at high speed. Is the subject.
前記課題を解決するため、本発明に係る映像処理装置は、補間を伴う変換処理により、入力映像を出力映像に変換する映像処理装置であって、映像入力手段と、入力画像記憶手段と、メモリブロック生成手段と、メモリブロック記憶手段と、補間手段と、出力画像記憶手段と、映像出力手段と、を備える構成とした。 In order to solve the above problems, the video processing apparatus according to the present invention is a video processing apparatus that converts an input video into an output video by a conversion process accompanied by interpolation, and is a video input means, an input image storage means, and a memory. The configuration includes a block generation means, a memory block storage means, an interpolation means, an output image storage means, and a video output means.
かかる構成において、映像処理装置は、映像入力手段によって、映像を入力し、入力映像を構成するフレーム画像を、逐次、入力画像記憶手段に記憶する。
そして、映像処理装置は、メモリブロック生成手段によって、変換処理による変換後の1画素の補間演算に要する画素数よりも多い水平方向および垂直方向にそれぞれ予め定めた大きさのメモリブロックにフレーム画像を分割する。
In such a configuration, the video processing apparatus inputs video by the video input means, and sequentially stores the frame images constituting the input video in the input image storage means.
Then, the video processing device uses the memory block generation means to put the frame image in the memory blocks having predetermined sizes in the horizontal direction and the vertical direction, which are larger than the number of pixels required for the interpolation calculation of one pixel after the conversion by the conversion process. To divide.
そして、メモリブロック生成手段は、生成したメモリブロックをメモリブロック記憶手段に記憶する。このメモリブロック記憶手段は、ブロックRAM等の画素単位で読み出し可能なメモリで構成されている。 Then, the memory block generation means stores the generated memory block in the memory block storage means. This memory block storage means is composed of a memory that can be read in pixel units such as a block RAM.
そして、映像処理装置は、補間手段によって、変換後の画素位置に対応する変換前の画素位置の周辺画素の画素値をメモリブロックから読み出し、補間演算により、変換後の画素位置の画素値を算出する。このとき、補間手段は、補間演算に必要な画素を、ライン読み出しを行う入力画像記憶手段に記憶されているフレーム画像ではなく、画素単位で読み出し可能なメモリブロックから読み出すことで、高速に必要な画素値を取得することができる。 Then, the video processing device reads the pixel values of the peripheral pixels of the pixel position before conversion corresponding to the pixel position after conversion from the memory block by the interpolation means, and calculates the pixel value of the pixel position after conversion by the interpolation calculation. do. At this time, the interpolation means is required at high speed by reading the pixels required for the interpolation calculation from the memory block that can be read in pixel units instead of the frame image stored in the input image storage means that performs line reading. The pixel value can be acquired.
そして、映像処理装置は、変換後の画素位置の画素値を、出力映像を構成するフレーム画像の対応する画素位置の画素値として出力画像記憶手段に記憶する。
そして、映像処理装置は、映像出力手段によって、出力画像記憶手段に記憶された画像をフレーム画像とする映像を出力する。
Then, the image processing apparatus stores the pixel value of the pixel position after conversion in the output image storage means as the pixel value of the corresponding pixel position of the frame image constituting the output image.
Then, the image processing device outputs an image in which the image stored in the output image storage means is used as a frame image by the image output means.
なお、映像処理装置は、コンピュータを、前記した各手段として機能させるための映像処理プログラムで動作させることができる。 The video processing device can be operated by a video processing program for operating the computer as each of the above-mentioned means.
本発明は、以下に示す優れた効果を奏するものである。
本発明によれば、画素単位にアクセス可能なメモリに、補間演算に必要な画素を1つのメモリブロックとして記憶して補間演算を行うため、DRAMへの頻繁な読み込みを抑え、従来よりも高速に画像変換を行うことができる。
これによって、本発明は、VRにおけるリアルタイムのVR映像の作成を実現することができる。
The present invention has the following excellent effects.
According to the present invention, since the pixels required for the interpolation calculation are stored as one memory block in the memory accessible in pixel units and the interpolation calculation is performed, frequent reading to the DRAM is suppressed and the speed is higher than before. Image conversion can be performed.
Thereby, the present invention can realize the creation of a real-time VR image in VR.
<映像処理装置の構成>
まず、図1を参照して、本発明の実施形態に係る映像処理装置1の構成について説明する。
<Configuration of video processing equipment>
First, the configuration of the
映像処理装置1は、補間を伴う変換処理により、入力映像を出力映像に変換するものである。
ここでは、映像処理装置1は、補間を伴う映像の変換処理として、広角カメラ(魚眼カメラ)で撮影された映像を、正距円筒図形式(エクイレクタングラー形式)の映像に変換するものとする。
図1に示すように、映像処理装置1は、映像入力手段10と、入力画像記憶手段11と、メモリブロック生成手段12と、メモリブロック記憶手段13と、補間手段14と、出力画像記憶手段15と、映像出力手段16と、を備える。
The
Here, the
As shown in FIG. 1, the
映像入力手段10は、映像を入力するものである。ここでは、映像入力手段10は、広角カメラで撮影された魚眼画像G1で構成された映像を入力する。
映像入力手段10は、入力映像のフレームである魚眼画像G1を入力画像記憶手段11に逐次書き込み記憶する。また、映像入力手段10は、1フレームの入力画像記憶手段11への書き込みが終了した段階で、メモリブロック生成手段12に書き込み終了を通知する。
The video input means 10 inputs video. Here, the image input means 10 inputs an image composed of the fisheye image G1 taken by the wide-angle camera.
The video input means 10 sequentially writes and stores the fisheye image G1, which is a frame of the input video, in the input image storage means 11. Further, the video input means 10 notifies the memory block generation means 12 of the end of writing when the writing of one frame to the input image storage means 11 is completed.
入力画像記憶手段11は、入力映像を構成するフレーム画像を記憶するものである。ここでは、入力画像記憶手段11は、映像入力手段10で入力された魚眼画像G1を記憶する。
入力画像記憶手段11は、半導体メモリで構成することができる。例えば、入力画像記憶手段11は、画像メモリとして一般的なDRAM(Dynamic Random Access Memory)で構成することができる。
入力画像記憶手段11に記憶された魚眼画像G1は、メモリブロック生成手段12によって読み出される。
The input image storage means 11 stores a frame image constituting the input video. Here, the input image storage means 11 stores the fisheye image G1 input by the video input means 10.
The input image storage means 11 can be configured with a semiconductor memory. For example, the input image storage means 11 can be configured with a DRAM (Dynamic Random Access Memory) that is generally used as an image memory.
The fisheye image G1 stored in the input image storage means 11 is read out by the memory block generation means 12.
メモリブロック生成手段12は、入力画像記憶手段11に記憶されたフレーム画像を、変換処理による変換後の1画素の補間演算に要する画素数よりも多い水平方向および垂直方向にそれぞれ予め定めた大きさのメモリブロックに分割するものである。
このメモリブロックは、少なくとも後記する補間手段14で補間演算に必要な画素、例えば、バイリニア補間演算であれば4画素(2×2画素)が1つのブロックに含まれる大きさとする。
The memory block generation means 12 has predetermined sizes of the frame image stored in the input image storage means 11 in the horizontal direction and the vertical direction, which are larger than the number of pixels required for the interpolation calculation of one pixel after conversion by the conversion process. It is divided into memory blocks of.
This memory block has a size in which at least the pixels required for the interpolation calculation by the interpolation means 14 described later, for example, 4 pixels (2 × 2 pixels) in the case of the bilinear interpolation calculation, are included in one block.
また、メモリブロックは、1画素の補間演算に必要な画素が必ず1つのメモリブロックに存在するとともに、メモリブロック内のすべての画素が魚眼画像G1の画素と対応するように、隣接するメモリブロックとの間で重複領域を含むこととする。
例えば、メモリブロック生成手段12は、水平64画素、垂直32画素単位で、重複画素を2画素以上含んで魚眼画像G1全体を分割する。
Further, in the memory block, the pixels required for the interpolation calculation of one pixel always exist in one memory block, and the adjacent memory blocks so that all the pixels in the memory block correspond to the pixels of the fisheye image G1. It is assumed that an overlapping area is included with and.
For example, the memory block generating means 12 divides the entire fisheye image G1 by including two or more overlapping pixels in units of 64 horizontal pixels and 32 vertical pixels.
ここで、図2および図3を参照して、メモリブロックの具体例について説明する。
図2は、入力画像(魚眼画像G1)の画素配列の一例を示す画素配置図である。ここでは、魚眼画像G1を、フルHD(High Definition)の水平1920画像、垂直1080画素の画像とする。もちろん、魚眼画像G1は、フルHDに限定されず、HD,4K、8K等の画像であっても構わない。なお、図2では、説明の便宜上、画素位置に、P0,P1,…等の符号を付している。
図3は、図2の画像を分割したメモリブロックB0,B1,…の構成例を示す画素配置図である。ここでは、メモリブロックを水平64画素、垂直32画素とした例を示している。
Here, a specific example of the memory block will be described with reference to FIGS. 2 and 3.
FIG. 2 is a pixel arrangement diagram showing an example of the pixel arrangement of the input image (fisheye image G1). Here, the fisheye image G1 is a full HD (High Definition) horizontal 1920 image and a vertical 1080 pixel image. Of course, the fisheye image G1 is not limited to full HD, and may be an image of HD, 4K, 8K, or the like. In FIG. 2, for convenience of explanation, the pixel positions are designated by reference numerals such as P0, P1, ....
FIG. 3 is a pixel arrangement diagram showing a configuration example of the memory blocks B0, B1, ... By dividing the image of FIG. 2. Here, an example in which the memory block has 64 pixels horizontally and 32 pixels vertically is shown.
例えば、メモリブロックB0は、図2の魚眼画像G1の画素P0~P63,P1920~P1983,…,P59520~P59583で構成される。
なお、図3では、図面の理解を容易にするため、単純に、64画素×32画素単位で魚眼画像G1を分割した例を示しているが、各メモリブロックの境界には、重複する画素が含まれる。例えば、メモリブロックB1は、水平方向に隣接するメモリブロックB0と2画素重複するように、P62,P63,…,P125、P1982,P1983,…,P2945,P59582,P59583,…,P59645とする。垂直方向に隣接するメモリブロックについても同様である。
図1に戻って、映像処理装置1の構成について説明を続ける。
For example, the memory block B0 is composed of pixels P0 to P63, P1920 to P19833, ..., P59520 to P59583 of the fisheye image G1 of FIG.
Note that FIG. 3 shows an example in which the fisheye image G1 is simply divided in units of 64 pixels × 32 pixels in order to facilitate understanding of the drawings, but overlapping pixels are shown at the boundaries of each memory block. Is included. For example, the memory block B1 is P62, P63, ..., P125, P1982, P19833 ..., P2945, P59582, P59583, ..., P59645 so as to overlap the horizontally adjacent memory blocks B0 by two pixels. The same applies to memory blocks that are adjacent in the vertical direction.
Returning to FIG. 1, the description of the configuration of the
メモリブロック生成手段12は、メモリブロックの垂直方向の画素数(ここでは、32画素)に相当するライン数(32ライン)の画素値を、入力画像記憶手段11からラインごとに読み出し、メモリブロックの水平方向の画素数(ここでは、64画素)ごとに、メモリブロック記憶手段13の個々のメモリブロックとして書き込む。
メモリブロック生成手段12は、32ラインの読み出し終了後、補間手段14の指示により、次の32ラインの読み出しを行い、メモリブロックを更新する。
メモリブロック生成手段12は、メモリブロック記憶手段13にメモリブロックの書き込みを終了した段階で、補間手段14に書き込み終了を通知する。
The memory block generation means 12 reads a pixel value of the number of lines (32 lines) corresponding to the number of pixels in the vertical direction of the memory block (here, 32 pixels) from the input image storage means 11 for each line, and of the memory block. Each number of pixels in the horizontal direction (64 pixels in this case) is written as an individual memory block of the memory block storage means 13.
After the reading of the 32 lines is completed, the memory block generating means 12 reads the next 32 lines according to the instruction of the interpolation means 14, and updates the memory block.
The memory block generation means 12 notifies the interpolation means 14 of the end of writing when the memory block storage means 13 has finished writing the memory block.
メモリブロック記憶手段13は、メモリブロック生成手段12で生成されたメモリブロックを記憶するものである。
メモリブロック記憶手段13は、画素単位でアクセス可能なメモリであって、例えば、FPGA(Field Programmable Gate Array)のブロックRAMで構成する。
メモリブロック記憶手段13は、複数のブロックRAM、例えば、図3に示した水平方向のブロック数(この場合、B0~B29の30個)だけブロックRAMを配置して、順次、メモリブロックを更新して使用する。
The memory block storage means 13 stores the memory blocks generated by the memory block generation means 12.
The memory block storage means 13 is a memory that can be accessed in pixel units, and is composed of, for example, a block RAM of an FPGA (Field Programmable Gate Array).
The memory block storage means 13 arranges a plurality of block RAMs, for example, block RAMs for the number of blocks in the horizontal direction shown in FIG. 3 (in this case, 30 blocks from B0 to B29), and sequentially updates the memory blocks. To use.
なお、ブロックRAMの出力ポートが“2”の場合、メモリブロックからは、一度に2画素の画素値しか読み出せない。その場合、メモリブロック記憶手段13には、メモリブロック生成手段12が、同じメモリブロックを二重に書き込み、補間手段14が、それぞれのメモリブロックから2画素ずつ、計4画素の画素値を読み出すこととする。 When the output port of the block RAM is "2", only the pixel value of two pixels can be read from the memory block at a time. In that case, the memory block generation means 12 writes the same memory block twice in the memory block storage means 13, and the interpolation means 14 reads out the pixel values of a total of 4 pixels, 2 pixels from each memory block. And.
補間手段14は、変換後の画素位置に対応する変換前の画素位置の周辺画素の画素値をメモリブロックから読み出し、補間演算により、変換後の画素位置の画素値を算出するものである。ここでは、補間手段14は、メモリブロック記憶手段13に記憶されているメモリブロックを参照して、正距円筒画像の画素値を補間して生成する。
補間手段14は、変換前座標算出手段140と、補間画素値算出手段141と、を備える。
The interpolation means 14 reads the pixel values of the peripheral pixels of the pixel position before conversion corresponding to the pixel position after conversion from the memory block, and calculates the pixel value of the pixel position after conversion by interpolation calculation. Here, the interpolation means 14 is generated by interpolating the pixel values of the equirectangular image with reference to the memory blocks stored in the memory block storage means 13.
The interpolation means 14 includes a pre-conversion coordinate calculation means 140 and an interpolation pixel value calculation means 141.
変換前座標算出手段140は、変換後の画素位置に対応する変換前の画素位置(座標)を算出するものである。ここでは、変換前座標算出手段140は、変換後の正距円筒画像の画素に対応する変換前の魚眼画像の画素の位置(座標)を算出する。
すなわち、変換前座標算出手段140は、図4に示すように、(a)の魚眼画像G1を、正距円筒画像G2に変換する場合の正距円筒画像G2の画素位置(座標p)に対応する魚眼画像G1の画素位置(座標p′)を算出する。
The pre-conversion coordinate calculation means 140 calculates the pre-conversion pixel position (coordinates) corresponding to the post-conversion pixel position. Here, the pre-conversion coordinate calculation means 140 calculates the positions (coordinates) of the pixels of the fish-eye image before conversion corresponding to the pixels of the equirectangular image after conversion.
That is, as shown in FIG. 4, the pre-conversion coordinate calculation means 140 sets the pixel position (coordinates p) of the equirectangular image G2 when the fisheye image G1 of (a) is converted into the equirectangular image G2. The pixel position (coordinates p') of the corresponding fisheye image G1 is calculated.
なお、魚眼画像G1から正距円筒画像G2への変換は、一般的なエクイレクタングラー変換を用いればよく、変換前座標算出手段140は、エクイレクタングラー変換の逆変換を行うことで、正距円筒画像G2の画素位置(座標p)に対応する変換前の魚眼画像G1の画素位置(座標p′)を算出する。
変換前座標算出手段140は、変換後の画素位置(座標p)と、変換前の画素位置(座標p′)とを、補間画素値算出手段141に出力する。
The conversion from the fisheye image G1 to the regular distance cylindrical image G2 may be performed by using a general equirectangular transformation, and the pre-conversion coordinate calculation means 140 is positive by performing the inverse conversion of the equirectangular transformation. The pixel position (coordinates p') of the fisheye image G1 before conversion corresponding to the pixel position (coordinates p) of the distance cylindrical image G2 is calculated.
The pre-conversion coordinate calculation means 140 outputs the pixel position (coordinates p) after conversion and the pixel position (coordinates p') before conversion to the interpolated pixel value calculation means 141.
補間画素値算出手段141は、変換前座標算出手段140で算出された変換前の画素位置の画素値を、当該画素の周辺画素の画素値で補間演算により算出するものである。
ここでは、補間画素値算出手段141は、バイリニア補間演算により画素値を算出する。
補間画素値算出手段141は、変換前の画素位置の周辺4画素の画素値を、メモリブロック記憶手段13に記憶されているメモリブロックから読み出し、バイリニア補間演算により画素値を算出する。この算出した画素値が、変換後の画素位置の画素値となる。
The interpolation pixel value calculation means 141 calculates the pixel value of the pixel position before conversion calculated by the pre-conversion coordinate calculation means 140 by the interpolation calculation with the pixel values of the peripheral pixels of the pixel.
Here, the interpolation pixel value calculation means 141 calculates the pixel value by the bilinear interpolation calculation.
The interpolation pixel value calculation means 141 reads the pixel values of the four peripheral pixels of the pixel position before conversion from the memory block stored in the memory block storage means 13, and calculates the pixel values by bilinear interpolation calculation. This calculated pixel value becomes the pixel value of the pixel position after conversion.
図5に示すように、補間画素値算出手段141は、変換前の画素位置の座標p′を(x、y)としたとき、周辺4画素の座標を、p1([x],[y])、p2([x]+1,[y])、p3([x],[y]+1)、p4([x]+1,[y]+1)とする。なお、[x],[y]は、それぞれ、x,yの整数部分とする。
補間画素値算出手段141は、座標p1,p2,p3,p4に対応するメモリブロックから、座標p1,p2,p3,p4の画素値を読み出し、座標p′の画素値を、バイリニア補間演算による以下の式(1)により算出する。
As shown in FIG. 5, when the coordinate p'of the pixel position before conversion is (x, y), the interpolated pixel value calculation means 141 sets the coordinates of the peripheral four pixels to p1 ([x], [y]]. ), P2 ([x] + 1, [y]), p3 ([x], [y] +1), p4 ([x] + 1, [y] +1). Note that [x] and [y] are integer parts of x and y, respectively.
The interpolation pixel value calculation means 141 reads the pixel values of the coordinates p1, p2, p3, p4 from the memory block corresponding to the coordinates p1, p2, p3, p4, and sets the pixel values of the coordinates p'to the following by bilinear interpolation calculation. It is calculated by the formula (1) of.
ここで、座標p′の画素値をDst(x,y)、座標p1の画素値をSrc([x],[y])、座標p2の画素値をSrc([x]+1,[y])、座標p3の画素値をSrc([x],[y]+1)、座標p4の画素値をSrc([x]+1,[y]+1)とする。 Here, the pixel value of the coordinate p'is Dst (x, y), the pixel value of the coordinate p1 is Src ([x], [y]), and the pixel value of the coordinate p2 is Src ([x] + 1, [y]. ), The pixel value of the coordinate p3 is Src ([x], [y] +1), and the pixel value of the coordinate p4 is Src ([x] + 1, [y] +1).
補間画素値算出手段141は、算出した画素値を、変換後の正距円筒画像G2の画素位置(座標p)の画素値として、出力画像記憶手段15に書き込む。
なお、補間画素値算出手段141は、正距円筒画像G2の水平方向1ライン分の画素値を算出するごとに、1ライン分の画素値を出力画像記憶手段15に書き込むことが好ましい。
補間手段14は、メモリブロックで参照する画素が、最終ラインに達した場合、次のメモリブロックの生成をメモリブロック生成手段12に指示する。
また、補間手段14は、正距円筒画像G2の補間を終了後、映像出力手段16に出力画像記憶手段15の書き込み終了を通知する。
The interpolated pixel value calculation means 141 writes the calculated pixel value as a pixel value at the pixel position (coordinates p) of the converted equirectangular image G2 in the output image storage means 15.
It is preferable that the interpolated pixel value calculating means 141 writes the pixel value for one line in the output image storage means 15 every time the pixel value for one horizontal line of the equirectangular image G2 is calculated.
When the pixel referred to by the memory block reaches the final line, the interpolation means 14 instructs the memory block generation means 12 to generate the next memory block.
Further, the interpolation means 14 notifies the video output means 16 of the end of writing of the output image storage means 15 after the interpolation of the equirectangular image G2 is completed.
出力画像記憶手段15は、補間手段14で算出された変換後の画素位置の画素値を、出力映像を構成するフレーム画像の対応する画素位置の画素値として記憶するものである。
この出力画像記憶手段15には、変換後の画像として、正距円筒画像G2が記憶される。
出力画像記憶手段15は、半導体メモリで構成することができる。例えば、出力画像記憶手段15は、画像メモリとして一般的なDRAMで構成することができる。
出力画像記憶手段15に記憶された正距円筒画像G2は、映像出力手段16によって読み出される。
The output image storage means 15 stores the pixel value of the converted pixel position calculated by the interpolation means 14 as the pixel value of the corresponding pixel position of the frame image constituting the output video.
The output image storage means 15 stores the equirectangular image G2 as the converted image.
The output image storage means 15 can be configured with a semiconductor memory. For example, the output image storage means 15 can be configured by a general DRAM as an image memory.
The equirectangular image G2 stored in the output image storage means 15 is read out by the video output means 16.
映像出力手段16は、出力画像記憶手段15に記憶された画像(正距円筒画像G2)をフレーム画像とする出力映像を出力するものである。
映像出力手段16は、補間手段14から、正距円筒画像G2の書き込み終了を通知されるタイミングで正距円筒画像G2をフレーム画像として出力する。
The video output means 16 outputs an output video having an image (equirectangular image G2) stored in the output image storage means 15 as a frame image.
The video output means 16 outputs the equirectangular image G2 as a frame image at the timing when the interpolation means 14 notifies the completion of writing of the equirectangular image G2.
以上説明したように映像処理装置1を構成することで、映像処理装置1は、魚眼画像を正距円筒画像に変換する際に、バイリニア補間演算を行うことで、ノイズの少ない高画質な画像を生成することができる。
By configuring the
また、映像処理装置1は、補間演算を行う際に、変換前の複数の画素値を、画素ごとに読み込み可能なメモリブロックから読み込むことができる。これによって、映像処理装置1は、補間演算を行う際に参照する画素を画素単位で一度に参照することができるため、DRAMのような1画素を1ライン単位で読み込む手法に比べ、広角カメラで撮影された映像を、高速に正距円筒画像の映像に変換することができる。
なお、映像処理装置1は、図示を省略したコンピュータを、前記した各手段として機能させるためのプログラム(映像処理プログラム)で動作させることができる。
Further, when performing the interpolation calculation, the
The
<映像処理装置の動作>
次に、図6を参照(構成については、適宜図1参照)して、本発明の実施形態に係る映像処理装置1の動作について説明する。
<Operation of video processing device>
Next, the operation of the
ステップS1において、映像入力手段10は、魚眼画像G1をフレームとする映像を入力し、入力画像記憶手段11に逐次書き込み記憶する。
ステップS2において、メモリブロック生成手段12は、ステップS1で入力画像記憶手段11に記憶された魚眼画像G1を、水平方向および垂直方向にそれぞれ予め定めた画素数に分割したメモリブロック単位で、メモリブロック記憶手段13に記憶する。このとき、メモリブロック生成手段12は、メモリブロックの垂直方向の画素数に相当するライン数の画素値を、入力画像記憶手段11からラインごとに読み出し、メモリブロックの水平方向の画素数ごとに、メモリブロック記憶手段13の個々のメモリブロックとして書き込む。
In step S1, the video input means 10 inputs a video having the fisheye image G1 as a frame, and sequentially writes and stores the video in the input image storage means 11.
In step S2, the memory block generation means 12 stores the fisheye image G1 stored in the input image storage means 11 in step S1 in units of memory blocks divided into predetermined number of pixels in the horizontal direction and the vertical direction, respectively. It is stored in the block storage means 13. At this time, the memory block generation means 12 reads the pixel value of the number of lines corresponding to the number of pixels in the vertical direction of the memory block from the input image storage means 11 for each line, and for each number of pixels in the horizontal direction of the memory block, Memory block Write as individual memory blocks of storage means 13.
ステップS3において、補間手段14の変換前座標算出手段140は、正距円筒画像G2の画素位置に対応するエクイレクタングラー変換前の魚眼画像G1の画素位置(座標)を算出する。
ここでは、変換前座標算出手段140は、正距円筒画像G2の画素位置に対して、エクイレクタングラー変換の逆変換を行うことで、魚眼画像G1の画素位置(座標)を算出する。
In step S3, the pre-conversion coordinate calculation means 140 of the interpolation means 14 calculates the pixel position (coordinates) of the fisheye image G1 before the equirectangular conversion corresponding to the pixel position of the equirectangular image G2.
Here, the pre-conversion coordinate calculation means 140 calculates the pixel position (coordinates) of the fisheye image G1 by performing the inverse conversion of the equirectangular transformation with respect to the pixel position of the equirectangular image G2.
ステップS4において、補間手段14の補間画素値算出手段141は、ステップS3で算出された魚眼画像G1の画素位置(座標)の周辺4画素の画素値を、メモリブロック記憶手段13に記憶されている対応するメモリブロックから取得する。
ステップS5において、補間画素値算出手段141は、ステップS4で取得した4画素の画素位置(座標)と、それぞれの画素値とから、バイリニア補間演算により、エクイレクタングラー変換後の正距円筒画像G2の画素値を算出する。
ステップS6において、補間手段14は、ステップS5で算出された正距円筒画像G2の画素値を出力画像記憶手段15に書き込み記憶する。
In step S4, the interpolation pixel value calculation means 141 of the interpolation means 14 stores the pixel values of the four peripheral pixels of the pixel position (coordinates) of the fisheye image G1 calculated in step S3 in the memory block storage means 13. Get from the corresponding memory block.
In step S5, the interpolation pixel value calculation means 141 uses the pixel positions (coordinates) of the four pixels acquired in step S4 and the respective pixel values by bilinear interpolation calculation to convert the equirectangular image G2 into a regular distance cylinder. Calculate the pixel value of.
In step S6, the interpolation means 14 writes and stores the pixel value of the equirectangular image G2 calculated in step S5 in the output image storage means 15.
なお、ステップとしては図示を省略するが、補間手段14は、メモリブロックで参照する画素が、最終ラインに達した場合、次のメモリブロックの生成をメモリブロック生成手段12に指示することで、逐次、メモリブロックを更新する。 Although not shown as a step, the interpolation means 14 sequentially instructs the memory block generation means 12 to generate the next memory block when the pixel referred to by the memory block reaches the final line. , Update the memory block.
ステップS7において、補間手段14は、正距円筒画像G2のすべての画素について画素値の算出が完了したか否かを判定する。
ここで、まだ、すべての画素について画素値の算出が完了していない場合(ステップS7でNo)、補間手段14は、ステップS3に戻って動作を続ける。
一方、すべての画素について画素値の算出が完了した場合(ステップS7でYes)、映像出力手段16は、ステップS8において、出力画像記憶手段15に記憶された正距円筒画像G2をフレームとする映像を出力する。
In step S7, the interpolation means 14 determines whether or not the calculation of the pixel values for all the pixels of the equirectangular image G2 is completed.
Here, if the calculation of the pixel values for all the pixels has not been completed (No in step S7), the interpolation means 14 returns to step S3 and continues the operation.
On the other hand, when the calculation of the pixel values for all the pixels is completed (Yes in step S7), the video output means 16 uses the equirectangular image G2 stored in the output image storage means 15 as a frame in the video in step S8. Is output.
ステップS9において、映像入力手段10は、次フレームの入力の有無を判定する。
ここで、次フレームが入力された場合(ステップS9でYes)、映像処理装置1は、ステップS1に戻って動作を継続する。
一方、次フレームが入力されなかった場合(ステップS9でNo)、映像処理装置1は、動作を終了する。
In step S9, the video input means 10 determines whether or not the next frame is input.
Here, when the next frame is input (Yes in step S9), the
On the other hand, when the next frame is not input (No in step S9), the
以上の動作によって、映像処理装置1は、DRAMのような1画素を1ライン単位で読み込む手法に比べ、広角カメラで撮影された映像を、高速に正距円筒画像の映像に変換することができる。
By the above operation, the
<変形例>
以上、本発明の実施形態に係る映像処理装置1の構成および動作について説明したが、本発明は、この実施形態に限定されるものではない。
<Modification example>
Although the configuration and operation of the
(変形例1)
ここでは、入力画像(魚眼画像G1)を、画素位置に画素値が対応する構成(例えば、RGB)として説明した。
しかし、魚眼画像G1は、YCbCrの4:2:0,4:2:2等の輝度成分(Y)および色差成分(Cb,Cr)のうち色差成分を間引いた形式の画像であっても構わない。
その場合、メモリブロック生成手段12は、メモリブロックの各画素に、それぞれ輝度Yと色差成分Cb,Crとを画素値として対応付けて書き込めばよい。
(Modification 1)
Here, the input image (fish-eye image G1) has been described as a configuration (for example, RGB) in which the pixel values correspond to the pixel positions.
However, even if the fisheye image G1 is an image in which the color difference component is thinned out from the luminance component (Y) and the color difference component (Cb, Cr) such as 4: 2: 0, 4: 2: 2 of YCbCr. I do not care.
In that case, the memory block generation means 12 may write the luminance Y and the color difference components Cb and Cr as pixel values in association with each pixel of the memory block.
例えば、図7(a)に示すように、魚眼画像G1がYCbCr4:2:2の場合、メモリブロック生成手段12は、図7(b)に示すメモリブロックB0を生成する。なお、ここでは、他のメモリブロックB1等については、図示を省略している。
図7の例の場合、メモリブロック生成手段12は、メモリブロックB0の画素P0には魚眼画像G1のY0,Cb0,Cr0の各値を設定し、画素P1には魚眼画像G1のY1,Cb0,Cr0の各値を設定する。これによって、メモリブロックB0の画素位置には、魚眼画像G1の画素ごとの画素値が設定されることになる。
なお、正距円筒画像G2を魚眼画像G1と同じ画像の形式とする場合、映像出力手段16が出力画像を4:2:0,4:2:2等の形式に変換すればよい。
For example, as shown in FIG. 7A, when the fisheye image G1 is YCbCr4: 2: 2, the memory block generating means 12 generates the memory block B0 shown in FIG. 7B. It should be noted that the illustration of the other memory blocks B1 and the like is omitted here.
In the case of the example of FIG. 7, the memory block generation means 12 sets the values of Y0, Cb0, and Cr0 of the fisheye image G1 in the pixel P0 of the memory block B0, and Y1 of the fisheye image G1 in the pixel P1. Set each value of Cb0 and Cr0. As a result, the pixel position of the memory block B0 is set to the pixel value for each pixel of the fisheye image G1.
When the equirectangular image G2 has the same image format as the fisheye image G1, the video output means 16 may convert the output image into a format such as 4: 2: 0, 4: 2: 2.
(変形例2)
ここでは、補間手段14における補間演算を、バイリニア補間演算の例で説明した。
しかし、この補間演算は、他の補間演算、例えば、バイキュービック補間演算であっても構わない。
バイキュービック補間演算を用いる場合、メモリブロック生成手段12は、少なくとも補間演算のために参照する16画素(4×4画素)が1つのブロックに含まれる大きさでメモリブロックを生成すればよい。
そして、補間手段14の補間画素値算出手段141は、変換前の画素位置の周辺16画素の画素値を、メモリブロック記憶手段13に記憶されているメモリブロックから読み出し、バイキュービック補間演算により画素値を算出すればよい。
(Modification 2)
Here, the interpolation operation in the interpolation means 14 has been described with an example of a bilinear interpolation operation.
However, this interpolation operation may be another interpolation operation, for example, a bicubic interpolation operation.
When the bicubic interpolation calculation is used, the memory block generation means 12 may generate a memory block with a size in which at least 16 pixels (4 × 4 pixels) referred to for the interpolation calculation are included in one block.
Then, the interpolation pixel value calculation means 141 of the interpolation means 14 reads the pixel values of the peripheral 16 pixels of the pixel position before conversion from the memory block stored in the memory block storage means 13, and performs the pixel value by the bicubic interpolation calculation. Should be calculated.
(変形例3)
ここでは、映像処理装置1を、広角カメラ(魚眼カメラ)で撮影された映像から、正距円筒図形式の映像に変換するものとして説明した。
しかし、映像処理装置1は、補間演算を伴ってフレーム画像を変換するものであれば、その対象はどのような映像であっても構わない。
例えば、映像処理装置1は、画素補間を行って映像を拡大するものとし、4K映像を入力し、8K映像を出力することも可能である。
その場合、映像処理装置1は、4K画像をフレーム画像として入力し、補間演算による拡大を行った後、8K画像をフレーム画像として出力すればよい。
このとき、補間手段14の変換前座標算出手段140は、拡大後の座標から拡大前の座標を算出するものとする。
(Modification 3)
Here, the
However, the
For example, the
In that case, the
At this time, the pre-conversion coordinate calculation means 140 of the interpolation means 14 shall calculate the coordinates before enlargement from the coordinates after enlargement.
(変形例4)
ここでは、補間手段14の変換前座標算出手段140が、変換後の画素位置に対応する変換前の画素位置を逐次算出することにした。
しかし、この変換が固定である場合、変換前座標算出手段140の代わりに、予め変換前後の画素位置を対応付けたテーブルを記憶した記憶手段を備え、補間画素値算出手段141がそのテーブルを参照することとしてもよい。
(Modification example 4)
Here, the pre-conversion coordinate calculation means 140 of the interpolation means 14 sequentially calculates the pre-conversion pixel position corresponding to the converted pixel position.
However, when this conversion is fixed, instead of the pre-conversion coordinate calculation means 140, a storage means for storing a table in which pixel positions before and after the conversion are associated in advance is provided, and the interpolation pixel value calculation means 141 refers to the table. You may do it.
1 映像処理装置
10 映像入力手段
11 入力画像記憶手段
12 メモリブロック生成手段
13 メモリブロック記憶手段
14 補間手段
140 変換前座標算出手段
141 補間画素値算出手段
15 出力画像記憶手段
16 映像出力手段
1
Claims (9)
前記入力映像を入力する映像入力手段と、
前記入力映像を構成するフレーム画像を記憶する入力画像記憶手段と、
前記変換処理による変換後の1画素の補間演算に要する画素数よりも多い水平方向および垂直方向にそれぞれ予め定めた大きさのメモリブロックに前記フレーム画像を分割するメモリブロック生成手段と、
前記メモリブロック生成手段で生成されたメモリブロックを記憶する画素単位で読み出し可能なメモリで構成されたメモリブロック記憶手段と、
変換後の画素位置に対応する変換前の画素位置の周辺画素の画素値を前記メモリブロックから読み出し、補間演算により、前記変換後の画素位置の画素値を算出する補間手段と、
前記変換後の画素位置の画素値を、前記出力映像を構成するフレーム画像の対応する画素位置の画素値として記憶する出力画像記憶手段と、
前記出力画像記憶手段に記憶された画像をフレーム画像とする前記出力映像を出力する映像出力手段と、
を備えることを特徴とする映像処理装置。 An image processing device that converts input video into output video by conversion processing that involves interpolation.
A video input means for inputting the input video and
An input image storage means for storing a frame image constituting the input video, and an input image storage means.
A memory block generation means for dividing the frame image into memory blocks having predetermined sizes in the horizontal direction and the vertical direction, which are larger than the number of pixels required for the interpolation calculation of one pixel after conversion by the conversion process.
A memory block storage means composed of a memory that can be read in pixel units for storing a memory block generated by the memory block generation means, and a memory block storage means.
An interpolation means that reads the pixel values of the peripheral pixels of the pixel position before conversion corresponding to the pixel position after conversion from the memory block and calculates the pixel value of the pixel position after conversion by interpolation calculation.
An output image storage means that stores the pixel value of the pixel position after the conversion as the pixel value of the corresponding pixel position of the frame image constituting the output image.
A video output means for outputting the output video having an image stored in the output image storage means as a frame image, and a video output means.
A video processing device characterized by being equipped with.
前記魚眼画像から前記正距円筒画像に変換するエクイレクタングラー変換の逆変換により、前記正距円筒画像の画素位置に対応する変換前の前記魚眼画像の画素位置を算出する変換前座標算出手段と、
前記変換前座標算出手段で算出された変換前の画素位置の周辺画素の画素値で補間演算することで、変換後の前記正距円筒画像の画素位置の画素値を算出する補間画素値算出手段と、
を備えることを特徴とする請求項7に記載の映像処理装置。 The interpolation means is
Pre-conversion coordinate calculation to calculate the pixel position of the fish-eye image before conversion corresponding to the pixel position of the regular-distance cylindrical image by the inverse conversion of the equirectangular transformation that converts the fish-eye image to the regular-distance cylindrical image. Means and
Interpolated pixel value calculating means for calculating the pixel value of the pixel position of the equidistant cylindrical image after conversion by performing an interpolation calculation with the pixel values of the peripheral pixels of the pixel position before conversion calculated by the coordinate calculation means before conversion. When,
7. The video processing apparatus according to claim 7.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020177854A JP2022068983A (en) | 2020-10-23 | 2020-10-23 | Video processing device and program thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2020177854A JP2022068983A (en) | 2020-10-23 | 2020-10-23 | Video processing device and program thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2022068983A true JP2022068983A (en) | 2022-05-11 |
Family
ID=81521830
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2020177854A Pending JP2022068983A (en) | 2020-10-23 | 2020-10-23 | Video processing device and program thereof |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2022068983A (en) |
-
2020
- 2020-10-23 JP JP2020177854A patent/JP2022068983A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US10152814B2 (en) | Image distortion compensation display device and image distortion compensation method using the same | |
TWI298147B (en) | System and method for representing a general two dimensional spatial transformation | |
US20190102868A1 (en) | Method and system of image distortion correction for images captured by using a wide-angle lens | |
US9280810B2 (en) | Method and system for correcting a distorted input image | |
TW201044863A (en) | Image processing method, image processing apparatus, and recording medium | |
JP2019120749A (en) | Display controller, image projection system, control method and program | |
TWI476730B (en) | A de-warp method of the digital image | |
US20160189350A1 (en) | System and method for remapping of image to correct optical distortions | |
JP2022068983A (en) | Video processing device and program thereof | |
KR20190059054A (en) | Method and apparatus for processing image data | |
JP5249733B2 (en) | Video signal processing device | |
WO2018087856A1 (en) | Image synthesis device and image synthesis method | |
JP5624383B2 (en) | Video signal processing device, virtual reality generation system | |
US11106042B2 (en) | Image processing apparatus, head-mounted display, and image displaying method | |
JP5787637B2 (en) | Image processing apparatus and image processing method | |
JP5387276B2 (en) | Image processing apparatus and image processing method | |
JP6278716B2 (en) | Image processing apparatus, image processing method, and program | |
JP6273881B2 (en) | Image processing apparatus, image processing method, and program | |
JP2019191443A (en) | Projection device | |
Babar et al. | A scalable architecture for geometric correction of multi-projector display systems | |
JPH0737079A (en) | Method and device for correcting picture distortion | |
JPWO2012060271A1 (en) | Image processing method, image processing apparatus, and imaging apparatus | |
JP2013025619A (en) | Image display device and image display method | |
JP2015069272A (en) | Image deformation device and image deformation method | |
JP2017228849A (en) | Image processing apparatus, imaging device, control method and program |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
RD01 | Notification of change of attorney |
Free format text: JAPANESE INTERMEDIATE CODE: A7426 Effective date: 20201118 |
|
A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A821 Effective date: 20201118 |
|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20230904 |