Example #1
0
    def get_single_cell_feature_vector(self, neighbours=5):
        """Get the histogram of Local Binary Patterns over this entire
        image."""
        if hasattr(self, 'feature'):
            return

        pattern = LBP(self.image, neighbours=neighbours)
        self.feature = pattern.single_cell_features_vector()
Example #2
0
    def get_single_cell_feature_vector(self, neighbours=5):
        """Get the histogram of Local Binary Patterns over this entire
        image."""
        if hasattr(self, 'feature'):
            return

        pattern = LBP(self.image, neighbours=neighbours)
        self.feature = pattern.single_cell_features_vector()
Example #3
0
    def get_feature_vector(self, cell_size=None):
        """Get the concatenated histograms of Local Binary Patterns. """
        pattern = LBP(self.image) if cell_size == None \
                  else LBP(self.image, cell_size)

        return pattern.create_features_vector()
Example #4
0
#!/usr/bin/python
from GrayscaleImage import GrayscaleImage
from LocalBinaryPatternizer import LocalBinaryPatternizer

image = GrayscaleImage("../images/test.png")

lbp = LocalBinaryPatternizer(image)
histograms = lbp.create_features_vector()

print histograms
Example #5
0
    def get_feature_vector(self, cell_size=None):
        """Get the concatenated histograms of Local Binary Patterns. """
        pattern = LBP(self.image) if cell_size == None \
                  else LBP(self.image, cell_size)

        return pattern.create_features_vector()