Tutorial on Planetary Image Processing with PixInsight: Jupiter by David Pretorius

Juan Conejero

PixInsight Staff
Staff member
<Texto en Espa?ol al final>

Australian planetary imager David Pretorius has published the raw data of one of his excellent Jupiter images:

http://www.iceinspace.com.au/forum/showthread.php?t=32254

David has kindly given us permission to use his raw data to write a small tutorial on planetary image processing in PixInsight, which we present here. We hope you'll find it interesting and useful.

Here is the final image, processed with the procedures and techniques described herein:

final.jpg



1. Registration and Integration of Raw Frames

The FFTRegistration script comes in the default set of example JavaScript scripts of the latest PixInsight versions. This script can be used to perform the automatic registration (alignment) of a set of disk image files. As its name suggests, FFTRegistration uses Fourier-based image registration algorithms.

To run the FFTRegistration script, select Script > Sample Scripts > FFTRegistration from the main menu.

01.jpg


On the FFTRegistration script dialog, click the Select button in the Reference Image section. The script will align a set of target images with respect to a reference image that we must select here.

02.jpg


In this example, we have selected as reference the first image of each set, which is supposed to be the best one in terms of relative quality.

Now we must select a set of images to be aligned. Click the Add button in the Target Images section:

03.jpg


On the Select Target Images dialog, we have selected all images of each set except the first one, which is the reference image. Obviously, including the reference image in the set of target images doesn't make any sense, although it doesn't hurt either.

04.jpg


Below you can see the FFTRegistration script dialog with the whole set of images selected for the red channel in this example.

05.jpg


The Registration Options section of the FFTRegistration script dialog allows you to select some parameters to control the image registration procedure. The rotation and scaling corrections are still experimental features that use development algorithms, so we don't recommend selecting these options for production work. Optionally, you can write the resulting registered images to a selected output directory in FITS format. You can also integrate (stack) all registered images by averaging them, which is just what we have done in this example.

When you are done, click the OK button and wait for the integrated image to appear. The Processing Console window will show you a lot of information about the ongoing processes. Here's a useful tip: the FFTRegistration script can run significantly faster if you hide the Processing Console window, by clicking on its Hide icon, as shown below. This is particularly useful if your computer isn't very fast.

06.jpg


When the script terminates its execution, it will create a new image window with the average of all registered images in 32-bit floating point format. It is convenient to change the identifier of this image, to facilitate its identification during the rest of our work.

07.jpg


After running the FFTRegistration script for each individual RGB channel, we have three grayscale images that correspond to the red, green and blue channels of the Jupiter image of our example. As we have said, each of these images is the average of all registered images for a single channel, and has been generated in 32-bit floating point format. In this example, we have renamed these images to Red, Green and Blue, respectively.


2. Mutual Alignment of Individual RGB Channels

Before continuing, we'll create working duplicates of the Red, Green and Blue images. This can be done very easily by dragging the corresponding view selectors with the mouse, or by selecting Image > Duplicate from the main menu.

08.jpg


Now we'll apply a rough wavelet transformation to enhance details in the working duplicates. This enhancement will facilitate greatly the alignment procedure.

09.jpg


Note that we are not interested in these working duplicates; of course we'll do much better than these rough transforms. The purpose of the wavelet transformation applied here is to enhance local contrast of small-scale image structures that will be used as alignment references.

We'll begin by aligning the Green image with respect to the Red image. To this purpose, we'll use the DynamicAlignment tool in PixInsight. DynamicAlignment is a semi-automatic image registration process for high-precision registration of deep-sky images. Although this tool has been designed to use stellar images as registration references, with some care and a few tricks it can also be used to align high-resolution planetary images, provided that enough details are available.

With the DynamicAlignment interface opened, we select the reference image (Red in our example):

10.jpg


and then the target image, or the image that will be registered (Green):

11.jpg


To align planetary images, one must use small, high-contrast planet features as alignment references. DynamicAlignment allows you to use bright and dark features. Bright features (which are the equivalent to stars in deep-sky images) are selected by default. To select a dark feature, hold the Control key pressed while you click near a feature on the reference image, or click the Invert icon at the top of the DynamicAlignment interface.

12.jpg


On the screenshot above, you can see how a Screen Transfer Function (STF) can be used to improve the visibility of details and alignment points. Also note the relatively small search radii (five pixels in the screenshot), necessary to use very small image structures as alignment references.

We have used seven alignment points. Two or three would suffice in this example, provided that they are not too close on the planetary disk. DynamicAlignment always performs a sub-pixel image registration. It is able to correct for arbitrary local distortions when three or more alignment points are defined. With less than three alignment points, DynamicAlignment applies an affine transformation. With two alignment points, it can correct for translation (mutual displacement on the plane), rotation, and scaling in one direction. With just one alignment point, only translation can be corrected. Note that all registration points defined will be matched exactly in the registered image (labelled as target image on DynamicAlignment), with respect to the reference image (source image in DynamicAlignment).

Here you can see another screenshot taken while we were selecting alignment features for the Green image:

13.jpg


Recall that we have created duplicate working images, with the sole purpose of defining alignment points. What we really want is to align the original integrated images, that is, our Green and Blue images, with respect to the Red image. So we have to apply the DynamicAlignment instance to the Green image, as can be seen below:

14.jpg


This generates a Green_registered image:

15.jpg


A similar procedure has been applied to register the Blue image over the Red image, which has generated a Blue_registered image:

16.jpg



3. RGB Composite Image

At this point the working duplicates are no longer necessary, and can be discarded.

Here are the three resulting images, namely Red, Green_registered, and Blue_registered, ready to be combined as a single RGB color composite image. The ChannelCombination tool can be used to carry out this simple task:

17.jpg



4. Detail Enhancement and Noise Reduction: ATrousWaveletTransform and GREYCstoration

After applying ChannelCombination globally (F6), a RGB image is obtained. We have renamed it as RGB. You can see it here, while we were trying out some wavelet transformations:

18.jpg


19.jpg


Finally, here is the processed image, after a careful wavelet transformation, rotation, and additional noise reduction with the GREYCstoration algorithm:

final.jpg


We hope you'll like this small tutorial. Any comments or ideas will be welcome.

Thanks to Dave Pretorius for allowing us to work with his excellent raw images.



====================================================================================================================
====================================================================================================================
====================================================================================================================



El astrofot?grafo planetario australiano David Pretorius ha publicado los datos en bruto de una de sus excelentes im?genes de J?piter:

http://www.iceinspace.com.au/forum/showthread.php?t=32254

David nos ha dado permiso amablemente para utilizar sus datos en bruto con el fin de escribir un peque?o tutorial sobre procesamiento de im?genes planetarias en PixInsight, que presentamos aqu?. Esperamos que os resulte interesante y ?til.

Aqu? est? la imagen final procesada con los procedimientos y t?cnicas descritos en este tutorial:

final.jpg



1. Registro e Integraci?n de Im?genes Raw

El script FFTRegistration viene en el conjunto de scripts de ejemplo por defecto en las ?ltimas versiones de PixInsight. Este script puede ser utilizado para llevar a cabo el registro (alineaci?n) autom?tico de un conjunto de im?genes almacenadas en archivos de disco. Como su nombre sugiere, FFTRegistration usa algoritmos basados en transformadas de Fourier.

Para ejecutar el script FFTRegistration, seleccione Script > Sample Scripts > FFTRegistration desde el men? principal.

01.jpg


En el cuadro de di?logo del script FFTRegistration, haga clic en el bot?n Select de la secci?n Reference Image. El script alinear? un conjunto de im?genes seleccionadas con respecto a la imagen de referencia, que debemos escoger aqu?.

02.jpg


En este ejemplo hemos seleccionado como referencia la primera imagen de cada conjunto, que se supone que es la mejor en t?rminos de calidad relativa.

Ahora debemos seleccionar un conjunto de im?genes para ser alineadas. Haga clic en el bot?n Add de la secci?n Target Images:

03.jpg


En el di?logo Select Target Images hemos seleccionado todas las im?genes de cada conjunto excepto la primera, que es la imagen de referencia. Obviamente, incluir la imagen de referencia en el conjunto de im?genes que ser?n registradas no tiene sentido, aunque tampoco causar?a problema alguno.

04.jpg


En la captura de pantalla siguiente puede ver el di?logo del script FFTRegistration con el conjunto completo de im?genes seleccionadas para el canal rojo en este ejemplo.

05.jpg


La secci?n Registration Options del di?logo del script FFTRegistration le permite cambiar algunos par?metros que controlan el proceso de registro de im?genes. Las correcciones por rotaci?n y escala (rotation y scaling) son todav?a funciones experimentales que emplean algoritmos en desarrollo, de manera que no le recomendamos seleccionar estas opciones para trabajos de producci?n. Opcionalmente, puede escribir las im?genes registradas resultantes en un directorio de salida (output directory) seleccionable, en formato FITS. Puede tambi?n integrar todas las im?genes promedi?ndolas, que es exactamente lo que hemos hecho en este ejemplo.

Cuando haya terminado, haga clic en el bot?n OK y espere hasta que aparezca la imagen integrada resultante. La ventana Processing Console se abrir? y le mostrar? mucha informaci?n sobre el proceso en curso. Aqu? tiene un consejo bastante ?til: El script FFTRegistration puede ejecutarse significativamente m?s r?pido si usted oculta la ventana Processing Console, haciendo clic en su icono Hide (ocultar), como se muestra a continuaci?n. Esto es particularmente ?til si su computadora no es muy r?pida.

06.jpg


Cuando el script termine su ejecuci?n, crear? una nueva ventana de imagen con el promedio de todas las im?genes registradas en formato de punto flotante de 32 bits. Es conveniente cambiar el identificador de esta imagen para facilitar su identificaci?n durante el resto de nuestro trabajo.

07.jpg


Tras ejecutar el script FFTRegistration para cada canal RGB individual, tenemos tres im?genes en escala de grises que corresponden a los canales rojo, verde y azul de la imagen de J?piter de nuestro ejemplo. Como hemos dicho, cada una de estas im?genes es el promedio de todas las im?genes registradas para un canal, y ha sido generada en formato de punto flotante de 32 bits. En este ejemplo hemos renombrado estas im?genes como Red, Green y Blue, respectivamente.


2. Alineaci?n M?tua de Canales RGB Individuales

Antes de continuar crearemos duplicados de trabajo de las im?genes Red, Green y Blue. Esto se puede hacer muy f?cilmente arrastrando los selectores de vista con el rat?n, o seleccionando Image > Duplicate desde el men? principal.

08.jpg


Ahora aplicaremos una transformaci?n por wavelets bastante agresiva para potenciar los detalles en los duplicados de trabajo. Esta mejora de detalles facilitar? mucho el proceso de alineaci?n.

09.jpg


Tenga en cuenta que no estamos interesados en estos duplicados de trabajo; por supuesto, conseguiremos resultados mucho mejores que los que proporcionan estas transformaciones temporales. El prop?sito de la transformaci?n por wavelets aplicada aqu? es mejorar el contraste local para estructuras de la imagen de peque?a escala, que ser?n utilizadas como referencias de alineaci?n.

Comenzaremos alineando la imagen Green con respecto a la imagen Red. Con este prop?sito, haremos uso de la herranmienta DynamicAlignment en PixInsight. DynamicAlignment es un proceso semiautom?tico para el registro de alta precisi?n de im?genes de cielo profundo. Aunque esta herramienta ha sido dise?ada para utilizar im?genes estelares como referencias de alineaci?n, con alg?n cuidado y usando unos pocos trucos tambi?n puede ser aplicada para alinear im?genes planetarias de alta resoluci?n, siempre que existan suficientes detalles.

Con la interfaz de DynamicAlignment abierta, seleccionaremos la imagen de referenca (Red en nuestro ejemplo):

10.jpg


y a continuaci?n la imagen destino (target) que es la imagen a alinear (Green):

11.jpg


Para alinear im?genes planetarias se debe seleccionar caracter?sticas planetarias peque?as y de alto contraste como referencias de alineaci?n. DynamicAlignment le permite seleccionar caracter?sticas tanto brillantes como oscuras. Las caracter?sticas brillantes (que equivalen a estrellas en im?genes de cielo profundo) son seleccionadas por defecto. Para seleccionar una estructura oscura, mantenga la tecla Control pulsada mientras hace clic cerca de una caracter?stica sobre la imagen de referencia, o haga clic en el icono Invert, en la parte superior de la interfaz de DynamicAlignment.

12.jpg


En la captura de pantalla de arriba puede ver c?mo una funci?n de transferencia de pantalla (Screen Transfer Function) (STF) se puede usar para mejorar la visibilidad de detalles y puntos de alineaci?n. Observe tambi?n los radios de b?squeda (search radius) relativamente peque?os (cinco p?xeles en la captura de pantalla), necesarios para usar estructuras de imagen muy peque?as como referencias de alineaci?n.

Hemos utilizado siete puntos de alineaci?n. Dos o tres ser?an suficientes en este ejemplo, siempre que no se encuentren muy cercanos entre s? sobre el disco planetario. DynamicAlignment siempre realiza el registro de im?genes con precisi?n sub-p?xel. Es capaz de corregir distorsiones locales arbitrarias cuando se definen tres o m?s puntos de alineaci?n. Con menos de tres puntos de alineaci?n, DynamicAlignment aplica una transformaci?n af?n. Con dos puntos de alineaci?n, puede corregir por traslaci?n (desplazamiento m?tuo sobre el plano), rotaci?n, y cambio de escala en una direcci?n. Con s?lo un punto de alineaci?n, s?lo es posible corregir por traslaci?n. Tenga en cuenta que todos los puntos de alineaci?n definidos coincidir?n exactamente en la imagen registrada (etiquetada como target image en DynamicAlignment), con respecto a la imagen de referencia (source image en DynamicAlignment).

Aqu? puede ver otra captura de pantalla tomada mientras est?bamos seleccionando puntos de alineaci?n para la imagen Green:

13.jpg


Recuerde que hemos creado im?genes duplicadas de trabajo, con el fin exclusivo de definir puntos de alineaci?n. Lo que realmente queremos hacer es alinear las im?genes integradas originales, esto es nuestras im?genes Green y Blue, con respecto a la imagen Red. Por lo tanto, aplicaremos la instancia de DynamicAlignment a la imagen Green, como se puede ver a continuaci?n:

14.jpg


Esto genera una imagen Green_registered:

15.jpg


Un procedimiento similar ha sido aplicado para registrar la imagen Blue sobre la imagen Red, lo cual ha producido una imagen Blue_registered:

16.jpg



3. Imagen Compuesta RGB

En este momento las im?genes duplicadas de trabajo ya no van a ser necesarias, y por lo tanto pueden ser descartadas.

Aqu? puede ver las tres im?genes resultantes, Red, Green_registered, y Blue_registered, dispuestas para ser combinadas como una ?nica imagen compuesta en color RGB. La herramienta ChannelCombination puede ser usada para llevar a cabo esta tarea simple:

17.jpg



4. Mejora de Detalles y Reducci?n de Ruido: ATrousWaveletTransform y GREYCstoration

Tras aplicar ChannelCombination globalmente (F6), se obtiene una imagen RGB. Nosotros hemos renombrado esta imagen como RGB. Puede verla aqu?, mientras est?bamos probando algunas transformaciones por wavelets:

18.jpg


19.jpg


Finalmente, aqu? est? la imagen procesada, tras una cuidadosa transformaci?n por wavelets, rotaci?n, y reducci?n de ruido adicional con el algoritmo GREYCstoration:

final.jpg


Esperamos que os guste este peque?o tutorial. Todos los comentarios e ideas ser?n bienvenidos.

Gracias a Dave Pretorius por permitirnos trabajar con sus im?genes en bruto.
 
Hola Juan:

Me ha parecido un tutorial excelente, en especial la forma elegante de corregistrar los canales, as? como el Script de registro de im?genes que desconocia en Pixinsight.

Hace un par de dias que habia tratado las im?genes, me parece que las baj? de un mensaje que puso Pretorius en Cloudy Nights, las apil? con Registax y les apliqu? los wawelets correspondientes, y luego en Pixinsight utilizando tambi?n la herramienta de alineaci?n din?mica pero de forma menos elegante y con menos puntos de referencia, registre los tres canales entre s?, luego los recombin? con Astroart y ajuste tambi?n el histograma, luego volv? a Pixinsight para hacer una reducci?n de ruido.

Me gusta mucho ver como ese proceso se puede hacer s?lo con Pixinsight

Este fue mi resultado

cqs1212081792r.jpg


Saludos.
Jordi Ortega
 
Hello everyone from Tasmania (an island south of Australia).

I am currently playing with Pixinsight trial version on the full number of frames.

There are 1200 odd Blue images, 1200 odd Green images and 900 odd Red

I captured @ 30fps for 40 seconds in B & G and @15fps for 60s in R.

95% of the frames are of very good quality

I will post my results here as I follow the tutotial
 
Hi David,

Welcome to PixInsight Forum!

I'm glad you're giving PixInsight a try. You'll find that our user interface is quite different from what is customary in most imaging applications. If you haven't used previous PixInsight versions (PixInsight LE or time-limited beta versions for example) It may seem difficult at first glance, but once you get accustomed it's a piece of cake. We'll be glad to help you with all doubts or questions you may have.

We want to develop a series of tools specifically designed for planetary and lunar image processing. It would be very nice to count with your help.

Cheers,
Juan
 
I am up to the stage of dynamic alignment.

I have set the alignment points for waveletted Red and Green copies, but it is not clear how to

" So we have to apply the DynamicAlignment instance to the Green image,"

Is there a button to press so that the orginal red image can be now the target?

Dave P
 
I have produced a final image, but am unsure how to attach in this forum?

here is a link to it

http://davesplanets.com/Gallery/j2008-05-21_17-49_rgb_dp_pixinsight.jpg

my original is here done with registax and astra image.

http://davesplanets.com/Gallery/j2008-05-21_17-49_rgb_dp.jpg

The process is outlined here.

http://davesplanets.com/Downloads/Jupiter%20Processing%202008.pdf

:)
 
Hi David,

That is a really *excellent* result. And taking into account that it's your first time with PixInsight., I am impressed.

To make it absolutely perfect, I'd just try to enhance small scales very slightly with ATrousWaveletTransform, or even UnsharpMask.

You've obtained a very smooth yet detailed result. How did you apply noise reduction?
 
I forgot to answer your question about posting images. It's very easy: just enclose a link to your image between
tags when you write your post to the forum (it works in a similar way to plain HTML code, but the tag punctuators are [] instead of <>).

For example, here is your image:

j2008-05-21_17-49_rgb_dp_pixinsight.jpg
 
Thanks for your kind words Juan.

I used the atrouswavelets with the "morphous" noise reduction and with the L + C. I had a quick look for unsharp mask, but didnt find it. The extra number of frames helped.

I really like the idea of "stacking first. then optimising" (registax language). Lumenera cameras have a nasty problem sometimes with horizontal lines that also get optimised. I have noticed it even in Damian Peach's images. He and David Tyler noticed it again with Mars this year I think.

I also like the idea of scripting, so I technically could "batch" the process and produce the R G B and even the overprocessed reference files for alignment.

I do get field rotation because I have a dobsonian base
setup.jpg
and so the dynamic alignment process is a good one for me to overcome this problem.

I really like the software
 
I know this is an old post, but I would like to view the tutorial as I am very interested in doing this.

Unfortunately, the various links to the raw data and to the images in the tutorial are all broken. Are there new links to find these somewhere? It looks like davidpretorius's site is no longer in operation. Does someone else have the raw data? Is there a different repository for the images in the tutorial?
 
I have some images of the recent conjunction of Jupiter & Saturn that I am struggling to process. Not being vary familiar Pixinsight is a part of my issue. So the screenshots Juan provided would be helpful for me. Peter's data would be helpful too - the conjunction data I have has a fair amount of turbulence. Not holding my breath, but I am crossing my fingers.
 
Back
Top