Saving and opening image files

classic Classic list List threaded Threaded
4 messages Options
Matthew Pearson-3 Matthew Pearson-3
Reply | Threaded
Open this post in threaded view
|

Saving and opening image files

Search the CONFOCAL archive at http://listserv.acsu.buffalo.edu/cgi-bin/wa?S1=confocal
Hi everyone,

I was wondering if anyone can answer me a question about saving in different image based file formats.   We use a software program called Simple PCI in which you can save acquired images in different ways:

-All components- Will save a 3 channel merged image (48Bit TIFF)
-Colour Component- Will just save a single channel e.g. TRITC image (16Bit TIFF)
-Display Image- Saves whatever processing filters/annotations you have added to an image.

If I am only imaging 2 channels and save it as all components and then open it in Photoshop or windows image/fax viewer  the image appears much darker than the image saved within the acquisition software.  Yet if imaging 3 channels the image is equally as bright when opened in photoshop etc.  Does anyone know why there would be a discrepancy between software applications when only imaging 2 channels and saving as 'all components'?


I wonder if it because each component blue, green and red is a 16bit image to make a total 48bit tiff image, so if you only save a 2 channel image, that would presumably only be 32bits not 48 but why this manifests itself as a darker image i don't know.

Thanks in advance.

Matt.
Jerry Sedgewick-2 Jerry Sedgewick-2
Reply | Threaded
Open this post in threaded view
|

Re: Saving and opening image files

Search the CONFOCAL archive at
http://listserv.acsu.buffalo.edu/cgi-bin/wa?S1=confocal

Hi Matt,

My sense is that the 32 bit image contains 16 "empty" bits, or 8 empty
bits per
both channels.  The same phenomena occurs with 12 bit images that aren't
rescaled to 16-bits when these are saved (16-bit images with 12-bits of tonal
values, leaving 4 "0" bits), typical of images saved when using DVC camera
software.  The tonal values no longer fill the dynamic range--in fact, these
fall far short of it--leaving it up to the user to rescale.

Jerry

[hidden email]


Quoting Matthew Pearson <[hidden email]>:

> Search the CONFOCAL archive at
> http://listserv.acsu.buffalo.edu/cgi-bin/wa?S1=confocal
> Hi everyone,
>
> I was wondering if anyone can answer me a question about saving in
> different image based file formats.   We use a software program
> called Simple PCI in which you can save acquired images in different
> ways:
>
> -All components- Will save a 3 channel merged image (48Bit TIFF)
> -Colour Component- Will just save a single channel e.g. TRITC image
> (16Bit TIFF)
> -Display Image- Saves whatever processing filters/annotations you
> have added to an image.
>
> If I am only imaging 2 channels and save it as all components and
> then open it in Photoshop or windows image/fax viewer  the image
> appears much darker than the image saved within the acquisition
> software.  Yet if imaging 3 channels the image is equally as bright
> when opened in photoshop etc.  Does anyone know why there would be a
> discrepancy between software applications when only imaging 2
> channels and saving as 'all components'?
>
> I wonder if it because each component blue, green and red is a 16bit
> image to make a total 48bit tiff image, so if you only save a 2
> channel image, that would presumably only be 32bits not 48 but why
> this manifests itself as a darker image i don't know.
>
> Thanks in advance.
>
> Matt.
>
>  [hidden email]





--- Get FREE High Speed Internet from USFamily.Net! -- http://www.usfamily.net/mkt-freepromo.html ---
Chris Tully Chris Tully
Reply | Threaded
Open this post in threaded view
|

Re: Saving and opening image files

Search the CONFOCAL archive at http://listserv.acsu.buffalo.edu/cgi-bin/wa?S1=confocal Matt,

I am not particularly familiar with Simple PCI.  However, I do have over 16 years experience in digital image processing and analysis.

The problem you are facing is actually mostly software independent.  My guess is that you are using a 10, 12 or 14 bit camera, and that Simple PCI is saving the data in a 16 bits per channel (48 bit color) format to avoid loosing any data by down scaling it to 8 bits per channel (24 bit color).  Simple PCI as with most software that captures and handles data from higher than 8 bit cameras is automatically scaling the displayed image to only show as much of the stored data is is used by the camera.

This will make a little bit more sense if we translate from bits per channel to gray levels:
8 bits = 256 gray levels
10 bits = 1024 gray levels
12 bits = 4096 gray levels
14 bits = 16384 gray levels
16 bits = 65536 gray levels

Imagine saving 12 bits of data in a 16 bit format.  Any software that properly recognizes that there is really only 12 bits of data can clip the display at 4095.  However, software such as Photoshop or the Windows Picture and Fax viewer will not recognize this fact and will display the full 16 bits (or 65536 gray levels), thus making a 12 bit image appear very dark if not completely black.

The solution to this problem is to down scale any images that you wish to manipulate in Photoshop or similar programs to 8 bits per channel (24 bit color), either in the acquisition software or as the first step in processing the image in the secondary software.  In Photoshop you can adjust the display of the image using the Levels tool and then convert to 24 bit color.

Chris Tully


--
Chris Tully
Microscopy and Image Analysis Expert
[hidden email]
240-888-1021
http://www.linkedin.com/in/christully

On Tue, May 6, 2008 at 2:15 PM, Jerry Sedgewick <[hidden email]> wrote:
Hi Matt,

My sense is that the 32 bit image contains 16 "empty" bits, or 8 empty bits per
both channels.  The same phenomena occurs with 12 bit images that aren't
rescaled to 16-bits when these are saved (16-bit images with 12-bits of tonal
values, leaving 4 "0" bits), typical of images saved when using DVC camera
software.  The tonal values no longer fill the dynamic range--in fact, these
fall far short of it--leaving it up to the user to rescale.

Jerry

[hidden email]



Quoting Matthew Pearson <[hidden email]>:

Search the CONFOCAL archive at
http://listserv.acsu.buffalo.edu/cgi-bin/wa?S1=confocal
Hi everyone,

I was wondering if anyone can answer me a question about saving in
different image based file formats.   We use a software program
called Simple PCI in which you can save acquired images in different
ways:

-All components- Will save a 3 channel merged image (48Bit TIFF)
-Colour Component- Will just save a single channel e.g. TRITC image
(16Bit TIFF)
-Display Image- Saves whatever processing filters/annotations you
have added to an image.

If I am only imaging 2 channels and save it as all components and
then open it in Photoshop or windows image/fax viewer  the image
appears much darker than the image saved within the acquisition
software.  Yet if imaging 3 channels the image is equally as bright
when opened in photoshop etc.  Does anyone know why there would be a
discrepancy between software applications when only imaging 2
channels and saving as 'all components'?

I wonder if it because each component blue, green and red is a 16bit
image to make a total 48bit tiff image, so if you only save a 2
channel image, that would presumably only be 32bits not 48 but why
this manifests itself as a darker image i don't know.

Thanks in advance.

Matt.

 [hidden email]





--- Get FREE High Speed Internet from USFamily.Net! -- http://www.usfamily.net/mkt-freepromo.html ---



Julio Vazquez Julio Vazquez
Reply | Threaded
Open this post in threaded view
|

Re: Saving and opening image files

Search the CONFOCAL archive at http://listserv.acsu.buffalo.edu/cgi-bin/wa?S1=confocal
=
To Chris's comments, I would add this:

It is important to know how your specific software handles the conversion from high bit depth to 8-bit per channel. Most of the time, 8-bit per channel will be the final format; this includes the standard 24-bit RGB format that most color images are in (for instance, what you put in your powerpoint presentation, or what you submit for publication... these could be CMYK, but it's still 8-bit per channel)

When your acquisition device acquires data at more than 8-bit per channel, there is also a scaling going on just to display the image on your monitor, which most likely is a 24-bit RGB monitor. If your camera is giving you a 16-bit image with an actual intensity range from let's say 25 to 2047 (that you can find out by looking at the Histogram), you can set the software to "autoscale", where 25 becomes zero, or black, and 2047 becomes 255, or white (or green, etc...), which is what the monitor can display. But you can also set the software NOT to scale the image, in which case zero becomes zero, and 65,535 becomes 255 (or white) in the monitor scale. In that situation, your image will look very dark, because your highest intensity of 2047 in the original file will be displayed with an intensity of about 8 (2047/65535x255). This is why many 16-bit images look dark in Photoshop, because even though they are 16-bit files, they may not contain 16-bit data, but rather less. You can also set any arbitrary values to become zero and 255.

All this applies when you convert your high bit depth data to 24-bit RGB. The important point is that if you want to use the full dynamic range of your image, you should set the actual min and max values of your image to zero and 255 respectively when you convert. These values will generally be different for different images. On the other hand, if you want to preserve intensity relationships between images, you should use the same scaling for all of them. Otherwise, you start with very different images and end up with images that all look the same (intensity-wise). 

In Photoshop, for instance, if you open a 16-bit image, you can go to "Levels" and move the sliders on the left and right of the histogram. This will adjust the intensities of your displayed image. Then, when you convert your image to 8-bit, the left side value (and everything to its left) will be set to zero, and the right side value (and everything to its right) will be set to 255, and everything in between will be scaled linearly (assuming you leave the gamma value at 1.

I feel I need to stress these points because we often get people who come in tears to us and say: on the microscope, this sample was much brighter than this one, but now on my printed images they all look the same. The problem is, once you have converted your 16-bit data to 8-bit, you generally can't go back and revert to the original intensity values, and, unless you took very careful notes, you won't know how the conversion was done...  The safest thing to do, in my opinion, if you need to quantitate intensities, is to leave data in its original format and use software such as imagej that can perform quantitations on 16-bit (or other) data. Convert for making figures (and then, use the appropriate conversion method).


--
Julio Vazquez
Fred Hutchinson Cancer Research Center
Seattle, WA 98109-1024


=

On May 6, 2008, at 12:07 PM, Chris Tully wrote:

Search the CONFOCAL archive at http://listserv.acsu.buffalo.edu/cgi-bin/wa?S1=confocal Matt,

I am not particularly familiar with Simple PCI.  However, I do have over 16 years experience in digital image processing and analysis.

The problem you are facing is actually mostly software independent.  My guess is that you are using a 10, 12 or 14 bit camera, and that Simple PCI is saving the data in a 16 bits per channel (48 bit color) format to avoid loosing any data by down scaling it to 8 bits per channel (24 bit color).  Simple PCI as with most software that captures and handles data from higher than 8 bit cameras is automatically scaling the displayed image to only show as much of the stored data is is used by the camera.

This will make a little bit more sense if we translate from bits per channel to gray levels:
8 bits = 256 gray levels
10 bits = 1024 gray levels
12 bits = 4096 gray levels
14 bits = 16384 gray levels
16 bits = 65536 gray levels

Imagine saving 12 bits of data in a 16 bit format.  Any software that properly recognizes that there is really only 12 bits of data can clip the display at 4095.  However, software such as Photoshop or the Windows Picture and Fax viewer will not recognize this fact and will display the full 16 bits (or 65536 gray levels), thus making a 12 bit image appear very dark if not completely black.

The solution to this problem is to down scale any images that you wish to manipulate in Photoshop or similar programs to 8 bits per channel (24 bit color), either in the acquisition software or as the first step in processing the image in the secondary software.  In Photoshop you can adjust the display of the image using the Levels tool and then convert to 24 bit color.

Chris Tully


--
Chris Tully
Microscopy and Image Analysis Expert
[hidden email]
240-888-1021
http://www.linkedin.com/in/christully

On Tue, May 6, 2008 at 2:15 PM, Jerry Sedgewick <[hidden email]> wrote:
Hi Matt,

My sense is that the 32 bit image contains 16 "empty" bits, or 8 empty bits per
both channels.  The same phenomena occurs with 12 bit images that aren't
rescaled to 16-bits when these are saved (16-bit images with 12-bits of tonal
values, leaving 4 "0" bits), typical of images saved when using DVC camera
software.  The tonal values no longer fill the dynamic range--in fact, these
fall far short of it--leaving it up to the user to rescale.

Jerry

[hidden email]



Quoting Matthew Pearson <[hidden email]>:

Search the CONFOCAL archive at
http://listserv.acsu.buffalo.edu/cgi-bin/wa?S1=confocal
Hi everyone,

I was wondering if anyone can answer me a question about saving in
different image based file formats.   We use a software program
called Simple PCI in which you can save acquired images in different
ways:

-All components- Will save a 3 channel merged image (48Bit TIFF)
-Colour Component- Will just save a single channel e.g. TRITC image
(16Bit TIFF)
-Display Image- Saves whatever processing filters/annotations you
have added to an image.

If I am only imaging 2 channels and save it as all components and
then open it in Photoshop or windows image/fax viewer  the image
appears much darker than the image saved within the acquisition
software.  Yet if imaging 3 channels the image is equally as bright
when opened in photoshop etc.  Does anyone know why there would be a
discrepancy between software applications when only imaging 2
channels and saving as 'all components'?

I wonder if it because each component blue, green and red is a 16bit
image to make a total 48bit tiff image, so if you only save a 2
channel image, that would presumably only be 32bits not 48 but why
this manifests itself as a darker image i don't know.

Thanks in advance.

Matt.

 [hidden email]





--- Get FREE High Speed Internet from USFamily.Net! -- http://www.usfamily.net/mkt-freepromo.html ---