Forum

Author Topic: Orthomosaic for council tax calculation  (Read 4716 times)

Bene

  • Newbie
  • *
  • Posts: 37
    • View Profile
Orthomosaic for council tax calculation
« on: March 14, 2018, 10:08:05 PM »
Hello folks,

I did a flight over a city in Brazil to estimate the council tax value for each house. So, the idea is to generate a georeferenced orthomosaic of the whole city.

I have about 4300 photos and 140 GCPs got by dGPS. The flight was done using a DJI Phantom 4 Pro.

In that way, I would like suggestions of the best workflow to process all this images and get a precise orthomosaic that will be exported in .TIFF.

Considering the large amount of photos, I'll process everything on the cloud. So, RAM and CPU will not be a restriction.

All the best,
B

selimerguden

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Orthomosaic for council tax calculation
« Reply #1 on: March 14, 2018, 11:28:40 PM »
Hey Rene,

First you have to align your images, I would recommend using High Settings. Once that is done I would import the GCP's and mark, reoptimize and verify them. Then you could use batch processing for building a Point Cloud, building a Mesh, Building a DSM and building an Orthomosaic.

Bene

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Orthomosaic for council tax calculation
« Reply #2 on: March 15, 2018, 12:29:56 AM »
Hello Rene,

Thank you for your reply. As I already work with photogrammetry, I have a workflow for my research works. But that's the first time I get a job like that, generate an orthomosaic for a whole city with 4300 photos.

This is the workflow I'm intending to use. Is that correct?

1. Load photos and uncheck the coordinates

2. Estimate image quality, not consider image quality below 0.7.

3. Align photos (quality: HIGH, pair preselection: REFERENCE, key point limit: 40,000, tie point limit: 4,000, adaptive camare model fitting: YES).

4. Take average reprojection error in pixels from the Reference pane and use this value as Tie Point accuracy (in pixels);

5. Optimize the camera alignment;

6. Add markers' projections and load the coordinates;

7. Take reprojection error for markers from the Reference pane and use this value as Marker Accuracy parameter in the Reference pane settings;

8. Optimize the camera alignment.

9. Clean sparse point cloud (EDIT > GRADUAL SELECTION). Remove all points with high reprojection error (0.5 - 0.9) and high reconstruction uncertainty (what is the best value here?).

10. Adjust the bounding box

11. Optimize camera alignment

12. Build dense cloud (HIGH or MEDIUM???)

13. Build DEM (from dense cloud) - What is the best option: generate the orthomosaic from MESH or DEM?

14. Build Orthomosaic based on DEM

Do you have any comments or suggestions to do regarding to my workflow?

Thank you very much guys.

Cheers,
B
« Last Edit: March 15, 2018, 12:33:40 AM by Bene »

selimerguden

  • Newbie
  • *
  • Posts: 21
    • View Profile
Re: Orthomosaic for council tax calculation
« Reply #3 on: March 15, 2018, 02:21:25 AM »
Hey Bene,

I think your workflow seems pretty good. I would Build a Dense Cloud using Medium Settings, that should be good enough if your final product is an orthomosaic. Moreover I would generate an Orthomosaic (Mosaic Blend) from DEM, assuming that DEM is accurate and stitched well. If the DEM is not accurate and it has stitching errors I would generate the Orthomosaic from Mesh.

SAV

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
Re: Orthomosaic for council tax calculation
« Reply #4 on: March 15, 2018, 03:41:44 AM »
Hi Bene,

Here is a 'best practice UAV photogrammetry workflow' that has done the job for me (and many other users).
http://www.agisoft.com/forum/index.php?topic=7851.msg37494#msg37494

Regards,
SAV

Bene

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Orthomosaic for council tax calculation
« Reply #5 on: March 15, 2018, 04:00:05 PM »
Thank you SAV and selimerguden for your help.

SAV, I am using your workflow with some adjustments on it. I just have a doubt regarding to the processing resources.

I have two machines. The first with 64 CPUs and 240 Gb RAM which I'm thinking to use just for the alignment step. The second one has 12 CPUs and 2 NVIDIA Tesla P100 which I want to use for build the dense cloud. What do you think about it? Am I right with the machines?

Another issue. What is the best flight speed for Phantom 4 Pro and Mavic Pro. I know that the shutter are different in both. But I took photos over the city with the P4P and some are very blurry. I thought that it could be the flight speed. Is there any other cause?

Thanks!

Regards,
B

SAV

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
Re: Orthomosaic for council tax calculation
« Reply #6 on: March 16, 2018, 04:19:34 AM »
Hi Bene,

You seem to have some amazing hardware there  :D
How much RAM has your second machine? Since version 1.3 PhotoScan is also using GPU in conjunction with CPU power for the photo alignment step, hence the second machine might actually be faster even for the alignment step.

You shouldn't have a problem to align your images at HIGH quality settings based on your hardware. The computation of the dense point cloud, however, needs a lot of GPU power and memory. Depending on your quality settings, you might want to split your model after image alignment, then compute the dense point clouds individually and merge all chunks in the end.
This script will help you with this task: https://github.com/agisoft-llc/photoscan-scripts/blob/master/src/split_in_chunks_dialog.py

Motion blur is not only a factor of horizontal flight speed, but also the distance to the object (flight height) and camera settings (shutter speed). If you fly higher, you can fly faster. If you fly on a bright day, you can use a higher shutter speed and also fly faster. You'll have to find the 'sweet spot'. There are apps such as MapPilot (only available for iOS) that will automatically adjust the horizontal flight speed depending on chosen flight height and light conditions. Maybe give it a go. See details here: https://support.dronesmadeeasy.com/hc/en-us/articles/209866886-Light-Based-Speed-Adjustment

I highly recommend to use the Phantom 4 Pro instead of the Mavic Pro due to the much better camera which 'captures more light' and therefore allows you to fly at a higher horizontal speed. The P4Pro has a much bigger 1 inch Sony CMOS sensor on board which gives you better picture quality (it is actually the same sensor that is used for the X4S camera that can be attached to the Inspire 2).

Better images = better photogrammetric reconstructions
Blurry imagery will lead to low quality / less accurate photogrammetric models.


All the best.

Regards,
SAV






« Last Edit: March 16, 2018, 04:21:11 AM by SAV »

Bene

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Orthomosaic for council tax calculation
« Reply #7 on: March 16, 2018, 04:56:33 AM »
Hi SAV,

I don't have words to say thank you for every help you give for Agisoft community. You are a professor/supervisor for me. I'm a PhD student and for sure you are one of the most important person in my learning process about photogrammetry.

Regarding to my previous question.
 
Do you think that it's better I use a machine with 12 CPUs/2 NVIDIA P100/240Gb RAM for the whole process than 64 CPUs/240Gb RAM?

Is it easy to use the Python script you sent me? I don't have any knowledge in python language.

Good to know the factors that have influence on the motion blur. I used a rented P4P for that survey, but because of my limit budget, I bought a Mavic Pro for future ones. My idea is to use it just to get money enough and buy the P4P.

All the best and thank you one more time!

Regards,
B

SAV

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
Re: Orthomosaic for council tax calculation
« Reply #8 on: March 16, 2018, 06:28:00 AM »
Hi Bene,

Thanks for the kind words. Happy to help. I was once a PhD student too  ;D

Yes, use the machine that has more GPU power (12 CPUs/2 NVIDIA P100/240Gb RAM).

Only use the script in case you are running out of memory with your chosen quality settings.
Don't be intimidated by the Python code on Github  ;). Simply copy and paste it into NOTEPAD (or any other text editor) and then save it as script.py (don't forget the .py ending) on your computer. Then open PhotoScan and choose TOOLS > RUN SCRIPT (or CTRL + R). Pick the script.py file, press OK and you will see a new COSTUM MENU at the top of your screen with the SPLIT IN CHUNKS function in it. You don't need to know Python in order to use Python scripts  :o

I suggest to first run your imagery without splitting it into several chunks. Use these settings: Photo Alignment in HIGH and Build Dense Point Cloud in MEDIUM quality. This should definitely be possible with your machine. You could potentially build the dense point cloud at HIGH quality settings too. Give it a try :) Worst case is that you run out of memory, which means you would then need to use the script. There is, however, no need to run Photo Alignment in HIGHEST (this is only useful for low resolution imagery).

If you do more UAV photogrammetry work, I suggest to swap/sell your Mavic Pro and get a P4Pro or a P4 Advanced. Note that the P4 Advanced is basically the same as the P4Pro with less sensors for obstacle avoidance, which is why it is cheaper. The important part, the camera, is identical though.

Note that there might be an RTK version of the Phantom 4 coming out (soon?). See here: https://dronedj.com/2017/12/22/dji-confirms-phantom-4-real-time-kinematic-drone/

There are also some rumors regarding the Phantom 5: https://dronedj.com/2018/03/14/dji-phantom-5-interchangeable-lenses/

Exciting times.

All the best.

Regards,
SAV

P.S. If you publish any of your UAV photogrammetry work, then please share the paper with me. Thank you.  :)
« Last Edit: March 16, 2018, 06:33:06 AM by SAV »

Bene

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Orthomosaic for council tax calculation
« Reply #9 on: March 16, 2018, 06:21:58 PM »
Hi SAV,

For sure I'll let you know when I have my results published. My email is b.moreiracandido@lancaster.ac.uk if you send me any message, I can save your address.

In the "Split in chunks" box, what could be a good Overlap (%) and numbers of parts that will be divided?

For my needs, do you think that it's necessary to build mesh? I'll choose height field, as my intend is just produce orthomosaic.

Have a good weekend!  ;)

Cheers,
B

SAV

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
Re: Orthomosaic for council tax calculation
« Reply #10 on: March 19, 2018, 03:28:56 AM »
Hi Bene,

Just share your paper with the whole PhotoScan community here in the forum using the DOI link.

Only use the script if you run out of memory. Try first to run the whole dataset in one go.

Before using the 'split in chunks' Python script, you still need to run image alignment with ALL images at HIGH quality.

Leave default value for overlap (%).

Probably 2 x 2 or 3 x 3 should do it. Will also depend on the shape/aspect ratio of your survey area. 4 x 1 or 3 x 2 might be more appropriate then, for example if the area is extending more into one horizontal direction than the other.

No need to build a mesh if you are only after a DEM and/or orthomosaic. Saves you time.

Regards,
SAV
« Last Edit: March 19, 2018, 03:35:11 AM by SAV »

Bene

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Orthomosaic for council tax calculation
« Reply #11 on: March 22, 2018, 08:44:27 PM »
Hello SAV,

I could process the dense cloud in just one go using your advice with 12CPUs/100Gb RAM/ 2x NVIDIA Tesla K80.

But I have distortion on the roofs in the orthomosaic (attached image).

Is there any way to fix it? A friend of mine told me that Pix4D can generate orthomosaics without this distortions on roofs. Photoscan can manage with it?

Just to let you know, I also attached the processing parameters.

Thank you!

All the best,
B


SAV

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
Re: Orthomosaic for council tax calculation
« Reply #12 on: March 23, 2018, 06:32:48 AM »
Hi Bene,

Good to hear that you were able to process everything in one go.

According to the processing settings you shared, there are almost 700 unaligned cameras. This could potentially lead to image overlap issues in some parts of your model and therefore 'rough edges' (If you don't have a good overlap, it can be tricky to reconstruct such sharp edges). Can you share the processing report please (FILE > EXPORT > GENERATE REPORT)?

Moreover, the maximum reprojection error is very high. Have you filtered/cleaned your tie point cloud (=sparse point cloud) before building the dense cloud? MODEL > GRADUAL SELECTION. Large alignment errors can also contribute to such geometrical inconsistencies.

Last but not least, there is a way to 'fix' parts of an orthomosaic. Note that this is not really fixing the real problem, but is more like putting some band aid on it.
Open the orthomosaic in Photoscan by double-clicking on it in the Workspace pane. Now digitize a polygon around the 'rough edge' of the roof, right click inside the polygon and then choose ASSIGN IMAGES. Pick the 'best' picture from the list. Repeat this workflow for other areas.

I hope that helps.

Regards,
SAV

Bene

  • Newbie
  • *
  • Posts: 37
    • View Profile
Re: Orthomosaic for council tax calculation
« Reply #13 on: March 26, 2018, 05:19:16 PM »
Hi SAV,

According to the processing settings you shared, there are almost 700 unaligned cameras. This could potentially lead to image overlap issues in some parts of your model and therefore 'rough edges' (If you don't have a good overlap, it can be tricky to reconstruct such sharp edges). Can you share the processing report please (FILE > EXPORT > GENERATE REPORT)?

Those 700 unaligned cameras I had to disable according to their quality. All of them showed less that 0.7 in "estimate quality" analysis. Do you think that is it better to keep them? Or just reduce from 0.7 to 0.5? Regarding to the report, I tried to send you, but exceeded the maximum file size limit. Maybe I can send it to you by mail.

Moreover, the maximum reprojection error is very high. Have you filtered/cleaned your tie point cloud (=sparse point cloud) before building the dense cloud? MODEL > GRADUAL SELECTION. Large alignment errors can also contribute to such geometrical inconsistencies.

Yes, I did it twice. How many times do you advice me to proceed with the point cloud cleaning?

Thank you!!

Regards,
B

SAV

  • Hero Member
  • *****
  • Posts: 710
    • View Profile
Re: Orthomosaic for council tax calculation
« Reply #14 on: March 27, 2018, 09:22:46 AM »
Hi Bene,

If you have that many low quality pictures, you might want to reduce the threshold to 0.6 or even 0.5 (which is definitely the lowest I would go). It might help to improve your reconstruction results.

Just run the Gradual Selection twice using reprojection error and reconstruction uncertainty as constraints. Note that gradual selection only selects points. You'll still have to press the delete key when they are selected.

Regards,
SAV