future
¶Functionality with an experimental API. Although you can count on the functions in this package being around in the future, the API may change with any version update and will not follow the skimage two-version deprecation path. Therefore, use the functions herein with care, and do not use them in production code that will depend on updated skimage versions.
skimage.future.manual_lasso_segmentation (image) |
Return a label image based on freeform selections made with the mouse. |
skimage.future.manual_polygon_segmentation (image) |
Return a label image based on polygon selections made with the mouse. |
skimage.future.graph |
skimage.future.
manual_lasso_segmentation
(image, alpha=0.4, return_all=False)[source]¶Return a label image based on freeform selections made with the mouse.
Parameters: | image : (M, N[, 3]) array
alpha : float, optional
return_all : bool, optional
|
---|---|
Returns: | labels : array of int, shape ([Q, ]M, N)
|
Notes
Press and hold the left mouse button to draw around each object.
Examples
>>> from skimage import data, future, io
>>> camera = data.camera()
>>> mask = future.manual_lasso_segmentation(camera)
>>> io.imshow(mask)
>>> io.show()
skimage.future.
manual_polygon_segmentation
(image, alpha=0.4, return_all=False)[source]¶Return a label image based on polygon selections made with the mouse.
Parameters: | image : (M, N[, 3]) array
alpha : float, optional
return_all : bool, optional
|
---|---|
Returns: | labels : array of int, shape ([Q, ]M, N)
|
Notes
Use left click to select the vertices of the polygon and right click to confirm the selection once all vertices are selected.
Examples
>>> from skimage import data, future, io
>>> camera = data.camera()
>>> mask = future.manual_polygon_segmentation(camera)
>>> io.imshow(mask)
>>> io.show()