MATLAB R2008a (or higher)
Use 2DSpecTools
for band pass filter.
Use OBNLMpackage
for denoising.
Use DIPimage
for path opening.
2DSpecTools
and OBNLMpackage tools
have been offered on the GitHub.
Download DIPimage
from http://www.diplib.org/download and install it.
- Click set path in Matlab GUI.
- Add
2DSpecTools
,OBNLMpackage
,DIPimage tools
,Matlab River Detection code
folder to MATLAB environment. - Save.
Here, we provide run_river_detection.m
to detect river in single image and run_batch_river_detection.m
for batch detection.
- Open
Matlab River Detection code
folder in MATLAB. - Open
run_river_detection.m
orrun_batch_river_detection.m
. - Write the image path.
test_sentinel2_image.tif
is provided as test image. - Set input 6 parameters.
parameters | description |
---|---|
WV: WorldView image | |
SPOT: SPOT image | |
sensor | Sentinel2: Sentinle-2 image after NDWI calculation |
Landsat: Landsat panchromatic image | |
LandsatNDWILandsat: image after NDWI calculation | |
inverse | set 1 to convert dark rivers into bright rivers (e.g., for panchromatic image); set 0 to keep bright rivers (e.g., for NDWI images) |
width | small river width for Gabor filter, default = 2 |
ppo_length | path opening length, default = 20 |
histCountThreshold | a pixel count threshold to stretch image pixel values, default = 1000 |
Smooth (optional) | used for denoise algorithm. Because denoise algorithm is too slow and scale dependent, is abandoned for large images, default = 0.7 |
You can add your customized sensor (image) easily. The only requirement is to reset the band pass frequency based on the spatial resolution of your input image.
- Click run.
If you see these commands in the command window, the river detection code is running successfully.
You will get 3 processed images. test_sentinel2_image_bandpass_gabor_cpo20.tif
is the final result.
- Kang Yang ([email protected], ph: 13814179324, School of Geography and Ocean Science, Nanjing University)
- Xin Lu ([email protected], School of Geography and Ocean Science, Nanjing University)
- Yao Lu ([email protected], School of Geography and Ocean Science, Nanjing University)
Yang, K. , Karlstrom, L., Smith, L.C., Li, M., 2017. Automated high resolution satellite image registration using supraglacial rivers on the Greenland Ice Sheet. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 10(3): 845-856.
Yang, K. , Li, M., Liu, Y., Cheng, L., Huang, Q., Chen, Y., 2015. River Detection in Remotely Sensed Imagery Using Gabor Filtering and Path Opening. Remote Sensing, 7(7): 8779-8802.
Yang, K. , Li, M., Liu, Y., Cheng, L., Duan, Y., Zhou, M., 2014. River Delineation from Remotely Sensed Imagery Using a Multi-Scale Classification Approach. IEEE Journal of Selected Topics in Applied Earth Observations and Remote Sensing, 7(12): 4726-4737.