Darwin  1.10(beta)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Groups Pages
drwnLBPFilterBank.h
1 /*****************************************************************************
2 ** DARWIN: A FRAMEWORK FOR MACHINE LEARNING RESEARCH AND DEVELOPMENT
3 ** Distributed under the terms of the BSD license (see the LICENSE file)
4 ** Copyright (c) 2007-2015, Stephen Gould
5 ** All rights reserved.
6 **
7 ******************************************************************************
8 ** FILENAME: drwnLBPFilterBank.h
9 ** AUTHOR(S): Stephen Gould <stephen.gould@anu.edu.au>
10 **
11 *****************************************************************************/
12 
13 #pragma once
14 
15 #include <vector>
16 
17 #include "cv.h"
18 
19 #include "drwnSuperpixelContainer.h"
20 
21 // drwnLBPFilterBank --------------------------------------------------------
22 
29 
31  protected:
33 
35  public:
37  drwnLBPFilterBank(bool b8Neighbourbood = false);
38  virtual ~drwnLBPFilterBank();
39 
41  size_t numFilters() const { return _b8Neighbourhood ? 8 : 4; }
42 
46  void filter(const cv::Mat& img, std::vector<cv::Mat>& response) const;
47 
51  void regionFeatures(const cv::Mat& regions, const std::vector<cv::Mat>& response,
52  vector<vector<double> >& features);
53 
57  void regionFeatures(const drwnSuperpixelContainer& regions,
58  const std::vector<cv::Mat>& response, vector<vector<double> >& features);
59 };
drwnLBPFilterBank(bool b8Neighbourbood=false)
construct an LBP filterbank
Definition: drwnLBPFilterBank.cpp:23
void filter(const cv::Mat &img, std::vector< cv::Mat > &response) const
Filtering function. The caller must provide a vector of CV32F destination matrices (or empty)...
Definition: drwnLBPFilterBank.cpp:34
Implements filter bank for encoding local binary patterns.
Definition: drwnLBPFilterBank.h:30
size_t numFilters() const
returns the number of response channels
Definition: drwnLBPFilterBank.h:41
Holds multiple oversegmentations for a given image.
Definition: drwnSuperpixelContainer.h:91
bool _b8Neighbourhood
true of 8-connected neighbourhood, otherwise < a 4-connected is used
Definition: drwnLBPFilterBank.h:32
void regionFeatures(const cv::Mat &regions, const std::vector< cv::Mat > &response, vector< vector< double > > &features)
Compute LBP histograms over given superpixel regions. The response input comes from running the filte...
Definition: drwnLBPFilterBank.cpp:86