24 #include "png++/png.hpp"
41 inline T square(T value)
58 return (T(0) < value) - (value < T(0));
67 inline std::string toString(T value)
69 std::ostringstream oss;
80 void otsuThresholding(png::image<png::gray_pixel> & image);
86 void binaryImageToNegative(png::image<png::gray_pixel> & image);
92 template <
typename pixel_type>
93 void fillImage(png::image<pixel_type> & image,
const pixel_type & pixel)
95 for (
size_t i = 0; i < image.get_width(); ++i)
96 for (
size_t j = 0; j < image.get_height(); ++j)
97 image.set_pixel(i,j, pixel);