X-Boost  2.3.8
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ObjectDetectorWrapperBase< _Preprocessor, _Instance > Class Template Reference

some common method that can be used to inner detector More...

#include <ClassifierDetectorHelper.h>

Inherits _Preprocessor.

Public Types

typedef _Preprocessor::ReturnType data_type
 

Public Member Functions

 ObjectDetectorWrapperBase (std::istream &in)
 
void setParams (const ObjectDetectorGlobalParams &params)
 
const ObjectDetectorGlobalParamsgetParams () const
 
void setClassifierParams (int index, const ObjectDetectorParams &params)
 set per-classifier params
 
const ObjectDetectorParamsgetClassifierParams (int index)
 get per-classifier params
 
bool require_a_mask (int n) const
 
void prepare_mask (int cl_index, float s, unsigned char *mask, unsigned int r_width, unsigned int r_height, int cl_width, int cl_height, rect &roi)
 
void get_ranges (std::vector< std::pair< int, int > > &searchRanges, std::vector< rect > &roi, int n, float s) const
 convert the internal ranges of the classifier of index n
 
void precompute_scales (std::vector< data_type > &preprocess_images, double scale_factor)
 compute scaled preprocessor, without using m_img resampler! More...
 
void precompute_scales_octaves (std::vector< data_type > &preprocess_images, double scale_factor, int k_max)
 calcola sia le scale che le ottave
 

Static Public Member Functions

static void compute_response (const _Instance &inst, const data_type &data, double *response, int stride, const rect &roi, int nThread)
 
static void compute_masked_response (const _Instance &inst, const data_type &data, double *response, int stride, const rect &roi, const unsigned char *mask, int nThread)
 
template<class T >
static void dump_response_image (const T *src, unsigned int w, unsigned int h, const char *filename)
 

Public Attributes

std::vector< _Instance > m_classifs
 a vector of classifier instance
 
std::vector< ObjectDetectorParamsm_clsparams
 per classifier params
 
ObjectDetectorGlobalParams m_params
 

Detailed Description

template<class _Preprocessor, class _Instance>
class ObjectDetectorWrapperBase< _Preprocessor, _Instance >

some common method that can be used to inner detector

Member Function Documentation

template<class _Preprocessor, class _Instance>
static void ObjectDetectorWrapperBase< _Preprocessor, _Instance >::compute_response ( const _Instance &  inst,
const data_type &  data,
double *  response,
int  stride,
const rect roi,
int  nThread 
)
inlinestatic

compute_response compute the response image using the instance object on a rectangular ROI TODO: valutare se calcolare contemporanemnete piu' response image. TODO: response image in float? TODO: search ranges and ROI

Parameters
instan instance to execute
dataa preprocessor data
responseresponse to generate
strideresponse stride
roia ROI TODO: octave/step TODO: move outside
template<class _Preprocessor, class _Instance>
void ObjectDetectorWrapperBase< _Preprocessor, _Instance >::precompute_scales ( std::vector< data_type > &  preprocess_images,
double  scale_factor 
)
inline

compute scaled preprocessor, without using m_img resampler!

compute scaled preprocessor le scale vengono valutate in parallelo TODO: do not rescale scale=1.0compute scaled preprocessor le scale vengono valutate in parallelo compute scaled preprocessor Ogni thread gestisce una scala

template<class _Preprocessor, class _Instance>
void ObjectDetectorWrapperBase< _Preprocessor, _Instance >::prepare_mask ( int  cl_index,
float  s,
unsigned char *  mask,
unsigned int  r_width,
unsigned int  r_height,
int  cl_width,
int  cl_height,
rect roi 
)
inline

this method convert a search ranges and the roi of classifier cl_index in a bitmask

Parameters
outan output ROI that contains the mask
template<class _Preprocessor, class _Instance>
bool ObjectDetectorWrapperBase< _Preprocessor, _Instance >::require_a_mask ( int  n) const
inline

test if the classifier index n need a mask to be processed. a classifier requires a mask when it has on the parameters the search ranges o ROIs.


The documentation for this class was generated from the following file: