JP5662702B2 - Image processing apparatus and image processing method - Google Patents
Image processing apparatus and image processing method Download PDFInfo
- Publication number
- JP5662702B2 JP5662702B2 JP2010124613A JP2010124613A JP5662702B2 JP 5662702 B2 JP5662702 B2 JP 5662702B2 JP 2010124613 A JP2010124613 A JP 2010124613A JP 2010124613 A JP2010124613 A JP 2010124613A JP 5662702 B2 JP5662702 B2 JP 5662702B2
- Authority
- JP
- Japan
- Prior art keywords
- image
- input image
- display screen
- image processing
- processing apparatus
- 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.)
- Expired - Fee Related
Links
Images
Landscapes
- Editing Of Facsimile Originals (AREA)
- Processing Or Creating Images (AREA)
- Image Processing (AREA)
Description
本発明は、画像管理技術に関するものである。 The present invention relates to an image management technique.
幾何変形などの画像の変形を伴う処理では、入力画像と出力画像の画素位置が異なるため、フレームメモリなどの記憶部を介して出力画像を生成する方法が用いられる。フレームメモリ用の記憶部には入力画像と同等のデータサイズを格納できることが要求されるため、一般にダイナミックRAM(DRAM)等の安価で大容量な第一記憶部が使用される。DRAMはスタティックRAM(SRAM)に対し、構造的に比較的安価にサイズの大きな記憶部を実現可能であるが、データのアクセスレイテンシが比較的長いという欠点をもつ。 In a process involving image deformation such as geometric deformation, since the pixel positions of the input image and the output image are different, a method of generating an output image via a storage unit such as a frame memory is used. Since the storage unit for the frame memory is required to store a data size equivalent to that of the input image, an inexpensive and large-capacity first storage unit such as a dynamic RAM (DRAM) is generally used. A DRAM can realize a large-sized storage unit at a relatively low cost structurally compared to a static RAM (SRAM), but has a disadvantage that a data access latency is relatively long.
DRAMを用いた処理の場合、DRAMのアクセスレイテンシが比較的長いため、DRAMのメモリアクセスがボトルネックとなって処理のスループットが低下するという現象が通常起こりえる。具体的には、画像処理モジュールがDRAM上の任意アドレスのデータを要求してからデータが帰ってくるまでのアクセスレイテンシが長いため、その間は画像処理モジュールの処理が停止し、処理モジュール単体の持つピーク性能に対しスループットが低下する。この問題を解決する方法として、スタティックRAM(SRAM)等の、サイズ当たりのコストは高価だがアクセスレイテンシが短い補助記憶部を持ち、必要なデータを予め部分的にSRAM内に格納しておくことで処理のスループットを向上させる方法がある。 In the case of processing using a DRAM, since the access latency of the DRAM is relatively long, a phenomenon in which the memory access of the DRAM becomes a bottleneck and the processing throughput is reduced can usually occur. Specifically, since the access latency from when the image processing module requests data at an arbitrary address on the DRAM to when the data comes back is long, the processing of the image processing module stops during that time, and the processing module alone has Throughput decreases with respect to peak performance. As a method for solving this problem, a static RAM (SRAM) or the like has an auxiliary storage unit that has a high cost per size but a short access latency, and stores necessary data partially in the SRAM in advance. There is a method for improving the throughput of processing.
必要なデータを予めSRAM内に格納するための1つ目の方法として、プリフェッチという方法がある。プリフェッチを用いると、処理モジュールが次に必要とするデータのDRAM上のアドレスを前もって発行してSRAMにデータを格納し、処理モジュールが実際にこのデータを必要とするときまでにSRAMにこのデータを格納した状態にすることができる。この様にすることで、DRAMのアクセスレイテンシを隠ぺいし、処理モジュールを停止する事無く動作させることが可能になるため、スループットを向上させることが出来る。 As a first method for storing necessary data in the SRAM in advance, there is a method called prefetch. With prefetching, the processing module issues the address of the next required data in the DRAM in advance and stores the data in the SRAM, and this data is stored in the SRAM until the processing module actually needs the data. Can be stored. By doing so, it is possible to conceal the access latency of the DRAM and to operate without stopping the processing module, so that the throughput can be improved.
必要なデータを予めSRAM内に格納するための2つ目の方法として特許文献1に記載の方法がある。特許文献1では、画像の回転処理を行う際に、入力画像を複数の画像ブロックに分割し、回転角度に応じた順序で画像ブロックを第一記憶部から読み出して補助記憶部(文献中にはバッファメモリと表記)に格納する。次に回転角度に応じた順序でバッファメモリの画像ブロックからピクセルデータを読み出す。第一記憶部からの画像ブロックの回転角度に応じた読み出しと、補助記憶部からのピクセルデータの回転角度に応じた読み出しを、入力画像の全ての画像ブロックに適用することで入力画像の回転を行う。
As a second method for storing necessary data in the SRAM in advance, there is a method described in
特許文献1の方法によれば、画像ブロックの読み出し順序は回転角度によって一意に決まる。また、個々の画像ブロックの回転処理は画像ブロック内で完結するため、第一記憶部上へのアクセスアドレスを記憶しておけば、アドレス計算を逐次行う事無くプリフェッチと同等の技術を実現できる。
According to the method of
1つ目の従来技術では、画像処理モジュールはプリフェッチの為の機構を備えなければならない。プリフェッチは画像処理モジュールのデータ消費に先行して実行されなければならないため、画像処理モジュールは2つの独立したアドレス発行機構(フェッチ、プリフェッチ)を持つ必要がある。幾何変形などの画像の変形を伴う処理では、アドレス発行機構が画像処理モジュールの回路全体に占める割合は比較的大きく、コスト・消費電力の面で問題がある。 In the first prior art, the image processing module must have a mechanism for prefetching. Since prefetching must be executed prior to data consumption of the image processing module, the image processing module needs to have two independent address issuing mechanisms (fetch, prefetch). In processing involving image deformation such as geometric deformation, the ratio of the address issuing mechanism to the entire circuit of the image processing module is relatively large, and there is a problem in terms of cost and power consumption.
2つ目の従来技術では、アドレス計算を逐次行う事無くプリフェッチと同等のことが可能であるものの、画像の回転角度は単一の画像ブロック内で完結する角度に限られるという問題がある。具体的には画像ブロックが矩形であった場合、処理可能な回転角度は90度の倍数に制限され、任意の形状変形は行えない。 The second conventional technique can perform the same as prefetch without sequentially performing address calculation, but has a problem that the rotation angle of an image is limited to an angle completed within a single image block. Specifically, when the image block is rectangular, the processable rotation angle is limited to a multiple of 90 degrees, and arbitrary shape deformation cannot be performed.
本発明は以上の問題に鑑みてなされたものであり、画像変形処理回路において比較的大きな割合を占めるプリフェッチの機構を持たずに任意の形状変形を実現するための技術を提供することを目的とする。 The present invention has been made in view of the above problems, and an object thereof is to provide a technique for realizing arbitrary shape deformation without having a prefetch mechanism that occupies a relatively large proportion in an image deformation processing circuit. To do.
本発明の目的を達成するために、本発明の一例としての画像処理装置は以下の構成を備える。即ち、入力画像を格納する格納手段と、
前記入力画像を変形させるための指示を取得する取得手段と、
前記指示に応じた変形後の画像を含む表示画面を生成するために、前記入力画像の画像データの参照が必要であるか否かを、前記表示画面を構成する複数の領域のそれぞれについて判定することで、前記表示画面の生成のために、前記入力画像の画像データの参照が必要となる回数を、前記入力画像を構成する複数の領域のそれぞれについて判定する判定手段と、
前記表示画面の生成のために、前記入力画像を構成する一の領域の画像データが参照された回数が、前記判定手段により判定された回数に達すると、前記一の領域の前記画像データを格納する前記格納手段の領域が上書き可能となるように制御する制御手段と
を備えることを特徴とする。
In order to achieve the object of the present invention, an image processing apparatus as an example of the present invention comprises the following arrangement. That is, storage means for storing the input image;
Obtaining means for obtaining an instruction for deforming the input image;
Whether or not it is necessary to refer to the image data of the input image in order to generate a display screen including a deformed image according to the instruction is determined for each of a plurality of regions constituting the display screen. Thus, determination means for determining the number of times that the reference of the image data of the input image is necessary for the generation of the display screen for each of the plurality of regions constituting the input image,
When the number of times the image data of one area constituting the input image is referred to generate the display screen reaches the number determined by the determining means, the image data of the one area is stored. And a control means for controlling the area of the storage means to be overwritable .
本発明の構成によれば、画像変形処理回路において比較的大きな割合を占めるプリフェッチの機構を持たずに任意の形状変形を実現することができ、これより回路規模を削減することができる。 According to the configuration of the present invention, it is possible to realize an arbitrary shape deformation without having a prefetch mechanism that occupies a relatively large proportion in the image deformation processing circuit, thereby reducing the circuit scale.
以下、添付図面を参照し、本発明の好適な実施形態について説明する。なお、以下説明する実施形態は、本発明を具体的に実施した場合の一例を示すもので、特許請求の範囲に記載の構成の具体的な実施例の1つである。 Preferred embodiments of the present invention will be described below with reference to the accompanying drawings. The embodiment described below shows an example when the present invention is specifically implemented, and is one of the specific examples of the configurations described in the claims.
[第1の実施形態]
先ず、本実施形態に係る画像処理装置について、図1のブロック図を用いて説明する。本実施形態に係る画像処理装置112は、画像入力部100を介して外部の装置から入力された入力画像を先ず、第一記憶部105に格納する。そして画像処理装置112はブロックデータ処理部110を用いて、この入力画像の形状を幾何的に変形させる幾何変形処理を行い、変形画像を生成する。この変形内容を示す変形指示は、ユーザがユーザ操作入力部102を用いて行う。以下に、この画像処理装置112の動作について、より詳細に説明する。
[First Embodiment]
First, the image processing apparatus according to the present embodiment will be described with reference to the block diagram of FIG. The
上記の通り、入力画像のデータは、画像入力部100を介して画像処理装置112内に取り込まれ、メモリライト部101は、この取り込まれた入力画像のデータを第一記憶部105に格納する。
As described above, the input image data is captured into the
第一記憶部105は、一般的にはダイナミックRAM(DRAM)で構成されており、本実施形態でもこの第一記憶部105はDRAMであるものとして説明するが、読み書き可能なメモリであれば他のタイプのメモリを第一記憶部105として用いても良い。なお、DRAMは、アクセスレイテンシの比較的長いメモリである。また、メモリライト部101は、一般的にはDMAコントローラ(DMAC)と呼ばれるものである。メモリライト部101は、このような第一記憶部105に対して入力画像のデータを、複数の画素から成る画素ブロック毎に格納する。
The first storage unit 105 is generally composed of a dynamic RAM (DRAM). In the present embodiment, the first storage unit 105 will be described as a DRAM. This type of memory may be used as the first storage unit 105. The DRAM is a memory having a relatively long access latency. The
なお、個々の画素ブロックには、入力画像上における画素ブロックの位置を示す情報が添付されているものとするが、この情報は個々の画素ブロックに添付せずに1つのヘッダ情報としてまとめて第一記憶部105に格納しても良い。 Each pixel block is attached with information indicating the position of the pixel block on the input image. This information is not attached to each pixel block, but is collected as one header information. You may store in the one memory | storage part 105. FIG.
ユーザ操作入力部102は、キーボードやマウスに代表される指示入力装置であり、入力画像をどのように幾何変形させるのかを示す指示(変形指示)を入力することができるのであれば、如何なる入力デバイスをユーザ操作入力部102として用いても良い。 The user operation input unit 102 is an instruction input device typified by a keyboard and a mouse, and any input device can be used as long as it can input an instruction (deformation instruction) indicating how the input image is to be geometrically deformed. May be used as the user operation input unit 102.
ここで、画像の幾何変形を行うということは、画像上の画素位置が他の画素位置に写像されることに等価である。例えば、画像をθだけ回転させるような幾何変形を行うということは、θだけ回転させる回転行列を画像上の各画素位置に掛け合わせてこの各画素位置を他の画素位置に写像することである。これは、画像の任意の方向へのシフト、拡大などの他の幾何変形についても同じことである。然るに、この変形指示には、入力画像をP、変形画像をQ、とすると、Q=M・Pを満たす写像行列Mを表す情報が含まれていることになる。ユーザ操作入力部102を介して入力されたこの変形指示は、座標変換部103に入力される。
Here, performing geometric deformation of the image is equivalent to mapping a pixel position on the image to another pixel position. For example, performing geometric deformation that rotates an image by θ means that a rotation matrix that rotates by θ is multiplied by each pixel position on the image and each pixel position is mapped to another pixel position. . The same applies to other geometric deformations such as shifting or enlarging the image in an arbitrary direction. However, this deformation instruction includes information representing a mapping matrix M satisfying Q = M · P, where P is the input image and Q is the deformation image. The deformation instruction input via the user operation input unit 102 is input to the coordinate
座標変換部103は、この変形指示に含まれている写像行列Mを用いて、変形画像上の画素位置を入力画像上の画素位置に変換する為の写像行列(M−1)を求める。即ち、上記写像行列Mを用いて、入力画像上の画素位置S(入力系座標)が変形画像上の画素位置T(出力系座標)に写像されるとすると、画素位置Tから画素位置Sを求める為の写像行列を求めることになる。
The coordinate
なお、座標変換部103は、ユーザ操作入力部102から変形指示が入力される毎にこのような写像行列を求める演算を行う。即ち、座標変換部103は常に動作しているのではなく、ユーザ操作入力部102からの入力があればこの入力に対して1回のみ動作する。もちろん、座標変換部103は、前回入力された変形指示と今回入力された変形指示とに規定量以上の差があったときのみ動作するようにしても良い。
The coordinate
また、座標変換部103は、変形画像上の画素位置を入力画像上の画素位置に変換する為の情報(若しくはそれぞれの画素位置間の関係を示す情報)であれば、写像行列でなくても良く、他の情報を求めても良い。
Further, the coordinate
アクセスシーケンス決定部104は、メモリリード部106が第一記憶部105に格納されている入力画像を複数の画素から成る画素ブロック毎に読み出す場合の、画素ブロックの読み出し順(アクセス順)等を規定するアクセスシーケンスリストを生成する。そしてアクセスシーケンス決定部104は、この生成したアクセスシーケンスリストを第一記憶部105に格納する。
The access
このアクセスシーケンスリストについて、図7を用いて説明する。アクセスシーケンスリスト790には、第一記憶部105における画素ブロックi(i=1,2,…,N:Nは画素ブロックの総数)の格納アドレス700と、画素ブロックiの参照回数を示す参照回数情報701、のセットが、画素ブロック毎に格納されている。このセットは、より先に参照される画素ブロックについてのセットがより上に位置している。例えば、第一記憶部105内におけるメモリアドレス(BASE+(OFFSET*2))に格納されているセット中の格納アドレス702は、3番目に参照する画素ブロックの第一記憶部105におけるの格納アドレスを示す。また、第一記憶部105内におけるメモリアドレス(BASE+(OFFSET*2))に格納されているセット中の参照回数情報703は、3番目に参照する画素ブロックの参照回数を示す。
This access sequence list will be described with reference to FIG. The
次に、図2を用いて、アクセスシーケンスリストについてより詳細に説明する。図2では、入力画像200を回転させた変形画像201を作成する場合について示している。図2(a)に示す如く、変形画像201は、変形画像201を含む1つの矩形画面290の最上ラインから最下ラインまで走査順(出力走査順)に生成する。変形画像201における画素ブロックの生成には当然ながら、第一記憶部105に格納されているこの画素ブロックのデータを参照する必要がある。然るに、最上ラインにより近い画素ブロックから参照されることになる。例えば、入力画像200において着目画素ブロック204は変形画像201上では「3」が付されている画素ブロックに写像されているが、この画素ブロックは最上ラインから3番目に近いので、この画素ブロックは3番目に参照する画素ブロックとなる。
Next, the access sequence list will be described in more detail with reference to FIG. FIG. 2 shows a case where a
然るにアクセスシーケンス決定部104は、第一記憶部105に格納されているそれぞれの画素ブロックに添付の情報から、それぞれの画素ブロックの入力画像上における位置を特定する。もちろん、画素ブロックの位置を他の管理方法で管理している場合には、他の方法でこの位置を取得する。そしてアクセスシーケンス決定部104は、この特定した位置を座標変換部103から受けた変形指示で写像した写像位置を求める。そして、最上ラインにより近い写像位置を求めた画素ブロックをより先の参照順として特定する。これにより、図7に示した各セットの並び順が決まる。
However, the access
次に、図2(b)を用いて、各画素ブロックの参照回数情報の決定方法について、上記の「3」が付された画素ブロック(写像後画素ブロック)を例に取り説明する。即ち、写像後画素ブロックを例に取った以下の説明は、他の画素ブロックについても同様に当てはまる。 Next, with reference to FIG. 2B, a method for determining the reference number information of each pixel block will be described taking the pixel block (post-mapping pixel block) to which “3” is attached as an example. That is, the following description taking the post-mapping pixel block as an example applies to other pixel blocks as well.
本実施形態では、原理的には、矩形画面290内で2画素×2画素の矩形領域を1画素毎に出力走査順に移動させ、矩形領域が位置Xにある場合、この位置Xにおける画素値を、この矩形領域と重なる部分を有する画素ブロック内の画素値を用いて求める。これにより変形画像201を生成する。図2(b)の例で、矩形領域が写像後画素ブロックと重なる部分を有する場合、矩形領域の位置における画素値を求めるためには、写像後画素ブロックの写像元である着目画素ブロック204を参照する必要がある。即ち、着目画素ブロック204を参照する回数は、写像後画素ブロックと矩形領域とが重なる回数に相当する。図2(b)に示す如く、この矩形領域は写像後画素ブロックと15回重なることが分かるので、この場合、着目画素ブロック204に対する参照回数は「15」となる。このように、アクセスシーケンス決定部104は、それぞれの画素ブロックについて参照回数情報を求める。これにより、図7に示した各セットが確定することになる。
In this embodiment, in principle, when a rectangular area of 2 pixels × 2 pixels is moved in the output scanning order for each pixel in the
なお、アクセスシーケンス決定部104は、座標変換部103から変形指示が入力される毎にこのようなアクセスシーケンスリストを生成する。即ち、アクセスシーケンス決定部104は常に動作しているのではなく、座標変換部103からの入力があればこの入力に対して1回のみ動作する。
The access
そしてアクセスシーケンス決定部104は、このようにして生成したアクセスシーケンスリストを第一記憶部105に格納する。なお、アクセスシーケンス決定部104が行う処理の詳細については後述する。
Then, the access
メモリリード部106は先ず第一記憶部105に格納されているアクセスシーケンスリストを読み出す。そしてメモリリード部106は、読み出したアクセスシーケンスリストに登録されているセット群を上から参照し、参照したセット中の格納アドレスに格納されている画素ブロックを第一記憶部105から読み出す。そして、メモリリード部106は、参照したセット中の参照回数情報と、このセット中の格納アドレスに格納されている画素ブロックと、をブロックデータ管理部107に送出する。メモリリード部106が行う処理の詳細については後述する。
The memory read
ブロックデータ管理部107は、メモリリード部106から受けた画素ブロック及び参照回数情報をセットにして第二記憶部108に格納する。本実施形態では、第二記憶部108は、スタティックRAM(SRAM)であるものとして説明する。このSRAMはアクセスレイテンシの比較的短いメモリである。しかし、読み書き可能なメモリであれば他のタイプのメモリを第二記憶部108として用いても良い。
The block
また、ブロックデータ管理部107は、ブロックデータ処理部110から要求された画素ブロックを第二記憶部108から読み出してブロックデータ処理部110に供給する。このとき、ブロックデータ管理部107は、供給した画素ブロックとセットにして第二記憶部108に格納した参照回数情報が示す参照回数を1つ減じることでこの参照回数情報を更新する。そしてブロックデータ管理部107は、この更新後の参照回数情報が示す参照回数が0になった場合には、この参照回数情報、及びこの参照回数情報とセットにして第二記憶部108に格納した画素ブロックを第二記憶部108から削除する。
Further, the block
ブロックデータ処理部110は、座標変換部103とのやり取りにより、変形指示に従って、ブロックデータ管理部107から受けた画素ブロックを用いて変形画像を生成する。
The block
より詳しくは、ブロックデータ処理部110は、変形画像を包含する矩形領域(図2の場合、矩形領域290)内で出力走査順に2画素×2画素のサイズの矩形領域(参照領域)を移動させる。そして、変形画像内の各画素ブロックのうちこの参照領域と重なる部分を有する画素ブロックを特定し、特定した画素ブロックにおいて参照領域と重なっている部分を構成する各画素の画素位置に対して、座標変換部103が求めた写像行列を掛け合わせる。これにより、入力画像上の対応する画素位置を求めることができる。また、ブロックデータ処理部110は、この特定した画素ブロックのデータをブロックデータ管理部107に要求する。そして、この供給に応じてブロックデータ管理部107から受けた画素ブロックにおいて、この求めた画素位置の画素の画素値を用いて、参照領域の位置における画素値を求める。このような処理により各画素の画素値が確定した変形画像を生成することができる。
More specifically, the block
なお、この説明した処理は換言すれば次の処理に等価である。即ち先ず、入力画像における画素ブロックの領域が、変形指示が示す変形に伴って写像される写像先の、入力画像中における写像後領域を演算によって求める。ここで、入力画像中のそれぞれの画素位置に規定サイズ(例えば2画素×2画素)の矩形領域を設けた場合に、入力画像中の着目画素ブロックの領域の写像先である着目写像後領域と重なる部分を有するそれぞれの矩形領域Pの入力画像中における位置をXとする。この場合、変形画像上(矩形領域290上)の位置Xにおける画素値を、矩形領域Pと重なる部分を有する写像後領域の写像元となる画素ブロック内の画素の画素値を用いて計算する。 In other words, the described processing is equivalent to the following processing. That is, first, a post-mapping area in the input image, which is a mapping destination in which the pixel block area in the input image is mapped in accordance with the deformation indicated by the deformation instruction, is obtained by calculation. Here, when a rectangular area of a prescribed size (for example, 2 pixels × 2 pixels) is provided at each pixel position in the input image, a post-target mapping area that is a mapping destination of the target pixel block area in the input image; Let X be the position in the input image of each rectangular region P having overlapping portions. In this case, the pixel value at the position X on the deformed image (on the rectangular area 290) is calculated using the pixel value of the pixel in the pixel block that is the mapping source of the post-mapping area having a portion overlapping the rectangular area P.
なお、ブロックデータ処理部110は、上記の何れの演算で画素値を求めるにせよ、変形画像の各画素の画素値を確定させた後、この変形画像に対して画素値の補間処理やフィルタ処理などの画像処理を適宜適用しても良い。
Note that the block
そしてブロックデータ処理部110は、この生成した変形画像を表示部111に送出する。この表示部111はCRTや液晶画面などにより構成されており、ブロックデータ処理部110から受けた変形画像のデータ(出力画像データ)に基づく画像を表示する。
Then, the block
次に、アクセスシーケンス決定部104が行う処理について、同処理のフローチャートを示す図3を用いて説明する。アクセスシーケンス決定部104は座標変換部103からの変形指示を受けない限りはステップS301で待機しているが、この変形指示を受けた場合には、処理はステップS301からステップS302に進む。
Next, processing performed by the access
ステップS302でアクセスシーケンス決定部104は、それぞれの画素ブロックの参照順番を決めるために用いる変数である参照ブロックオーダカウンタを1に初期化する。更にアクセスシーケンス決定部104は、画素ブロック毎に設けられる変数である参照順番を示す変数、参照回数を示す変数を0に初期化する。
In step S302, the access
そしてアクセスシーケンス決定部104は、ステップS304〜ステップS310の処理を、変形画像を包含する矩形領域(図2の場合、矩形領域290)内の各画素位置について行う。なお、図3のフローチャートには示していないが、この矩形領域内で変形画像外の領域については0等の規定の画素値を与えるものとする。以下では、この矩形領域内の画素位置i(i=1,…,M:Mはこの矩形領域の総画素数)についての処理を説明する。
Then, the access
ステップS304では画素位置iを、座標変換部103が求めた写像行列で変換し、変換画素位置iを求める。ステップS305ではアクセスシーケンス決定部104は、変換画素位置iが入力画像上の画素位置であるか否かを判断する。この判断の結果、変換画素位置iが入力画像上の画素位置である場合には処理はステップS306に進み、変換画素位置iが入力画像上の画素位置ではない場合には処理はステップS302に戻り、次の画素位置(i+1)について以降の処理を行う。
In step S304, the pixel position i is converted by the mapping matrix obtained by the coordinate
ステップS306ではアクセスシーケンス決定部104は、変形画像を包含する矩形領域内の画素位置iに参照領域を設定し、変形画像内の各画素ブロックのうちこの参照領域と重なる部分を有する画素ブロックを特定する。変形画像内の各画素ブロックは、入力画像における画素ブロックの領域が、変形指示が示す変形に伴って写像される写像先の領域に相当する。
In step S306, the access
ステップS307ではアクセスシーケンス決定部104は、ステップS306で特定した画素ブロックに対する参照回数を示す変数が0であるか否かを判断する。この判断の結果、0である場合には処理をステップS308に進め、0でない場合には処理はステップS310に進む。
In step S307, the access
ステップS308ではアクセスシーケンス決定部104は、ステップS306で特定した画素ブロックに対する参照順番を示す変数に、現在の参照ブロックオーダカウンタの値を設定する。
In step S308, the access
ステップS309ではアクセスシーケンス決定部104は、参照ブロックオーダカウンタの値を1つインクリメントしてこの参照ブロックオーダカウンタを更新する。ステップS310ではアクセスシーケンス決定部104は、参照回数を示す変数の値を1つインクリメントしてこの変数を更新する。
In step S309, the access
以上のステップS304〜S310の処理を、変形画像を包含する矩形領域内の各画素位置について行うことで、各画素ブロックについて参照順番情報、参照回数情報を求めることができる。然るにステップS312ではアクセスシーケンス決定部104は、画素ブロック毎の格納アドレス及び参照回数情報のセットを参照順番順に並べたアクセスシーケンスリストを作成し、この作成したアクセスシーケンスリストを第一記憶部105に格納する。
By performing the processes in steps S304 to S310 for each pixel position in the rectangular area including the deformed image, reference order information and reference number information can be obtained for each pixel block. However, in step S312, the access
上記の処理によってアクセスシーケンスリストが作成される過程について、図4を用いて説明する。先ずはリスト400に示す如く、各画素ブロックには画素ブロックの格納時などで付けられる識別情報(ブロックID)403が割り当てられていると共に、参照順番情報404、参照回数情報405が割り当てられている。これらの参照順番情報情報404、参照回数情報405は何れも上記の通り最初は初期化されている。
The process of creating an access sequence list by the above process will be described with reference to FIG. First, as shown in a
そして上記の処理を行うことで、リスト401に示す如く、各画素ブロックに対してステップS308で設定された参照順番が確定する。リスト401では、画素ブロック毎の情報は、参照順番でソートされている。
By performing the above processing, as shown in the
そしてリスト401の先頭に登録されているブロックID、参照順番情報、参照回数情報情報のセットのアドレスを(BASE+(OFFSET*0))として決定する。本実施形態では、リストのベースアドレスをBASE、各セットの先頭アドレス間をOFFSETとしたとき、リストの先頭からorder番目に登録されているセットのアドレスはBASE+(OFFSET*order)で求める。更に、それぞれの画素ブロックの第一記憶部105における格納アドレスを特定する。これによりリスト402に示す如く、リスト401におけるそれぞれのセットのアドレス406、画素ブロックの格納アドレス407が作成される。そして最終的には、不要なデータであるブロックID403と参照順番情報404を削除して残ったリスト408を、図7に示すようなアクセスシーケンスリストとする。図7ではアドレス406はアクセスシーケンスリストに含めていないが、含めても良い。
Then, the address of the set of the block ID, reference order information, and reference count information information registered at the top of the
次に、メモリリード部106が行う処理について、同処理のフローチャートを示す図5を用いて説明する。ステップS501ではメモリリード部106は、第一記憶部105へのアクセスアドレスに、アクセスシーケンスリストの先頭アドレスであるベースアドレス(BASE)を設定する。そしてメモリリード部106は、アクセスシーケンスリストに登録されている全てのセットについてステップS502〜S508の間の各処理を行う。
Next, processing performed by the memory read
ステップS503ではメモリリード部106は、現在設定されているアクセスアドレス(最初はステップS501で設定したアクセスアドレス)に対してアクセスし、そこに格納されているセット(格納アドレスと参照回数情報のセット)を読み出す。
In step S503, the memory read
ステップS504ではメモリリード部106は、ステップS503で読み出した格納アドレスに対してアクセスし、そこに格納されている画素ブロックを読み出す。そしてブロックデータ管理部107からの要求がない限りはステップS505で待機し、要求があれば処理はステップS505を介してステップS506に進む。
In step S504, the memory read
ステップS506ではメモリリード部106は、ステップS504で読み出した画素ブロックと、ステップS503で読み出したセット中の参照回数情報と、をブロックデータ管理部107に送出する。ステップS507ではメモリリード部106は、現在のアクセスアドレスにオフセットアドレス(OFFSET)を加算してこのアクセスアドレスを更新する。
In step S506, the memory read
次に、ブロックデータ管理部107が行う処理について、同処理のフローチャートを示す図6を用いて説明する。ステップS602ではブロックデータ管理部107は、第二記憶部108に充分な空き容量があるか否かを判断する。この判断の結果、充分な空き容量があると判断した場合には処理はステップS603に進み、無いと判断した場合には処理はステップS604に進む。
Next, processing performed by the block
ステップS603ではブロックデータ管理部107は、メモリリード部106から受けた画素ブロック及び参照回数情報をセットにして第二記憶部108に格納する。ステップS604ではブロックデータ管理部107は、ブロックデータ処理部110から画素ブロックの転送要求があるか否かを判断する。この判断の結果、転送要求があった場合には処理はステップS605に進み、転送要求がない場合には処理はステップS602に戻る。
In step S <b> 603, the block
ステップS605ではブロックデータ管理部107は、この要求された画素ブロックが第二記憶部108に格納されているか否かを判断する。この判断の結果、格納されている場合には処理はステップS606に進み、格納されていない場合には、処理はステップS602に戻る。
In step S <b> 605, the block
ステップS606ではブロックデータ管理部107は、この転送要求によって要求された画素ブロックを第二記憶部108から読み出してブロックデータ処理部110に供給する。
In step S <b> 606, the block
ステップS607ではブロックデータ管理部107は、この供給した画素ブロックとセットにして第二記憶部108に格納した参照回数情報が示す参照回数を1つ減じてこの参照回数情報を更新する。ステップS608では、この減じた参照回数が0であるか否かを判断する。この判断の結果、0であれば処理はステップS609に進み、0でない場合(0より大きい場合)には処理はステップS602に戻る。
In step S607, the block
ステップS609でブロックデータ管理部107は、参照回数0を示す参照回数情報及びこの参照回数情報とセットにして第二記憶部108に格納した画素ブロックを第二記憶部108から削除し、第二記憶部108におけるこれらの情報の記憶領域を開放する。これにより、新たな画素ブロックを取得可能な状態にする。
In step S609, the block
以降の構成によれば、ブロックデータ処理部110が要求する順序で、画素ブロックをブロックデータ管理部107によって供給することができる。また、参照回数を用いることで、ブロックデータ処理部110が必要とする間は対応する画素ブロックが保持されることが保証されるため、処理の破綻が起きない。
According to the following configuration, the block
以上の説明により、本実施形態によれば、画像変形処理を行う場合に比較的大きな割合を占めるプリフェッチの機構を持たずに任意の画像変形処理を行うことができる。また、これにより、画像処理装置の回路規模(上記処理をソフトウェアで実現する場合にはソフトウェアの規模)を削減することができる。 As described above, according to the present embodiment, any image deformation process can be performed without having a prefetch mechanism that occupies a relatively large proportion when performing the image deformation process. As a result, the circuit scale of the image processing apparatus (the scale of the software when the above processing is implemented by software) can be reduced.
以上の説明では、画素ブロックを参照して変形画像上の画素値を求める毎にこの画素ブロックに対して設定された参照回数をカウントダウンしていた。しかし、画素ブロックに対して新たにカウントアップ用の変数を設け、この画素ブロックが画素値生成用に用いられる毎にこの変数の値をカウントアップしても良い。この場合、このカウントアップ後の変数の値が、この画素ブロックについて設定された上限回数に達した場合には、この画素ブロックを第一記憶部105から削除することになる。 In the above description, every time the pixel value on the modified image is obtained by referring to the pixel block, the reference count set for this pixel block is counted down. However, a new variable for counting up may be provided for the pixel block, and the value of this variable may be counted up each time this pixel block is used for generating a pixel value. In this case, when the value of the variable after counting up reaches the upper limit number set for the pixel block, the pixel block is deleted from the first storage unit 105.
また、本実施形態では、画像を取り扱った処理を例にとって説明した。しかし、以上の説明は、画像を取り扱った例に限定するものではなく、画像以外のデータを取り扱う場合にも適用することができる。 Further, in the present embodiment, the processing using an image has been described as an example. However, the above description is not limited to an example in which an image is handled, and can also be applied when data other than an image is handled.
[第2の実施形態]
第1の実施形態では、図1に示した各部は何れもハードウェアで構成されているものとして説明した。しかし、その一部若しくは全部をコンピュータプログラムとして構成しても良い。この場合、このコンピュータプログラムは、PC(パーソナルコンピュータ)等の装置にインストールされ、この装置が有するCPUなどにより実行され、これによりこの装置は、第1の実施形態で説明した各処理を実行することができる。
[Second Embodiment]
In the first embodiment, the respective units illustrated in FIG. 1 have been described as being configured by hardware. However, some or all of them may be configured as a computer program. In this case, the computer program is installed in a device such as a PC (personal computer) and executed by a CPU or the like included in the device, whereby the device executes each process described in the first embodiment. Can do.
また、図1に示した各部のうち1以上をそれぞれ別個の装置としても良い。この場合、それぞれの装置間では有線や無線によるネットワークを介して互いにデータ通信を行いながら、第1の実施形態で説明した各処理を進めていくことになる。 One or more of the units shown in FIG. 1 may be separate devices. In this case, each process described in the first embodiment is performed while performing data communication between the apparatuses via a wired or wireless network.
[その他の実施例]
また、本発明は、以下の処理を実行することによっても実現される。即ち、上述した実施形態の機能を実現するソフトウェア(プログラム)を、ネットワーク又は各種記憶媒体を介してシステム或いは装置に供給し、そのシステム或いは装置のコンピュータ(またはCPUやMPU等)がプログラムを読み出して実行する処理である。
[Other Examples]
The present invention can also be realized by executing the following processing. That is, software (program) that realizes the functions of the above-described embodiments is supplied to a system or apparatus via a network or various storage media, and a computer (or CPU, MPU, or the like) of the system or apparatus reads the program. It is a process to be executed.
Claims (12)
前記入力画像を変形させるための指示を取得する取得手段と、
前記指示に応じた変形後の画像を含む表示画面を生成するために、前記入力画像の画像データの参照が必要であるか否かを、前記表示画面を構成する複数の領域のそれぞれについて判定することで、前記表示画面の生成のために、前記入力画像の画像データの参照が必要となる回数を、前記入力画像を構成する複数の領域のそれぞれについて判定する判定手段と、
前記表示画面の生成のために、前記入力画像を構成する一の領域の画像データが参照された回数が、前記判定手段により判定された回数に達すると、前記一の領域の前記画像データを格納する前記格納手段の領域が上書き可能となるように制御する制御手段と
を備えることを特徴とする画像処理装置。 Storage means for storing the input image;
Obtaining means for obtaining an instruction for deforming the input image;
Whether or not it is necessary to refer to the image data of the input image in order to generate a display screen including a deformed image according to the instruction is determined for each of a plurality of regions constituting the display screen. Thus, determination means for determining the number of times that the reference of the image data of the input image is necessary for the generation of the display screen for each of the plurality of regions constituting the input image,
When the number of times the image data of one area constituting the input image is referred to generate the display screen reaches the number determined by the determining means, the image data of the one area is stored. An image processing apparatus comprising: control means for controlling the area of the storage means to be overwritable .
前記制御手段は、前記判定手段により判定された参照順序に基づいて、前記格納手段よりも読み出し速度が遅い前記画像処理装置の記憶手段から前記格納手段へ画像データを移動するタイミングを制御することを特徴とする請求項1又は2に記載の画像処理装置。The control means controls the timing of moving image data from the storage means of the image processing apparatus to the storage means of the image processing apparatus whose reading speed is slower than that of the storage means based on the reference order determined by the determination means. The image processing apparatus according to claim 1, wherein the image processing apparatus is an image processing apparatus.
前記入力画像を変形させるための指示を取得する取得工程と、
前記指示に応じた変形後の画像を含む表示画面を生成するために、前記入力画像の画像データの参照が必要であるか否かを、前記表示画面を構成する複数の領域のそれぞれについて判定することで、前記表示画面の生成のために、前記入力画像の画像データの参照が必要となる回数を、前記入力画像を構成する複数の領域のそれぞれについて判定する判定工程と、
前記表示画面の生成のために、前記入力画像を構成する一の領域の画像データが参照された回数が、前記判定工程で判定された回数に達すると、前記一の領域の前記画像データを格納する前記格納手段の領域が上書き可能となるように制御する制御工程と
を備えることを特徴とする画像処理方法。 An image processing method performed by an image processing apparatus having storage means for storing an input image,
An acquisition step of acquiring an instruction for deforming the input image;
Whether or not it is necessary to refer to the image data of the input image in order to generate a display screen including a deformed image according to the instruction is determined for each of a plurality of regions constituting the display screen. Thus, a determination step of determining the number of times that the reference of the image data of the input image is necessary for the generation of the display screen for each of the plurality of regions constituting the input image;
When the number of times the image data of one area constituting the input image is referred to generate the display screen reaches the number determined in the determination step, the image data of the one area is stored. A control step of controlling so that the area of the storage means can be overwritten;
Image processing method, characterized in that it comprises a.
前記制御工程では、前記判定工程で判定された参照順序に基づいて、前記格納手段よりも読み出し速度が遅い前記画像処理装置の記憶手段から前記格納手段へ画像データを移動するタイミングを制御することを特徴とする請求項8に記載の画像処理方法。In the control step, based on the reference order determined in the determination step, the timing for moving image data from the storage unit of the image processing apparatus to the storage unit, which is slower in reading speed than the storage unit, is controlled. The image processing method according to claim 8, wherein:
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2010124613A JP5662702B2 (en) | 2010-05-31 | 2010-05-31 | Image processing apparatus and image processing method |
Applications Claiming Priority (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| JP2010124613A JP5662702B2 (en) | 2010-05-31 | 2010-05-31 | Image processing apparatus and image processing method |
Publications (3)
| Publication Number | Publication Date |
|---|---|
| JP2011253218A JP2011253218A (en) | 2011-12-15 |
| JP2011253218A5 JP2011253218A5 (en) | 2013-07-18 |
| JP5662702B2 true JP5662702B2 (en) | 2015-02-04 |
Family
ID=45417136
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| JP2010124613A Expired - Fee Related JP5662702B2 (en) | 2010-05-31 | 2010-05-31 | Image processing apparatus and image processing method |
Country Status (1)
| Country | Link |
|---|---|
| JP (1) | JP5662702B2 (en) |
Families Citing this family (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| WO2025199890A1 (en) * | 2024-03-28 | 2025-10-02 | Siemens Aktiengesellschaft | Method, system and computer-readable storage medium for generating flowblock animation |
Family Cites Families (1)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| JPH04329482A (en) * | 1991-04-30 | 1992-11-18 | Ricoh Co Ltd | Image rotation processing method and processing device for relevant method |
-
2010
- 2010-05-31 JP JP2010124613A patent/JP5662702B2/en not_active Expired - Fee Related
Also Published As
| Publication number | Publication date |
|---|---|
| JP2011253218A (en) | 2011-12-15 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US8724914B2 (en) | Image file generation device, image processing device, image file generation method, image processing method, and data structure for image files | |
| JP4926947B2 (en) | GPU rendering to system memory | |
| US6204863B1 (en) | Method for dynamic XY tiled texture caching | |
| TWI482122B (en) | Device for rotating an image, rotating unit and method | |
| US6674443B1 (en) | Memory system for accelerating graphics operations within an electronic device | |
| JP2011113234A (en) | Image processor, and method of operating the image processor | |
| CN108492243B (en) | Image rotation device, system and method based on block processing | |
| JP5510120B2 (en) | Information processing apparatus and information processing method | |
| JP4123368B2 (en) | Information processing device | |
| JP3619565B2 (en) | Data processing apparatus and system using the same | |
| CN1430769B (en) | Block Graphic Structure | |
| CN117710185A (en) | Image processing device, method, chip, electronic device, and readable storage medium | |
| CN101075422A (en) | Method and equipment for displaying rotating image | |
| JP5662702B2 (en) | Image processing apparatus and image processing method | |
| US6927776B2 (en) | Data transfer device and method | |
| JP2014142938A (en) | Pixel cache, and method of operating pixel cache | |
| CN101084493A (en) | Method and apparatus for reading and writing pixel-aligned subframes in a frame buffer | |
| US20050195200A1 (en) | Embedded system with 3D graphics core and local pixel buffer | |
| JPWO2012124251A1 (en) | Data processing apparatus, data processing method, and data sharing system | |
| JP3955862B2 (en) | Data processing apparatus and system using the same | |
| CN101443809A (en) | Programmable data processing circuit | |
| JP2011259511A (en) | Image processing apparatus and image processing method | |
| EP3321793A1 (en) | Method and system for real-time slide displaying of scanned image | |
| US20050275665A1 (en) | System and method for efficiently supporting image rotation modes by utilizing a display controller | |
| JP2006058668A (en) | Image transfer using drawing command hook |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20130530 |
|
| A621 | Written request for application examination |
Free format text: JAPANESE INTERMEDIATE CODE: A621 Effective date: 20130530 |
|
| A977 | Report on retrieval |
Free format text: JAPANESE INTERMEDIATE CODE: A971007 Effective date: 20140326 |
|
| A131 | Notification of reasons for refusal |
Free format text: JAPANESE INTERMEDIATE CODE: A131 Effective date: 20140407 |
|
| A521 | Request for written amendment filed |
Free format text: JAPANESE INTERMEDIATE CODE: A523 Effective date: 20140603 |
|
| 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: 20141107 |
|
| A61 | First payment of annual fees (during grant procedure) |
Free format text: JAPANESE INTERMEDIATE CODE: A61 Effective date: 20141205 |
|
| R151 | Written notification of patent or utility model registration |
Ref document number: 5662702 Country of ref document: JP Free format text: JAPANESE INTERMEDIATE CODE: R151 |
|
| LAPS | Cancellation because of no payment of annual fees |