17 #define LIBLBP_INDEX(ROW,COL,NUM_ROWS) ((COL)*(NUM_ROWS)+(ROW))
29 init(image_set, image_w, image_h);
118 uint32_t* img =
get_image(index, ww, hh);
123 for (int32_t x=1; x<ww-1; x++)
125 for (int32_t y=1; y<hh-1; y++)
128 vec[offset+pattern]++;
142 for (int32_t x=0; x<ww; x++)
143 for (int32_t j=0; j<hh; j++)
148 for (int32_t y=0; y<hh; y++)
149 for (int32_t j=0; j<ww; j++)
164 img = SG_MALLOC(uint32_t, len);
165 memcpy(img, image, len *
sizeof(uint32_t));
175 SG_ERROR(
"Dimensions don't match, vec2_dim=%d, vec_nDim=%d\n", vec2_len,
vec_nDim)
179 uint32_t* img =
get_image(vec_idx1, ww, hh);
185 for (int32_t x=1; x<ww-1; x++)
187 for (int32_t y=1; y<hh-1; y++)
190 dot_prod += vec2[offset+pattern];
204 for (int32_t x=0; x<ww; x++)
205 for (int32_t j=0; j<hh; j++)
210 for (int32_t y=0; y<hh; y++)
211 for (int32_t j=0; j<ww; j++)
223 SG_ERROR(
"Dimensions don't match, vec2_dim=%d, vec_nDim=%d\n", vec2_len,
vec_nDim)
227 uint32_t* img =
get_image(vec_idx1, ww, hh);
236 for (int32_t x=1; x<ww-1; x++)
238 for (int32_t y=1; y<hh-1; y++)
241 vec2[offset+pattern] += alpha;
255 for (int32_t x=0; x<ww; x++)
256 for (int32_t j=0; j<hh; j++)
261 for (int32_t y=0; y<hh; y++)
262 for (int32_t j=0; j<ww; j++)
305 for (uint32_t i=0; (i<nPyramids) && (CMath::min(w,h)>=3); i++)
virtual const char * get_name() const =0
SGVector< char > get_transformed_image(int32_t index)
virtual EFeatureClass get_feature_class() const
static void fill_vector(T *vec, int32_t len, T value)
#define LIBLBP_INDEX(ROW, COL, NUM_ROWS)
ST * get_feature_vector(int32_t num, int32_t &len, bool &dofree)
virtual float64_t dot(int32_t vec_idx1, CDotFeatures *df, int32_t vec_idx2)
uint8_t create_lbp_pattern(uint32_t *img, int32_t x, int32_t y)
virtual int32_t get_num_vectors() const
#define SG_NOTIMPLEMENTED
virtual void free_feature_iterator(void *iterator)
Features that support dot products among other operations.
EFeatureClass
shogun feature class
virtual bool get_next_feature(int32_t &index, float64_t &value, void *iterator)
Class SGObject is the base class of all shogun objects.
virtual int32_t get_num_vectors() const
virtual EFeatureType get_feature_type() const
virtual int32_t get_dim_feature_space() const
virtual const char * get_name() const
CFeatures * duplicate() const
uint32_t * get_image(int32_t index, int32_t &width, int32_t &height)
virtual void add_to_dense_vec(float64_t alpha, int32_t vec_idx1, float64_t *vec2, int32_t vec2_len, bool abs_val=false)
static float64_t dot(const bool *v1, const bool *v2, int32_t n)
Compute dot product between v1 and v2 (blas optimized)
EFeatureType
shogun feature type
virtual void * get_feature_iterator(int32_t vector_index)
all of classes and functions are contained in the shogun namespace
void free_feature_vector(ST *feat_vec, int32_t num, bool dofree)
virtual ~CLBPPyrDotFeatures()
The class Features is the base class of all feature objects.
CDenseFeatures< uint32_t > * images
virtual float64_t dense_dot(int32_t vec_idx1, const float64_t *vec2, int32_t vec2_len)
uint32_t liblbp_pyr_get_dim(uint16_t nPyramids)
Implements Local Binary Patterns with Scale Pyramids as dot features for a set of images...
virtual int32_t get_nnz_features_for_vector(int32_t num)