JP2010176547A - Controller included in image processor, control method and control processing program - Google Patents
Controller included in image processor, control method and control processing program Download PDFInfo
- Publication number
- JP2010176547A JP2010176547A JP2009020487A JP2009020487A JP2010176547A JP 2010176547 A JP2010176547 A JP 2010176547A JP 2009020487 A JP2009020487 A JP 2009020487A JP 2009020487 A JP2009020487 A JP 2009020487A JP 2010176547 A JP2010176547 A JP 2010176547A
- Authority
- JP
- Japan
- Prior art keywords
- data
- pixel
- input image
- block
- output image
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Pending
Links
- 238000000034 method Methods 0.000 title claims abstract description 34
- 238000006243 chemical reaction Methods 0.000 claims description 9
- 230000006870 function Effects 0.000 claims description 5
- 238000010586 diagram Methods 0.000 description 8
- 239000002699 waste material Substances 0.000 description 2
- 230000010354 integration Effects 0.000 description 1
- 230000009466 transformation Effects 0.000 description 1
Images
Landscapes
- Image Processing (AREA)
- Studio Devices (AREA)
Abstract
Description
広角レンズ(例えば、魚眼レンズ)又は全方位ミラーを用いて撮像された入力画像を例えば平面に投影した出力画像に変換する画像処理装置及び方法等の技術分野に関する。 The present invention relates to a technical field such as an image processing apparatus and method for converting an input image captured using a wide-angle lens (for example, a fisheye lens) or an omnidirectional mirror into an output image projected onto a plane, for example.
従来から、例えば魚眼カメラにより撮像された魚眼画像を、表示用の平面画像に変換し出力する魚眼補正処理を行う装置が知られている(例えば、特許文献1)。 2. Description of the Related Art Conventionally, an apparatus that performs fish-eye correction processing that converts a fish-eye image captured by, for example, a fish-eye camera into a planar image for display and outputs the image is known (for example, Patent Document 1).
この魚眼補正処理においては、例えば魚眼カメラから入力された魚眼画像が入力画像フレームメモリに格納され、次に、出力結果として得たい画像(サイズ:m×n)の各画素が入力画像のどの位置に対応しているかが演算され、当該演算により求められた入力画像座標上に位置している画素が入力画像フレームメモリから取得され、これが出力画像フレームメモリに格納されるようになっている。この処理が出力画像の全画素に対してラスター順に繰り返し行われることで、最終的に所望の補正画像が得られる。 In this fisheye correction process, for example, a fisheye image input from a fisheye camera is stored in the input image frame memory, and each pixel of an image (size: m × n) to be obtained as an output result is input image. The pixel corresponding to the input image coordinate obtained by the calculation is acquired from the input image frame memory, and is stored in the output image frame memory. Yes. This process is repeated for all the pixels of the output image in raster order, so that a desired corrected image is finally obtained.
しかしながら、従来の魚眼補正処理では、入力画像における画素を取得する際に行うメモリアクセスに要する時間は長く、システム全体のボトルネックになるという問題があった。 However, the conventional fish-eye correction process has a problem that it takes a long time to access the memory when acquiring pixels in the input image, which becomes a bottleneck of the entire system.
そこで、本発明は、このような問題等に鑑みてなされたものであり、メモリアクセスに要する時間を短縮し、魚眼画像等を平面画像等に迅速に変換することが可能な画像処理装置に含まれる制御装置、制御方法、及び制御処理プログラムを提供することを課題の一つとする。 Therefore, the present invention has been made in view of such problems and the like, and an image processing apparatus capable of reducing the time required for memory access and quickly converting a fisheye image or the like into a planar image or the like. It is an object to provide a control device, a control method, and a control processing program that are included.
上記課題を解決するために、請求項1に記載の発明は、広角レンズ(例えば、魚眼レンズ)又は全方位ミラーを用いて撮像された入力画像のデータを格納するための入力画像フレームメモリと、前記入力画像を所定の大きさに分割した複数のブロックのうち、全ブロック数よりも少ない数のブロックのデータを格納するためのキャッシュメモリと、前記入力画像に基づき対象物を面(平面又は曲面)に投影した出力画像のデータを格納するための出力画像フレームメモリと、を備える画像処理装置に含まれる制御装置であって、前記出力画像における一の画素に対応する、前記入力画像における画素を特定する特定処理、前記特定された画素が含まれる前記ブロックのデータが前記キャッシュメモリに格納されていない場合に、前記入力画像フレームメモリから当該ブロックのデータを取得し当該ブロックのデータを前記キャッシュメモリに格納させる第一格納処理、前記特定された画素のデータを前記キャッシュメモリから取得し前記出力画像における画素のデータに変換する変換処理、及び、前記変換された画素のデータを前記出力画像フレームメモリに格納させる第二格納処理、を前記出力画像における全ての画素に対して順次実行することを特徴とする。
In order to solve the above problems, the invention according to
請求項2に記載の発明は、請求項1に記載の制御装置において、前記特定処理は、前記出力画像における一の画素の座標に対応する、前記入力画像における画素の座標を算出することにより、前記入力画像における画素を特定するものであって、当該入力画像における画素の座標が整数値でない場合、前記変換処理においては、当該座標の近傍に位置する複数の画素のデータを前記キャッシュメモリから取得し、当該データを用いて補間演算を行うことにより、前記出力画像における画素のデータに変換することを特徴とする。 According to a second aspect of the present invention, in the control device according to the first aspect, the specifying process calculates the coordinates of a pixel in the input image corresponding to the coordinates of one pixel in the output image. When the pixel in the input image is specified and the coordinates of the pixel in the input image are not an integer value, the conversion processing acquires data of a plurality of pixels located in the vicinity of the coordinate from the cache memory. Then, the data is converted into pixel data in the output image by performing an interpolation operation using the data.
請求項3に記載の発明は、請求項1又は2に記載の制御装置において、前記入力画像を構成する前記ブロック毎に、当該ブロックに含まれる各画素のデータが前記入力画像フレームメモリ上において1ラインに収まるように格納されることを特徴とする。 According to a third aspect of the present invention, in the control device according to the first or second aspect, for each of the blocks constituting the input image, data of each pixel included in the block is 1 on the input image frame memory. It is stored so as to fit in a line.
請求項4に記載の発明は、請求項1乃至3の何れか一項に記載の制御装置において、前記特定処理においては、前記出力画像を所定の大きさに分割した各ブロックをブロック単位のラスター順に着目すると共に、当該着目したブロックに含まれる各画素を画素単位のラスター順に着目し、当該着目した画素毎に前記入力画像における画素を特定することを特徴とする。 According to a fourth aspect of the present invention, in the control device according to any one of the first to third aspects, in the specifying process, each block obtained by dividing the output image into a predetermined size is a block unit raster. In addition to focusing on the order, each pixel included in the focused block is focused on in the raster order of the pixel unit, and the pixel in the input image is specified for each focused pixel.
請求項5に記載の発明は、請求項1乃至4の何れか一項に記載の制御装置において、前記入力画像は、魚眼画像であることを特徴とする。 According to a fifth aspect of the present invention, in the control device according to any one of the first to fourth aspects, the input image is a fish-eye image.
請求項6に記載の発明は、広角レンズ(例えば、魚眼レンズ)又は全方位ミラーを用いて撮像された入力画像のデータを格納するための入力画像フレームメモリと、前記入力画像を所定の大きさに分割した複数のブロックのうち、全ブロック数よりも少ない数のブロックのデータを格納するためのキャッシュメモリと、前記入力画像に基づき対象物を面に投影した出力画像のデータを格納するための出力画像フレームメモリと、を備える画像処理装置に含まれる制御方法であって、前記出力画像における一の画素に対応する、前記入力画像における画素を特定する特定ステップ、前記特定された画素が含まれる前記ブロックのデータが前記キャッシュメモリに格納されていない場合に、前記入力画像フレームメモリから当該ブロックのデータを取得し当該ブロックのデータを前記キャッシュメモリに格納させる第一格納ステップ、前記特定された画素のデータを前記キャッシュメモリから取得し前記出力画像における画素のデータに変換する変換ステップ、及び、前記変換された画素のデータを前記出力画像フレームメモリに格納させる第二格納ステップ、を前記出力画像における全ての画素に対して順次実行することを特徴とする。 According to a sixth aspect of the present invention, there is provided an input image frame memory for storing data of an input image captured using a wide-angle lens (for example, a fisheye lens) or an omnidirectional mirror, and the input image having a predetermined size. A cache memory for storing data of blocks smaller than the total number of blocks among a plurality of divided blocks, and an output for storing data of an output image obtained by projecting an object on a surface based on the input image A control method included in an image processing apparatus comprising: an image frame memory; a specifying step of specifying a pixel in the input image corresponding to one pixel in the output image, wherein the specified pixel is included When the block data is not stored in the cache memory, the data of the block is input from the input image frame memory. A first storage step of acquiring and storing the data of the block in the cache memory, a conversion step of acquiring the data of the specified pixel from the cache memory and converting it into pixel data in the output image, and the conversion The second storing step of storing the data of the pixels in the output image frame memory is sequentially executed for all the pixels in the output image.
請求項7に記載の制御処理プログラムの発明は、コンピュータを、請求項1乃至5の何れか一項に記載の制御装置として機能させることを特徴とする。 An invention of a control processing program according to a seventh aspect is characterized in that a computer is caused to function as the control device according to any one of the first to fifth aspects.
本発明によれば、入力画像を所定の大きさのブロック単位に分割し、ブロック単位でのデータアクセスを行い、読み込んだブロックのデータをキャッシュメモリに格納しておき、当該キャッシュメモリから画素のデータを取得して出力画像を生成するように構成したので、メモリアクセスに要する時間を短縮し、魚眼画像等の入力画像を平面画像等に迅速に変換することができる。 According to the present invention, an input image is divided into blocks each having a predetermined size, data access is performed in blocks, the read block data is stored in the cache memory, and the pixel data is stored in the cache memory. Therefore, the time required for memory access can be shortened, and an input image such as a fisheye image can be quickly converted into a flat image or the like.
以下、図面を参照して本発明の実施形態について詳細に説明する。以下に説明する実施形態は、画像処理装置に対して本発明を適用した場合の実施の形態である。 Hereinafter, embodiments of the present invention will be described in detail with reference to the drawings. The embodiment described below is an embodiment when the present invention is applied to an image processing apparatus.
[1.画像処理装置の構成及び機能概要]
先ず、本実施形態に係る画像処理装置の構成及び機能概要について、図1等を用いて説明する。
[1. Overview of image processing apparatus configuration and functions]
First, the configuration and functional overview of the image processing apparatus according to the present embodiment will be described with reference to FIG.
図1は、本実施形態に係る画像処理装置の構成例を示す図である。 FIG. 1 is a diagram illustrating a configuration example of an image processing apparatus according to the present embodiment.
図1に示すように、画像処理装置1は、ホストコントローラ11と、制御装置の一例としてのLSI(Large Scale Integration)回路12と、魚眼レンズ(広角レンズの一例)を用いて撮像された入力画像のデータを格納するための入力画像フレームメモリ(フレームバッファ)13と、当該入力画像に基づき対象物を平面(曲面であってもよいが、本実施形態においては、平面を例にとる)に投影した出力画像のデータを格納するための出力画像フレームメモリ14等を備えて構成されている。
As shown in FIG. 1, the
ホストコントローラ11は、入力画像としての魚眼画像に対する補正処理(魚眼補正処理)の切り出し位置、切り出し画像サイズ、倍率に応じた魚眼補正演算に必要な各パラメータの算出及び設定を行う。
The
LSI回路12は、魚眼補正演算回路121、入力画像フレームメモリコントローラ122、キャッシュメモリ123、画像補間回路124、及び出力画像フレームメモリコントローラ125を備えている。
The
魚眼補正演算回路121は、ホストコントローラ11により設定されたパラメータを基に、出力画像(つまり、結果として得られるべき平面画像領域)における各画素に対応する、入力画像(魚眼画像)における各画素を特定するために、当該出力画像の各画素の入力画像における対応座標(X,Y)を算出する。図2は、出力画像における一画素に対応する、入力画像における一画素を示す図である。
Based on the parameters set by the
例えば、魚眼画像を撮像するための魚眼レンズの仮想球面上の任意点で接する平面が定義され、当該平面上における各座標が公知の座標変換により、魚眼画像における各座標に変換されて上記対応座標(X,Y)が算出される。 For example, a plane that touches an arbitrary point on a virtual spherical surface of a fisheye lens for capturing a fisheye image is defined, and each coordinate on the plane is converted into each coordinate in the fisheye image by known coordinate conversion, and the above-described correspondence is made. Coordinates (X, Y) are calculated.
入力画像フレームメモリコントローラ122は、魚眼レンズを装着したカメラモジュール等からの入力画像のデータを入力画像フレームメモリ13に格納する。また、入力画像フレームメモリコントローラ122は、魚眼補正演算回路121により算出された対応座標(X,Y)における画素のデータ(ここでは、R(赤),G(緑),B(青)の夫々の輝度を示すデータ)を、入力画像フレームメモリ13に格納されたフレーム画像から、キャッシュメモリ123を介して取得し、画像補間回路124に送る。
The input image
画像補間回路124は、キャッシュメモリ123からの画素のデータを出力画像における画素のデータに変換し、出力画像フレームメモリコントローラ125に送る。
The
ここで、魚眼補正演算回路121により算出された対応座標が整数値である場合、キャッシュメモリ123からの画素のデータは、そのまま、出力画像における画素のデータとされ、出力画像フレームメモリコントローラ125に送られる。一方、魚眼補正演算回路121により算出された対応座標は必ずしも整数値となるわけでは無いため、当該対応座標が整数値でない場合、画像補間回路124は、入力画像フレームメモリコントローラ122を通じて、当該対応座標の近傍に位置する複数の画素のデータをキャッシュメモリ123から取得し、当該データを用いて補間演算(例えば、バイリニア法やバイキュービック法などの公知の補間演算)を行うことにより、出力画像における画素のデータに変換し、当該変換したデータを出力画像フレームメモリコントローラ125に送る。
Here, when the corresponding coordinates calculated by the fisheye correction
出力画像フレームメモリコントローラ125は、画像補間回路124からの画素のデータを出力画像フレームメモリ14に格納させる。
The output image
以上の処理が、出力画像における全ての画素に対して順次実行、例えばラスター順に繰り返し行われることで、出力画像フレームメモリ14上に出力画像が構築され、外部デバイス(モニター、レコーダ等)に合わせフレームデータが出力される。例えばモニター等へ出力される場合、出力画像フレームメモリコントローラ125は、フレームデータを2枚持ち、既に補間済みのフレームデータを垂直、水平同期信号とともに出力しながら、次フレーム画像を構築することになる。
The above processing is sequentially executed for all the pixels in the output image, for example, repeatedly performed in raster order, so that an output image is constructed on the output
[2.LSI回路12の機能詳細]
次に、LSI回路12の機能詳細について説明する。
[2. Detailed functions of LSI circuit 12]
Next, functional details of the
(2−1. キャッシュメモリの利用方法)
先ず、キャッシュメモリ123の利用方法について、図3等を用いて説明する。
(2-1. How to use cache memory)
First, a method of using the
図3は、ブロック単位に分割された入力画像の一例を示す概念図である。 FIG. 3 is a conceptual diagram illustrating an example of an input image divided into block units.
前述のように、メモリアクセスは長い時間を必要とするため、システムの高速化のためにはメモリアクセスの回数を極力減らす必要がある。メモリアクセスを効率的に行うための手段の一つに、一度のアクセスで複数のデータのやり取りを行うバースト転送機能が知られているが、魚眼補正処理の際のデータ取得においては、出力画像(平面画像)における1ライン(1行)上に並ぶ各画素に対応する、入力画像(魚眼画像)における各画素は1ライン上に並ばない(言い換えれば、連続したアドレスにはならない)ことが多く、入力画像フレームメモリ13へのアクセス時のロウアドレス(Row Address)は頻繁に変わるため、そのままでは効果的に利用することはできない。
As described above, since memory access requires a long time, it is necessary to reduce the number of memory accesses as much as possible in order to increase the system speed. A burst transfer function for exchanging a plurality of data in one access is known as one of the means for efficiently performing memory access, but in the data acquisition at the time of fisheye correction processing, the output image Each pixel in the input image (fisheye image) corresponding to each pixel arranged on one line (one row) in (planar image) is not arranged on one line (in other words, it is not a continuous address). In many cases, the row address (Row Address) at the time of accessing the input
このため、本発明では、図3に示すように、入力画像を所定の大きさのブロック単位に分割し、ブロック単位(この例では、1ブロックが8×8の画素により構成)でのデータアクセスを行い、また一度読み込んだブロックのデータをキャッシュメモリ123に格納(登録)することでメモリアクセスに要する時間の短縮を実現する。なお、キャッシュメモリ123には、記憶容量の関係上、分割された入力画像の全ブロックが格納されるのではなく、当該全ブロック数よりも少ない数のブロックのデータが格納される。
Therefore, in the present invention, as shown in FIG. 3, the input image is divided into blocks each having a predetermined size, and data access is performed in units of blocks (in this example, one block is composed of 8 × 8 pixels). In addition, by storing (registering) the data of the block once read in the
ここで、ブロック単位でのデータアクセスに関する実施例を、図4を用いて説明する。 Here, an embodiment relating to data access in units of blocks will be described with reference to FIG.
図4は、出力画像のあるラインを生成するために、入力画像フレームメモリ13上に存在する入力画像における画素の取得の様子を示す図であり、図4(a)内の矢印の始点から終点までに位置する画素のデータが取得されるものとする。
FIG. 4 is a diagram showing how pixels are acquired in the input image existing on the input
先ず、入力画像フレームメモリコントローラ122は、魚眼補正演算回路121により算出された対応座標(X,Y)における最初の画素として、例えば図4(b)内の“1”と記されている画素を特定し当該画素の取得を試みる。この際、特定された目的の画素が含まれる1-2ブロック(図4(a)参照)のデータがキャッシュメモリ123に格納されている場合、入力画像フレームメモリコントローラ122は、当該キャッシュメモリ123から当該画素のデータを取得する。この場合、入力画像フレームメモリコントローラ122から入力画像フレームメモリ13へのメモリアクセスを行わずに済むため、画素のデータ取得に要する時間を大幅に短縮できる。
First, the input image
一方、上記特定された画素が含まれる1-2ブロックのデータがキャッシュメモリ123に格納されていない場合、入力画像フレームメモリコントローラ122は、入力画像フレームメモリ13から当該1-2ブロックのデータを取得し(読み込み)、当該ブロックのデータをキャッシュメモリ123に格納させた後、当該キャッシュメモリ123から上記特定された画素のデータを取得する。
On the other hand, when the data of 1-2 blocks including the specified pixel is not stored in the
最初の画素のデータが取得された後、引き続き、例えば図4(b)内に記された番号の順(2→3→4→5・・・の順に)に画素のデータを取得する必要があるが、これらの画素が含まれる1-2ブロックのデータは既にキャッシュメモリ123に格納されているため、メモリアクセスをせずに、キャッシュメモリ123からこれらの画素のデータを取得することができる。
After the first pixel data is acquired, it is necessary to continuously acquire the pixel data, for example, in the order of the numbers shown in FIG. 4B (2 → 3 → 4 → 5...). However, since the data of 1-2 blocks including these pixels are already stored in the
取得対象となる目的の画素が1-2ブロックから2-2ブロックに、またその他のブロックに移っても、同様に対象ブロックのデータがキャッシュメモリ123に格納されていれば、入力画像フレームメモリコントローラ122は、当該キャッシュメモリ123から目的の画素のデータを取得し、キャッシュメモリ123に格納されていなければ、対象ブロック毎に、そのデータを入力画像フレームメモリ13から読み込みキャッシュメモリ123に格納するという動作を繰り返す。この際、上述したように、魚眼補正演算回路121による演算により求められた対応座標(取得画素座標)が必ずしも整数値ではないため、必要に応じて、複数の画素のデータがキャッシュメモリ123から取得され、補間演算処理が行われる。また、キャッシュメモリ123に所定数以上のブロック(キャッシュ)が格納される場合には、現在格納されているブロックの中で一番古いブロックのデータが上書きされる。なお、格納されるブロックの個数としては、画像補間回路124による補間演算処理を考慮すると、4個以上が望ましい。
Even if the target pixel to be acquired is shifted from the 1-2 block to the 2-2 block or to another block, if the data of the target block is stored in the
このようにブロック単位のキャッシュを利用することで、個々の画素のデータを入力画像フレームメモリ13から取得する場合に比べ、大きくメモリアクセスの回数を減らすことができる。
By using the block unit cache in this way, the number of memory accesses can be greatly reduced as compared with the case where data of individual pixels is acquired from the input
(2−2. 入力画像フレームメモリへのデータ格納方法)
次に、入力画像フレームメモリ13へのデータ格納方法について、図5を用いて説明する。
(2-2. Method of storing data in input image frame memory)
Next, a method for storing data in the input
図5は、入力画像が入力画像フレームメモリ13に格納される際の様子を示す図である。
FIG. 5 is a diagram illustrating a state when an input image is stored in the input
上述したように、本発明では、入力画像フレームメモリ13からブロック単位で画素のデータの読み込みを行うが、入力画像における各画素のデータをラスター順にそのまま入力画像フレームメモリ13に格納した場合、ブロック単位のデータを入力画像フレームメモリ13から読み込む際に、複数回のメモリアクセスが必要となってしまう。
As described above, in the present invention, pixel data is read from the input
そこで、本発明では、入力画像を構成するブロック毎に、当該ブロックに含まれる各画素のデータが入力画像フレームメモリ13上において1ラインに収まるように格納されるように構成した。
Therefore, in the present invention, for each block constituting the input image, the data of each pixel included in the block is stored so as to fit on one line on the input
入力画像フレームメモリコントローラ122は、カメラモジュール等からの入力画像を入力画像フレームメモリ13に格納する際に、図5(a),(b)に示すように、同じブロック(例えば、0-0ブロック)に含まれる画素(例えば、(0,0), (1,0),・・・(7,0),(0,1)・・・)のデータが、図5(c),(d)に示すように、1ラインに収まるように格納する。これにより、入力画像フレームメモリコントローラ122は、バースト転送を利用した一度のメモリアクセスで1ブロックのデータを入力画像フレームメモリ13から読み込みキャッシュメモリ123に格納することができる。
When the input image
(2−3.入力画像フレームメモリからのデータ取得順序)
次に、入力画像フレームメモリ13からのデータ取得順序について、図6及び図7等を用いて説明する。
(2-3. Order of obtaining data from input image frame memory)
Next, the data acquisition order from the input
図6及び図7は、出力画像における各画素に対応する、入力画像における各画素のデータの取得順序を示す図であり、図6は従来例、図7は本実施例を示している。 6 and 7 are diagrams showing the order of obtaining data of each pixel in the input image corresponding to each pixel in the output image. FIG. 6 shows a conventional example, and FIG. 7 shows this embodiment.
魚眼補正等の画像変形・変換を行う場合、図6(a)に示すように、出力画像のラスター順(矢印順)に、当該画像における各画素に対応する画素のデータを、入力画像を格納している入力画像フレームメモリ13から読み出すことで、出力画像を得る方法が一般的である。
When performing image transformation / conversion such as fisheye correction, as shown in FIG. 6 (a), the pixel data corresponding to each pixel in the image is converted into the input image in the raster order (arrow order) of the output image. A method of obtaining an output image by reading from the stored input
この際、図6に示すように、出力画像のあるラインとそのラインの前後に位置する数ラインに対応する入力画像上の画素は近い場所に位置することが多い。つまり、上述したように、入力画像から画素のデータを取得する際にブロック単位のキャッシュを利用する場合、あるラインとその前後数ラインに対応する画素のデータを取得する際には、同じブロックを必要とする可能性が高い(図6(b))。 At this time, as shown in FIG. 6, pixels on the input image corresponding to a certain line of the output image and several lines located before and after the line are often located in close proximity. In other words, as described above, when a block unit cache is used when acquiring pixel data from an input image, the same block is used when acquiring pixel data corresponding to a certain line and several lines before and after that line. There is a high possibility that it is necessary (FIG. 6 (b)).
しかし、キャッシュとして格納(保持)できるブロック数は有限であるため、出力画像のラスター順に入力画像から画素のデータを取得する場合、あるラインで一度読み込んだブロックのデータは、そのラインの処理中に別ブロックのデータに上書きされてしまうという問題がある。 However, since the number of blocks that can be stored (held) as a cache is finite, when acquiring pixel data from the input image in the raster order of the output image, the data of the block that has been read once in a certain line is being processed There is a problem that data of another block is overwritten.
例えば、キャッシュメモリ123が格納できる最大ブロック数が3とし、図6の場合を考えると、出力画像上の(1)ラインに対応する画素のデータを取得するために、入力画像上の(1)ラインの始点から終点に沿って画素のデータを取得する時、キャッシュメモリ123には、入力画像におけるブロックA,B,Cという順番に画素のデータが格納されていく。そして、ブロックDのデータが必要となった場合、ブロックAのデータが上書きされ、ブロックDのデータが格納される。次に、ブロックEのデータが必要となった場合にはブロックBのデータが上書きされ、ブロックEのデータが格納される。
For example, when the maximum number of blocks that can be stored in the
そして、(1)ライン上の画素のデータが全て取得され、(2)ライン上の画素のデータの取得に移った場合、再びブロックAのデータが必要となるが、既にブロックAのデータは上書きされており、再び入力画像フレームメモリ13から読み込む必要があり、一度入力画像フレームメモリ13から読み出したデータを再度読み出すという無駄が生じる。なお、本実施例では、キャッシュの更新は、その時点で一番古いキャッシュを対象としていたが、キャッシュの更新方法はこの限りではない。
When (1) all the pixel data on the line are acquired and (2) the pixel data on the line is acquired, the data of the block A is required again, but the data of the block A is already overwritten. Therefore, it is necessary to read from the input
そこで、本発明では、出力画像(つまり、結果として得られるべき出力画像領域)を所定の大きさに分割し、分割した各ブロックをブロック単位のラスター順に着目すると共に、当該着目したブロックに含まれる各画素をラスター順に着目して、当該着目した画素に対応する、入力画像における画素を特定、そのデータを取得するように構成した。 Therefore, in the present invention, the output image (that is, the output image region to be obtained as a result) is divided into a predetermined size, and each divided block is focused on in the raster order of the block unit and included in the focused block. Focusing on each pixel in raster order, the pixel in the input image corresponding to the focused pixel is identified and its data is acquired.
例えば、図7(a)に示すように、先ず、出力画像におけるブロックaが着目され、当該ブロックaに含まれる各画素がラスター順(図7(a)の矢印順)に着目されつつ、当該画素に対応する、入力画像における画素が入力画像フレームメモリ13から取得されキャッシュメモリ123に格納される。
For example, as shown in FIG. 7A, first, the block a in the output image is focused, and each pixel included in the block a is focused in the raster order (the arrow order in FIG. 7A). Pixels in the input image corresponding to the pixels are acquired from the input
そして、ブロックa内の全画素に対応する画素が入力画像から取得されブロックaが終了したら、図7(a)に示すブロックb,c,d,e,・・・,lという順番で、これらのブロック内の画素に対応する画素のデータが入力画像から取得されていく。これにより、取得される画素が連続して同じブロック上に位置する確率が高まるため、結果的に、出力画像を生成するのに要するブロックのデータを読みだす回数が減少し、メモリアクセスに要する時間を短縮することができる。 Then, when the pixels corresponding to all the pixels in the block a are obtained from the input image and the block a is finished, these blocks are in the order of blocks b, c, d, e,..., L shown in FIG. Pixel data corresponding to the pixels in the block is acquired from the input image. As a result, the probability that the acquired pixels are continuously located on the same block increases, and as a result, the number of times of reading the block data required to generate the output image is reduced, and the time required for memory access Can be shortened.
例えば、入力画像フレームメモリコントローラ122は、先ず、出力画像におけるブロックaに含まれる画素に対応する画素のデータを、図7(b)に示す入力画像におけるブロックA及びBから取得し、当該ブロックaに含まれる画素のデータを全て取得し終えたら、次に、出力画像におけるブロックbに含まれる画素に対応する画素のデータを入力画像におけるブロックB及びCから取得する。同様にして、出力画像におけるブロックc,dに含まれる画素に対応する画素のデータが入力画像におけるブロックC,D,Eから取得される。
For example, the input image
ここで、キャッシュメモリ123が格納できる最大ブロック数を3とすると、上述したようにブロック単位で入力画像から画素のデータを取得する方法では、同一のブロックに含まれる画素のデータを複数回読みだすことなく、出力画像の3ライン分の画素のデータを取得することができる。
Here, assuming that the maximum number of blocks that can be stored in the
[3.LSI回路12における魚眼補正処理]
次に、LSI回路12により実行される魚眼補正処理について、図8を用いて説明する。
[3. Fisheye Correction Processing in LSI Circuit 12]
Next, fisheye correction processing executed by the
図8は、LSI回路12により実行される魚眼補正処理の一例を示すフローチャートである。なお、以下の説明において、出力画像をブロック分割する際の1ブロックのサイズを(i×j)、ブロック分割した結果の横方向、縦方向のブロック数をそれぞれm+1,n+1とする。
FIG. 8 is a flowchart showing an example of fisheye correction processing executed by the
図8に示す処理は、例えばホストコントローラ11からの開始指令により開始される。
The process shown in FIG. 8 is started by a start command from the
先ず、入力画像フレームメモリコントローラ122は、カメラモジュール等から入力画像のデータを取り込み、入力画像フレームメモリ13に格納する(ステップS1)。この際、ブロック単位のデータが1ライン上に配置されるように、入力画像フレームメモリ13に格納される。
First, the input image
次いで、入力画像フレームメモリコントローラ122は、出力画像における縦方向ブロック位置Y(Y=1〜n+1までの何れかの値)を決定し(ステップS2)、当該出力画像における横方向ブロック位置X(X=1〜m+1までの何れかの値)を決定する(ステップS3)。これにより、着目するブロックが決定される。かかるステップS2,S3の処理が繰り返されることで、「2−3.入力画像フレームメモリからのデータ取得順序」で述べたように、出力画像における各ブロックがブロック単位のラスター順に着目される(つまり、左端から右端方向へブロックを順次着目し右端のブロックまで到達したら、一段下の、且つ、左端のブロックに移行し、これを繰り返す)ことになる。
Next, the input image
次いで、入力画像フレームメモリコントローラ122は、上記ステップS2及びS3の処理により着目したブロック内における縦方向座標y(y=1〜jまでの何れかの値)を決定し(ステップS4)、当該ブロック内における横方向座標x(x=1〜iまでの何れかの値)を決定する(ステップS5)。これにより、上記着目されたブロック内に含まれる1画素が着目される。かかるステップS4,S5の処理が繰り返されることで、「2−3.入力画像フレームメモリからのデータ取得順序」で述べたように、上記着目されたブロックに含まれる各画素が画素単位のラスター順に着目されることになる。
Next, the input image
こうして、着目された画素の座標(x,y)等の情報は魚眼補正演算回路121に送られ、当該魚眼補正演算回路121は、当該着目された画素の座標(x,y)に対応する、入力画像における画素の対応座標(X,Y)を上述したように算出する(ステップS6)。これにより、上記着目された画素に対応する、入力画像における画素が特定される。
Thus, information such as the coordinate (x, y) of the focused pixel is sent to the fisheye
次いで、入力画像フレームメモリコントローラ122は、上記特定された、入力画像における画素が含まれるブロック(入力画像におけるブロック)のデータがキャッシュメモリ123に格納されているか否かを判別し(ステップS7)、当該ブロックのデータがキャッシュメモリ123に格納されていない場合には(ステップS7:NO)、ステップS8に進み、当該ブロックのデータがキャッシュメモリ123に格納されている場合には(ステップS7:YES)、ステップS10に進む。
Next, the input image
ステップS8では、入力画像フレームメモリコントローラ122は、上記特定された、入力画像における画素が含まれるブロックのデータを、入力画像フレームメモリ13から取得して(読み込む)キャッシュメモリ123に格納し(ステップS9)、ステップS10に進む。
In step S8, the input image
ステップS10では、入力画像フレームメモリコントローラ122は、上記特定された、入力画像における画素のデータを、キャッシュメモリ123から取得し、画像補間回路124に送る。
In step S <b> 10, the input image
次いで、画像補間回路124は、上記特定された、入力画像における画素のデータを、出力画像における画素のデータに変換(ステップS11)、つまり、魚眼補正演算回路121により算出された対応座標が整数値である場合、キャッシュメモリ123から取得された画素のデータは、そのまま、出力画像における画素のデータとされ、当該対応座標が整数値でない場合、上述したように補間演算処理を行い、出力画像における画素のデータを得て、出力画像フレームメモリコントローラ125に送る。
Next, the
次いで、出力画像フレームメモリコントローラ125は、上記画素のデータを出力画像フレームメモリ14に格納する(ステップS12)。
Next, the output image
以上のステップS2〜S12までの処理が、図8に示すように繰り返し行われることで、最終結果としての出力画像が出力画像フレームメモリ14上に構築される。
The processing from the above steps S2 to S12 is repeatedly performed as shown in FIG. 8, so that an output image as a final result is constructed on the output
そして、出力画像フレームメモリコントローラ125は、出力画像フレームメモリ14上に構築された出力画像に基づきフレームデータを作成し、これをモニター等の外部デバイスへ出力する(ステップS13)。こうして、上記魚眼補正処理により得られた出力画像が例えばモニター上に表示される。
Then, the output image
なお、上記図8に示す魚眼補正処理は、LSI回路12内に実装されるハードウェア回路により行われるものであっても良いし、LSI回路12内に実装されるマイクロコンピュータが所定のプログラム(ソフトウェア)を実行することにより行われるものであっても良い。
Note that the fish-eye correction process shown in FIG. 8 may be performed by a hardware circuit mounted in the
以上説明したように、上記実施形態によれば、入力画像を所定の大きさのブロック単位に分割し、ブロック単位でのデータアクセスを行い、読み込んだブロックのデータをキャッシュメモリ123に格納しておき、当該キャッシュメモリ123から画素のデータを取得して出力画像を生成するように構成したので、メモリアクセスに要する時間を短縮し、魚眼画像等の入力画像を平面画像に迅速に変換することができる。
As described above, according to the above embodiment, the input image is divided into blocks each having a predetermined size, data access is performed in units of blocks, and the read block data is stored in the
また、出力画像を所定の大きさに分割し、分割した各ブロックをブロック単位のラスター順に着目すると共に、当該着目したブロックに含まれる各画素をラスター順に着目して、当該着目した画素に対応する、入力画像における画素のデータをキャッシュメモリ123から取得するように構成したので、上述した態様において、一度入力画像フレームメモリ13から読み出したデータを再度読み出すという無駄を防止することができる。
Also, the output image is divided into a predetermined size, and each divided block is focused on in the raster order of the block unit, and each pixel included in the focused block is focused on in the raster order to correspond to the focused pixel. Since the pixel data in the input image is obtained from the
なお、上記実施形態においては、魚眼レンズを用いて撮像された魚眼画像を例にとって説明したが、この他にも、例えば、全方位ミラーを用いて撮像された画像(対象物を湾曲した面に投影した画像)に対しても、本発明を適用することができる。 In the above embodiment, a fisheye image captured using a fisheye lens has been described as an example. However, other than this, for example, an image captured using an omnidirectional mirror (on a curved surface of an object) The present invention can also be applied to a projected image).
1 画像処理装置
11 ホストコントローラ
12 LSI回路
13 入力画像フレームメモリ
14 出力画像フレームメモリ
121 魚眼補正演算回路
122 入力画像フレームメモリコントローラ
123 キャッシュメモリ
124 画像補間回路
125 出力画像フレームメモリコントローラ
DESCRIPTION OF
Claims (7)
前記入力画像を所定の大きさに分割した複数のブロックのうち、全ブロック数よりも少ない数のブロックのデータを格納するためのキャッシュメモリと、
前記入力画像に基づき対象物を面に投影した出力画像のデータを格納するための出力画像フレームメモリと、
を備える画像処理装置に含まれる制御装置であって、
前記出力画像における一の画素に対応する、前記入力画像における画素を特定する特定処理、
前記特定された画素が含まれる前記ブロックのデータが前記キャッシュメモリに格納されていない場合に、前記入力画像フレームメモリから当該ブロックのデータを取得し当該ブロックのデータを前記キャッシュメモリに格納させる第一格納処理、
前記特定された画素のデータを前記キャッシュメモリから取得し前記出力画像における画素のデータに変換する変換処理、及び、
前記変換された画素のデータを前記出力画像フレームメモリに格納させる第二格納処理、
を前記出力画像における全ての画素に対して順次実行することを特徴とする制御装置。 An input image frame memory for storing data of an input image captured using a wide-angle lens or an omnidirectional mirror;
Among a plurality of blocks obtained by dividing the input image into a predetermined size, a cache memory for storing data of a smaller number of blocks than the total number of blocks;
An output image frame memory for storing data of an output image obtained by projecting an object on a surface based on the input image;
A control device included in an image processing apparatus comprising:
A specifying process for specifying a pixel in the input image corresponding to one pixel in the output image;
First, when the block data including the specified pixel is not stored in the cache memory, the block data is acquired from the input image frame memory and the block data is stored in the cache memory. Storage processing,
A conversion process for acquiring the data of the identified pixel from the cache memory and converting the data to the pixel data in the output image; and
A second storage process for storing the converted pixel data in the output image frame memory;
Is sequentially executed for all the pixels in the output image.
前記特定処理は、前記出力画像における一の画素の座標に対応する、前記入力画像における画素の座標を算出することにより、前記入力画像における画素を特定するものであって、
当該入力画像における画素の座標が整数値でない場合、前記変換処理においては、当該座標の近傍に位置する複数の画素のデータを前記キャッシュメモリから取得し、当該データを用いて補間演算を行うことにより、前記出力画像における画素のデータに変換することを特徴とする制御装置。 The control device according to claim 1,
The specifying process specifies a pixel in the input image by calculating a coordinate of a pixel in the input image corresponding to a coordinate of one pixel in the output image,
When the coordinates of the pixel in the input image are not integer values, the conversion process obtains data of a plurality of pixels located in the vicinity of the coordinate from the cache memory, and performs an interpolation operation using the data A control device for converting into pixel data in the output image.
前記入力画像を構成する前記ブロック毎に、当該ブロックに含まれる各画素のデータが前記入力画像フレームメモリ上において1ラインに収まるように格納されることを特徴とする制御装置。 The control device according to claim 1 or 2,
A control device, wherein for each block constituting the input image, data of each pixel included in the block is stored so as to fit in one line on the input image frame memory.
前記特定処理においては、前記出力画像を所定の大きさに分割した各ブロックをブロック単位のラスター順に着目すると共に、当該着目したブロックに含まれる各画素を画素単位のラスター順に着目し、当該着目した画素毎に前記入力画像における画素を特定することを特徴とする制御装置。 In the control device according to any one of claims 1 to 3,
In the specific processing, attention is paid to each block obtained by dividing the output image into a predetermined size in the order of the raster in block units, and attention is paid to each pixel included in the focused block in the order of raster in pixel units. A control device that identifies a pixel in the input image for each pixel.
前記入力画像は、魚眼画像であることを特徴とする制御装置。 The control device according to any one of claims 1 to 4,
The control apparatus according to claim 1, wherein the input image is a fish-eye image.
前記入力画像を所定の大きさに分割した複数のブロックのうち、全ブロック数よりも少ない数のブロックのデータを格納するためのキャッシュメモリと、
前記入力画像に基づき対象物を面に投影した出力画像のデータを格納するための出力画像フレームメモリと、
を備える画像処理装置に含まれる制御方法であって、
前記出力画像における一の画素に対応する、前記入力画像における画素を特定する特定ステップ、
前記特定された画素が含まれる前記ブロックのデータが前記キャッシュメモリに格納されていない場合に、前記入力画像フレームメモリから当該ブロックのデータを取得し当該ブロックのデータを前記キャッシュメモリに格納させる第一格納ステップ、
前記特定された画素のデータを前記キャッシュメモリから取得し前記出力画像における画素のデータに変換する変換ステップ、及び、
前記変換された画素のデータを前記出力画像フレームメモリに格納させる第二格納ステップ、
を前記出力画像における全ての画素に対して順次実行することを特徴とする制御方法。 An input image frame memory for storing data of an input image captured using a wide-angle lens or an omnidirectional mirror;
Among a plurality of blocks obtained by dividing the input image into a predetermined size, a cache memory for storing data of a smaller number of blocks than the total number of blocks;
An output image frame memory for storing data of an output image obtained by projecting an object on a surface based on the input image;
A control method included in an image processing apparatus comprising:
A specifying step of specifying a pixel in the input image corresponding to one pixel in the output image;
First, when the block data including the specified pixel is not stored in the cache memory, the block data is acquired from the input image frame memory and the block data is stored in the cache memory. Storage step,
A conversion step of acquiring the specified pixel data from the cache memory and converting the data into pixel data in the output image; and
A second storing step of storing the converted pixel data in the output image frame memory;
Is sequentially executed for all the pixels in the output image.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009020487A JP2010176547A (en) | 2009-01-30 | 2009-01-30 | Controller included in image processor, control method and control processing program |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
JP2009020487A JP2010176547A (en) | 2009-01-30 | 2009-01-30 | Controller included in image processor, control method and control processing program |
Publications (1)
Publication Number | Publication Date |
---|---|
JP2010176547A true JP2010176547A (en) | 2010-08-12 |
Family
ID=42707430
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
JP2009020487A Pending JP2010176547A (en) | 2009-01-30 | 2009-01-30 | Controller included in image processor, control method and control processing program |
Country Status (1)
Country | Link |
---|---|
JP (1) | JP2010176547A (en) |
Cited By (6)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012238118A (en) * | 2011-05-10 | 2012-12-06 | Canon Inc | Image processing device, image processing method, and program |
JP2013186705A (en) * | 2012-03-08 | 2013-09-19 | Mega Chips Corp | Data transfer device and data transfer method |
JP2014035589A (en) * | 2012-08-07 | 2014-02-24 | Hitachi Information & Telecommunication Engineering Ltd | Correction apparatus and correction method of fish-eye image |
JP2014186458A (en) * | 2013-03-22 | 2014-10-02 | Toshiba Corp | Microlens array recognition processor |
WO2015098721A1 (en) * | 2013-12-27 | 2015-07-02 | 大日本印刷株式会社 | Image processing device, image processing method, image processing program, and imaging device |
JP2017175498A (en) * | 2016-03-25 | 2017-09-28 | 日立オートモティブシステムズ株式会社 | Image processing apparatus and image processing method |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0737079A (en) * | 1993-06-25 | 1995-02-07 | Matsushita Electric Works Ltd | Method and device for correcting picture distortion |
JPH09245153A (en) * | 1996-03-06 | 1997-09-19 | Dainippon Printing Co Ltd | Image processor |
JPH11250238A (en) * | 1998-02-27 | 1999-09-17 | Kyocera Corp | Digital image pickup device for operating distortion correction by block unit |
JP2000339441A (en) * | 1999-05-28 | 2000-12-08 | Kanda Tsushin Kogyo Co Ltd | Coordinate transformation device |
JP2001101396A (en) * | 1999-09-30 | 2001-04-13 | Toshiba Corp | Processor and method for correcting image distortion and medium with program performing image distortion correction processing stored therein |
JP2002268624A (en) * | 2001-03-12 | 2002-09-20 | Mega Chips Corp | Device and method for correcting image |
JP2004064710A (en) * | 2002-07-31 | 2004-02-26 | Fuji Photo Film Co Ltd | Image pickup device and distortion correction method |
JP2005044098A (en) * | 2003-07-28 | 2005-02-17 | Olympus Corp | Image processor and image processing method |
-
2009
- 2009-01-30 JP JP2009020487A patent/JP2010176547A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JPH0737079A (en) * | 1993-06-25 | 1995-02-07 | Matsushita Electric Works Ltd | Method and device for correcting picture distortion |
JPH09245153A (en) * | 1996-03-06 | 1997-09-19 | Dainippon Printing Co Ltd | Image processor |
JPH11250238A (en) * | 1998-02-27 | 1999-09-17 | Kyocera Corp | Digital image pickup device for operating distortion correction by block unit |
JP2000339441A (en) * | 1999-05-28 | 2000-12-08 | Kanda Tsushin Kogyo Co Ltd | Coordinate transformation device |
JP2001101396A (en) * | 1999-09-30 | 2001-04-13 | Toshiba Corp | Processor and method for correcting image distortion and medium with program performing image distortion correction processing stored therein |
JP2002268624A (en) * | 2001-03-12 | 2002-09-20 | Mega Chips Corp | Device and method for correcting image |
JP2004064710A (en) * | 2002-07-31 | 2004-02-26 | Fuji Photo Film Co Ltd | Image pickup device and distortion correction method |
JP2005044098A (en) * | 2003-07-28 | 2005-02-17 | Olympus Corp | Image processor and image processing method |
Cited By (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
JP2012238118A (en) * | 2011-05-10 | 2012-12-06 | Canon Inc | Image processing device, image processing method, and program |
JP2013186705A (en) * | 2012-03-08 | 2013-09-19 | Mega Chips Corp | Data transfer device and data transfer method |
JP2014035589A (en) * | 2012-08-07 | 2014-02-24 | Hitachi Information & Telecommunication Engineering Ltd | Correction apparatus and correction method of fish-eye image |
JP2014186458A (en) * | 2013-03-22 | 2014-10-02 | Toshiba Corp | Microlens array recognition processor |
WO2015098721A1 (en) * | 2013-12-27 | 2015-07-02 | 大日本印刷株式会社 | Image processing device, image processing method, image processing program, and imaging device |
JP2015128263A (en) * | 2013-12-27 | 2015-07-09 | 大日本印刷株式会社 | Image processing system, image processing method, program for image processing and imaging apparatus |
JP2017175498A (en) * | 2016-03-25 | 2017-09-28 | 日立オートモティブシステムズ株式会社 | Image processing apparatus and image processing method |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
JP5593060B2 (en) | Image processing apparatus and method of operating image processing apparatus | |
JP5178961B2 (en) | Image synthesizer | |
JP2010176547A (en) | Controller included in image processor, control method and control processing program | |
JP5679763B2 (en) | Semiconductor integrated circuit and all-around video system | |
JP5602532B2 (en) | Image processing apparatus and image processing method | |
JP5893445B2 (en) | Image processing apparatus and method of operating image processing apparatus | |
JP5735227B2 (en) | Image conversion apparatus and image conversion system | |
JP2010239596A (en) | Video processing apparatus | |
US10713757B2 (en) | Image processing apparatus, control method thereof, and storage medium | |
JP2010081024A (en) | Device for interpolating image | |
JP4432786B2 (en) | Camera device and image processing method | |
JP2014035589A (en) | Correction apparatus and correction method of fish-eye image | |
JP5676233B2 (en) | Image processing apparatus, image processing method, and imaging apparatus | |
JP4970378B2 (en) | Memory controller and image processing apparatus | |
JP6295619B2 (en) | Image processing apparatus and method, and electronic apparatus | |
JP5959684B2 (en) | Image conversion system | |
JP5387276B2 (en) | Image processing apparatus and image processing method | |
JP6273881B2 (en) | Image processing apparatus, image processing method, and program | |
JP6440465B2 (en) | Image processing apparatus, image processing method, and program | |
JP2018005389A (en) | Image deformation circuit, image processing apparatus, and image deformation method | |
JP6467940B2 (en) | Image processing apparatus, image processing method, and program | |
JP2017228849A (en) | Image processing apparatus, imaging device, control method and program | |
JP2015154455A (en) | image processing apparatus, image processing method and image processing program | |
JP5867903B2 (en) | Image processing apparatus, image processing method, and program | |
US20160156852A1 (en) | Image processing apparatus, electronic apparatus, and image processing method |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20111107 |
|
A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20120731 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20120807 |
|
A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20130416 |
|
A02 | Decision of refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A02 Effective date: 20131008 |