Animation Sequence stacked image alignment

Announcement of new releases, bugs, support, suggestions
Post Reply
HUGHSPEERS
Posts: 4
Joined: 15.03.2018 12:38

Animation Sequence stacked image alignment

Post by HUGHSPEERS »

Hi ,I'm filming a few small objects on a servo controlled turntable, then repeating the shots at differing depths of field.
The batch stacking is working a treat beautiful sharp images , nice work.

When I view all these stacked images in sequence there is quite a bit of miss alignment between frames.
I guess this is to do with some auto align function when stacking.

Is there a way to use the first image of your stack when batch processing as a reference for alignment?

Thanks

John
HUGHSPEERS
Posts: 4
Joined: 15.03.2018 12:38

Re: Animation Sequence stacked image alignment

Post by HUGHSPEERS »

actually its a scaling aberration , every so often a random frame will scale up larger than the rest
User avatar
Stas Yatsenko
Posts: 3841
Joined: 06.05.2009 14:05
Contact:

Re: Animation Sequence stacked image alignment

Post by Stas Yatsenko »

Please make sure that you disabled auto sorting of source files under source image list.
HUGHSPEERS
Posts: 4
Joined: 15.03.2018 12:38

Re: Animation Sequence stacked image alignment

Post by HUGHSPEERS »

Hi Stas
Yes that's it, I've noticed the order flips every so often.
I can't see 'auto sorting of source files' as an option when Batch stacking, so I've de-selected it and selected ascending instead in a render window.
When re batch stacking It is still switching the order when I check each output they have the auto sorting unchecked.
This is what I have happening -
the first two stacks will render files ending - '0001 0061 0121 0181 0241 0301 0361' starting with padded lowest. then the third stack will flip the order '0363 0303 0243 0183 0123 0063 0003' and output a differing scaled stack to others.
I'm guessing this flipping is either a bug or I need to re-name my sequence to make this work.
Just to help debug the stacks follow this ascending to descending flip until '0377 0317 0257 0197 0137 0077 0017'when it flips back to '0018 0078 0138 0198 0258 0318 0378' .
I cant see a pattern though.
My files are named like 'acorn_001_04_X1_0001.jpg' could the underscore be causing a problem?
Thanks for your help
John
sbuerger
Posts: 23
Joined: 05.06.2010 15:31

Re: Animation Sequence stacked image alignment

Post by sbuerger »

This is exactly the #1 issue I have outlined in the thread named "Bug/mistake/missing features in batch processing ". Currently, there is no solution to this as, when in batch mode, automatic sorting of images is always applied. However, according to Stas, Helicon are working on the problem, so hopefully there will be a solution soon.
There is a workaround that, sadly, doesn't work in my situation but may work in yours:
1. Take substantially more shots at different focus positions than you would need for your aimed DOF so that the first picture in a stack is noticeably smaller in scale than the last one (works best if you use a focus rail rather than the lens' focus) while both of them are completely out of focus.
2. With automatic order, HF batch processing then will in *most* cases stack your images back to front as the automatism compares the scales of the first and last picture in a stack and starts with the one that's bigger in scale. But even with the reserve frames, there may be some "dropouts" which are stacked in the wrong order, so:
3. After batch processing is finished, compare the results and, if needed, correct the failed stacks manually. To do so, just click on the corresponding image in the output list. The frame list will then show the image's frames in the order the automatic function arranged them. Now manually set the order as desired (ascending/descending, depending on the order of your shots) and press the "Render" button. A new output in the correct scale will be produced.
4. Special recommendation: Before stacking, set the file name template to "First image file name" in HF prefs. This way, you produce output images whose file names contain evenly increasing numbers like 1, 2, 3, or 0001, 0004, 0007, 0010, and so on. So, if you look at the list of output images and see one whose number differs from the previous one in a non-sequential way, you can easily tell that this image must be scaled the wrong way.

Two caveats:
1. The workaround only works for back-to-front order. Currently there is no way to consistently stack front-to-back in batch processing, so if you depend on that order, you will always have to stack manually.
2. The method does not work with infinite (=all current) microscope objectives since these objectives have an almost telecentrical behavoir. Classical macro lenses and old finite microscope objectives will work in most cases (some better, some worse).

Kind regards
Stephan
HUGHSPEERS
Posts: 4
Joined: 15.03.2018 12:38

Re: Animation Sequence stacked image alignment

Post by HUGHSPEERS »

Hi Stephan

Thanks for such a detailed and thorough reply it is very much appreciated :)

I've started using the work around you suggested of scaling the first image in every stack.
I did this in the compositor I use 'after effects' and scaled the first 500 images of my 2500 image sequence by 98% (stacks of 5 images for a 500 frame sequence).
Then I processed them in Helicon and so far this is working.
This might be a work around if you have missed the opportunity to shoot extra images , with a slight loss in quality.

I'm having a lot of problems with cache and now RAM with the beta of 7 causing crashes so I'm going to look into this now.

Thanks again.

John
User avatar
Stas Yatsenko
Posts: 3841
Joined: 06.05.2009 14:05
Contact:

Re: Animation Sequence stacked image alignment

Post by Stas Yatsenko »

Stephan is correct, except that the stacking direction is determined by comparing the first and the second images, not the first and the last.
Yes, we're working on it and the release version of Focus 7.0 will respect the direction last selected in the main user interface.
sbuerger
Posts: 23
Joined: 05.06.2010 15:31

Re: Animation Sequence stacked image alignment

Post by sbuerger »

Hi there,
@John:
As for the cache problems (ok, taking the risk you figured this out for yourself already): To determine how many stacks will fit into your cache, simply perform one stack manually, then add pictures for a second stack but don't process them (the latter step is needed because some of the cache files for a stack may not be saved to disk unless the next stack is defined). Locate the cache folder on your drive (you can see the path in HF's prefs, which is where you can also set it to another location in order to have more free space for caching) and have the currently consumed disk space displayed. Then divide the total free space on the disc the cache resides in (for instance 200 GB) by the size of the cache folder (for instance 4 GB), and you get the number of identical stacks you can run until running out of disk space (in this example 50 - however, it is always wise to keep a few gigs free in order to keep the system running, so in this case you would not exceed 49 stacks).
After you have completed your available number of stacks, you should quit and restart HF - deleting output files seems not to affect the cache in 7.0, and I would highly recommend not to mess around in the cache folder manually. ;)
Concerning RAM problems, I'm afraid I can't be of any help as I, luckily, never experienced any in HF (which may be so because I usually can't work in batch mode).

@Stas: Oops, didn't know that - luckily I can claim that it's not my fault ;) since this behavior is described wrongly in the german version of HF help manual which currently reads:

"Falls sich ein Objekt vom ersten bis zum letzten Bild vergrößert, wird die Reihenfolge in der Liste automatisch umgekehrt."

This should be corrected to:

"Falls sich ein Objekt vom ersten bis zum zweiten Bild vergrößert, wird die Reihenfolge in der Liste automatisch umgekehrt."

The english version of the manual is less specific - guess the german translator wanted to make clear what happens under the hood but trapped himself...

Kind regards
Stephan
User avatar
Stas Yatsenko
Posts: 3841
Joined: 06.05.2009 14:05
Contact:

Re: Animation Sequence stacked image alignment

Post by Stas Yatsenko »

Thanks for pointing that out, we'll edit that. I think the English version is better worded, there's no use in describing the implementation details that may change in the future.

John, what kinds of crashes are you encountering, can you give me some details? Also, are you on Mac or Windows?
sbuerger
Posts: 23
Joined: 05.06.2010 15:31

Re: Animation Sequence stacked image alignment

Post by sbuerger »

Hi Stas,
here's a direct translation of the english manual text you can use to "synchronize" the german version:

The english section

Code: Select all

Sort ascending, Sort descending, Sort automatically - sets sorting order for the source files list. Sort automatically option enables the program to analyze the stack and automatically reverse the order of images if needed, allowing to avoid banding artifacts along the image edges
in German would be

Code: Select all

"Aufsteigend sortieren", "Absteigend sortieren", "Automatisch sortieren" - Bestimmt die Sortierreihenfolge für die Liste der Quelldateien. Die Option "Automatisch sortieren" bewirkt, dass das Programm den Bilderstapel analysiert und bei Bedarf automatisch die Reihenfolge der Bilder umkehrt, um Streifenartefakte an den Bildrändern zu vermeiden.
The annotation (marked with an asterisk *) in the german version which currently contains the explanation should then be deleted.

Note that in the english version the menu item names are in bold letters while the german version uses quotation marks. I kept this style in the text above to avoid inconsistencies.

Kind regards
Stephan
Post Reply