Author Topic: Process Question: When to Debayer  (Read 9291 times)

Offline ronk01

  • Newcomer
  • Posts: 8
Process Question: When to Debayer
« on: 2012 January 24 09:12:27 »
I would like opinions on when , in the processing flow, is the best time to debayer. I image with an SBIG ST-4000XCM one-shot color camera. After the raw images are captured I usually calibrate all of the subs (dark and bias) in Maxim. In most cases I let Maxim do the debayering  of all of the "color" subs prior to starting Pixinsight for registration, integration, and subsequent processing. Would it be "better" to do the registration and integration with the un debayered subs and then do just a single debayer operation in Pixinsight on the combined "B&W" image?

regards,
Ron K

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: Process Question: When to Debayer
« Reply #1 on: 2012 January 24 09:33:09 »
You can not debayer a registered sub. Think about it for a moment and you'll agree. Registration involves sub pixel shifts and small rotations. If you can't imagine why it wouldn't work, simply try.

- take an undebayered sub
- rotate it by some arbitrary amount
- attempt to debayer
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 pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Process Question: When to Debayer
« Reply #2 on: 2012 January 24 11:09:46 »
yeah as sander says, the opening steps of a flow are pretty much always the same:

acquire (raw), calibrate (raw), debayer (rgb), register (rgb), stack (rgb), ...

StarAlignment *might* be able to get a handle on the stars in a raw image, but once you rotate and translate the image it can no longer be debayered.


Offline jtheios

  • Newcomer
  • Posts: 20
Re: Process Question: When to Debayer
« Reply #3 on: 2012 January 24 13:39:29 »
This thread is useful for me, as I just purchased a QHY8PRO and will soon need to learn a new workflow. Of course, the weather has been bad since it arrived-- after several months of beautiful weather. I'm moving to OSC because of the time demands with my work.

So why wouldn't it be? Capture, Debayer, Calibrate... Of course, you'd have to Debayer the flats in this flow, correct? Just curious.

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: Process Question: When to Debayer
« Reply #4 on: 2012 January 24 13:52:56 »
It depends. Hot pixel and bad column detection and fixing works best with the raw data because you do not want averaging to smooth out any edges.

Provided you use 32b float master images and debayered ones you could stack this way. Of course you have to deal with much larger files and you don't gain anything.
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 pfile

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 4729
Re: Process Question: When to Debayer
« Reply #5 on: 2012 January 24 18:29:40 »
This thread is useful for me, as I just purchased a QHY8PRO and will soon need to learn a new workflow. Of course, the weather has been bad since it arrived-- after several months of beautiful weather. I'm moving to OSC because of the time demands with my work.

So why wouldn't it be? Capture, Debayer, Calibrate... Of course, you'd have to Debayer the flats in this flow, correct? Just curious.

i guess when you calibrate an image, you want to work with the sensor data directly. any debayering process will modify the sensor data in one way or another, and the way a particular algorithm modifies your darks could be different than how it modifies your lights. it's a stretch, but bilinear and superpixel debayering might modify the lights and darks in the same way. advanced algorithms like VNG or AHD will definitely do crazy stuff, mixing data from the different channels together, making proper calibration impossible. a hot pixel in the green channel could show up (to a certain extent) in the red and blue channels, for instance.

so it's best to just use the raw data; it's the only way that's 'mathematically' correct.

i frequently hear people who use nebulosity talking about "smoothing" their flats with a 2x2 filter and i have no idea how that is supposed to work. it implies that they have debayered the flat before applying it but in my understanding the only proper way to calibrate an image is to use the raw data.


Offline jtheios

  • Newcomer
  • Posts: 20
Re: Process Question: When to Debayer
« Reply #6 on: 2012 January 24 22:48:19 »
Thanks Sander and Pfile. Your thoughts make perfect sense. Now if I can just get some clear skies....