-
Notifications
You must be signed in to change notification settings - Fork 0
/
lbp.h
48 lines (39 loc) · 1.22 KB
/
lbp.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/** @file lbp.h
** @brief Local Binary Patterns
** @author Andrea Vedaldi
**/
/*
Copyright (C) 2007-12 Andrea Vedaldi and Brian Fulkerson.
All rights reserved.
This file is part of the VLFeat library and is made available under
the terms of the BSD license (see the COPYING file).
*/
#ifndef H_LBP
#define H_LBP
#include "Public.h"
/** @brief Type of quantization for LBP features */
typedef enum _VlLbpMappingType
{
VlLbpUniform /**< Uniform patterns */
} VlLbpMappingType ;
/** @brief Local Binary Pattern extractor */
typedef struct VlLbp_
{
int dimension ;
int mapping [256] ;
bool transposed ;
} VlLbp ;
VlLbp * vl_lbp_new(VlLbpMappingType type, bool transposed) ;
void vl_lbp_delete(VlLbp * self) ;
void vl_lbp_process (VlLbp * self,
float * features,
float * image, int width, int height,
int cellSize) ;
vectorf CalLBP(const Mat& im, int cellSize);
/** @brief Get the dimension of the LBP histograms
** @return dimension of the LBP histograms.
** The dimension depends on the type of quantization used.
** @see ::vl_lbp_new().
**/
int vl_lbp_get_dimension(VlLbp * self);
#endif