Dave Thorup | 28 Aug 11:02 2014
Picon

Can't figure out how to optimize lens parameters to correct for distortion

I’ve been pulling my hair out trying to figure out how to use Hugin to correct for lens distortion. I’m using the Mac 2013.0.0 build (but I’ve also tried 2012.0.0 and 2014.0.0-RC4). I’ve first tried using the CalibrateLensGui app as I’ve had some success with it in the past. But unfortunately it doesn’t seem to detect intersecting lines so I can’t use the images I’ve taken with a calibration chart such as this one:



If I force the Minimum Line Length to something very small then it will detect lines but “optimize” very poor correction parameters (I only want the a, b & c parameters). At least it actually does something though. I’ve searched around for tutorials on how to use Hugin for this purpose and think I’ve more or less figured out the process, but I can’t seem to get any results:

  1. I’ve defined control points using the “add new line” method to define multiple points for each line of control points. (I’ve tried different permutations of defining points for 2 lines, 3 lines & 4 lines, each with about 5 points per line. None of them have worked.)
  2. The lens type is set to Rectilinear.
  3. I go to the Optimizer tab and only enable the a, b & c parameters for optimization. 
  4. When I optimize I often get a warning (see screenshot) with the “optimized” parameters set to very large (and very extreme) values such as: a = 315.2, b = 2061.9, c = 13,759.1.
  5. If I enable the edit script before optimizing checkbox then I can see that the values in the GUI don’t get copied properly into the script. For example, the GUI will show a = b = c = 0, but the values in the scrip will be a1e-05 b1e-05 c1e-05.
  6. If I manually correct those values in the script then the optimizer will do nothing and set a = b = c = 0.
Does anyone have any suggestions?

Here’s the full text of the script that Hugin is creating. Does anyone see what’s wrong or know how to fix it? 

Thanks!

# PTOptimizer script, written by hugin


p f0 w3000 h2028 v50  n
"TIFF_m c:LZW r:CROP"
m g1 i0 f0 m2 p0
.00784314


# image lines
#-hugin  cropFactor=2.72727
i w5496 h3672 f0 v50 r0 p0 y0
TrX0 TrY0 TrZ0 a0 b0 c0 d0 e0 g0 t0  n"/Lens Charts/DSC09994.tiff"




# specify variables that should be optimized
v a0
v b0
v c0
v




# control points
c n0 N0 x72 y287 X72 Y286 t3
c n0 N0 x1502 y195 X1501
.99870237282 Y194.99938673054 t3
c n0 N0 x2781 y162 X2781
.00029095988 Y161.998663015188 t3
c n0 N0 x4051 y206 X4050
.99823271141 Y206.000735219853 t3
c n0 N0 x5464 y305 X5463
.99811267938 Y305.001046487068 t3
c n0 N0 x106 y3360 X106 Y3360 t4
c n0 N0 x1518 y3452 X1518
.00019921348 Y3452.01545669996 t4
c n0 N0 x2772 y3486 X2771
.99878319084 Y3486.01808107785 t4
c n0 N0 x4027 y3452 X4026
.99979692598 Y3452.01619932263 t4
c n0 N0 x5432 y3359 X5432
.00103397834 Y3358.99965878955 t4


#hugin_optimizeReferenceImage 0
#hugin_blender enblend
#hugin_remapper nona
#hugin_enblendOptions
#hugin_enfuseOptions
#hugin_hdrmergeOptions -m avg -c
#hugin_outputLDRBlended true
#hugin_outputLDRLayers false
#hugin_outputLDRExposureRemapped false
#hugin_outputLDRExposureLayers false
#hugin_outputLDRExposureBlended false
#hugin_outputLDRStacks false
#hugin_outputLDRExposureLayersFused false
#hugin_outputHDRBlended false
#hugin_outputHDRLayers false
#hugin_outputHDRStacks false
#hugin_outputLayersCompression LZW
#hugin_outputImageType tif
#hugin_outputImageTypeCompression LZW
#hugin_outputJPEGQuality 90
#hugin_outputImageTypeHDR exr
#hugin_outputImageTypeHDRCompression LZW
#hugin_outputStacksMinOverlap 0.7
#hugin_outputLayersExposureDiff 0.5
#hugin_optimizerMasterSwitch 0
#hugin_optimizerPhotoMasterSwitch 0





--
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+unsubscribe <at> googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hugin-ptx/8f0f5cf0-e53b-4663-ac4e-83ccbe0abf76%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Einar Høst | 27 Aug 14:12 2014
Picon

Problems when running align_image_stack with more than 250 images

Hi,

I am trying to use align_image_stack to align a series of 1500 images (which will ultimately be used to produce a video).

The command I am using is this:
align_image_stack -a aligned -v images/*.JPG

This works well with up to about 250 images in the images folder (it produces 250 tiff aligned files). However, for more images, I get a single tiff file as output (corresponding to the first jpg file). Has anyone else experienced this? Has anyone succeeded in running align_image_stack on a larger stack of images?

I have tried running align_image_stack both on Windows 8.1 with (align_image_stack version 2013.0.0.0d404a7088e6) and Mac OS X (align_image_stack version 2013.0.0) with the same result.

If I were to run align_image_stack to produce a .pto file instead (in hope of getting around the problem), how would I proceed to produce the re-mapped tiff files?

I apologize if this is the wrong forum for these questions.

Kind regards,
Einar

--
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+unsubscribe <at> googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hugin-ptx/9d8f8c76-8db9-4c8d-8385-72b2872280be%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
John Muccigrosso | 26 Aug 21:11 2014
Picon

Creating a workflow for simple use of Hugin for HDR

My configuration: Hugin 2014 RC4 on a Mac OS X 10.9.4.

A new Hugin user, I'm trying to use Hugin itself to mimic a simple approach to creating HDR:

  1. Align images at different exposures via align_image_stack. (Taken on a tripod, so well aligned at the start.)
  2. enfuse the resulting images to combine the best exposure for each part of the images.

(The approach is described here, among other places: http://photoblog.edu-perez.com/2009/02/hdr-and-linux.html. I've already used the included "Hugintools" to do this via the command line (and in fact have a nice Applescript droplet app that will do it automatically when you drop image files on it). So now I'm trying to do it with Hugin.)


Here's the workflow I first thought would work:

Workflow 1

  1. On the Photos tab, add images.
  2. Use align_image_stack linear to create control points.
  3. On the Sticher tab, set the projection to rectilinear, calculate field of view, calculate optimal size, fit crop to images.
  4. Same tab, uncheck everything, but "Exposure fused stacks". (This can be flakey BTW, and I sometimes have to switch back and forth between two tabs to get the checkboxes to work.)
  5. Stitch! This results in only nona and enfuse running.

Differences from the command-line approach:

  1. nona runs, whereas that's not in the command-line approach (which works well, btw).
  2. The shaped of the content part of the final image is convex on top and bottom. I don't see any cropping, but the shape is wrong.
  3. The size is also not exactly the same as the original, as it is in the command-line approach. This despite the fact that the images were taken on a tripod. In particular, the originals are 4608x3456, and the Hugin output 4118x3268, so that's a bit taller proportionately and smaller overall. If I force Hugin to use the original size, it changes the FoV and the output ends up slightly cropped.

My question here is why doesn't this produce the same output as the command-line method? They seem to be using the same commands of align_image_stack and enfuse, but maybe Hugin is doing something else too, or assuming something else?

So after some playing I hit upon...

Workflow 2

  1. Add images.
  2. Use align_image_stack linear to create control points.
  3. Go to "preview panorama" window and change the projection to Rectilinear from Equirectangular. This squares out the image.
  4. Go to "fast preview panorama" window and auto-crop the image.
  5. On the Sticher tab, calculate field of view, calculate optimal size, fit crop to images.
  6. Same tab, check only "Exposure fused stacks".
  7. Stitch!

Again the size of the image isn't quite the same: 4589x3574, cropped to 3456, so in this case a little taller with the same height. The image is clearly mildly cropped on the sides, but looks the same top to bottom. Using the GIMP to subtract the final images from each workflow (CL and Hugin) shows that they are nearly identical where they overlap.

More questions:

  1. Is there any way not to run nona, or is it absolutely necessary?
  2. Should I worry about the slight differences in size? I suspect this is leftover from the either the alignment (although it doesn't happen in the CL version), or the projection change. Can I eliminate it?
  3. Why doesn't changing the projection in workflow 1 work as it does in workflow 2?
Thanks for any help.


(PS A general observation that once you're out of simple mode (which I almost never am in), Hugin requires you to jump from one tab to another, or to a preview. I'm not very experienced, but the interface is confusing to me.)

--
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+unsubscribe <at> googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hugin-ptx/48a93619-7b47-467d-baa9-6ded752af68e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Vladimir Nadvornik | 26 Aug 22:49 2014
Picon

Lens database

Hi,

I just noticed that 2014.0-RC4 uses it's own lens database
instead of lensfun.

So far I found only one way for filling this database - import from
existing pto files. But I am not sure if I used all possible focal
lengths so far so the database can contain "holes" and it can lead to
surprises if it is used with automatic scripts.

Lensfun has data for my lenses at all focal lengths. Is there any tool
for migrating this data to the new database?

Thanks,
Vladimir

--

-- 
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+unsubscribe <at> googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hugin-ptx/53FCF2BD.6040609%40suse.cz.
For more options, visit https://groups.google.com/d/optout.

Matthew Petroff | 23 Aug 04:25 2014
Picon

Pannellum 2.0

Two years in the making, I finally released Pannellum 2.0, which is a near complete rewrite. The renderer was replaced with raw WebGL, and multiresolution panorama support was added, along with a fallback CSS 3D renderer. Other additions include support for JSON configuration files, hotspots, tours, compass headings, CORS, partial panoramas, and cubic panoramas. Unfortunately, there is still a dearth of documentation—something I need to work on.

http://pannellum.org/
https://github.com/mpetroff/pannellum/releases/tag/2.0

-Matthew

--
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+unsubscribe <at> googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hugin-ptx/6372ad50-ee6b-4433-a22c-e1bde61eedae%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brandon | 22 Aug 07:53 2014

Looking for a tutorial on pto files

Messing around with the nona and the command line I have acquired an interest in learning more about what is inside a pto file. I have opened them with text editors and I have figured out most of it. http://archive.bigben.id.au/tutorials/360/readme/index.html Also helped.

There are variables in the PTO files that hugin creates that I have not been able to find an explanation for. Is there somewhere that I can go to read up on PTO files as hugin understands them?

--
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+unsubscribe <at> googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hugin-ptx/2ecf6aa8-915a-4ea5-a146-3e01c1597b1d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Brandon | 21 Aug 00:08 2014

Cube to equirectangular

In my work flow I take an equirectangular, make it into a cube to edit the floor and sometimes the sky then use it as is in a Virtural tour. I now have a project where I to put the cubes back into an equirectangular image.

I know that
Bruno Postle has cubic2erect, which sounds like it does what I want. I have never gotten along with pearl though so I am not able to use it as it. Instead I have done the same thing near as I can tell in hugin. I loaded my 6 images, set them at the correct locations and then checked the preview, it looks amazing. I think perfect this is simple. Then I go to stitch it and then I see, it is not so simple as it messes up.

I have stiched a few times, it always claims to have worked. The results are always a bit wonky though. The pictures it warps to make the final pano look good. If I wanted to I could put them together with photoshop or the like. When enblend gets the images it messes them up. Where they come together it tries to blend them and it makes a mess. It seems like there should be a command line option that I could give enblend to not do that. Or maybe I am doing it all wrong and there is another better approach. 


Bruno's script is here http://cpansearch.perl.org/src/BPOSTLE/Panotools-Script-0.28/bin/cubic2erect
I have attached my project file and two example images showing the problem. The only diffence between them is that one is 100 pixels wider which made for a very different blend line.

--
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+unsubscribe <at> googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hugin-ptx/6635abd4-d840-4c64-bd80-2a54b2621a1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Attachment (LWliving_b-LWliving_u.pto): application/octet-stream, 2367 bytes
cwalker | 19 Aug 21:56 2014

Control Points Won't Save

Hi all,

I've had a reoccurring issue with control points not saving properly. 

Here's the gist of it... After control points are added and optimized, I'll save the project. All is well, and it reopens just fine. However, after I generate a panorama and then save that exact same project, upon opening it again the control points change from having an average distance of 2.00 or less to being 15.00 or greater.

Any idea as to why the distance for the control points does not save properly after generating the panorama? Also, any help for how to avoid this would be much appreciated. (It's rather frustrating and time consuming.)

--
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+unsubscribe <at> googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hugin-ptx/ed9cef01-6eab-488e-9068-55671068bfe5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sabuj Das Gupta | 18 Aug 21:30 2014
Picon

3D Voxel Coloring.

Hi there,
 
i hope you guys are doing fine. I came across your website and read about this page
I am planning to do a project on this. Is there any way i can get the codes for this project? I went through that link but that link is dead now.
I can assure you i will respect the copyright of this code and i will not reproduce any paper or article with this code in any where without written permission from the owner.
regards

--
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+unsubscribe <at> googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hugin-ptx/55adf588-3fee-414c-b1e4-7c7d78804874%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jason Chu | 14 Aug 16:28 2014
Picon

Checking ExifTools Failed

Dear all,

Recently I started noticing none of my exif data from the source files are being saved into the final stitched panorama.  I eventually discovered that Hugin was not able to find exiftool anywhere.  I've already done a bit of research into this problem however none of them have fixed the issue.  Namely:

- I confirmed ExifTool.exe is in the Hugin/bin directory
- I tried replacing ExifTool with the latest download from the author's site
- I have no antivirus software installed so it's not being quarantined
- I've reinstalled the program v.2013 without wiping the registry settings
- I've reinstalled the program v.2013 after clearing the registry settings
- Installed the 2014 version (with new settings)

In all cases Hugin refuses to recognize ExifTool.  Lastly, I checked my *.pto.mk file and it also has the correct path as the other components (nona, etc.).  Searching on this forum yielded no results either.  Anyone have any clue???

--
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+unsubscribe <at> googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hugin-ptx/c6216d1d-0b39-41c3-8081-4f5e0d8d9498%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Jason Chu | 14 Aug 16:36 2014
Picon

Checking ExifTool Failed

Dear all,

Recently I noticed that none of my output panoramas have any dates, GPS locations, etc. attached to them.  Furthermore I noticed that in the log that when it checked for ExifTools it failed.  I've already done the following to try and resolve this issue:

- I made sure ExifTool.exe existed in the Hugin/bin directory.
- I also tried downloading the latest ExifTool from the author's website and replace the one installed by Hugin.
- I do not have an antivirus program so ExifTool is not being quarantined.
- I tried reinstalling Hugin v.2013 without clearing the registry.
- I tried reinstalling Hugin v.2013 clearing the registry.
- I then tried installing Hugin v.2014 with a clean registry as well.

After trying everything none of them was able to coax Hugin to recognize that ExifTool exists.  Furthermore I checked in my project file's .pto.mk script that the path to ExifTool was correct.  I'm running everything in a Win7 x64 environment.  So I'm all out of ideas now, anyone else know what I can try???

--
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+unsubscribe <at> googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/hugin-ptx/b44dc1a8-7160-4968-b7a7-4ca0d93d6c8e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Gmane