Author Topic: Trouble getting StarAlignment Mosaic to work  (Read 5305 times)

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Trouble getting StarAlignment Mosaic to work
« on: 2008 December 11 15:14:56 »
Hi,

I tried to create a mosaic of the Heart and Soul nebula and ended up with an image of just one of the images. Thinking that maybe there was no overlap I did the following test:

- load processed image
- define two previews, with overlap
- create an image of both previews
- close original image
- start staralignment
- select one of the views as reference
- attempt to load views as frames to align, doesn't work (red x next to them)
- save previews
- load 2 saved previews in staralignment process
- select 'mosaic' mode
- hit apply
- I end up with a new image which is just a copy of the reference frame

Here's the processing console output:
Writing file:
E:/AstroImaging/Tests/pixinsight/img2.fit
Writing FITS image: 32-bit integers, 3 channel(s), 1512x836 pixels: 100%

Writing file:
E:/AstroImaging/Tests/pixinsight/img1.fit
Writing FITS image: 32-bit integers, 3 channel(s), 1552x748 pixels: 100%

StarAlignment: Processing view: img1
img1:
Extracting CIE L* component: 100%
Structure map: 100%
Detecting stars: 100%
1316 stars found.
img1:
Extracting CIE L* component: 100%
Structure map: 100%
Detecting stars: 100%
1316 stars found.
Matching stars...
1316 putative star pair matches.
Performing RANSAC...
1316 star pair matches in 1 RANSAC iterations.
Root mean square error:
drms  :  0.000 px
Peak errors:
dXmax :  0.000 px
dYmax :  0.000 px
Transformation matrix:
     +1.0000     +0.0000     -0.0000
     -0.0000     +1.0000     -0.0000
     -0.0000     +0.0000     +1.0000
Generating mosaic image: img1_mosaic
Filling image: 100%
Applying image, op=Mov: 100%
Homographic Projection / Bicubic Spline Interpolation: 100%
Registration successful.
21.453 s


Looks like it only looks at one image but the process container says this:

// Start time: 2008/12/11 22:06:13 UTC
// Execution time: 21.453 s
var p = new StarAlignment;
with ( p )
{
   structureLayers = 5;
   noiseLayers = 1;
   sensitivity = 0.100;
   peakResponse = 0.75;
   maxStarDistortion = 0.500;
   invert = false;
   matcherTolerance = 0.005;
   ransacMaxIterations = 1000;
   maxStars = 4000;
   trianglesPerStar = 8;
   useBrightnessRelations = true;
   referenceImage = "img1";
   referenceIsFile = false;
   targets = // enabled, isFile, image
   [
   [true, true, "E:/AstroImaging/Tests/pixinsight/img2.fit"],
   [true, true, "E:/AstroImaging/Tests/pixinsight/img1.fit"]];
   mode = RegisterUnion;
   outputDirectory = "";
   outputExtension = "";
   outputPrefix = "";
   outputPostfix = "_r";
   outputSampleFormat = SameAsTarget;
   overwriteExistingFiles = false;
   onError = Continue;
}

I looked for a tutorial on this process but couldn't find it. If it's there, please point the way :)

I can upload the images if needed but I suspect my mistake(s) are clear from what I posted above.

Thanks,

   Sander
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline ManoloL

  • PixInsight Addict
  • ***
  • Posts: 220
Trouble getting StarAlignment Mosaic to work
« Reply #1 on: 2008 December 14 02:13:30 »
Hola a todos:
Lamento no ser capaz de escribir en inglés.
Creo que lo que ha pasado es que el programa ha alineado una imagen sobre si misma (img1).
El proceso, a mi parecer, no funciona adecuadamente.
Yo solo he conseguido alinear las imágenes de una en una. Creo que solo se alinea la que se encuentra activa y no el resto de los elementos de la lista aunque se encuentren seleccionados.
Esperemos una respuesta de alguien con mayor conocimiento.
Saludos.
Saludos.

Manolo L.

Offline caliu

  • PixInsight Addict
  • ***
  • Posts: 210
    • http://www.caliu.fotografiaastronomica.com
Trouble getting StarAlignment Mosaic to work
« Reply #2 on: 2008 December 14 06:19:29 »
Acabo de contestar en fotografiaastronomica.com, en el foro de "procesado con PixInsight".
I finish answering in fotografiaastronomica.com in the forum of " processing with PI"

este es el enlace:
http://fotografiaastronomica.com/viewtopic.php?f=32&t=3964

This is the link (Spanish)
http://fotografiaastronomica.com/viewtopic.php?f=32&t=3964

La imagen que resulta y que aparentemente está registrada sobre si misma debe pasar a ser la imagen de referencia, asi ya se pueden alinear todas las demas sobre ella, quizas sea un bug o quizas (casi seguro) se debe a nuestra torpeza para manejar la herramienta :wink:

The image that is and that apparently is registered on itself must happen to be the reference image, thus or others can be aligned all the exceeds she, perhaps he is bug or perhaps (almost surely) the tool is due to our stupidity to handle :wink:

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Trouble getting StarAlignment Mosaic to work
« Reply #3 on: 2008 December 14 07:30:37 »
Thank you for responding. I had google translate and it looks like you have the same issue. I hope Juan will be able to take a look at this soon.


   
Gracias por responder. Tuve traductor Google y parece que tienen el mismo problema. Espero que Juan será capaz de echar un vistazo a este breve.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Trouble getting StarAlignment Mosaic to work
« Reply #4 on: 2008 December 14 10:07:09 »
Hi Sander,

StarAlignment in mosaic mode works with two important limitations:

- It only works with views (open images). It cannot generate a mosaic from disk files.

- It can only generate a two-frame mosaic.

To generate a mosaic:

1. Select the reference view as the reference image on StarAlignment.

2. Select the Register/Union working mode.

3. Launch the StarAlignment instance on the second view to create a two-frame mosaic.

Since the reference image is never interpolated (its pixels are just copied to the mosaic "in place"), you can create a three-frame mosaic by selecting the generated mosaic as the reference image of a new mosaic, and so on. Of course, there exists a limit that depends on the sizes and complexity of the images.

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

Hola Caliu

StarAlignment en modo mosaico tiene dos importantes limitaciones:

- Sólo funciona con vistas (imágenes abiertas). No puede generar un mosaico a partir de imágenes en archivos de disco.

- Sólo puede generar un mosaico de dos imágenes.

Para generar un mosaico:

1. Selecciona la vista de referencia como la imagen de referencia en StarAlignment.

2. Selecciona el modo de trabajo Registrar/Unión (Register/Union working mode).

3. Lanza la instancia de StarAlignment sobre la segunda vista para generar un mosaico de dos imágenes.

Como la imagen de referencia nunca es interpolada (sus píxeles sólo son copiados "en su lugar"), puedes crear un mosaico de tres imágenes seleccionando el mosaico generado como la vista de referencia de un nuevo mosaico, y así hasta el número de imágenes que desees. Por supuesto, esto tiene un límite que depende del tamaño y la complejidad de las imágenes.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Trouble getting StarAlignment Mosaic to work
« Reply #5 on: 2008 December 14 10:10:37 »
Hi Juan,

that sounds confusing but I'll give it a try. As I wrote I attempted to use views instead of files but it wouldn't let me.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Trouble getting StarAlignment Mosaic to work
« Reply #6 on: 2008 December 14 10:19:52 »
Sander,

Here is an example I've just created with two previews transformed into images (further rotated and scaled to make things a bit more difficult):

http://forum-images.pixinsight.com/legacy/SA/sa-mosaic-example-m45.jpg
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline caliu

  • PixInsight Addict
  • ***
  • Posts: 210
    • http://www.caliu.fotografiaastronomica.com
Trouble getting StarAlignment Mosaic to work
« Reply #7 on: 2008 December 14 10:22:23 »
Gracias por la respuesta Juan, mi contestación, más que para Sander era para Manolo, no sabia lo de los mosaicos, entre otras cosas porque nunca he hecho ninguno, segun he entendido Manolo no lograba alinear imagenes apuntando a una carpeta y tomando como referencia una imagen abierta.

Offline ManoloL

  • PixInsight Addict
  • ***
  • Posts: 220
Trouble getting StarAlignment Mosaic to work
« Reply #8 on: 2008 December 14 12:09:46 »
Quote from: "ManoloL"

Yo solo he conseguido alinear las imágenes de una en una. .


Hola de nuevo:
Mi problema se ha resuelto:
Estaba pulsando Apply, cuando debería pulsar Apply Global.....
Evidentemente una tonteria, que supongo no hubiera cometido de haber consultado la documentación correspondiente, dado que la inspiración divina no me había iluminado al respecto,  pero claro......

Saludos.
Saludos.

Manolo L.

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Trouble getting StarAlignment Mosaic to work
« Reply #9 on: 2008 December 14 15:00:07 »
Ok, I think I understand the reasons this is so confusing:

1) when you select views there are red X signs next to the view names. This suggests they can not be selected. It would be much more intuitive if there were check boxes there. We (I) know what to do with check boxes. Red X'es aren't standard.

2) it not obvious you need to select a target image to work on. Once I had img2 active while using img1 as the reference everything worked fine. I'm not sure why the image list is needed in this case. Once I've selected two images and then indicated the reference frame I'd expect the alignment to do the right thing. Or at least complain that I'm trying to overlay an image on itself which makes no sense.

I am not sure yet how to make this more user friendly but after I've done this a few times I'll come up with something I'm sure. I think the problem is that the file/view list is pointless once mosaic is selected. It should probably be disabled in that mode. You pick a reference view and apply it to a different image to create a mosaic. The way I expected it to work is you select two views,pick a reference frame (one of the two) and then hit 'go'.

Unfortunately my Heart and Soul nebulae images don't have enough (any?) overlap so I couldn't create my mosaic. It worked fine on my artificial images though.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Trouble getting StarAlignment Mosaic to work
« Reply #10 on: 2008 December 15 03:00:17 »
Quote
1) when you select views there are red X signs next to the view names. This suggests they can not be selected. It would be much more intuitive if there were check boxes there. We (I) know what to do with check boxes. Red X'es aren't standard.


Agreed. I must confess that I copied the view selection dialog from other tool, where the X's and checkmarks make sense. I'll replace them with standard checkmarks in the next version. Or much better, a dialog with two lists: left list of available views, right list of selected views.

Quote
2) it not obvious you need to select a target image to work on.


In the next version, the list of target images will be disabled in mosaic mode.

Quote
Or at least complain that I'm trying to overlay an image on itself which makes no sense.


Another good point.

Quote
Unfortunately my Heart and Soul nebulae images don't have enough (any?) overlap so I couldn't create my mosaic. It worked fine on my artificial images though.


The star matcher still needs some important improvements. It works fine in general, but mosaicing is a very difficult task. When there are too few common stars between frames (and you guys insist in having as little overlap as possible :twisted: ), it may fail even in presence of more than six star matches, which is not acceptable. This has to do with the employed strategy to generate triangles between nearby stars. From a software engineering perspective, StarAlignment is both extremely nice and extremely scaring :) I still have to spend a lot of time to improve this tool as I want.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Trouble getting StarAlignment Mosaic to work
« Reply #11 on: 2008 December 15 06:18:44 »
Hi Juan,

to be honest I'm not 100% sure my images have any overlap. I'll have a look using traditional methods. If there is overlap then maybe these would be useful test images and I'll upload them for you to try. I've been playing with plate solving algorithms and it is indeed a challenging programming topic. Fun though :)
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity