Hello guys. I have a mask like this :
I want to reverse background color and foreground color for using Morphological Transformations on my image Before
Background-color:White
Foreground color-Dark
After
Background-color:White
Foreground color-Dark
background[np.where((background > [0,0,0]).all(axis = 2))] =[255,255,255]
I write piece of code on phyton but i can't implement this code on javascript.How can i do with javascript?