TuttleOFX
1
|
Namespaces | |
namespace | detail |
namespace | floodFill |
namespace | thinning |
Data Structures | |
class | kernel_1d |
variable-size kernel More... | |
class | kernel_1d_fixed |
static-size kernel More... | |
struct | pixel_locator_gradientLocalMaxima_t |
Enumerations | |
enum | convolve_boundary_option { convolve_option_output_ignore, convolve_option_output_zero, convolve_option_extend_padded, convolve_option_extend_zero, convolve_option_extend_constant, convolve_option_extend_mirror } |
Functions | |
template<template< typename > class Alloc, class SView , class TRGBView , class TGrayView , class DView > | |
void | canny (const SView &srcView, const TRGBView &tmpSobelView, const TGrayView &tmpGrayView, const DView &cannyView, const point2< double > &sobelSize, const convolve_boundary_option sobelBoundaryOption, const double cannyThresLow, const double cannyThresUpper) |
Canny filtering. | |
template<bool autoEnabled, bool rows, typename PixelAccum , typename SrcView , typename Kernel , typename DstView > | |
GIL_FORCEINLINE void | correlate_1d_imp (const SrcView &src, const Kernel &ker, const DstView &dst, const typename SrcView::point_t &dst_tl, const convolve_boundary_option option=convolve_option_extend_zero) |
template<bool rows, typename PixelAccum , typename SrcView , typename Kernel , typename DstView > | |
GIL_FORCEINLINE void | correlate_1d_auto (const SrcView &src, const Kernel &ker, const DstView &dst, const typename SrcView::point_t &dst_tl, const convolve_boundary_option option=convolve_option_extend_zero) |
template<bool rows, typename PixelAccum , typename SrcView , typename Kernel , typename DstView > | |
GIL_FORCEINLINE void | correlate_1d (const SrcView &src, const Kernel &ker, const DstView &dst, const typename SrcView::point_t &dst_tl, const convolve_boundary_option option=convolve_option_extend_zero) |
template<bool autoEnabled, typename PixelAccum , typename SrcView , typename Kernel , typename DstView > | |
GIL_FORCEINLINE void | correlate_rows_imp (const SrcView &src, const Kernel &ker, const DstView &dst, const typename SrcView::point_t &dst_tl, const convolve_boundary_option option=convolve_option_extend_zero) |
template<typename PixelAccum , typename SrcView , typename Kernel , typename DstView > | |
GIL_FORCEINLINE void | correlate_rows_auto (const SrcView &src, const Kernel &ker, const DstView &dst, const typename SrcView::point_t &dst_tl, const convolve_boundary_option option=convolve_option_extend_zero) |
template<typename PixelAccum , typename SrcView , typename Kernel , typename DstView > | |
GIL_FORCEINLINE void | correlate_rows (const SrcView &src, const Kernel &ker, const DstView &dst, const typename SrcView::point_t &dst_tl=typename SrcView::point_t(0, 0), const convolve_boundary_option option=convolve_option_extend_zero) |
template<bool autoEnabled, typename PixelAccum , typename SrcView , typename Kernel , typename DstView > | |
GIL_FORCEINLINE void | correlate_cols_imp (const SrcView &src, const Kernel &ker, const DstView &dst, const typename SrcView::point_t &dst_tl, const convolve_boundary_option option=convolve_option_extend_zero) |
template<typename PixelAccum , typename SrcView , typename Kernel , typename DstView > | |
GIL_FORCEINLINE void | correlate_cols_auto (const SrcView &src, const Kernel &ker, const DstView &dst, const typename SrcView::point_t &dst_tl, const convolve_boundary_option option=convolve_option_extend_zero) |
template<typename PixelAccum , typename SrcView , typename Kernel , typename DstView > | |
GIL_FORCEINLINE void | correlate_cols (const SrcView &src, const Kernel &ker, const DstView &dst, const typename SrcView::point_t &dst_tl=typename SrcView::point_t(0, 0), const convolve_boundary_option option=convolve_option_extend_zero) |
template<bool autoEnabled, typename PixelAccum , template< typename > class Alloc, typename SrcView , typename KernelX , typename KernelY , typename DstView > | |
GIL_FORCEINLINE void | correlate_rows_cols_imp (const SrcView &src, const KernelX &kernelX, const KernelY &kernelY, const DstView &dst, const typename SrcView::point_t &dst_tl, const convolve_boundary_option option=convolve_option_extend_zero) |
template<typename PixelAccum , template< typename > class Alloc, typename SrcView , typename KernelX , typename KernelY , typename DstView > | |
GIL_FORCEINLINE void | correlate_rows_cols_auto (const SrcView &src, const KernelX &kernelX, const KernelY &kernelY, const DstView &dst, const typename SrcView::point_t &dst_tl, const convolve_boundary_option option=convolve_option_extend_zero) |
template<typename PixelAccum , template< typename > class Alloc, typename SrcView , typename KernelX , typename KernelY , typename DstView > | |
GIL_FORCEINLINE void | correlate_rows_cols (const SrcView &src, const KernelX &kernelX, const KernelY &kernelY, const DstView &dst, const typename SrcView::point_t &dst_tl, const convolve_boundary_option option=convolve_option_extend_zero) |
template<typename PixelAccum , typename SrcIterator , typename KernelIterator , typename Integer , typename DstIterator > | |
GIL_FORCEINLINE DstIterator | correlate_pixels_n (SrcIterator src_begin, SrcIterator src_end, KernelIterator ker_begin, Integer ker_size, DstIterator dst_begin) |
1D un-guarded correlation with a variable-size kernel | |
template<std::size_t Size, typename PixelAccum , typename SrcIterator , typename KernelIterator , typename DstIterator > | |
GIL_FORCEINLINE DstIterator | correlate_pixels_k (SrcIterator src_begin, SrcIterator src_end, KernelIterator ker_begin, DstIterator dst_begin) |
1D un-guarded correlation with a fixed-size kernel | |
template<std::size_t Size, class _InputIterator1 , class _InputIterator2 , class _Tp , class _BinaryOperation1 , class _BinaryOperation2 > | |
GIL_FORCEINLINE _Tp | inner_product_k (_InputIterator1 __first1, _InputIterator2 __first2, _Tp __init, _BinaryOperation1 __binary_op1, _BinaryOperation2 __binary_op2) |
static version of std::inner_product | |
template<typename Kernel > | |
Kernel | reverse_kernel (const Kernel &kernel) |
reverse a kernel | |
template<template< class > class Allocator, class SView , class DView > | |
void | applyFloodFill (const SView &srcView, DView &dstView, const double lowerThres, const double upperThres) |
template<typename Scalar > | |
Scalar | gaussianValueAt (const Scalar x, const Scalar amplitude, const Scalar yscale=1, const Scalar xcenter=0) |
gaussian function
or simplified...
| |
template<typename Scalar > | |
terry::filter::kernel_1d< Scalar > | buildGaussian1DKernel (const Scalar size, const bool normalize=true, const double epsilon=kConvolutionEpsilon) |
create the gaussian kernel * found the kernel size * fill kernel values | |
template<typename Scalar > | |
Scalar | gaussianDerivativeValueAt (const Scalar x, const Scalar amplitude, const Scalar yscale=1, const Scalar xcenter=0) |
gaussian derivative function
| |
template<typename Scalar > | |
terry::filter::kernel_1d< Scalar > | buildGaussianDerivative1DKernel (const Scalar size, const bool normalize=true, const double epsilon=kConvolutionEpsilon) |
create the gaussian derivative kernel * found the kernel size * fill kernel values | |
template<class SView , class DView > | |
void | applyLocalMaxima (const SView &srcView, DView &dstView) |
template<typename View , typename Progress > | |
bool | modifyVectors (const View &xVecView, const View &yVecView, const double angle, const double intensity, Progress &p) |
change intensity and rotate vectors. | |
template<typename GView , typename View , typename Point , typename Scalar , typename Progress > | |
bool | correlateMotionVectors (GView &xGradientView, GView &yGradientView, View &img, const Point &topleft, const terry::filter::kernel_1d< Scalar > &kernel, const convolve_boundary_option boundary_option, Progress &p) |
template<template< typename > class Alloc, typename GView , typename View , typename Point , typename Scalar , typename Progress > | |
bool | correlateMotionVectors (GView &xGradientView, GView &yGradientView, View &img, const Point &topleft, const terry::filter::kernel_1d< Scalar > &kernel, const terry::filter::kernel_1d< Scalar > &kernelSecondary, const convolve_boundary_option boundary_option, Progress &p) |
template<typename Sampler , typename SrcView , typename VecView , typename DstView , typename Progress > | |
bool | motionvectors_resample_pixels (const SrcView &srcView, const Rect< std::ssize_t > &srcRod, const VecView &xVecView, const VecView &yVecView, const Rect< std::ssize_t > &vecRod, const DstView &dstView, const Rect< std::ssize_t > &dstRod, const Rect< std::ssize_t > &procWindowRoW, const sampler::EParamFilterOutOfImage outOfImageProcess, Progress &p, Sampler sampler=Sampler()) |
Moves the pixels based on the variation of the mask (the derivative: [-1 0 1] kernel) | |
template<template< typename > class Alloc, class SView , class DView > | |
void | sobel (const SView &srcView, const DView &dstViewX, const DView &dstViewY, const point2< double > &size, const convolve_boundary_option boundary_option) |
Sobel filtering. | |
template<class SView , class DView > | |
void | applyThinning (const SView &srcView, DView &tmpView, DView &dstView) |
Variables | |
static const double | kConvolutionEpsilon = 0.1 |
arbitrary value... |
Boundary options for 1D correlations/convolutions
Definition at line 32 of file convolve.hpp.
void terry::filter::applyFloodFill | ( | const SView & | srcView, |
DView & | dstView, | ||
const double | lowerThres, | ||
const double | upperThres | ||
) |
Definition at line 584 of file floodFill.hpp.
References tuttle::plugin::merge::fill_pixels(), tuttle::host::graph::make(), terry::numeric::pixel_minmax_by_channel_t< CPixel >::max, terry::numeric::pixel_minmax_by_channel_t< CPixel >::min, terry::rectangleReduce(), and terry::algorithm::transform_pixels().
void terry::filter::applyLocalMaxima | ( | const SView & | srcView, |
DView & | dstView | ||
) |
Definition at line 178 of file localMaxima.hpp.
References tuttle::plugin::merge::fill_pixels(), and terry::algorithm::transform_pixels_locator().
Referenced by BOOST_AUTO_TEST_CASE(), and canny().
void terry::filter::applyThinning | ( | const SView & | srcView, |
DView & | tmpView, | ||
DView & | dstView | ||
) |
Definition at line 97 of file thinning.hpp.
References tuttle::plugin::merge::fill_pixels(), terry::filter::thinning::lutthin1, terry::filter::thinning::lutthin2, terry::rectangleReduce(), and terry::algorithm::transform_pixels_locator().
Referenced by BOOST_AUTO_TEST_CASE(), and canny().
terry::filter::kernel_1d<Scalar> terry::filter::buildGaussian1DKernel | ( | const Scalar | size, |
const bool | normalize = true , |
||
const double | epsilon = kConvolutionEpsilon |
||
) |
create the gaussian kernel * found the kernel size * fill kernel values
Definition at line 49 of file gaussianKernel.hpp.
References copy(), terry::algorithm::for_each(), and terry::normalize().
terry::filter::kernel_1d<Scalar> terry::filter::buildGaussianDerivative1DKernel | ( | const Scalar | size, |
const bool | normalize = true , |
||
const double | epsilon = kConvolutionEpsilon |
||
) |
create the gaussian derivative kernel * found the kernel size * fill kernel values
Definition at line 120 of file gaussianKernel.hpp.
References copy(), terry::algorithm::for_each(), and terry::normalize().
void terry::filter::canny | ( | const SView & | srcView, |
const TRGBView & | tmpSobelView, | ||
const TGrayView & | tmpGrayView, | ||
const DView & | cannyView, | ||
const point2< double > & | sobelSize, | ||
const convolve_boundary_option | sobelBoundaryOption, | ||
const double | cannyThresLow, | ||
const double | cannyThresUpper | ||
) |
Canny filtering.
Definition at line 26 of file canny.hpp.
References applyLocalMaxima(), applyThinning(), and terry::algorithm::transform_pixels().
GIL_FORCEINLINE void terry::filter::correlate_1d | ( | const SrcView & | src, |
const Kernel & | ker, | ||
const DstView & | dst, | ||
const typename SrcView::point_t & | dst_tl, | ||
const convolve_boundary_option | option = convolve_option_extend_zero |
||
) |
correlate a 1D variable-size kernel along the rows of an image
Definition at line 429 of file convolve.hpp.
GIL_FORCEINLINE void terry::filter::correlate_1d_auto | ( | const SrcView & | src, |
const Kernel & | ker, | ||
const DstView & | dst, | ||
const typename SrcView::point_t & | dst_tl, | ||
const convolve_boundary_option | option = convolve_option_extend_zero |
||
) |
correlate a 1D variable-size kernel along the rows of an image
Definition at line 419 of file convolve.hpp.
GIL_FORCEINLINE void terry::filter::correlate_1d_imp | ( | const SrcView & | src, |
const Kernel & | ker, | ||
const DstView & | dst, | ||
const typename SrcView::point_t & | dst_tl, | ||
const convolve_boundary_option | option = convolve_option_extend_zero |
||
) |
correlate a 1D variable-size kernel along the rows of an image
Definition at line 409 of file convolve.hpp.
GIL_FORCEINLINE void terry::filter::correlate_cols | ( | const SrcView & | src, |
const Kernel & | ker, | ||
const DstView & | dst, | ||
const typename SrcView::point_t & | dst_tl = typename SrcView::point_t(0,0) , |
||
const convolve_boundary_option | option = convolve_option_extend_zero |
||
) |
correlate a 1D variable-size kernel along the columns of an image
Definition at line 489 of file convolve.hpp.
GIL_FORCEINLINE void terry::filter::correlate_cols_auto | ( | const SrcView & | src, |
const Kernel & | ker, | ||
const DstView & | dst, | ||
const typename SrcView::point_t & | dst_tl, | ||
const convolve_boundary_option | option = convolve_option_extend_zero |
||
) |
correlate a 1D variable-size kernel along the columns of an image
Definition at line 479 of file convolve.hpp.
GIL_FORCEINLINE void terry::filter::correlate_cols_imp | ( | const SrcView & | src, |
const Kernel & | ker, | ||
const DstView & | dst, | ||
const typename SrcView::point_t & | dst_tl, | ||
const convolve_boundary_option | option = convolve_option_extend_zero |
||
) |
correlate a 1D variable-size kernel along the columns of an image
Definition at line 469 of file convolve.hpp.
GIL_FORCEINLINE DstIterator terry::filter::correlate_pixels_k | ( | SrcIterator | src_begin, |
SrcIterator | src_end, | ||
KernelIterator | ker_begin, | ||
DstIterator | dst_begin | ||
) |
1D un-guarded correlation with a fixed-size kernel
Definition at line 47 of file correlate.hpp.
GIL_FORCEINLINE DstIterator terry::filter::correlate_pixels_n | ( | SrcIterator | src_begin, |
SrcIterator | src_end, | ||
KernelIterator | ker_begin, | ||
Integer | ker_size, | ||
DstIterator | dst_begin | ||
) |
1D un-guarded correlation with a variable-size kernel
Definition at line 18 of file correlate.hpp.
GIL_FORCEINLINE void terry::filter::correlate_rows | ( | const SrcView & | src, |
const Kernel & | ker, | ||
const DstView & | dst, | ||
const typename SrcView::point_t & | dst_tl = typename SrcView::point_t(0,0) , |
||
const convolve_boundary_option | option = convolve_option_extend_zero |
||
) |
correlate a 1D variable-size kernel along the rows of an image
Definition at line 459 of file convolve.hpp.
GIL_FORCEINLINE void terry::filter::correlate_rows_auto | ( | const SrcView & | src, |
const Kernel & | ker, | ||
const DstView & | dst, | ||
const typename SrcView::point_t & | dst_tl, | ||
const convolve_boundary_option | option = convolve_option_extend_zero |
||
) |
correlate a 1D variable-size kernel along the rows of an image
Definition at line 449 of file convolve.hpp.
GIL_FORCEINLINE void terry::filter::correlate_rows_cols | ( | const SrcView & | src, |
const KernelX & | kernelX, | ||
const KernelY & | kernelY, | ||
const DstView & | dst, | ||
const typename SrcView::point_t & | dst_tl, | ||
const convolve_boundary_option | option = convolve_option_extend_zero |
||
) |
correlate a 2D separable variable-size kernel (kernelX and kernelY)
Definition at line 578 of file convolve.hpp.
GIL_FORCEINLINE void terry::filter::correlate_rows_cols_auto | ( | const SrcView & | src, |
const KernelX & | kernelX, | ||
const KernelY & | kernelY, | ||
const DstView & | dst, | ||
const typename SrcView::point_t & | dst_tl, | ||
const convolve_boundary_option | option = convolve_option_extend_zero |
||
) |
correlate a 2D separable variable-size kernel (kernelX and kernelY)
Definition at line 564 of file convolve.hpp.
GIL_FORCEINLINE void terry::filter::correlate_rows_cols_imp | ( | const SrcView & | src, |
const KernelX & | kernelX, | ||
const KernelY & | kernelY, | ||
const DstView & | dst, | ||
const typename SrcView::point_t & | dst_tl, | ||
const convolve_boundary_option | option = convolve_option_extend_zero |
||
) |
correlate a 2D separable variable-size kernel (kernelX and kernelY)
Definition at line 499 of file convolve.hpp.
References tuttle::min(), and boost::gil::view().
GIL_FORCEINLINE void terry::filter::correlate_rows_imp | ( | const SrcView & | src, |
const Kernel & | ker, | ||
const DstView & | dst, | ||
const typename SrcView::point_t & | dst_tl, | ||
const convolve_boundary_option | option = convolve_option_extend_zero |
||
) |
correlate a 1D variable-size kernel along the rows of an image
Definition at line 439 of file convolve.hpp.
bool terry::filter::correlateMotionVectors | ( | GView & | xGradientView, |
GView & | yGradientView, | ||
View & | img, | ||
const Point & | topleft, | ||
const terry::filter::kernel_1d< Scalar > & | kernel, | ||
const convolve_boundary_option | boundary_option, | ||
Progress & | p | ||
) |
Definition at line 84 of file motionVectors.hpp.
References tuttle::plugin::viewer::img.
bool terry::filter::correlateMotionVectors | ( | GView & | xGradientView, |
GView & | yGradientView, | ||
View & | img, | ||
const Point & | topleft, | ||
const terry::filter::kernel_1d< Scalar > & | kernel, | ||
const terry::filter::kernel_1d< Scalar > & | kernelSecondary, | ||
const convolve_boundary_option | boundary_option, | ||
Progress & | p | ||
) |
Definition at line 106 of file motionVectors.hpp.
References tuttle::plugin::viewer::img.
Scalar terry::filter::gaussianDerivativeValueAt | ( | const Scalar | x, |
const Scalar | amplitude, | ||
const Scalar | yscale = 1 , |
||
const Scalar | xcenter = 0 |
||
) |
gaussian derivative function
Definition at line 107 of file gaussianKernel.hpp.
Scalar terry::filter::gaussianValueAt | ( | const Scalar | x, |
const Scalar | amplitude, | ||
const Scalar | yscale = 1 , |
||
const Scalar | xcenter = 0 |
||
) |
gaussian function
or simplified...
Definition at line 36 of file gaussianKernel.hpp.
GIL_FORCEINLINE _Tp terry::filter::inner_product_k | ( | _InputIterator1 | __first1, |
_InputIterator2 | __first2, | ||
_Tp | __init, | ||
_BinaryOperation1 | __binary_op1, | ||
_BinaryOperation2 | __binary_op2 | ||
) |
static version of std::inner_product
Definition at line 75 of file inner_product.hpp.
bool terry::filter::modifyVectors | ( | const View & | xVecView, |
const View & | yVecView, | ||
const double | angle, | ||
const double | intensity, | ||
Progress & | p | ||
) |
change intensity and rotate vectors.
[in/out] | xVecView image of x vectors | |
[in/out] | yVecView image of y vectors | |
[in] | angle | rotation to apply on vectors (radian) |
[in] | intensity | scale vectors values |
[in] | p | inform progress |
Definition at line 31 of file motionVectors.hpp.
References tuttle::plugin::viewer::motion().
Referenced by tuttle::plugin::pushPixel::PushPixelProcess< View >::multiThreadProcessImages().
bool terry::filter::motionvectors_resample_pixels | ( | const SrcView & | srcView, |
const Rect< std::ssize_t > & | srcRod, | ||
const VecView & | xVecView, | ||
const VecView & | yVecView, | ||
const Rect< std::ssize_t > & | vecRod, | ||
const DstView & | dstView, | ||
const Rect< std::ssize_t > & | dstRod, | ||
const Rect< std::ssize_t > & | procWindowRoW, | ||
const sampler::EParamFilterOutOfImage | outOfImageProcess, | ||
Progress & | p, | ||
Sampler | sampler = Sampler() |
||
) |
Moves the pixels based on the variation of the mask (the derivative: [-1 0 1] kernel)
Definition at line 132 of file motionVectors.hpp.
References boost::gil::color_convert(), tuttle::plugin::viewer::motion(), terry::sampler::sample(), terry::Rect< T >::size(), terry::Rect< T >::x1, terry::Rect< T >::x2, terry::Rect< T >::y1, and terry::Rect< T >::y2.
Kernel terry::filter::reverse_kernel | ( | const Kernel & | kernel | ) | [inline] |
reverse a kernel
Definition at line 105 of file kernel.hpp.
Referenced by tuttle::plugin::sobel::SobelPlugin::getProcessParams().
void terry::filter::sobel | ( | const SView & | srcView, |
const DView & | dstViewX, | ||
const DView & | dstViewY, | ||
const point2< double > & | size, | ||
const convolve_boundary_option | boundary_option | ||
) |
const double terry::filter::kConvolutionEpsilon = 0.1 [static] |
arbitrary value...
Definition at line 21 of file gaussianKernel.hpp.