Forum

Author Topic: Work Flow for GCP  (Read 111389 times)

geomaticist

  • Newbie
  • *
  • Posts: 14
    • View Profile
Work Flow for GCP
« on: October 12, 2017, 05:08:20 AM »
I am trying to figure out a best practice work flow.  My goal is to make ortho-mosiacs that are as accurate as possible with the given data I have. I can get as accurate GCP I want since I am a land surveyor.

Normally I would run Load photos, they will have exif data. I then run convert locations to some projection. Then Align Photo. Using the appropriate settings. Then I bring in GCP as markers.

At this point I am unsure the best way to proceed.

Some say to then uncheck the image references. Only check the markers. Then to go run the Align Photos again, this time with only the GCP. OK. If so obviously the first time you run Align would be with low settings, then add markers, then run it with high settings. But ...

Why bother? I am confused by that. Shouldn't I just move on to another step. Like edit the sparse cloud by gradual selections. Then go do the Camera Optimization? Seems this is actually applying the GCP added as markers and taking advantage of the sparse cloud being edited of outliers.

Why do some people go back and run Align Photos again instead?

Also ... the photoscan manual is confusing. It refers to 'Align Photos', "Camera Optimization', and 'photo alignment optimization'. Are those three different things, or same thing with minor tweaks, or what?

Finally, I am wondering about something else. If you have super accurate exif (GPS) because you find some way to post process your positions. Lets say you can get it to 1mm accurate. just for argument. It seems to me that still the sparse cloud will not be as precise as that - because the 'actual internal and external camera orientation parameters being estimated are from the IMAGE DATA ALONE'. I assume that all air control can do is speed up processing as the images are know not need to look for matches in some of the other images.

Reason I ask if that I assume you can get some precision in the tie points based on how well you optimize. But that the higher accurate exif positions will only contribute up to a point, or maybe not much at all 'image data alone ...'.

So if you introduce markers, that are GCP, then you will only improve the precision. And that is the only way? 

I am thinking that the precision of the tie points, in this example, will not be 1mm. And be some unknown amount. And you cannot know what that is until you add in some markers. Then ... the markers had better be more accurate than the unknown accurate tie points ...

Hopefully someone out there can understand this. I am trying to get as tight a set of dense cloud points and ortho-mosiac as possible. With the best workflow. The photoscan manual seems to know really get into this. I have the ability to get as accurate GCP to use as markers as physicaly possible. I know how to do positional accuracy. What is the best work flow, and where can I read advanced info on using GCP or using accurate air control?

geomaticist
« Last Edit: October 12, 2017, 05:21:39 AM by geomaticist »

SAV

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
Re: Work Flow for GCP
« Reply #1 on: October 12, 2017, 10:48:43 AM »
Hi geomaticist,

Here is what I think is the 'best practice workflow' to process UAV survey datasets with highly accurate ground control points (surveyed using cm accuracy RTK GPS). Note that this is my 'optimised' workflow for imagery acquired by DJI drones (Inspire 1, Phantom 4 Pro, Mavic Pro).

1. Import Photos

2. Manually remove images that are obvious 'outliers' (e.g., images that have been taken before take off etc)

3. Convert GPS coordinates of your geotagged images (WGS84) to match the coordinate system of your ground control points (GCPs) which will be imported later. Note that the altitude information stored in the EXIF data of imagery acquired by DJI drones is the relative altitude from the point of take off and not the absolute/real world altitude. Here are 3 ways to fix this issue: http://www.agisoft.com/forum/index.php?topic=4986.msg38769#msg38769

4. Estimate image quality. Disable all images that have an image quality below 0.7

5. Generate masks if necessary (for example, if you don't want to include cars or other moving objects). Optional.

6. Align photos (quality HIGH, pair preselection: REFERENCE, key point limit: 40,000, tie point limit: 4,000, adaptive camare model fitting: YES). Note that you do not need to run the image alignment process twice if you follow this workflow.

7. Import list of ground control points (also include the X/Y/Z accuracy values)

8. Verify and link markers to images (use FILTER BY MARKERS by right clicking on GCP). Because the acquired images and the markers now have the same coordinate reference system, it should be easy to find and mark your GCPs in your images. Mark each GCP in 3-6 images. That should be sufficient. When finished, press the UPDATE button in the reference pane.

9. Assuming that you have a sufficient number (~8 or more)  of high accuracy ground control points, uncheck all images in the reference pane and also uncheck a few GCPs (20 to 30%) in order to use them as check points instead of control points. This will give you a better measure of the 'real accuracy' of your dataset. Note that the layout/distribution of GCPs is very important (as pointed out by JMR). If you have been able to correct the EXIF altitude information for all your cameras (see point 3), then you do not have to uncheck the cameras in the reference pane. They can be used as reference as long as the right camera accuracy settings (leave default 10m) have been chosen.

10. Clean sparse point cloud (EDIT > GRADUAL SELECTION). Remove all points with high reprojection error (choose a value below 1, I suggest to use 0.5-0.8 ) and high reconstruction uncertainty (try to find the 'natural threshold' by moving the slider).

11. Adjust your bounding box

12. Optimize camera alignment (magic wand button)

13. Build dense cloud (I would normally choose HIGH or MEDIUM quality, but it depends on what you want to do with the data and on your hardware including CPU, GPU and RAM)

14. Build mesh (not needed if you just want a DEM and/or orthophotograph)

15. Build texture (not needed if you just want a DEM and/or orthophotograph)

16. Build DEM (from dense cloud)

17. Build Orthomosaic based on DEM

DONE  8)


I hope that makes your life a little easier.

Regards,
SAV




« Last Edit: July 22, 2019, 07:40:45 AM by SAV »

SAV

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
Re: Work Flow for GCP
« Reply #2 on: October 12, 2017, 10:54:04 AM »
Hi geomaticist,

Here is what I think is the 'best practice workflow' to process UAV survey datasets with highly accurate ground control points (surveyed using cm accuracy RTK GPS). Note that this is my 'optimised' workflow for imagery acquired by DJI drones (Inspire 1, Phantom 4 Pro, Mavic Pro).

1. Import Photos

2. Manually remove images that are obvious 'outliers' (e.g., images that have been taken before take off etc)

3. Convert GPS coordinates of your geotagged images (WGS84) to match the coordinate system of your ground control poins (GCPs) which will be imported later

4. Estimate image quality. Disable all images that have an image quality below 0.7-0.85

5. Generate masks if necessary (for example, if you don't want to include cars or other moving objects)

6. Align photos (quality HIGH, pair preselection: REFERENCE, key point limit: 40,000, tie point limit: 4,000, adaptive camare model fitting: YES). Note that you do not need to run the image alignment process twice if you follow this workflow.

7. Import list of ground control points (also include the X/Y/Z accuracy values)

8. Verify and link markers to images (use FILTER BY MARKERS). Because the acquired images and the markers now have the same coordinate reference system, it should be easy to find and mark your GCPs in your images. Mark each GCP in 3-6 images. That should be sufficient. When finished, press the UPDATE button in the reference pane.

9. Assuming that you have a sufficient number of high accuracy ground control points, uncheck all images in the reference pane and also uncheck a few GCPs in order to use them as check points instead of control points. This will give you a better measure of the 'real accuracy' of your dataset.

10. Clean sparse point cloud (EDIT > GRADUAL SELECTION). Remove all points with high reprojection error (choose a value below 1, I suggest to use 0.5-0.8 ) and high reconstruction uncertainty (try to find the 'natural threshold' by moving the slider).

11. Adjust your bounding box

12. Optimize camera alignment

13. Build dense cloud (I would normally choose HIGH or MEDIUM quality, but it depends on what you want to do with the data and on your hardware)

14. Build mesh (not needed if you just want a DEM and/or orthophotograph)

15. Build texture (not needed if you just want a DEM and/or orthophotograph)

16. Build DEM (from dense cloud)

17. Build Orthomosaic based on DEM

DONE  8)


I hope that makes your life a little easier.

Note that if you used a UAV that records highly accurate camera station coordinates (= air control points), you would simply ignore step 7, 8, and 9 of the workflow mentioned above.

Regards,
SAV

SAV

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
Re: Work Flow for GCP
« Reply #3 on: October 12, 2017, 10:55:16 AM »
Oops, I thought I was only editing my previous post  ;D

I simply added this line to it:

Note that if you used a UAV that records highly accurate camera station coordinates (= air control points), you would simply ignore step 7, 8, and 9 of the workflow mentioned above.

Regards,
SAV

geomaticist

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Work Flow for GCP
« Reply #4 on: October 12, 2017, 07:00:08 PM »
Very grateful SAV. Thank you. If air control is used, very high accuracy, will it get as good of results? I am having a hard time pinning that down. Since I think the algorithm will only use the images to estimate the parameters. Well it uses the air position, but seems only to use that to speed up processing by excluding looking for pairs where there is no image overlap.

I mean even if you said your reference positions are accurate to 1mm. Wouldn't the algorithm shrug that off and find the key points it believes exists, wherever it actually does - and end up getting an image position of its own. And therefore show that as 'error' in the top panel (images with reference).

I realize there is no such thing as 1mm accurate air control. I am asking this to see if investment should be made in super good air control (which is expensive and not simple), versus just plugging in GCP instead and accept typical crappy air positions. I already know that GCP woks fine. I do get some data that has pretty good air control ... but I am skeptical that in the end it really gets applied.

Anyhow ... very grateful for your reply. I didn't think there could be a very good reason to run Align Photos a second time ... seemed you would just be running all the optimizations afterwards anyhow.

SAV

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
Re: Work Flow for GCP
« Reply #5 on: October 13, 2017, 01:49:08 AM »
Hi geomaticist,

Using cm accuracy air control points allows you to achieve the same accuracy compared to cm accuracy ground control points. Theoretically it might be even more accurate because you generally have many more air control points (= number of images) then you would have ground control points.

I've done some tests where I first estimated the accurate location of geotagged UAV imagery based on cm accuracy ground control points. Then I used the estimated geolocation of the pictures (cm accuracy) and removed all ground control points from the project and tried to reconstruct the scene without them. The resulting model had basically the same cm accuracy as the one that used GCPs. You can do the same test yourself  ;)
Moreover, there have been quite a few tests by UAV manufacturers that have integrated PPK/RTK capabilities in their fixed wing drones and they all seem to achieve cm accuracy without GCPs. You just need to check the HRMS and VRMS values for each geotagged images, which is normally recorded as well. But the same is true for GCPs, where the error gets much higher when you are recording in FLOAT instead of FIXED.

Consider that ground control points are actually the most time consuming step in the whole workflow. Not just during acquisition (you have to position them in the field first, then you have to survey them, then you have to pick them up) but also during processing (you have to mark them in the imagery). Additionally, for complex surveys or in tricky environments (e.g., steep cliffs) it can be quite difficult to set them up.
 
Long story short, if you can afford a UAV with cm accuracy PPK/RTK capabilities, then go for it. It will cost more at the beginning, but the more surveys you do the sooner it will pay off just considering the time you've saved.
There are quite a few fixed wing UAVs on the market which have PPK/RTK capabilities. However, there are not many off-the-shelf multirotor UAVs which can do it. Note that there are DJI drones with RTK capability, but it is not really appropriate for surveying because it is mainly used for navigational purposes.
If you are on a limited budget, you might be better off sticking to the 'traditional' workflow using cm-accuracy ground control points.

I hope that helps.

Regards,
SAV


« Last Edit: October 13, 2017, 01:54:48 AM by SAV »

geomaticist

  • Newbie
  • *
  • Posts: 14
    • View Profile
Re: Work Flow for GCP
« Reply #6 on: October 13, 2017, 03:52:58 AM »
are you saying you used GCP to get image positions good to cm. Then you backwards saved those image locations back into the images, I suppose as exif. As a kind of cheat way to simulate having cm quality image positions from air?

Then saved them, then started new project, loaded them in and they have 'air' reference positions. Then ran workflow with no GCP, and got almost same answer?

Is that what you are saying? If so then answers my question, and basically means I don't quite get how it worked out. (in photoscan.) I don't understand HOW it uses the air positions. he manual says it only uses the images to estimate parameters. So I am puzzled.

I know rtk,ppk, stuff exists. I don't know if it is being fed into photoscan and resulting in cm level results. I assumed they had to use some specific software - that cam with the units. Like Topcon or Leica or something. ??


SAV

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
Re: Work Flow for GCP
« Reply #7 on: October 13, 2017, 06:27:52 AM »
Hi geomaticist,

Quote
are you saying you used GCP to get image positions good to cm. Then you backwards saved those image locations back into the images, I suppose as exif. As a kind of cheat way to simulate having cm quality image positions from air?

Then saved them, then started new project, loaded them in and they have 'air' reference positions. Then ran workflow with no GCP, and got almost same answer?

Yes, that's correct.

Quote
Is that what you are saying? If so then answers my question, and basically means I don't quite get how it worked out. (in photoscan.) I don't understand HOW it uses the air positions. he manual says it only uses the images to estimate parameters. So I am puzzled.

If your images are geotagged, then PhotoScan will use their location information (unless you uncheck them in the reference pane). This is why all your images are also listed in the reference pane, because they are used as a 'location reference' too, similar to ground control points.

Regarding RTK/PPK. The trickiest thing with RTK/PPK is to sync the camera shutter signal with the GPS signal (it has to be within a few milliseconds to achieve cm accuracy air control points). This is often done via a cable to the 'hot shoe' of your camera where you would normally attach an external flash.
RTK/PPK solutions provide you with a photo reference file that you would simply import into PhotoScan, the same way as you do with ground control points. But instead of the label/name of each ground control point you would have the name of each image listed next to the X/Y/Z coordinates. See example below.

Code: [Select]
DJI0001.jpg    Xcoord   Ycoord   Zcoord  Xaccuracy   Yaccuracy   Zaccuracy
No specific software needed. PPK (= post processing kinematics) needs some post processing (as the name already suggests) in order to compute cm accuracy locations. This can be done using open source software (RTKLIB).

I hope I was able to clear up the fog a little  ;D

Regards,
SAV
« Last Edit: October 13, 2017, 07:02:17 AM by SAV »

SAV

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
Re: Work Flow for GCP
« Reply #8 on: October 20, 2017, 02:57:07 AM »
Hi geomaticist,

Here is something that might be of interest for you:
 
Quote
Survey precision under direct georeferencing could be 2–3 times better than from GCP-control.
James et al 2017 (EARTH SURFACE PROCESSES AND LANDFORMS)

James et al have done some extensive research on marker precision. Their work suggests that photogrammetric models based on 'air control points' with cm accuracy are more accurate than models that have been processed using traditional GCPs at cm accuracy.

You should definitely consider this when buying a new UAV. You probably want something with true RTK/PPK capabilities. Besides making data acquisition faster (no 'time-consuming' GCP setup/survey needed), it also gives you better results.

Regards,
SAV
« Last Edit: October 20, 2017, 03:00:39 AM by SAV »

MapSender

  • Newbie
  • *
  • Posts: 16
    • View Profile
    • 4DMapper
Re: Work Flow for GCP
« Reply #9 on: October 23, 2017, 01:20:30 PM »
for the PPK solution I'd suggest to take a look at verity positioning system which is compatible with any drone any camera at http://www.veritypositioning.com

JMR

  • Hero Member
  • *****
  • Posts: 522
    • View Profile
Re: Work Flow for GCP
« Reply #10 on: October 23, 2017, 06:48:43 PM »
Hello, Geomaticist: we have been Agisoft reseller's for long time and now we also have created a PPK turn key solution for photogrammetric surveys so can tell SAV is right. Our product has a distinctive advantage over competitors as it uses two independent intertial units to monitor uav frame and camera attitudes at the same time, thus allowing accurate offset corrections even in the case of gimbal mounted cameras with off centered camera rotations. If you are interested, please do not hesitate to contact me. info (at) geobit.es


jazzyj

  • Jr. Member
  • **
  • Posts: 87
    • View Profile
Re: Work Flow for GCP
« Reply #11 on: December 16, 2017, 11:05:53 PM »
I’m looking at doing a large top survey of 700 acres and I need absolute position accuracy within 10 inches (25 cm.) It’s widely accepted then you need a GSD of 1/3 that. I’ll have better due to altitude limitations unless I launch from a hill. Let’s say I’ll have 5cm/pixel GSD.

There seems to be no definitive information out there regarding the number of GCPs I would need to insure the geolocation data of the resulting work product my geolocation data will be accurate to within 25cm.  Even in SAV's great workflow post use see:

9. Assuming that you have a SUFFICIENT/b] number of high accuracy ground control points...

How do you determine what is a "sufficient" number of GCPs?  I can't find any guidelines anywhere on the Internet after exhaustive searches!

For all I know, with my accuracy requirements, maybe all I need is one GCP as an absolute coordinate "anchor" so I can later conver to the local coordinate system.  A big question is, would it be necessary for me to adjust (I don't use the word 'correct') the geolocation data in the EXIF information of the photos by noting the difference in X Y and Z coordinates of the drone with the GCP and run a script on the photos to get them more in line with the GCP?

My other low-cost strategy would be to buy an Emlid Reach RS, just one, and set it at 5-10 GCPs for a few minutes and log the data. I could then use a free or low-cost subscription to a CORS network and perform PPK to correct the coordinates of the GCPs in post processing.

So the million dollar question is essentially how do you determine the number of GCPs you need to be able to disregard the geolocation data in the photos and still achieve the accuracy you want? 

JMR

  • Hero Member
  • *****
  • Posts: 522
    • View Profile
Re: Work Flow for GCP
« Reply #12 on: December 17, 2017, 10:59:00 PM »
The question is not just the number, but the right distribution. 100 control point perfectly aligned help almost as little as  just two. So the number largely depends on the shape of the area you are mapping. For example 700acres enclosed by a convex shape with an aspect ratio (longest/shortest distance) between 5 and 1  could be probably well constrained by a regularly spaced set of 20GCPs. If the area is very long or has a complex shape, you might require more points.
You do not need to touch the geotags in exif.
To buy one Reach and try is not my best recommendation. Even if it is affordable, you require time and skills to integrate, time and skills to do the ppk and even more skills to understand everything that is involved in the results...
So my humble advise is, save money and pay a registered surveyor for the 20 to 40 points. In this way you will have a trustable ground control network in your project and you will be confident that you can deliver the accuracy that is required.
Using just one receiver is not recommended in any case, at least not if you don't know positively that you can rely on the solution given the location (baselines) of reference stations near to the site.

gEEvEE

  • Jr. Member
  • **
  • Posts: 66
    • View Profile
Re: Work Flow for GCP
« Reply #13 on: December 18, 2017, 07:30:53 PM »
Hi JMR,

of course, the amount of GCPs and their distribution are as important as the accuracy of their coordinates as well as the accuracy by which you indicate them on your images (and - not to forget - the fact that you have to include them in your bundle adjustment, and not just indicate them after the SfM step and simply continue).

The relationship between all these variables is non-trivial and as such, there are indeed no hard guidelines. However, the following article in the Journal of the American Society for Photogrammetry and Remote Sensing should shed some light on this issue: http://www.asprs.org/a/publications/pers/2017journals/PERS_April2017_Flipping_Public/HTML/files/assets/basic-html/index.html#255

All the best,

Geert
« Last Edit: December 18, 2017, 07:34:12 PM by gEEvEE »

SAV

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
Re: Work Flow for GCP
« Reply #14 on: December 19, 2017, 06:22:15 AM »
Hi again geomatecist,

As correctly mentioned by JMR, the distribution of GCPs is also very important, not just the amount of GCPs.
GCPs should be evenly distributed throughout the survey area in both directions, horizontally and vertically. For example, if you were mapping a cliff, you should place GCPs at the top part as well as the bottom part of it.

Think about the area you would like to survey as a piece of cloth where each GCP is a pole below it to 'support it'. If you only put GCPs at one corner of the cloth, it will be 'supported' in this small region, but the rest is 'hanging down' and not very well constrained. You would like to distribute all your points throughout the area so the cloth isn't hanging down or touching the ground.

Another consideration when using GCPs is the visibility of them in your UAV imagery. You should try to place them in 'open areas' away from steep surfaces such as cliffs in order to see them in as many images as possible.

And last but not least, what about the 'sufficient number' of GCPs?
In general, I suggest to collect 8-20 GCPs. Use ~70% of them as control points and the rest of them as check points. I've seen studies where they suggested that using more than ~10 GCPs does not contribute much to increasing the accuracy. For example if you collect 14-15 GCPs and use 10-11 of them as control points, you should be OK (image quality permitting).

Regarding the Reach RS. I've not used it myself, but it seems to be a very good RTK/PPK solution (great value for money). Reviewers seem to be really happy with the accuracy they get from it. There is some 'technical background knowledge' necessary though to achieve reliable results.

I personally think that the future lies in UAVs that have PPK/RTK capabilities which completely eliminates the need of ground control points and instead uses the highly accurate location of each image ('air control points'). This means that you will then have as many 'air control points' as you have images, which is never the case when using ground control points.

All the best.

Regards,
SAV