Author Topic: Cannot get StarAlignment to align distorted wide field images  (Read 4952 times)

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Hi,

I have a set of 100 wide field shots, taken with a 12mm lens on a Canon EOS40D, 30 seconds each, no guiding or tracking, of the sky region covering Polar Star, Cassiopeia, Milky Way and Cygnus. I have problems registering them properly.

I registered those  images (example: screenshot 1 top left) using a reference image produced by CatalogStarGenerator (screenshot 1, top right), selecting distortion correction and 2d surface splines, and integrated them. Unfortunately the result is not what I expected. In screenshot 1 bottom left you see the integration result (integrated with "maximum" as operator to highlight the problem, ignore the long circular traces produced by hot pixels for the moment): only the central stars a well registered, those to the borders are fuzzy.

Analyzing the problem, it seems that StarAlignment only matches stars in the central region (see screenshot 2), and therefore can corrects lens distortions only there. All my attempts to get StarAlignment to behave differently by manipulating all kinds of star matching parameters failed so far. It always matches only about 400 stars in the central area, ignoring around 600 stars in the outer region of the reference. StarAlignment finds those stars (detection params in screenshot 3), it just cannot match them.

Any ideas how I can get registration working properly? You can find the image files, process icons, screenshots and console log on https://skydrive.live.com/redir?resid=C56E60845CFA6790!236&authkey=!AI8cVomvitIJJFQ for your own experiments. An excerpt of the console log can be seen below.

Thanks,
Georg

(Edit: Added star detection parameters+screenshot)

Code: [Select]
StarAlignment: Processing view: IMG_0523_20130815135046
CatalogStars:
Structure map: done
Detecting stars: done
934 stars found.
IMG_0523_20130815135046:
Structure map: done
Detecting stars: done
4354 stars found.
* Target image: Limiting to 2000 brightest stars.
* Distortion correction: Iteration 1 of 40
Matching stars: done
575 putative star pair matches.
Performing RANSAC: done
379 star pair matches in 71 RANSAC iterations.
Summary of model properties:
Inliers     : 0.659
Overlapping : 0.629
Regularity  : 0.674
Quality     : 0.679
Root mean square error:
delta_RMS   :  1.100 px
RMS error deviation:
sigma_RMS   :  0.497 px
Peak errors:
delta_x_max :  5.661 px
delta_y_max :  3.601 px
residual    : 123.9325 px
* Distortion correction: Iteration 2 of 40
Matching stars: done
592 putative star pair matches.
Performing RANSAC: done
393 star pair matches in 4 RANSAC iterations.
Summary of model properties:
Inliers     : 0.664
Overlapping : 0.633
Regularity  : 0.667
Quality     : 0.680
Root mean square error:
delta_RMS   :  0.477 px
RMS error deviation:
sigma_RMS   :  0.036 px
Peak errors:
delta_x_max :  6.682 px
delta_y_max :  5.789 px
residual    :  0.4854 px
* Distortion correction: Iteration 3 of 40
...
* Distortion correction: Iteration 13 of 40
Matching stars: done
578 putative star pair matches.
Performing RANSAC: done
389 star pair matches in 1 RANSAC iterations.
Summary of model properties:
Inliers     : 0.673
Overlapping : 0.624
Regularity  : 0.670
Quality     : 0.686
Root mean square error:
delta_RMS   :  0.003 px
RMS error deviation:
sigma_RMS   :  0.000 px
Peak errors:
delta_x_max :  0.059 px
delta_y_max :  0.020 px
residual    :  0.0013 px
* Distortion correction: Convergence reached after 13 iterations with residual = 0.0013 px
Transformation matrix:
     +2.0560     -0.1036   +208.6141
     +0.1850     +1.9518    -35.3718
     +0.0001     +0.0000     +1.0000
scale       : 0.490
scale-X     : 0.487
scale-Y     : 0.512
rotation    :     +2.80 deg
dx          :   +208.61 px
dy          :    -35.37 px
Blending bitmap: done
36.09 s
« Last Edit: 2013 August 29 00:47:10 by georg.viehoever »
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Cannot get StarAlignment to align distorted wide field images
« Reply #1 on: 2013 August 29 00:22:53 »
I wrote the scripts ManualImageSolver and AlignByCoordinates in order to be able (among other things) of aligning wide field images.

The workflow would be:
  • Solve all the images using ManualImageSolver. The documentation of the script has some hints on how to speed up this process.
  • Align them using AlignByCoordinates using the execution mode "Align images against reference"

Using solutions of 4th or 5th degree both scripts can model the distortions and fix them. The first step of manual solving the images can be quite boring but, when properly done, the results are very good.

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Cannot get StarAlignment to align distorted wide field images
« Reply #2 on: 2013 August 29 00:46:26 »
Andres,

I actually arrived at the CatalogStar field by using the manual solver. So this is indeed a possible (and tedious) route. I was just wondering why StarAlignment can still not solve such a field - even now that it can handle distortions. StarAlignment can align the stars, but only the central region.

Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Cannot get StarAlignment to align distorted wide field images
« Reply #3 on: 2013 August 29 00:53:14 »
You can test if a distortion model helps.
In this thread I published a new version of my scripts that can generate distortion models compatible with StarAlignment.

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: Cannot get StarAlignment to align distorted wide field images
« Reply #4 on: 2013 August 29 13:47:53 »
Hi Georg,

Distortion isn't a problem with these images. This is strictly a star detection problem. The images are too noisy and have too many hot pixels. Definitely, proper calibration with bias and dark frames would help enormously.

I have made a small test to demonstrate that the new StarAlignment can deal with this distortion without any issue. I have just downsampled the image 1:2 with IntegerResample working in median mode. This combines a noise reduction effect and a morphological median filter. The resulting image can be registered without problems:


As you see, the whole area covered by the reference CatalogStars image is also covered by star matches. I have just tweaked star detection parameters and increased the number of descriptors per star up to 40 (although this last setting isn't really necessary). I have also decreased the distortion residual parameter to 0.001 px, just to force the predictor-corrector algorithm to perform more iterations. Actually, this is not really necessary, since a similar result can be achieved without distortion correction. These are the number of star pair matches:

With local distortion correction (6 iterations): 570 matched stars
Without distortion correction: 530 matched stars

Note that the distortion in these images can be corrected quite well in a single pass thanks to pentagon descriptors. However, the difference of 40 stars can make a difference in the quality of the result.

Another problem that you have with these images is that the reference CatalogStars image does not cover the whole target image. In particular, a large area to the right has no stars in the reference. For distortion correction, it is essential that the reference and target images have a very good support in terms of alignment references.

I hope this helps.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/