The Region feature extractors will process square image neighbourhoods and represent its central pixel by the ensuing feature vector. this can be utilised in consideration for native spatial information gathering and dealing out structure in pictures. Typical applications are texture classification and image segmentation with distinctive edges…

local image feature extraction in Matlab

Region features assist you to characterise:

  • Local texture
  • Local intensity distribution (histograms)
  • Local gradient, edge strength and orientation
  • Response of a convolution filter
  • Local appearance

Region feature extraction framework permits you to:

  • Compute native image options (several build-in varieties or custom Matlab extractors)
  • Use custom neighbourhood sizes and grid definitions
  • Work with image masks & irregular image patches
  • Propagate existing image labels to the extracted information sets
  • Visualise label pictures highlight image neighbourhoods in original pictures
  • Easily pass labels between pictures extracted at totally different scales

For this example we load a dice image sddata object I:

It becomes a data set with 3 features corresponding to R,G,B bands respectively.

Dice image (showing the first of the three bands i.e. the 'R' channel)The blue colour is the label layer that’s uniformly applied, because we’ve got just one “unknown” category by default.

We want to characterise native image structure. the best approach is to compute mean and standard deviation in small image neighbourhoods with the ‘moments’ extractor:

Note that ‘moments’ extractor operates on one image band and we, therefore, offer it solely with the primary feature (‘R’ channel). The extraction domain is ‘region’ and therefore the extractor name is ‘moments’. By default, ‘moments’ options are extracted in 8×8 sliding windows. The ensuing information set A remains a picture

We can visualise it with sdimage. We tend to open 2 separate figures, one showing the primary feature (local mean), the opposite showing the second feature (local normal deviation):

Local image features - mean and standard deviation in image neighborhoods

 

Note, that the extracted image contains a thin border while not information. This can be because per category computes region features providing the neighbourhood totally covers image information. For instance, the left-upper corner pixel can’t be delineate as a result of the neighbourhood “sticks out” from available knowledge. Therefore, the amount of samples is slightly smaller than that within the original image I.

Why is native feature extraction useful? Allow us to try and separate objects and background by clustering. Move to the Figure two that contains information set A with each bands and choose ‘Cluster with k-means’ from ‘Image’ menu. Enter the required range of clusters, for us two and click on OK.

Clustering local image features is more robust than direct RGB pixel clusteringWe can observe is that clustering on mean/std options robustly identifies the dice objects as well as the dots as a result of larger spatial context. For comparison, perform clustering on 1st|the initial} RGB image I or its first band I(:,1).

Region feature types

Raw neighbourhood values

Example:

 Local histograms

The histogram feature extractor needs expressly nominative information vary. It’s necessary that the ‘range’ is identical within the entire classification drawback i.e. on the training set and within the production or test set. Therefore, you must not use data-driven definitions like ‘range’,[+min(im) +max(im)]! This is conjointly for alternative histogram-like features (‘histfeat’ and ‘cm’).

Examples:

Features extracted from local histograms

The ‘histfeat’ extractor computes 5 statistical options characterising form of native histograms. These are: ‘mean’,’2nd moment’,’skewness’,’kurtosis’, and ‘entropy’.

Co-occurrence matrices

In this example, we compute co-occurrences on R channel, sub-sampling intensities to 4 bins:

Let is identify pixel row 101, column 162 in our data set. We can use standard Matlab sub2ind function and imsize of our image:

Now we get the sample with pixel index ind:

Co-occurrence as feature vector:

and reshaped into 4×4 matrix:

Gaussian filter and its derivatives

The ‘Gauss’ feature extractor convolves input image with the Gaussian filter or its derivative and returns its response within the central pixel of every image region.

By default, sigma of 2 and block of 8 pixels are used:

Note the message displaying the particular coverage of the convolution kernel on the image region. Gaussian kernel has normally an infinite support. In practice, we have a tendency to solely use the convolution values within the neighbourhood outlined by the ‘block’ choice. Thus our filter solely covers the sliding window partly.

If we have a tendency to use larger sigma, the coverage gets lower which suggests that our actual filtering result’s obtaining more far from ideal Gaussian shape:

In order to increase the coverage, we may increase the ‘block’ size:

Example on ‘detergent1’ data set illustrating the noise suppression:

Gaussian derivatives are also supported with ‘der’ option:

Leung-Malik multi-orientation/multi-scale filter

LM filters:

multi-scale multi-orientation filter bank for feature extraction and texture classification

Schmid rotationally-invariant filter

Schmid filters:

multi-scale rotationally-invariant filter bank for feature extraction and texture classification