-
-
Notifications
You must be signed in to change notification settings - Fork 307
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added Crust Index algorithm to i.vi (#1997)
- Loading branch information
Yann Chemin
authored
Dec 1, 2021
1 parent
c810f67
commit 6fb6afd
Showing
3 changed files
with
52 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#include<stdio.h> | ||
#include<math.h> | ||
#include<stdlib.h> | ||
|
||
/*From https://karnieli-rsl.com/image.ashx?i=901711.pdf&fn=1997-Karnieli_CI_IJRS_97.pdf | ||
* Crust Index CI=1-(RED-BLUE)/(RED+BLUE). (KARNIELI, 1997) | ||
* Development and implementation of spectral crust index over dune sands | ||
* The Remote Sensing Laboratory, J. Blaustein Institute for Desert Research, Ben Gurion University, Sede-Boker Campus 84990, Israel. (Received 26 January 1996; in ® nal form 19 July 1996) */ | ||
/* Crust Index */ | ||
double c_i(double bluechan, double redchan) | ||
{ | ||
double result; | ||
|
||
if ((redchan + bluechan) == 0.0) { | ||
result = -1.0; | ||
} | ||
else { | ||
result = 1 - (redchan - bluechan) / (redchan + bluechan); | ||
} | ||
return result; | ||
} | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters