#include "yof_image.hpp" #include "yof_imageuty.hpp" #include "yof_dynamic_image.hpp" using ::yoffy::icol; using ::yoffy::irow; using ::yoffy::iradius; template< class IMAGE > void test_int() { IMAGE foo( 100, 100 ); IMAGE bar( 100, 100 ); IMAGE baz; IMAGE hoge( foo ); foo = 5; bar = 8; baz = foo * bar.clone() - yoffy::pow( foo, -bar ); baz = yoffy::sqlen( foo, ~bar ) / yoffy::len( foo, bar ); baz = foo * iradius + 2; baz = 1 + foo; baz = foo * irow; baz = foo + 1.0f; baz = icol + foo * 2; baz = foo * 2.0f + irow; baz = icol; baz = irow; baz = iradius; baz++; baz *= 1; baz = foo.clone(); baz.clip( 10, 10, 10, 10 ) = foo.clip( 30, 50, 10, 10 ) * bar.clip( 80, 20, 10, 10 ); hoge &= foo; baz = icol + irow; baz = yoffy::minimum_filter( foo ); baz = yoffy::maximum_filter( foo ); baz = yoffy::median_filter( foo ); } int main( int argc, char ** argv ) { test_int< yoffy::imageb >(); test_int< yoffy::images8 >(); test_int< yoffy::images16 >(); test_int< yoffy::images32 >(); test_int< yoffy::imageu8 >(); test_int< yoffy::imageu16 >(); test_int< yoffy::imageu32 >(); yoffy::imagergb hoge( 100, 100 ); yoffy::imageu8 fuga = yoffy::red( hoge ); { using namespace yoffy::dynamic_image; image<> ref = image<>( 30 ); image<> ref2 = image<>( 30 ); image<> ref3 = image<>( 30 ); ref3 = ref * ref2; } return 0; }