用法:
skimage.transform.warp_polar(image, center=None, *, radius=None, output_shape=None, scaling='linear', multichannel=False, channel_axis=None, **kwargs)
將圖像重新映射到極坐標或log-polar 坐標空間。
- image:ndarray
輸入圖像。默認情況下隻接受二維數組。如果指定了channel_axis,則接受 3-D 數組。
- center:元組(行,列),可選
圖像中表示變換中心的點(即笛卡爾空間中的原點)。值可以是浮點類型。如果沒有給出值,則假定中心是圖像的中心點。
- radius:浮點數,可選
限定要變換的區域的圓的半徑。
- output_shape:元組(行,列),可選
- scaling:{‘linear’, ‘log’},可選
指定圖像扭曲是極坐標還是log-polar。默認為‘linear’。
- multichannel:布爾型,可選
圖像是否是一個 3-D 數組,其中第三個軸將被解釋為多個通道。如果設置為 False(默認),則僅接受二維數組。不推薦使用此參數:改為指定 channel_axis。
- channel_axis:int 或無,可選
如果為 None,則假定圖像是灰度(單通道)圖像。否則,此參數指示數組的哪個軸對應於通道。
- **kwargs:關鍵字參數
傳遞給transform.warp.
- warped:ndarray
極坐標或 log-polar 扭曲圖像。
- multichannel:DEPRECATED
已棄用以支持channel_axis。
參數:
返回:
其他參數:
例子:
在灰度圖像上執行基本的極坐標變形:
>>> from skimage import data >>> from skimage.transform import warp_polar >>> image = data.checkerboard() >>> warped = warp_polar(image)
在灰度圖像上執行 log-polar 扭曲:
>>> warped = warp_polar(image, scaling='log')
在指定中心、半徑和輸出形狀的同時對灰度圖像執行log-polar 扭曲:
>>> warped = warp_polar(image, (100,100), radius=100, ... output_shape=image.shape, scaling='log')
在彩色圖像上執行 log-polar 變形:
>>> image = data.astronaut() >>> warped = warp_polar(image, scaling='log', channel_axis=-1)
相關用法
- Python skimage.transform.warp_coords用法及代碼示例
- Python skimage.transform.warp用法及代碼示例
- Python skimage.transform.hough_circle_peaks用法及代碼示例
- Python skimage.transform.hough_ellipse用法及代碼示例
- Python skimage.transform.resize用法及代碼示例
- Python skimage.transform.hough_line_peaks用法及代碼示例
- Python skimage.transform.integrate用法及代碼示例
- Python skimage.transform.frt2用法及代碼示例
- Python skimage.transform.estimate_transform用法及代碼示例
- Python skimage.transform.hough_circle用法及代碼示例
- Python skimage.transform.rotate用法及代碼示例
- Python skimage.transform.rescale用法及代碼示例
- Python skimage.transform.ifrt2用法及代碼示例
- Python skimage.transform.resize_local_mean用法及代碼示例
- Python skimage.transform.hough_line用法及代碼示例
- Python skimage.transform.downscale_local_mean用法及代碼示例
- Python skimage.feature.graycomatrix用法及代碼示例
- Python skimage.color.lab2lch用法及代碼示例
- Python skimage.draw.random_shapes用法及代碼示例
- Python skimage.feature.blob_doh用法及代碼示例
注:本文由純淨天空篩選整理自scikit-image.org大神的英文原創作品 skimage.transform.warp_polar。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。