$extrastylesheet
Olena  User documentation 2.1
An Image Processing Platform
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
Lines and Separators extraction

Functions

template<typename I >
mln::trait::concrete< I >::ret scribo::primitive::extract::horizontal_separators (const Image< I > &input, unsigned line_length)
template<typename I , typename N , typename V , typename W >
component_set< typename
mln::trait::ch_value< I, V >
::ret
scribo::primitive::extract::lines_discontinued (const Image< I > &input_, const Neighborhood< N > &nbh_, V &nlines, const Window< W > &win_, unsigned rank_k)
template<typename I , typename N , typename V >
component_set< typename
mln::trait::ch_value< I, V >
::ret
scribo::primitive::extract::lines_h_discontinued (const Image< I > &input, const Neighborhood< N > &nbh, V &nlines, unsigned line_length, unsigned rank_k)
template<typename I >
mln::trait::concrete< I >::ret scribo::primitive::extract::lines_h_pattern (const Image< I > &input, unsigned length, unsigned delta)
template<typename I , typename N , typename V >
component_set< typename
mln::trait::ch_value< I, V >
::ret
scribo::primitive::extract::lines_h_single (const Image< I > &input, const Neighborhood< N > &nbh, const V &nlines, unsigned min_line_length, float w_h_ratio)
template<typename L >
component_set< L > scribo::primitive::extract::lines_h_single (const component_set< L > &components, unsigned min_line_length, float w_h_ratio)
template<typename I , typename N , typename V >
component_set< typename
mln::trait::ch_value< I, V >
::ret
scribo::primitive::extract::lines_h_thick_and_single (const Image< I > &input, const Neighborhood< N > &nbh, V &nlines, unsigned min_line_length, float h_w_ratio)
template<typename I >
mln::trait::concrete< I >::ret scribo::primitive::extract::lines_h_thick_and_thin (const Image< I > &binary_image, unsigned length, unsigned delta, float p_few=0.2, float p_enough=0.6, float ratio=8)
template<typename I , typename W >
mln::trait::concrete< I >::ret scribo::primitive::extract::lines_pattern (const Image< I > &input_, unsigned length, unsigned dir, const Window< W > &win_)
template<typename I , typename N , typename V , typename W >
component_set< typename
mln::trait::ch_value< I, V >
::ret
scribo::primitive::extract::lines_thick (const Image< I > &input_, const Neighborhood< N > &nbh_, V &nlines, unsigned line_length)
template<typename I , typename N , typename V , typename W >
component_set< typename
mln::trait::ch_value< I, V >
::ret
scribo::primitive::extract::lines_thick (const Image< I > &input_, const Neighborhood< N > &nbh_, V &nlines, const Window< W > &win_)
template<typename I , typename N , typename V >
component_set< typename
mln::trait::ch_value< I, V >
::ret
scribo::primitive::extract::lines_v_discontinued (const Image< I > &input, const Neighborhood< N > &nbh, V &nlines, unsigned line_length, unsigned rank_k)
template<typename I >
mln::trait::concrete< I >::ret scribo::primitive::extract::lines_v_pattern (const Image< I > &input, unsigned length, unsigned delta)
template<typename I , typename N , typename V >
component_set< typename
mln::trait::ch_value< I, V >
::ret
scribo::primitive::extract::lines_v_single (const Image< I > &input, const Neighborhood< N > &nbh, const V &nlines, unsigned min_line_length, float h_w_ratio)
template<typename L >
component_set< L > scribo::primitive::extract::lines_v_single (const component_set< L > &components, unsigned min_line_length, float h_w_ratio)
template<typename I , typename N , typename V >
component_set< typename
mln::trait::ch_value< I, V >
::ret
scribo::primitive::extract::lines_v_thick_and_single (const Image< I > &input, const Neighborhood< N > &nbh, V &nlines, unsigned min_line_length, float h_w_ratio)
template<typename I >
mln::trait::concrete< I >::ret scribo::primitive::extract::separators (const Image< I > &input, unsigned line_length)
template<typename I >
mln::trait::concrete< I >::ret scribo::primitive::extract::separators_nonvisible (const Image< I > &in_)
template<typename I >
mln::trait::concrete< I >::ret scribo::primitive::extract::vertical_separators (const Image< I > &input, unsigned line_length)

Detailed Description

All routines/algorithms to extract lines and separators.

Function Documentation

template<typename I >
mln::trait::concrete< I >::ret scribo::primitive::extract::horizontal_separators ( const Image< I > &  input,
unsigned  line_length 
)

Extract horizontal separators.

Parameters
[in]inputA binary image.
[in]line_lengthThe minimum line length.
Returns
A binary image were separators are set to 'True'.
See Also
primitive::remove::separators
template<typename I , typename N , typename V , typename W >
component_set<typename mln::trait::ch_value< I , V >::ret> scribo::primitive::extract::lines_discontinued ( const Image< I > &  input_,
const Neighborhood< N > &  nbh_,
V &  nlines,
const Window< W > &  win_,
unsigned  rank_k 
)

Extract discontinued lines in a binary image.

Based on a rank filter.

Parameters
[in]input_A binary image.
[in]nbh_The neighborhood used for labeling image the lines.
[in,out]nlinesThe label type used for labeling.
[in]win_A Window used to extract lines.
[in]rank_kRank used for filtering.
Returns
An image in which lines are labeled.
Precondition
win.length() > 2 * (rank_k + 1)
template<typename I , typename N , typename V >
component_set<typename mln::trait::ch_value< I , V >::ret> scribo::primitive::extract::lines_h_discontinued ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
V &  nlines,
unsigned  line_length,
unsigned  rank_k 
)

Extract horizontal discontinued lines.

Parameters
[in]inputA binary image.
[in]nbhA neighborhood used to label lines.
[in,out]nlinesThe number of lines found.
[in]line_lengthThe minimum line length expected. (must be odd).
[in]rank_kRank filter parameter.
Returns
An image in which lines are labeled with a value different from 0.
template<typename I >
mln::trait::concrete< I >::ret scribo::primitive::extract::lines_h_pattern ( const Image< I > &  input,
unsigned  length,
unsigned  delta 
)

Extract horizontal lines matching a specific pattern.

Parameters
[in]inputA binary image.
[in]lengthThe minimum line length.
[in]deltaDistance between the object pixel and the background pixel.
Returns
An image of horizontal lines.
 o
 |     ^
 |     |  Delta
 |     v
 X
 |     ^
 |     |  Delta
 |     v
 o

Using a delta of 0 is equivalent to the use of a c2_row neighborhood.

template<typename I , typename N , typename V >
component_set<typename mln::trait::ch_value< I , V >::ret> scribo::primitive::extract::lines_h_single ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
const V &  nlines,
unsigned  min_line_length,
float  w_h_ratio 
)

Fast Extraction of single horizontal thick lines.

Only single non discontinued lines are correctly extracted with this routine.

Parameters
[in]inputA binary image.
[in]nbhThe neighborhood used for labeling image components.
[in,out]nlinesType used for labeling.
[in]min_line_lengthThe minimum line length.
[in]w_h_ratioThe minimum ratio width/height object bounding boxes to consider an object as a single line.
Returns
An image in which only horizontal single lines are labeled.
template<typename L >
component_set<L> scribo::primitive::extract::lines_h_single ( const component_set< L > &  components,
unsigned  min_line_length,
float  w_h_ratio 
)

Fast Extraction of single horizontal thick lines.

Only single non discontinued lines are correctly extracted with this routine.

Parameters
[in]componentsA labeled image.
[in]min_line_lengthThe minimum line length.
[in]w_h_ratioThe minimum ratio width/height object bounding boxes to consider an object as a single line.
Returns
An image in which only horizontal single lines are labeled.
template<typename I , typename N , typename V >
component_set<typename mln::trait::ch_value< I , V >::ret> scribo::primitive::extract::lines_h_thick_and_single ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
V &  nlines,
unsigned  min_line_length,
float  h_w_ratio 
)

Extract horizontal thick lines in a binary image.

Only non discontinued lines are correctly extracted with this routine. Only lines matching the given criterions are kept in the result.

Parameters
[in]inputA binary image.
[in]nbhThe neighborhood used for labeling image components.
[in,out]nlinesType used for labeling.
[in]min_line_lengthThe minimum line length.
[in]h_w_ratioThe minimum ratio width/height object bounding boxes to consider an object as a single line.
Returns
An image in which lines are labeled.
template<typename I >
mln::trait::concrete< I >::ret scribo::primitive::extract::lines_h_thick_and_thin ( const Image< I > &  binary_image,
unsigned  length,
unsigned  delta,
float  p_few = 0.2,
float  p_enough = 0.6,
float  ratio = 8 
)

Extract both thick and thin horizontal lines.

template<typename I , typename W >
mln::trait::concrete< I >::ret scribo::primitive::extract::lines_pattern ( const Image< I > &  input_,
unsigned  length,
unsigned  dir,
const Window< W > &  win_ 
)

Extract lines with a specific pattern.

Parameters
[in]input_A binary image.
[in]lengthThe minimum line length.
[in]dirThe direction of the lines.
[in]win_A window corresponding to the line pattern.
Returns
A image with lines of direction dir.
template<typename I , typename N , typename V , typename W >
component_set< typename mln::trait::ch_value< I, V >::ret > scribo::primitive::extract::lines_thick ( const Image< I > &  input_,
const Neighborhood< N > &  nbh_,
V &  nlines,
unsigned  line_length 
)

Extract thick lines in a binary image.

Only non discontinued lines are correctly extracted with this routine.

Parameters
[in]input_A binary image.
[in]nbh_The neighborhood used for labeling image components.
[in,out]nlinesType used for labeling.
[in]line_lengthThe minimum line length.
Returns
An image in which lines are labeled.
template<typename I , typename N , typename V , typename W >
component_set<typename mln::trait::ch_value< I , V >::ret> scribo::primitive::extract::lines_thick ( const Image< I > &  input_,
const Neighborhood< N > &  nbh_,
V &  nlines,
const Window< W > &  win_ 
)

Extract thick lines in a binary image. Only non discontinued lines are correctly extracted with this routine.

Parameters
[in]input_A binary image.
[in]nbh_The neighborhood used for labeling image components.
[in,out]nlinesType used for labeling.
[in]win_Window used to extract the lines
Returns
An image in which lines are labeled.
template<typename I , typename N , typename V >
component_set<typename mln::trait::ch_value< I , V >::ret> scribo::primitive::extract::lines_v_discontinued ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
V &  nlines,
unsigned  line_length,
unsigned  rank_k 
)

Extract vertical discontinued lines.

Parameters
[in]inputA binary image.
[in]nbhA neighborhood used to label lines.
[in,out]nlinesThe number of lines found.
[in]line_lengthThe minimum line length expected. (must be odd).
[in]rank_kRank filter parameter.
Returns
An image in which lines are labeled with a value different from 0.
template<typename I >
mln::trait::concrete< I >::ret scribo::primitive::extract::lines_v_pattern ( const Image< I > &  input,
unsigned  length,
unsigned  delta 
)

Extract vertical lines matching a specific pattern.

Parameters
[in]inputA binary image.
[in]lengthThe minimum line length.
[in]deltaspace between the first background pixels and the line pixels (usually 2 or 3).
Returns
An image of vertical lines.
template<typename I , typename N , typename V >
component_set<typename mln::trait::ch_value< I , V >::ret> scribo::primitive::extract::lines_v_single ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
const V &  nlines,
unsigned  min_line_length,
float  h_w_ratio 
)

Fast Extraction of single vertical thick lines.

Only single non discontinued lines are correctly extracted with this routine.

Parameters
[in]inputA binary image.
[in]nbhThe neighborhood used for labeling image components.
[in]nlinesType used for labeling.
[in]min_line_lengthThe minimum line length.
[in]h_w_ratioThe minimum ratio height/width object bounding boxes to consider an object as a single line.
Returns
An image in which only vertical single lines are labeled.
template<typename L >
component_set<L> scribo::primitive::extract::lines_v_single ( const component_set< L > &  components,
unsigned  min_line_length,
float  h_w_ratio 
)

Fast Extraction of single vertical thick lines.

Only single non discontinued lines are correctly extracted with this routine.

Parameters
[in]componentsA labeled image.
[in]min_line_lengthThe minimum line length.
[in]h_w_ratioThe minimum ratio height/width object bounding boxes to consider an object as a single line.
Returns
An image in which only vertical single lines are labeled.
template<typename I , typename N , typename V >
component_set<typename mln::trait::ch_value< I , V >::ret> scribo::primitive::extract::lines_v_thick_and_single ( const Image< I > &  input,
const Neighborhood< N > &  nbh,
V &  nlines,
unsigned  min_line_length,
float  h_w_ratio 
)

Extract vertical thick lines in a binary image.

Only non discontinued lines are correctly extracted with this routine. Only lines matching the given criterions are kept in the result.

Parameters
[in]inputA binary image.
[in]nbhThe neighborhood used for labeling image components.
[in,out]nlinesType used for labeling.
[in]min_line_lengthThe minimum line length.
[in]h_w_ratioThe minimum ratio height/width object bounding boxes to consider an object as a single line.
Returns
An image in which lines are labeled.
template<typename I >
mln::trait::concrete< I >::ret scribo::primitive::extract::separators ( const Image< I > &  input,
unsigned  line_length 
)

Extract vertical and horizontal separators.

Parameters
[in]inputA binary image.
[in]line_lengthThe minimum line length.
Returns
A binary image were separators are set to 'True'.
See Also
primitive::remove::separators
template<typename I >
mln::trait::concrete< I >::ret scribo::primitive::extract::separators_nonvisible ( const Image< I > &  in_)

Find non visible separators. Based on components alignments.

template<typename I >
mln::trait::concrete< I >::ret scribo::primitive::extract::vertical_separators ( const Image< I > &  input,
unsigned  line_length 
)

Extract vertical separators.

Parameters
[in]inputA binary image.
[in]line_lengthThe minimum line length.
Returns
A binary image were separators are set to 'True'.
See Also
primitive::remove::separators