align bands of P4 Multispektral
Uploading and Loding Picture ...(0/1)
o(^-^)o
Kellox
lvl.1
Germany
Offline

Hi Everyone,
I use a phantom 4 Multispektral to and want to calculate the NDVI. Since the Channels have an offset due to the lenses locations I made a python script to get a propper alignment.
It says in the manual, the offset is given in the RelativOpticalCenterX and RelativOpticalCenterY (https://dl.djicdn.com/downloads/p4-multispectral/20200717/P4_Multispectral_Image_Processing_Guide_EN.pdf). Those numbers are pixels and they are point numbers. I dont know how I can shift the matrix repesentation of an image for anything but integers. If round the Numbers, a small offset remains. I guess since DJI terra can calculate a NDVI, there is a way to get a perfect alignment. Does anyone have a solution for this?

Regards, Felix



2021-7-25
Use props
DJI Wanda
Administrator
Offline

Hello, Kellox. You can refer to the Image Processing Guide to calculate NVDI. Here is the link:
https://dl.djicdn.com/downloads/ ... essing_Guide_EN.pdf
2021-7-25
Use props
Kellox
lvl.1
Germany
Offline

Hi, thanks for your reply, I allready had a look on this guide as you can see in my post yet it doesnt answer the question regarding the floating point numbers. I was hoping to find some further explanation on how to do this aligntment.
regards
2021-7-26
Use props
LV_Forestry
First Officer
Flight distance : 4726654 ft
Latvia
Offline

Kellox Posted at 7-26 04:09
Hi, thanks for your reply, I allready had a look on this guide as you can see in my post yet it doesnt answer the question regarding the floating point numbers. I was hoping to find some further explanation on how to do this aligntment.
regards

Hi,
Are you trying to align a single picture (i mean the 5 band for one image) or a whole set of picture made during a flight ?
2021-12-18
Use props
Maulit.Almas
lvl.1
Kazakhstan
Offline


when starting the drone Phantom 4 multispectral, error application:unable to take off. mission cannot be performed in your area, height limited
2021-12-22
Use props
WETCOAST_JC
lvl.1
Spain
Offline

LV_Forestry Posted at 2021-12-18 12:32
Hi,
Are you trying to align a single picture (i mean the 5 band for one image) or a whole set of picture made during a flight ?

Hi LV_Forestry

I want to re-open this topic as I am having the same question for my project. I have made mosaics in DJI Terra for all bands. When I open these in QGIS you can see that pixels are slightly shifted due to positioning of the different lenses on the drone, BUT all mosaics share the exact same extent.

1) Do you know methods for aligning these mosaics such that pixel locations for a given feature are the same? I've tried 'raster alignment' in QGIS, but this doesn't fix the problem.

2) DJI Terra automatically generates mosaics containing NDVI, OSAVI etc. Does it take this displacement into account when generating those maps?


The reason I want an alignment for all mosaics of the different bands is because I am trying to create a mask that filters out shade in my OSAVI image. I was planning on using the 'raster calculator' in QGIS to set an expression based on shade values for all bands. However, if locations of features are not exactly the same in all mosaics, I cannot filter out the shade in the OSAVI image, as it is in a different location on each individual mosaic.

Thank you for your thinking with me. If you wish footage, let me know.
Greetings
2024-11-12
Use props
LV_Forestry
First Officer
Flight distance : 4726654 ft
Latvia
Offline

WETCOAST_JC Posted at 11-12 02:44
Hi LV_Forestry

I want to re-open this topic as I am having the same question for my project. I have made mosaics in DJI Terra for all bands. When I open these in QGIS you can see that pixels are slightly shifted due to positioning of the different lenses on the drone, BUT all mosaics share the exact same extent.

Following the link below, you will find everything you need to know to correct that. (page 4)
P4_Multispectral_Image_Processing_Guide_EN.pdf

A solution is also to reduce the speed to overcome the exposure issue. And also fly higher to reduce the resolution and therefore dilute the default.
2024-11-12
Use props
LV_Forestry
First Officer
Flight distance : 4726654 ft
Latvia
Offline

WETCOAST_JC Posted at 11-12 02:44
Hi LV_Forestry

I want to re-open this topic as I am having the same question for my project. I have made mosaics in DJI Terra for all bands. When I open these in QGIS you can see that pixels are slightly shifted due to positioning of the different lenses on the drone, BUT all mosaics share the exact same extent.

Next topic, OSAVI with P4M.

Yes indeed terra offers this possibility. But you need to be aware of a small detail before you start wanting to exploit the results.

OSAVI its   (1+Y)*((NIR-RED)/(NIR+RED+Y)) Feel free to correct me if iam wrong.

For its original formula NIR was used as 800nm and Red as 670nm.
Optimization of soil-adjusted vegetation indices - ScienceDirect

The fact is that the DJI camera does not deliver these spectral ranges.
Instead it uses a pseudo value which is generic to bands Red (R): 650 nm ± 16 nm and Near-infrared (NIR): 840 nm ± 26 nm.
Very far from the definition of the original formula.

In the image below it is the complete spectrum from 400nm to 1000nm with a bandwidth of 2nm of a pine needle.

1.png

The red arrows are the center values ​​of the bands of the DJI camera. Without even talking about the bandwidths you can see that there is a big trend problem. The value of the DJI camera for the RED is supposedly higher than the real value of the original formula, and for the NIR it is the opposite.

This gives a result like below, which is not bad, but be careful to remember the potential offset if we compare it with the same index calculated from data from another camera.

2.JPG
And finally, a little personal note to say that I use Metashape Agisoft. I have no commercial connection with them, I bought my license at the regular price. That said, it manages the offset of the cameras from the XMP data well, because yes the relative offset is indicated for each image, but it is in pixels so if you want to do an image by image analysis do not forget to shift accordingly. If you work with software that manages coordinates like Metashape then it's good, they are corrected. I think Terra must also manage it, but I have already had very strange results with this software, so nothing surprising.

2024-11-12
Use props
LV_Forestry
First Officer
Flight distance : 4726654 ft
Latvia
Offline

WETCOAST_JC Posted at 11-12 02:44
Hi LV_Forestry

I want to re-open this topic as I am having the same question for my project. I have made mosaics in DJI Terra for all bands. When I open these in QGIS you can see that pixels are slightly shifted due to positioning of the different lenses on the drone, BUT all mosaics share the exact same extent.

And about QGIS i think a simple plugin like "freehand raster georeferencer" should do the job.
You add "AD" a raster then you move "MO" it according to reference point that you have previously displayed.
2024-11-12
Use props
WETCOAST_JC
lvl.1
Spain
Offline

LV_Forestry Posted at 11-12 10:16
Following the link below, you will find everything you need to know to correct that. (page 4)
P4_Multispectral_Image_Processing_Guide_EN.pdf

I know you don't use DJI Terra, but am I correct to assume that the DJI software automatically performs all the steps shown in that document to calculate the NDVI? They made the document and the software, so it would be local it it were
2024-11-13
Use props
WETCOAST_JC
lvl.1
Spain
Offline

LV_Forestry Posted at 11-12 11:25
Next topic, OSAVI with P4M.

Yes indeed terra offers this possibility. But you need to be aware of a small detail before you start wanting to exploit the results.

Thank you for your extensive reply.

The fact that different bands are used to calculate the OSAVI is not a problem for my study, as in the end I am interested in the vegetated zones, and not persé the OSAVI value itself. I want to obtain interpolated biomass values for my study area, using spectral indices.

Futhermore, when using Agisoft, does the program automatically take this camera displacement into account, or do you have to fix that yourself? I looked for tutorials online and it appears that it would be done automatically.
2024-11-13
Use props
WETCOAST_JC
lvl.1
Spain
Offline

LV_Forestry Posted at 11-12 11:32
And about QGIS i think a simple plugin like "freehand raster georeferencer" should do the job.
You add "AD" a raster then you move "MO" it according to reference point that you have previously displayed.

I tried this, but the resolution of the drone is so high that it is very hard to perform this manual correction without clear ground control points (they were not yet installed in my area when I took the image). In other words, it is very hard to exactly indicate where one pixel has moved to in a different image.
2024-11-13
Use props
LV_Forestry
First Officer
Flight distance : 4726654 ft
Latvia
Offline

WETCOAST_JC Posted at 11-13 01:46
I know you don't use DJI Terra, but am I correct to assume that the DJI software automatically performs all the steps shown in that document to calculate the NDVI? They made the document and the software, so it would be local it it were

I can't make any assertions about what Terra does or doesn't do. The ideal would be for you to share a raw dataset with me, I'll run it through Metashape and we'll compare what you get with Terra.

Because the offset may come from your settings.
2024-11-13
Use props
Advanced
You need to log in before you can reply Login | Register now

Credit Rules