ThomasWangWeiHong / Cloud-Shadow-Detection-Based-on-Spectral-Indices

Python implementation of cloud and cloud shadow detection algorithm proposed in academia
10 stars 3 forks source link

A question about CSD_SI.py #1

Open lizijue opened 3 years ago

lizijue commented 3 years ago
Hello, I'd like to ask a question about the implementation of the Cloud-Shadow-Detection-Based-on-Spectral-Indices algorithm.
In CSD_SI.py, line 66, I do not understand why "non_pseudo_cloud_shadow_position_mask = cv2.filter2D(final_cloud_mask, -1, spatial_search_kernel) < 0" makes sense. In my opinion, it may be changed into "non_pseudo_cloud_shadow_position_mask = cv2.filter2D(final_cloud_mask, -1, spatial_search_kernel) > 0" which means there is at least one cloud pixel under the filter as the pixel value is either 0 or 1 in final_cloud_mask. The picture in appendix may demonstrate this.
Thanks.

picture attached

suredream commented 1 year ago

I agree.

patrchristen commented 4 months ago

Hi, I agree as well. From getting no results however much I adjust the parameters, I wasn't able to get any cloud shadow detection. With an adjustment to line 66 this has been alleviated!

yolo-yolo commented 2 months ago

嗨,我也同意。无论我调整多少参数,都没有得到任何结果,我无法获得任何云阴影检测。通过调整到 66 号线,这种情况得到了缓解!

您好 我这边也没有得到任何结果 请问您是怎么解决的呢

patrchristen commented 2 months ago

嗨,我也同意。无论我调整多少参数,都没有得到任何结果,我无法获得任何云阴影检测。通过调整到 66 号线,这种情况得到了缓解!

您好 我这边也没有得到任何结果 请问您是怎么解决的呢 Line 66: non_pseudo_cloud_shadow_position_mask = cv2.filter2D(final_cloud_mask, -1, spatial_search_kernel) < 0 Correction: non_pseudo_cloud_shadow_position_mask = cv2.filter2D(final_cloud_mask, -1, spatial_search_kernel) > 0