Extracting DEM and Orthophotos from 1950's aerial photos

Hi,
I am new to OpenDroneMap but have lots of experience in GIS and LiDAR, RS… I have installed WebODM on Windows and got it to work. Still not sure about that Docker thing… but it runs!

I need to make orthophotos from 30 1950’s aerial photographies. All I have as metadata is 9 inch BW film, 152.4 focal Length lens at 20 000 feet. 60% overlap and about 30% sidelap. Scans are at 1200 dpi so film grain is obvious. Scenes are not georeferenced but this is something I could do with geotiffs. Should I spend time doing that or should I add GCP files instead? Should I consider using a high pass filter to make things easier for the software? All I have is trees, rivers and lakes so there are no clear easy targets to help with the image automatique corregistration.

I am wondering if there is documentation, site, ressources… out there that could help out with this type of image processing? Would I find something in the “Missing Guide”? Any tips would be appreciated.

Thanks!
Nicolas

1 Like

Welcome, Nicolas!

This is a workflow others have worked with a few times here as well.

This blog post should be a great starting point for you:

Thanks,
I will look at it!
Cheers

Nicolas

1 Like

Let us know how you get on. We’ll do our best to help out :slight_smile:

1 Like

Hi,
If I understand properly, the script is used to add georeferencing data to the files. Then, you used OpenDroneMap to do the rest. I don’t see any info on the processing in OpenDroneMap. Am I looking at the wrong place?

Anyways, when running a Default Fast Orthophoto, I get: [ERROR] Uh oh! Processing stopped because of strange values in the reconstruction. This is often a sign that the input data has some issues or the software cannot deal with it. Have you followed best practices for data acquisition? See Flying Tips — OpenDroneMap 2.6.7 documentation

I can share the log if it can help. What parameters could I use to improve the chances of having some results?
Nicolas

1 Like

Nicolas, you might have to increase --feature-quality, --min-num-features, and possibly set --matcher-neighbors to 0 to skip pre-match entirely.

1 Like

The blog post I made was before we added support for geo.txt image geolocation files (Image Geolocation Files — OpenDroneMap 2.7.0 documentation), I would recommend to use that to georeference your images.

If you have poor overlap make sure you use the highest --feature-quality, a high --min-num-features value and --fast-orthophoto (for high altitude flights with poor overlap you will get better looking results).

3 Likes

Hi,

I have multiple questions:

  1. I seems to be running out of memory. I have 100GB allocated to the virtual machine. My images have 10725*10675 pixels. Should I resample them in Gimp or use the resampling method proposed when I upload the images using WebOMD? If I choose the later, will the GCP files be also adjusted to the new sampling scheme? I imagine the mask.tif files will also be adjusted? I am currently using only 6 of my 30 images.

  2. I have a 9 inch film with a 152.4mm camera. My current camera.json looks like this.
    {
    " 10725 10675 brown 0.0": {
    “projection_type”: “brown”,
    “width”: 10725,
    “height”: 10675,
    “focal_x”: 152.4,
    “focal_y”: 152.4,
    }
    Should I add something or modify the projection_type??? Should “brown” be changed to “perspective”? Should I add anything else?

  3. According to this paper (https://www.researchgate.net/profile/Jose-Martinez-Batlle/publication/326238693_Digital_photogrammetry_of_historical_aerial_photographs_using_open-source_software/links/5e1f145845851517e1d1bb4b/Digital-photogrammetry-of-historical-aerial-photographs-using-open-source-software.pdf?origin=publication_detail) I need to configure OpenSfM for bundle adjustment because my overlap is about 60%. I need to set the minimum number of consistent views needed to reconstruct a valid point to two. Does this parameter exist in WebOMD?

  4. Can I use a mix of 3D and 2D GCP? In certain areas, I don’t have the 3D info and cannot extract it from SRTM as the area is now underwater.

Thanks for your help!
Nicolas

1 Like
  1. How much more RAM can you allocate? What is your swap/pagefile like for Virtual Memory? Everything should be seamless with our built-in Resize function.

  2. I am not the most knowledgeable with camera distortion maths yet, but my understanding is that Brown-Conrady should outperform perspective in nearly every case, but it sometimes can over self-calibrate, though I’m not sure that’d be likely in plane-borne data.

  3. Great paper! I’ve been studying that to see if it might be feasible to make a “toggle” for a Historic Imagery processing workflow that makes the needed adjustments (and to test it against our current stack as things have massively evolved since the version they used). We do not have most of these items parametized for usage in the GUI. You’d have to dive into the code on-disk, modify things, and then re-open the program.

  4. Yes, but things can get kind of ugly. You’re pinning part of the plane of reconstruction vertically and leaving it unconstrained elsewhere… Not sure how much vertical displacement may result. Better than nothing, I’d guess.

1 Like

Hi,

  1. I’am running with docker so I don’t thing virtual Memory can work. I have 128GB of memory and 115.5GB, 6 cpu, 1GB of Swap is allocated to Docket. I have a disk size of 104GB. Should I play with the 1GB of Swap? What does this do?

  2. Thanks for the info. Should I add more to the camera.json file. I’am not sure it’s being used…

  3. “You’d have to dive into the code on-disk, modify things, and then re-open the program.” Do you mean using the command line or do I need to go in the source code and recompile??? not sure what you mean here by “code on-disk”.

  4. Thanks. I saw that I can use NaN when the altitude is unknown.

Thanks for you help!
Nicolas

1 Like
  1. Docker over Windows, MacOS, or Linux? That can change what needs to be done to adjust swap/pagefile. It is virtual memory that is backed by phyiscal storage (HDD/SSD). It emulates having more physical memory, but it is orders of magnitude slower.
  2. It should show in the logs whether or not your cameras file is being used.
  3. It needn’t be the command line. For instance, I modify files in WebODM for Windows with VS Code by navigating to the install directory and editing what I need beneath it.
  4. Yep!
1 Like

Hi,
I am using Docker on Windows 10. Under system properties/performance options, virtual memory, I see “Total paging file size for all drives: 31905MB.” I could change this but I don’t know how I could allocate it to the Docker virtual machine. In Docker/Resources/I only see CPU, Memory (the 128 GB of physical memory only) Swap (1GB) and Disk image size (104 GB).

Can I change this in Hyper-V manager?
Thanks Saijin

Hi Nicolas,

if using Docker with WSL2, try editing your .wslconfig file in your windows profile (google for more detailed info) and add this two lines:

# Sets amount of swap storage space to 128GB, default is 25% of available RAM
swap=128GB

# Sets swapfile path location, default is %USERPROFILE%\AppData\Local\Temp\swap.vhdx
swapfile=C:\\temp\\wsl-swap.vhdx

reboot, enjoy.

2 Likes

Hi Daniel and Saijin,
I installed docker using the instructions found here (GitHub - OpenDroneMap/WebODM: User-friendly, commercial-grade software for processing aerial imagery. 🛩) I guess this installs Docker on a Hyper-V machine (I guess WSL2). Daniel, will this change the disk storage space or the actual memory?
Thanks

1 Like

It is on disk, since it is a VHDX that acts as the swap parition for your Dockerized linux environment in WSL2. But this is the swap that emulates physical memory (like pagefiles for Windows), so it can help with Out-Of-Memory errors.

1 Like

Ok,

So can I add virtual memory via hyper-v? A have lost of disk space. It’s the memory I seem to lack. (I would thing over a 100GB for a virutal machine would be good enough!) Apparently not!

Nicolas

1 Like

Ok I just read your last post, disregard my last question.
Thanks

1 Like

It all really depends! I can process a 300+image dataset on 8GB RAM (backed by 4GB swap), or I can use the same dataset on 32GB RAM with 96GB pagefile and Out-Of-Memory by setting quality options poorly…

There’s a complex interplay between the dataset, the parameters, and your hardware. In general, more RAM is never a bad thing if you can spare it.

1 Like

Hi,

I am running Docker Desktop for windows on Windows 10 pro. This uses Hyper-v but I’am not using WSL. I have WSL1 with Ubuntu in my user account but not in my admin account. I need to run docker as admin. I figured this out looking for the .wslconfig file that is non existent on my system.

Do you suggest I change the swap setting in Docker Desktop (currently there is a max of 4GB) or should I install WSL2 with Ubuntu, install WebOMD on that linux distro and then modify the .wslconfig file? What would be better? If I go the WSL2 with Ubuntu, what version would you recommend? If I use WSL2 I guess I would need to find the Ubuntu IP address and simply log onto that using port 8000?

Thanks

1 Like

How much SWAP does the Docker settings let you choose?

1 Like