I have to replace area with clouds from another image without clouds. So I have a problem when I remove clouds from my mask I have borders of clouds. I use Sentinel-2 SLC image. For begin I open my mask of scene classification(SLC) in 'jp2' formats. Then I resize my image to format my composites(10980x10980). I use ReadAsArray for both files. Then, where mask have labels with clouds and shadows I set 0 and works with arrays:
raster_composite1[:, mask_slc1 == 0] = raster_composite2[:, mask_slc1 == 0]#i have 4 bands
In output I have image:
So, how can I remove those white borders ?