Author Topic: dark frames from raw look different PI and LightRoom  (Read 9447 times)

Offline Nocturnal

  • PixInsight Jedi Council Member
  • *******
  • Posts: 2727
    • http://www.carpephoton.com
Re: dark frames from raw look different PI and LightRoom
« Reply #15 on: 2012 March 23 10:24:29 »
Unless Craig drastically improved Neb's BPM recently it's a rather poor implementation. Of course I'm arrogant and biased because I wrote my own :) Luckily it's free.

http://www.tungstentech.com/Software/FixFITS/tabid/78/Default.aspx

Should I ever get bored I'll port it to PCL but that's decidedly non-trivial and it doesn't pay a penny so the incentive isn't very high :) I have a newer version that can also remove triple bad columns like I experienced with my camera a few weeks ago. Now that temperatures have gone up that defect seems to have gone away.
Best,

    Sander
---
Edge HD 1100
QHY-8 for imaging, IMG0H mono for guiding, video cameras for occulations
ASI224, QHY5L-IIc
HyperStar3
WO-M110ED+FR-III/TRF-2008
Takahashi EM-400
PIxInsight, DeepSkyStacker, PHD, Nebulosity

ruediger

  • Guest
Re: dark frames from raw look different PI and LightRoom
« Reply #16 on: 2012 March 23 11:26:03 »
these red pixels look more like a bug in VNG implementation to me.
After a more careful inspection, yes :-)

My test image was a RAW file as from the camera, name IMG_4592.CR2

1. Opening this RAW in PixInsight with dcraw, VNG method selected, the result is OK, at least not showing the red dots (screenshot top left: label "dcraw")
2. Opening this RAW in PixInsight as CFA gray and then VNG debayering, the result is also OK, even better than dcraw. So you did a good job in your debayering code!! (screenshot top right: "IMG_49521_RGB_VNG")

Now to the part that made me headaches.
3. Calibrating the file as a CFA gray RAW and then VNG debayering, the result shows the red dots (screenshot bottom right, label: IMG_4592_calibrated_RGB_RGB_VNG). For better viewing, I converted the CFA gray to RGB, cropped a relevant part and attached it as TIFF to this mail. There is nothing special with the calibrated CFA RGB, see screenshot bottom left.

All the spurious red dots are not "invented" ones on G or B-positions! They all come from the R-position of the bayer matrix, but did not get G and/or B-values.

- the first red dot got no green value (R,G,B = 0.04, 0, 0.01 ), x,y = 48,34
- the second red dot got neither green no blue (R,G,B = 0.06, 0, 0 ), x,y = 44,36
- same for the third red dot (R = 0.01), x,y= 42,44

From my own experiences with debayering algorithms, it could be the unintentional clamping of temporary negative values to zero. Maybe this is a starting point for you to look inside your code.

RĂ¼diger

Offline zvrastil

  • PixInsight Addict
  • ***
  • Posts: 179
    • Astrophotography
Re: dark frames from raw look different PI and LightRoom
« Reply #17 on: 2012 March 23 13:09:52 »
Hi Ruediger,

thanks for the data. I'll take a look at the problem as soon as I finish processing of my last shots (probably during next week).

regards, Zbynek

ruediger

  • Guest
Re: dark frames from raw look different PI and LightRoom
« Reply #18 on: 2012 April 08 04:33:41 »
thanks for the data. I'll take a look at the problem as soon as I finish processing of my last shots (probably during next week).
Hi Zbynek,
have you found some time for looking at the problem?

Funny thing, that I run into the same problem with totally different algorithms, getting similar red spots. In PSJR I implemented LMMSE http://www.ipol.im/pub/algo/g_zhang_wu_lmmse_image_demosaicking/ and WMHOI http://dspace.flinders.edu.au/xmlui/bitstream/2328/25740/1/Li%20Color%20Filter.pdf.
I'm not 100% sure where the problem lies, so I hoped, that you solve it and that the solution is also applicable to my code  :)

Regards,
RĂ¼diger