Atik Cameras

Author Topic: Realtime image registration stacking for live viewing!  (Read 16788 times)

NickK

  • Full Member
  • ***
  • Posts: 249
Realtime image registration stacking for live viewing!
« on: July 24, 2013, 10:11:53 PM »
I'm on vacation so I've spent a day writing automatic alignment of images (that rotate, scale and move) so that images can be stacked in "real time".

This means you can use your camera like a video camera, each frame taken (say 5 second exposures) is aligned and stacked automatically in realtime.

The code isn't finished, but currently will automatically detect, align and stack 17MB 383L frames in 8 seconds with lots of diagnostic images being generated during that time too. I should be able to get this down to 1-2 seconds which, when coupled with a 5 second exposure will result in a near realtime "live view" :D

Below is a scaled down example rotation of the frame - the software detects the misalignment and corrects automatically .. in the next post is the correct image.
ATIK 383L+, Titan, 16IC, EFW2, OAG | Pentax 105SDP | NEQ6
Author of the ATIK OSX Drivers and AOSX - Astronomy on OSX

NickK

  • Full Member
  • ***
  • Posts: 249
Re: Realtime image registration stacking for live viewing!
« Reply #1 on: July 24, 2013, 10:13:20 PM »
The attached image has been automatically corrected.. a little more work and it will sit within the Example Application - alongside the "static stacking" which doesn't perform the alignment.
ATIK 383L+, Titan, 16IC, EFW2, OAG | Pentax 105SDP | NEQ6
Author of the ATIK OSX Drivers and AOSX - Astronomy on OSX

ForumAdmin

  • Administrator
  • Newbie
  • *****
  • Posts: 36
Re: Realtime image registration stacking for live viewing!
« Reply #2 on: July 25, 2013, 01:00:27 PM »
cool,  I have enjoyed doing this kind of thing with webcams at star parties in the past.
Steve

NickK

  • Full Member
  • ***
  • Posts: 249
Re: Realtime image registration stacking for live viewing!
« Reply #3 on: July 28, 2013, 10:02:24 PM »
An update - I've improved the accuracy with interpolation. The result is it's doing a very good job of alignment; actually it's getting accuracy to 3 decimal places to what pixinsight gives!

Still lots more testing and playing - it's very much development at the moment but the idea is it will be added to the example application :)

Nick
ATIK 383L+, Titan, 16IC, EFW2, OAG | Pentax 105SDP | NEQ6
Author of the ATIK OSX Drivers and AOSX - Astronomy on OSX

NickK

  • Full Member
  • ***
  • Posts: 249
Re: Realtime image registration stacking for live viewing!
« Reply #4 on: July 30, 2013, 09:10:15 PM »
Native resolution alignment - images added together:
ATIK 383L+, Titan, 16IC, EFW2, OAG | Pentax 105SDP | NEQ6
Author of the ATIK OSX Drivers and AOSX - Astronomy on OSX

NickK

  • Full Member
  • ***
  • Posts: 249
Re: Realtime image registration stacking for live viewing!
« Reply #5 on: July 30, 2013, 09:13:01 PM »
Here's an 800x600 image of the two aligned images, showing the overview images:
ATIK 383L+, Titan, 16IC, EFW2, OAG | Pentax 105SDP | NEQ6
Author of the ATIK OSX Drivers and AOSX - Astronomy on OSX

ForumAdmin

  • Administrator
  • Newbie
  • *****
  • Posts: 36
Re: Realtime image registration stacking for live viewing!
« Reply #6 on: July 31, 2013, 03:35:54 PM »
Would I be right to assume that the camera was not tracking?  The 383 is capable of drift scan imaging but we never implemented this.  Might be a project for a rainy day :)
Steve

NickK

  • Full Member
  • ***
  • Posts: 249
Re: Realtime image registration stacking for live viewing!
« Reply #7 on: July 31, 2013, 06:08:39 PM »
Hi Steve,
The mount wasn't aligned at all - literally placed down pointing north but set to track at sidereal rate (no guiding). This meant that the few seconds for exposures didn't cause trails but the target drifted over time (in this case it's saturn at the bottom as an easy target to use for testing).

Drift tracking would be easy to implement. The main thing is getting the alignment speed correct - and using optic flow the mount tracking speed could work for off the sensor without needing PHD for example. This conversation sounds familiar but the shutter would need to be kept open during the continous reading :)

Nick
ATIK 383L+, Titan, 16IC, EFW2, OAG | Pentax 105SDP | NEQ6
Author of the ATIK OSX Drivers and AOSX - Astronomy on OSX

NickK

  • Full Member
  • ***
  • Posts: 249
Re: Realtime image registration stacking for live viewing!
« Reply #8 on: July 31, 2013, 06:21:29 PM »
I have to add that deliberately didn't have the cooling running to get as much noise as possible as a test case.
ATIK 383L+, Titan, 16IC, EFW2, OAG | Pentax 105SDP | NEQ6
Author of the ATIK OSX Drivers and AOSX - Astronomy on OSX

NickK

  • Full Member
  • ***
  • Posts: 249
Re: Realtime image registration stacking for live viewing!
« Reply #9 on: July 31, 2013, 07:10:06 PM »
Here's an additive stack of the two input images.

Here you can see what would happen without alignment and the images were stacked "statically" - if your mount is aligned perfectly you can do without alignment and just stack but most mounts can't get the accuracy.
ATIK 383L+, Titan, 16IC, EFW2, OAG | Pentax 105SDP | NEQ6
Author of the ATIK OSX Drivers and AOSX - Astronomy on OSX

NickK

  • Full Member
  • ***
  • Posts: 249
Re: Realtime image registration stacking for live viewing!
« Reply #10 on: August 04, 2013, 12:00:38 PM »

Youtube video of the Example App aligning and stacking :)

http://youtu.be/yOoAJDAJ9xM

ATIK 383L+, Titan, 16IC, EFW2, OAG | Pentax 105SDP | NEQ6
Author of the ATIK OSX Drivers and AOSX - Astronomy on OSX