Atik Cameras Forum

General => Equipment => Topic started by: NickK on June 10, 2014, 10:21:53 pm

Title: Realtime 17FPS image registration with Titan
Post by: NickK 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.
Title: Re: Realtime 17FPS image registration with Titan
Post by: ForumAdmin on June 12, 2014, 02:09:03 pm
That is very cool indeed.  Would be great for star parties.
Steve
Title: Re: Realtime 17FPS image registration with Titan
Post by: NickK 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!).
Title: Re: Realtime 17FPS image registration with Titan
Post by: NickK 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
Title: Re: Realtime 17FPS image registration with Titan
Post by: NickK 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

Title: Re: Realtime 17FPS image registration with Titan
Post by: NickK 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:

Title: Re: Realtime 17FPS image registration with Titan
Post by: NickK 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:
Title: Re: Realtime 17FPS image registration with Titan
Post by: NickK 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.


Title: Re: Realtime 17FPS image registration with Titan
Post by: NickK 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.
Title: Re: Realtime 17FPS image registration with Titan
Post by: NickK 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:
Title: Re: Realtime 17FPS image registration with Titan
Post by: NickK 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):

Title: Re: Realtime 17FPS image registration with Titan
Post by: NickK 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:
Title: Re: Realtime 17FPS image registration with Titan
Post by: NickK 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):
Title: Re: Realtime 17FPS image registration with Titan
Post by: NickK 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.
Title: Re: Realtime 17FPS image registration with Titan
Post by: NickK 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.
Title: Re: Realtime 17FPS image registration with Titan
Post by: NickK on August 10, 2014, 11:17:15 am
I've been working on a focusing system, it rewards a high signal for large amounts of detail - so the better the focus the more detail will appear and so the higher the grading.

The green graph is the percentage (0 to 100%) grading overlaying on the image - the upper and lower bounds are shown as darker green colour.

As a focusing tool this works nicely - the image is through rain soak glass (we are in the middle of rain/winds that have a UK national alert!). However form inside.. here's the flowers from the bottom of the garden: