Author Topic: Error with StarAlignment  (Read 4999 times)

Offline RBA

  • PixInsight Guru
  • ****
  • Posts: 511
    • DeepSkyColors
Error with StarAlignment
« on: 2011 December 23 20:10:37 »
"Error: Singular matrix in 2-D surface spline generator"

This was generated during a "Register/Union - Mosaic" process, with all default parameters, except RANSAC increased to 6 and Registration model set to "2-D Surface Splines". Here's the output of the process:

StarAlignment: Processing view: R1_LRGB
R3_LRGB_mosaic: Restricting star matching to 2 preview(s).
R1_LRGB: Restricting star matching to 2 preview(s).
R3_LRGB_mosaic:
Structure map: 100%
Detecting stars: 100%
10742 stars found.
R1_LRGB:
Structure map: 100%
Detecting stars: 100%
6860 stars found.
Computing intersection ...
Intersection:
R1  : { 3365,   30, 7331, 2668}  5978 stars
R2  : {    2,    4, 3968, 2641}  6854 stars
?21 : 0°
Matching stars ...
* Reference image: Limiting to 2000 brightest stars.
* Target image: Limiting to 2000 brightest stars.
1193 putative star pair matches.
Performing RANSAC ...
948 star pair matches in 55 RANSAC iterations.
Summary of model properties:
Inliers     : 0.795
Overlapping : 1.000
Regularity  : 0.957
Quality     : 0.861
Root mean square error:
?RMS  :  1.839 px
Average RMS error deviation:
?RMS  :  0.725 px
Peak errors:
?xmax :  3.919 px
?ymax :  5.865 px
Transformation matrix:
     +1.0013     +0.0035  -3369.2576
     -0.0102     +1.0036     +7.8844
     -0.0000     +0.0000     +1.0000
scale    : 0.999
rotation :     -0.43°
dx       :  -3369.26 px
dy       :     +7.88 px
*** Error: Singular matrix in 2-D surface spline generator
<* failed *>


R3_LRGB_mosaic is the result of already stitching 3 panes, with R1_LRGB being the last one in a 2x2 mosaic.
They'd go like this if successful:

31
33

That's why you see each image has two previews defined. The process was successful once I changed the Registration model to the default  "Projective Transformation" option.

Mainly out of curiosity, can the above error be explained in somewhat mundane terms?


Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Error with StarAlignment
« Reply #1 on: 2012 January 05 11:50:35 »
Hi Rogelio,

Sorry for the late answer to this post. This issue has also been reported as a bug:

http://pixinsight.com/forum/index.php?topic=3730.0

Computation of 2-D splines (aka thin plates]) involve solving a system of equations, which in turn involves matrix operations. A singular matrix is a noninvertible one, whose determinant is zero or, in more practical terms, an insignificant number e > 0 such that:

1 + e = 1

(the largest number that satisfies this relation is known as the machine epsilon) In StarAlignment this happens in some rare cases. To solve this problem I have to anticipate some particular configurations of alignment stars that lead to ill-posed problems. I have some ideas and hope to have this bug fixed in the next version of this tool.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline RBA

  • PixInsight Guru
  • ****
  • Posts: 511
    • DeepSkyColors
Re: Error with StarAlignment
« Reply #2 on: 2012 January 06 10:05:13 »
[...] an insignificant number e > 0 such that:

1 + e = 1


I'd swear the above doesn't make any sense ;) Gotta love math  >:D

Thanks for the explanation BTW!

Offline FunTomas

  • PixInsight Addict
  • ***
  • Posts: 135
    • Astrofoto.sk
Re: Error with StarAlignment
« Reply #3 on: 2012 January 06 14:23:58 »
Thank You Juan for explanation. I make this topic http://pixinsight.com/forum/index.php?topic=3728.0 because I don't think about error in module.

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Error with StarAlignment
« Reply #4 on: 2012 January 07 11:16:32 »
by the way, for some reason i'm seeing SA working really hard in 1.7.4 on some narrowband images. i have to re-try it with 1.7.0 to make sure this is really a difference between versions and not something related to the input images.

it's iterating 4-7 times with ransac failing, but eventually finds matches.

the stars aren't exactly round in these images but i've never had this problem before...

Offline Harry page

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1458
    • http://www.harrysastroshed.com
Re: Error with StarAlignment
« Reply #5 on: 2012 January 07 14:20:33 »
Hi

This may be the same problem I was seeing  >:D  As mr Juan has improved the star detection there are to many stars now causing a bit of processor overload

Lifting the noise scales to 3 seems to help , worth a try

Harry
Harry Page

Offline pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Error with StarAlignment
« Reply #6 on: 2012 January 07 14:28:20 »
i'll give it a try, i think you are right - it was detecting boatloads of stars but there really were not that many stars in the frame.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Error with StarAlignment
« Reply #7 on: 2012 January 07 16:55:45 »
Rob, Harry,

I am aware of this problem. It seems the changes I introduced in StarAlignment's star detector don't work as well as I expected. I'm working on a solution right now. If I can't find a good one in reasonable time I'll revert it to the old detector. Anyway expect an update for SA released within the next days.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/