After these piece of code, your image pixels will reside in lr.imgdata.image[][4] array.
To access pixel value you may use lr.imgdata.image[(row*width)+col][C], where C is color index (R: 0, G: 1, B: 2, Green2: 3).
So, you may interpolate anything you want using only G and G2 channel data.
Use lr.COLOR(row,col) to get color index for given pixel (i.e. which bayer color corresponds to row/col pair)
The red and blue filters on most digital cameras are 'wide', so these channels will respond to your (monochrome green) signal.
BTW, if you want to ignore R/B data completely, you may use:
After these piece of code, your image pixels will reside in lr.imgdata.image[][4] array.
To access pixel value you may use lr.imgdata.image[(row*width)+col][C], where C is color index (R: 0, G: 1, B: 2, Green2: 3).
So, you may interpolate anything you want using only G and G2 channel data.
Use lr.COLOR(row,col) to get color index for given pixel (i.e. which bayer color corresponds to row/col pair)