2 // Copyright 2019 Mateusz Loskot <mateusz at loskot dot net>
4 // Distributed under the Boost Software License, Version 1.0
5 // See accompanying file LICENSE_1_0.txt or copy at
6 // http://www.boost.org/LICENSE_1_0.txt
8 #include <boost/gil/image_processing/threshold.hpp>
10 namespace gil = boost::gil;
14 // Source and destination views must have pixels with the same (compatible) color space
16 gil::rgb8_image_t src;
17 gil::gray8_image_t dst;
18 gil::threshold_binary(const_view(src), view(dst), 0, 255);
21 gil::gray8_image_t src;
22 gil::rgb8_image_t dst;
23 gil::threshold_binary(const_view(src), view(dst), 0, 255);