Skip to content
Snippets Groups Projects
Commit 594eb14d authored by Christopher Randolph Rhodes's avatar Christopher Randolph Rhodes
Browse files

Rescale channels separately unless making an RGB image

parent 429c1e5b
No related branches found
No related tags found
No related merge requests found
......@@ -973,7 +973,11 @@ class RoiSet(object):
mask = roi.binary_mask
if rescale_clip is not None:
patch = rescale(patch, rescale_clip)
if rgb_overlay_channels: # rescale all equally to preserve white balance
patch = rescale(patch, rescale_clip)
else:
for ci in range(0, pc): # rescale channels separately
patch[:, :, ci, :] = rescale(patch[:, :, ci, :], rescale_clip)
if kwargs.get('draw_bounding_box') is True and expanded:
bci = kwargs.get('bounding_box_channel', 0)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment