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

indi_rpicam - unable to get proper colour in the photographs #216

Closed
baryah opened this issue Sep 13, 2020 · 15 comments
Closed

indi_rpicam - unable to get proper colour in the photographs #216

baryah opened this issue Sep 13, 2020 · 15 comments
Labels
bug Something isn't working Cannot reproduce Reported issue cannot be reproduced

Comments

@baryah
Copy link

baryah commented Sep 13, 2020

with RPi-4-8GB+HQ Camera+Astroberry -> the clicked picture is a monochrome 'fits' file with bayer pattern BGGR (Header). When I debayer it in DSS, the output is a rather pink looking image. I chose Generic BGGR in the Raw/FITS DDP Settings.

@baryah baryah added the bug Something isn't working label Sep 13, 2020
@lboclboc
Copy link
Contributor

Can you please upload an example of your fits image and Ill have a look?

@cnieswand
Copy link

Hi, same issue here. Almost same configuration RPi-4-4GB + HQ Camera + Astroberry. I have to set the BAYERPAT=BGGR in the fits header manually (in the INDI driver settings). But trying to debayer with Fitsworks fails: it does not produce any reasonable color for any BAYER matrix settings ...
Any progress on that topic?

@baryah
Copy link
Author

baryah commented Oct 17, 2020

Can you please upload an example of your fits image and Ill have a look?

https://drive.google.com/drive/folders/1ONh3VJKFUWhNRVF_gH7LUuhdIn8UmdYE?usp=sharing

Google Drive Link with fits file as well as the tiff files generated with PIPP using BGGR and RGGB for debayering along with the logs of PIPP

@cnieswand
Copy link

I do not have an astro photo yet ... just an image from my office ... which makes it very obvious.
Have a look at the histogram of your original fits file ... strange ...

@lboclboc
Copy link
Contributor

Thanks, your debayerd files for sure does not look right. When I open the raw fits-file in kstars it looks ok. Does it look alright for you in kstars (remember to turn on the auto debayer FITS-option in kstars).
I will do some testing with fitswork and pipp also.

@cnieswand
Copy link

Oh yes ...

.... (remember to turn on the auto debayer FITS-option in kstars).

This flag is not set by default ... looks better now, but this does not give the correct result yet.
What I have to do is to open the fits file in Fitswork, debayer with BGGR, BUT with Rmul=2.00 and Bmul=2.00.
With these settings colors are perfect!

@cnieswand
Copy link

I guess that green is simply not divided by 2 ... there are 2 green pixels in the matrix ...

@cnieswand
Copy link

@baryah : treating your fits via fitswork the same way also gives a reasonable result ...

@cnieswand
Copy link

@baryah : and using DSS: Set red scale and blue scale in the Raw/FITS Settings to 2.00 and you get a nice result too.

@lboclboc
Copy link
Contributor

lboclboc commented Oct 18, 2020

Ok, great news. I suppose that if I just multiply blue and red with 2 in the driver all would be fine. I dont want to divide green with 2 since we would loose one bit then, and since its 16 data, the 12bit raw data will fit ok even if I multiply by 2.
I also need to understand also why it shows up ok in kstars and not in the other tools. I suspect I am missing some fits information field about color weighting.

@lboclboc
Copy link
Contributor

I really think after reading up on this that this is correct behavior. I did find some errors and possible instabilities in the code and I will submit that shortly. Let me know if you disagree.

@cnieswand
Copy link

If you mean multiply B&R by 2 ... fine, yes ... that should do it ...

@lboclboc
Copy link
Contributor

Yes, ok great. We can close this ticket then.

@cnieswand
Copy link

From my side, yes.
Thank you very much for your help!
@baryah ???

@baryah
Copy link
Author

baryah commented Oct 19, 2020 via email

@knro knro added the Cannot reproduce Reported issue cannot be reproduced label Sep 28, 2021
@knro knro closed this as completed Sep 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working Cannot reproduce Reported issue cannot be reproduced
Projects
None yet
Development

No branches or pull requests

4 participants