Blockdit Logo
Blockdit Logo (Mobile)
สำรวจ
ลงทุน
คำถาม
เข้าสู่ระบบ
มีบัญชีอยู่แล้ว?
เข้าสู่ระบบ
หรือ
ลงทะเบียน
G
Geoscience
•
ติดตาม
24 ก.ย. 2020 เวลา 15:28
Find Vegetation in a Multispectral Image
https://www.mathworks.com/help/images/finding-vegetation-in-a-multispectral-image.html
G =(imread('LC08_L1TP_130050_20200516_20200527_01_T1_B3.TIF'));
R =(imread('LC08_L1TP_130050_20200516_20200527_01_T1_B4.TIF'));
NIR =(imread('LC08_L1TP_130050_20200516_20200527_01_T1_B5.TIF'));
CIR = cat(3,NIR,R,G);
figure, imshow(CIR);
title('CIR Composite')
CIR
imshow(R)
title('Visible Red Band')
Red band
imshow(NIR)
title('Near Infrared Band')
NIR band
Compute Vegetation Index
ndvi = (NIR - R) ./ (NIR + R);
imshow(ndvi,'DisplayRange',[-1 1])
title('Normalized Difference Vegetation Index')
threshold = 0.4;
q = (ndvi > threshold);
%The percentage of pixels selected is thus
100 * numel(NIR(q(:)))/numel(NIR); % ~ 4.4%
imshow(q)
title('NDVI with Threshold Applied')
Link Spectral and Spatial Content
figure
subplot(1,2,1)
plot(R,NIR,'+b')
hold on
plot(R(q(:)),NIR(q(:)),'g+')
axis square
xlabel('red level')
ylabel('NIR level')
title('NIR vs. Red Scatter Plot')
subplot(1,2,2)
imshow(q)
colormap([0 0 1; 0 1 0]);
title('NDVI with Threshold Applied')
บันทึก
โฆษณา
ดาวน์โหลดแอปพลิเคชัน
© 2025 Blockdit
เกี่ยวกับ
ช่วยเหลือ
คำถามที่พบบ่อย
นโยบายการโฆษณาและบูสต์โพสต์
นโยบายความเป็นส่วนตัว
แนวทางการใช้แบรนด์ Blockdit
Blockdit เพื่อธุรกิจ
ไทย