14 using namespace shogun;
16 #define LIBLBP_INDEX(ROW,COL,NUM_ROWS) ((COL)*(NUM_ROWS)+(ROW))
28 init(image_set, image_w, image_h);
117 uint32_t* img =
get_image(index, ww, hh);
122 for (int32_t x=1; x<ww-1; x++)
124 for (int32_t y=1; y<hh-1; y++)
127 vec[offset+pattern]++;
141 for (int32_t x=0; x<ww; x++)
142 for (int32_t j=0; j<hh; j++)
147 for (int32_t y=0; y<hh; y++)
148 for (int32_t j=0; j<ww; j++)
163 img = SG_MALLOC(uint32_t, len);
164 memcpy(img, image, len *
sizeof(uint32_t));
174 SG_ERROR(
"Dimensions don't match, vec2_dim=%d, vec_nDim=%d\n", vec2_len,
vec_nDim)
178 uint32_t* img =
get_image(vec_idx1, ww, hh);
184 for (int32_t x=1; x<ww-1; x++)
186 for (int32_t y=1; y<hh-1; y++)
189 dot_prod += vec2[offset+pattern];
203 for (int32_t x=0; x<ww; x++)
204 for (int32_t j=0; j<hh; j++)
209 for (int32_t y=0; y<hh; y++)
210 for (int32_t j=0; j<ww; j++)
222 SG_ERROR(
"Dimensions don't match, vec2_dim=%d, vec_nDim=%d\n", vec2_len,
vec_nDim)
226 uint32_t* img =
get_image(vec_idx1, ww, hh);
235 for (int32_t x=1; x<ww-1; x++)
237 for (int32_t y=1; y<hh-1; y++)
240 vec2[offset+pattern] += alpha;
254 for (int32_t x=0; x<ww; x++)
255 for (int32_t j=0; j<hh; j++)
260 for (int32_t y=0; y<hh; y++)
261 for (int32_t j=0; j<ww; j++)
304 for (uint32_t i=0; (i<nPyramids) && (CMath::min(w,h)>=3); i++)