@ellenbuckley In the watershed computation
#rewatershed
im4 = cv2.watershed(rgb,markers)
the rgb image is used. It is initialized in a block after the cloud mask is created
red_c = np.copy(tci.read()[0])
green_c = np.copy(tci.read()[1])
blue_c = np.copy(tci.read()[2])
rgb = np.dstack([red_c, green_c, blue_c])
However, a few lines downstream, in a conditional block for saving images, this object is redefined (by applying in turn, cloud/land masks to each layer) and then used in the watershed computation. If save_fig is initially set to False the unmasked rgb image will be used for the watershed. Could you clarify which version of rgb should be used for the watershed, the original or the land+cloud-masked version?
Thanks!
@ellenbuckley In the watershed computation
the
rgbimage is used. It is initialized in a block after the cloud mask is createdHowever, a few lines downstream, in a conditional block for saving images, this object is redefined (by applying in turn, cloud/land masks to each layer) and then used in the watershed computation. If
save_figis initially set toFalsethe unmaskedrgbimage will be used for the watershed. Could you clarify which version ofrgbshould be used for the watershed, the original or the land+cloud-masked version?Thanks!