Search the Community
Showing results for tags 'vegetation mapping'.
Found 2 results
Hello… I am an engineering student working on a project based on NDVI calculation to monitor the crop health. I used the PiNoIR camera with blue filter for my experiment in order to obtain the values of NIR and Red region. I used the following code to extract the required values and to calculate the NDVI. But in the output image, the empty regions (area where no leaves are present as shown in the below figure) and ground have higher NDVI values. The shadowed regions are shown in the range 0.5 to 0.6. I wanted to know whether the output is correct and what corrections can be done in the -code in order to correct the error. The code is given below. from PIL import Image import numpy as np import cv2 from cv2 import imread from matplotlib import cm rgb_matrix =cv2.imread('inputimg.jpg') w=rgb_matrix.shape #columns h=rgb_matrix.shape #rows print(w) print(h) #Compute ndvi values for each pixel #NDVI=(NIR-R)/(NIR+R) res= for i in range(h): row= for j in range(w): val=rgb_matrix[j] n=val r=val num=((int(n)-int(r))) den=((int(n)+int(r))) if(den == 0): r=0.0 else: r=np.divide(num,den) row.append(r) res.append(row) print('Done') #based on NDVI values, give different colors for easier identification for i in range(h): for j in range(w): if(res[j] >=-1 and res[j] <0): rgb_matrix[j]=[128,128,128] #grey elif(res[j]>=0 and res[j]<0.2): rgb_matrix[j]=[64,255,0] #parrot green elif(res[j]>=0.2 and res[j]<0.3): rgb_matrix[j]=[125,255,255] #yellow elif(res[j]>=0.3 and res[j]<0.4): rgb_matrix[j]=[0,128,128] #dark green elif(res[j]>=0.4 and res[j]<0.5): rgb_matrix[j]=[255,255,0] #sky blue elif(res[j]>=0.5 and res[j]<0.6): rgb_matrix[j]=[255,51,153] #purple elif(res[j]>=0.6 and res[j]<0.7): rgb_matrix[j]=[0,128,255] #orange elif(res[j]>=0.7 and res[j]<0.8): rgb_matrix[j]=[255,43,255] #pink elif(res[j]>=0.8 and res[j]<0.9): rgb_matrix[j]=[40,40,255] #red else: rgb_matrix[j]=[255,0,0] #dark blue cv2.imwrite('outputimg.jpg',rgb_matrix) print("Completed!!") (Ignore the indentation errors)
Hi All, Please forward on to pilots, teachers, or students who might be interested in contributing to this citizen science experiment. It’s late October and that means Halloween candy, changing leaves, and wool sweaters to many in the northern hemisphere. It’s also time to get out to fly drones with the launch of the Fly4Fall campaign, a worldwide initiative to crowd-source science. The goal of Fly4Fall is a biogeographic survey of autumn plants everywhere (forests, prairies, deserts and more) to measure plant phenology. The project is asking for volunteer drone pilots to collect data points from the poles to the equator, in places where leaves have already dropped or spring is coming or where they are green all year. Fly4Fall is free and totally voluntary. Open to anyone with a DJI drone and an iOS device. Download the free Hangar 360 for DJI app on an iPhone/iPad. Collect a panoramic at 100 m (300ft) over vegetation located in safe areas to fly (i.e. not national parks or near airports). Here is an example. Do as many spots as you like. Email the links to the team to plot on a master map and reveal what the drone community can do! Detailed instructions can be found at www.Fly4Fall.com. This is a joint initiative with private drone companies, schools, universities and a growing number of partners...including you! Questions can be directed tot firstname.lastname@example.org Sincerely, Gregory Crutsinger Drone Scholars