Author Topic: Problem with ImageRegistration and ImageSolving  (Read 3687 times)

ruediger

  • Guest
Problem with ImageRegistration and ImageSolving
« on: 2014 August 04 03:06:11 »
Hi all,

I'm trying to build a 4x3 mosaic made with EOS 5D II and Canon EF 2,0/135mm lens. My intended workflow is:
- create an artificial starfield (with scripts/Render/CatalogStarGenerator) for each of the 12 panels
- register the VNG debayered files against the starfields
- ImageIntegration (with Bayer Drizzle) for each panel
- use script->Utilities->MosaicByCoordinates and so on to complete the mosaic

For small testcases this scenario works.

However, for some of the panels there is an (unintentional) large shift between some of the exposures, and the registration process is very inaccurate, see attached screenshot. I tried to solve the images and build a distortion model which might help the registration process, but the ImageSolver also produces a very inaccurate result.

I'm not sure how to continue now, any help appreciated. I uploaded three files to endor, folder ruediger->ImageIntegration.

Furthermore I have some suggestions for making mosaic building easier:

- BatchPreProcessing has no finetuning for registering against artificial starfields (i.e. no control over spline settings and distortion correction)

- When using BatchPreProcessing only for calibrating, but with the intention to use Bayer Drizzle later, you have to patch the .drz files on your own (i.e. change ../debayered/... to .../bayer/... in the files)

- When registering files against a reference with WCS coordinates, copy the WCS coordinates to the registered files (same probably for the integration process)


Regards,

  Rüdiger
« Last Edit: 2014 August 04 03:27:58 by ruediger »

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Problem with ImageRegistration and ImageSolving
« Reply #1 on: 2014 August 04 03:24:09 »
If you want to use MosaicByCoordinates for making a mosaic I would recommend the following steps:
  • Calibrate, register and integrate each panel separately.
  • Crop the panels for removing the black borders and other defects because of the dithering of the images.
  • Only if necessary, apply an DBE to each panel for removing the gradients.
  • Solve each panel with ImageSolver. If the images have geometric distortions you must select a polynomial degree of 2 or more or even apply a distortion model. The documentation of ImageSolver explains all of these options.
  • You should check the solution analyzing the residuals images or even using AnnotateImage for showing the expected location of the stars. The solutions of the panels must be "perfect" in order that MosaicByCoordinates could join them.
  • Apply MosaicByCoordinates for reprojecting the images to a common geometry.
  • Merge the reprojected panels with a suitable tool as GradientMergeMosaic.

ruediger

  • Guest
Re: Problem with ImageRegistration and ImageSolving
« Reply #2 on: 2014 August 04 04:05:17 »
If you want to use MosaicByCoordinates for making a mosaic I would recommend the following steps:
    #
  • Solve each panel with ImageSolver. If the images have geometric distortions you must select a polynomial degree of 2 or more or even apply a distortion model. The documentation of ImageSolver explains all of these options.
  • You should check the solution analyzing the residuals images or even using AnnotateImage for showing the expected location of the stars. The solutions of the panels must be "perfect" in order that MosaicByCoordinates could join them.
Hi Andres,

thanks for suggesting this workflow. In this scenario, would an integrated panel be easier solvable than a single debayered exposure? Since I'm unable to solve a single exposure, I didn't follow your approach.

I was able to find a common astrometry/photometry solution for all 247 images with scamp, using a 2nd order polynom, so I know each images' center and arcsec resolution exactly, but even when seeding the ImageSolver with the scamp result the ImageSolver result is not good. Best result I get with the ImageSolver is attached, there are always regions where the star position is several pixels (up to 10) pixels off the real position.

Rüdiger

Offline Andres.Pozo

  • PTeam Member
  • PixInsight Padawan
  • ****
  • Posts: 927
Re: Problem with ImageRegistration and ImageSolving
« Reply #3 on: 2014 August 04 04:50:42 »
I haven't seen your images, but I think that since they are taken with a 135mm lens, they probably have significant distortions. In this case firstly you should try with 5 degree polynomials. If this is not enough you should create a distortion model for your lens. You have only to do this once and it it is valid for all of your images. The procedure for generating distortion models is explained in the documentation of ImageSolver. If you have doubts please ask them here.

When registering the images of each panel you should activate the options "Distortion correction" and "Registration model: 2D surface splines" of StarAlignment. If you have a distortion model you can use it here too.

ruediger

  • Guest
Re: Problem with ImageRegistration and ImageSolving
« Reply #4 on: 2014 August 04 05:18:12 »
Thanks, I will try to generate a distortion model with the ManualImageSolver. The normal ImageSolver, even with 5th degree polynomials, is not sufficient in this special case.

Rüdiger

Offline georg.viehoever

  • PTeam Member
  • PixInsight Jedi Master
  • ******
  • Posts: 2132
Re: Problem with ImageRegistration and ImageSolving
« Reply #5 on: 2014 August 04 05:44:13 »
Using an 85mm Canon lens, I had better results with 3rd degree polynomials. It appears that with higher degree polynomials, the danger of false matches in ImageIntegration increases.
Georg
Georg (6 inch Newton, unmodified Canon EOS40D+80D, unguided EQ5 mount)

ruediger

  • Guest
Re: Problem with ImageRegistration and ImageSolving
« Reply #6 on: 2014 August 07 11:36:13 »
I was able to use ManualImageSolver to create an DistortionModel that allows pixel exact solving of my input images. However, this distortion model doesn't help to enhance the registration quality of StarAlignment, either when aligning against an artificial starfield or aligning two images against each other once one of them is shifted about 1000 Pixel (see screenshot). Registration quality when aligning against the starfield is somewhat better, but the result is still not useable. Very misleading is the console output of the registration process stating subpixel max delta errors, whereas the real errors are 10 or more pixels.

So for now I can only continue when removing the problematic images from the stack. This means, that for some panels only 11 or 12 images are left, but luckily the Bayer Drizzle will still produce very good results even for these stacks.

With the invaluable tools of ImageSolver/ManualImageSolver/MosaicByCoordinates I propose a possible third way for mosaic creation, where input images are warped only once and all available input data in overlapping areas is contributing in a pixel stack:

- Batch solve all input images (ImageSolver)
- Warp them to their final position in the mosaic (MosaicByCoordinates)
- ImageIntegrate everything

This is basically what scamp/swarp does, however I'm not sure how the ImageIntegration process would handle the frame adaptation between the input images. Also, MosaicByCoordinates would not generate .drz-Files for Bayer Drizzle.

Anyway, the upper half of my mosaic already looks good, and I'm confident to add the lower half soon :)

Rüdiger