2023-08-21 - Tweaking the readme for V2.
I have been working to build a better process to build 360/Sphere pano images from my DJI Mini 2 drone.
- Note - I am 100% NOT a programmer. This repo is largely for my own reference in the future. There is probably better ways to do this. If you find some, let me know!
The problem I have was DJI's software had two major flaws -
- The 360/Sphere Pano constrcuted does NOT have gps tags. The individual images do have gps, but the Pano stitching in DJI's app does not include the metadata.
- The 360/Sphere Pano constructed does not use full res images. The images are significantly scaled down and I want higher res panos.
- Highest resolution possible. (solved)
- GPS Coords in the metadata. (solved)
- Batch processing for all directories in a specific location. (solved)
- Patching of "black holes" where image data does not exist - missing images or top of image where the drone did not capture data. (working on it.)
- Correctly reading low contrast images and adding control points via scripting. Snow and water both cause problems with stitching. (at a dead end maybe)
- Windows 10 was used with standard bat files.
- Hugin
- Version: 2021.0.0.52df0f76c700 built by Thomas
- Path to resources: C:\Program Files\Hugin\share\hugin\xrc\
- Path to data: C:\Program Files\Hugin\share\hugin\data\
- Note - version is probably not overly important to match, as long as it's close. I dont think I am doing anything too crazy or unique.
- Just for reference - Win 10, i7, 64gb, RTX 2070 Super
- Mac or liinux could be used with the scripts, but some modifications would be needed, mostly just syntax of the bat files.
- Install the software.
- Get the files ready.
- Run the batch file to deploy the Hugin Script.
- Let the Hugin Script Run
- Monitor Batcher tool thing.
- Do something with the Pano's.
- Hugin is open source and easy to get/install - https://sourceforge.net/projects/hugin/files/latest/download
- Get the latest version and install it. I used the defaults and if you change the install locations, the script may need to be tweaked to follow the locations.
- I use a local drive on my PC to store the files from the Drone to keep things as fast as possible.
- The DJI Mini 2 saves each set of images for a pano sphere in a individual directory on the memory card from the drone.
- I copy all the individual files from the Panorama folder on the memory card to a local folder like d:\2023-02-27-DronePanos\
- The deploy script contains two variables you will need to tweak. The location of the Script you want to run and the location of your target folders.
- Edit the deploy script from this repo with the correct locations in the variables. I have REM comments in the bat file to help also. Notes:
- The DeployScript.bat in this repo is the script I currently use. This may be tweaked as I move forward.
- The script could be modified to run the Hugin Script in the next step sequentially by tweaking the "Start" line to not open a new command prompt. This would help to limit the resources used on the computer, but will not take advatage of multi core/threaded processors.
- The script is located in this repo - PanoScript-Queue.bat
- This process will take some time
The above script will send the individual PTO files to the PTBatcher tool from Hugin and run the stitching operations sequentially.
- Determine if the Panos are good.
- I typically use the windows search function to find all the new panos in the various directories and then copy them out to a single directory for review and next steps. Moving them saves a step later on if you want to go back and edit/re-run a stitching for an individual item as leaving the new pano in the directory and re-running the bat file hugin script from this project will ingest the pano and all the matching images and cause chaos.
- If you want to add them to a google photos album, upload to Google photos like any other photo. Google Photos will read these as panos and display them to viewers as panos, which is nice.
- If you want to add them to Google Maps, check out my other Github project here - https://github.com/RookieITSec/GoogleMaps360PhotoUpload
- Panotools Hugin scripting writeup https://wiki.panotools.org/Panorama_scripting_in_a_nutshell#Creating_hugin_projects_on_the_command-line
- Hugin Google Groups - https://groups.google.com/g/hugin-ptx
- EXIFTool is used by Hugin automatically - https://exiftool.org/ and/or https://exiftool.sourceforge.net/
- DJI Mini 2 and DJI Fly App - For making a fairly slick drone for taking 360 photos and software that missed a few features....so far.