Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

How to reverse foreground color and background color on mask ?

Hello guys. I have a mask like this :

I want to reverse background color and foreground color for using Morphological Transformations on my image image description 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?

How to reverse foreground color and background color on mask ?

Hello guys. I have a mask like this :

I want to reverse background color and foreground color for using Morphological Transformations on my image image descriptionimage

sample

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? javascript?

How to reverse foreground color and background color on mask ?

Hello guys. I have a mask like this :

I want to reverse background color and foreground color for using Morphological Transformations on my image

sampleimage description

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?

How to reverse foreground color and background color on mask ?

Hello guys. I have a mask like this :

I want to reverse background color and foreground color for using Morphological Transformations on my image

image descriptionimage description

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?

How to reverse foreground color and background color on mask ?

Hello guys. I have a mask like this :

I want to reverse background color and foreground color for using Morphological Transformations on my image

image description

Before

Background-color:White
Background-color:Dark
Foreground color-Dark
color-White

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?