I reached the point has mentioned via this post in the last few days,
I wanted to carry out a standard thresholding procedure to segment the land the water bodies.
And I did try out the Otsu’s thresholding method, adopting the python program specified in the links provided here. But however, I am not sure how these scripts takes in the Sentinel 1 image.
If suppose i need to try out the code from the link “https://scikit-image.org/docs/0.12.x/auto_examples/segmentation/plot_local_otsu.html ”
Then, how and where should i include the image file.
(This is my first…
I found that unfortunately there’s still no method via SNAP, to calculate the intensity threshold of VH, VV,
That’s why I edited and created the Otsu’s method via skimage library to be compatible with GRDHR images, and full preparing the intensity VH, VV, and also getting the threshold is available within my github repository.
ASF Tools for Python, has a good capability of getting some geometric information, and also to create water map extension, However creating water_map_extension...
1 Like
ABraun
January 21, 2022, 10:36am
#2
sounds cool - I would love to see an example for its use.
Dear Andy,
An example is already mentioned via the repository,
dirpath = ‘D://WATER_MAP_TEST/’
vv = dirpath + VV/S1A_IW_GRDH_1SDV_20210324T191554_VV_NR_Orb_TC_res.tif’
vh = dirpath + ‘VH/S1A_IW_GRDH_1SDV_20210324T191554_VH_NR_Orb_TC_res.tif’
Otsus_VH_VV_thr(vv)
layer_count : 1 layer_shape : (21494, 25689)
layer_type : (‘float32’,)
Lyer_NAN : (None,)
Layer_shape_after_converted_to_unit8 (1, 21494, 25689)
The layer threshold is : 21
Total time is: 00:07:01.82
Calculate the VH, VV threshold of GRDHR VH, and VV - GitHub - falahfakhri-Iraq/Otsus-method-for-GRDHR-VH-VV-thresholding: Calculate the VH, VV threshold of GRDHR VH, and VV
ABraun
January 21, 2022, 12:36pm
#4
sorry, I meant the result.
Yes, you’re right I miss-interpreted your previous comments, the results of thr. are required in order to create water extent mapping as it’s explained here, make_water_map
This is an example,
import asf_tools
from asf_tools.water_map import make_water_map
dirpath = ‘D:/WATER_MAP_TEST/’
vh = dirpath + ‘VH/S1A_IW_GRDH_1SDV_20210324T191554_VH_NR_Orb_TC_res_Ltodb.tif’
vv = dirpath + ‘VV/S1A_IW_GRDH_1SDV_20210324T191554_VV_NR_Orb_TC_res_Ltodb.tif’
out_raster = dirpath + ‘water_map_20210324T191554.tif’
make_water_map(
out_raster,
vv,
vh,
hand_raster=None,
tile_shape=(200, 200),
max_vv_threshold=21,
max_vh_threshold=18,
hand_threshold=15.0,
hand_fraction=0.8,
membership_threshold=0.45
)
I hope now the foregoing answers your comment!
1 Like
Orland
February 2, 2022, 12:49pm
#6
I faced similar kind of issue last time, I am still searching for some proper solution.
Hi Orland,
Seemingly you just joined the step_forum, I’d like to welcome you in the world of Space and Remote sensing,
Would you please to clarify which kind of problem do you face up?, your comment is vague to me!