there are few other feature sets implemented in mahotas linear binary patterns is another texture-based feature set that is very robust against illumination changes there are other types of featuresincluding local featuresthat we will discuss later in this features are not just for classification the feature-based approach of reducing million pixel image can also be applied in other machine learning contextssuch as clusteringregressionor dimensionality reduction by computing few hundred features and then running dimensionality reduction algorithm on the resultyou will be able to go from an object with million pixel values to few dimensionseven to two-dimensions as you build visualization tool with these featureswe use standard classification method such as support vector machinesimages glob('simple-dataset/jpg'features [labels [for im in imagesfeatures append(mh features haralick(immean( )labels append(im[:-len(' jpg')]features np array(featureslabels np array(labelsthe three classes have very different textures buildings have sharp edges and big blocks where the color is similar (the pixel values are rarely exactly the samebut the variation is slighttext is made of many sharp dark-light transitionswith small black areas in sea of white natural scenes have smoother variations with fractallike transitions thereforea classifier based on texture is expected to do well since our dataset is smallwe only get percent accuracy using logistic regression writing your own features feature is nothing magical it is simply number that we computed from an image there are several feature sets already defined in the literature these often have the added advantage that they have been designed and studied to be invariant to many unimportant factors for examplelinear binary patterns are completely invariant to multiplying all pixel values by number or adding constant to all these values this makes it robust against illumination changes of images