Input pixel size limit for Panomatic

Discussion forum for techniques and issues relating to the creation of panoramic and/or "mosaic" images

Moderator: spamkiller

Post Reply
WJBrumley
Posts: 4
Joined: Fri Dec 28, 2012 11:06 am

Input pixel size limit for Panomatic

Post by WJBrumley » Fri Dec 28, 2012 11:27 am

I have successfully used PT Assembler and plugins for some time. I have now found with my Nikon D800 jpeg files (4912x7360 pixels) I get an "allocation error" and the control point picker fails to return any control points. If control points are selected manually everything works just as expected. I use Panomatic for control point picker since autopano 1.03 says it will not work on 64 bit systems. I am running Windows 7 64 bit OS. If I resample file size to a maximum dimension of 5000 pixels, the control point picker returns control points just fine causing me to suspect I have encountered a limitation of Panomatic. I would like to know if anyone else has encountered the same problem and found a workaround, other than manual selection of control points or reducing the number of pixels.

dsp
Posts: 586
Joined: Tue Feb 20, 2007 11:09 am
Location: Hoboken, NJ

Re: Input pixel size limit for Panomatic

Post by dsp » Sat Dec 29, 2012 9:59 pm

I just rescaled some pics to 8000 on the long edge, and the 32-bit version of panomatic dumps with the error you note. If I use a 64-bit version, it finds control points for those images with no problem. There are a few 64-bit versions floating around on the web...
cheers, Darcy

WJBrumley
Posts: 4
Joined: Fri Dec 28, 2012 11:06 am

Re: Input pixel size limit for Panomatic

Post by WJBrumley » Sun Dec 30, 2012 3:38 pm

As suggested the 64-bit version of panomatic seems to have resolved the issue.

WJBrumley
Posts: 4
Joined: Fri Dec 28, 2012 11:06 am

Re: Input pixel size limit for Panomatic

Post by WJBrumley » Mon Dec 31, 2012 1:45 pm

My initial testing was with 2 images and everything worked as expected. I then tried a group of 4 images (2x2) and that worked as well. However when I tried a linear group of 3 or more images the control point picker seemed to get confused. I did not get an error, but the control points made no sense. Are there parameters to be set that tells the control point picker the arrangement of the images to use. For example 6 liner or a 3x3 panel of 9 images. Again, any help would be appreciated. I did a quick search, but did not find a list of parameters to be used for panomatic.

WJBrumley
Posts: 4
Joined: Fri Dec 28, 2012 11:06 am

Re: Input pixel size limit for Panomatic

Post by WJBrumley » Mon Dec 31, 2012 2:54 pm

I think I found a solution to my issue. I just stay away from the autocreate. The control point picker will work just fine on any pair of images, and since I know how they were shot it is easy to make the selection of the proper pair(s) for any arrangemet of images (e.g 1x6, 2x2 or 2x5).

maxlyons
Posts: 3649
Joined: Fri Jun 20, 2003 8:55 pm
Location: USA
Contact:

Re: Input pixel size limit for Panomatic

Post by maxlyons » Tue Jan 01, 2013 7:54 pm

WJBrumley wrote:I think I found a solution to my issue. I just stay away from the autocreate. The control point picker will work just fine on any pair of images, and since I know how they were shot it is easy to make the selection of the proper pair(s) for any arrangemet of images (e.g 1x6, 2x2 or 2x5).
There are a few issues raised in this thread. Here are some comments:

1. By default, Panomatic seems to be want to use quite a lot of memory. I also tested with some images sized at 4912x7360 pixels, and the 32-bit version of Panomatic failed because it ran out of memory. On my machine, Panomatic tried to process four images in parallel (I assume because my processor has four cores), and each image seemed to require a little more than one gigabyte of RAM. And, regardless of how much RAM your machine has, a 32 bit program can never use more than 2 or 3 gigabytes of RAM, so trying to process four images at the same time (i.e. requiring more than 4GB of RAM) causes a failure. However, this problem can be solved by using a 64 bit version of Panomatic (as Darcy suggested), or simply by reducing the number of images that Panomatic tries to process in parallel by using the "-n" command line argument. In PTAssembler's "Control Point Helper Program Configuration" screen, any command line arguments can be specified for Panomatic. If you specify "-n 1", this will tell Panomatic to only use one core, and only one image will be processed at a time, reducing the amount of memory that Panomatic needs.

2. The complete list of command line arguments that Panomatic understands can be printed simply by running Panomatic at the command line (this works for many command line programs). Here is the list that it prints:

Code: Select all

Pan-o-matic 0.9.4 by Anael Orlinski - naouel@naouel.org

Basic usage : 
  panomatic -o output IMG1 ... IMGn

All options : 
-o <string>,  --output <string>
                              (required)  Output file
-n <int>,  --ncores <int>     Number of CPU/Cores    (default:autodetect)
-t,  --test                   Enables test mode

--fullscale                   Uses full scale image to detect keypoints    (default:false)

--surf128                     Uses extended SURF (128 descriptors)    (default:true)
--surfscore <int>             SURF Detection score threshold    (default : 1000)

--sieve1width <int>           Sieve 1 : Number of buckets on width    (default : 10)
--sieve1height <int>          Sieve 1 : Number of buckets on height    (default : 10)
--sieve1size <int>            Sieve 1 : Max points per bucket    (default : 10)

--kdtreesteps <int>           KDTree : search steps    (default : 40)
--kdtreeseconddist <double>   KDTree : distance of 2nd match    (default : 0.15)

--linearmatch                 Enable linear images matching (default : all pairs)
--linearmatchlen <int>        Number of images to match in linear matching (default:1)

--minmatches <int>            Minimum matches    (default : 4)
--ransaciter <int>            Ransac : iterations    (default : 1000)
--ransacdist <int>            Ransac : homography estimation distance threshold (pixels)
                                  (default : 25)
--sieve2width <int>           Sieve 2 : Number of buckets on width    (default : 5)
--sieve2height <int>          Sieve 2 : Number of buckets on height    (default : 5)
--sieve2size <int>            Sieve 2 : Max points per bucket    (default : 1)

--ptgui                       Activate Autopano compatibility for PTGui

--,  --ignore_rest            Ignores the rest of the labeled arguments following this flag.
--version                     Displays version information and exits.
-h,  --help                   Displays usage information and exits.
<string>  (accepted multiple times)
                              (required)  Image files

3. Automatic control point selection doesn't always work 100% perfectly. In some cases, the control point picker program mistakenly finds "matching" features in images that don't overlap. This is true for any of the control point picker programs. It is hard to predict when this will happen, but in my experience it is more likely to happen with sets of images that have a lot of similar patterns. In any case, it isn't too common, so unless you find this happening a lot with the types of images you shoot, I wouldn't abandon autocreate on the basis of one problematic set of images.

4. You can usually weed out "bad" control points using the "control point information" screen. You can sort the list of control points by their optimized distances (i.e. positioning error), and remove the ones that have the largest distances, before optimizing the project again.

Max

dsp
Posts: 586
Joined: Tue Feb 20, 2007 11:09 am
Location: Hoboken, NJ

Re: Input pixel size limit for Panomatic

Post by dsp » Tue Jan 01, 2013 11:12 pm

Max has it right on about limiting the number of cores. This is especially true for the 32-bit variants, but even with 64-bit machines, you are limited to the physical memory you actually have. For reference sake, how much RAM do you have in your machine?
I just made an 11 image linear pano with 8000x5333 pix images (8 images should be enough for testing with # of images= # of cores).
Using all 8 cores, peak memory usage of panomatic was ~10 GB.
Using -n 4, peak memory was 5 GB.
Using -n 2, peak mem was 2.5 GB,

Most of the mem allocation is in the very first steps, and drops quickly as the program runs, with a quick spike at the end. Restricting the number of cores seems to slow mainly the conversion/segmentation of the images (as it has to do them n at a time), while the matching is not slowed significantly on my machine. In all cases, on my machine, for the 11 image pano, the ctrl pt program takes less than 2 mins to run on this pano. so it isn't a big deal restricting cores, unless you have a a huge number of images. As far as the weird behavior, panomatic has been known to crap out in this way, which I think is in some ways worse than throwing and error and exiting completely.
cheers, Darcy

Terrywoodenpic
Posts: 376
Joined: Mon Mar 06, 2006 10:05 am
Location: Saddleworth England

Re: Input pixel size limit for Panomatic

Post by Terrywoodenpic » Thu Jan 03, 2013 12:12 pm

Hi
where do you download a working 64 bit version from?
Terry

old decrepit and still taking photographs

dsp
Posts: 586
Joined: Tue Feb 20, 2007 11:09 am
Location: Hoboken, NJ

Re: Input pixel size limit for Panomatic

Post by dsp » Thu Jan 03, 2013 12:26 pm

Hi Terry,
I'm working on it...
cheers, dsp

dsp
Posts: 586
Joined: Tue Feb 20, 2007 11:09 am
Location: Hoboken, NJ

64-bit panomatic

Post by dsp » Thu Jan 03, 2013 8:54 pm

[edit] updated post[/edit]

I'll keep a version here for the near term (week or so). It works well on my machine, but I make no warranties about the program and its performance, nor offer any support.

for software, see this thread... viewtopic.php?f=3&t=6573


Change the file extension back to '.exe'. The 64 bit version doesn't change panomatic's memory aggressiveness, so depending on the available RAM, you still may have to limit the number of cores.

cheers, Darcy

Post Reply

Who is online

Users browsing this forum: Google [Bot] and 3 guests