Masking/filtering soil pixels from drone imagery in QGIS (Drones in agriculture series, 4/7)
Вставка
- Опубліковано 15 жов 2024
- To determine health and size of plant canopies, it is important to remove soil values. This video covers how to eliminate soil pixels from drone data, so they do not influence vegetation indices and other data.
If you found these methods useful, please consider citing our recent paper in the journal Remote Sensing:
Parker, T. A., Palkovic, A., & Gepts, P. (2020). Determining the Genetic Control of Common Bean Early-Growth Rate Using Unmanned Aerial Vehicles. Remote Sensing, 12(11), 1748.
Thanks very much for this video, you saved me a heap of time in not masking out soil areas with a manually drawn shapefile mask. This worked a treat!
Deat Travis Paker, Your videos have been very well explained. Please upload more videos
Thank you very much for your videos, I hope you come back to provide more information about precision agriculture.
Another useful video. Thank youu!
Looking forward to seeing more videos of the Drones in agriculture series from you!
Thank you, it was so helpful and well explained! You just made my work easier.
Thanks Laura, I'm glad it was useful!
Honestly 🕺🕺
Your videos helped me a lot
Thank you
keep up the good work . many thanks
very helpfull! thanks a lot
Thanks for watching!
Hi, very useful video, thank you!! I now have the mask and my RGB image, how can I clip the RGB from the mask?
Usually by the time you have a mask layer, you are working with your vegetation index data to get the data you need, and aren't going back to the original RGB except maybe to make slides for a presentation or something. For presentation purposes, you can often just put your sDSM (soil digital surface model, see the plant height and canopy volume video in this playlist) on top of your RGB layer in the layer panel at bottom left. If you really need a masked RGB orthomosaic for some reason, you would probably have to use the raster calculator (as explained starting around 0:55 in this video) to calculate (RGBband / mask) for each of the bands, then merge the outputs again as explained in the final video in this video series. I hope that helps!
@@travisparkerplantscience I tried it and it works thank you!!
**To get output of 4 bands (RGB and alpha band), thank you!!
hey travis, could you explain how you got the mask layer. Will you get it by performing some sort of image segmentation algorithm using deep learning?
Hi Sharan, good question! We can separate those using a threshold value for a vegetation index (or, in rare cases other things like elevation, temperature, etc.). An NDVI value of 0.5 usually does a great job. That is explained at 11:55 here: ua-cam.com/video/U2qJn7jHYDw/v-deo.html
Hope this helps!
I just added a card with a link to that video, in case others have the same question. Thanks!
travis, one question for you: what do you think is the most accurate result, eliminating soil and then calculate NDVI or MSAVI2 in the whole plot?
Hi, it really depends on what you want to do, but yes these are very useful approaches!
Hello Travis! First of all thanks for the videos 🙏
I encountered some problems when masking soil pixels. Somehow the division by 0 produces -3.40e+38 instead of NULL. Any idea how to fix this?
Edit: Solved it :D
In case someone encounter the same problem; It’s important to save the layer on the Disk. If you only working with temp files, the operation will fail. Apparently the name of the temp file is to long 🤦🏻♀️
Could you please explain, how to get the true colour image after masking?
If you already loaded true color images earlier, you can check the boxes in the layers panel to change what is displayed. Make sure the layer you want to see is checked, and there aren't any layers on top of it to "hide" it. If you haven't loaded true color layers, you can make them in Pix4D from RGB imagery or derived from multispectral imagery here: ua-cam.com/video/x_0l2y4Dfng/v-deo.html
@@travisparkerplantscience Sorry, I asked how to develop a new true-color raster (composite 5 bands) by using the mask layers
@@anarmilan8848 I don't usually make composites of the five bands, but you could do that using the "merge" function from the video in the link I just shared. Maybe also I'm a little confused because usually the true-color rasters are usually composites of three bands (Red Green Blue) rather than five. Let me know if that makes sense or if you still have questions
If you already have a composite map you are happy with, and want to mask soil or whatever, you can go to the raster calculator and put in "(name of your composite raster layer)"/ "(name of your masking layer)" and any pixels with '0' values in the masking layer will now be "NA" (no data) in the output you generate from this
@@travisparkerplantscience I performed the merge raster processing and got output. But pixel value for composite raster is ranges from 0 - 45000. But I got composite RGB from PIX4D which shows the rages from 0 -255. So could you please explain this variation?