Open JVision opened 4 years ago
@JVision To me it looks like some negative values are converted to unsigned int before clipping them to 0. Clip the negatives to zero before converting to unsigned int should work.
Thanks. After checking that. the result is back to normal. Impressive results. Now, noticed that there are some black dots look quite unusual. is that normal? How to improve it? would like to exact the best quality from the raw data.
@JVision Usually white balancing before demosaic gives best results. Can you provide the raw file or check the output of RawTherapee?
Sure. here's the raw file. Thank you @heckflosse . LRM_20190907_150805.zip
@JVision Here's a screenshot of RawTherapee output using neutral profile (Amaze demosaic, no sharpening)
And with default profile (raw ca correction, amaze demosaic, capture sharpening and auto-matched tone curve)
Still see random black dots in the leaves. does not look natural. Any idea to improve?
Thanks.
Hi CarVac,
I was trying to write a small test program to see how this raw processor works. However, after fumbling around for a few hours, I could not get the correct result. I must have done something wrong somewhere. Is there any guidance in this usage except the readme?
Here's what I did: step 1: filling the cfa pattern array: ` unsigned cfa[2][2];
if (bayer_pattern == RGGB) { cfa[0][0] = 0, cfa[0][1] = 1, cfa[1][0] = 1, cfa[1][1] = 2; }else if (bayer_pattern == BGGR){ cfa[0][0] = 2, cfa[0][1] = 1, cfa[1][0] = 1, cfa[1][1] = 0; }else if (bayer_pattern == GRBG) { cfa[0][0] = 1, cfa[0][1] = 0, cfa[1][0] = 2, cfa[1][1] = 1; };`
step 2: filling raw data ` int pixelsize = width height; / AmAZeMEmE wants an image as floating points and 2d array as well / const float restrict imagefloat2d = (const float )malloc(height sizeof(float )); float red1d = (float )malloc(pixelsize sizeof(float)); float restrict red2d = (float )malloc(height sizeof(float )); float green1d = (float )malloc(pixelsize sizeof(float)); float restrict green2d = (float )malloc(height sizeof(float )); float blue1d = (float )malloc(pixelsize sizeof(float)); float restrict blue2d = (float )malloc(height sizeof(float ));
`
Or even better, if there any document somewhere?
Regards JVision![Capture](https://user-images.githubusercontent.com/2658584/66185342-6ee42480-e6c2-11e9-9ec7-1566792b67bf.PNG)