imaging - mcgill university · · 2009-07-10what is a digital image? digital image: an image is a...
TRANSCRIPT
© 2002 IBM Corporation
Micro & Nanobioengineering Lab
Biomedical Engineering Department
McGill University
| McGill, Nov 2005
[email protected]/djgroup
Imaging
Cecile M. Perrault
Imaging
Viewing Recording Enhancing Using
Importance of
bit depth,
pixel binning
File format
Brightness
Constrast
Colors Guidelines
What Is A Digital Image?
Digital Image: An image is a numerical representation of a
“picture”.
A set of numbers interpreted by the computer which creates a visual representation that is understood by humans.
255 255 199143 97 18732 12 3423 22 11
244 198 179123 94 19532 43 5213 32 11
253 217 23468 185 9713 12 2711 14 26
Courtesy of Nick Beavers, Application Specialist, Media Cybernetics
Image: Pixel Array
Pixels are identified by their position in a grid (two dimensional array), referenced by its row (x), and column (y).
Pixel = Picture Element
Courtesy of Nick Beavers, Application Specialist, Media Cybernetics
Binary Digits (bits)
Bitonal
0 = Black1 = White
Courtesy of Nick Beavers, Application Specialist, Media Cybernetics
What is bit-depth?Bit Depth: Is determined by the number of bits used to define each pixel. The
greater the bit depth, the greater the number of tones (grayscale or color)
that can be represented.
Courtesy of Nick Beavers, Application Specialist, Media Cybernetics
Bits Tones Binary Digits Array
1 bit (21) 2 tones
(0 – 1)
0 or 1
2 bits (22) 4 tones
(0 – 3)
00, 01, 10, 11
3 bits (23) 8 tones
(0 – 7)
000, 001, 010, 011, 100,
101, 110, 111
4 bits (24) 16 tones
(0 – 15)
0000, 0001, 0010, 0100,
1000, 0011, 0101, 1001,
1010, 0111, 1011, 1100,
1101, 1110, 1111, 0110
What is bit-depth?
Bit Depth: Is determined by the number of bits used to define each pixel. The
greater the bit depth, the greater the number of tones (grayscale or color)
that can be represented.
12 bit: 4096 levels (0-4095)16 bit: 65536 levels (0-65535)
1 bit2 levels
2 bit4 levels
3 bit8 levels
4 bit16 levels
6 bit64 levels
8 bit256 levels
Courtesy of Claire Brown, McGill Imaging Facility
What is bit-depth?Bit Depth: Is determined by the number of bits used to define each pixel. The greater the bit depth,
the greater the number of tones (grayscale or color) that can be represented.
Courtesy of Claire Brown, McGill Imaging Facility
In the lab
Binning
Imaging pixels
Conversion 12 bits14 bits16 bits
2x2, 4x4Up to 8x8Up to 8x8
2560 x 1920 imaging pixels
1392 x 1040 imaging pixels
512 x 512 imaging pixels
StereomicroscopeConfocal
microscopeInverted
microscope
Pixel Binning
5 7 20 15
6 18 9 7
22 15 6 1
17 11 9 7
36 51
65 23
Courtesy of Claire Brown, McGill Imaging Facility
Pixel Binning
1x1
0.108 µm/pixel
2x2
0.216 µm/pixel
3x3
0.324 µm/pixel
4x4
0.432 µm/pixel
Different contrast and brightness
Same contrast and brightness
Courtesy of Claire Brown, McGill Imaging Facility
Pixel Binning
1x1
0.108 µm/pixel
2x2
0.216 µm/pixel
3x3
0.324 µm/pixel
4x4
0.432 µm/pixel
Same display settings
Different contrast and brightness
Courtesy of Claire Brown, McGill Imaging Facility
Imaging
Viewing Recording Enhancing Using
Importance of
bit depth,
pixel binning
File format
Brightness
Constrast
Colors Guidelines
Recording: what format ?
� JPEG (JPG): lossy format; supports 8 bits per color (R,G,B) for a 24 bit total.
� TIFF: lossless, saves up to 32 bits� PNG: lossless, saves up to 64 bits� GIF: lossless. limited to 8-bit palette. More effective
when large areas are single color.� BMP: uncompressed. Windows-proprietary file.
Save original pictures in TIFF or PNG. Only use JPG forfinal distribution
Imaging
Viewing Recording Enhancing Using
Importance of
bit depth,
pixel binning
File format
Brightness
Constrast
Colors Guidelines
Types of Imaging Software
Capture only or “driver” software: software used to capture and save an image from a device – developed mostly by hardware manufacturersExample: NIS Elements
“Imaging” software, Image Editing, Photo Retouching: software used primarily in home and general business applications, mostly consumer orientedExample: The GIMP (free and open source), Adobe PhotoShop, Microsoft Photo Editor, Image Tools
Basic Image Measurement Software: used for basic image capture, enhancement, with simple measuring toolsExample: Image-Pro Express
General Analytical Image Analysis Software: used in scientific/industrial analysis of images to generate proven dataExample: ImageJ, Image-Pro Plus, Morphometrics
Vertical Market Image Analysis Software: used to solve specific imaging problems in a related industryExample: Array-Pro
ImageJ
� Open source software developed by the NIH
� Widely used by the scientific community and offers a number of available plugins for extra applications ( cell counting, particle tracking ….)
� Download the original ImageJ at: http://rsbweb.nih.gov/ij/
� You also have the option to download the WCIF ImageJversion instead, which comes with a number of pluginsalready installed, useful with biological work: http://www.uhnres.utoronto.ca/facilities/wcif/fdownload.html
� The WCIF version has its own manual : http://www.uhnresearch.ca/facilities/wcif/PDF/ImageJ_Manual.pdf
Image Enhancement: Histogram
� A histogram is a plot of number of pixel for each tonal value
� The higher the bit depth, the better the dynamic range of the image
Black: 0White: 255 for 8-bit images
: 4095 for 12-bit images (2n –1) for n-bit images
Image Enhancement: Brightness
� Brightness: Overall amount of “light” in an image.� Brightness change adds/removes a constant value to all pixels� Shift right or left the histogram
Image Enhancement: Contrast
� Contrast: The degree of difference between the brightest and darkest components of the image.
� Adjusting the contrast expands or compresses the histogram around the midpoint value
Low Dynamic Range
Medium Contrast
Full Dynamic Range
HighContrast
Courtesy of Nick Beavers, Application Specialist, Media Cybernetics
Image Enhancement: Grey Value/ Histogram stretch
� Expands original input brightness values to make use of total range or sensitivity of output device
Image Enhancement: Colors
� Your image should start as a black and white image:
Should be
either
of those
Image Enhancement: Processing/Color Overlays� In ImageJ:
– Open each color image
– Choose “Image”, “Color”, “Merge Channels…”
Image Enhancement: Processing/Color Overlays� In ImageJ:
– Open each color image
– Choose “Image”, “Color”, “Merge Channels…”
– Assign a color to each image
Image Enhancement: Processing/Color Overlays� In ImageJ:
– Open each color image
– Choose “Image”, “Color”, “Merge Channels…”
– Assign a color to each image
– Press OK
Red
Green
Blue
Courtesy of Nick Beavers, Application Specialist, Media Cybernetics
Image Enhancement: Color Separation
Image Enhancement: Color Separation
� In ImageJ:
– Open image
– Select “Image”, “Color”, “Split Channels”
Image Enhancement: Color Separation
� In ImageJ:
– Open image
– Select “Image”, “Color”, “Split Channels”
Background Automatic flatten of
Background
Original
Courtesy of Nick Beavers, Application Specialist, Media Cybernetics
Image Enhancement: Shading Correction
Image Enhancement: Shading Correction
� In ImageJ:
– Open the image and its background
– Select “Process”, “Image Calculator…” (ensure that images are in 32-bit)
Image Enhancement: Shading Correction
� In ImageJ:
– Open the image and its background
– Select “Process”, “Image Calculator…” (ensure that images are in 32-bit)
– Divide the original image by its background
Image Enhancement: Shading Correction
� In ImageJ:
– Open the image and its background
– Select “Process”, “Image Calculator…” (ensure that images are in 32-bit)
– Divide the original image by its background
– Adjust Brightness
Imaging
Viewing Recording Enhancing Using
Importance of
bit depth,
pixel binning
File format
Brightness
Constrast
Colors Guidelines
Imaging Guidelines
� ALWAYS KEEP THE ORIGINAL PICTURE UNTOUCHED IN FILE
� Nature’s guideline: Processing (such as changing brightness and contrast) is appropriate only when it is applied equally across the entire image and is applied equally to controls.
� Wiki: http://wikisites.mcgill.ca/djgroup/index.php/Training:Imaging