Forum

Author Topic: GCPs and image registration  (Read 15050 times)

dowallin

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
GCPs and image registration
« on: August 24, 2016, 03:12:12 AM »
Greetings.
I just completed a mapping flight using a quadcopter and my final ortho images and the DEM does not align with my GCPs very well at all.

I ended up with just under 900 images covering an area of about 90 hectares. Prior to doing the flights, I put in 13 Ground Control points using a very nice Trimble GPS unit. I post processed the GPS data and the software tells me that all of the coordinates are good to within 5-15 cm. I have processed the imagery in Agisoft following the tutorial for v1.2 with GCPs. All of my images are geotagged but the accuracy of these geotags is questionable, but most of the images aligned. Following placement of the markers in Agisoft, I import the coordinates for each of the markers (longitude, latitude and altitude). Agisoft then calculates an "accuracy (m)", "Error (m)" and "Error (pix)." I'm not quite sure how to interpret these values or how they are derived. The error in meters is quite large, ranging from 4 to 164 meters!!?? (see attached). Given the info that I obtained when processing the GPS data, there is no way that these coordinates can be off by this much.

Can anyone explain what these accuracy and error values mean and how they are derived.

Ignoring this issue and moving on, I completed the processing to create an ortho and DEM. Within Agisoft, I've examined the results and, visually the imagery seems to line up very nicely with the GCPs (see attached example for GCP5). I'm interested in not just the agreement in the X and Y but also the alignment in the Z axis. I'm not sure if there is a way to compare this in Agisoft, so I exported both as TIFFs and brought them in to ArcGIS. I also imported the shapefile of the GCPs that the Trimble Pathfinder software creates.

In Arc, the GCPs do not line up well at all (see attached example for GCP5; green diamond is GCP location). They seem to be off by 2-9 meters or so in the X,Y direction. In Arc, I can also use the identify tool in Arc to get the X and Y coordinates for both the GCP point and the flagged location in the ortho that Agisoft creates. The coordinates for the GCP point agree with the GPS coordinates. The coordinates for the flagged location in the ortho do NOT match the GPS coordinates for this point.

I can also use the identify tool to get the height for both the GCP (recorded using the GPS unit) and the height from the DEM generated by Agisoft. They are not even close. In the case of GCP5, the GPS elevation is 157.15 meters and the elevation from the DEM for that same spot is 167.77 meters. The elevation for the flagged location of the GCP is 167.83. I'm seeing vertical errors of 2.5-10 m at the other GCPs as well.

I'm not really expecting centimeter-level accuracy here but being off by 2-9 meters in the XY and 10 meters in the Z direction seems very very bad. I need to be able to do much better than this.

Any suggestions?

Paulo

  • Hero Member
  • *****
  • Posts: 1592
    • View Profile
Re: GCPs and image registration
« Reply #1 on: August 24, 2016, 04:59:09 AM »
Dowallin,

from what I can see, you must do an Optimize camaeras after entering GCPs and marking them....
 this will adjust your camera intrinsics and extrinsics (camera position, orientation and calibration) to fit your GCPs. Use the Wand button in Reference pane....

What is obvious is the camera altitudes are missing as they are all 0 m which is obviously wrong.

Anyway the optimiszation will fit your photo set to GCPs as their input accuracy is 0.005 m while camera input positions have a accuracy of 10 m. In case of altitude it is really more for erroneous input of 0 m...

After optimization, you should get mean errors on your GCPs of some cms and resulting DEM and ortho will be quite precise...

Good luck,

Best Regards,
Paul Pelletier,
Surveyor

Paulo

  • Hero Member
  • *****
  • Posts: 1592
    • View Profile
Re: GCPs and image registration
« Reply #2 on: August 24, 2016, 04:54:36 PM »
I THINK i got it...

Points 12 and 13 haveswapped in the marking....

uncheck them and update, should give you a good result
Best Regards,
Paul Pelletier,
Surveyor

dowallin

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: GCPs and image registration
« Reply #3 on: August 24, 2016, 08:36:49 PM »
pap1956,

YES! Thanks very much. Dumb mistake in that I swapped pt 12 and 13. I fixed this and I'm re-running everything. And, for the first 15-20 images, the camera was not logging altitude correctly. All the remaining images have reasonable altitudes. After aligning the photos, Agisoft seems to correct these bogus altitudes but out of curiosity, I'm deleting these images for the current re-run of everything.

I'll post an update when I have it.

Thanks again!

D

Paulo

  • Hero Member
  • *****
  • Posts: 1592
    • View Profile
Re: GCPs and image registration
« Reply #4 on: August 24, 2016, 10:46:33 PM »
Great,

as for bogus altitudes, PS wil fix that as when you optimize, images are unchecked so they are free to move wo constraint....

The real altitude will be around 240 m as seen from error on these images....
Best Regards,
Paul Pelletier,
Surveyor

dowallin

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: GCPs and image registration
« Reply #5 on: August 29, 2016, 09:39:32 PM »
pap1956,
I've just rerun everything after correcting the swapped #12 and 13 coordinates. I also deleted the first 20 or so images that lacked valid altitudes. And excluded 3 of my GCPs. One of my GCPs (#10) only appeared in 5 images and two other GCPs (#9 and 13) seemed to have pretty high "Error" values reported by Photoscan (though I remain unclear on where this value comes from (see attached). I also note that the "Error" reported for my images is pretty high ranging from about 4-50 meters but generally in the 10-20 m range. I'm not surprised by the error in these geotagged coordinates for each image since this is based on an instantaneous GPS position logged by the internal GPS in my Canon S100 camera.

I ran the Lens software on sample images from my camera, loaded these into PS and checked the Fix Calibration flag as instructed in the V1.2 (with GCP) tutorial. And I used all of the default settings in this tutorial for the various steps.

In the optimize camera alignment step, I'm wondering if I should have used a value of greater than 10 m (the default) for the camera accuracy setting given the reported error for my camera locations.

Since I imported camera parameters from Lens and set the Fix Calibration flag, the Optimize procedure doesn't do anything.

After completing all of the processing, I exported the ortho and DEM and brought it into ArcMap so I could compare the alignment of the image and the DEM with the GCPs.

The results are better but still not great. Average error in the XY dimension is 1.67 meters (range 0.48-4.17) and the RMS error in the Z dimension is 3.59 using just the 10 primary GCPs but increases to 5.73 including all 13 GCPs. A screenshot of my excel file is attached.

Any suggestions for improving my image registration would be greatly appreciated.

D


Paulo

  • Hero Member
  • *****
  • Posts: 1592
    • View Profile
Re: GCPs and image registration
« Reply #6 on: August 30, 2016, 01:59:34 AM »
I would say that if your GCPs coordinates are correct, after optimize the errors reported on the GCPs should be in the cm range nor meter!

I would try this, uncheck all your cameras (so that their input coordinates are not constrained) and Uncheck Fix camera parameters (let the program edtimate  the camera parameters to fit best your control).

Do optimize and should get cm errors on your checked GCPs...

If not there are some gross errors in your surveyed GCP coordinates...

By the way what is your camera ?
Best Regards,
Paul Pelletier,
Surveyor

dowallin

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: GCPs and image registration
« Reply #7 on: August 30, 2016, 08:22:54 AM »
pap1956,
Good suggestion. I did this and, as you predict, my errors are now in the cm range. So now I assume that I need to redo the dense point cloud generation and all of the subsequent steps?

Thanks very much for your help!

And I'm using a Canon S100 and the KAP_UAV script with CHDK. I'm flying a 3DR Solo and using Mission Planner.

D

Paulo

  • Hero Member
  • *****
  • Posts: 1592
    • View Profile
Re: GCPs and image registration
« Reply #8 on: August 30, 2016, 04:34:33 PM »
Good news!

After Optimize, you have to redo dense cloud and all subsequent steps!

As your tie points have been recalculated according to optimized camera ppsitions and calibration,

Good liuck
Best Regards,
Paul Pelletier,
Surveyor

dowallin

  • Jr. Member
  • **
  • Posts: 58
    • View Profile
Re: GCPs and image registration
« Reply #9 on: August 31, 2016, 08:58:33 PM »
pap1956,
I just completed the dense point cloud and all subsequent steps, exported the DEM and ortho to Arc and checked the horizontal and vertical alignment of all 12 GCPs. Everything looks GREAT! Average horizontal error of 3 cm. RMS error for elevations of 6 cm.

Can't ask for better than that!

Thanks VERY much for your help!

Regards,
D

Cyrielle

  • Newbie
  • *
  • Posts: 1
    • View Profile
Re: GCPs and image registration
« Reply #10 on: September 10, 2020, 09:26:19 PM »
Hi there,
I know this post has been closed for a while but I have exactly the same issue with the GCPs matching the target location in Agisoft but having a 2.3m discrepancy in ArcGIS. I did the camera optimization already, however, Paulo talks about Uncheck Fix camera parameters in reply #6. I am working on Agisoft 1.6 and can't find where this option.
Can anyone help me with this?

Thanks.

dpitman

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
Re: GCPs and image registration
« Reply #11 on: September 10, 2020, 11:09:07 PM »
Are you certain that you have specified the same coordinate reference system for all factors and in both applications?

Alexey Pasumansky

  • Agisoft Technical Support
  • Hero Member
  • *****
  • Posts: 15660
    • View Profile
Re: GCPs and image registration
« Reply #12 on: September 11, 2020, 09:04:42 PM »
Hello Cyrielle,

As far as I understood in the Reply #6 it is suggested to uncheck all the cameras in the Reference pane and to make sure that there are no fixed parameters in the Camera Calibration dialog.
Best regards,
Alexey Pasumansky,
Agisoft LLC

dpitman

  • Sr. Member
  • ****
  • Posts: 261
    • View Profile
Re: GCPs and image registration
« Reply #13 on: September 11, 2020, 10:00:58 PM »

As far as I understood in the Reply #6 it is suggested to uncheck all the cameras in the Reference pane and to make sure that there are no fixed parameters in the Camera Calibration dialog.

Hi Alexey,

In the new published tutorial, this step, as well as the specification of high accuracy on the Markers and low accuracy on the images (cameras) has been removed.

Is Agisoft's recommendation on this workflow changed?

https://www.agisoft.com/forum/index.php?topic=12551.0