Author Topic: artefact with VNG debayer  (Read 1467 times)

Offline MARA25

  • Newcomer
  • Posts: 5
artefact with VNG debayer
« on: 2018 January 02 04:25:18 »
Hello,

I noticed some unusual pixels around bright stars following debayer with VNG.
I tried the bilinear debayer and the result looks much better. I thought VNG was superior to bilinear, any clue on what's going on?

A raw NEF can be found here: https://drive.google.com/open?id=1Am6fk7ZUoz_S16oodkFhpLcxoTG-jpxp
I attach examples of VNG and bilinear results (cropped form a portion of the Pleiades in the above NEF).

Thanks

Edit: I use Version 01.08.05.1353 Ripley (x64) on windows 10
« Last Edit: 2018 January 02 04:51:59 by MARA25 »

Offline MARA25

  • Newcomer
  • Posts: 5
Re: artefact with VNG debayer
« Reply #1 on: 2018 January 09 13:07:24 »
Is anyone able to reproduce this issue? I observe it with two different Nikon DSLRs.

It seems like a major problem to have such artifact when debayering?!

Offline Juan Conejero

  • PTeam Member
  • PixInsight Jedi Grand Master
  • ********
  • Posts: 7111
    • http://pixinsight.com/
Re: artefact with VNG debayer
« Reply #2 on: 2018 January 10 02:45:54 »
Hi,

Yes, I can confirm that VNG interpolation generates these artifacts with this image. These are rippling artifacts caused by the VNG interpolation algorithm. This problem is quite common with small-scale preserving interpolations applied to weak linear data. For example, you'll see very similar artifacts with the bicubic and Lanczos interpolation algorithms applied to short CCD exposures. Here are some considerations:

- These dark spots in the blue channel are not so bad in practice. Provided you have a reasonable amount of raw frames (say ten or more), these artifacts should be rejected without problems during a normal image integration procedure.

- Instead of debayering, you can perform a CFA drizzle integration (also known as Bayer drizzle). Since drizzle does not interpolate the data, it is completely free from these problems. Drizzle is actually better than any interpolation. The only downside is that you need many raw frames, say 10-15 or more, and good dithering (although dithering is *always* necessary anyway).

- This frame is very weak. Try with longer exposure times. These rippling issues don't happen, or become marginal, with sufficiently exposed linear data.

I hope this helps. Of course, another alternative is bilinear interpolation, but it will smooth and hence destroy your data, especially with these wide-field shots.
Juan Conejero
PixInsight Development Team
http://pixinsight.com/

Offline MARA25

  • Newcomer
  • Posts: 5
Re: artefact with VNG debayer
« Reply #3 on: 2018 January 10 05:56:05 »
Hi Juan,

Thank you for the clarifications.

Can you explain what you mean by weak linear data? Is it the SNR? or the overall signal intensity?
This sample image is indeed quite noisy and of low quality, despite 2 min of integration time at f/2.8. So I'm afraid the background will become too bright if I increase the exposure time.

-Regarding stacking, these VNG artifacts are consistent enough that even with dithering, it's sometimes difficult to completely get rid of them after integration.

-Thanks for mentioning CFA drizzle integration, this definitely sounds like the way to go. I will look into it.



Offline bulrichl

  • PixInsight Guru
  • ****
  • Posts: 524
Re: artefact with VNG debayer
« Reply #4 on: 2018 January 10 06:33:17 »
Hi,

weak linear data in this case means that the overall signal intensity is very low. You can easily check that with Statistics and HistogramTransformation:

DSC_3022
count (%)   99.99993
count (px)  24208392
mean        25.5
median      25.0
stdDev      30.2
avgDev      7.1
MAD         7.4
minimum     1.0
maximum     4095.0

The median is 25 on a scale of 0 - 4095 (the D3200 has a 12-bit ADC). I have attached a zoomed histogram (horizontal zoom 16 in order to show only the relevant part from 0 to 4095, vertical zoom is 400).

You used ISO 100 and an exposure time of 120 s. I would suggest to use longer exposure time and/or a higher ISO setting, overall factor 8 - 10 (e. g. ISO 400 and esposure time 240 - 300 s). There is absolutely no risc of getting a too bright background, however the cores of the brightest stars could be saturated.

Bernd