Drone Pano Scripting - Cannot get rid of the Black Hole Sky

86 views
Skip to first unread message

PanoSeek

unread,
Aug 21, 2023, 11:34:46 PM8/21/23
to hugin and other free panoramic software
Hello!

I have been digging into how I can mimic what DJI' software does to fill in the sky on my drone Pano's, but I cannot figure out how to script it. 

There are a ton of threads on here about one-off solutions, like doing it in photoshop, or some other stand-alone tool, but so far, I have been unable to find a workable, aka scriptable, solution. 

The closest I found was Bruno talking about the l-29 setting for enblend - https://groups.google.com/g/hugin-ptx/c/aghpJeyIvQo/m/k6iOJVImjskJ - I did attempt Bruno's solution, but got an error about couldn't do 29, could only do 9 and some errors that said 10.  So I tweaked the setting to 9 (#hugin_enblendOptions -l 9) and ran it.  No errors, but no change to the image that I could tell...still have big black hole sky. 

Here is what my script does - 
1. Generates a new PTO for the specific folder
2. import template details.
3. cpfind (with pre-aligned as the drone uses the same pattern each time)
4. clean control points
5. geocpset to "match" images without CP's...this was needed for areas of water/snow that are mostly featureless.
6. clean control points
7. linefind (not really seeing a benefit to this one, but that is another story)
8. Autooptimiser
9. Pano_Modify - tweak the settings to get the output I want.
10. send the PTO to batch processor to not completely kill my computer when doing large sets. 

Note - I can run this script on a single folder by copying it and the template to the directory with the images, but I usually run it from another bat file that iterates through all directories to make my workflow easier after shooting a bunch of panos. 

I have examples of my source files, the drone's version of the output, my script's version of the output, my script, the template PTO file, and the result PTO file here - https://1drv.ms/f/s!Ah3sXKXawuGfgaQltrfCj_q-G0n6lA?e=e1YZnB


How can I turn this -
ScriptedSki.PNG

Into this -
DJISky.PNG

With scripting? 

Thank you!

Bruno Postle

unread,
Aug 22, 2023, 2:18:47 AM8/22/23
to hugin and other free panoramic software
On Tue, 22 Aug 2023, 04:34 PanoSeek wrote:

The closest I found was Bruno talking about the l-29 setting for enblend - https://groups.google.com/g/hugin-ptx/c/aghpJeyIvQo/m/k6iOJVImjskJ - I did attempt Bruno's solution, but got an error about couldn't do 29, could only do 9 and some errors that said 10.  So I tweaked the setting to 9 (#hugin_enblendOptions -l 9) and ran it.  No errors, but no change to the image that I could tell...still have big black hole sky.

This technique is basically to create a new fake blue photo, add it to the set at yaw=90, and hope that enblend will smooth out the transition. You need as many enblend levels as possible for maximum smoothing (the parameter should be -l 27, my mistake), the patch photo needs a big enough angle of view to cover the whole black area, but all skys are different so you won't be able to use the same shade of blue on all panoramas.

-- 
Bruno

RizThon

unread,
Aug 22, 2023, 6:35:18 AM8/22/23
to hugi...@googlegroups.com
You may want to search in Hugin mailing list for "Fill clear sky update".


Looking at the tutorial with pictures https://github.com/weltyj/SkyFill/blob/main/Tutorial/SkyFill_tutorial_v1.md this is probably what you want. I do not know how difficult it is to use (and I guess compile) the tool is.

--
A list of frequently asked questions is available at: http://wiki.panotools.org/Hugin_FAQ
---
You received this message because you are subscribed to the Google Groups "hugin and other free panoramic software" group.
To unsubscribe from this group and stop receiving emails from it, send an email to hugin-ptx+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hugin-ptx/CAJV99Zhj2JUejEvzj3ojfArBxHABFThQeZB0ASQPZ8JU5wtGtw%40mail.gmail.com.

PanoSeek

unread,
Aug 22, 2023, 9:58:13 AM8/22/23
to hugin and other free panoramic software
this is exactly what I am looking for...I think.  I will dig in!

Jeff “weltyj” Welty

unread,
Oct 22, 2023, 12:06:56 PM10/22/23
to hugin and other free panoramic software
Hi @Panoseek,

Take a look at the new update for skyfill -- zenith blending.   It wasn't too hard to code, and it may be useful for other panoramas that don't necessarily include the zenith.
I made this image with "skyfill_tif 100_0278.tif 100_0287sf.tif -zb .5 0 -fhsv 0 .85 .85".   I created 100_0278.tif with your original jpg files and hugin, outputing a tif file rather than a jpg.


Cheers,
Jeff
100_0278sf.jpg

Rod Bibeau

unread,
Oct 22, 2023, 12:34:47 PM10/22/23
to hugi...@googlegroups.com
Wow!  

This is exactly what I am looking for. It looks like I should be able to add this to my pano build script fairly easily as well as tweak some settings to save as tif first and then add a post-process step to convert tif to jpg. I was exporting as jpg for ease of use when adding to google maps only. 

I will give this a shot over the next few days and let ya know. 

Thank you for the update! 

On Oct 22, 2023, at 11:07, Jeff “weltyj” Welty <eljef...@gmail.com> wrote:


Reply all
Reply to author
Forward
0 new messages