Public 型 | Public メソッド
クラス テンプレート mist::integral_image< array3< T, Allocator > >

3次元の積分画像を保持し,任意の矩形領域の画素値の総和を高速に計算するためのクラス [詳細]

#include <integral_image.h>

Public 型

typedef image_type::size_type size_type
 符号なしの整数を表す型.コンテナ内の要素数や,各要素を指定するときなどに利用し,内部的には size_t 型と同じ
typedef image_type::difference_type difference_type
 符号付きの整数を表す型.コンテナ内の要素数や,各要素を指定するときなどに利用し,内部的には ptrdiff_t 型と同じ

Public メソッド

value_type operator() (const size_type begin_i, const size_type begin_j, const size_type begin_k, const size_type width, const size_type height, const size_type depth) const
 任意の矩形領域内の画素の総和を返す:O(1)
value_type operator() (const difference_type i, const difference_type j, const difference_type k) const
 任意の位置の積分値を返す
value_type overall () const
 全ての画素値の総和を返す:O(1)
size_type size1 () const
 画像配列のi方向のサイズを返す
size_type size2 () const
 画像配列のj方向のサイズを返す
size_type size3 () const
 画像配列のk方向のサイズを返す
size_type width () const
 画像配列のi方向のサイズを返す
size_type height () const
 画像配列のj方向のサイズを返す
size_type depth () const
 画像配列のk方向のサイズを返す
size_type size () const
 画像配列のサイズを返す
void construct_integral_array (const image_type &in)
 Integral Image の構築:O(n)
 integral_image (const image_type &in)
 コンストラクタ
 integral_image ()
 デフォルトコンストラクタ

説明

template<typename T, typename Allocator>
class mist::integral_image< array3< T, Allocator > >

3次元の積分画像を保持し,任意の矩形領域の画素値の総和を高速に計算するためのクラス

画素数nに対してO(n)の前計算を行うことにより,任意の矩形領域の画素値の総和をO(1)で算出する 同一の画像配列中の複数の異なる矩形領域に対して、総和を計算する必要がある場合などに有効

mist::array, mist::array1, mist::array2, mist::array3に対応.

注意
入力のデータ型は、算術型,mist::rgb< 算術型 >のみ対応.
得られる画素値の総和のデータ型は,入力のデータ型に依存して変化.
入力型:符号無し整数 → 画素値の総和型:size_t
入力型:符号付き整数 → 画素値の総和型:int
入力型:浮動小数点 → 画素値の総和型:double
mist::rgb< 入力型 > → mist::rgb< 画素値の総和型 >
引数
T… 入力のデータ型( double や mist::rgb< unsigned char > など )
Allocator… MISTコンテナで使用するアロケータ
使用例
// 画像配列(1-3次元)の用意
mist::read_bmp( img, "img.bmp" );
// Integral Image の構築:O(n) (テンプレートの引数として入力配列の型を指定)
// 始点( 100, 200 ), サイズ( 50, 60 )の領域の画素値の総和を出力:O(1)
std::cout << i_img( 100, 200, 50, 60 ) << std::endl;
// 始点( 200, 100 ), サイズ( 60, 50 )の領域の画素値の総和を出力:O(1)
std::cout << i_img( 200, 100, 60, 50 ) << std::endl;

コンストラクタとデストラクタ

template<typename T , typename Allocator >
mist::integral_image< array3< T, Allocator > >::integral_image ( const image_type in)
inline

コンストラクタ

引数
[in]in… 画像配列

関数

template<typename T , typename Allocator >
void mist::integral_image< array3< T, Allocator > >::construct_integral_array ( const image_type in)
inline
template<typename T , typename Allocator >
size_type mist::integral_image< array3< T, Allocator > >::depth ( ) const
inline

画像配列のk方向のサイズを返す

戻り値
k方向のサイズ
template<typename T , typename Allocator >
size_type mist::integral_image< array3< T, Allocator > >::height ( ) const
inline

画像配列のj方向のサイズを返す

戻り値
j方向のサイズ
template<typename T , typename Allocator >
value_type mist::integral_image< array3< T, Allocator > >::operator() ( const size_type  begin_i,
const size_type  begin_j,
const size_type  begin_k,
const size_type  width,
const size_type  height,
const size_type  depth 
) const
inline

任意の矩形領域内の画素の総和を返す:O(1)

引数
[in]begin_i… i方向の始点
[in]begin_j… j方向の始点
[in]begin_k… k方向の始点
[in]width… i方向のサイズ
[in]height… j方向のサイズ
[in]depth… k方向のサイズ
戻り値
画素値の総和
template<typename T , typename Allocator >
value_type mist::integral_image< array3< T, Allocator > >::operator() ( const difference_type  i,
const difference_type  j,
const difference_type  k 
) const
inline

任意の位置の積分値を返す

引数
[in]i… i方向の始点
[in]j… j方向の始点
[in]k… k方向の始点
戻り値
画素値の総和
template<typename T , typename Allocator >
value_type mist::integral_image< array3< T, Allocator > >::overall ( ) const
inline

全ての画素値の総和を返す:O(1)

戻り値
画素値の総和
template<typename T , typename Allocator >
size_type mist::integral_image< array3< T, Allocator > >::size ( ) const
inline

画像配列のサイズを返す

戻り値
サイズ
template<typename T , typename Allocator >
size_type mist::integral_image< array3< T, Allocator > >::size1 ( ) const
inline

画像配列のi方向のサイズを返す

戻り値
i方向のサイズ
template<typename T , typename Allocator >
size_type mist::integral_image< array3< T, Allocator > >::size2 ( ) const
inline

画像配列のj方向のサイズを返す

戻り値
j方向のサイズ
template<typename T , typename Allocator >
size_type mist::integral_image< array3< T, Allocator > >::size3 ( ) const
inline

画像配列のk方向のサイズを返す

戻り値
k方向のサイズ
template<typename T , typename Allocator >
size_type mist::integral_image< array3< T, Allocator > >::width ( ) const
inline

画像配列のi方向のサイズを返す

戻り値
i方向のサイズ

このクラスの説明は次のファイルから生成されました:

Generated on Wed Nov 12 2014 19:44:29 for MIST by doxygen 1.8.1.2