Closed TwistedW closed 4 years ago
Hi, it's a good idea! I updated your code as there was missed non-None check for the mask before multiplication. And I also replaced 255
multiplier with 255 // mask.max()
, which also better handles masks with multiple objects.
So with this fix, saved masks become more visually distinguishable.
For 1 object:
For 5 objects:
Hi, it's a good idea! I updated your code as there was missed non-None check for the mask before multiplication. And I also replaced
255
multiplier with255 // mask.max()
, which also better handles masks with multiple objects.
Well, a better way.
The range of the mask needs to be changed.