I want "see" data-cell before demosaicing, so some values into cells must be 0. Later demosaicing will fill this values (interpolation).
This is my code:
#define LR_IMGDT this->rawProcessor->imgdata
#define LR_SIZE LR_IMGDT.sizes
#define LR_RDATA LR_IMGDT.rawdata
// ...create this->rawProcessor and open file (type .CR2)
// ...unpack()
unsigned int rowcol=10;
ushort pxVal;
cout << "Showing " << rowcol << " firts columns and rows of raw image."<<endl;
for (unsigned int row = 0; row<rowcol; row++) // Later to LR_SIZE.raw_height
{
unsigned int colors[4];
for (unsigned int xx=0;xx<4;xx++)
colors[xx] = this->rawProcessor->COLOR(row,xx);
unsigned int pos1= row*LR_SIZE.raw_width;
for (unsigned int col = 0; col<rowcol; col++) // later to LR_SIZE.raw_width
{
unsigned int cc = colors[col&3];
pxVal= LR_RDATA.raw_image[pos1+col];
cout << "col "<<col<<" row "<<row<<" color "<<cc<<" value: " << pxVal<<endl;
}
But values of R,G1,B and G2 never are 0, why?
Output shunk example:
......
col 98 row 98 color 0 value: 426
col 99 row 98 color 1 value: 549
col 0 row 99 color 3 value: 255
col 1 row 99 color 2 value: 255
col 2 row 99 color 3 value: 255
col 3 row 99 color 2 value: 260
col 4 row 99 color 3 value: 256
col 5 row 99 color 2 value: 250
col 6 row 99 color 3 value: 250
col 7 row 99 color 2 value: 252
col 8 row 99 color 3 value: 244
col 9 row 99 color 2 value: 262
I want "see" data-cell before demosaicing, so some values into cells must be 0. Later demosaicing will fill this values (interpolation).
This is my code:
But values of R,G1,B and G2 never are 0, why?
Output shunk example:
......
col 98 row 98 color 0 value: 426
col 99 row 98 color 1 value: 549
col 0 row 99 color 3 value: 255
col 1 row 99 color 2 value: 255
col 2 row 99 color 3 value: 255
col 3 row 99 color 2 value: 260
col 4 row 99 color 3 value: 256
col 5 row 99 color 2 value: 250
col 6 row 99 color 3 value: 250
col 7 row 99 color 2 value: 252
col 8 row 99 color 3 value: 244
col 9 row 99 color 2 value: 262
.........