I want to do the NDVI with images landsat 8 in R, radiometric correction, radiance and reflectance, I make it from the models of the USGS (model here)
But taking the image (ND) for the calculation of the radiance and this for the calculation of the reflectance, it gives me errors that I then show pixel values within the image in a cloudless zone.
Evidently the values of the radiance are wrong the calculation of the NDVI gives wrong. The research has led me to know that it is something related to the 16 bits in which the image is. These are the pinxel values of the original image.
As I can solve this problem in R and that the radiance d values give me good to be able to do the NDVI and me between -1 and +1…
Something similar was treated in another post but was solved given that ENVI internally corrects these values without doing intermediate processes (Ref:Processing landsat 8 in ENVI)
Best Answer
In the post you link, ENVI is not doing any internal stuff, and R reliably deals with conversions between the 16-bits in the image and the 64-bit internally in R.
The most likely reason for your problems are based around the
sin(Ose)
. In R, it calculates in radians, while the formula requires degrees. As such, you need to make your formula gosin(Ose*Pi/180)
.