Atik Cameras

Author Topic: Realtime 17FPS image registration with Titan  (Read 8174 times)

NickK

  • Full Member
  • ***
  • Posts: 249
Realtime 17FPS image registration with Titan
« on: June 10, 2014, 10:21:53 pm »
So, I've been playing..

http://stargazerslounge.com/topic/218697-atik-titan-gets-a-17fps-realtime-registration-test-d/

The titan is pointing at the screen without a lens. The computer is capturing each image, uploading it to the GPU (graphics chip) and then using the graphics chip to perform image alignment for realtime stacking.
At 17FPS, it means each image is taking approximately 0.057 seconds to process. The 383L images are fast too.

Once I have time, I'll set this up with a scope and take another video - hopefully realtime solar/planetary stacking!

The code is not optimised, it's also processing LRGB as greyscale so there is a possibility I can get this running at 60fps for mono cameras.

The link also shows my original CPU based routine that, when optimised, took 4 seconds to align a 383L image.
ATIK 383L+, Titan, 16IC, EFW2, OAG | Pentax 105SDP | NEQ6
Author of the ATIK OSX Drivers and AOSX - Astronomy on OSX

ForumAdmin

  • Administrator
  • Newbie
  • *****
  • Posts: 35
Re: Realtime 17FPS image registration with Titan
« Reply #1 on: June 12, 2014, 02:09:03 pm »
That is very cool indeed.  Would be great for star parties.
Steve

NickK

  • Full Member
  • ***
  • Posts: 249
Re: Realtime 17FPS image registration with Titan
« Reply #2 on: June 15, 2014, 09:40:14 pm »
I've now added some more videos of the registration.

Optimisations are needed but based on the current optimisations returning a couple of FPS each time I should be able to keep up with the titan in mono mode and display at that rate.

The algorithm itself is doing 30fps, but it has to balance with the GPU usage to render to the screen (apple's code seems to take a bit of time!).
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 17FPS image registration with Titan
« Reply #3 on: June 17, 2014, 09:01:22 pm »
I've been running a thread on this - original starting with a 383L integrating using the CPU and now using the GPU to perform the same task at a far faster rate - this thread has the 30FPS example and live 10 fps demonstration:

Stargazers Lounge (my main forum): http://stargazerslounge.com/topic/190363-bit-of-coding-and-my-383-is-now-an-integrating-video-camera-d/page-3

Cloudy Nights http://www.cloudynights.com/ubbthreads/showflat.php/Cat/0/Number/6575278/page/0/view/collapsed/sb/5/o/all/fpart/1

Charlie's very good solar chat forum: http://solarchat.natca.net/viewtopic.php?f=4&t=11905
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 17FPS image registration with Titan
« Reply #4 on: July 05, 2014, 07:11:50 pm »

Here's a further example - I promised a daylight shot.. here's the scope setup and you can see the image borders change with the alignment as I press against the scope.

http://youtu.be/NsdcdW51pcs

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 17FPS image registration with Titan
« Reply #5 on: July 07, 2014, 07:38:56 pm »
Testing DSOs.. using test data - NOT REALTIME DATA - a set of 600 second, 10 second and 4 second subs through a Pentax 105SDP. 383L images at 17MB each without stretch:

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 17FPS image registration with Titan
« Reply #6 on: July 12, 2014, 09:17:30 pm »
I still need finish sub-pixel alignment, get the stacking more sophisticated stacking …

Here's data from last year - the Titan solar.. without the time to read from disk, this is working at ~171-181 frames/sec:
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 17FPS image registration with Titan
« Reply #7 on: July 12, 2014, 09:18:49 pm »
Again, using the data from my 383L when doing planetary :D This is an example of 17.1MB images - the frame rate drops to 59 frames/sec.


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 17FPS image registration with Titan
« Reply #8 on: July 13, 2014, 06:53:27 pm »
I've implemented an on-the-fly grading system that grades the images on the fly. The result is I can set the parameters and set the minimum grade of the image on the fly.

The result is really good :D

This is the same data as above, however the lower quality frames are rejected - but the clarity is apparent if you look at the edge of the sun, the spot or the surface.
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 17FPS image registration with Titan
« Reply #9 on: July 19, 2014, 08:09:59 pm »
Almost finished the on-the-fly PSF deconvolution.

This models the blur introduced by your scope attempting to work beyond it's limits and then undoes it - it won't undo atmospheric blurring but this is an example:

First a single sub from whitelight Titan using a 4" APO at 6700mm focal length (f/64!) - this is why it's appearing a little soft:
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 17FPS image registration with Titan
« Reply #10 on: July 19, 2014, 08:11:21 pm »
Now the new sharpening I'm adding - I still need to deal with the scaling (the reason the image changes colour is due to the wrapping of the pixel value):

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 17FPS image registration with Titan
« Reply #11 on: July 21, 2014, 07:16:50 am »
Update

I've now got all this working on the fly in realtime:
* PSF deconvolution - this provides sharpening to undo scope airy disks
* image grading and rejection - this will reject images that are blurred
* auto-stretching - this stretches the image pixel values
* sub-pixel alignment - providing accurate alignment between pixels
* upscale drizzle stacking - takes advantage of the alignment between pixels.

First image - without drizzle:
« Last Edit: July 21, 2014, 07:22:36 am by NickK »
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 17FPS image registration with Titan
« Reply #12 on: July 21, 2014, 07:17:44 am »
Second image - drizzle switched on at 4x4 upsample (click for full resolution - you can see more of the effect of drizzle):
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 17FPS image registration with Titan
« Reply #13 on: July 22, 2014, 10:24:54 am »
Planetary example with the pipeline doing a realtime 8x8 drizzle.
The camera is a 383L, 5.4um pixels but it's minimum exposure time of over a second. The scope is running at 3350mm fl, or f32 - which makes for a soft image considering it's only a 4" APO.
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 17FPS image registration with Titan
« Reply #14 on: July 26, 2014, 01:06:29 pm »
Example 383L lunar sub with the app processed 12 subs - I wrote the output to a file instead of the window - with PI providing side by side and auto-stretch of both images.

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