Author Topic: Samsung RAW (NX300) de-Bayer Problem  (Read 1232 times)

Offline naugustin

  • Newcomer
  • Posts: 2
Samsung RAW (NX300) de-Bayer Problem
« on: 2017 August 17 14:44:16 »
Hi, I´m a beginner changing from DSS to PixInsight and working with an evaluation License at the Moment. I´m almost going to buy a license but I face a nasty problem with my Samsung RAW files. I don't know if it´s a bug or if I do something completely wrong here:

My problem is the de-bayering if I import my RAW files as pure RAW (as suggested by most processing tutorials).

The CFA pattern of my camera is apparently GRBG, which is shown when I import my RAWs with the "RAW Format Preferences" set to "de-Bayer RGB". When importing my RAWs like this the RGB picture looks okay. See left screenshot.

When I set the "RAW Format Preferences" to Pure RAW it´s of course imported as greyscale image. However, whenever (no matter if I load a single RAW or in a later stage as calibrated and corrected *.xisf picture) I try to de-Bayer the picture with the de-Bayer Process I always end up with false RGB colors. I tried automatic mode, I tried manually to set the CFA pattern, I even tried all other CFA patters but it´s just coming out wrong (see right screen shot, de-bayered in auto mode).

Di I something wrong here or is something just not working? This is a quite important point since I only have my Samsung NX300 for astrophotography at this moment and do not really plan to buy a new cam. I would like to completely switch to PixInsight but at the moment I need to make an extra loop with Tiff-Images to DSS...

I would be happy if there is a solution.

Best Regards,
Nico


Here are some Process Console feedbacks (don´t know if it helps):

Loading with RAW Format Preferences to de-Bayer RGB

open "/Users/naugustin/Pictures/2017/Astro/PixInsight_N-America_1min/Lights/SAM_5590.SRW"
Reading 1 file(s):
/Users/naugustin/Pictures/2017/Astro/PixInsight_N-America_1min/Lights/SAM_5590.SRW

Timestamp: Sun May 28 02:23:21 2017
Camera: Samsung NX300
ISO speed: 1600
Shutter: 60.0 sec
Aperture: f/nan
Focal length: 0.0 mm
Embedded ICC profile: no
Number of raw images: 1
Thumb size:  5472 x 3648
Full size:   5546 x 3714
Image size:  5536 x 3696
Output size: 5536 x 3696
Raw colors: 3
Filter pattern: GR/BG
Daylight multipliers: 2.593356 0.946619 1.479073
Camera multipliers: 10976.000000 4096.000000 5712.000000 4096.000000

Invoking: dcraw -4 -o 0 -w -q 1
Decoding Samsung NX300 file (15874199131552x3696 pixels, ISO=1600, Exposure=60.00s): done
Loading raw image: done

_________________________________
Loading as Pure RAW:

open "/Users/naugustin/Pictures/2017/Astro/PixInsight_N-America_1min/Lights/SAM_5590.SRW"
Reading 1 file(s):
/Users/naugustin/Pictures/2017/Astro/PixInsight_N-America_1min/Lights/SAM_5590.SRW
?
Timestamp: Sun May 28 02:23:21 2017
Camera: Samsung NX300
ISO speed: 1600
Shutter: 60.0 sec
Aperture: f/nan
Focal length: 0.0 mm
Embedded ICC profile: no
Number of raw images: 1
Thumb size:  5472 x 3648
Full size:   5546 x 3714
Image size:  5536 x 3696
Output size: 5536 x 3696
Raw colors: 3
Filter pattern: GR/BG
Daylight multipliers: 2.593356 0.946619 1.479073
Camera multipliers: 10976.000000 4096.000000 5712.000000 4096.000000
?
Invoking: dcraw -4 -o 0 -r 1 1 1 1 -D -t 0 -k 0 -H 1
Decoding Samsung NX300 file (15874199131552x3696 pixels, ISO=1600, Exposure=60.00s): done
Loading raw image: done

_________________________________
then de-Bayer:

Debayer: Processing view: SAM_5590
CFA pattern (detected): GRBG
VNG demosaicing: done
Noise evaluation: done
Gaussian noise estimates:
s0 = 2.573e-04, n0 = 0.3023 (MRS)
s1 = 2.663e-04, n1 = 0.2076 (MRS)
s2 = 2.759e-04, n2 = 0.2963 (MRS)
6.128 s

Offline msmythers

  • PTeam Member
  • PixInsight Jedi
  • *****
  • Posts: 1178
    • astrobin
Re: Samsung RAW (NX300) de-Bayer Problem
« Reply #1 on: 2017 August 17 15:35:57 »
Nico

Your debayer is fine. Your image is not color balanced which is normal after image integration.

Here is something that you really should not try with a crop of a jpg screen shot but I used Background Neutralization and then added some color saturation to the image. Not looking at anything but the stars you will see that they are basically the right colors. The background is more neutral also.

Find some tutorials on color balance and also the use of the STF tool, more specifically the auto stretch and linked RGB channels. That will help immensely.


Mike

 

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: Samsung RAW (NX300) de-Bayer Problem
« Reply #2 on: 2017 August 17 15:47:28 »
Hi Nico,

Do not try and over-think the deBayer process at the moment. When you first get a deBatered image to look at in PixInsight, you will almost certainly have to use the ScreenTransferFunction (STF) Process - what you need to do is to initially apply the STF with the channels un-linked. This will try and 'auto-balance' the background of your image (typically aiming for a 'neutral grey'). Once you have done that - re-link the STF channel sliders before trying to carry out any kind of fine-tuning of the sliders.

Now, you will perhaps stiill be concerned, because your image now doesn't seem to have any colour whatsoever - but, don't worry, this is almost certainly not the case. Subsequent processing steps will gradually tease out all the glorious colour detail that you hopefully captured.

Yes, working with PixInsight sometimes feels un-natural for the novice, perhaps even counter-intuitive. No doubt many novices decide that PixInsight is simply 'not for them' - because they don't get the instant gratification that other packages seem to offer. But, what they then miss out on is the sometimes astonishing power that many of the PixInsight Processes and Scripts bring to bear on their data.

Taking the time to learn these steps is part of the pleasure of working with PixInsight - but, do not expect to become proficient with any of the PI tools during your Trial Period - instead, use that time to explore what PixInsight is capable of doing. And remember that, here on the Forum, we have a great group of enthusiasts and experts who are always willing to try and help wherever they can

Stay Happy  :)
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC

Offline naugustin

  • Newcomer
  • Posts: 2
Re: Samsung RAW (NX300) de-Bayer Problem
« Reply #3 on: 2017 August 18 11:24:14 »
Dear Niall and Mike,

thanks for the nice replies! Good to know that it´s maybe not a serious but a newbie problem.
However, I watched tutorials and tinkered around quite a bit in the last days with PixInsight and the STF I know in the meantime. Using this still keeps the NGC7000 greenish. Also tweaking a little with the channels and doing color calibration - after some of the numerous tutorials out there - are not making the NGC7000 red again. Thats what worries me a bit. The DSS stack I initially processed in PI came out okay (I´m far away from "good" pictures ;))
Of course, I´m still at the beginning but had some nice results already when importing stacked images from DeepSkyStakker. I know that DSS is a "fast-result-solution" with little control and it´s not supporting my raw files either. But seeing this huge difference when I import the same file in two different ways to PixInsight (one as de-bayered RGB looking fairly okay and the other one  as RAW only coming out totally greenish after de-bayering) is indeed a somewhat hard to understand  :-\ But maybe also an effect of just having a single Light frame imported with a pretty bad signal to noise ratio?

However, I like to get away from DeepSkyStacker and fully process my pictures in PixInsight one day. I have a bit more trial time left and saving for the Full License. Will watch a few more tutorials now on how to prepare and stack my RAWs in PixInsight  (this time Harry`s Astro Shed). When I fall over the same problem again I may can show the result here?

Cheers, Nico

PS: I´m working under MacOS 10.12.6

Offline Niall Saunders

  • PTeam Member
  • PixInsight Jedi Knight
  • *****
  • Posts: 1456
  • We have cookies? Where ?
Re: Samsung RAW (NX300) de-Bayer Problem
« Reply #4 on: 2017 August 18 14:10:18 »
Hello again Nico,

I doubt that MacOS has any connection with your problem.

A suggestion that I regularly make when attempting to identify DeBayer issues is to shoot a 'daytime' ('daylight' exposure of a target that has readily identifiable colours within it (e.g. green grass, blue sky and red flowers). Shoot that as a RAW image and import that image into Pixinsight and perform the deBayer using the CFA pattern that you 'believe' is correct.

Do these steps then give you the 'correct' colours? If not, then you are looking to try all the remaining CFA patterns again, hopefully finding a 'match'. However, be careful when doing this - try to avoid using the STF (you shouldn't need it at all). If you do have to use STF, then keep the channel sliders 'linked' at this stage.

Let us know how you get on.
Cheers,
Niall Saunders
Clinterty Observatories
Aberdeen, UK

Altair Astro GSO 10" f/8 Ritchey Chrétien CF OTA on EQ8 mount with homebrew 3D Balance and Pier
Moonfish ED80 APO & Celestron Omni XLT 120
QHY10 CCD & QHY5L-II Colour
9mm TS-OAG and Meade DSI-IIC