[go: up one dir, main page]

JP2010134692A - Information processor and information processing method - Google Patents

Information processor and information processing method Download PDF

Info

Publication number
JP2010134692A
JP2010134692A JP2008309888A JP2008309888A JP2010134692A JP 2010134692 A JP2010134692 A JP 2010134692A JP 2008309888 A JP2008309888 A JP 2008309888A JP 2008309888 A JP2008309888 A JP 2008309888A JP 2010134692 A JP2010134692 A JP 2010134692A
Authority
JP
Japan
Prior art keywords
information
divided
area
accumulated
cumulative
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
JP2008309888A
Other languages
Japanese (ja)
Other versions
JP5349931B2 (en
Inventor
Takahisa Yamamoto
貴久 山本
Yoshinori Ito
嘉則 伊藤
Masami Kato
政美 加藤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Canon Inc
Original Assignee
Canon Inc
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Canon Inc filed Critical Canon Inc
Priority to JP2008309888A priority Critical patent/JP5349931B2/en
Publication of JP2010134692A publication Critical patent/JP2010134692A/en
Application granted granted Critical
Publication of JP5349931B2 publication Critical patent/JP5349931B2/en
Expired - Fee Related legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Landscapes

  • Image Analysis (AREA)
  • Image Processing (AREA)

Abstract

<P>PROBLEM TO BE SOLVED: To provide an information processor, an information processing method or the like, reducing an array (memory) in processing of accumulation information. <P>SOLUTION: Firstly, a processing object image is divided to predetermined areas (divided areas), and accumulation information for pixel value (divided area accumulation information) is calculated for each divided area (step S41). A total sum of pixel values in a specific area (rectangular area) regulated on the processing object image (specific area total sum value) is then determined by use of the divided area accumulation information (step S42). <P>COPYRIGHT: (C)2010,JPO&INPIT

Description

本発明は、矩形領域内の信号値の合計及び平均等を求めるフィルタ演算並びにこのようなフィルタ演算を用いたパターン識別等に好適な情報処理装置及び情報処理方法等に関する。   The present invention relates to a filter operation for obtaining the sum and average of signal values in a rectangular area, and an information processing apparatus and information processing method suitable for pattern identification using such a filter operation.

情報処理の分野では、多次元配列を頻繁に扱う。その中で、特定範囲内の要素の和を求めることが多い。そして、非特許文献1には、コンピュータ・グラフィックスの処理に関し、長方形の累積情報(summed-area table)の概念が記載されている。累積情報とは、任意の点における要素値が、元画像の原点とその任意の点とを対角とする領域内の画素値の総和となるようなデータである。   In the field of information processing, multidimensional arrays are frequently handled. Among them, the sum of elements within a specific range is often obtained. Non-Patent Document 1 describes the concept of rectangular accumulated information (summed-area table) regarding computer graphics processing. Cumulative information is data such that the element value at an arbitrary point is the sum of the pixel values in a region whose diagonal is the origin of the original image and the arbitrary point.

ここで、図13を用いて累積情報を用いた矩形領域内の画素値の総和の算出処理について説明する。図13は、累積情報の例を示す図である。この例では、元画像の左上の点を原点としている。そして、図13中の要素1は、元画像における領域Aに含まれる全画素の画素値の総和を要素値として持つ。このため、元画像における領域Dに含まれる全画素の画素値の合計は、4の要素値から要素2及び要素3の要素値を減算し、要素1の要素値を加算することによって算出される。つまり、元画像での矩形領域の画素値の総和が、累積情報を用いれば、矩形領域の4隅のデータ値を加減算することで高速に求めることができる。   Here, a process of calculating the sum of the pixel values in the rectangular area using the accumulated information will be described with reference to FIG. FIG. 13 is a diagram illustrating an example of accumulated information. In this example, the origin is the upper left point of the original image. Element 1 in FIG. 13 has the sum of the pixel values of all the pixels included in area A in the original image as the element value. For this reason, the sum of the pixel values of all the pixels included in the region D in the original image is calculated by subtracting the element values of element 2 and element 3 from the element value of 4, and adding the element value of element 1 . That is, the sum of the pixel values of the rectangular area in the original image can be obtained at high speed by adding / subtracting the data values at the four corners of the rectangular area, using accumulated information.

つまり、入力画像の画素値をI(x,y)として、累積情報C(x,y)を数1に示すように定義した場合、入力画像に置かれた任意の矩形領域内のI(x,y)の和は、数2に示す式を使って累積情報上の4点を参照するのみで、求めることができる。   That is, when the pixel value of the input image is defined as I (x, y) and the cumulative information C (x, y) is defined as shown in Equation 1, I (x in an arbitrary rectangular area placed in the input image , Y) can be obtained simply by referring to the four points on the accumulated information using the equation shown in equation (2).

Figure 2010134692
Figure 2010134692

Figure 2010134692
Figure 2010134692

ここで、(x0,y0)は長方形の左上の頂点座標、(x1,y1)は右下の頂点座標である。このような処理により、画像上の矩形領域内の値の和を高速に求めることが可能となる。ただし、座標は0から始まるものとし、C(x,−1)及びC(−1,y)は0とする。 Here, (x 0 , y 0 ) is the upper left vertex coordinates of the rectangle, and (x 1 , y 1 ) is the lower right vertex coordinates. By such processing, the sum of the values in the rectangular area on the image can be obtained at high speed. However, the coordinates start from 0, and C (x, −1) and C (−1, y) are 0.

また、画像認識の分野においては、非特許文献2に、上記のような累積情報(Integral Image)を使って高速な顔検出を行うことが記載されている。   Further, in the field of image recognition, Non-Patent Document 2 describes that high-speed face detection is performed using cumulative information (Integral Image) as described above.

Crow, "Summed-Area Tables For Texture Mapping", Computer Graphics, Vol. 18(3), pp. 207-212, July 1984.Crow, "Summed-Area Tables For Texture Mapping", Computer Graphics, Vol. 18 (3), pp. 207-212, July 1984. P. Viola, M. Jones, "Rapid Object Detection using a Boosted Cascade of Simple Features", Proc. IEEE Conf. on Computer Vision and Pattern Recognition, Vol. 1, pp. 511-518, December 2001.P. Viola, M. Jones, "Rapid Object Detection using a Boosted Cascade of Simple Features", Proc. IEEE Conf. On Computer Vision and Pattern Recognition, Vol. 1, pp. 511-518, December 2001.

このような累積情報の要素値は、元画像の原点から離れるほど、図13に示す例では、右下に向かうほど単調に増加する。従って、累積情報を配列(メモリ)に格納しようとした場合、その配列は、累積情報の右下のデータ値(元画像の原点である左上から最も離れた位置の累積情報値、つまり、累積情報の最大の要素値)が格納できるだけのビット幅を持つ必要がある。   The element value of such accumulated information increases monotonously as it goes away from the origin of the original image and toward the lower right in the example shown in FIG. Therefore, when the accumulated information is to be stored in the array (memory), the array has the lower right data value (the accumulated information value at the position farthest from the upper left, which is the origin of the original image, that is, the accumulated information). Must have a bit width that can be stored.

この場合、元画像のサイズが大きくなればなるほど、累積情報の桁数が増加し、そのため累積情報を格納するのに必要な配列のビット幅が大きくなり、その結果、配列全体のサイズが巨大になる。   In this case, the larger the size of the original image, the greater the number of digits of the accumulated information, and therefore the bit width of the array necessary to store the accumulated information becomes larger. As a result, the size of the entire array becomes enormous. Become.

この課題に対し、非特許文献1には、元画像を分割し、その分割した元画像単位で累積情報を算出すると同時に、別の配列に、元画像の原点から分割画像の原点までの累積値を記憶しておく処理が記載されている。   In response to this problem, Non-Patent Document 1 divides an original image, calculates cumulative information in units of the divided original images, and at the same time, accumulates values from the origin of the original image to the origin of the divided image in another array. Is stored.

しかしながら、このような処理を行うためには、累積値を記憶しておくための配列(メモリ)が別途必要となってしまう。   However, in order to perform such processing, an array (memory) for storing the accumulated value is separately required.

本発明は、累積情報を扱う際の配列(メモリ)を小さくすることができる情報処理装置及び情報処理方法等を提供することを目的とする。   An object of the present invention is to provide an information processing apparatus, an information processing method, and the like that can reduce an array (memory) when handling accumulated information.

本願発明者は、前記課題を解決すべく鋭意検討を重ねた結果、以下に示す発明の諸態様に想到した。   As a result of intensive studies to solve the above problems, the present inventor has come up with various aspects of the invention described below.

本発明に係る情報処理装置は、複数次元配列の処理対象情報を複数の分割領域に分割する分割手段と、前記処理対象情報内の各要素位置に対応する累積情報値として、前記分割領域の所定の原点位置と前記分割領域に属する前記処理対象情報の各要素位置とを対角とする領域内の全ての要素値の総和値を、前記分割領域毎に算出する算出手段と、を有することを特徴とする。   An information processing apparatus according to the present invention includes a dividing unit that divides processing target information of a multidimensional array into a plurality of divided regions, and a predetermined information of the divided regions as accumulated information values corresponding to each element position in the processing target information. Calculating means for calculating, for each of the divided regions, a total value of all the element values in a region diagonally corresponding to the origin position of each element position of the processing target information belonging to the divided region. Features.

本発明に係る情報処理方法は、複数次元配列の処理対象情報を複数の分割領域に分割する分割ステップと、前記処理対象情報内の各要素位置に対応する累積情報値として、前記分割領域の所定の原点位置と前記分割領域に属する前記処理対象情報の各要素位置とを対角とする領域内の全ての要素値の総和値を、前記分割領域毎に算出する算出ステップと、を有することを特徴とする。   An information processing method according to the present invention includes a dividing step of dividing processing target information in a multidimensional array into a plurality of divided regions, and a cumulative information value corresponding to each element position in the processing target information. A calculation step of calculating, for each of the divided regions, a total value of all element values in a region whose diagonal is the origin position of each of the processing target information belonging to the divided region. Features.

本発明によれば、2次元以上の複数次元配列である処理対象情報の累積情報を算出する際の累積情報の桁数の増加を抑制することができる。このため、累積情報を格納するためのバッファ容量を低減したり、累積情報を用いた演算回路の規模を縮小したりすることが可能となる。   ADVANTAGE OF THE INVENTION According to this invention, the increase in the number of digits of accumulation information at the time of calculating the accumulation information of the process target information which is a two-dimensional or more multidimensional array can be suppressed. For this reason, it is possible to reduce the capacity of the buffer for storing the accumulated information and to reduce the scale of the arithmetic circuit using the accumulated information.

以下、本発明の実施形態について添付の図面を参照して具体的に説明する。   Hereinafter, embodiments of the present invention will be specifically described with reference to the accompanying drawings.

(第1の実施形態)
先ず、本発明の第1の実施形態について説明する。図1は、本発明の第1の実施形態に係る情報処理装置の構成を示すブロック図である。本実施形態では、情報処理として、矩形領域内の画素値の総和を算出する画像処理を行う。また、矩形領域内の画素の総和を算出する際には、累積情報を用いる。
(First embodiment)
First, a first embodiment of the present invention will be described. FIG. 1 is a block diagram showing the configuration of the information processing apparatus according to the first embodiment of the present invention. In the present embodiment, as information processing, image processing for calculating the sum of pixel values in a rectangular area is performed. Also, cumulative information is used when calculating the sum of pixels in the rectangular area.

第1の実施形態に係る情報処理装置には、図1に示すように、CPU101、情報入力部102、DMAコントローラ(DMAC)103、処理対象情報格納メモリ104、バス105及び累積情報演算処理部100が設けられている。CPU101が累積情報演算処理部100を兼用してもよい。   As shown in FIG. 1, the information processing apparatus according to the first embodiment includes a CPU 101, an information input unit 102, a DMA controller (DMAC) 103, a processing target information storage memory 104, a bus 105, and a cumulative information calculation processing unit 100. Is provided. The CPU 101 may also serve as the cumulative information calculation processing unit 100.

CPU101は、バス105を介して接続される各部を制御し、情報処理装置が目的とする所望の処理を実現する。   The CPU 101 controls each unit connected via the bus 105 and realizes a desired process intended by the information processing apparatus.

情報入力部102は、複数次元の処理対象情報を入力する。例えば処理対象となる入力画像データを装置内に取り込む。情報入力部102は、CCD等の画像センサによって構成されてもよく、また、ネットワーク等の所定の通信経路を持って外部装置から処理したいデータを受信するI/F装置であってもよい。   The information input unit 102 inputs multi-dimensional processing target information. For example, input image data to be processed is taken into the apparatus. The information input unit 102 may be configured by an image sensor such as a CCD, or may be an I / F device that receives data to be processed from an external device through a predetermined communication path such as a network.

処理対象情報格納メモリ104は、例えば、ROM、RAM又はHDD等のストレージ装置で構成されており、バス105に接続されている。処理対象情報格納メモリ104は、処理対象情報を保持する領域として用いられる。また、CPU101の動作内容を示すプログラムコードを記憶したり、各種処理を行ったりする作業領域(図示せず)を兼用してもよい。ここで、処理対象情報は、例えば画像データであり、本実施形態では、図5に示すように、256画素×256画素のサイズで、画素値が8ビットで表されている画像データが、処理対象情報格納メモリ104に格納されているとする。   The processing target information storage memory 104 is configured by a storage device such as a ROM, RAM, or HDD, and is connected to the bus 105. The processing target information storage memory 104 is used as an area for holding processing target information. Also, a program code indicating the operation content of the CPU 101 may be stored, or a work area (not shown) in which various processes are performed may also be used. Here, the processing target information is, for example, image data. In this embodiment, as shown in FIG. 5, image data having a size of 256 pixels × 256 pixels and a pixel value represented by 8 bits is processed. Assume that it is stored in the target information storage memory 104.

DMAコントローラ103は、CPU101が設定して動作指令を行うと、情報入力部102、処理対象情報格納メモリ104及び累積情報演算処理部100間での所定サイズのデータ転送を自立的に連続して制御する。そして、指令された転送動作が完了すると、バス105を介して割り込み信号をCPU101に通知する。   When the CPU 101 sets and issues an operation command, the DMA controller 103 independently and continuously controls data transfer of a predetermined size among the information input unit 102, the processing target information storage memory 104, and the cumulative information calculation processing unit 100. To do. When the commanded transfer operation is completed, an interrupt signal is notified to the CPU 101 via the bus 105.

累積情報演算処理部100には、バス105に接続するバスI/F110、累積情報生成部111、累積情報利用演算部112、累積情報保持部113及び分割制御部114が設けられている。   The cumulative information calculation processing unit 100 is provided with a bus I / F 110 connected to the bus 105, a cumulative information generation unit 111, a cumulative information use calculation unit 112, a cumulative information holding unit 113, and a division control unit 114.

累積情報保持部113には、詳細は後述するが、図2に示すように、累積情報を保持する累積情報保持メモリ、及びこのメモリへの入出力を制御するメモリコントローラが設けられている。   As will be described in detail later, the cumulative information holding unit 113 is provided with a cumulative information holding memory that holds cumulative information and a memory controller that controls input and output to this memory, as shown in FIG.

累積情報生成部111は、情報入力部102から入力され、処理対象情報格納メモリ104に格納された処理対象画像の累積情報(処理対象情報内の各要素位置に対応する累積情報値)を生成し、この累積情報を累積情報保持部113へ格納する。この際に、分割制御部114による制御に基づき、単純な累積情報ではなく、分割領域累積情報を算出する。ここで、処理対象画像を分割した夫々の画像を分割領域といい、分割領域累積情報とは、処理対象画像を分割領域に分割し、分割領域毎に算出する累積情報をいう。なお、本実施形態では、CPU101の制御により、処理対象情報格納メモリ104に格納された画像情報が、1画素ずつラスタスキャン順に累積情報演算処理部100に送られ、累積情報生成部111が、この画像情報に対して分割領域累積情報を算出する。なお、累積情報生成部111の詳細は、図2を参照しながら後述する。   The cumulative information generation unit 111 generates cumulative information (cumulative information value corresponding to each element position in the processing target information) of the processing target image input from the information input unit 102 and stored in the processing target information storage memory 104. The accumulated information is stored in the accumulated information holding unit 113. At this time, based on the control by the division control unit 114, not the simple accumulated information but the divided area accumulated information is calculated. Here, each image obtained by dividing the processing target image is referred to as a divided region, and the divided region cumulative information refers to cumulative information that is calculated for each divided region by dividing the processing target image into divided regions. In the present embodiment, the image information stored in the processing target information storage memory 104 is sent pixel by pixel to the cumulative information calculation processing unit 100 in raster scan order under the control of the CPU 101, and the cumulative information generation unit 111 Divided region cumulative information is calculated for the image information. Details of the cumulative information generation unit 111 will be described later with reference to FIG.

累積情報利用演算部112は、CPU101からの要求に従って累積情報保持部113に保持されている領域分割累積情報を用いた演算処理を行い、その結果をCPU101に返す。なお、累積情報利用演算部112の詳細は、図3を参照しながら後述する。   The cumulative information use arithmetic unit 112 performs arithmetic processing using the area division cumulative information held in the cumulative information holding unit 113 in accordance with a request from the CPU 101, and returns the result to the CPU 101. The details of the accumulated information use calculation unit 112 will be described later with reference to FIG.

分割制御部114には、予め分割パラメータが設定されている。分割パラメータとは、処理対象画像をどのように分割するのかを規定するパラメータである。例えば、本実施形態では、図5に示すように、64画素×64画素のサイズを単位として全て同サイズの分割領域に分割するということが分割パラメータによって規定されている。分割パラメータのフォーマットは、分割の状態が表現できるものであれば、任意である。分割パラメータは、予め何らかの手段(例えばCPU101)により、分割制御部114に設定されている。   In the division control unit 114, division parameters are set in advance. The division parameter is a parameter that defines how to divide the processing target image. For example, in the present embodiment, as shown in FIG. 5, the division parameter stipulates that the size of 64 pixels × 64 pixels is used as a unit to divide all into divided areas of the same size. The format of the division parameter is arbitrary as long as the division state can be expressed. The division parameter is set in the division control unit 114 in advance by some means (for example, the CPU 101).

そして、分割制御部114は、分割パラメータにしたがって、分割境界情報を累積情報生成部111及び累積情報利用演算部112に出力する。分割境界情報のフォーマットは、分割の状態が表現できるものであれば、任意である。例えば、本実施形態では、図5に示すように、x座標及びy座標の夫々について、64の手前(63と64との間)、128の手前(127と128との間)、及び192の手前(191と192との間)の位置で、垂直方向及び水平方向に分割が行われているという情報が分割境界情報となっている。   Then, the division control unit 114 outputs the division boundary information to the cumulative information generation unit 111 and the cumulative information use calculation unit 112 according to the division parameter. The format of the division boundary information is arbitrary as long as the division state can be expressed. For example, in this embodiment, as shown in FIG. 5, for each of the x coordinate and the y coordinate, 64 before (between 63 and 64), 128 before (between 127 and 128), and 192 The information that the division is performed in the vertical direction and the horizontal direction at the front (between 191 and 192) is the division boundary information.

ここで、図2を参照しながら累積情報生成部111の詳細について説明する。図2は、累積情報生成部111の構成、並びにバスI/F110及び累積情報保持部113との接続関係を示すブロック図である。   Here, the details of the cumulative information generation unit 111 will be described with reference to FIG. FIG. 2 is a block diagram illustrating a configuration of the cumulative information generation unit 111 and a connection relationship between the bus I / F 110 and the cumulative information holding unit 113.

累積情報生成部111には、図2に示すように、入力情報サイズ記憶レジスタ201、アドレスカウンタ202、入力要素値保持レジスタ203、水平方向累積値保持レジスタ204、及び前ライン累積情報値参照レジスタ205が設けられている。更に、累積加算処理部206及び初期化制御部207も設けられている。   As shown in FIG. 2, the accumulated information generation unit 111 includes an input information size storage register 201, an address counter 202, an input element value holding register 203, a horizontal direction accumulated value holding register 204, and a previous line accumulated information value reference register 205. Is provided. Furthermore, a cumulative addition processing unit 206 and an initialization control unit 207 are also provided.

入力情報サイズ記憶レジスタ201は、情報入力部102より入力される複数次元配列情報(例えば、2次元の画像情報)のサイズを記憶し、バスI/F110を介してCPU101により処理開始前に値が設定される。   The input information size storage register 201 stores the size of multi-dimensional array information (for example, two-dimensional image information) input from the information input unit 102, and the value before the processing is started by the CPU 101 via the bus I / F 110. Is set.

入力要素値保持レジスタ203は、バスI/F110を介してCPU101又はDMAC103の制御により入力される入力配列情報の1要素値(例えば、画素値)を、順に一時保持する。本実施形態では、前述のように、処理対象情報格納メモリ104に格納された画像情報が、1画素ずつラスタスキャン順に累積情報演算処理部100に送られる。   The input element value holding register 203 temporarily holds one element value (for example, pixel value) of the input array information input by the control of the CPU 101 or the DMAC 103 via the bus I / F 110 in order. In the present embodiment, as described above, the image information stored in the processing target information storage memory 104 is sent to the cumulative information calculation processing unit 100 pixel by pixel in the raster scan order.

アドレスカウンタ202は、入力情報サイズ記憶レジスタ201に記憶されている入力配列情報のサイズに基づき、入力値保持レジスタに要素値が入力される毎に、対応して生成される累積情報値を格納すべき累積情報保持部のメモリアドレスを計算する。入力情報の最初の画素(原点位置)が入力されると、格納すべきアドレスは0または所定のオフセット値にリセットされ、以後画像の終端画素の入力まで、格納先アドレスを1ずつインクリメントする。   Based on the size of the input array information stored in the input information size storage register 201, the address counter 202 stores a cumulative information value that is generated corresponding to each input of an element value to the input value holding register. The memory address of the power accumulation information holding unit is calculated. When the first pixel (origin position) of the input information is input, the address to be stored is reset to 0 or a predetermined offset value, and the storage destination address is incremented by 1 until the end pixel of the image is input thereafter.

また、アドレスカウンタ202は、入力情報サイズ記憶レジスタ201に記憶されている入力配列情報のサイズを参照し、処理対象情報格納メモリ104からラスタスキャン順で送られてくる画素の位置(処理対象情報上での座標)を算出する。そして、アドレスカウンタ202は、算出した入力画素値座標を初期化制御部207に出力する。更に、アドレスカウンタ202は、入力画素が2ライン目以降のものになった場合、1ライン前の同列位置の累積情報が格納されている前ライン累積情報アドレスを計算する。これは、先に算出した格納先アドレスから、1ラインの要素個数を引くことにより得られる。アドレスカウンタ202が計算したアドレスは、累積情報保持部113内のメモリコントローラ113−2に与えられ、同じく累積情報保持部113内の累積情報保持メモリ113−1の当該アドレスへの書き込み又は読み出しが行われる。   Further, the address counter 202 refers to the size of the input array information stored in the input information size storage register 201, and positions of pixels sent from the processing target information storage memory 104 in the raster scan order (on the processing target information top). (Coordinates) is calculated. Then, the address counter 202 outputs the calculated input pixel value coordinates to the initialization control unit 207. Further, the address counter 202 calculates the previous line accumulated information address in which accumulated information of the same line position one line before is stored when the input pixel is in the second and subsequent lines. This is obtained by subtracting the number of elements in one line from the previously calculated storage destination address. The address calculated by the address counter 202 is given to the memory controller 113-2 in the cumulative information holding unit 113, and writing or reading to the address of the cumulative information holding memory 113-1 in the cumulative information holding unit 113 is performed. Is called.

前ライン累積情報値参照レジスタ205は、アドレスカウンタ202が算出した前ライン累積情報アドレスを用いて、累積情報保持メモリ113−1から読み出された累積情報値を一時保持する。但し、初期化制御部207が初期化指示を出力していれば、累積情報保持メモリ113−1から読み出された累積情報値に関わらず、前ライン累積情報値参照レジスタ205には0がセットされる。   The previous line accumulated information value reference register 205 temporarily holds the accumulated information value read from the accumulated information holding memory 113-1, using the previous line accumulated information address calculated by the address counter 202. However, if the initialization control unit 207 outputs an initialization instruction, 0 is set in the previous line accumulated information value reference register 205 regardless of the accumulated information value read from the accumulated information holding memory 113-1. Is done.

水平方向累積値保持レジスタ204は、現在投入中の画素が属する分割領域内の1ラインのみについて、分割領域の先頭画素からの累積加算情報を保持する。入力要素値保持レジスタ203に画素が投入された時点では、その前回までの画素の累積加算値が保持された状態となっている。このレジスタ値は投入中の画素が属する分割領域内の1ラインについてのみ保持するものである。従って、入力してくる画素が分割領域を超えた場合や、次ラインになった場合には、水平方向累積値保持レジスタ204は、初期化制御部207からの初期化指示により0にセットされる。   The horizontal cumulative value holding register 204 holds cumulative addition information from the first pixel in the divided area for only one line in the divided area to which the currently input pixel belongs. When a pixel is input to the input element value holding register 203, the cumulative added value of the pixel up to the previous time is held. This register value is held only for one line in the divided area to which the input pixel belongs. Therefore, when the input pixel exceeds the divided area or becomes the next line, the horizontal direction accumulated value holding register 204 is set to 0 by the initialization instruction from the initialization control unit 207. .

初期化制御部207は、分割制御部114から送られてくる分割境界情報を用いて、水平方向累積値保持レジスタ204及び前ライン累積情報値参照レジスタ205に対して初期化の指示を行う。これは、累積情報演算処理部100で算出されているのが、1つの累積情報でなく、分割領域毎に算出された累積情報(分割領域累積情報)であるからである。   The initialization control unit 207 uses the division boundary information sent from the division control unit 114 to instruct the horizontal direction accumulated value holding register 204 and the previous line accumulated information value reference register 205 to perform initialization. This is because the cumulative information calculation processing unit 100 does not calculate one piece of cumulative information, but cumulative information calculated for each divided region (divided region cumulative information).

初期化制御部207は、前ライン累積情報値参照レジスタ205に対しては、入力してくる画素が、各分割領域の上端のラインに属する画素である場合に初期化を指示し、前ライン累積情報値参照レジスタ205を0にする。一方、水平方向累積値保持レジスタ204に対しては、入力してくる画素が、各分割領域の左端の列に属する画素である場合に初期化を指示し、水平方向累積値保持レジスタ204を0にする。   The initialization control unit 207 instructs the previous line accumulated information value reference register 205 to perform initialization when the input pixel is a pixel belonging to the uppermost line of each divided region, and the previous line accumulated information value reference register 205 The information value reference register 205 is set to 0. On the other hand, when the input pixel is a pixel belonging to the leftmost column of each divided area, the horizontal direction cumulative value holding register 204 is instructed to initialize, and the horizontal direction cumulative value holding register 204 is set to 0. To.

累積加算処理部206には、加算器206−1及び206−2が設けられている。加算器206−1は数3に加算を行い、加算器206−2は数4に示す加算を行う。ここで、I(x,y)は入力画像の画素値を示し、C(x,y)は累積情報を示し、S(x,y)はある垂直方向座標yにおける水平方向の画素値の累積値を示す。但し、座標は0から始まり(原点は画像左上)、S(0,y)=I(0,y)、及びC(x,0)=S(x,0)の関係が成り立つ(つまり、S(−1,y)及びC(x,−1)は0である)。初期化制御部207が上記の初期化の指示を行うのは、このようなS(−1,y)及びC(x,−1)を0とする設定を各分割領域に対しても行うためである。   In the cumulative addition processing unit 206, adders 206-1 and 206-2 are provided. The adder 206-1 performs addition to Equation 3, and the adder 206-2 performs addition shown in Equation 4. Here, I (x, y) represents the pixel value of the input image, C (x, y) represents accumulated information, and S (x, y) represents the accumulated pixel value in the horizontal direction at a certain vertical coordinate y. Indicates the value. However, the coordinates start from 0 (the origin is the upper left of the image), and S (0, y) = I (0, y) and C (x, 0) = S (x, 0) are satisfied (that is, S (-1, y) and C (x, -1) are 0). The reason why the initialization control unit 207 instructs the above initialization is to perform such setting for setting S (-1, y) and C (x, -1) to 0 for each divided region. It is.

Figure 2010134692
Figure 2010134692

Figure 2010134692
Figure 2010134692

つまり、加算器206−1は、水平方向累積値と入力画素値との加算を行う。加算された結果は、新たな水平方向累積値として、水平方向累積値保持レジスタ204へフィードバック格納され、次の画素が入力されてきたときに使用される。   That is, the adder 206-1 performs addition of the horizontal direction accumulated value and the input pixel value. The added result is fed back and stored in the horizontal direction cumulative value holding register 204 as a new horizontal direction cumulative value and used when the next pixel is input.

また、加算器206−2は、加算器206−1の出力と前ライン累積情報値参照レジスタ205に保持されている分割領域累積情報値との加算を行う。この加算結果が当該入力画素位置に対応する分割領域累積情報値となり、メモリコントローラ113−2を介して、累積情報保持メモリ113−1のアドレスカウンタ202で計算された格納アドレスに格納される。   The adder 206-2 adds the output of the adder 206-1 and the divided area accumulated information value held in the previous line accumulated information value reference register 205. This addition result becomes the divided area accumulated information value corresponding to the input pixel position, and is stored in the storage address calculated by the address counter 202 of the accumulated information holding memory 113-1 via the memory controller 113-2.

次に、このように構成された累積情報生成部111の動作、即ち累積情報の算出手順について説明する。累積情報生成部111では、主として、加算器206−1及び206−2の動作により、累積情報が順次算出される。   Next, the operation of the cumulative information generation unit 111 configured as described above, that is, the calculation procedure of cumulative information will be described. In the cumulative information generation unit 111, the cumulative information is sequentially calculated mainly by the operations of the adders 206-1 and 206-2.

但し、数3及び数4の加算により分割領域累積情報を算出する場合、垂直方向の分割境界(図5において矢印Aで示されるような境界)では、水平方向の画素値の累積値Sを初期化する。つまり、初期化制御部207が、S(64,y)=I(64,y)とし、S(128,y)=I(128,y)とし、S(192,y)=I(192,y))とする。同様に、水平方向の分割境界(図5において矢印Bで示されるような境界)では、累積情報値Cを初期化する。つまり、初期化制御部207が、C(x,64)=S(x,64)とし、C(x,128)=S(x,128)とし、C(x,192)=S(x,192))とする。   However, when the divided region accumulation information is calculated by the addition of Equation 3 and Equation 4, the horizontal pixel value accumulation value S is initially set at the vertical division boundary (the boundary indicated by the arrow A in FIG. 5). Turn into. That is, the initialization control unit 207 sets S (64, y) = I (64, y), S (128, y) = I (128, y), and S (192, y) = I (192, y)). Similarly, the accumulated information value C is initialized at a horizontal division boundary (a boundary indicated by an arrow B in FIG. 5). That is, the initialization control unit 207 sets C (x, 64) = S (x, 64), C (x, 128) = S (x, 128), and C (x, 192) = S (x, 64). 192)).

このように、分割領域累積情報を算出する際には、垂直方向の分割境界及び水平方向の分割境界において、水平方向累積値(S)及び累積情報値(C)を初期化する必要があり、そのために分割制御部114から受け取る分割境界情報を利用する。   Thus, when calculating the divided region accumulated information, it is necessary to initialize the horizontal direction accumulated value (S) and the accumulated information value (C) at the vertical direction divided boundary and the horizontal direction divided boundary, For this purpose, the division boundary information received from the division control unit 114 is used.

次に、図3を参照しながら累積情報利用演算部112の構成及び動作の詳細について説明する。図3は、累積情報利用演算部112の構成、並びにバスI/F110及び累積情報保持部113との接続関係を示すブロック図である。本実施形態では、前述のように、累積情報を利用した画像処理の内容として、矩形領域内の画素値の総和を算出する処理とする。   Next, the configuration and operation of the cumulative information use calculation unit 112 will be described with reference to FIG. FIG. 3 is a block diagram illustrating the configuration of the accumulated information use calculation unit 112 and the connection relationship between the bus I / F 110 and the accumulated information holding unit 113. In the present embodiment, as described above, as the content of the image processing using the accumulated information, the sum of the pixel values in the rectangular area is calculated.

累積情報利用演算部112には、図3に示すように、特定領域指定レジスタ301、参照アドレス計算部302、参照値一時保持レジスタ303、加減算処理部304、演算結果保持レジスタ305、及び特定領域分割部306が設けられている。   As shown in FIG. 3, the accumulated information use calculation unit 112 includes a specific area designation register 301, a reference address calculation unit 302, a reference value temporary holding register 303, an addition / subtraction processing unit 304, a calculation result holding register 305, and a specific area division A unit 306 is provided.

なお、入力情報サイズ記憶レジスタ201は、累積情報生成部111内のものであり、前述のように、累積情報の生成前にCPU101によりバスI/F110を介して予め入力情報のサイズが設定されている。   Note that the input information size storage register 201 is in the cumulative information generation unit 111, and as described above, the size of the input information is preset by the CPU 101 via the bus I / F 110 before the generation of the cumulative information. Yes.

特定領域指定レジスタ301は、CPU101により行われた画素値の総和を求めたい特定領域(例えば、矩形領域)の指定を保持する。特定領域の指定とは、その特定領域の形状を規定するのに必要な座標を指定することを意味する。従って、特定領域が矩形領域の場合、CPU101は、この矩形領域を表す2点の対角座標を、バスI/F110を介して特定領域指定レジスタ301に設定する。本実施形態では、図5に示すように、特定領域として、座標(80,160)及び座標(223,207)を対角座標とする矩形領域が指定されるとする。このため、座標(80,160)及び座標(223,207)が特定領域指定レジスタ301に設定される。   The specific area designation register 301 holds designation of a specific area (for example, a rectangular area) for which the sum of pixel values performed by the CPU 101 is to be obtained. Designation of a specific area means designation of coordinates necessary for defining the shape of the specific area. Therefore, when the specific area is a rectangular area, the CPU 101 sets the diagonal coordinates of two points representing the rectangular area in the specific area specifying register 301 via the bus I / F 110. In the present embodiment, as shown in FIG. 5, it is assumed that a rectangular area having the coordinates (80, 160) and the coordinates (223, 207) as diagonal coordinates is designated as the specific area. Therefore, the coordinates (80, 160) and the coordinates (223, 207) are set in the specific area designation register 301.

特定領域分割部306は、特定領域指定レジスタ301にて指定されている特定領域を、分割制御部114から送られてくる分割境界情報に従って分割する。本実施形態では、累積情報が分割領域毎に算出されるため、特定領域分割部306が、特定領域を分割領域に応じて分割する。この分割領域に応じて分割された特定領域を分割特定領域という。その上で、分割特定領域毎に、対応する分割領域の分割領域累積情報を用いることで、第2の算出手段として分割特定領域内の画素値の総和を夫々算出する。更に、分割特定領域毎の総和を合計して、特定領域内の画素値の総和を算出する。特定領域分割部306は、分割制御部114から送られてくる分割境界情報に応じて、分割した分割特定領域内の画素値の総和を算出するのに必要な座標を算出する。   The specific area dividing unit 306 divides the specific area specified by the specific area specifying register 301 according to the division boundary information sent from the division control unit 114. In the present embodiment, since the accumulated information is calculated for each divided area, the specific area dividing unit 306 divides the specific area according to the divided areas. The specific area divided according to the divided area is referred to as a divided specific area. In addition, for each divided specific area, the total sum of the pixel values in the divided specific area is calculated as the second calculation means by using the divided area accumulated information of the corresponding divided area. Furthermore, the sum total of each divided specific area is summed to calculate the sum of the pixel values in the specific area. The specific area dividing unit 306 calculates coordinates necessary for calculating the sum of the pixel values in the divided specific areas according to the division boundary information sent from the division control unit 114.

本実施形態では、特定領域が矩形領域で、分割領域も矩形領域であるので、分割特定領域も矩形領域になる。矩形領域内の画素値の総和は、前述のように矩形の4隅の座標が判明していれば、対応する4点の累積情報の値(累積情報値)を用いて求めることができる。従って、特定領域分割部306は、分割特定領域の夫々の2点の対角座標を算出する。本実施形態では、図5に示すように、分割特定領域の2点の対角座標として、(80,160)及び(127,191)の組み合わせ、(128,160)及び(191,191)の組み合わせ、(192,160)及び(223,191)の組み合わせ、(80,192)及び(127,207)の組み合わせ、(128,192)及び(191,207)の組み合わせ、並びに(192,192)及び(223,207)の組み合わせを算出する。以下、これらの2点の対角座標により表わされる分割特定領域を、順に分割特定領域A〜Fということとする。   In this embodiment, since the specific area is a rectangular area and the divided area is also a rectangular area, the divided specific area is also a rectangular area. If the coordinates of the four corners of the rectangle are known as described above, the sum of the pixel values in the rectangular area can be obtained using the corresponding cumulative information values (cumulative information values) of the four points. Accordingly, the specific area dividing unit 306 calculates the diagonal coordinates of each of the two points in the divided specific area. In the present embodiment, as shown in FIG. 5, as the diagonal coordinates of two points in the divided specific area, combinations of (80, 160) and (127, 191), (128, 160) and (191, 191) Combination, (192,160) and (223,191), (80,192) and (127,207), (128,192) and (191,207), and (192,192) And the combination of (223, 207). Hereinafter, the divided specific areas represented by these two diagonal coordinates are referred to as divided specific areas A to F in order.

参照アドレス計算部302は、特定領域分割部306が分割特定領域毎に算出した2点の対角座標を利用して、累積情報を参照するアドレスを算出する。例えば分割特定領域Aは、4隅が、夫々、左上(80,160)、右上(127,160)、左下(80,191)、右下(127,191)という座標を持つ。従って、参照アドレス計算部302は、これらの座標(79,159)、(127,159)、(79,191)及び(127,191)に対応する累積情報を格納しているアドレスを算出する。そして、このアドレスを順にメモリコントローラ113−2に受け渡す。他の分割特定領域B〜Fについても同様の処理を行う。なお、累積情報は、例えば数1で表わされる。   The reference address calculation unit 302 calculates an address for referring to the accumulated information using the two diagonal coordinates calculated for each divided specific region by the specific region dividing unit 306. For example, the divided specific area A has four corners at the upper left (80, 160), upper right (127, 160), lower left (80, 191), and lower right (127, 191). Therefore, the reference address calculation unit 302 calculates an address that stores accumulated information corresponding to these coordinates (79,159), (127,159), (79,191), and (127,191). The addresses are sequentially transferred to the memory controller 113-2. Similar processing is performed for the other divided specific regions B to F. The accumulated information is expressed by, for example, Equation 1.

メモリコントローラ113−2は、送られてくるアドレスに基づき累積情報保持メモリ113−1にアクセスし、分割特定領域毎に順次取得した4点の累積情報値を参照値一時保持レジスタ303に設定する。但し、以下に示すように、分割特定領域の上側境界と分割領域の上側境界とが一致している場合、及び、分割特定領域の左側境界と分割領域の左側境界とが一致している場合には、累積情報保持メモリ113−1を参照して取得した累積情報値に拘わらず、0を設定する場合がある。これは、累積情報保持メモリ113−1に格納されている情報が、1つの累積情報でなく、分割領域毎に算出された累積情報(分割領域累積情報)だからである。つまり、上述のように、数3及び数4に示す加算の際にC(x,−1)及びC(−1,y)を0としており、これと同様の設定を各分割領域に対しても行うためである。   The memory controller 113-2 accesses the accumulated information holding memory 113-1 based on the received address, and sets the accumulated information values of four points sequentially obtained for each divided specific area in the reference value temporary holding register 303. However, as shown below, when the upper boundary of the divided specific area and the upper boundary of the divided area match, and when the left boundary of the divided specific area and the left boundary of the divided area match. May be set to 0 regardless of the accumulated information value obtained by referring to the accumulated information holding memory 113-1. This is because the information stored in the accumulated information holding memory 113-1 is not one piece of accumulated information but accumulated information calculated for each divided area (divided area accumulated information). That is, as described above, C (x, −1) and C (−1, y) are set to 0 at the time of addition shown in Equations 3 and 4, and the same setting is applied to each divided region. To do.

このような分割特定領域の上側境界と分割領域の上側境界とが一致しているという情報、及び、分割特定領域の左側境界と分割領域の左側境界とが一致しているという情報は、特定領域分割部306によって算出される。そして、参照値一時保持レジスタ303は、この情報に基づいて必要なレジスタに0を設定する。なお、0が設定されると判明している累積情報値に関しては、累積情報保持メモリ113−1への参照を省略することも可能である。   The information that the upper boundary of the divided specific area and the upper boundary of the divided area match, and the information that the left boundary of the divided specific area and the left boundary of the divided area match are specified areas. Calculated by the dividing unit 306. Then, the reference value temporary holding register 303 sets 0 to a necessary register based on this information. For the accumulated information value that is known to be set to 0, the reference to the accumulated information holding memory 113-1 can be omitted.

上側境界が、分割領域の上側境界と一致している分割特定領域(例えば、図5の分割特定領域D、E、F)に関し、分割特定領域の4隅のうち、上側境界と接している角に対応する累積情報値を格納するレジスタには、累積情報値として0が設定される。例えば、分割特定領域Dは、4隅が、夫々、左上(80,192)、右上(127,192)、左下(80,207)、右下(127,207)という座標を持つ。従って、分割特定領域Dの画素値の総和を求めるには、座標(79,191)、(127,191)、(79,207)及び(127,207)に対応する累積情報を参照する。このとき、分割特定領域Dの上側境界と分割領域の上側境界が一致しているので、上側境界と接している角に対応する累積情報値、つまり、座標(79,191)及び(127,191)に対応する累積情報値は、0として参照値一時保持レジスタ303に格納される。   Regarding the divided specific area (for example, divided specific areas D, E, and F in FIG. 5) whose upper boundary is coincident with the upper boundary of the divided area, of the four corners of the divided specific area, the corner is in contact with the upper boundary 0 is set as the cumulative information value in the register storing the cumulative information value corresponding to. For example, the divided specific area D has four corners at the upper left (80, 192), upper right (127, 192), lower left (80, 207), and lower right (127, 207). Accordingly, in order to obtain the sum of the pixel values of the divided specific region D, the cumulative information corresponding to the coordinates (79, 191), (127, 191), (79, 207) and (127, 207) is referred to. At this time, since the upper boundary of the divided specific area D and the upper boundary of the divided area match, the accumulated information values corresponding to the corners in contact with the upper boundary, that is, the coordinates (79, 191) and (127, 191). ) Is stored in the reference value temporary holding register 303 as 0.

同様に、左側境界が、分割領域の左側境界と一致している分割特定領域(例えば、図5の分割特定領域B、C、E、F)に関しても、分割特定領域の4隅のうち、左側境界と接している角に対応する累積情報値を格納するレジスタには、累積情報値として0が設定される。例えば、分割特定領域Bは、4隅が、夫々、左上(128,160)、右上(191,160)、左下(128,191)、右下(191,191)という座標を持つ。従って、分割特定領域Bの画素値の総和を求めるには、座標(127,159)、(191,159)、(127,191)、及び(191,191)に対応する累積情報を参照する。このとき、分割特定領域Bの左側境界と分割領域の左側境界が一致しているので、左側境界と接している角に対応する累積情報値、つまり、座標(127,159)及び(127,191)に対応する累積情報値は、0として参照値一時保持レジスタ303に格納される。   Similarly, with respect to a divided specific region (for example, divided specific regions B, C, E, and F in FIG. 5) whose left boundary coincides with the left boundary of the divided region, the left side of the four corners of the divided specific region In the register that stores the cumulative information value corresponding to the corner in contact with the boundary, 0 is set as the cumulative information value. For example, the divided specific region B has coordinates of four corners, that is, upper left (128, 160), upper right (191, 160), lower left (128, 191), and lower right (191, 191). Accordingly, in order to obtain the sum of the pixel values of the divided specific region B, the cumulative information corresponding to the coordinates (127, 159), (191, 159), (127, 191), and (191, 191) is referred to. At this time, since the left boundary of the divided specific area B and the left boundary of the divided area match, the accumulated information values corresponding to the corners in contact with the left boundary, that is, the coordinates (127, 159) and (127, 191). ) Is stored in the reference value temporary holding register 303 as 0.

参照値一時保持レジスタ303に分割特定領域毎に4点の値が保持されると、加減算処理部304が、4点の値を用いた所定の加減算処理を実行し、その分割特定領域の画素値の総和を算出する。所定の加減算処理としては、例えば数1に示す演算の処理が挙げられる。加減算処理部304は、それぞれの分割特定領域の画素値の総和の算出を、全ての分割特定領域に対して行った後、それらを合計することにより、特定領域の画素値の総和を算出する。   When the reference value temporary holding register 303 holds four values for each divided specific area, the addition / subtraction processing unit 304 executes a predetermined addition / subtraction process using the four points, and the pixel value of the divided specific area Calculate the sum of. As the predetermined addition / subtraction process, for example, a calculation process shown in Equation 1 is given. The addition / subtraction processing unit 304 calculates the sum of the pixel values of the specific area by calculating the sum of the pixel values of each of the specific areas to be divided and summing them.

この演算結果は、演算結果保持レジスタ305に保持される。CPU101は演算完了を、バスI/F110を介して割り込み通知や完了フラグの参照等によって知ることができる。そして、演算結果保持レジスタ305の値を取得し、設定した矩形領域の総和値として使用する。   This calculation result is held in the calculation result holding register 305. The CPU 101 can know the completion of calculation by an interrupt notification or reference to a completion flag via the bus I / F 110. Then, the value of the operation result holding register 305 is acquired and used as the total value of the set rectangular area.

次に、上述のように構成された情報処理装置による画像処理の動作について説明する。図4は、第1の実施形態に係る情報処理装置の動作を示すフローチャートである。   Next, an image processing operation performed by the information processing apparatus configured as described above will be described. FIG. 4 is a flowchart illustrating the operation of the information processing apparatus according to the first embodiment.

先ず、ステップS41において、累積情報生成部111が、処理対象情報格納メモリ104に格納されている処理対象画像のデータを読み出して、処理対象画像の累積情報を作成する。この際に、累積情報生成部111は、分割制御部114の制御により、単純な累積情報ではなく、分割領域累積情報を算出する。算出された分割領域累積情報は、累積情報保持部113に格納される。   First, in step S <b> 41, the cumulative information generation unit 111 reads processing target image data stored in the processing target information storage memory 104, and creates processing target image cumulative information. At this time, the accumulation information generation unit 111 calculates division area accumulation information instead of simple accumulation information under the control of the division control unit 114. The calculated divided region accumulated information is stored in the accumulated information holding unit 113.

次いで、ステップS42において、累積情報生成部111が、累積情報保持部113に格納されている分割領域累積情報の必要な累積情報値を読み出す。この際に、累積情報生成部111は、分割制御部114の制御により、累積情報保持部113からどの累積情報値を読み出すのかを算出する。読み出した累積情報値は、累積情報利用演算部112に受け渡され、累積情報利用演算部112が、特定領域(例えば、矩形領域)内の画素値の総和(特定領域内総和値)を算出する。   Next, in step S <b> 42, the cumulative information generation unit 111 reads a necessary cumulative information value of the divided region cumulative information stored in the cumulative information holding unit 113. At this time, the cumulative information generation unit 111 calculates which cumulative information value is read from the cumulative information holding unit 113 under the control of the division control unit 114. The read accumulated information value is transferred to the accumulated information use calculation unit 112, and the accumulated information use calculation unit 112 calculates the sum of the pixel values in the specific area (for example, the rectangular area) (the total value in the specific area). .

このように、本実施形態により行われる画像処理は、分割領域累積情報を算出する処理と、算出された分割領域累積情報を利用して特定領域内総和値を算出する処理との2つの処理に大別することができる。   As described above, the image processing performed according to the present embodiment is divided into two processes, that is, a process of calculating the divided area accumulated information and a process of calculating the total value in the specific area using the calculated divided area accumulated information. It can be divided roughly.

そして、このような本実施形態によれば、累積情報を格納するための配列(メモリ)の大きさを削減することができる。例えば、上述のように、256画素×256画素のサイズで、画素値が8ビットで表されているような画像データに対し従来の累積情報を作成すると、累積情報保持メモリに必要なビット幅は24ビットになる。これに対し、本実施形態によれば、分割領域のサイズは64画素×64画素となるため、累積情報保持メモリ113−1に必要なビット幅は20ビットでよい。   According to this embodiment, the size of the array (memory) for storing the accumulated information can be reduced. For example, as described above, when conventional cumulative information is created for image data whose size is 256 pixels × 256 pixels and the pixel value is represented by 8 bits, the bit width required for the cumulative information holding memory is It becomes 24 bits. On the other hand, according to the present embodiment, since the size of the divided area is 64 pixels × 64 pixels, the bit width required for the cumulative information holding memory 113-1 may be 20 bits.

また、分割領域をより小さくすれば(例えば32画素×32画素)、累積情報保持メモリ113−1に必要なビット幅を更に小さくすることも可能である。但し、分割領域を小さくすればするほど、特定領域の分割数(分割特定領域の数)が増加するので、特定領域の画素値の総和を算出するのに必要となる累積情報保持メモリ113−1へのアクセス回数が増加する。つまり、特定領域の画素値の総和を算出するのに必要な時間が増加する。つまり、処理時間と分割領域の大きさとはトレードオフの関係にある。従って、処理時間の短縮を優先する場合には、回路規模の制約が許す限り、分割領域を大きくすればよく、逆に回路規模の縮小を優先する場合には、処理時間の制約が許す限り、分割領域を小さくすればよい。   If the divided area is further reduced (for example, 32 pixels × 32 pixels), the bit width necessary for the accumulated information holding memory 113-1 can be further reduced. However, since the number of divisions of the specific area (the number of division specific areas) increases as the division area is reduced, the cumulative information holding memory 113-1 required to calculate the sum of the pixel values of the specific area. Increases the number of accesses to That is, the time required to calculate the sum of the pixel values in the specific area increases. That is, the processing time and the size of the divided area are in a trade-off relationship. Therefore, if priority is given to shortening the processing time, the divided area may be enlarged as long as the circuit size constraint allows. Conversely, if priority is given to reducing the circuit scale, as long as the processing time constraint allows, What is necessary is just to make a division area small.

また、このような情報処理において、画素値の総和を算出する特定領域のサイズが予め判明している場合には、分割領域のサイズと特定領域のサイズとを等しくすることが好ましい。これらを等しくすることにより、検出対象画像上のどの位置に特定領域を設定しても、特定領域の分割数(分割特定領域の数)を4個以下にすることが可能となり、処理のスケジューリングが容易となるからである。   In such information processing, when the size of the specific area for calculating the sum of pixel values is known in advance, it is preferable to make the size of the divided area equal to the size of the specific area. By making these equal, it is possible to reduce the number of divisions of the specific area (the number of divided specific areas) to 4 or less regardless of the position of the specific area set on the detection target image. This is because it becomes easy.

同様に、特定領域として設定するサイズが複数ある場合には、その中の最大のものと、分割領域のサイズとを等しくすれば、特定領域の分割数(分割特定領域の数)を4個以下にすることが可能となり、処理のスケジューリングが容易となる。   Similarly, when there are a plurality of sizes to be set as specific areas, the number of divisions (number of divided specific areas) of the specific area is 4 or less if the largest one of them is made equal to the size of the divided areas. Therefore, scheduling of processing becomes easy.

また、本実施形態を応用することにより、非特許文献2に示されたような顔検出を行うことも可能である。   Further, by applying this embodiment, face detection as shown in Non-Patent Document 2 can also be performed.

非特許文献2では、図6に示すように、処理対象画像600内で、処理ウインドウ601とよばれる領域を移動させ、各移動先の処理ウインドウ内に顔が含まれるか否かを判定している。そして、この判定に当たり、各移動先の処理ウインドウ601内で、特定の矩形領域内の画素値の総和を求めることを、数多くの矩形領域602に対し行うことで実現している。   In Non-Patent Document 2, as shown in FIG. 6, a region called a processing window 601 is moved in the processing target image 600, and it is determined whether or not a face is included in each movement destination processing window. Yes. In this determination, the sum of the pixel values in a specific rectangular area is obtained for a number of rectangular areas 602 within each processing window 601 at each movement destination.

このような処理に対して本実施形態を応用する場合、累積情報利用演算部112内の特定領域指定レジスタ301に対し、矩形領域602に対応する特定領域の指定を何度も行えばよい。   When the present embodiment is applied to such processing, the specific area corresponding to the rectangular area 602 may be designated many times for the specific area specifying register 301 in the accumulated information utilization calculating unit 112.

そして、このような処理を行うに際して、前述のように、分割領域のサイズを、矩形領域602の最大のサイズ(非特許文献2では、設定する位置やサイズの異なる矩形領域602を複数用意している)と等しくすることが好ましい。上述のように、検出対象画像上のどの位置に特定領域を設定しても、特定領域の分割数(分割特定領域の数)を4個以下にすることが可能となり、処理のスケジューリングが容易となるからである。   When performing such processing, as described above, the size of the divided area is set to the maximum size of the rectangular area 602 (in Non-Patent Document 2, a plurality of rectangular areas 602 having different setting positions and sizes are prepared. It is preferable to be equal to As described above, no matter where the specific area is set on the detection target image, the number of divisions of the specific area (the number of divided specific areas) can be reduced to 4 or less, and the process scheduling is easy. Because it becomes.

また、処理ウインドウ601のサイズと、矩形領域602の最大のサイズとを比較すると、両者は同じであるか、又は処理ウインドウ601のサイズの方が大きい。従って、分割領域のサイズを、処理ウインドウ601のサイズと等しくしても同様の効果が得られる。   Further, when the size of the processing window 601 is compared with the maximum size of the rectangular area 602, they are the same or the processing window 601 is larger. Therefore, the same effect can be obtained even if the size of the divided area is equal to the size of the processing window 601.

(第2の実施形態)
次に、本発明の第2の実施形態について説明する。上述のように、第1の実施形態によれば、処理対象画像全体にわたって分割領域累積情報を予め算出し、累積情報保持メモリ113−1に格納することにより、顔検出を行うことが可能である。第2の実施形態は、このような処理を行う際の累積情報保持メモリ113−1の容量の更なる縮小を図ったものである。図7は、第2の実施形態に係る情報処理装置の動作(バンドバッファにより分割領域累積情報を保持した際の動作)を示すフローチャートである。また、図8は、第2の実施形態において、分割領域累積情報全域に対し一時に保持されるバンドバッファの様子を示す図である。ここでは、説明の簡単のため、分割領域のサイズが処理ウインドウのサイズに等しいものとする。
(Second Embodiment)
Next, a second embodiment of the present invention will be described. As described above, according to the first embodiment, face detection can be performed by calculating in advance the divided region accumulated information over the entire processing target image and storing it in the accumulated information holding memory 113-1. . The second embodiment is intended to further reduce the capacity of the accumulated information holding memory 113-1 when performing such processing. FIG. 7 is a flowchart showing the operation of the information processing apparatus according to the second embodiment (operation when the divided region accumulated information is held by the band buffer). FIG. 8 is a diagram showing a state of a band buffer that is temporarily held for the entire divided region accumulated information in the second embodiment. Here, for simplification of explanation, it is assumed that the size of the divided area is equal to the size of the processing window.

先ず、ステップS91において、累積情報生成部111が、先頭に位置する所定高さのバンド領域702のみについて、分割領域累積情報を生成し、累積情報保持部113内の累積情報保持メモリ113−1に、バンド領域702の分割領域累積情報を格納する。   First, in step S91, the cumulative information generation unit 111 generates divided region cumulative information only for the band region 702 having a predetermined height located at the head, and stores it in the cumulative information holding memory 113-1 in the cumulative information holding unit 113. , The divided area accumulation information of the band area 702 is stored.

次いで、ステップS92において、累積情報生成部111が、処理ウインドウがバンドの先頭(左端)位置701にあるときに、その処理ウインドウ内で、特定の矩形領域内の画素値の総和を求める処理を、数多くの矩形領域に対して行う。そして、処理ウインドウを先頭位置701から右に1画素ずらした位置に移動させ、再び同様の処理を行う。以後、処理ウインドウがバンド領域702の右端に達するまで、処理ウインドウをずらしながら、同様の処理を繰り返す。   Next, in step S92, when the processing window is at the head (left end) position 701 of the band, the cumulative information generation unit 111 performs processing for obtaining the sum of the pixel values in a specific rectangular area in the processing window. Do this for many rectangular areas. Then, the processing window is moved to the position shifted by one pixel to the right from the head position 701, and the same processing is performed again. Thereafter, the same processing is repeated while shifting the processing window until the processing window reaches the right end of the band region 702.

このように、ステップS91〜S92において、所定のバンド位置に対して、バンドのサイズ分の分割領域累積情報を算出し、算出した分割領域累積情報を用いて特定領域内の総和の算出を行う。   In this way, in steps S91 to S92, the divided area cumulative information corresponding to the band size is calculated for a predetermined band position, and the total in the specific area is calculated using the calculated divided area accumulated information.

1バンド領域分の特定領域内の総和の算出(ステップS72)が完了すると、累積情報生成部111が、現在処理していたバンド領域が入力情報の最終ラインを含む位置であったかどうかを、ステップS93において判別する。   When the calculation of the sum in the specific area for one band area (step S72) is completed, the cumulative information generation unit 111 determines whether or not the band area currently being processed is a position including the final line of the input information in step S93. Determine in.

最終ライン位置でなければ、ステップS94において、ステップS91と同様の処理により、次の1ライン分の分割領域累積情報を生成して保持する。本実施形態におけるバンドバッファは、ライン単位のリングバッファとして構成されているので、新たな1ラインを生成する際には、最も古い1ラインを破棄してこの領域に新たなラインを保持する。このとき、前ライン分の分割領域累積情報は既に累積情報保持メモリのバンドバッファ上に存在しているので、第1の実施形態と同様の処理により1ライン分の累積情報を生成できる。即ち、この演算において、バンドバッファにしたことによるオーバーヘッドは生じない。つまり、分割領域累積情報の所望の位置が、現在のバッファ中のどのアドレスに相当するかを換算する必要はあるが、全域を一度に保持するときに比べて処理のオーバーヘッドはほとんど無い。   If it is not the last line position, in step S94, the divided area cumulative information for the next one line is generated and held by the same processing as in step S91. Since the band buffer in this embodiment is configured as a line-by-line ring buffer, when generating a new line, the oldest one line is discarded and a new line is held in this area. At this time, since the divided area accumulated information for the previous line already exists on the band buffer of the accumulated information holding memory, accumulated information for one line can be generated by the same processing as in the first embodiment. That is, in this calculation, there is no overhead due to the band buffer. That is, it is necessary to convert which address in the current buffer corresponds to the desired position of the divided region accumulated information, but there is almost no processing overhead compared to the case where the entire area is held at once.

次ライン生成・保持後は、累積情報がバンド領域703に移った状態となり、累積情報生成部111が、再びステップS92の処理を実行する。以後、ステップS93において最終ラインと判別されるまで、1ラインずつバンド領域を下方に移動させつつ、同様の処理を繰り返す。   After the next line is generated / held, the accumulated information is moved to the band area 703, and the accumulated information generating unit 111 executes the process of step S92 again. Thereafter, the same processing is repeated while moving the band area downward line by line until it is determined as the last line in step S93.

このように、ステップS92〜S94において、最初のバンド内での特定領域内総和算出の完了後に、バンド位置を1ライン下方にスライドし、そのバンド位置に対して、前回算出した分割領域累積情報に追加する1ライン分の分割領域累積情報を算出する。そして、今回算出した1ライン分の分割領域累積情報を、これまでに算出した分割領域累積情報のもっとも古い1ラインに置き換えることで、今回のバンド位置に対する分割領域累積情報とする。続いて、今回のバンド位置に対する分割領域累積情報を用いて特定領域内の総和の算出を行う。   As described above, in steps S92 to S94, after the calculation of the sum within the specific area in the first band is completed, the band position is slid downward by one line, and the previously calculated divided area accumulation information is obtained with respect to the band position. The divided area accumulated information for one line to be added is calculated. Then, the divided area accumulated information for one line calculated this time is replaced with the oldest one line of the divided area accumulated information calculated so far, thereby obtaining divided area accumulated information for the current band position. Subsequently, the sum in the specific area is calculated using the divided area accumulation information for the current band position.

そして、ステップS93で最終ラインに到達したことが判別されると処理を完了する。   If it is determined in step S93 that the final line has been reached, the process is completed.

このように、本実施形態では、バンド領域702は、累積情報保持メモリ113−1に一時に保持する所定高さのバンド領域であり、累積情報保持メモリ113−1は、一度にはバンド領域702の大きさの分割領域累積情報しか格納しない。そして、バンド領域702の所定の高さは顔検出処理の処理ウインドウ領域の高さと等しく、幅は処理対象画像情報の幅と等しい。   As described above, in this embodiment, the band area 702 is a band area having a predetermined height that is temporarily held in the accumulated information holding memory 113-1, and the accumulated information holding memory 113-1 is once at a band area 702. Only the accumulated information of the divided area of the size is stored. The predetermined height of the band area 702 is equal to the height of the processing window area of the face detection process, and the width is equal to the width of the processing target image information.

また、本実施形態では、特定領域内の総和の算出がバンド領域単位で行われる。   Further, in the present embodiment, the calculation of the sum in the specific area is performed for each band area.

そして、本実施形態では、累積情報保持メモリ113−1のサイズとして、バンド領域702のサイズの分割領域累積情報が格納できるものであればよい。これに対し、第1の実施形態では、累積情報保持メモリ113−1のサイズとして、分割領域累積情報700が格納できるサイズが必要である。つまり、本実施形態によれば、第1の実施形態と比較して、ほとんど演算のオーバーヘッドを生じさせることなく、累積情報保持メモリ113−1のメモリ容量を大幅に削減することが可能となる。   In the present embodiment, any size can be used as long as it can store the divided area accumulated information having the size of the band area 702 as the size of the accumulated information holding memory 113-1. On the other hand, in the first embodiment, as the size of the cumulative information holding memory 113-1, a size capable of storing the divided region cumulative information 700 is required. That is, according to the present embodiment, it is possible to significantly reduce the memory capacity of the cumulative information holding memory 113-1 as compared with the first embodiment, with almost no computation overhead.

第1の実施形態と同様に、処理対象画像を256画素×256画素のサイズで、画素値が8ビットで表されている画像データとし、処理ウインドウサイズ(=分割領域のサイズ)64画素×64画素とした場合、一時に保持する必要のあるサイズは1バンド分である。従って、最低限用意すべき累積情報保持メモリのサイズ(深さ)は、64×256ですむ。一方、第1の実施形態では、必要な累積情報保持メモリのサイズ(深さ)は256×256である。なお、累積情報保持メモリの幅は、いずれの実施形態でも20である。   As in the first embodiment, the processing target image is image data having a size of 256 pixels × 256 pixels and a pixel value represented by 8 bits, and the processing window size (= divided area size) is 64 pixels × 64. In the case of pixels, the size that needs to be held at one time is one band. Therefore, the size (depth) of the accumulated information holding memory to be prepared at a minimum is 64 × 256. On the other hand, in the first embodiment, the required accumulated information holding memory size (depth) is 256 × 256. Note that the width of the accumulated information holding memory is 20 in any of the embodiments.

(第3の実施形態)
次に、本発明の第3の実施形態について説明する。第3の実施形態は、バッファ容量の更なる削減を図ったものである。図9は、第3の実施形態に係る情報処理装置の動作(ブロックバッファにより分割領域累積情報を保持した際の動作)を示すフローチャートである。また、図10は、第3の実施形態において、分割領域累積情報全域に対し一時に保持されるブロックバッファの様子を示す図である。ここでも、説明の簡単のため、分割領域のサイズが処理ウインドウのサイズに等しいものとする。また、ブロックバッファは縦方向線分単位のリングバッファとして構成される。ここで縦方向線分とは、処理ウインドウ高さに一致する長さの線分である。
(Third embodiment)
Next, a third embodiment of the present invention will be described. In the third embodiment, the buffer capacity is further reduced. FIG. 9 is a flowchart showing the operation of the information processing apparatus according to the third embodiment (operation when the divided region accumulated information is held by the block buffer). FIG. 10 is a diagram illustrating a state of a block buffer that is temporarily held for the entire divided region accumulated information in the third embodiment. Again, for the sake of simplicity of explanation, it is assumed that the size of the divided area is equal to the size of the processing window. The block buffer is configured as a ring buffer in units of vertical line segments. Here, the vertical line segment is a line segment having a length that matches the processing window height.

先ず、ステップS1101において、累積情報生成部111が、処理対象画像の左上を分割領域累積情報算出の原点1005として設定する。   First, in step S1101, the cumulative information generation unit 111 sets the upper left of the processing target image as the origin 1005 for calculating the divided region cumulative information.

次いで、ステップS1102において、累積情報生成部111が、現在の原点を左上に含むブロックの分割領域累積情報を生成・記憶する。即ち、図10における領域1001の累積情報を生成する。   Next, in step S1102, the accumulated information generation unit 111 generates and stores divided area accumulated information of a block including the current origin at the upper left. That is, accumulated information of the area 1001 in FIG. 10 is generated.

その後、ステップS1103において、累積情報生成部111が、その処理ウインドウ内で、特定の矩形領域内の画素値の総和を求める処理を、数多くの矩形領域に対し行う。   After that, in step S1103, the cumulative information generation unit 111 performs a process for obtaining the sum of the pixel values in a specific rectangular area on a large number of rectangular areas in the processing window.

続いて、ステップS1104において、累積情報生成部111が、処理した処理ウインドウ位置が最右列に到達したかを判定する。   Subsequently, in step S1104, the cumulative information generation unit 111 determines whether the processed processing window position has reached the rightmost column.

最右列に到達していなければ、ステップS1105において、累積情報生成部111が、処理ウインドウの右端に隣接する線分領域1004の分割領域累積情報を生成し、線分領域1003の分割領域累積情報を保持していたバッファ領域に保持する。線分領域1004は分割領域の左端に該当するので、線分領域1004の分割領域累積情報は容易に算出可能である。つまり、線分領域1004の最上端画素から順に累積加算すればよい。なお、線分領域1004の更に右の線分領域の分割領域累積情報は、当該右の線分領域の最上端画素から順に累積加算した値と、線分領域1004の分割領域累積情報とを加算すれば算出できる。つまり、数3及び数4に示す加算(累積情報算出)におけるx軸とy軸とを入れ替えたような演算を行えば算出できる。   If the rightmost column has not been reached, in step S1105, the accumulated information generation unit 111 generates divided area accumulated information of the line segment area 1004 adjacent to the right end of the processing window, and divided area accumulated information of the line segment area 1003. Is stored in the buffer area that had been stored. Since the line segment area 1004 corresponds to the left end of the segment area, the segment area accumulation information of the line segment area 1004 can be easily calculated. That is, cumulative addition may be performed in order from the uppermost pixel of the line segment region 1004. In addition, the segment area cumulative information of the line segment area to the right of the line segment area 1004 is obtained by adding the cumulative addition value sequentially from the uppermost pixel of the right line segment area and the segment area cumulative information of the line segment area 1004. Can be calculated. That is, the calculation can be performed by performing an operation such as replacing the x axis and the y axis in the addition (accumulation information calculation) shown in equations 3 and 4.

次線分累積情報を生成し、処理ウインドウを右へ1画素ずらしたら、累積情報生成部111が、当該領域に対しステップS1103の特定領域内の総和の算出処理を行う。以後、ステップS1104にて、処理ウインドウが右端まで達したと判定されるまで、同様の処理を繰り返す。   When the next line segment accumulation information is generated and the processing window is shifted to the right by one pixel, the accumulation information generation unit 111 performs the calculation processing of the sum in the specific area in step S1103 for the area. Thereafter, the same processing is repeated until it is determined in step S1104 that the processing window has reached the right end.

このように、ステップS1101〜S1105の処理により、ブロックバッファに保持される分割領域累積情報が、領域1001の位置から領域1002の位置に移る際、縦方向の線分領域1003の分割領域累積情報が記憶されている領域が破棄される。そして、この領域に縦方向の線分領域1004の分割領域累積情報が保持される。このような処理が、処理ウインドウが右端に到達するまで順次繰り返される。   As described above, when the divided area accumulated information held in the block buffer is moved from the position of the area 1001 to the position of the area 1002 by the processing in steps S1101 to S1105, the divided area accumulated information of the vertical line segment area 1003 is changed. The stored area is discarded. In this area, the divided area accumulation information of the vertical line segment area 1004 is held. Such processing is sequentially repeated until the processing window reaches the right end.

右端位置までの処理が完了したら、ステップS1106において、累積情報生成部111が、全入力情報の最終ライン位置を処理したかどうかを判定する。   When the processing up to the right end position is completed, in step S1106, the cumulative information generation unit 111 determines whether the last line position of all input information has been processed.

現処理ブロック位置が最終ライン位置に到達していなければ、ステップS1107において、累積情報生成部111が、処理ウインドウ位置を1ライン下方の左端に設定し直す。そのとき、分割領域累積情報を算出するための原点を原点1005から1ライン下の原点1006にずらす。   If the current processing block position has not reached the final line position, in step S1107, the cumulative information generation unit 111 resets the processing window position to the left end one line below. At that time, the origin for calculating the divided region accumulated information is shifted from the origin 1005 to the origin 1006 one line below.

そして、ステップS1102において、累積情報生成部111が、新たに設定した処理ウインドウにおいて、新たに設定した分割領域累積情報を算出するための原点を用いて、現在の原点を左上に含むブロックの分割領域累積情報を生成・記憶する。   In step S1102, the cumulative information generation unit 111 uses the origin for calculating the newly set divided area accumulated information in the newly set processing window, and the divided area of the block including the current origin at the upper left. Generate and store cumulative information.

次いで、累積情報生成部111が、ステップS1103のブロック毎の特定領域内総和算出処理を繰り返す。以後、ステップS1106において最終ラインに到達するまで、順に処理を繰り返して入力情報全域に対する処理を行う。   Next, the cumulative information generation unit 111 repeats the specific area total calculation processing for each block in step S1103. Thereafter, the process is repeated in order until the final line is reached in step S1106, and the entire input information is processed.

このように、ステップS1106〜S1107では、処理ウインドウが右端に到達したことをトリガとして、処理ウインドウを1ライン下にずらし、左端1007からステップS1102〜S1105の処理が繰り返される。このとき、分割領域累積情報を算出するための原点は、新たな原点1006となる。つまり、処理ウインドウが1ライン下にずれると、分割領域累積情報を算出するための原点も1つ下にずれる。   As described above, in steps S1106 to S1107, the processing window is shifted downward by one line with the processing window reaching the right end as a trigger, and the processes in steps S1102 to S1105 are repeated from the left end 1007. At this time, the origin for calculating the divided region accumulated information is a new origin 1006. That is, when the processing window is shifted down by one line, the origin for calculating the divided region accumulated information is also shifted down by one.

そして、ステップS1160で最終ラインに到達したことが判別されると処理を完了する。   If it is determined in step S1160 that the final line has been reached, the process is completed.

このように、本実施形態では、領域1001は、現在ブロックバッファに保持している分割領域累積情報の領域であり、累積情報保持メモリ113−1は、一度には領域1001の大きさの分割領域累積情報しか格納しない。また、現在ブロックバッファに保持している累積情報の領域1001は、現在の処理ウインドウの位置と一致する。図10では、開始位置(左上端)の分割領域累積情報を格納していることを示している。また、領域1002は、処理ウインドウが右に1画素分ずれた領域を示し、この領域を処理する際にはブロックバッファには同領域の分割領域累積情報が保持されることになる。   As described above, in this embodiment, the area 1001 is an area of accumulated divided area information currently held in the block buffer, and the accumulated information holding memory 113-1 has a divided area of the size of the area 1001 at a time. Stores only cumulative information. Also, the cumulative information area 1001 currently held in the block buffer matches the current processing window position. FIG. 10 shows that the divided area accumulated information at the start position (upper left corner) is stored. An area 1002 indicates an area in which the processing window is shifted to the right by one pixel. When this area is processed, the divided area accumulation information of the same area is held in the block buffer.

このような本実施形態では、累積情報保持メモリ113−1のサイズとして、上述のブロックバッファのサイズさえあればよい。例えば、本実施形態におけるバッファ容量を、第1及び第2の実施形態で説明した例と同条件で計算すると、一時に保持する必要のあるサイズは1ブロック分であるので、最低限用意すべき累積情報保持メモリのサイズ(深さ)は、64×64ですむ。累積情報保持メモリの幅は20で同じである。   In this embodiment, the size of the accumulated information holding memory 113-1 only needs to be the size of the block buffer described above. For example, if the buffer capacity in this embodiment is calculated under the same conditions as in the examples described in the first and second embodiments, the size that needs to be held at one time is one block, so it should be prepared as a minimum The size (depth) of the accumulated information holding memory can be 64 × 64. The width of the accumulated information holding memory is 20 and the same.

また、本実施形態では、処理ウインドウのサイズと分割領域のサイズが同じであり、処理ウインドウが1ライン下にずれると、分割領域累積情報を算出するための原点も下にずれる。従って、水平方向の領域分割は実質的に生じない。   In the present embodiment, the size of the processing window and the size of the divided area are the same, and when the processing window is shifted down by one line, the origin for calculating the divided area accumulated information is also shifted downward. Therefore, the horizontal region division does not substantially occur.

但し、本実施形態のブロックバッファによる実装では分割領域累積情報を計算する上でのオーバーヘッドが生じやすい。つまり、処理対象情報のある位置の画素に対応する分割領域累積情報を複数回算出する必要がある。一方、第1及び第2の実施形態では、処理対象情報のある位置の画素に対応する分割領域累積情報の算出は1度ですむ。   However, the implementation using the block buffer according to the present embodiment tends to cause an overhead in calculating the divided region accumulated information. That is, it is necessary to calculate the divided region accumulated information corresponding to the pixel at a certain position of the processing target information a plurality of times. On the other hand, in the first and second embodiments, it is only necessary to calculate the divided region accumulated information corresponding to the pixel at a certain position in the processing target information.

(第4の実施形態)
次に、本発明の第4の実施形態について説明する。第1〜第3の実施形態は、2次元の処理対象情報に対し分割領域累積情報を算出し、その分割領域累積情報を利用して、2次元の特定領域の要素値の総和を求める処理に関するものである。第4の実施形態は、3次元以上の処理対象情報の処理に関する。
(Fourth embodiment)
Next, a fourth embodiment of the present invention will be described. The first to third embodiments relate to a process of calculating divided region accumulated information for two-dimensional processing target information and obtaining the sum of element values of a two-dimensional specific region using the divided region accumulated information. Is. The fourth embodiment relates to processing of processing target information having three or more dimensions.

累積情報は2次元配列情報のみならず、3次元以上の多次元配列情報に対しても生成することができる。図11は、3次元の場合の累積情報の様子を示す図である。3次元配列の入力情報とは、例えば動画情報であって、2次元画像に時間軸の1次元が加わり3次元情報となる。   The accumulated information can be generated not only for two-dimensional array information but also for multi-dimensional array information of three or more dimensions. FIG. 11 is a diagram illustrating a state of accumulated information in a three-dimensional case. The input information of the three-dimensional array is, for example, moving image information, and becomes a three-dimensional information by adding a one-dimensional time axis to a two-dimensional image.

図11(a)において、3次元累積情報配列の点Xの位置の要素の要素値は、入力3次元情報における原点と点Xを対角とする直方体の中に含まれる要素の総和値となる。このような3次元累積情報を用いて、例えば図11(b)の直方体1201内の要素の総和値を求めることが可能である。ここで、直方体1201の対角を示す2点の座標を(x0,y0,t0)及び(x1,y1,t1)とする。また、直方体の各頂点に関する累積情報値をA、B、C、D、E、F、G及びHとすると、これらは、表1に示す座標の累積情報値となる。 In FIG. 11A, the element value of the element at the position of the point X in the three-dimensional cumulative information array is the total value of the elements included in the rectangular parallelepiped having the origin and the point X in the input three-dimensional information as a diagonal. . Using such three-dimensional accumulated information, for example, it is possible to obtain the total value of the elements in the rectangular parallelepiped 1201 in FIG. Here, the coordinates of two points indicating the diagonal of the rectangular parallelepiped 1201 are (x 0 , y 0 , t 0 ) and (x 1 , y 1 , t 1 ). Also, assuming that the accumulated information values for each vertex of the rectangular parallelepiped are A, B, C, D, E, F, G, and H, these are the accumulated information values of the coordinates shown in Table 1.

Figure 2010134692
Figure 2010134692

このような定義を行った場合、入力情報の直方体1201内要素の総和値S3dは、
3d=H−D−F+B−(G−C−E+A)
と表わされる。
When such a definition is performed, the sum S 3d of the elements in the rectangular parallelepiped 1201 of the input information is
S 3d = H−D−F + B− (G−C−E + A)
It is expressed as

このような3次元累積情報に対し、第1〜第3の実施形態の2次元の分割領域累積情報を3次元の分割領域累積情報で代替すれば、同様の処理により累積情報を作成することができる。この場合の分割領域は3次元になる。例えば、図11の3次元累積情報に対し、3次元の分割領域累積情報は図12のようになる。図12では、図が煩雑になるので、一つの分割領域1301のみを図示しているが、処理対象情報に対し分割領域1301を単位として分割し、分割した領域内で3次元の累積情報を算出すればよい。   By replacing the two-dimensional divided region accumulated information of the first to third embodiments with the three-dimensional divided region accumulated information for such three-dimensional accumulated information, the accumulated information can be created by the same processing. it can. In this case, the divided area is three-dimensional. For example, with respect to the three-dimensional cumulative information of FIG. 11, the three-dimensional divided region cumulative information is as shown in FIG. In FIG. 12, since the figure becomes complicated, only one divided region 1301 is shown, but the divided region 1301 is divided into the processing target information, and three-dimensional accumulated information is calculated in the divided region. do it.

更に、3次元を超える多次元入力情報に対する累積情報も、同様に超直方体領域で考えれば、同様の処理を行うことが可能である。   Further, the accumulated information for multidimensional input information exceeding three dimensions can be similarly processed if considered in the super rectangular parallelepiped region.

なお、本発明の実施形態は、例えばコンピュータがプログラムを実行することによって実現することができる。また、プログラムをコンピュータに供給するための手段、例えばかかるプログラムを記録したCD−ROM等のコンピュータ読み取り可能な記録媒体又はかかるプログラムを伝送するインターネット等の伝送媒体も本発明の実施形態として適用することができる。また、上記のプログラムも本発明の実施形態として適用することができる。上記のプログラム、記録媒体、伝送媒体及びプログラムプロダクトは、本発明の範疇に含まれる。   The embodiment of the present invention can be realized by, for example, a computer executing a program. Also, means for supplying a program to a computer, for example, a computer-readable recording medium such as a CD-ROM recording such a program, or a transmission medium such as the Internet for transmitting such a program is also applied as an embodiment of the present invention. Can do. The above program can also be applied as an embodiment of the present invention. The above program, recording medium, transmission medium, and program product are included in the scope of the present invention.

つまり、本発明はハードウェア回路のみでなく、ソフトウェアによる処理であっても適用可能である。例えば、従来の累積情報であれば、32bitのlong型配列を用いる必要があったところを、本発明の分割領域累積情報を用いることで16bitとすることができれば、16bitのshort型配列を使用することが可能となる。つまり使用するバッファ容量を半分に削減することができる。   That is, the present invention can be applied not only to hardware circuits but also to software processing. For example, in the case of conventional cumulative information, if a 32-bit long type array must be used, but 16 bits can be obtained by using the divided region cumulative information of the present invention, a 16-bit short type array is used. It becomes possible. That is, the buffer capacity to be used can be reduced by half.

また、上述の実施形態では、バンドバッファ又はブロックバッファをリングバッファとして使用しているが、本発明はこのようなメモリの使用方法に限るわけではない。例えば、リングカウンタに対応するメモリアドレステーブルを有し、当該テーブルを参照することで、不連続な領域を所定の処理単位で割り当てながら処理してもよい。即ち、本発明で述べたリングバッファとは狭義のリングバッファ又は循環バッファに限定するものではない。   In the above-described embodiment, the band buffer or the block buffer is used as the ring buffer, but the present invention is not limited to such a method of using the memory. For example, a memory address table corresponding to a ring counter may be provided, and processing may be performed while allocating discontinuous areas in predetermined processing units by referring to the table. That is, the ring buffer described in the present invention is not limited to a narrowly defined ring buffer or circular buffer.

また、分割領域累積情報を用いた情報処理としては、パターン認識処理に限定するものではない。本発明は、従来技術で述べたようなコンピュータグラフィクス等の他分野の処理であっても、累積情報を用いる処理であれば、適用可能である。   Further, the information processing using the divided region accumulated information is not limited to the pattern recognition process. The present invention is applicable to processing in other fields such as computer graphics as described in the prior art as long as the processing uses accumulated information.

本発明の第1の実施形態に係る情報処理装置の構成を示すブロック図である。It is a block diagram which shows the structure of the information processing apparatus which concerns on the 1st Embodiment of this invention. 累積情報生成部111の構成、並びにバスI/F110及び累積情報保持部113との接続関係を示すブロック図である。4 is a block diagram illustrating a configuration of a cumulative information generation unit 111 and a connection relationship with a bus I / F 110 and a cumulative information holding unit 113. FIG. 累積情報利用演算部112の構成、並びにバスI/F110及び累積情報保持部113との接続関係を示すブロック図である。3 is a block diagram illustrating a configuration of an accumulated information use calculation unit 112 and a connection relationship with a bus I / F 110 and an accumulated information holding unit 113. FIG. 第1の実施形態に係る情報処理装置の動作を示すフローチャートである。It is a flowchart which shows operation | movement of the information processing apparatus which concerns on 1st Embodiment. 特定領域等の一例を示す図である。It is a figure which shows an example of a specific area | region. 顔検出処理を示す図である。It is a figure which shows a face detection process. 第2の実施形態に係る情報処理装置の動作(バンドバッファにより分割領域累積情報を保持した際の動作)を示すフローチャートである。It is a flowchart which shows operation | movement (operation | movement at the time of hold | maintaining division area accumulation information with a band buffer) of the information processing apparatus which concerns on 2nd Embodiment. 第2の実施形態において、分割領域累積情報全域に対し一時に保持されるバンドバッファの様子を示す図である。In 2nd Embodiment, it is a figure which shows the mode of the band buffer hold | maintained at once with respect to the whole division area accumulation information. 第3の実施形態に係る情報処理装置の動作(ブロックバッファにより分割領域累積情報を保持した際の動作)を示すフローチャートである。It is a flowchart which shows operation | movement (operation | movement at the time of hold | maintaining division area accumulation information with a block buffer) of the information processing apparatus which concerns on 3rd Embodiment. 第3の実施形態において、分割領域累積情報全域に対し一時に保持されるブロックバッファの様子を示す図である。It is a figure which shows the mode of the block buffer hold | maintained at once with respect to the divisional area cumulative information whole area in 3rd Embodiment. 3次元の場合の累積情報の様子を示す図である。It is a figure which shows the mode of the accumulation information in the case of three dimensions. 3次元の分割領域累積情報を示す図である。It is a figure which shows three-dimensional division area accumulation information. 累積情報の例を示す図である。It is a figure which shows the example of accumulation information.

符号の説明Explanation of symbols

100:累積情報演算処理部
101:CPU
102:情報入力部
103:DMAコントローラ
104:処理対象情報格納メモリ
105:バス
110:バス・インターフェース部
111:累積情報生成部
112:累積情報利用演算部
113:累積情報保持部
113−1:累積情報保持メモリ
113−2:メモリコントローラ
114:分割制御部
201:入力情報サイズ記憶レジスタ
202:アドレスカウンタ
203:入力要素値保持レジスタ
204:水平方向累積値保持レジスタ
205:前ライン累積情報値参照レジスタ
206:累積加算処理部
206−1、206−2:加算器
207:初期化制御部
301:特定領域指定レジスタ
302:参照アドレス計算部
303:参照値一時保持レジスタ
304:加減算処理部
305:演算結果保持レジスタ
306:特定領域分割部
100: Cumulative information calculation processing unit 101: CPU
102: Information input unit 103: DMA controller 104: Processing target information storage memory 105: Bus 110: Bus interface unit 111: Cumulative information generation unit 112: Cumulative information use calculation unit 113: Cumulative information holding unit 113-1: Cumulative information Holding memory 113-2: Memory controller 114: Division control unit 201: Input information size storage register 202: Address counter 203: Input element value holding register 204: Horizontal direction accumulated value holding register 205: Previous line accumulated information value reference register 206: Cumulative addition processing units 206-1, 206-2: Adder 207: Initialization control unit 301: Specific area designation register 302: Reference address calculation unit 303: Temporary reference value holding register 304: Addition / subtraction processing unit 305: Calculation result holding register 306: Specific area division

Claims (11)

複数次元配列の処理対象情報を複数の分割領域に分割する分割手段と、
前記処理対象情報内の各要素位置に対応する累積情報値として、前記分割領域の所定の原点位置と前記分割領域に属する前記処理対象情報の各要素位置とを対角とする領域内の全ての要素値の総和値を、前記分割領域毎に算出する算出手段と、
を有することを特徴とする情報処理装置。
A dividing means for dividing the processing target information of the multi-dimensional array into a plurality of divided regions;
As the accumulated information value corresponding to each element position in the processing target information, all the information in the area diagonally with the predetermined origin position of the divided area and each element position of the processing target information belonging to the divided area A calculation means for calculating a total value of element values for each of the divided regions;
An information processing apparatus comprising:
前記分割領域毎に算出された累積情報値を用いて、前記処理対象情報上に規定される特定領域内の要素値の総和を求める総和算出手段を有することを特徴とする請求項1に記載の情報処理装置。   The sum total calculating means for obtaining a sum total of element values in a specific area defined on the processing target information using an accumulated information value calculated for each of the divided areas. Information processing device. 前記総和算出手段は、
前記特定領域が複数の前記分割領域にまたがっているか否かを判別する判別手段と、
またがっている場合に、前記特定領域を、またがっている前記分割領域の夫々に応じた分割特定領域に分割する特定領域分割手段と、
前記分割特定領域毎に、当該分割特定領域内の要素値の総和を求める第2の算出手段と、
を有することを特徴とする請求項2に記載の情報処理装置。
The sum total calculating means includes:
Determining means for determining whether or not the specific region extends over a plurality of the divided regions;
A specific area dividing means for dividing the specific area into divided specific areas according to each of the divided divided areas when straddling;
Second calculation means for obtaining a sum of element values in the divided specific area for each divided specific area;
The information processing apparatus according to claim 2, further comprising:
前記複数の分割領域の大きさは、互いに等しいことを特徴とする請求項1乃至3のいずれか1項に記載の情報処理装置。   The information processing apparatus according to claim 1, wherein sizes of the plurality of divided regions are equal to each other. 前記複数の分割領域の大きさは、前記特定領域のうち最大のものの大きさ以上であることを特徴とする請求項2乃至4のいずれか1項に記載の情報処理装置。   5. The information processing apparatus according to claim 2, wherein a size of the plurality of divided regions is equal to or greater than a size of a maximum of the specific regions. 前記複数次元配列は2次元配列であり、
前記分割領域の所定の原点位置と前記分割領域の各要素位置とを対角とする領域は矩形領域であることを特徴とする請求項1乃至5のいずれか1項に記載の情報処理装置。
The multi-dimensional array is a two-dimensional array;
6. The information processing apparatus according to claim 1, wherein a region whose diagonal is a predetermined origin position of the divided region and each element position of the divided region is a rectangular region.
前記特定領域は矩形領域であることを特徴とする請求項2乃至6のいずれか1項に記載の情報処理装置。   The information processing apparatus according to claim 2, wherein the specific area is a rectangular area. 前記複数次元配列は3次元以上の配列であり、
前記分割領域の所定の原点位置と前記分割領域の各要素位置とを対角とする領域とは超直方体であることを特徴とする請求項1乃至5のいずれか1項に記載の情報処理装置。
The multi-dimensional array is an array of three or more dimensions;
The information processing apparatus according to any one of claims 1 to 5, wherein a region whose diagonal is a predetermined origin position of the divided region and each element position of the divided region is a super rectangular parallelepiped. .
前記特定領域は超直方体領域であることを特徴とする請求項2、3、4、5又は8に記載の情報処理装置。   The information processing apparatus according to claim 2, 3, 4, 5, or 8, wherein the specific area is a hypercubic area. 複数次元配列の処理対象情報を複数の分割領域に分割する分割ステップと、
前記処理対象情報内の各要素位置に対応する累積情報値として、前記分割領域の所定の原点位置と前記分割領域に属する前記処理対象情報の各要素位置とを対角とする領域内の全ての要素値の総和値を、前記分割領域毎に算出する算出ステップと、
を有することを特徴とする情報処理方法。
A division step of dividing the processing target information of the multi-dimensional array into a plurality of divided regions;
As the accumulated information value corresponding to each element position in the processing target information, all the information in the area diagonally with the predetermined origin position of the divided area and each element position of the processing target information belonging to the divided area A calculation step of calculating a total value of element values for each of the divided regions;
An information processing method characterized by comprising:
コンピュータに、
複数次元配列の処理対象情報を複数の分割領域に分割する分割ステップと、
前記処理対象情報内の各要素位置に対応する累積情報値として、前記分割領域の所定の原点位置と前記分割領域に属する前記処理対象情報の各要素位置とを対角とする領域内の全ての要素値の総和値を、前記分割領域毎に算出する算出ステップと、
を実行させることを特徴とするプログラム。
On the computer,
A division step of dividing the processing target information of the multi-dimensional array into a plurality of divided regions;
As the accumulated information value corresponding to each element position in the processing target information, all the information in the area diagonally with the predetermined origin position of the divided area and each element position of the processing target information belonging to the divided area A calculation step of calculating a total value of element values for each of the divided regions;
A program characterized by having executed.
JP2008309888A 2008-12-04 2008-12-04 Information processing apparatus, information processing method, and program Expired - Fee Related JP5349931B2 (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
JP2008309888A JP5349931B2 (en) 2008-12-04 2008-12-04 Information processing apparatus, information processing method, and program

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
JP2008309888A JP5349931B2 (en) 2008-12-04 2008-12-04 Information processing apparatus, information processing method, and program

Publications (2)

Publication Number Publication Date
JP2010134692A true JP2010134692A (en) 2010-06-17
JP5349931B2 JP5349931B2 (en) 2013-11-20

Family

ID=42345932

Family Applications (1)

Application Number Title Priority Date Filing Date
JP2008309888A Expired - Fee Related JP5349931B2 (en) 2008-12-04 2008-12-04 Information processing apparatus, information processing method, and program

Country Status (1)

Country Link
JP (1) JP5349931B2 (en)

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014153937A (en) * 2013-02-08 2014-08-25 Canon Inc Feature level calculation device, method and program

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS629479A (en) * 1985-07-05 1987-01-17 Nippon Denso Co Ltd Method and device for luminance cumulative integration in picture processing system
JP2008102792A (en) * 2006-10-19 2008-05-01 Toyota Motor Corp Image identification apparatus and image identification method
JP2008299627A (en) * 2007-05-31 2008-12-11 Canon Inc Information processing method and apparatus, program, storage medium

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JPS629479A (en) * 1985-07-05 1987-01-17 Nippon Denso Co Ltd Method and device for luminance cumulative integration in picture processing system
JP2008102792A (en) * 2006-10-19 2008-05-01 Toyota Motor Corp Image identification apparatus and image identification method
JP2008299627A (en) * 2007-05-31 2008-12-11 Canon Inc Information processing method and apparatus, program, storage medium

Cited By (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
JP2014153937A (en) * 2013-02-08 2014-08-25 Canon Inc Feature level calculation device, method and program

Also Published As

Publication number Publication date
JP5349931B2 (en) 2013-11-20

Similar Documents

Publication Publication Date Title
JP5340088B2 (en) Information processing method and apparatus
JP5058681B2 (en) Information processing method and apparatus, program, and storage medium
CN109785417B (en) Method and device for realizing OpenGL cumulative operation
KR20110074453A (en) Information processing device and information processing method
JP2017076397A (en) Voxelization of mesh
JP2018067106A (en) Image processing apparatus, image processing program, and image processing method
WO2018039936A1 (en) Fast uv atlas generation and texture mapping
CN102651808B (en) Image processing device and processing method thereof
US8712167B2 (en) Pattern identification apparatus, control method and program thereof
JP5349931B2 (en) Information processing apparatus, information processing method, and program
US8798370B2 (en) Pattern identifying apparatus, pattern identifying method and program
JP4690723B2 (en) Image data processing method and apparatus using image fragment and circular addressing arrangement
JP6235860B2 (en) Information processing apparatus, control method therefor, and program
JP7321213B2 (en) Information processing device, information processing method
JP6675408B2 (en) Information processing system, information processing method, information processing program, and storage medium
JP6116271B2 (en) Feature amount calculation apparatus, method, and program
JP4775161B2 (en) Image processing apparatus and image processing program
US20200351456A1 (en) Image processing device, image processing method, and program
JP4790545B2 (en) Image processing apparatus and image processing method
CN119172491B (en) Cutout methods, equipment, media and products
US8417063B2 (en) Image processing apparatus and image processing system
CN116957899B (en) Graphics processor, system, device, equipment and method
CN112699795B (en) Face recognition method and device, electronic equipment and storage medium
JP2025072175A (en) IMAGE PROCESSING APPARATUS, IMAGING APPARATUS, CONTROL METHOD, AND PROGRAM
JP2011061603A (en) Image processing device, and method for processing image

Legal Events

Date Code Title Description
A621 Written request for application examination

Free format text: JAPANESE INTERMEDIATE CODE: A621

Effective date: 20111205

A977 Report on retrieval

Free format text: JAPANESE INTERMEDIATE CODE: A971007

Effective date: 20120920

A131 Notification of reasons for refusal

Free format text: JAPANESE INTERMEDIATE CODE: A131

Effective date: 20121023

A521 Request for written amendment filed

Free format text: JAPANESE INTERMEDIATE CODE: A523

Effective date: 20121221

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

A61 First payment of annual fees (during grant procedure)

Free format text: JAPANESE INTERMEDIATE CODE: A61

Effective date: 20130821

R151 Written notification of patent or utility model registration

Ref document number: 5349931

Country of ref document: JP

Free format text: JAPANESE INTERMEDIATE CODE: R151

LAPS Cancellation because of no payment of annual fees