How to calculate NDI Index

2 次查看(过去 30 天)
MaxM
MaxM 2021-5-19
评论: Stephan 2021-5-20
Hello,
I have to calculate the NDI (Normalized difference index) according to the formula: NDI = 128*(((G-R)/(G+R))+1)
This index is applied to all pixels of the image, giving values between 1 and +1, but to display the image, these values must be between 0 and 255.
Can someone please explain and help me how to do this?

回答(1 个)

Stephan
Stephan 2021-5-19
编辑:Stephan 2021-5-19
NDI_new = uint8(rescale(NDI, 0, 255));
  2 个评论
MaxM
MaxM 2021-5-19
Thank you for your answer about the rescale. First, how can I calculate the NDI for each pixel of my image ?
Stephan
Stephan 2021-5-20
What are G and R - green and red values? Or what is meant?

请先登录,再进行评论。

类别

Help CenterFile Exchange 中查找有关 Matrix Indexing 的更多信息

标签

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by