Boost GIL


Enumerations | Functions
Image Processing

Image Processing algorithms. More...

Enumerations

enum  threshold_direction { regular, inverse }
 
enum  threshold_optimal_value { otsu }
 Method of optimal threshold value calculation. More...
 
enum  threshold_truncate_mode { threshold, zero }
 TODO. More...
 
enum  threshold_adaptive_method { mean, gaussian }
 

Functions

template<typename SrcView , typename DstView >
void threshold_binary (SrcView const &src_view, DstView const &dst_view, typename channel_type< DstView >::type threshold_value, typename channel_type< DstView >::type max_value, threshold_direction direction=threshold_direction::regular)
 Applies fixed threshold to each pixel of image view. Performs image binarization by thresholding channel value of each pixel of given image view. More...
 
template<typename SrcView , typename DstView >
void threshold_binary (SrcView const &src_view, DstView const &dst_view, typename channel_type< DstView >::type threshold_value, threshold_direction direction=threshold_direction::regular)
 Applies fixed threshold to each pixel of image view. Performs image binarization by thresholding channel value of each pixel of given image view. This variant of threshold_binary automatically deduces maximum value for each channel of pixel based on channel type. If direction is regular, values greater than threshold_value will be set to maximum numeric limit of channel else 0. If direction is inverse, values greater than threshold_value will be set to 0 else maximum numeric limit of channel.
 
template<typename SrcView , typename DstView >
void threshold_truncate (SrcView const &src_view, DstView const &dst_view, typename channel_type< DstView >::type threshold_value, threshold_truncate_mode mode=threshold_truncate_mode::threshold, threshold_direction direction=threshold_direction::regular)
 Applies truncating threshold to each pixel of image view. Takes an image view and performs truncating threshold operation on each chennel. If mode is threshold and direction is regular: values greater than threshold_value will be set to threshold_value else no change If mode is threshold and direction is inverse: values less than or equal to threshold_value will be set to threshold_value else no change If mode is zero and direction is regular: values less than or equal to threshold_value will be set to 0 else no change If mode is zero and direction is inverse: values more than threshold_value will be set to 0 else no change.
 
template<typename SrcView , typename DstView >
void threshold_optimal (SrcView const &src_view, DstView const &dst_view, threshold_optimal_value mode=threshold_optimal_value::otsu, threshold_direction direction=threshold_direction::regular)
 
template<typename SrcView , typename DstView >
void threshold_adaptive (SrcView const &src_view, DstView const &dst_view, typename channel_type< DstView >::type max_value, std::size_t kernel_size, threshold_adaptive_method method=threshold_adaptive_method::mean, threshold_direction direction=threshold_direction::regular, typename channel_type< DstView >::type constant=0)
 
template<typename SrcView , typename DstView >
void threshold_adaptive (SrcView const &src_view, DstView const &dst_view, std::size_t kernel_size, threshold_adaptive_method method=threshold_adaptive_method::mean, threshold_direction direction=threshold_direction::regular, int constant=0)
 

Detailed Description

Image Processing algorithms.

Direction of image segmentation. The direction specifies which pixels are considered as corresponding to object and which pixels correspond to background.

Collection of image processing algorithms currently implemented by GIL.

Enumeration Type Documentation

◆ threshold_direction

enum threshold_direction
strong
Enumerator
regular 

Consider values greater than threshold value.

inverse 

Consider values less than or equal to threshold value.

◆ threshold_optimal_value

Method of optimal threshold value calculation.

Enumerator
otsu 
Todo:
TODO

◆ threshold_truncate_mode

TODO.

Enumerator
threshold 
Todo:
TODO
zero 
Todo:
TODO

Function Documentation

◆ threshold_binary()

void boost::gil::threshold_binary ( SrcView const &  src_view,
DstView const &  dst_view,
typename channel_type< DstView >::type  threshold_value,
typename channel_type< DstView >::type  max_value,
threshold_direction  direction = threshold_direction::regular 
)

Applies fixed threshold to each pixel of image view. Performs image binarization by thresholding channel value of each pixel of given image view.

Parameters
src_view- TODO
dst_view- TODO
threshold_value- TODO
max_value- TODO
threshold_direction- if regular, values greater than threshold_value are set to max_value else set to 0; if inverse, values greater than threshold_value are set to 0 else set to max_value.