ST, Open, and Bayer Drizzle

Questions and answers about processing in StarTools and how to accomplish certain tasks.
Post Reply
Mike in Rancho
Posts: 1141
Joined: Sun Jun 20, 2021 10:05 pm
Location: Alta Loma, CA

ST, Open, and Bayer Drizzle

Post by Mike in Rancho »

Leave it to me to start asking questions about ST's most basic of buttons -- OPEN! ;)

From the descriptions and various forms of documentation, center option is (of the top of my head) for OSC, bayered, not white balanced. This takes advantage of 2xG automatically for creation of a synth L, and we get to process in Compose mode. Left option is for not bayered, or is white balanced, and processes in old-school color from the get go.

Sort of?

What does ST mean by "bayered"? Debayered, as in color interpolated demosaicking? How does stacking with CFA drizzle in lieu of debayering (if Bayer drizzle is not considered "debayering") affect our choice here? Technically it is just a complicated stacking algorithm that uses the relative "movement" of frames in order to average real R, G, and B values for any given X, Y pixel.

The background story is I just tried this on my January M42 data. Heavily flawed data mind you, but I am now working on my Newt's multitude of light leaks. :(

The stack was created from about 1260 10-second subs, over two nights, with an aggregate of just over 100 dithers completed. Perhaps not enough?

First reflection, the resultant stack is way way dark compared to an interpolated version of the same data. I must think on if that is a correct output. I believe using either open option still requires use of significant tweaking (mostly gamma) in the first AutoDev to even see what is there. But ST manages it. Wipe, with color showing, seems to act in a mostly normal fashion, though if you pixel peep you can see that there is perhaps a graininess to the pixel colors. Possibly more dithers would have improved pixel sampling for the averaging to work better? Post-wipe AutoDev seems to work in normal fashion, as does everything else.*

Changing the zoom level also causes significant detail and color artifacting, in a really bizarre but sometimes pretty manner. I am thinking this has more to do with the graphics display and monitor capabilities, maybe?

Resampling/SNR recovery with bin does seem to help, if one tries that. Also, at the end, SS and denoise will smooth out the scattered color graininess even if bin is never run.

I am not sure if I have achieved improved resolution, which is supposed to be the point of Bayer drizzle. Interpolation is pretty good.

*Two items that seemed to be acting differently. One is, that even with a linear left-option open, while the first AutoDev was in color, after Wipe ST seemed to go into compose mode and I processed in grayscale until hitting the color module. Unless...well I just don't know.

The other is that SVD could not create a usable apod mask. I suppose I should have tried to create it manually, but even on the bright stars it picked up, the mask was not showing good profiles. Like everything was too dim or dark. In fact, star mask generation and some other functions (where ST builds up models during entry to the module) all seemed to be getting a bit laggy trying to handle this dataset. Odd.

Alright, so that was a novel. In case anyone wants to try it out, here's a link to two datasets, one normal and the other Bayer drizzle. Again, I apologize for the crazy gradients and color anomalies from the light leaks. I'll have those fixed soon. Meanwhile, some cropping is in order. :D

https://drive.google.com/drive/folders/ ... sp=sharing

Gracias!
User avatar
admin
Site Admin
Posts: 3367
Joined: Thu Dec 02, 2010 10:51 pm
Location: Melbourne
Contact:

Re: ST, Open, and Bayer Drizzle

Post by admin »

Hi Mike,

If a Bayer matrix ("Bayered" as the dialog calls it) was used - in any way - during acquisition, this means that twice as many green samples have gone into "the mix" than red or blue samples. This means that - all other things equal - whatever resulting green channel is presented to StarTools, should be sqrt(2) = 1.4x as reliable as the red and blue channels for the purpose of creating a synthetic luminance dataset, e.g. L = (1xR + 1.4xG + 1xB) / (1 + 1.4 + 1)

Color balancing obviously changes (multiplies) the channels independently, so ST can no longer assume aforementioned formula, and necessarily has to throw its hands up in the air (it cannot know or deduced those multipliers).

Bayer drizzle is usually not something I would recommend, as it requires a lot of frames. More importantly, it causes noise levels to vary from pixel to pixel if not done perfectly with high sub-pixel accuracy during acquisition (which is usually where things go wrong).

StarTools showing "odd" noise signatures depending on the zoom level is entirely by design and is meant to bring precisely aforementioned issue to your attention! IMHO, the scaling algorithm in ST is really an underappreciated feature. :)

Binning 50% or higher will indeed mostly alleviate the issue by mostly negating the pixel-to-pixel discrepancies and pooling noise levels (and signal) into one reading.

The point of Bayer drizzling is not to improve resolution, but rather to circumvent interpolation during the debayering stage, by making sure there is actual data to rely on for the - otherwise - missing pixels. This is done by shifting the image a little (which is where the sub-pixel accurate tracking/guiding comes in), so that over multiple frames, after aligning, there is a real reading for each pixel.

Hope that clears some things up!
Ivo Jager
StarTools creator and astronomy enthusiast
Mike in Rancho
Posts: 1141
Joined: Sun Jun 20, 2021 10:05 pm
Location: Alta Loma, CA

Re: ST, Open, and Bayer Drizzle

Post by Mike in Rancho »

Hi Ivo, and thanks, makes a lot of sense.

Mostly I was just experimenting. Wasn't even sure it would work. The result is actually okay, though after running the interpolated version of the same subs through a near-matching (in terms of effect) ST workflow, I don't see any great difference.

I thought that "real" resolution could perhaps be improved, since the pixels aren't being interpolated (and nobody wants dog hair!), but it seems the demosaicking algorithms are pretty good.

Certainly not worth the trouble, if this wasn't sufficient to pull it off, especially since useful things like SVD and star mask generation didn't really work right.

I don't quite follow the "sub-pixel" line noted on the DSS site for this. PHD2 does guide at sub-pixel accuracy, I believe. But really it seems to me one just needs enough samples in R, G, and B for a particular X,Y pixel after all the drizzling (and drifting, if any) is accounted for by the star alignment stacking. In any event, I figured 1,260 subs and 110 dithers would be enough for the experiment, and it kind of was, but again I didn't see that improved clarity result. Perhaps if I processed at full size rather than 50% bin?

And yes, makes sense too that I should have opened as Bayer based on the acquiring camera, as even CFA-drizzled a pixel will have greater green sampling opportunities for Synth L purposes.

Interesting, I hadn't thought of the view zoom as one of Wipe's analytic features, and usually chalked up visual oddities when doing so to my GPU or monitor. I suppose it is something that should be done then. Along with check color, luminance, etc., also check zoom in/out. :D So I guess that reasonably close but imperfect color scattering of the pixels after CFA drizzle was noticed by Wipe, which was trying to tell me "hey look at this you bozo"? :lol:
Post Reply