Use of NDVI to create spot spraying map

I want to use the NDVI map to create a spot spraying map in a fallow situtaion. When I get the scaling of the NDVI correct, the NDVI does a great job at locating anything green in the paddock. I just need something like the magic tool to create a spot spraying map based on a grid of where the pixels of the minimum NDVI values start that I set manually and automatically generating the same map that the magic tool does. But, without me having to select which squares to keep and which ones to go.

Hi Jared,

You request makes complete sense. We will have this in mind for the future. The workaround you can follow is, first, follow Soil and plant masking w/ Pix4Dfields.
Soil masked map


(nir-red)/(nir+red) + 0/max(0; (nir-red)/(nir+red) - 0.4)

Once you mask out the soil, you can run the Magic Tool over and select all the area of the new orthomosaic.

Let us know,

1 Like

Hi Jared,

what you want to do, can be achieved with the MagicTool. Just set the scaling of the NDVI layer like you want it to be and than just start the MagicTool on it, like this:

What do you think ?

1 Like

Hi Julius, it’s close, but doesn’t seem to work well enough for what I need (Either not capturing all the squares with pixels or leaving some without pixels to be sprayed. Basically what I need is, if there is even a single pixel in a square on the grid, I’m going to assume its a weed, assuming that I scaled the data correctly and it needs to be sprayed. If there is one pixel present in the square, I want to spray it, if there are no pixels in the square, I don’t want to spray it. I need a way of ensuring that no squares are missed with the scaled input that I created.

Thanks Jose, that equation works well. Can you explain this part " 0/max(0; (nir-red)/(nir+red)"? What does the semi colon do?

Refers to a range between 0 and the estimated value.

This is exactly what I need. I would LOVE to have this feature in Pix4D. Up until now I have been using QGIS for this part of my workflow, but it would save so much time if I could do it all in Pix4D.

The Magic Tool is great but it just doesn’t seem to work the way I need it to. I can never get it to select every grid cell containing weeds without it selecting a bunch of empty grid cells that don’t need to be sprayed.

We will build exactly this feature, it will come this year. cheers.


That’s great news! Thanks very much