badpixel.lua is still the same; the bad-pixel detection itself it inside core/raw.c which I have updated for 12-bit pixels
I used that reader.c but it is old now, I have attached a new one which also works in win32 .. Easiest is to use DNG support inside your camera now.
The reason it outputs half the resolution is simple: your CCD has resolution 3720x2772. BUT this does NOT mean it has 3720x2772 RGB pixels; each of the 3720x2772 is EITHER Red, OR Green OR Blue in a grid. The two first lines of pixels are
RGRGRGRGRGRGRG
GBGBGBGBGBGBGB
So you see that the easiest way to make an RGBRGBRGBRGB image (as normal), just to take each block of
RG
GB
As one pixel. The reader just discards the second G, and writes one RGB per 2x2 block of RGGB pixels. If you were to do it properly, you'd interpolate between all the values, giving you a 3720x2772 RGB image (this is what your cam does when generating JPGs). So in some sense of the word, this camera really is not 10MP, but just 2.5 MP. This goes for just about any digital camera though 😀 On the other hand, if you photograph something black-and-white, each pixel counts and you get a 'true' 10MP image (with R=G=B).