feat():initial version
This commit is contained in:
@@ -0,0 +1,47 @@
|
||||
//
|
||||
// Copyright 2019 Mateusz Loskot <mateusz at loskot dot net>
|
||||
// Copyright 2005-2007 Adobe Systems Incorporated
|
||||
//
|
||||
// Distributed under 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_DETAIL_IS_CHANNEL_INTEGRAL_HPP
|
||||
#define BOOST_GIL_DETAIL_IS_CHANNEL_INTEGRAL_HPP
|
||||
|
||||
#include <boost/gil/channel.hpp>
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace boost { namespace gil { namespace detail {
|
||||
|
||||
template <typename ChannelValue>
|
||||
struct is_channel_integral : std::is_integral<ChannelValue> {};
|
||||
|
||||
template <int NumBits>
|
||||
struct is_channel_integral<boost::gil::packed_channel_value<NumBits>> : std::true_type {};
|
||||
|
||||
template <typename BitField, int FirstBit, int NumBits, bool IsMutable>
|
||||
struct is_channel_integral
|
||||
<
|
||||
boost::gil::packed_channel_reference<BitField, FirstBit, NumBits, IsMutable>
|
||||
> : std::true_type
|
||||
{};
|
||||
|
||||
template <typename BitField, int NumBits, bool IsMutable>
|
||||
struct is_channel_integral
|
||||
<
|
||||
boost::gil::packed_dynamic_channel_reference<BitField, NumBits, IsMutable>
|
||||
> : std::true_type
|
||||
{};
|
||||
|
||||
template <typename BaseChannelValue, typename MinVal, typename MaxVal>
|
||||
struct is_channel_integral
|
||||
<
|
||||
boost::gil::scoped_channel_value<BaseChannelValue, MinVal, MaxVal>
|
||||
> : std::is_integral<BaseChannelValue>
|
||||
{};
|
||||
|
||||
}}} //namespace boost::gil::detail
|
||||
|
||||
#endif
|
||||
33
install/boost_1_75_0/include/boost/gil/detail/math.hpp
Normal file
33
install/boost_1_75_0/include/boost/gil/detail/math.hpp
Normal file
@@ -0,0 +1,33 @@
|
||||
//
|
||||
// Copyright 2019 Olzhas Zhumabek <anonymous.from.applecity@gmail.com>
|
||||
//
|
||||
// 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 <array>
|
||||
#include <boost/gil/extension/numeric/kernel.hpp>
|
||||
|
||||
namespace boost { namespace gil { namespace detail {
|
||||
|
||||
static constexpr double pi = 3.14159265358979323846;
|
||||
|
||||
static constexpr std::array<float, 9> dx_sobel = {{-1, 0, 1, -2, 0, 2, -1, 0, 1}};
|
||||
static constexpr std::array<float, 9> dx_scharr = {{-1, 0, 1, -1, 0, 1, -1, 0, 1}};
|
||||
static constexpr std::array<float, 9> dy_sobel = {{1, 2, 1, 0, 0, 0, -1, -2, -1}};
|
||||
static constexpr std::array<float, 9> dy_scharr = {{1, 1, 1, 0, 0, 0, -1, -1, -1}};
|
||||
|
||||
template <typename T, typename Allocator>
|
||||
inline detail::kernel_2d<T, Allocator> get_identity_kernel()
|
||||
{
|
||||
detail::kernel_2d<T, Allocator> kernel(1, 0, 0);
|
||||
kernel[0] = 1;
|
||||
return kernel;
|
||||
}
|
||||
|
||||
}}} // namespace boost::gil::detail
|
||||
|
||||
#endif
|
||||
26
install/boost_1_75_0/include/boost/gil/detail/mp11.hpp
Normal file
26
install/boost_1_75_0/include/boost/gil/detail/mp11.hpp
Normal file
@@ -0,0 +1,26 @@
|
||||
//
|
||||
// Copyright 2017 Peter Dimov.
|
||||
// Copyright 2019 Mateusz Loskot <mateusz at loskot dot net>
|
||||
//
|
||||
// Distributed under 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_DETAIL_MP11_HPP
|
||||
#define BOOST_GIL_DETAIL_MP11_HPP
|
||||
|
||||
#include <boost/mp11.hpp>
|
||||
#include <boost/mp11/mpl.hpp> // required by dynamic_image and boost::variant (?)
|
||||
|
||||
namespace boost { namespace gil { namespace detail {
|
||||
|
||||
template<typename L>
|
||||
using mp_back = ::boost::mp11::mp_at_c<L, ::boost::mp11::mp_size<L>::value - 1>;
|
||||
|
||||
template<typename L>
|
||||
using mp_pop_back = ::boost::mp11::mp_take_c<L, ::boost::mp11::mp_size<L>::value - 1>;
|
||||
|
||||
|
||||
}}} // namespace boost::gil::detail
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// Copyright Louis Dionne 2013-2017
|
||||
//
|
||||
// Distributed under the Boost Software License, Version 1.0.
|
||||
//(See accompanying file LICENSE.md or copy at http://boost.org/LICENSE_1_0.txt)
|
||||
//
|
||||
#ifndef BOOST_GIL_DETAIL_STD_COMMON_TYPE_HPP
|
||||
#define BOOST_GIL_DETAIL_STD_COMMON_TYPE_HPP
|
||||
|
||||
#include <type_traits>
|
||||
#include <utility>
|
||||
|
||||
namespace boost { namespace gil { namespace detail {
|
||||
|
||||
// Defines a SFINAE-friendly version of `std::common_type`.
|
||||
//
|
||||
// Based on boost/hana/detail/std_common_type.hpp
|
||||
// Equivalent to `std::common_type`, except it is SFINAE-friendly and
|
||||
// does not support custom specializations.
|
||||
|
||||
template <typename T, typename U, typename = void>
|
||||
struct std_common_type {};
|
||||
|
||||
template <typename T, typename U>
|
||||
struct std_common_type
|
||||
<
|
||||
T, U,
|
||||
decltype((void)(true ? std::declval<T>() : std::declval<U>()))
|
||||
>
|
||||
{
|
||||
using type = typename std::decay
|
||||
<
|
||||
decltype(true ? std::declval<T>() : std::declval<U>())
|
||||
>::type;
|
||||
};
|
||||
|
||||
}}} // namespace boost::gil::detail
|
||||
|
||||
#endif
|
||||
@@ -0,0 +1,39 @@
|
||||
//
|
||||
// Copyright 2017-2019 Peter Dimov.
|
||||
//
|
||||
// Distributed under 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_DETAIL_TYPE_TRAITS_HPP
|
||||
#define BOOST_GIL_DETAIL_TYPE_TRAITS_HPP
|
||||
|
||||
#include <boost/config.hpp>
|
||||
|
||||
#include <type_traits>
|
||||
|
||||
namespace boost { namespace gil { namespace detail {
|
||||
|
||||
#if defined(BOOST_LIBSTDCXX_VERSION) && BOOST_LIBSTDCXX_VERSION < 50100
|
||||
|
||||
template<class T>
|
||||
struct is_trivially_default_constructible
|
||||
: std::integral_constant
|
||||
<
|
||||
bool,
|
||||
std::is_default_constructible<T>::value &&
|
||||
std::has_trivial_default_constructor<T>::value
|
||||
>
|
||||
{};
|
||||
|
||||
#else
|
||||
|
||||
using std::is_trivially_default_constructible;
|
||||
|
||||
#endif
|
||||
|
||||
using std::is_trivially_destructible;
|
||||
|
||||
}}} //namespace boost::gil::detail
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user