Skip to content

Commit

Permalink
Ensure that skimage.transform.rescale interprets image as RGB
Browse files Browse the repository at this point in the history
Its `multichannel` argument is False by default now
  • Loading branch information
stefanv committed Jun 25, 2020
1 parent f86f501 commit 2f14a61
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion butterfly/binarization.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,8 @@ def grabcut_binarization(bfly_rgb, bfly_bin):
bfly_region = bfly_bin_dilated_regions_sorted[0]

# Downscale image to improve grabcut speed
bfly_rgb_rescale = rescale(bfly_rgb, GRABCUT_RESCALE_FACTOR)
bfly_rgb_rescale = rescale(bfly_rgb, GRABCUT_RESCALE_FACTOR,
multichannel=True)
bfly_rgb_rescale = img_as_ubyte(bfly_rgb_rescale)

# Determine grabcut highlight region using butterfly region (after rescaling)
Expand Down

0 comments on commit 2f14a61

Please sign in to comment.