I've been using scikit-image to classify road features with some success. See below: . I am having trouble doing the next step which is to classify the features. For example, let's say these features are located in the box (600, 800) and (1400, 600).
The code I'm using to extract the information is:
from skimage import io, segmentation as seg
color_image = io.imread(img)
plt.rcParams['image.cmap'] = 'spectral'
labels = seg.slic(color_image, n_segments=6, compactness=4)
The objective is to have a table in the following form:
Image, feature_type, starting_pixel, ending_pixel
001 a (600, 600), (1300, 700)
002 b (600, 600), (1100, 700)
002 undefined (700, 700), (900, 800)
feature_type
would be based on colours, ideally shoulders would be one colour, trees and brush would be another, etc.
How can I extract the data I need? (i.e: have scikit break the image into different components where I know the location of each component. I can then pass each component to a classifier which will identify what each component is) Thanks!