who has the best image align solution? - General Chat - CHDK Forum

who has the best image align solution?

  • 10 Replies
  • 1763 Views
*

Offline Mlapse

  • *****
  • 583
  • S95 S110
who has the best image align solution?
« on: 20 / October / 2021, 08:55:09 »
Advertisements
My project is running for several years now and in that time the cam has moved (pivot) a few times due to hardware defects, maintenance or clumsyness on my part.  :(
I recut each image to 48px less to give me enough play to correct these sort of changes.
Naturally I also suffer from the usual things like wind, vibration, light changes etc, but these are usually only one or 2 pixels change per time...and I've accepted that as unsolvable by hand.

my method includes having an image at a smaller size as reference image and aligning other images from different series by hand in gimp and then use cmd files with irfanview to sort out, recut and save the images.
this does not correct tilt, barrel distortion or other anomalies that might crop up, but the results are good enough for most things.
I tried panorama tools, while it seemed like a good idea with features like tilt and deform to straighten all images out.
I never got that to work.....no i don't want to stitch them together...i want to save them on the reference size.

Last month the most extreme difference became apparent and camera shift is around 300px horizontal since januari, some screw got loose.  ???
Because of this I will have to recut all old material to a different size or I won't get it aligned.
so this brought me back to the idea of more automation to aligning pictures than tedious looking at enlargements, writing down the best startpoint, shift a pixel, write that down etc. 
Until I come up with best alignment for this series of images and create a series of cmd files, let the cmd files rip until all pictures are processed.
By now i have some 4 years of folders, at least 2 folders a day. so you can imagine rewriting them for a different cut out is a lot of work and won't save me from future cutouts if the cam floats in a different direction.

So i am happy to align them again on this new resolution and create a new mountain of command line files, but sometimes i'm wondering if there isn't a more wise choice to make...
If so, please share.
 
« Last Edit: 20 / October / 2021, 10:50:21 by Mlapse »
frustration is a key ingredient in progress

*

Offline Mlapse

  • *****
  • 583
  • S95 S110
Re: who has the best image align solution?
« Reply #1 on: 20 / October / 2021, 09:14:03 »
thinking about it, if i had a better method of aligning one picture automatically that would give me proper X and Y coordinates for the cutout as a starting point my workflow would already improve much.
 
« Last Edit: 20 / October / 2021, 12:28:58 by Mlapse »
frustration is a key ingredient in progress

*

Offline reyalp

  • ******
  • 14080
Re: who has the best image align solution?
« Reply #2 on: 21 / October / 2021, 02:19:10 »
I don't have a specific recommendation, but for searching, a term you probably want is "image registration"
There are a lot of software and library packages for this problem, and your case should be a comparatively straightforward one (edit: a simple 2d transform). In fact, I suspect one challenge will be finding a package that doesn't have a million complicated features you don't need. But finding one and learning it should probably take less time than doing it manually ;)

Because I'm a sucker for doing things the hard way, I ended up writing my own very braindead gmic script for astrophotography stacks. It takes a difference of small subsections of two images, blindly shifts through a range of offsets and uses the offsets that produce the minimal difference. I initially wrote it on the assumption it would be used for point sources like stars that would cleanly subtract, but it also works reasonably well on the moon (like this). A similar approach might be OK for timelapse scenes.

I could share the gmic script if you really want, but it's specific to my workflow and the gmic language is quit obscure and hard to work with (to me, at least), so you'd probably be better off learning some other tool.
« Last Edit: 21 / October / 2021, 02:21:08 by reyalp »
Don't forget what the H stands for.

*

Offline c_joerg

  • *****
  • 1248
Re: who has the best image align solution?
« Reply #3 on: 21 / October / 2021, 03:26:02 »
Most of my timelapses are stabilized ...

Most of the time I use MATLAB for this. This is a scripting language that is not cheap, however. I have a license from my company. There are the functions for image registration mentioned by reyalp (e.g. imregister). The advantage for me I do a lot in MATLAB (motion blur, median, virtual zoom) and can run all of this using scripts.

In many cases, however, I also use CS6 After Effects. I have that as a demo version that is valid for four weeks. I then always run it in a virtual machine that I reset after 4 weeks. Here you have a lot of options for settings. I mainly use it when zooming in time lapse. But also works very well in static projects.

But many video programs offer this option. I have e.g. Adobe Premiere Elements and use there Shake reduction detailed. This is also very good, but there are few options for setting it up. I once created a video that shows the possibilities.

I mean there is also a plugin for VirtualDub for it. But I've never used it before.

« Last Edit: 21 / October / 2021, 03:29:00 by c_joerg »
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd


*

Offline Mlapse

  • *****
  • 583
  • S95 S110
Re: who has the best image align solution?
« Reply #4 on: 21 / October / 2021, 06:16:40 »
i came across medical alignment software before, but just thought it was a bit much.
thanks reyalp, the search term at least helps me get closer to what i might be looking for.
and despite having downloaded 3 different image registration software packages...
for now i'll still keep working on my csv to feed the cmd scripts as a certain way to get results.
after aligning coordinates are complete it's all fully automatic, so no pain there.

my first morning with simpleElastix was not as expected, so i'll retry later.
« Last Edit: 21 / October / 2021, 06:27:41 by Mlapse »
frustration is a key ingredient in progress

*

Offline c_joerg

  • *****
  • 1248
Re: who has the best image align solution?
« Reply #5 on: 21 / October / 2021, 06:49:42 »
I have had bad experiences with align_image_stack.


after aligning coordinates are complete it's all fully automatic
If it's only about X and Y coordinates:
In this case I calculate the shift only from a very small part of the image that changes the least over time. E.g. a steeple, a house and as in this example, only on the small seeds in the lower center of the picture.

M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline reyalp

  • ******
  • 14080
Don't forget what the H stands for.

*

Offline Mlapse

  • *****
  • 583
  • S95 S110
Re: who has the best image align solution?
« Reply #7 on: 22 / October / 2021, 04:11:16 »
thank you for the links, i've tested both on some images.
but it does not work well with noise (rain, snow, mist etc) and scikit also had trouble with different sun positions

I think scikit might work well in a less dynamic setup, like indoors.

the sift image alignment did a fair job, but got confused in summer when the leaves covered a lot of marker points and in winter when snow beefed up the marker points.
too bad irfanview does not support fine rotation in cmd, otherwise my system would have started rotating the first 1.5m pictures by +1.1 degree.
doing that via the gui is a lot less automatic.
« Last Edit: 22 / October / 2021, 04:30:56 by Mlapse »
frustration is a key ingredient in progress


*

Offline c_joerg

  • *****
  • 1248
Re: who has the best image align solution?
« Reply #8 on: 22 / October / 2021, 05:37:58 »
I know the problem with time lapse with Tiede in the Wadden Sea. I can never take the whole picture because the changes are too big. Sometimes I even put a special mark for reference.
M100 100a, M3 121a, G9x II (1.00c), 2*G1x (101a,100e), S110 (103a), SX50 (100c), SX230 (101a), S45,
Flickr https://www.flickr.com/photos/136329431@N06/albums
YouTube https://www.youtube.com/channel/UCrTH0tHy9OYTVDzWIvXEMlw/videos?shelf_id=0&view=0&sort=dd

*

Offline Mlapse

  • *****
  • 583
  • S95 S110
Re: who has the best image align solution?
« Reply #9 on: 22 / October / 2021, 05:51:05 »
It's been a long time since I was at the Wadden Sea, but I guess it's as wide as ever  :)
without a marker it could get tough...i think you would need a very well trained AI to get images aligned automatically.
luckely my csv is coming along nicely, no AI only HI....and the reliability of HI is limited in other ways :)
frustration is a key ingredient in progress

 

Related Topics