align_image_stack for timelapse images

Asked by John Davies

I'm looking to use align_image_stack for aligning images to be used for creating a timelapse movie. I was slightly concerned that the alignment algorithm wouldn't handle the parts of the timelapse that are meant to move from one frame to the next but from a quick test it seems to work fine.

However I do have a couple of questions:

1. My test was with just 4 images and I'm concerned about performance if I attempt to align 600 images in one go. The images themselves are 720p format ( 1280 x 720 pixels / ~400kbytes each ). Would it be better to write a script to align each image in turn with the first one rather than attempting to match all 600?

2. The output images are in TIF format. Is it possible to output in JPG/PNG format instead? This isn't a major issue ( other than disk usage! ) as it's relatively simple to convert the files afterwards.

Thanks
John

Question information

Language:
English Edit question
Status:
Solved
For:
Hugin Edit question
Assignee:
No assignee Edit question
Solved by:
John Davies
Solved:
Last query:
Last reply:
Revision history for this message
John Davies (jadavies) said :
#1

Some further information / comments:

1. After some more experimenting it seems that I was wrong about the alignment algorithm and timelapse images. I did have a case where the alignment went astray when it started to align the slow moving parts of the timelapse rather than just using the static parts of the scene. This caused some distortion of subsequent images. Is there a way of specifying or restricting the parts of the image that should be used for the alignment?

I worked around this problem by writing a script to align each image in turn with the first one. That seemed to work OK, and actually may have been quicker, see below. However I don't know if there are any drawbacks to using this method.

2. Time taken to align 50 images in one go was 2min 6s

3. Time taken to align 50 images by aligning each one in turn to the first image was 56s. I also tried aligning 500 images using this method and it took 10min 14s.

( All images were 720p [ 1280 x 720 pixels ], PC spec is a 3GHz, i5, 16Gbyte Ram )

Revision history for this message
tmodes (tmodes) said :
#2

> 1. Is there a way of specifying or restricting the parts of the image that should be used for the alignment?

This is not possible with align_image_stack. This would work with cpfind and using masks (e.g. with cpfind --linearmatch).

> 2. The output images are in TIF format. Is it possible to output in JPG/PNG format instead? This isn't a major issue.
Currently align_image_stack does only output TIF images.

One comment:
Maybe adding --use-given-order to align_image_stack could also help. By default align_image_stack sorts images by exposure value (should correspond to brightness) and processes the images in this order. This is bypassed with the --use-given-order switch. (Not sure if this affects you.)

Revision history for this message
John Davies (jadavies) said :
#3

> > 1. Is there a way of specifying or restricting the parts of the image that should be used
> for the alignment?
>
> This is not possible with align_image_stack. This would work with cpfind and using masks
> (e.g. with cpfind --linearmatch).

OK, thanks. I had more success by writing a script to compare each image in turn to the first image rather than comparing them all in one operation.

> One comment:
> Maybe adding --use-given-order to align_image_stack could also help. By default
> align_image_stack sorts images by exposure value (should correspond to brightness) and
> processes the images in this order. This is bypassed with the --use-given-order switch.
> (Not sure if this affects you.)

Thanks, I had found the --use-given-order option and I was using it already.

If it's of interest, I've uploaded a video with quite a lot of shaking which has been removed using this method - https://youtu.be/nj-DPHWP4-g

( The original video was taken using the built in function of my point and shoot camera so it's not very good quality. However I think that it does show what can be achieved with the align_image_stack tool )

Thanks for the response.