skimage.future
Functionality with an experimental API.
Segmentation using labeled parts of the image and a classifier. |
Functionality with an experimental API.
Segmentation using labeled parts of the image and a classifier. |
Return a label image based on freeform selections made with the mouse. |
Return a label image based on polygon selections made with the mouse. |
Segmentation of images using a pretrained classifier. |
Estimator for classifying pixels. |
Segmentation using labeled parts of the image and a classifier.
Image of labels. Labels >= 1 correspond to the training set and label 0 to unlabeled pixels to be segmented.
Array of features, with the first dimension corresponding to the number
of features, and the other dimensions correspond to labels.shape.
classifier object, exposing a fit and a predict method as in
scikit-learn’s API, for example an instance of
RandomForestClassifier or LogisticRegression classifier.
classifier trained on labels
self.clf has not been fitted yet (use self.fit).Trainable segmentation using local features and random forests
Return a label image based on freeform selections made with the mouse.
Grayscale or RGB image.
Transparency value for polygons drawn over the image.
If True, an array containing each separate polygon drawn is returned. (The polygons may overlap.) If False (default), latter polygons “overwrite” earlier ones where they overlap.
The segmented regions. If mode is 'separate', the leading dimension
of the array corresponds to the number of regions that the user drew.
Press and hold the left mouse button to draw around each object.
>>> from skimage import data, future
>>> import matplotlib.pyplot as plt
>>> camera = data.camera()
>>> mask = future.manual_lasso_segmentation(camera)
>>> fig, ax
Return a label image based on polygon selections made with the mouse.
Grayscale or RGB image.
Transparency value for polygons drawn over the image.
If True, an array containing each separate polygon drawn is returned. (The polygons may overlap.) If False (default), latter polygons “overwrite” earlier ones where they overlap.
The segmented regions. If mode is 'separate', the leading dimension
of the array corresponds to the number of regions that the user drew.
Use left click to select the vertices of the polygon and right click to confirm the selection once all vertices are selected.
>>> from skimage import data, future
>>> import matplotlib.pyplot as plt
>>> camera = data.camera()
>>> mask = future.manual_polygon_segmentation(camera)
>>> fig, ax
Segmentation of images using a pretrained classifier.
Array of features, with the last dimension corresponding to the number of features, and the other dimensions are compatible with the shape of the image to segment, or a flattened image.
trained classifier object, exposing a predict method as in
scikit-learn’s API, for example an instance of
RandomForestClassifier or LogisticRegression classifier. The
classifier must be already trained, for example with
skimage.future.fit_segmenter().
Labeled array, built from the prediction of the classifier.
Trainable segmentation using local features and random forests
Bases: object
Estimator for classifying pixels.
classifier object, exposing a fit and a predict method as in
scikit-learn’s API, for example an instance of
RandomForestClassifier or LogisticRegression classifier.
function computing features on all pixels of the image, to be passed
to the classifier. The output should be of shape
(m_features, *labels.shape). If None,
skimage.feature.multiscale_basic_features() is used.
compute_features |
Train classifier using partially labeled (annotated) image.
Input image, which can be grayscale or multichannel, and must have a
number of dimensions compatible with self.features_func.
Labeled array of shape compatible with image (same shape for a
single-channel image). Labels >= 1 correspond to the training set and
label 0 to unlabeled pixels to be segmented.
Segment new image using trained internal classifier.
Input image, which can be grayscale or multichannel, and must have a
number of dimensions compatible with self.features_func.
self.clf has not been fitted yet (use self.fit).