mirror of
https://github.com/wassname/scikit-image.git
synced 2026-07-17 11:32:45 +08:00
Prevent unnecessary array copy for RGB images
This commit is contained in:
@@ -196,9 +196,9 @@ def mark_boundaries(image, label_img, color=(1, 1, 0),
|
||||
--------
|
||||
``find_boundaries``.
|
||||
"""
|
||||
if image.ndim == 2:
|
||||
image = gray2rgb(image)
|
||||
marked = img_as_float(image, force_copy=True)
|
||||
if marked.ndim == 2:
|
||||
marked = gray2rgb(marked)
|
||||
if mode == 'subpixel':
|
||||
marked = nd.zoom(marked, [2 - 1/s for s in marked.shape[:-1]] + [1],
|
||||
mode='reflect')
|
||||
|
||||
Reference in New Issue
Block a user