I'd like to report the following problems with MapMask:
It uses foreground=255, but if you look to the map, you'll notice that white color means background.
Function is_on_mask is broken because it ignores 3 channels of RGB picture. (Python complains about indexing). The fix would be to check if all channels are white or non-white, like:
mask = np.all(this_mask[py[on_mask], px[on_mask]], axis=-1)
I'd like to report the following problems with MapMask:
foreground=255
, but if you look to the map, you'll notice that white color means background.is_on_mask
is broken because it ignores 3 channels of RGB picture. (Python complains about indexing). The fix would be to check if all channels are white or non-white, like:mask = np.all(this_mask[py[on_mask], px[on_mask]], axis=-1)