Open CarVac opened 5 years ago
Toward this end, I branched rawproc to code up inclusion of librtprocess. In trying to use vng4, I am getting this error:
librtprocess : Wrong color filter for 4 colors array: 0 1 1 2
I couldn't find any guidance or indication in the code with respect to constructing cfarray, so I just assumed 0=r, 1=g, and 2=b. Apparently, bad assumption...
@butcherg I will add a comment.
vng4 needs a color matrix with 4 different colors (2 different greens). For example 0 1 3 2
Ah, thanks. Also, I neglected to scale my rawData to the 16-bit integer range, from the float 0.0-1.0...
So, would doxygen-parsed comments be an acceptable approach? After I make it work in rawproc, I think I'll know enough to start incorporating such...
@butcherg
Also, I neglected to scale my rawData to the 16-bit integer range, from the float 0.0-1.0...
Currently the only demosaicer where input and output scale are arguments is amaze. I will add the functionality to the other demosaicers too.
Ok, so all will expect rawData as float, 0.0-1.0?
On January 24, 2019 8:29:21 AM MST, Ingo Weyrich notifications@github.com wrote:
@butcherg
Also, I neglected to scale my rawData to the 16-bit integer range, from the float 0.0-1.0...
Currently the only demosaicer where input and output scale are arguments is amaze. I will add the functionality to the other demosaicers too.
-- You are receiving this because you were mentioned. Reply to this email directly or view it on GitHub: https://github.com/CarVac/librtprocess/issues/12#issuecomment-457238362
-- Sent from my Android device with K-9 Mail. Please excuse my brevity.
@butcherg Currently most of the demosaicers expect rawdata as float [0.0;65535.0] with the exception of amaze, where you can pass scaleIn and scaleOut. So, if your data is in float [0.0;1.0] range and you want to use amaze, just pass 1.0 as scaleIn and scaleOut. I will add that for the other demosaciers too.
btw: about vng4: you can just set one of the greens from 1 to 3 and it will work.
@butcherg Imho, though I may miss something, the vng4 algorithm should work in whatever range [0;1], [0;65535], [0;10000000000] because there is no epsilon and no hard clippling involved. Can you confirm this from your side using it in RawProc?
If so, that would save me some time :smiley:
I'm actually struggling with my C skills, can't seem to make a rawData array that vng4 won't segfault upon. It needs to be float , AFAIK, so can I new float[size] and declare a float pointer to that? Or should I just malloc....
It would be nice to have the scaling factor, mentioned for vng4 above, in all demosaicing functions. And if some demosaicing function do support a [0, 1] range, it'd be nice to know too, to avoid a conversion.
I need help with the arguments of some demosaicing functions, those that do not exist in all functions, could you document it please or tell it here?
Is superpixel supported? What kind of implementation is bayerfast_demosaic
? Is there a simple bilinear interpolation somewhere? What kind of interpolation does xtransfast_demosaic
use?
@butcherg if you need help with malloc I probably can help you.
@Vincent-FA, thanks for the offer; the message I sent yesterday reflects the help I got from @heckflosse subsequent to my lament... :D
@heckflosse, I've tried AHD and VNG without doing the 65536 scaling, and I can't see a visible difference in the outcome... ??
Well, we need to document what everything does.