We're Hiring!

Reading Canon cr2

Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats
Please note:
Historical discussions about the Bio-Formats library. Please look for and ask new questions at https://forum.image.sc/tags/bio-formats

If you are having trouble with image files, there is information about reporting bugs in the Bio-Formats documentation. Please send us the data and let us know what version of Bio-Formats you are using. For issues with your code, please provide a link to a public repository, ideally GitHub.

Re: Reading Canon cr2

Postby kinor » Thu Apr 19, 2012 5:10 pm

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
kinor
 
Posts: 15
Joined: Thu Mar 15, 2012 2:39 pm

Re: Reading Canon cr2

Postby kinor » Mon Apr 30, 2012 11:20 am

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
kinor
 
Posts: 15
Joined: Thu Mar 15, 2012 2:39 pm

Re: Reading Canon cr2

Postby mlinkert » Tue May 29, 2012 12:23 am

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
User avatar
mlinkert
Team Member
 
Posts: 353
Joined: Fri May 29, 2009 2:12 pm
Location: Southwest Wisconsin

Re: Reading Canon cr2

Postby kinor » Thu May 31, 2012 9:16 am

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
kinor
 
Posts: 15
Joined: Thu Mar 15, 2012 2:39 pm

Previous

Return to User Discussion [Legacy]

Who is online

Users browsing this forum: No registered users and 1 guest