Using only green pixels to create final image (discard red and blue)
I was hoping for some advice on how to have libraw completely discard the red and blue pixels and only use the green pixels to interpolate for the final image. This is for a scientific application. I have done a fair amount of research and I believe there is no way for me to do this without modifying the source code. That is fine with me.
The issue is I am inexperienced with C++ and after spending a few hours going through libraw_cxx.cpp I have no idea how to approach this. My guess was that I can insert some zeros into the constant color conversion matrices such that the red and blue values get set to zero.
I am hoping to do this is in the most efficient and fast way possible, any advice would be appreciated.
In case you are wondering the details of why I would want to do this- it is because we are looking at a phosphor that only shines green light, and only care about this signal. Therefore any data coming from the red and blue pixels can only be adding noise.