We're Hiring!

Cr2 bit depth pimped? uint16 values restricted to 255

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.

Cr2 bit depth pimped? uint16 values restricted to 255

Postby noff » Fri Dec 13, 2013 6:53 pm

Hello Everyone!

I am working with RAW images from a Canon EOS Rebel XSi (also EOS 450D). The images of this camera are taken with a bit depth of 14 Bits, and stored into 16 Bits as usual. If I convert my pics to .Tiff images, I get my 16-Bit precision and everything is fine with my pics. If I try to load my raw Cr2 data into matlab with bfopen, I obtain uint16 variables without any error message, but they are all scaled from 0 to 255. It seems to me that there is some sort bug in the funcion, but we were not able to fix it so far.
Did anyone have this problem or knows how to help?

Thanks in advance.

Code: Select all
result = bfopen(path_of_file);

red   = result{1}{1,1};
green = result{1}{2,1};
blue  = result{1}{3,1};


Red, green and blue are my matrices with the values going from 0 to 255.
noff
 
Posts: 5
Joined: Fri Dec 13, 2013 5:53 pm

Re: Cr2 bit depth pimped? uint16 values restricted to 255

Postby sbesson » Sun Dec 15, 2013 8:10 pm

Hi,

First of all, could you tell us which version of Bio-Formats are you using? From the command prompt, the version number is returned by :

Code: Select all
>> disp(char(loci.formats.FormatTools.VERSION));


Could you please send one of the files that does not work properly so that we can fix the problem? You can upload the file to:

http://qa.openmicroscopy.org.uk/qa/upload/

Best regards,
Sebastien
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm

Re: Cr2 bit depth pimped? uint16 values restricted to 255

Postby noff » Mon Dec 16, 2013 8:48 am

Hello,

First of all, thanks for your quick answer, then to your questions:

sbesson wrote:could you tell us which version of Bio-Formats are you using?


Code: Select all
>> disp(char(loci.formats.FormatTools.VERSION));
4.4.9


sbesson wrote:Could you please send one of the files that does not work properly so that we can fix the problem?


I coldn't find the extension .cr2 in the uploader, so i renamed it as a .raw file.
The name of the file is IMG_4689 - Copy.raw and the ID is 7778 (please mind that it is a .cr2 file, only renamed as a .raw).

Regards,
nico
noff
 
Posts: 5
Joined: Fri Dec 13, 2013 5:53 pm

Re: Cr2 bit depth pimped? uint16 values restricted to 255

Postby sbesson » Mon Dec 16, 2013 3:03 pm

Thanks Nico,

we received the files and will be in touch with you soon regarding this issue.

Sebastien
User avatar
sbesson
Team Member
 
Posts: 421
Joined: Tue Feb 28, 2012 7:20 pm

Re: Cr2 bit depth pimped? uint16 values restricted to 255

Postby mlinkert » Mon Dec 16, 2013 10:10 pm

Hi Nico,

Thank you for uploading a file. We now have a ticket for this on our issue tracking system:

https://trac.openmicroscopy.org.uk/ome/ticket/11847

You have been CC'd on the ticket, and so will receive an automated email each time the ticket is updated. If you prefer not to receive updates, please let us know.

Regards,
-Melissa
User avatar
mlinkert
Team Member
 
Posts: 353
Joined: Fri May 29, 2009 2:12 pm
Location: Southwest Wisconsin

Re: Cr2 bit depth pimped? uint16 values restricted to 255

Postby noff » Mon Jan 06, 2014 2:41 pm

Hi everyone,
one of the links in the tickets is not available,
https://www.openmicroscopy.org/qa2/qa2/ ... back/7778/

Also the explanation given in the ticket sounds strange: with others viewing programs we obtain the full bit depth of the same image, only when opening it with the bioformats things go wrong
noff
 
Posts: 5
Joined: Fri Dec 13, 2013 5:53 pm

Re: Cr2 bit depth pimped? uint16 values restricted to 255

Postby jmoore » Mon Jan 06, 2014 3:16 pm

Proper URL is https://www.openmicroscopy.org/qa2/qa/feedback/7778/ I'll update the ticket.
~Josh
User avatar
jmoore
Site Admin
 
Posts: 1591
Joined: Fri May 22, 2009 1:29 pm
Location: Germany

Re: Cr2 bit depth pimped? uint16 values restricted to 255

Postby kinor » Wed Jan 31, 2018 4:15 pm

Dear all,
unfortunately the links are not available any more.

I still have Nicos issue:
the data from the canon cr2 file is read in a 16 bit container but the 16 bit tif exported by the canon Digital Photo Professional software shows a much better usage of the 14 bit.

Additionally the library always yields full Resolution for raw images with lower Resolution.

could this issue be fixed?

I downloaded the library on 18th jan 2018

Matlab gives
>> disp(char(loci.formats.FormatTools.VERSION));
4.4.12

With pleasure I would upload example files for any raw format and the export of the canon software to be compared by a script i'd provide as well.
thanks a lot in advance for any help
Norbert
kinor
 
Posts: 15
Joined: Thu Mar 15, 2012 2:39 pm

Re: Cr2 bit depth pimped? uint16 values restricted to 255

Postby dgault » Thu Feb 01, 2018 3:53 pm

Hi Norbert,

If you have a sample image, particularly one that displays the resolution issues that would be a great help for testing. You can upload the images to https://www.openmicroscopy.org/qa2/qa/upload/

David Gault
User avatar
dgault
Team Member
 
Posts: 208
Joined: Fri Aug 14, 2015 2:56 pm

Re: Cr2 bit depth pimped? uint16 values restricted to 255

Postby kinor » Mon Feb 05, 2018 8:54 am

Hi David,

thanks a lot for your help.
i uploaded 3 raw files with full raw, sraw1 and sraw2 which have their format in the filenames and similarly named tif files which were exported by the canon software.
I expect the data read by bfopen to be equal to the tif data in resolution and contained values. Would be very great if you could go a step forward here.

Many thanks in advance for your effort.

Best
Norbert
kinor
 
Posts: 15
Joined: Thu Mar 15, 2012 2:39 pm

Next

Return to User Discussion [Legacy]

Who is online

Users browsing this forum: Google [Bot] and 1 guest