extrema Namespace Reference

Classes

struct  BoundaryExtrema
 Old interface structure that holds result of getBoundaryExtrema. More...
 
struct  BoundaryPoint
 A structure that holds coordinates of a point in BoundaryRegion i.e. the boundary representation of a region. More...
 
struct  BoundaryRegion
 Description of a boundary region. More...
 
class  CPreprocess
 
class  CPreprocessRGBPlanes
 
class  CPreprocessRGBSeq
 
struct  ExtremaImage
 A structure holding image parameters. More...
 
struct  ExtremaParams
 A structure with MSER detector parameters. More...
 
struct  ExtremaStats
 Timing statistics of the detector, gathered only if TIME_STATS is set. More...
 
struct  Region
 A structure with common statistics of BoundaryRegion and RLERegion. More...
 
struct  RLEExtrema
 Old interface structure that holds result of getRLEExtrema. More...
 
struct  RLEItem
 A structure that holds coordinates of a RLE element in RLERegion i.e. the RLE representation of a region. More...
 
struct  RLERegion
 Description of a RLE region. More...
 
struct  s_borderpixel
 Structure with pixel of the extended boundary. More...
 
struct  s_region
 Internal region structure. More...
 
struct  s_region_equiv
 Internal structure with a node of the label equivalency tree. More...
 
struct  s_sortpixels
 Internal structure with intensity histogram. More...
 
struct  s_suballocator
 Internal structure with suballocator's data. More...
 
struct  s_thresh_def
 Internal structure holding threshold paramaters. More...
 
struct  s_thresh_par
 Internal structure with processed detector's parameters. More...
 
struct  t_ipoint
 Internal structure, holds 2D point coordinates. More...
 

Typedefs

typedef unsigned int t_label
 
typedef struct extrema::s_sortpixels t_sortpixels
 Internal structure with intensity histogram. More...
 
typedef unsigned int t_mregion
 
typedef struct extrema::s_region t_region
 Internal region structure. More...
 
typedef struct extrema::s_region_equiv t_region_equiv
 Internal structure with a node of the label equivalency tree. More...
 
typedef struct extrema::s_thresh_par t_thresh_par
 Internal structure with processed detector's parameters. More...
 
typedef struct extrema::s_borderpixel t_borderpixel
 Structure with pixel of the extended boundary. More...
 
typedef std::vector< t_borderpixelpoint_vector
 Vector with extended boundary. More...
 
typedef struct extrema::s_thresh_def t_thresh_def
 Internal structure holding threshold paramaters. More...
 
typedef struct extrema::s_suballocator t_suballocator
 Internal structure with suballocator's data. More...
 

Enumerations

enum  EXTREMA_PREPROCESS {
  PREPROCESS_CHANNEL_none = 0x00000000,
  PREPROCESS_CHANNEL_intensity = 0x00000001,
  PREPROCESS_CHANNEL_saturation = 0x00000002,
  PREPROCESS_CHANNEL_hue = 0x00000003,
  PREPROCESS_CHANNEL_redblue = 0x00000004,
  PREPROCESS_CHANNEL_red = 0x00000005,
  PREPROCESS_CHANNEL_green = 0x00000006,
  PREPROCESS_CHANNEL_blue = 0x00000007,
  PREPROCESS_CHANNEL_greenmagenta = 0x00000008,
  PREPROCESS_CHANNEL_intensity_half = 0x00000009,
  PREPROCESS_CHANNEL_MASK = 0x0000ffff,
  PREPROCESS_INTENSITY_none = 0x00000000,
  PREPROCESS_INTENSITY_MASK = 0xffff0000
}
 An enumeration that encodes different preprocessings of an image. More...
 

Functions

void RegionBoundaries (utls::BAry *img, t_LL regions)
 
void InitRegionRecycling ()
 
void DestRegionRecycling ()
 
t_LL GetExtrema (utls::BAry *img, t_sortpixels pixels, const ExtremaParams &par, bool invert)
 
void DestRegions (t_LL regions)
 
BoundaryExtrema getBoundaryExtrema (const ExtremaParams &params, const ExtremaImage &image, int both=3)
 Old interface function, produces BoundaryRegions for a given image. Computes MSERs: both=1 +, both = 2 -, or both = 3 + and -. More...
 
RLEExtrema getRLEExtrema (const ExtremaParams &par, const ExtremaImage &image, int both=3)
 Old interface function, produces RLERegions for a given image. Computes MSERs: both=1 +, both = 2 -, or both = 3 + and -. More...
 
void extremaPrepareImage (const ExtremaParams &params, const ExtremaImage &image)
 Prepares image for detection of MSER regions. More...
 
void extremaAttachImage (const ExtremaParams &params, utls::BAry *image)
 Assigns already prepared image for detection of MSER regions. More...
 
void extremaInvertImage ()
 Inverts image in internal structure. More...
 
void extremaBoundaryRegions (const ExtremaParams &params, bool inverted, vector< BoundaryRegion > &result)
 Detects MSERs inverted or not inverted image. More...
 
void extremaBoundaryEllRegions (const ExtremaParams &params, bool inverted, vector< BoundaryRegion > &result)
 Detects MSERs inverted or not inverted image and computes centroids and second moments of each region. More...
 
void extremaRLERegions (const ExtremaParams &params, bool inverted, vector< RLERegion > &result)
 Detects MSERs inverted or not inverted image and computes centroids and second moments of each region. More...
 
void extremaCleanup (bool detach_only=false)
 Cleans up internal image structure. More...
 
const ExtremaStatsextremaStats ()
 Returns timing statistics. More...
 
void exportRLEVector (FILE *fid, vector< RLERegion > &rle_vector)
 
void exportBoundaryVector (FILE *fid, vector< BoundaryRegion > &boundary_vector)
 
void exportBoundaryVectorGF (FILE *fid, vector< BoundaryRegion > &boundary_vector)
 
void exportAffVector (FILE *fid, vector< RLERegion > &rle_vector, double factor, int krys_compat)
 
void RLE2Ellipse (const vector< RLEItem > &rle, double &barX, double &barY, double &sumX2, double &sumXY, double &sumY2)
 
void ReducedBoundary2RLE (vector< BoundaryPoint > &reduced_boundary, vector< RLEItem > &rle)
 
void FastSetOptThresholds4StableRegion (t_region *p_r)
 
void CalcHistogram (utls::BAry *&img, t_sortpixels &pixels)
 
void BinSortPixels (utls::BAry *&img, t_sortpixels &pixels)
 
void InvertImageAndHistogram (utls::BAry *img, t_sortpixels &pixels)
 
void InitSuballocator (t_suballocator *s, size_t blocksize, size_t itemsize, int clear_blocks=0)
 
void DestSuballocator (t_suballocator *s)
 
void SuballocatorAddBlock (t_suballocator *s)
 

Variables

t_thresh_par g_thresh_params
 

Typedef Documentation

typedef std::vector<t_borderpixel> extrema::point_vector

Vector with extended boundary.

Structure with pixel of the extended boundary.

typedef unsigned int extrema::t_label
typedef unsigned int extrema::t_mregion

Internal region structure.

Internal structure with a node of the label equivalency tree.

Internal structure with intensity histogram.

Internal structure with suballocator's data.

Internal structure holding threshold paramaters.

Internal structure with processed detector's parameters.

Enumeration Type Documentation

An enumeration that encodes different preprocessings of an image.

Enumerator
PREPROCESS_CHANNEL_none 
PREPROCESS_CHANNEL_intensity 
PREPROCESS_CHANNEL_saturation 
PREPROCESS_CHANNEL_hue 
PREPROCESS_CHANNEL_redblue 
PREPROCESS_CHANNEL_red 
PREPROCESS_CHANNEL_green 
PREPROCESS_CHANNEL_blue 
PREPROCESS_CHANNEL_greenmagenta 
PREPROCESS_CHANNEL_intensity_half 
PREPROCESS_CHANNEL_MASK 
PREPROCESS_INTENSITY_none 
PREPROCESS_INTENSITY_MASK 

Function Documentation

void extrema::BinSortPixels ( utls::BAry *&  img,
t_sortpixels pixels 
)
void extrema::CalcHistogram ( utls::BAry *&  img,
t_sortpixels pixels 
)
void extrema::DestRegionRecycling ( )
void extrema::DestRegions ( t_LL  regions)
void extrema::DestSuballocator ( t_suballocator s)
void extrema::exportAffVector ( FILE *  fid,
vector< RLERegion > &  rle_vector,
double  factor,
int  krys_compat 
)
void extrema::exportBoundaryVector ( FILE *  fid,
vector< BoundaryRegion > &  boundary_vector 
)
void extrema::exportBoundaryVectorGF ( FILE *  fid,
vector< BoundaryRegion > &  boundary_vector 
)
void extrema::exportRLEVector ( FILE *  fid,
vector< RLERegion > &  rle_vector 
)
void extrema::extremaAttachImage ( const ExtremaParams params,
utls::BAry image 
)

Assigns already prepared image for detection of MSER regions.

Parameters
paramsa structure ExtremaParams with detector parameters.
imagea structure utls::BAry (byte image) with image, please note image boundaries should be extended by one pixel, i.e. for an image of size width x height one should use constructor BAry(-1,-1,width,height), that results in array of width+2 x height+2 elements.
See also
utls::BAry, ExtremaParams.
void extrema::extremaBoundaryEllRegions ( const ExtremaParams params,
bool  inverted,
vector< BoundaryRegion > &  result 
)

Detects MSERs inverted or not inverted image and computes centroids and second moments of each region.

Parameters
paramsa structure ExtremaParams with detector parameters.
inverteda boolean that signalise if internal image structure was or was not inverted.
resulta vector of BoundaryRegion structures containing regions.
See also
BoundaryRegion, ExtremaParams
void extrema::extremaBoundaryRegions ( const ExtremaParams params,
bool  inverted,
vector< BoundaryRegion > &  result 
)

Detects MSERs inverted or not inverted image.

Parameters
paramsa structure ExtremaParams with detector parameters.
inverteda boolean that signalise if internal image structure was or was not inverted.
resulta vector of BoundaryRegion structures containing regions.
Note
This function does not compute and thus fill values of centroid and second moments in Region structure.
See also
BoundaryRegion, ExtremaParams
void extrema::extremaCleanup ( bool  detach_only = false)

Cleans up internal image structure.

Parameters
detach_onlya boolean that specifies if the image is deallocated (false) or not.
void extrema::extremaInvertImage ( )

Inverts image in internal structure.

void extrema::extremaPrepareImage ( const ExtremaParams params,
const ExtremaImage image 
)

Prepares image for detection of MSER regions.

Parameters
paramsa structure ExtremaPars with detector parameters.
imagea structure ExtremaImage with image data.

Preparation involves preprocessing i.e. performs demanded preprocess operation given by ExtremaParams.preprocess. Image is copied into internal structure and it's boundary is extended by one pixel.

See also
EXTREMA_PREPROCESS, ExtremaParams.
void extrema::extremaRLERegions ( const ExtremaParams params,
bool  inverted,
vector< RLERegion > &  result 
)

Detects MSERs inverted or not inverted image and computes centroids and second moments of each region.

Parameters
paramsa structure ExtremaParams with detector parameters.
inverteda boolean that signalise if internal image structure was or was not inverted.
resulta vector of RLERegion structures containing regions.
See also
RLERegion, ExtremaParams
const ExtremaStats& extrema::extremaStats ( )

Returns timing statistics.

Return values
Astructure ExtremaStats.
void extrema::FastSetOptThresholds4StableRegion ( t_region p_r)
BoundaryExtrema extrema::getBoundaryExtrema ( const ExtremaParams params,
const ExtremaImage image,
int  both = 3 
)

Old interface function, produces BoundaryRegions for a given image. Computes MSERs: both=1 +, both = 2 -, or both = 3 + and -.

t_LL extrema::GetExtrema ( utls::BAry img,
t_sortpixels  pixels,
const ExtremaParams par,
bool  invert 
)
RLEExtrema extrema::getRLEExtrema ( const ExtremaParams par,
const ExtremaImage image,
int  both = 3 
)

Old interface function, produces RLERegions for a given image. Computes MSERs: both=1 +, both = 2 -, or both = 3 + and -.

void extrema::InitRegionRecycling ( )
void extrema::InitSuballocator ( t_suballocator s,
size_t  blocksize,
size_t  itemsize,
int  clear_blocks = 0 
)
void extrema::InvertImageAndHistogram ( utls::BAry img,
t_sortpixels pixels 
)
void extrema::ReducedBoundary2RLE ( vector< BoundaryPoint > &  reduced_boundary,
vector< RLEItem > &  rle 
)
void extrema::RegionBoundaries ( utls::BAry img,
t_LL  regions 
)
void extrema::RLE2Ellipse ( const vector< RLEItem > &  rle,
double &  barX,
double &  barY,
double &  sumX2,
double &  sumXY,
double &  sumY2 
)
void extrema::SuballocatorAddBlock ( t_suballocator s)

Variable Documentation

t_thresh_par extrema::g_thresh_params