I have a Numpy array that contains values between 0 and 255. How can I get contour lines between every color and not just 0 and non-zero?
My situation is the following
It should be more like
In theory I could loop over the array and setting everything to zero except single color and find contours for that, but that would be incredible tedious and I was hoping there was a more elegant solution.