9 #ifndef BOOST_GIL_PIXEL_NUMERIC_OPERATIONS_HPP
10 #define BOOST_GIL_PIXEL_NUMERIC_OPERATIONS_HPP
12 #include <boost/gil/color_base_algorithm.hpp>
13 #include <boost/gil/pixel.hpp>
14 #include <boost/gil/channel_numeric_operations.hpp>
16 namespace boost {
namespace gil {
36 template <
typename PixelRef1,
typename PixelRef2,
typename PixelResult>
39 auto operator()(PixelRef1
const& p1, PixelRef2
const& p2)
const -> PixelResult
42 static_transform(p1, p2, result,
58 template <
typename PixelRef1,
typename PixelRef2,
typename PixelResult>
61 auto operator()(PixelRef1
const& p1, PixelRef2
const& p2)
const -> PixelResult
64 static_transform(p1, p2, result,
80 template <
typename PixelRef,
typename Scalar,
typename PixelResult>
83 auto operator()(PixelRef
const& p, Scalar
const& s)
const -> PixelResult
86 static_transform(p, result,
91 std::placeholders::_1, s));
101 template <
typename PixelRef1,
typename PixelRef2,
typename PixelResult>
104 auto operator()(PixelRef1
const& p1, PixelRef2
const& p2)
const -> PixelResult
107 static_transform(p1, p2, result,
118 template <
typename PixelRef1,
typename PixelRef2,
typename PixelResult>
126 template <
typename PixelRef,
typename Scalar,
typename PixelResult>
129 auto operator()(PixelRef
const& p, Scalar
const& s)
const -> PixelResult
132 static_transform(p, result,
136 std::placeholders::_1, s));
146 template <
typename PixelRef1,
typename PixelRef2,
typename PixelResult>
149 auto operator()(PixelRef1
const& p1, PixelRef2
const& p2)
const -> PixelResult
152 static_transform(p1, p2, result,
163 template <
typename PixelRef1,
typename PixelRef2,
typename PixelResult>
169 template <
typename PixelRef>
172 auto operator()(PixelRef& p)
const -> PixelRef&
182 template <
typename PixelRef>
185 auto operator()(PixelRef& p)
const -> PixelRef&
194 template <
typename Pixel>
195 void zero_channels(Pixel& p)
208 template <
typename PixelRef,
typename PixelResult>
211 auto operator()(PixelRef
const& src, PixelResult& dst)
const -> PixelResult
213 static_for_each(src, dst,
Sets pixel elements to zero (for whatever zero means)
Definition: pixel_numeric_operations.hpp:183
Arithmetic operation of division of two channel values.
Definition: channel_numeric_operations.hpp:98
Performs channel-wise division of two pixels.
Definition: pixel_numeric_operations.hpp:147
Operation of setting channel value to zero.
Definition: channel_numeric_operations.hpp:220
defined(BOOST_NO_CXX17_HDR_MEMORY_RESOURCE)
Definition: algorithm.hpp:36
Arithmetic operation of multiplication of two channel values.
Definition: channel_numeric_operations.hpp:77
Arithmetic operation of dividing channel value by scalar.
Definition: channel_numeric_operations.hpp:181
Performs channel-wise division of pixel elements by scalar.
Definition: pixel_numeric_operations.hpp:127
Performs channel-wise multiplication of pixel elements by scalar.
Definition: pixel_numeric_operations.hpp:81
Arithmetic operation of dividing channel value by 2.
Definition: channel_numeric_operations.hpp:202
Performs channel-wise division by 2.
Definition: pixel_numeric_operations.hpp:170
Arithmetic operation of channel value by a scalar.
Definition: channel_numeric_operations.hpp:160
Arithmetic operation of subtraction of two channel values.
Definition: channel_numeric_operations.hpp:56
Performs channel-wise multiplication of two pixels.
Definition: pixel_numeric_operations.hpp:102
Performs channel-wise addition of two pixels.
Definition: pixel_numeric_operations.hpp:37
Definition: color_convert.hpp:31
Definition: channel_numeric_operations.hpp:235
Casts and assigns a pixel to another.
Definition: pixel_numeric_operations.hpp:209
Performs channel-wise subtraction of two pixels.
Definition: pixel_numeric_operations.hpp:59
Arithmetic operation of addition of two channel values.
Definition: channel_numeric_operations.hpp:35