Add new comment

Processing Fuji raw_image

By code to process the raw_image array looks like this:

#define RAW(row,col) \
	RawData.raw_image[(row)*S.raw_width+(col)]
 
for (row = 0; row < S.height; row++)
{
	for (col = 0; col < S.width; col++)
	{
           unsigned short val = 
              RAW(row + S.top_margin, col + S.left_margin);
           // etc ...
        }
}

This works very well for Canon raw images, but totally falls apart when processing a Fuji RAF file from an S5-Pro.

Loioking at the values in rawdata.sizes I see:

  raw_height   1444
  raw_width    4352
  height       3583
  width        3584
  top_margin      2
  left_margin    32
  iheight      3583
  iwidth       3584
  raw_pitch    8704

How should I check if this for a Fuji raw, and how should I iterate and process this data to end up with the 3583/3584 image with the actual image diagonally across it?

Thanks

Forums: