Boost GIL


Enumerations | Functions
Image Processing

Image Processing algorithms. More...

Enumerations

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

Functions

template<typename SrcView , typename DstView , typename Kernel >
void morph_impl (SrcView const &src_view, DstView const &dst_view, Kernel const &kernel, morphological_operation identifier)
 Implements morphological operations at pixel level.This function compares neighbouring pixel values according to the kernel and choose minimum/mamximum neighbouring pixel value and assigns it to the pixel under consideration. More...
 
template<typename SrcView , typename DstView , typename Kernel >
void morph (SrcView const &src_view, DstView const &dst_view, Kernel const &ker_mat, morphological_operation identifier)
 Checks feasibility of the desired operation and passes parameter values to the function morph_impl alongwith individual channel views of the input image. More...
 
template<typename SrcView , typename DiffView >
void difference_impl (SrcView const &src_view1, SrcView const &src_view2, DiffView const &diff_view)
 Calculates the difference between pixel values of first image_view and second image_view. More...
 
template<typename SrcView , typename DiffView >
void difference (SrcView const &src_view1, SrcView const &src_view2, DiffView const &diff_view)
 Passes parameter values to the function 'difference_impl' alongwith individual channel views of input images. More...
 
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

◆ difference()

void boost::gil::detail::difference ( SrcView const &  src_view1,
SrcView const &  src_view2,
DiffView const &  diff_view 
)

Passes parameter values to the function 'difference_impl' alongwith individual channel views of input images.

Parameters
src_view1- First parameter for subtraction of views.
src_view2- Second parameter for subtraction of views.
diff_view- View containing result of the subtraction of second view from the first view.
Template Parameters
SrcViewtype of source/Input images used for subtraction.
DiffViewtype of image view containing the result of subtraction.

◆ difference_impl()

void boost::gil::detail::difference_impl ( SrcView const &  src_view1,
SrcView const &  src_view2,
DiffView const &  diff_view 
)

Calculates the difference between pixel values of first image_view and second image_view.

Parameters
src_view1- First parameter for subtraction of views.
src_view2- Second parameter for subtraction of views.
diff_view- View containing result of the subtraction of second view from the first view.
Template Parameters
SrcViewtype of source/Input images used for subtraction.
DiffViewtype of image view containing the result of subtraction.

◆ morph()

void boost::gil::detail::morph ( SrcView const &  src_view,
DstView const &  dst_view,
Kernel const &  ker_mat,
morphological_operation  identifier 
)

Checks feasibility of the desired operation and passes parameter values to the function morph_impl alongwith individual channel views of the input image.

Parameters
src_view- Source/Input image view.
dst_view- View which stores the final result of operations performed by this function.
kernel- Kernel matrix/structuring element containing 0's and 1's which will be used for applying the required morphological operation.
identifier- Indicates the type of morphological operation to be applied.
Template Parameters
SrcViewtype of source image.
DstViewtype of output image.
Kerneltype of structuring element.

◆ morph_impl()

void boost::gil::detail::morph_impl ( SrcView const &  src_view,
DstView const &  dst_view,
Kernel const &  kernel,
morphological_operation  identifier 
)

Implements morphological operations at pixel level.This function compares neighbouring pixel values according to the kernel and choose minimum/mamximum neighbouring pixel value and assigns it to the pixel under consideration.

Parameters
src_view- Source/Input image view.
dst_view- View which stores the final result of operations performed by this function.
kernel- Kernel matrix/structuring element containing 0's and 1's which will be used for applying the required morphological operation.
identifier- Indicates the type of morphological operation to be applied.
Template Parameters
SrcViewtype of source image.
DstViewtype of output image.
Kerneltype of structuring element.

◆ 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.