datahandler.py
def extract_features(self, image_analyser, hog_features=True, spatial=True,
                         histograms=True):
        """Extracts image features from all elements in the data set."""
        self.training_set_features = {}
        for label, images in self.training_set.items():
            start = time.time()
            self.training_set_features[label] = []
            for image in images:
                image_analyser(image)
                features = image_analyser.get_image_features(window=((0, 0), (8, 8)),
                                                    hog_features=hog_features,
                                                    spatial=spatial,
                                                    histograms=histograms)
                self.training_set_features[label].append(features)
            end = time.time()
            print('Extracted feature vectors from images labelled as ' \
                + label + ' in', end - start, 'sec.')
Extracts image features from all elements in the data set.
Extracts image features from all elements in the data set.
Extracts image features from all elements in the data set .
def extract_features(self, image_analyser, hog_features=True, spatial=True,
                         histograms=True):
        self.training_set_features = {}
        for label, images in self.training_set.items():
            start = time.time()
            self.training_set_features[label] = []
            for image in images:
                image_analyser(image)
                features = image_analyser.get_image_features(window=((0, 0), (8, 8)),
                                                    hog_features=hog_features,
                                                    spatial=spatial,
                                                    histograms=histograms)
                self.training_set_features[label].append(features)
            end = time.time()
            print('Extracted feature vectors from images labelled as ' \
                + label + ' in', end - start, 'sec.')
def extract_features ( self , image_analyser , hog_features = True , spatial = True , histograms = True ) : self . training_set_features = { } for label , images in self . training_set . items ( ) : start = time . time ( ) self . training_set_features [ label ] = [ ] for image in images : image_analyser ( image ) features = image_analyser . get_image_features ( window = ( ( 0 , 0 ) , ( 8 , 8 ) ) , hog_features = hog_features , spatial = spatial , histograms = histograms ) self . training_set_features [ label ] . append ( features ) end = time . time ( ) print ( 'Extracted feature vectors from images labelled as ' + label + ' in' , end - start , 'sec.' )
Extracts image features from all elements in the data set.
Extracts image features from all elements in the data set .
"""Extracts image features from all elements in the data set."""
self
image_analyser
hog_features
spatial
histograms