Forum

Author Topic: Workflow to process the Photography of "PHANTOM 4 RTK"  (Read 39770 times)

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Workflow to process the Photography of "PHANTOM 4 RTK"
« Reply #30 on: January 17, 2019, 01:05:52 PM »
Hello Steve,

The accuracy values for the coordinates should be properly read from XMP, providing that you have enabled "Load camera location accuracy from XMP meta data" in the Advanced preferences tab.

If it doesn't happen, please provide any example of the image that you are using (either via forum or via email to support@agisoft.com).
Best regards,
Alexey Pasumansky,
Agisoft LLC

Eirik Strøm Pedersen

  • Newbie
  • *
  • Posts: 6
    • View Profile
Re: Workflow to process the Photography of "PHANTOM 4 RTK"
« Reply #31 on: January 17, 2019, 01:25:40 PM »
Hello Steve,

The accuracy values for the coordinates should be properly read from XMP, providing that you have enabled "Load camera location accuracy from XMP meta data" in the Advanced preferences tab.

If it doesn't happen, please provide any example of the image that you are using (either via forum or via email to support@agisoft.com).

Does anyone know if the data in the Timestamp.mrk file are calibrated between the antenna position and center sensor camera? 

Smiki007

  • Newbie
  • *
  • Posts: 5
    • View Profile
Re: Workflow to process the Photography of "PHANTOM 4 RTK"
« Reply #32 on: January 18, 2019, 12:47:33 AM »
Hello partners:
I am trying to process a set of photographs taken with the Phantom 4 RTK.
The photographs have in their metadata the precisions in XYZ with which they were made.
When I upload the photos in the PhotoScan 1.4.3 does not recognize that data, it gives me the precision that PhotoScan has by default. 10 meters.
I have tried to load the same photos in Pix4D, if you load the precisions of XYZ (attached photograph).
Can someone tell me the workflow to process the photos taken with the Phantom 4 RTK?
Thank you very much for your cooperation and sorry for my English.
Greetings.
Domingo,
here you have the link: (https://mega.nz/#!0h4g3SSb!z9x0wQSzrwfybQdr_qRZSefbt8cLh5CNcWSmNcyJKro), where I've processed your project without any problem in Agisoft Metashape (no problem at all importing RTK images, aligning photos, point cloud processing, 3d mesh, DSM Orthophoto, Report).
Cheers mate. ;)

BobvdMeij

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Re: Workflow to process the Photography of "PHANTOM 4 RTK"
« Reply #33 on: January 18, 2019, 10:26:00 AM »
Hello Steve,

The accuracy values for the coordinates should be properly read from XMP, providing that you have enabled "Load camera location accuracy from XMP meta data" in the Advanced preferences tab.

If it doesn't happen, please provide any example of the image that you are using (either via forum or via email to support@agisoft.com).

What about camera calibration information Alexey? We have enabled 'Load camera calibration from XMP meta data' but the Initial tab within the Camera Calibration pane remains empty, except for f which is set to 3648 by default. Strangely enough this number is nowhere to be found in either the metadata or the XMP file. On the contrary all other fields (cx, xy, k1-k3, p1-p2, etc.) remain empty/are set to 0.

The XMP data, however, does contain values for most of these parameters stored within a parameter called 'drone-dji:DewarpData='. It seems that the image's Northing/Easting/Altitude are correctly imported from the XMP file, but the camera calibration parameters are not (although both options are enabled under preferences).

Ps. I'm well aware of your doubts on the accuracy, applicability and environment-independent calibration parameters provided by DJI for a consumer grade camera. But as we're witnessing a structural shift in our outputted models, particularly in the z-axis, we are willing to give these a priori calibration parameters a try to see if this fixes the problem.

flyinlo

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Workflow to process the Photography of "PHANTOM 4 RTK"
« Reply #34 on: January 28, 2019, 01:53:10 AM »
I found this thread and hoping you guys can help.  The new P4 Pro RTK adds the following tags to the metadata.
(With sample data from an RTK photo)

Rtk Flag                        : 16
Rtk Std Lon                     : 2.70368
Rtk Std Lat                     : 1.53912
Rtk Std Hgt                     : 3.68277

I have an external Emlid Reach M+ GPS on my regular phantom 4 Pro.  I am post processing the flight data and events in EZsurv.  I export the data shown above for all images into a CSV file and  I need to import that into the metadata of the images.   Then they will be processed just like the P4P RTK images.

My problem has been finding an EXIF editor that I can figure out to import these XMP tags into the images.  My CSV file will contain

Image File name
Post Processed Lat
Post Processed Lon
Post Processed Alt

Lat Standard Deviation
Lon Standard Deviation
Alt Standard Deviation

For the updated GPS data, I will simply overwrite the coordinates currently in the EXIF data.  Then I need to add the new XMP tag data for the Standard Deviation.

Any help on the best program to use and how to do it will be appreciated.  I have played around with multiple exif editors and so far I have not found one where I can successfully add the custom data.   

Thanks again for any help you can provide.
Tim

Alex737

  • Newbie
  • *
  • Posts: 17
    • View Profile
Re: Workflow to process the Photography of "PHANTOM 4 RTK"
« Reply #35 on: January 28, 2019, 02:51:59 AM »
maybe you need this program
ttps://topodrone.org/reviews/toposetter/

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Workflow to process the Photography of "PHANTOM 4 RTK"
« Reply #36 on: January 28, 2019, 10:50:21 AM »
Hello Tim,

If you have the CSV file with the coordinates and accuracy information for them, you can import these values to Metashape Pro via Import CSV dialog - it would overwrite (in the project) the values derived from the image EXIF.
Best regards,
Alexey Pasumansky,
Agisoft LLC

flyinlo

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Workflow to process the Photography of "PHANTOM 4 RTK"
« Reply #37 on: January 28, 2019, 07:26:02 PM »
maybe you need this program
ttps://topodrone.org/reviews/toposetter/

Hi Alex,  Thanks for the link.  I already have a PPK solution for my Phantom 4 Pro, my only issue is updating the Image EXIF XMP data from a CSV file (which contains the PPK data).  It can be done.  I just have to figure out how.  The ExifTool program by Paul Harvey will most likely take care of it.  I will have to learn how to do it from the command line which is not my specialty.

flyinlo

  • Newbie
  • *
  • Posts: 3
    • View Profile
Re: Workflow to process the Photography of "PHANTOM 4 RTK"
« Reply #38 on: January 28, 2019, 07:39:36 PM »
Hello Tim,

If you have the CSV file with the coordinates and accuracy information for them, you can import these values to Metashape Pro via Import CSV dialog - it would overwrite (in the project) the values derived from the image EXIF.
Hi Alexey, I want to be upfront here.  I currently use a different processing platform but there seemed to be cross platform issues relating to the Image EXIF data.  So that is why I posted here as this particular thread had more activity concerning the P4P RTK EXIF data than any other thread.  The software package that I use does not accept the Accuracy data without the user providing the phi, omega, and kappa values :( 

rmowbs

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Workflow to process the Photography of "PHANTOM 4 RTK"
« Reply #39 on: March 07, 2019, 11:08:59 PM »
I have been doing some testing with the new P4R and getting some good results. I can't seem to enter the DJI dewarp Xmp data so that it means anything to Metashape, has anyone else yet? The auto adjusted camera parameters seem to been getting pretty good accuracy without GCP and even better just using 1 GCP.

Was flown with D-RTK2 base over known point shot with Trimble R10, lens correction turned off in RTK app. Ground control also shot with R10.

Coordinates converted to OSGB1936 in metashape before alignment and loading GCP.

I have tried to do a lens calibration with the chessboard in metashape but get very different parameters than what I see after a flight and optimisation. Anyone else been able to calibrate the P4R lens successfully with metashape?

Without running the optimisation the Z error is over 21cm but down to 6cm after. Using just one GCP tightens things up further to less than 3cm.

See reports https://drive.google.com/drive/folders/1LekTi82gf9Vq4cYkg_4s79YTnccYmgrr?usp=sharing

Let me know your thoughts.

Cheers


BobvdMeij

  • Full Member
  • ***
  • Posts: 157
    • View Profile
Re: Workflow to process the Photography of "PHANTOM 4 RTK"
« Reply #40 on: March 08, 2019, 10:54:29 AM »
I have been doing some testing with the new P4R and getting some good results. I can't seem to enter the DJI dewarp Xmp data so that it means anything to Metashape, has anyone else yet? The auto adjusted camera parameters seem to been getting pretty good accuracy without GCP and even better just using 1 GCP.

Was flown with D-RTK2 base over known point shot with Trimble R10, lens correction turned off in RTK app. Ground control also shot with R10.

Coordinates converted to OSGB1936 in metashape before alignment and loading GCP.

I have tried to do a lens calibration with the chessboard in metashape but get very different parameters than what I see after a flight and optimisation. Anyone else been able to calibrate the P4R lens successfully with metashape?

Without running the optimisation the Z error is over 21cm but down to 6cm after. Using just one GCP tightens things up further to less than 3cm.

See reports https://drive.google.com/drive/folders/1LekTi82gf9Vq4cYkg_4s79YTnccYmgrr?usp=sharing

Let me know your thoughts.

Cheers

Have you verified the correctness of the transformation parameters in Photoscan/Metashape for transforming coordinates from WGS84 to OSGB1936. We've found that the parameters in Photoscan for going from WGS84 to our Dutch National CRS are incomplete and partly outdated, resulting in a couple cm of deviations in all axis. Hence we're transforming the data outside of Photoscan first before importing into it for further processing.

rmowbs

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Workflow to process the Photography of "PHANTOM 4 RTK"
« Reply #41 on: March 09, 2019, 10:49:43 PM »

Have you verified the correctness of the transformation parameters in Photoscan/Metashape for transforming coordinates from WGS84 to OSGB1936. We've found that the parameters in Photoscan for going from WGS84 to our Dutch National CRS are incomplete and partly outdated, resulting in a couple cm of deviations in all axis. Hence we're transforming the data outside of Photoscan first before importing into it for further processing.

I have just ran the same survey without the transformation to OSGB1936, so keeping to WGS84 with GCP converted outside of Metashape and results are very close. So happy that using the OSGM15 geoid and transformation within Metashape seems to be working well, this speeds up the workflow. I have uploaded the accuracy reports to the same link before if you want to have a look.

Anyone found the best way to precalibrate the P4R lens for repeatable results?

RoryG

  • Jr. Member
  • **
  • Posts: 55
    • View Profile
Re: Workflow to process the Photography of "PHANTOM 4 RTK"
« Reply #42 on: March 10, 2019, 04:38:53 PM »
This is how I use the dewarp data in the XMP tags to calibrate the camera in Metashape:

Code: [Select]
<drone-dji:DewarpData> 2018-10-23;3662.110000000000,3655.160000000000,5.850000000000,-31.610000000000,-0.268279000000,0.110783000000,0.000693505000,-0.000105054000,-0.031359200000</drone-dji:DewarpData>

Date: 2018-10-23
fx: 3662.110000000000
fy: 3655.160000000000
cx: 5.850000000000
cy: -31.610000000000
k1: -0.268279000000
k2: 0.110783000000
p1: 0.000693505000
p2: -0.000105054000
k3: -0.031359200000


Where:

• fx, fy - focal length
• cx, cy - principal point coordinates
• K1, K2, K3, P1, P2 - radial distortion coefficients

As the camera calibration dialog in Metashape only supports and single value for f, I use the calibrated focal length tag from the XMP data;

<drone-dji:CalibratedFocalLength>3666.666504</drone-dji:CalibratedFocalLength>

In terms of the conversion to OSGB36 with the OSGM15 geoid inside Metashape, I've found it to do an excellent job. We recently did a survey that had to tie in with an existing traditionally surveyed area. We did use several check points surveyed using post processed solutions from a Reach RS+ then converted to OSGB36 using the OS Net online conversion tool, the resultant errors were around 2cm RMSE XY and 3cm RMSE Z. which was well within the tolerance.

rmowbs

  • Newbie
  • *
  • Posts: 7
    • View Profile
Re: Workflow to process the Photography of "PHANTOM 4 RTK"
« Reply #43 on: March 13, 2019, 11:40:37 PM »
This is how I use the dewarp data in the XMP tags to calibrate the camera in Metashape:

Code: [Select]
<drone-dji:DewarpData> 2018-10-23;3662.110000000000,3655.160000000000,5.850000000000,-31.610000000000,-0.268279000000,0.110783000000,0.000693505000,-0.000105054000,-0.031359200000</drone-dji:DewarpData>

Date: 2018-10-23
fx: 3662.110000000000
fy: 3655.160000000000
cx: 5.850000000000
cy: -31.610000000000
k1: -0.268279000000
k2: 0.110783000000
p1: 0.000693505000
p2: -0.000105054000
k3: -0.031359200000


Where:

• fx, fy - focal length
• cx, cy - principal point coordinates
• K1, K2, K3, P1, P2 - radial distortion coefficients

As the camera calibration dialog in Metashape only supports and single value for f, I use the calibrated focal length tag from the XMP data;

<drone-dji:CalibratedFocalLength>3666.666504</drone-dji:CalibratedFocalLength>

In terms of the conversion to OSGB36 with the OSGM15 geoid inside Metashape, I've found it to do an excellent job. We recently did a survey that had to tie in with an existing traditionally surveyed area. We did use several check points surveyed using post processed solutions from a Reach RS+ then converted to OSGB36 using the OS Net online conversion tool, the resultant errors were around 2cm RMSE XY and 3cm RMSE Z. which was well within the tolerance.

Was the 2cm and 3cm RMSE from using the DJI Dewarp calibration figures and fixing them? I have just ran the same dataset with my P4R Dewarp parameters fixed in the lens calibration and get massive errors on check points ~30 and 40cm. If I allow Metashape to adjust the precalibrated values the check point accuracy is back to ~4 and 3cm RMSE. My Xmp CalibratedFocalLength is also 3666.666504 and I'm not sure this is correct as the adjusted figure that gives the lower error is very different, more like 3630.

@Agisoft Does supplying precalibrated lens data that isn't fixed get taken into account when optimising alignment, or should we just allow Metashape to optimise the lens parameters from the start?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 14813
    • View Profile
Re: Workflow to process the Photography of "PHANTOM 4 RTK"
« Reply #44 on: March 14, 2019, 04:49:40 PM »
Hello rmowbs,

If the pre-calibrated data is used that is not fixed, such un-fixed parameters will be only used as Initial step for the autocalibration procedure.

If you fix the parameters before starting the alignment, then they wouldn't be adjusted during the alignment/optimization procedure.

I'm a bit skeptical regarding built-in parameters stored in the meta-information, and assume that autocalibration should be more effective. Or even performing regular "in-field calibration" over the area with GCPs and estimating the IO parameters based on both cameras and markers coordinates. Then re-using this information in the actual flights.
But such pre-calibration should be performed rather regularly. For example, once a month or even more frequent, depending on the number of flights, as the lens parameters could change due to mechanical reasons (during take-off/landing) or even temperature factor.
Best regards,
Alexey Pasumansky,
Agisoft LLC