Hello, I have an interesting problem. I have an image of a leaf. I am able to segment and get the leaf. I would like to extract the segment into a transparent background png. I have included the image I am using.
I can isolate and convert the binary mask/segment to a png, but it still shows black background and white segment. I would like to be able to change the color of the segment and remove the background. Is this even possible?
A little more detail. I would like to eventually be able to replicate the Interactive Segmentation View by using javascript, so I can display the solution using the Web Server. I also want the user to be able to move and resize the segment label. I have the javascript code to do this, I just am unable to obtain the segment with a transparant background.
Yes I can attach a sample workflow. What I want is to be able to display the largest segment with the holes filled to intimate what the computer is able to detect as a completed leaf. The problem lies when I go to layer them on a javascript canvas in a generic javascript view node, I am unable to remove the background of the label/segment.
Hi @rbjacob1 , I’ve also tried my hand at this and could not find a suitable solution. I’ve asked internally but it seems at the moment we are stumped. I will follow up if anyone internal chimes in.
Hi @rbjacob1
You can use Labeling to RGB Img node to combine your source labeling with a background image. However, this requires your labeling to have the same dimensions as the background image you want to merge it with.
best,
Gabriel