Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Superbias: Add support to custom Master Offset/Bias #80

Open
pauloup opened this issue Aug 5, 2019 · 2 comments
Open

Superbias: Add support to custom Master Offset/Bias #80

pauloup opened this issue Aug 5, 2019 · 2 comments

Comments

@pauloup
Copy link

pauloup commented Aug 5, 2019

Hi, I'm trying to add a modified Master Offset/Bias in DSS, with no success.

My goal is to use DSS to generate the base Master Offset from 200 bias frames, and then clean it up using Gimp to generate a noise free version. I've got inspired by the Superbias algorithm from PixInsight. Although I have never used PixInsight, but I think I'm able to reproduce the clear output from Superbias with some procedural teps in Gimp.

I took this Master Offset/Bias generated by DSS from 200 frames:
compare-3-bias-0 25x

(All images in this post are edited in Gimp to normalize levels).

And this is the result I'm able to produce in Gimp, which I'm calling Superbias:
compare-4-superbias-0 25x

(Both are bayer images, so these are just 25% resizes).

This is a 200% crop from the Master Bias:
compare-5-crop-bias

And here's a 200% crop from the Superbias
compare-6-crop-superbias

Now, I'm stuck. I can't find a way to make DSS accept it as a Color Filter Array (CFA) image. Even Trying FIT files with the option to use them as a bayer image doesn't work. So I have no way to actually test if my Superbias offers any improvement over the original Master bias.

I created this issue firstly to ask for a way to use custom Masters in DSS. I can't find documentation online on how to produce a DSS compatible Master TIF. The EXIF from a Master file shows that there are 5 custom unreadable tags, which I cant copy to my TIF:
Screenshot from 2019-08-05 15-46-41
I believe this is part of why my TIF can't be recognized as a Master Bias file, even when I change the name, modification date and other EXIF fields to match the original. I just can't fool DSS into thinking my edit is a bayered Master Bias.

Secondly, I would love to see this clean up process included in DSS, so I would like to know if there are interest from the developers to implement this "Superbias" feature. Maybe there is already some progress in this direction. I was thinking about posting it as a online tutorial, but first I need DSS to support custom Master Offset/Bias.

@perdrix52
Copy link
Member

perdrix52 commented Aug 6, 2019

Hi Paulo, FWIW that looks more like a negative flat than a a bias frame to me as it has vignetting (brighter in the corners than the middle). As Bias (Offset) frames are always taken with the lens cap on there's no way they can be vignetted.

If you read C++ take a look at https://github.com/deepskystacker/DSS/blob/master/DeepSkyStacker/TIFFUtil.h (and to a lesser extent) https://github.com/deepskystacker/DSS/blob/master/DeepSkyStacker/TIFFUtil.cpp. You'll see that DSS uses a set of TIFF tags starting a 50000 (decimal) and what each tag means.

@pauloup
Copy link
Author

pauloup commented Aug 6, 2019

Hi David, thank you for answering!

I know this Master Bias looks very unusual with the inverse vignette, but I assure you I took the bias frames with the lens completely blocked. To shoot the frames, I taped the lens with 4 layers of black electrical tape and put the smartphone in a closed box, and shoot at 1/8000s.

It's a photo from my smartphone (OnePlus 5T), so maybe this is a property of such a small sensor (just 4.61mm wide for 16MP). Or maybe it's some kind of vignette compensation filter built in the sensor or in the camera firmware on Android, or yet in the native Camera app which saves the DNG file. Anyway, unfortunately there's no way I could shot RAW without this vignette signal.

Here's a folder with the edited Superbias, the original Master Bias and one of the original DNGs from my phone for further inspection: https://drive.google.com/open?id=1A6sLgXvuaj_gBHx8D4r5djajRszGVrPW

Thank you for pointing the source code of the TIF custom tags. Until now I just couldn't find a way to edit my TIF to include these tags. I even tried a Hex editor, but dealing with all byte offsets was making me crazy. Exiftool can't handle TIF custom tags by default, but thanks to your support, I was able to find a way to add custom tags with Exiftool. Now I'm excited to test my edit and see if it improves the stacking result somehow.

Again, thank you so much. I'm gonna write a later comment here with instructions to help others who may face the same issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants