Page 2 of 2

Re: Reading Canon cr2

PostPosted: Thu Apr 19, 2012 5:10 pm
by kinor
Hi Melissa,

thanks a lot for your help.
I took care to uncheck all conversions in rawtherapee but the general problem is: even with 8 bit raw data the color interpolation can yield far more than eight bit color information in a 16 bit rgb container.

For that reason i decided to use dcraw for the test conversion in raw mode without any demosaicing in order to get the raw data written in a single layer tiff (the rggb pattern is clearly visible):

C:\Users\knorbert\Downloads\dcraw-9.12-ms-32-bit.exe -D -W -T -6 O:\CT\cr2test2\07.11.2011_NDVI__MG_2697.CR2

then i got the number of gray levels in the tiff file by
data = imread(aFile);
data = double(data);
vals = unique(data);
numvals = numel(vals)

numvals = 6044

bfopen again yields only 8 bit data.

Best regards
Norbert

Re: Reading Canon cr2

PostPosted: Mon Apr 30, 2012 11:20 am
by kinor
Hi everybody,

has anybody an idea how to get the bits per pixel of an cr2-file with a different method than the bioformat library?
I use a Canon EOS 450D and i take raw images which should have 16 bits per pixel as the camera gives 14 bit data. I did not find an option which produces raw files with changed bits per pixel.

Using dcraw like this gives the raw data in 16 bit:
C:\Users\knorbert\Downloads\dcraw-9.12-ms-32-bit.exe -D -W -T -6 O:\CT\cr2test2\07.11.2011_NDVI__MG_2697.CR2

Unfortunately Bioformats reads 8 bit data out of the files.

has anyone an idea why not 16 bit data is read?

Thanks for any answer in advance.

Best
Norbert

Re: Reading Canon cr2

PostPosted: Tue May 29, 2012 12:23 am
by mlinkert
Hi Norbert,

Thanks for the additional information, and my apologies for not replying sooner.

After some more investigation, we have determined why Bio-Formats returns 8-bit data instead of 16-bit data; the fix will be in the upcoming 4.4 release of Bio-Formats/OMERO.

Regards,
-Melissa

Re: Reading Canon cr2

PostPosted: Thu May 31, 2012 9:16 am
by kinor
Hi Melissa,

thanks for your answer and your effort. I feared that my question demands additional effort and i am looking forward to the new release.

Best regards
Norbert