$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
scribo::preprocessing Namespace Reference

Functions

template<typename I >
mln::trait::concrete< I >::ret crop (const Image< I > &input, const mln_box(I)&domain)
template<typename I >
mln::trait::concrete< I >::ret crop_without_localization (const Image< I > &input, const mln_box(I)&domain)
template<typename I , typename N >
mln::trait::concrete< I >::ret denoise (const Image< I > &input, const Neighborhood< N > &nbh, unsigned fg_min_card, unsigned bg_min_card)
template<typename I , typename N >
mln::trait::concrete< I >::ret denoise_bg (const Image< I > &input, const Neighborhood< N > &nbh, unsigned min_card)
template<typename I , typename N >
mln::trait::concrete< I >::ret denoise_fg (const Image< I > &input, const Neighborhood< N > &nbh, unsigned min_card)
template<typename I , typename J >
mln::trait::concrete< I >::ret deskew (const Image< I > &crop_gl, const Image< I > &input_gl)
template<typename I >
mln::trait::concrete< I >::ret homogeneous_contrast (const Image< I > &input, unsigned h)
template<typename I >
mln::trait::concrete< I >::ret homogeneous_contrast (const Image< I > &input)
template<typename I >
mln::trait::concrete< I >::ret rotate_90 (const Image< I > &input, bool positive)
template<typename I >
mln::trait::concrete< I >::ret rotate_90 (const Image< I > &input)
template<typename I >
mln::util::couple< typename
mln::trait::concrete< I >::ret,
typename mln::trait::concrete
< I >::ret
split_bg_fg (const Image< I > &input, unsigned lambda, unsigned delta)

Detailed Description

Namespace of preprocessing routines.

Function Documentation

template<typename I >
mln::trait::concrete< I >::ret scribo::preprocessing::crop ( const Image< I > &  input,
const mln_box(I)&  domain 
)

crop an image preserving the localization.

Parameters
[in]inputAn image.
[in]domainA region of interest.
Returns
An image defined on the domain domain with the corresponding data copied from input.
template<typename I >
mln::trait::concrete< I >::ret scribo::preprocessing::crop_without_localization ( const Image< I > &  input,
const mln_box(I)&  domain 
)

crop an image without preserving the localization.

Parameters
[in]inputAn image.
[in]domainA region of interest.
Returns
An image defined on a domain starting from the origin (literal::origin) and having the same size as domain. Its data corresponds to the data copied from input in the domain domain.
template<typename I , typename N >
mln::trait::concrete< I >::ret scribo::preprocessing::denoise ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
unsigned  fg_min_card,
unsigned  bg_min_card 
)

Denoise an image.

Denoising is performed both on the foreground and the background.

Parameters
[in]inputA binary image. True for objects, False for background.
[in]nbhNeighborhood to use for denoising.
[in]fg_min_cardMinimum component cardinality to not be considered as noise in the foreground.
[in]bg_min_cardMinimum component cardinality to not be considered as noise in the foreground.
Returns
A binary image with the same domain as input. All small components have been removed.
template<typename I , typename N >
mln::trait::concrete< I >::ret scribo::preprocessing::denoise_bg ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
unsigned  min_card 
)

Denoise image background.

Parameters
[in]inputA binary image. True for objects, False for background.
[in]nbhNeighborhood to use for denoising.
[in]min_cardMinimum component cardinality to not be considered as noise.
Returns
A binary image with the same domain as input. All small components have been removed and merged with the background.
template<typename I , typename N >
mln::trait::concrete< I >::ret scribo::preprocessing::denoise_fg ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
unsigned  min_card 
)

Denoise image foreground.

Parameters
[in]inputA binary image. True for objects, False for background.
[in]nbhNeighborhood to use for denoising.
[in]min_cardMinimum component cardinality to not be considered as noise.
Returns
A binary image with the same domain as input. All small components have been removed and merged with the background.
template<typename I , typename J >
mln::trait::concrete< I >::ret scribo::preprocessing::deskew ( const Image< I > &  crop_gl,
const Image< I > &  input_gl 
)

Deskew a region of interest.

Parameters
[in]crop_glA gray-level image.
[in]input_glA gray-level image.
Returns
A deskewed binary image.

Handles skew angles from -25 to +25 degrees.

crop_gl and input_gl must be 2D images and must be identical (e.g. only the value differs).

This algorithm is designed for images created from a region of interest (e.g. Not a full document).

template<typename I >
mln::trait::concrete< I >::ret scribo::preprocessing::homogeneous_contrast ( const Image< I > &  input,
unsigned  h 
)

Improve contrast homogeneity in an image.

Parameters
[in]inputA gray-level image.
[in]hHeight attribute value for leveling closing.
Returns
A gray-level image with better contrast homogeneity.
template<typename I >
mln::trait::concrete< I >::ret scribo::preprocessing::homogeneous_contrast ( const Image< I > &  input)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.Default height attribute value is set to 75.

template<typename I >
mln::trait::concrete< I >::ret scribo::preprocessing::rotate_90 ( const Image< I > &  input,
bool  positive 
)

Perform a +90/-90 degree rotation.

Parameters
[in]inputAn image.
[in]positiveIf set to true, performs a +90 degree rotation, -90 degree otherwise.
Returns
A rotated image.
template<typename I >
mln::trait::concrete< I >::ret scribo::preprocessing::rotate_90 ( const Image< I > &  input)

Performs a +90 degree rotation.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<typename I >
mln::util::couple<typename mln::trait::concrete< I >::ret, typename mln::trait::concrete< I >::ret> scribo::preprocessing::split_bg_fg ( const Image< I > &  input,
unsigned  lambda,
unsigned  delta 
)

Split the background and the foreground.

Parameters
[in]inputA color image.
[in]lambdaLambda used for morphological closing/opening.
[in]deltaMax distance between values in closing and opening image.
Returns
A couple of color images. The first is the background and the second is the foreground.