用法:
class skimage.viewer.canvastools.PaintTool(manager, overlay_shape, radius=5, alpha=0.3, on_move=None, on_release=None, on_enter=None, rect_props=None)
基礎:
skimage.viewer.canvastools.base.CanvasToolBase
用於在繪圖頂部繪畫的小部件。
- manager:查看器或PlotPlugin
Skimage 查看器或繪圖插件對象。
- overlay_shape:形狀元組
用於初始化疊加圖像的 2D 形狀元組。
- radius:int
繪製光標的大小。
- alpha:浮點數(在 [0, 1] 之間)
覆蓋的不透明度。
- on_move:函數
每當移動控製手柄時調用的函數。這個函數必須接受線的端點作為唯一的參數。
- on_release:函數
每當釋放控製句柄時調用的函數。
- on_enter:函數
每當按下 “enter” 鍵時調用的函數。
- rect_props:dict
matplotlib.patches.Rectangle
matplotlib.widgets.RectangleSelector
參數:
例子:
>>> from skimage.data import camera >>> import matplotlib.pyplot as plt >>> from skimage.viewer.canvastools import PaintTool >>> import numpy as np
>>> img = camera()
>>> ax = plt.subplot(111) >>> plt.imshow(img, cmap=plt.cm.gray) >>> p = PaintTool(ax,np.shape(img[:-1]),10,0.2) >>> plt.show()
>>> mask = p.overlay >>> plt.imshow(mask,cmap=plt.cm.gray) >>> plt.show()
- overlay:數組
顯示在圖像頂部的塗漆標簽的疊加層。
- label:int
當前的油漆顏色。
屬性:
相關用法
- Python skimage.viewer.canvastools.RectangleTool用法及代碼示例
- Python skimage.viewer.ImageViewer用法及代碼示例
- Python skimage.viewer.plugins.Plugin用法及代碼示例
- Python skimage.feature.graycomatrix用法及代碼示例
- Python skimage.color.lab2lch用法及代碼示例
- Python skimage.draw.random_shapes用法及代碼示例
- Python skimage.feature.blob_doh用法及代碼示例
- Python skimage.feature.blob_dog用法及代碼示例
- Python skimage.filters.unsharp_mask用法及代碼示例
- Python skimage.registration.optical_flow_tvl1用法及代碼示例
- Python skimage.filters.rank.noise_filter用法及代碼示例
- Python skimage.exposure.histogram用法及代碼示例
- Python skimage.filters.gaussian用法及代碼示例
- Python skimage.feature.graycoprops用法及代碼示例
- Python skimage.segmentation.active_contour用法及代碼示例
- Python skimage.feature.corner_orientations用法及代碼示例
- Python skimage.exposure.adjust_gamma用法及代碼示例
- Python skimage.morphology.h_minima用法及代碼示例
- Python skimage.filters.threshold_otsu用法及代碼示例
- Python skimage.feature.structure_tensor用法及代碼示例
注:本文由純淨天空篩選整理自scikit-image.org大神的英文原創作品 skimage.viewer.canvastools.PaintTool。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。