一般カーネルの線形フィルタの実装(コールバック関数を指定することが可能) [詳細]
関数 | |
template<class T1 , class Allocator1 , class T2 , class Allocator2 , class Kernel , class Functor > | |
bool | filter (const array< T1, Allocator1 > &in, array< T2, Allocator2 > &out, const Kernel &kernel, Functor f, typename array< T1, Allocator1 >::size_type thread_num) |
一般の線形フィルタ( array ) | |
template<class T1 , class Allocator1 , class T2 , class Allocator2 , class Kernel , class Functor > | |
bool | filter (const array1< T1, Allocator1 > &in, array1< T2, Allocator2 > &out, const Kernel &kernel, Functor f, typename array1< T1, Allocator1 >::size_type thread_num) |
一般の線形フィルタ( array1 ) | |
template<class T1 , class Allocator1 , class T2 , class Allocator2 , class Kernel , class Functor > | |
bool | filter (const array2< T1, Allocator1 > &in, array2< T2, Allocator2 > &out, const Kernel &kernel, Functor f, typename array2< T1, Allocator1 >::size_type thread_num) |
一般の線形フィルタ( array2 ) | |
template<class T1 , class Allocator1 , class T2 , class Allocator2 , class Kernel , class Functor > | |
bool | filter1d (const array2< T1, Allocator1 > &in, array2< T2, Allocator2 > &out, const Kernel &kernel1, const Kernel &kernel2, Functor f, typename array2< T1, Allocator1 >::size_type thread_num) |
一般の線形フィルタ( array2 ) | |
template<class T , class Allocator , class Kernel , class Functor > | |
bool | filter1d (array2< T, Allocator > &in, const Kernel &kernel1, const Kernel &kernel2, Functor f, typename array2< T, Allocator >::size_type thread_num) |
一般の線形フィルタ( array2 ) | |
template<class T1 , class Allocator1 , class T2 , class Allocator2 , class Kernel , class Functor > | |
bool | filter (const array3< T1, Allocator1 > &in, array3< T2, Allocator2 > &out, const Kernel &kernel, Functor f, typename array3< T1, Allocator1 >::size_type thread_num) |
一般の線形フィルタ( array3 ) | |
template<class T1 , class Allocator1 , class T2 , class Allocator2 , class Kernel , class Functor > | |
bool | filter1d (const array3< T1, Allocator1 > &in, array3< T2, Allocator2 > &out, const Kernel &kernel1, const Kernel &kernel2, const Kernel &kernel3, Functor f, typename array3< T1, Allocator1 >::size_type thread_num) |
一般の線形フィルタ( array3 ) | |
template<class T , class Allocator , class Kernel , class Functor > | |
bool | filter1d (array3< T, Allocator > &in, const Kernel &kernel1, const Kernel &kernel2, const Kernel &kernel3, Functor f, typename array3< T, Allocator >::size_type thread_num) |
一般の線形フィルタ( array3 ) | |
template<class T1 , class Allocator1 , class T2 , class Allocator2 > | |
void | transform (const array2< T1, Allocator1 > &in, array2< T1, Allocator1 > &out, const matrix< T2, Allocator2 > &mat) |
transform array2 | |
template<class Value_type1 , class Allocator1 , class Value_type2 , class Allocator2 > | |
void | transform (const mist::array2< Value_type1, Allocator1 > &in, mist::array2< Value_type2, Allocator2 > &out, const double &delta_x, const double &delta_y) |
平行移動と拡大を考慮して変形する | |
template<class T1 , class Allocator1 , class T2 , class Allocator2 > | |
bool | interpolate (const array< T1, Allocator1 > &in, array< T2, Allocator2 > &out, typename array< T1, Allocator1 >::size_type width, typename array1< T1, Allocator1 >::size_type thread_num=0) |
1次元配列に対する線形補間 | |
template<class T1 , class Allocator1 , class T2 , class Allocator2 > | |
bool | interpolate (const array1< T1, Allocator1 > &in, array1< T2, Allocator2 > &out, typename array1< T1, Allocator1 >::size_type width, typename array1< T1, Allocator1 >::size_type thread_num=0) |
1次元配列に対する線形補間 | |
template<class T1 , class Allocator1 , class T2 , class Allocator2 > | |
bool | interpolate (const array2< T1, Allocator1 > &in, array2< T2, Allocator2 > &out, typename array2< T1, Allocator1 >::size_type width, typename array2< T1, Allocator1 >::size_type height, typename array2< T1, Allocator1 >::size_type thread_num=0) |
2次元配列に対する線形補間 | |
template<class T1 , class Allocator1 , class T2 , class Allocator2 > | |
bool | interpolate (const array3< T1, Allocator1 > &in, array3< T2, Allocator2 > &out, typename array3< T1, Allocator1 >::size_type width, typename array3< T1, Allocator1 >::size_type height, typename array3< T1, Allocator1 >::size_type depth, typename array3< T1, Allocator1 >::size_type thread_num=0) |
3次元配列に対する線形補間 |
一般カーネルの線形フィルタの実装(コールバック関数を指定することが可能)
線形補間
bool mist::linear::filter | ( | const array< T1, Allocator1 > & | in, |
array< T2, Allocator2 > & | out, | ||
const Kernel & | kernel, | ||
Functor | f, | ||
typename array< T1, Allocator1 >::size_type | thread_num | ||
) |
一般の線形フィルタ( array )
カーネル配列を指定する(中心はカーネルのサイズから計算)
[in] | in | … 入力配列 |
[out] | out | … 出力配列 |
[in] | kernel | … カーネル配列 |
[in] | f | … コールバック関数 |
[in] | thread_num | … 使用するスレッド数 |
true | … フィルタリングに成功 |
false | … 入力と出力が同じオブジェクトを指定した場合 |
参照先 mist::array< T, Allocator >::empty(), mist::is_same_object(), mist::array< T, Allocator >::resize(), と mist::array< T, Allocator >::size().
参照元 mist::average_filter(), mist::laplacian::filter(), mist::gaussian::filter(), mist::average::filter(), mist::gaussian_filter(), mist::laplacian_filter(), と mist::linear_filter().
bool mist::linear::filter | ( | const array1< T1, Allocator1 > & | in, |
array1< T2, Allocator2 > & | out, | ||
const Kernel & | kernel, | ||
Functor | f, | ||
typename array1< T1, Allocator1 >::size_type | thread_num | ||
) |
一般の線形フィルタ( array1 )
カーネル配列を指定する(中心はカーネルのサイズから計算)
[in] | in | … 入力配列 |
[out] | out | … 出力配列 |
[in] | kernel | … カーネル配列 |
[in] | f | … コールバック関数 |
[in] | thread_num | … 使用するスレッド数 |
true | … フィルタリングに成功 |
false | … 入力と出力が同じオブジェクトを指定した場合 |
参照先 mist::array< T, Allocator >::empty(), mist::is_same_object(), mist::array< T, Allocator >::resize(), mist::array1< T, Allocator >::reso1(), と mist::array< T, Allocator >::size().
bool mist::linear::filter | ( | const array2< T1, Allocator1 > & | in, |
array2< T2, Allocator2 > & | out, | ||
const Kernel & | kernel, | ||
Functor | f, | ||
typename array2< T1, Allocator1 >::size_type | thread_num | ||
) |
一般の線形フィルタ( array2 )
カーネル配列を指定する(中心はカーネルのサイズから計算)
[in] | in | … 入力配列 |
[out] | out | … 出力配列 |
[in] | kernel | … カーネル配列 |
[in] | f | … コールバック関数 |
[in] | thread_num | … 使用するスレッド数 |
true | … フィルタリングに成功 |
false | … 入力と出力が同じオブジェクトを指定した場合 |
参照先 mist::do_threads_(), mist::array< T, Allocator >::empty(), mist::get_cpu_num(), mist::is_same_object(), mist::array2< T, Allocator >::resize(), mist::array1< T, Allocator >::reso1(), mist::array2< T, Allocator >::reso2(), mist::array2< T, Allocator >::size1(), と mist::array2< T, Allocator >::size2().
bool mist::linear::filter | ( | const array3< T1, Allocator1 > & | in, |
array3< T2, Allocator2 > & | out, | ||
const Kernel & | kernel, | ||
Functor | f, | ||
typename array3< T1, Allocator1 >::size_type | thread_num | ||
) |
一般の線形フィルタ( array3 )
カーネル配列を指定する(中心はカーネルのサイズから計算)
[in] | in | … 入力配列 |
[out] | out | … 出力配列 |
[in] | kernel | … カーネル配列 |
[in] | f | … コールバック関数 |
[in] | thread_num | … 使用するスレッド数 |
true | … フィルタリングに成功 |
false | … 入力と出力が同じオブジェクトを指定した場合 |
参照先 mist::do_threads_(), mist::array< T, Allocator >::empty(), mist::get_cpu_num(), mist::is_same_object(), mist::array3< T, Allocator >::resize(), mist::array1< T, Allocator >::reso1(), mist::array2< T, Allocator >::reso2(), mist::array3< T, Allocator >::reso3(), mist::array3< T, Allocator >::size1(), mist::array3< T, Allocator >::size2(), と mist::array3< T, Allocator >::size3().
bool mist::linear::filter1d | ( | const array2< T1, Allocator1 > & | in, |
array2< T2, Allocator2 > & | out, | ||
const Kernel & | kernel1, | ||
const Kernel & | kernel2, | ||
Functor | f, | ||
typename array2< T1, Allocator1 >::size_type | thread_num | ||
) |
一般の線形フィルタ( array2 )
1次元分解した各軸に沿ったカーネル配列を画像に適用する(中心はカーネルのサイズから計算) ガウシアンフィルタ等の1次元分解可能なフィルタで利用可能です
[in] | in | … 入力配列 |
[out] | out | … 出力配列 |
[in] | kernel1 | … X軸方向のカーネル配列 |
[in] | kernel2 | … Y軸方向のカーネル配列 |
[in] | f | … コールバック関数 |
[in] | thread_num | … 使用するスレッド数 |
true | … フィルタリングに成功 |
false | … 入力と出力が同じオブジェクトを指定した場合 |
参照先 mist::do_threads_(), mist::array< T, Allocator >::empty(), mist::get_cpu_num(), mist::array2< T, Allocator >::resize(), mist::array1< T, Allocator >::reso1(), mist::array2< T, Allocator >::reso2(), mist::array2< T, Allocator >::size1(), と mist::array2< T, Allocator >::size2().
bool mist::linear::filter1d | ( | array2< T, Allocator > & | in, |
const Kernel & | kernel1, | ||
const Kernel & | kernel2, | ||
Functor | f, | ||
typename array2< T, Allocator >::size_type | thread_num | ||
) |
一般の線形フィルタ( array2 )
1次元分解した各軸に沿ったカーネル配列を画像に適用する(中心はカーネルのサイズから計算) ガウシアンフィルタ等の1次元分解可能なフィルタで利用可能です
[in,out] | in | … 入力・出力配列 |
[in] | kernel1 | … X軸方向のカーネル配列 |
[in] | kernel2 | … Y軸方向のカーネル配列 |
[in] | f | … コールバック関数 |
[in] | thread_num | … 使用するスレッド数 |
true | … フィルタリングに成功 |
false | … 入力と出力が同じオブジェクトを指定した場合 |
参照先 mist::do_threads_(), mist::array< T, Allocator >::empty(), と mist::get_cpu_num().
bool mist::linear::filter1d | ( | const array3< T1, Allocator1 > & | in, |
array3< T2, Allocator2 > & | out, | ||
const Kernel & | kernel1, | ||
const Kernel & | kernel2, | ||
const Kernel & | kernel3, | ||
Functor | f, | ||
typename array3< T1, Allocator1 >::size_type | thread_num | ||
) |
一般の線形フィルタ( array3 )
1次元分解した各軸に沿ったカーネル配列を画像に適用する(中心はカーネルのサイズから計算) ガウシアンフィルタ等の1次元分解可能なフィルタで利用可能です
[in] | in | … 入力配列 |
[out] | out | … 出力配列 |
[in] | kernel1 | … X軸方向のカーネル配列 |
[in] | kernel2 | … Y軸方向のカーネル配列 |
[in] | kernel3 | … Z軸方向のカーネル配列 |
[in] | f | … コールバック関数 |
[in] | thread_num | … 使用するスレッド数 |
true | … フィルタリングに成功 |
false | … 入力と出力が同じオブジェクトを指定した場合 |
参照先 mist::do_threads_(), mist::array< T, Allocator >::empty(), mist::get_cpu_num(), mist::array3< T, Allocator >::resize(), mist::array1< T, Allocator >::reso1(), mist::array2< T, Allocator >::reso2(), mist::array3< T, Allocator >::reso3(), mist::array3< T, Allocator >::size1(), mist::array3< T, Allocator >::size2(), と mist::array3< T, Allocator >::size3().
bool mist::linear::filter1d | ( | array3< T, Allocator > & | in, |
const Kernel & | kernel1, | ||
const Kernel & | kernel2, | ||
const Kernel & | kernel3, | ||
Functor | f, | ||
typename array3< T, Allocator >::size_type | thread_num | ||
) |
一般の線形フィルタ( array3 )
1次元分解した各軸に沿ったカーネル配列を画像に適用する(中心はカーネルのサイズから計算) ガウシアンフィルタ等の1次元分解可能なフィルタで利用可能です
[in,out] | in | … 入力・出力配列 |
[in] | kernel1 | … X軸方向のカーネル配列 |
[in] | kernel2 | … Y軸方向のカーネル配列 |
[in] | kernel3 | … Z軸方向のカーネル配列 |
[in] | f | … コールバック関数 |
[in] | thread_num | … 使用するスレッド数 |
true | … フィルタリングに成功 |
false | … 入力と出力が同じオブジェクトを指定した場合 |
参照先 mist::do_threads_(), mist::array< T, Allocator >::empty(), と mist::get_cpu_num().
bool mist::linear::interpolate | ( | const array< T1, Allocator1 > & | in, |
array< T2, Allocator2 > & | out, | ||
typename array< T1, Allocator1 >::size_type | width, | ||
typename array1< T1, Allocator1 >::size_type | thread_num = 0 |
||
) |
1次元配列に対する線形補間
拡大縮小に伴う画素の内挿を,近傍の2点を用いて線形関数で決定する
[in] | in | … 入力データ |
[out] | out | … 出力データ |
[in] | width | … 出力データのサイズ |
[in] | thread_num | … 使用するスレッド数 |
true | … 補間に成功 |
false | … 入力と出力が同じオブジェクトを指定した場合,もしくは出力サイズが0の場合 |
参照先 mist::do_threads(), mist::get_cpu_num(), mist::is_same_object(), mist::array< T, Allocator >::resize(), mist::array< T, Allocator >::size(), と mist::array< T, Allocator >::width().
bool mist::linear::interpolate | ( | const array1< T1, Allocator1 > & | in, |
array1< T2, Allocator2 > & | out, | ||
typename array1< T1, Allocator1 >::size_type | width, | ||
typename array1< T1, Allocator1 >::size_type | thread_num = 0 |
||
) |
1次元配列に対する線形補間
拡大縮小に伴う画素の内挿を,近傍の2点を用いて線形関数で決定する
[in] | in | … 入力データ |
[out] | out | … 出力データ |
[in] | width | … 出力データのサイズ |
[in] | thread_num | … 使用するスレッド数 |
true | … 補間に成功 |
false | … 入力と出力が同じオブジェクトを指定した場合,もしくは出力サイズが0の場合 |
参照先 mist::do_threads(), mist::get_cpu_num(), mist::is_same_object(), mist::array< T, Allocator >::resize(), mist::array1< T, Allocator >::reso1(), mist::array< T, Allocator >::size(), と mist::array< T, Allocator >::width().
bool mist::linear::interpolate | ( | const array2< T1, Allocator1 > & | in, |
array2< T2, Allocator2 > & | out, | ||
typename array2< T1, Allocator1 >::size_type | width, | ||
typename array2< T1, Allocator1 >::size_type | height, | ||
typename array2< T1, Allocator1 >::size_type | thread_num = 0 |
||
) |
2次元配列に対する線形補間
拡大縮小に伴う画素の内挿を,近傍の4点を用いて線形関数で決定する
[in] | in | … 入力データ |
[out] | out | … 出力データ |
[in] | width | … 出力データのX軸方向のサイズ |
[in] | height | … 出力データのY軸方向のサイズ |
[in] | thread_num | … 使用するスレッド数 |
true | … 補間に成功 |
false | … 入力と出力が同じオブジェクトを指定した場合,もしくは出力サイズが0の場合 |
参照先 mist::do_threads(), mist::get_cpu_num(), mist::array2< T, Allocator >::height(), mist::is_same_object(), mist::array2< T, Allocator >::resize(), mist::array1< T, Allocator >::reso1(), mist::array2< T, Allocator >::reso2(), mist::array< T, Allocator >::size(), と mist::array2< T, Allocator >::width().
bool mist::linear::interpolate | ( | const array3< T1, Allocator1 > & | in, |
array3< T2, Allocator2 > & | out, | ||
typename array3< T1, Allocator1 >::size_type | width, | ||
typename array3< T1, Allocator1 >::size_type | height, | ||
typename array3< T1, Allocator1 >::size_type | depth, | ||
typename array3< T1, Allocator1 >::size_type | thread_num = 0 |
||
) |
3次元配列に対する線形補間
拡大縮小に伴う画素の内挿を,近傍の8点を用いて線形関数で決定する
[in] | in | … 入力データ |
[out] | out | … 出力データ |
[in] | width | … 出力データのX軸方向のサイズ |
[in] | height | … 出力データのY軸方向のサイズ |
[in] | depth | … 出力データのZ軸方向のサイズ |
[in] | thread_num | … 使用するスレッド数 |
true | … 補間に成功 |
false | … 入力と出力が同じオブジェクトを指定した場合,もしくは出力サイズが0の場合 |
参照先 mist::array3< T, Allocator >::depth(), mist::do_threads(), mist::get_cpu_num(), mist::array3< T, Allocator >::height(), mist::is_same_object(), mist::array3< T, Allocator >::resize(), mist::array1< T, Allocator >::reso1(), mist::array2< T, Allocator >::reso2(), mist::array3< T, Allocator >::reso3(), mist::array< T, Allocator >::size(), と mist::array3< T, Allocator >::width().
void mist::linear::transform | ( | const array2< T1, Allocator1 > & | in, |
array2< T1, Allocator1 > & | out, | ||
const matrix< T2, Allocator2 > & | mat | ||
) |
transform array2
[in] | in | is input array |
[out] | out | is output array |
int] | mat is transformation matrix |
参照先 mist::array2< T, Allocator >::height(), mist::inverse(), と mist::array2< T, Allocator >::width().
void mist::linear::transform | ( | const mist::array2< Value_type1, Allocator1 > & | in, |
mist::array2< Value_type2, Allocator2 > & | out, | ||
const double & | delta_x, | ||
const double & | delta_y | ||
) |
平行移動と拡大を考慮して変形する
[in] | in | … 入力画像 |
[out] | out | … 基準画像 |
[in] | delta_x | … x方向位置ずれ |
[in] | delta_y | … y方向位置ずれ |
[in] | factor | … 拡大率 |
参照先 mist::array2< T, Allocator >::height(), mist::array2< T, Allocator >::width(), と mist::vector2< T >::y.