abreheret/PixelAnnotationTool

remove border around color masked images

tanmaypandey7 opened this issue · 2 comments

Hi, as referenced in #7, I am also experiencing this random noise around my images while saving them, which is leading to further problems. Using version 1.3.1
I will upload the images where this noise is occuring(look them up in new tab):
Uploading both original and masked images(my main use is of color mask, just uploading all the images so it may help find the problem):
A_103:
original image:
a_103
color_mask:
a_103_color_mask
mask:
a_103_mask
watershed_mask:
a_103_watershed_mask

A_104:
original image:
a_104
color_mask:
a_104_color_mask
mask:
a_104_mask
watershed_mask:
a_104_watershed_mask

A_106:
original image:
a_106
color_mask:
a_106_color_mask
mask:
a_106_mask
watershed_mask:
a_106_watershed_mask
I can upload more images if required.

There is no noise, strictly speaking. For the watershed to work it is necessary to have at least two different class in the pictures for the watershed to find the border between the two classes. If you check the "keep border provide by the watershed" box then there will be white pixels on this boundary, however if your class is touching, then there will be no white pixel between these two classes.
For your case if the class with id 3 is green and class id 23 in red it gives a mask:
image
As we can see the left and right side of the object search on a common border. That's why the result with the border gives white pixels on the rest of the border.
image

With the new commit [ef64006] I updated the display correctly

I make a new release v1.3.2 you can download here:
https://github.com/abreheret/PixelAnnotationTool/releases/tag/v1.3.2