Author Topic: Additional Interpolation Methods in Debayer Module  (Read 207 times)

Offline mcintyre_sj

  • Newcomer
  • Posts: 41
    • View Profile
Additional Interpolation Methods in Debayer Module
« on: 2019 April 14 17:19:16 »
Is there a way to access to AHD interpolation on a raw CFA image that has already been read from a camera raw file (e.g. CR2) and converted to an xisf file?

The Debayer module only supports Bi-linear and VNG interpolation. While the latest RAW format processing options include AHD and AAHD interpolation methods to debayer. As well as an FBDD noise reduction option (which i have yet to try).

I do all the calibration on raw CFA files. So all the files are imported from the CR2 files in raw CFA format and the masters and calibrated files saved as xisf files. The calibrated raw CFA lights are then debayered to do the alignment and integration. This means using the Debayer module and VNG.

I am under the impression that AHD is superior to VNG.

Online Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 6537
    • View Profile
    • http://pixinsight.com/
Re: Additional Interpolation Methods in Debayer Module
« Reply #1 on: 2019 April 15 08:58:52 »
Quote
I am under the impression that AHD is superior to VNG.

Why? Yes, we can implement more CFA interpolation algorithms in the Debayer tool. However, this is not a priority task for the following reason: In current versions of PixInsight, CFA interpolation with the Debayer tool is intended exclusively for generation of temporary working images, required as input for StarAlignment. The only recommended way to generate integrated color images from CFA raw data, be it data acquired with digital cameras or single-shot CCD cameras, is DrizzleIntegration (i.e., CFA drizzle, AKA Bayer drizzle). The only exception may be if you have just a marginal number of raw frames, where drizzle may not be applicable.

As for the FBDD noise reduction algorithm, it is already implemented in the Debayer tool. However, I have disabled it for now. After extensive testing, I have found that this algorithm, while being great for most daylight images, is not so good for astronomical data, where it tends to generate artifacts. The FBDD implementation in Debayer is still experimental and subject to future evaluation. I doubt it will be available in production versions of the tool, at least at this point.

Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline mcintyre_sj

  • Newcomer
  • Posts: 41
    • View Profile
Re: Additional Interpolation Methods in Debayer Module
« Reply #2 on: 2019 April 15 13:44:49 »
I was unaware that StarAlignment would work with raw CFA files. How does this work?
 
I read the dirrizleIntegration forum announcement from May 2014.

But i don't how drizzleIntergration handles raw CFA images. My intuition (always a bad way to make statistical decisions) is the pixel rejection schemes would have to work on individual colour channels.

I had not considered drizzle since i image with an EdgeHD11 and a Canon T2i. The image scale is 0.32"/px and even considering the bayer matrix reduces the CFA scale by 2, i figured i was still oversampling. On a good night i can get 20-30 subs, so i guess that puts me in the game.

Lastly, i use FlexRX with a guide scope, and that precludes dither.

I read somewhere that it's better to calibrate on raw CFA data and then to align the colour channels separately. So my work flow has been:
- generate masters and calibrate using raw CFA
- cosmetic correction also on raw CFA
- debayer
- split channels into separate RGB files
- align all sub in all channels
- integration of separate R, G, B channels
- combine RGB integrations into a colour image

Offline bulrichl

  • PixInsight Old Hand
  • ****
  • Posts: 319
    • View Profile
Re: Additional Interpolation Methods in Debayer Module
« Reply #3 on: 2019 April 17 07:38:52 »
The work flow using drizzle on CFA images instead of CFA interpolation is:
- generate masters and calibrate using raw CFA
- cosmetic correction also on raw CFA
- debayer
- align, 'Generate drizzle data' checked
- integration, 'Generate drizzle data' checked
- Drizzle Integration, 'Enable CFA drizzle' checked; the path to the calibrated light frames has to be input under 'Format hints/Input diectory', if they reside in a directory different from that where the Drizzle data files are.

Lastly, i use FlexRX with a guide scope, and that precludes dither.

I don't know whether undithered light frames will result in a good final integration, try it.

Bernd


Offline mcintyre_sj

  • Newcomer
  • Posts: 41
    • View Profile
Re: Additional Interpolation Methods in Debayer Module
« Reply #4 on: 2019 April 19 06:35:28 »
I am not actually trying to use drizzle. My original question was around the use of the Debayer process with a DSLR raw CFA workflow.

The Debayer tool is intended exclusively for generation of temporary working images, required as input for StarAlignment.

Juan then recommended using DrizzleIntegration

The only recommended way to generate integrated color images from CFA raw data, be it data acquired with digital cameras or single-shot CCD cameras, is DrizzleIntegration.

Since DrizzleIntegration is the recommended workflow, i would like to know how it handles alignment with the raw CFA inputs?

Offline sharkmelley

  • PTeam Member
  • PixInsight Addict
  • ***
  • Posts: 221
    • View Profile
    • Mark Shelley Astrophotography
Re: Additional Interpolation Methods in Debayer Module
« Reply #5 on: 2019 April 19 07:21:47 »
Quote from: mcintyre_sj

Juan then recommended using DrizzleIntegration

The only recommended way to generate integrated color images from CFA raw data, be it data acquired with digital cameras or single-shot CCD cameras, is DrizzleIntegration.

Since DrizzleIntegration is the recommended workflow, i would like to know how it handles alignment with the raw CFA inputs?

In simple terms it works like this:
  • The frames must be debayered and star aligned to work out the positional offsets and/or rotations of each frame.
  • Once the DrizzleIntegration is given this offset/rotation information it uses only the raw CFA data to produce the final integrated frame.

Mark
Takahashi Epsilon 180ED
H-alpha modified Sony A7S
http://www.markshelley.co.uk/Astronomy/

Offline mcintyre_sj

  • Newcomer
  • Posts: 41
    • View Profile
Re: Additional Interpolation Methods in Debayer Module
« Reply #6 on: 2019 April 19 12:06:20 »
I think i've got it now.

I have worked through an example and my work flow (not using the script) is:
- generate masters and calibrate using raw CFA
- cosmetic correction also on raw CFA
- generate drizzle info using interim steps:
  - debayer
  - StarAlignment RGB subs with generate drizzle data option
  - Integration aligned RGB subs with drizzle data (Updates xdrz files)
- DrizzleIntegration with Enable CFA dizzle of raw CFA cosmetic corrected subs
   - use xdrz from interim process above
   - point input dir at the raw CFA files that were inputs to StarAlign and Integration
- generates a debayered RGB integration!

I tried both a 1x and 2x drizzle. I only had 10 subs in this test and as below, the image scale is already well over sampled and i did not use dither.

The 2x scale had some ugly artifacts around bright stars.
The 1x scale with drop shrink 1.0 did not have any problems and was noticeably smoother than the interim StarAligned Integration.

So the process appears to produce a higher quality integration than my previous work flow based on the Debayer process alone.

Do i need input hints "raw CFA" on the DrizzleIngetration if i also select "Enable CFA Drizzle"?

Offline mcintyre_sj

  • Newcomer
  • Posts: 41
    • View Profile
Re: Additional Interpolation Methods in Debayer Module
« Reply #7 on: 2019 April 20 04:09:25 »
The work flow using drizzle on CFA images instead of CFA interpolation is:
- generate masters and calibrate using raw CFA
- cosmetic correction also on raw CFA
- debayer
- align, 'Generate drizzle data' checked
- integration, 'Generate drizzle data' checked
- Drizzle Integration, 'Enable CFA drizzle' checked; the path to the calibrated light frames has to be input under 'Format hints/Input diectory', if they reside in a directory different from that where the Drizzle data files are.

I see now that you were telling me the same thing. I was still thinking that it was for drizzle (which is mainly for under sampled images) when all i really wanted was to access a better debayer process that DrizzleIntegration provides.