// // Copyright 2019 Olzhas Zhumabek // // Use, modification and distribution are subject to the Boost Software License, // Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at // http://www.boost.org/LICENSE_1_0.txt) // #ifndef BOOST_GIL_IMAGE_PROCESSING_DETAIL_MATH_HPP #define BOOST_GIL_IMAGE_PROCESSING_DETAIL_MATH_HPP #include #include namespace boost { namespace gil { namespace detail { static constexpr double pi = 3.14159265358979323846; static constexpr std::array dx_sobel = {{-1, 0, 1, -2, 0, 2, -1, 0, 1}}; static constexpr std::array dx_scharr = {{-1, 0, 1, -1, 0, 1, -1, 0, 1}}; static constexpr std::array dy_sobel = {{1, 2, 1, 0, 0, 0, -1, -2, -1}}; static constexpr std::array dy_scharr = {{1, 1, 1, 0, 0, 0, -1, -1, -1}}; template inline auto get_identity_kernel() -> detail::kernel_2d { detail::kernel_2d kernel(1, 0, 0); kernel[0] = 1; return kernel; } }}} // namespace boost::gil::detail #endif