Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifndef TCG_IMAGE_OPS_H
Toshihiro Shimizu 890ddd
#define TCG_IMAGE_OPS_H
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
// tcg includes
Toshihiro Shimizu 890ddd
#include "pixel_ops.h"
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
namespace tcg
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//***********************************************************************
Toshihiro Shimizu 890ddd
//    Image Traits  definition
Toshihiro Shimizu 890ddd
//***********************************************************************
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
template <typename img=""></typename>
Toshihiro Shimizu 890ddd
struct image_traits_types {
Toshihiro Shimizu 890ddd
	typedef Img image_type;
Toshihiro Shimizu 890ddd
	typedef typename Img::pixel_type pixel_type;
Toshihiro Shimizu 890ddd
	typedef typename Img::pixel_ptr_type pixel_ptr_type;
Toshihiro Shimizu 890ddd
	typedef typename Img::pixel_category pixel_category;
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//-------------------------------------------------------------------
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
template <typename img=""></typename>
Toshihiro Shimizu 890ddd
class image_traits : public image_traits_types
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
	typedef image_traits_types tr;
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
public:
Toshihiro Shimizu 890ddd
	static int width(const typename tr::image_type &img);
Toshihiro Shimizu 890ddd
	static int height(const typename tr::image_type &img);
Toshihiro Shimizu 890ddd
	static int wrap(const typename tr::image_type &img);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
	static typename tr::pixel_ptr_type pixel(const typename tr::image_type &img, int x, int y);
Toshihiro Shimizu 890ddd
	static typename tr::pixel_type outsideColor(const typename tr::image_type &img);
Toshihiro Shimizu 890ddd
};
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
namespace image_ops
Toshihiro Shimizu 890ddd
{
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//***********************************************************************
Toshihiro Shimizu 890ddd
//    Image Functions
Toshihiro Shimizu 890ddd
//***********************************************************************
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
template <typename imgin,="" imgout,="" scalar="" typename=""></typename>
Toshihiro Shimizu 890ddd
void blurRows(const ImgIn &imgIn, ImgOut &imgOut, int radius, Scalar = 0);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
template <typename imgin,="" imgout,="" scalar="" selectorfunc,="" typename=""></typename>
Toshihiro Shimizu 890ddd
void blurRows(const ImgIn &imgIn, ImgOut &imgOut, int radius, SelectorFunc func, Scalar = 0);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
template <typename imgin,="" imgout,="" scalar="" typename=""></typename>
Toshihiro Shimizu 890ddd
void blurCols(const ImgIn &imgIn, ImgOut &imgOut, int radius, Scalar = 0);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
template <typename imgin,="" imgout,="" scalar="" selectorfunc,="" typename=""></typename>
Toshihiro Shimizu 890ddd
void blurCols(const ImgIn &imgIn, ImgOut &imgOut, int radius, SelectorFunc func, Scalar = 0);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
template <typename img,="" scalar="" typename=""></typename>
Toshihiro Shimizu 890ddd
void blur(const Img &imgIn, Img &imgOut, int radius, Scalar = 0);
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
template <typename img,="" scalar="" selectorfunc,="" typename=""></typename>
Toshihiro Shimizu 890ddd
void blur(const Img &imgIn, Img &imgOut, int radius, SelectorFunc func, Scalar = 0);
Toshihiro Shimizu 890ddd
}
Toshihiro Shimizu 890ddd
} // namespace tcg::image_ops
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#endif // TCG_IMAGE_OPS_H
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
//===================================================================
Toshihiro Shimizu 890ddd
Toshihiro Shimizu 890ddd
#ifdef INCLUDE_HPP
Toshihiro Shimizu 890ddd
#include "hpp/image_ops.hpp"
Toshihiro Shimizu 890ddd
#endif // INCLUDE_HPP