SlideShare a Scribd company logo
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Basic Image Processing
(using ImageJ)
Dr. Arne Seitz
Swiss Institute of Technology (EPFL)
Faculty of Life Sciences
Head of BIOIMAGING AND OPTICS – BIOP
arne.seitz@epfl.ch
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Overview
• File formats (data storage)
• Programs for image viewing / processing /
representation
• Basic Image Processing (using ImageJ)
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Definition Digital image
• A digital image is a representation of a two-
dimensional image using ones and zeros (binary).
(Wikipedia)
• Analog = continuous values
• Digital = discrete steps
1
0
0
1
0
1
1 1
0 01
1 11
0 0
11 01 11 1
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Detection Devices
Array detector Point detector
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
File Formats – data storage
• Lossless image formats
• Lossy compression formats
• Custom formats (microscope companies)
• Sequence vs. single image per file
• 8bit, 12bit, 16bit, 32bit, RGB
Storage:
– Always have at least 1 copy of the data
– Very suitable fileservers (automatic backup)
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Lossless Image Formats
TIFF (with our without compression)
BMP (windows uncompressed)
GIF (graphics interchange format)
PNG (portable network graphics)
Raw data
‘text image’
Microscopy Primer
http://micro.magnet.fsu.edu/primer
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Image Format: TIFF
Tag Image File Format
– Image header with flexible set of ‘tags’ which can be used to
store e.g. microscopic settings
Flexible in color space and bit depth
– Microscopy: grayscale 8bit, 16 bit (12bit data)
– Color (e.g. Overlay): RGB (red green blue 8bit each)
– Quantification: 32bit (floating point values)
Always lossless: Uncompressed or compressed
Multiple images possible in one file
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Image Compression: TIFF
Run Length Coding (RLE): first number discribes the color, the second the
number of following pixels having the same color.
LZW (Lempel-Ziv-Welch): Find repetative patterns of values and give them a
number which is points to an entry of a „dictionary“ (LUT).
(0,0,0), 6 (0,255,0), 9 (0,0,0), 2 (255,0,0), 6
1 2 3
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Image Compression: TIFF
Pros:
Extra infos can be written in the ‚tags‘
(e.g. microscope data like objective lens, voxel size)
Everybody can read it
Lossless
Flexible (8, 16, 32bit grayscale, 8:8:8bit RGB)
Cons:
Big files
Compressed files can t be loaded by ImageJ
256
65536 graylevels
Floating point values
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Lossy Image Formats
The lossy compression algorithm takes advantage of the limitations
of the human visual senses and discards information that would
not be sensed by the eye.
(like mp3 in audio).
Compression level is usually flexible, but the more compressed the
more information is lost and artifacts become visible by eye
From: www.wikipedia.org
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Image Compression: JPG
Split image into color and gray-scale information (color is less important than bounderies)
 reduce high frequency color information.
Group pixel into 8x8 blocks and transform through discrete cosine transform…
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Image Compression: JPG
Pros:
Small Files
True Color
Usable for most photos (real life) and
presentations (powerpoint)
Cons:
Do not use for quantification !
„Unrelevant“ photoinfos get lost
Every file-saving reduces the quality
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Image Viewers
ImageJ (Java based, freeware, Win/MAC/Linux)
Irfanview (www.irfanview.com/)
– Freeware
– Convert (e.g. tif  jpg)
– Batch processing
ACDSee (ACD Systems)
Microscope companies
– Zeiss Image Browser / Axiovision LE
– Leica LCS Lite
– Olympus Viewer
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Image Representation
ImageJ
Imaris (Bitplane):
– 4 floating licenses
– installed on image processing workstations
Photoshop, Paintshop, Illustrator, Corel Draw
(, Powerpoint)
Volocity (Improvision):
Custom software of microscopes
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Image Processing
ImageJ
(http://rsb.info.nih.gov/ij/index.html)
– installed on all image processing workstations
– Installation: http://pacific.mpi-cbg.de/wiki/index.php
(Fiji=ImageJ+plugins+regular update)
– Manual: www.uhnresearch.ca/facilities/wcif/imagej/
(also available as pdf)
– Additional plugins: http://rsb.info.nih.gov/ij/plugins/index.html
Metamorph (Universal Imaging),
– installed on 2 image processing workstations
Custom software of microscopes
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Image Processing Basics
Visual Image Inspection
Lookup tables (LUT) and LUT operations
Histogram, brightness, contrast
Filter
Threshold
Measurements
Color functions
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Visual Image Inspection
Displaying images, histogram
Microscopy Primer
http://micro.magnet.fsu.edu/primer
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Visual Image Inspection
Displaying images, histogram
Intensity value
Pixelcount
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
LUT operations
Lookup table (LUT)
– Displays can only show 256 gray values (8bit) per color
– Data is unchanged, it s only “mapped” differently
Data
Intensity
Displayed
Intensity
0 0
… …
179 0
180 5
181 10
… …
226
227
228 255
229 255
65535 255
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Brightness, Contrast
Contrast is the difference in
visual properties that makes
an object distinguishable
from other objects
and the background.Caution: Apply modifies the data!
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Color LUT
The pixel contains a „pointer“ to an array, where the actual pixel
values are stored
old LUT:
1: (0,102,255)
2: (51,102,255
3: (10,100,200)
1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 1 1 3 3 3 3 3 3
1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 1 1 3 3 3 3 3 3
new LUT:
1: (0,0,0)
2: (0,255,0)
3: (255,0,0)
“HiLo” LUT
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Color LUT
The pixel contains a „pointer“ to an array, where the actual pixel
values are stored
old LUT:
1: (0,102,255)
2: (51,102,255
3: (10,100,200)
1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 1 1 3 3 3 3 3 3
1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 1 1 3 3 3 3 3 3
new LUT:
1: (0,0,0)
2: (0,255,0)
3: (255,0,0)
“Rainbow” LUT
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Non-linear Histogram Stretch
Enhance contrast by (changing data):
Raw data
“Equalization” non-linear stretch
based on square root of the intensity
Linear stretch
“Normalization”
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Equalization
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Gamma
Gamma is a non-linear histogram adjustment
8 bit images:
New intensity = 255 [(old intensity/255) gamma]
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Filtering
Image processing filters are mainly used to:
– suppress the high frequencies in the image, i.e. smoothing
the image, noise reduction
– or suppress the low frequencies, i.e. enhancing or
detecting edges in the image
An image can be filtered either in the frequency or in
the spatial domain.
– Filtering in the frequency domain requires Fourier
transform first and re-transformation after application of
the filter.
– Filtering in the spatial domain is done by convolving the
image with the filterfunction.
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Filtering
Shifting and multiplying a filter kernel
Filtered image
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Noise Reduction: Mean
mean
Mean 1pt
1
9
1
9
1
9
1
9
1
9
1
9
1
9
1
9
1
9
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Noise Reduction: Gaussian
Filtering with a gaussian
bell-shaped kernel:
1 2 1
2 4 2
1 2 1
1
16
10 25 3
9 33 5
4 6 8
10 50 3
18 132 10
4 12 8
1
16
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Noise Reduction: Median
median
Median 3x3
Median 5x5
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Noise Reduction: Median, Mean
Median, 1pt
Mean, 1pt
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Median-, Mean-, Max-, Min-Filter
Median, 5pt Mean, 5pt
Min, 2pt Max, 2pt
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Mean-, Gauss-Filter
Mean, 2pt, 4 pt Gauss, 2pt, 4 pt
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Mean-, Median-Filter
Mean, 2pt, 4 pt Median, 2pt, 4 pt
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Min-, Max-Filter
Min, 2pt Max, 2pt
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Sharpen / Blur
-1 -1 -1
-1 9 -1
-1 -1 -1
sharpen
1 1 1
1 2 1
1 1 1
blurring
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Example:
Edge-Finding with derivatives
-1 -1 -1
0 0 0
1 1 1
-1 -1 -1
0 1 0
1 1 1
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Background Subtraction
Even background:
– subtract average background from image
Subtract “background image”
(same exposure time without illumination)
Uneven background: Rolling ball filter
– Use kernel larger than diameter of largest object
Original Image
“Opening”
Original Image - Opening
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Line Profile
Without background subtraction
After rolling ball (50) background subtraction
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Thresholding
Thresholding is used to change pixel values above or below a
certain intensity value (threshold):
Threshholding is a simple
method for Segmentation
(separation and location
of objects of interest)
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Measuring Sizes
Set Scale with pixel (voxel) size
Include Scalebar
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Measuring Length
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Area Measurement
16bit image 32bit image 32bit image,
background thresholded
to “Not a Number”
16bit image,
same threshold
as in 32bit image
but not applied
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Analyze Particles
Segmented objects
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Threshold and Opening/Closing
dilate erode
Closing: Dilate/Erode
Opening: Erode/Dilate
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Color Functions
RGB Merge /RGB Split
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Effects causing Image degradation:
Noise
– Signal derived noise
– Noise emerging from the digital imaging system
Scatter
– Caused by heterogeneous refractive index (RI)
Glare
– Random disturbance of light in the system
Blur
Deconvolution
From Object to Image
Object Image
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Point Spread Function (PSF)
A Point Spread Function is
the 3D diffraction pattern
of a “point” source of light.
Widefield = hourglass shape
Confocal = American Football
shape
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Convolution of an Object
Object can be referred as
accumulation of points
Each point is visible as a PSF
Image process hast to be
- Linear
- Shift invariant
Convolution is in principle a
reversible mathematical
equation
Object  PSF = Image
 = convolution
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Constrained Iterative
Constrained:
“Nonnegativity”
Smoothing or regularization to suppress noise amplification
Iterative:
Best estimate is found in a successional serial of calculations.
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Different Algorithms…
…lead to different Results
Huygens: CMLE 30 It
AutoQuant: Blind 15 It
SoftWorx: 30 It
raw data AutoQuant: non blind 15 It
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
0
1000
2000
3000
4000
5000
6000
7000
0
200
400
600
800
1000
1200
1400
AQ_blind_15It_thPSF not deconvolved
Signal improvement
Higher signal to
background ratio
More distinct peaks
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
WF Deconvolution
Computational substraction of blur
or reassignment to the assumed source
Advantages:
– Good light efficiency (esp. with reassignment)
– CCD instead of PMT (high Quantum efficiency)
– Fast stack recording possible  low bleaching
Disadvantages:
– Need for high computational systems
– Artefacts can not be excluded
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
WF Decon vs. Confocal
To deconvolve or not to deconvolve
That is not the question:
 WF + Deconvolution is no
real alternative to Confocal
pictures as they can also be
deconvolved
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
Conclusions
• Keep environment constant and convenient
• Use powerful dyes
• Think about required resolution
(x, y, z, t, brightness, channel number) to minimize
photostress
• Use appropriate microscopy method
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
• Use lossless file formats for archiving important data
• Image processing is an important step in generating
(optimal) results
• Only use documented image processing
steps/routines
Summary
Dr. Arne Seitz
PT-BIOP course, Image Processing, EPFL 2010
BioImaging &Optics Platform
More about image processing
1. Lecture
M. Unser, EPFL
see also website: http://bigwww.epfl.ch/
2. Books
a) W. Burger, M. J. Burge
Digital Image Processing, Springer 2008
b) J. C. Russ
The image processing Handbook, CRC Press 2007
3. PT-BIOP
EPFL, SV-AI 0241, SV-AI 0140
http://biop.epfl.ch/

More Related Content

PDF
Introduction to Digital Image Processing Using MATLAB
PPS
Image Processing Basics
PDF
Digital Image Processing and gis software systems
PDF
Digital Image Processing
PPT
Image Processing
PDF
Introduction of image processing
PPTX
Dip review
PPTX
BASICS OF DIGITAL IMAGE PROCESSING,MARIA PETROU
Introduction to Digital Image Processing Using MATLAB
Image Processing Basics
Digital Image Processing and gis software systems
Digital Image Processing
Image Processing
Introduction of image processing
Dip review
BASICS OF DIGITAL IMAGE PROCESSING,MARIA PETROU

What's hot (20)

PDF
Image processing with matlab
PPT
Introduction to digital image processing
DOCX
image compression using matlab project report
PDF
Image Processing
PPTX
Basic image processing techniques
PDF
IMAGE PROCESSING - MATHANKUMAR.S - VMKVEC
PPTX
Coin recognition using matlab
PPTX
Digital Image Processing
PPTX
Introduction in Image Processing Matlab Toolbox
PDF
Digital image processing using matlab
PDF
Image compression using discrete wavelet transform
PPTX
Digital image processing
PPT
An Introduction to Image Processing and Artificial Intelligence
PPTX
Digital image processing
PPTX
Introduction to Digital Image Processing
PDF
Machine learning in image processing
PDF
Image processing fundamentals
PPTX
Image processing and compression techniques
PDF
Basics of Image processing
PDF
01 introduction image processing analysis
Image processing with matlab
Introduction to digital image processing
image compression using matlab project report
Image Processing
Basic image processing techniques
IMAGE PROCESSING - MATHANKUMAR.S - VMKVEC
Coin recognition using matlab
Digital Image Processing
Introduction in Image Processing Matlab Toolbox
Digital image processing using matlab
Image compression using discrete wavelet transform
Digital image processing
An Introduction to Image Processing and Artificial Intelligence
Digital image processing
Introduction to Digital Image Processing
Machine learning in image processing
Image processing fundamentals
Image processing and compression techniques
Basics of Image processing
01 introduction image processing analysis
Ad

Viewers also liked (12)

PDF
基礎影像處理
PDF
TESTIMAGES - a large-scale archive for testing visual devices and basic image...
PDF
Basics of Image Processing using MATLAB
PPT
Digital image processing using matlab (fundamentals)
PDF
Information visualization: information dashboards
PPTX
Image proceesing with matlab
PPT
Automatic speech recognition
PPTX
Face recognition using neural network
PPTX
Image processing ppt
PPT
Speech recognition
PPT
Voice Recognition
PPT
Digital Image Processing
基礎影像處理
TESTIMAGES - a large-scale archive for testing visual devices and basic image...
Basics of Image Processing using MATLAB
Digital image processing using matlab (fundamentals)
Information visualization: information dashboards
Image proceesing with matlab
Automatic speech recognition
Face recognition using neural network
Image processing ppt
Speech recognition
Voice Recognition
Digital Image Processing
Ad

Similar to Basic image processing (20)

PDF
Biomedical Engineering (Medical Equipment's) - Mathankumar.S - VMKVC, SALEM,...
PDF
Desktop Spectrophotometer
PPTX
Integrerad verksamhetsstyrning på Saint Gobain Ecophon - IBM Smarter Business...
PDF
Fluorescence Scanner & Analysis-OptraSCAN
PPT
Man and Cameraman: Digitisation
PPTX
Biofield Viewer 3.0 Holistic integration 2014/5
PPT
Lecture 1 introduction
PDF
AI%20for%20Entomologists
PDF
AI%20for%20Entomologists
PDF
Lecture-1-2-+(1).pdf
PDF
Lecture-1-2-+(1).pdf
PPTX
computed and digital radiography(2)
PDF
Strengthen Fuzzy Pronouncement for Impulse Noise Riddance Method for Images B...
PPTX
Data representation
PDF
iRiS brochure_v0.2_150126
PPTX
Introduction_____to______ OpenCV___.pptx
PPT
Biopython
PPT
Next generation image compression standards: JPEG XR and AIC
PPT
Automated Face Detection System
Biomedical Engineering (Medical Equipment's) - Mathankumar.S - VMKVC, SALEM,...
Desktop Spectrophotometer
Integrerad verksamhetsstyrning på Saint Gobain Ecophon - IBM Smarter Business...
Fluorescence Scanner & Analysis-OptraSCAN
Man and Cameraman: Digitisation
Biofield Viewer 3.0 Holistic integration 2014/5
Lecture 1 introduction
AI%20for%20Entomologists
AI%20for%20Entomologists
Lecture-1-2-+(1).pdf
Lecture-1-2-+(1).pdf
computed and digital radiography(2)
Strengthen Fuzzy Pronouncement for Impulse Noise Riddance Method for Images B...
Data representation
iRiS brochure_v0.2_150126
Introduction_____to______ OpenCV___.pptx
Biopython
Next generation image compression standards: JPEG XR and AIC
Automated Face Detection System

More from Jay Thakkar (8)

PDF
Memory error-talk
PDF
Mongo db m101j
PPTX
Exploring-javafx-3d
PDF
O pening Files w ith LOCI Bio - Formats
PDF
Talk 8-Kevin-Imagej2
PPT
Architectural Design
DOC
Learn Java 3D
PPT
Dicom standard-of-china 2011-03
Memory error-talk
Mongo db m101j
Exploring-javafx-3d
O pening Files w ith LOCI Bio - Formats
Talk 8-Kevin-Imagej2
Architectural Design
Learn Java 3D
Dicom standard-of-china 2011-03

Recently uploaded (20)

PPTX
Digital-Transformation-Roadmap-for-Companies.pptx
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PPTX
sap open course for s4hana steps from ECC to s4
PDF
Agricultural_Statistics_at_a_Glance_2022_0.pdf
PPTX
Cloud computing and distributed systems.
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Machine learning based COVID-19 study performance prediction
PDF
Spectral efficient network and resource selection model in 5G networks
PPTX
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
PDF
MIND Revenue Release Quarter 2 2025 Press Release
PDF
Encapsulation theory and applications.pdf
PPT
Teaching material agriculture food technology
PDF
Diabetes mellitus diagnosis method based random forest with bat algorithm
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Empathic Computing: Creating Shared Understanding
PPT
“AI and Expert System Decision Support & Business Intelligence Systems”
PPTX
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
PDF
Review of recent advances in non-invasive hemoglobin estimation
Digital-Transformation-Roadmap-for-Companies.pptx
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
sap open course for s4hana steps from ECC to s4
Agricultural_Statistics_at_a_Glance_2022_0.pdf
Cloud computing and distributed systems.
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
MYSQL Presentation for SQL database connectivity
Machine learning based COVID-19 study performance prediction
Spectral efficient network and resource selection model in 5G networks
Effective Security Operations Center (SOC) A Modern, Strategic, and Threat-In...
MIND Revenue Release Quarter 2 2025 Press Release
Encapsulation theory and applications.pdf
Teaching material agriculture food technology
Diabetes mellitus diagnosis method based random forest with bat algorithm
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Empathic Computing: Creating Shared Understanding
“AI and Expert System Decision Support & Business Intelligence Systems”
ACSFv1EN-58255 AWS Academy Cloud Security Foundations.pptx
Review of recent advances in non-invasive hemoglobin estimation

Basic image processing

  • 1. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Basic Image Processing (using ImageJ) Dr. Arne Seitz Swiss Institute of Technology (EPFL) Faculty of Life Sciences Head of BIOIMAGING AND OPTICS – BIOP arne.seitz@epfl.ch
  • 2. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Overview • File formats (data storage) • Programs for image viewing / processing / representation • Basic Image Processing (using ImageJ)
  • 3. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Definition Digital image • A digital image is a representation of a two- dimensional image using ones and zeros (binary). (Wikipedia) • Analog = continuous values • Digital = discrete steps 1 0 0 1 0 1 1 1 0 01 1 11 0 0 11 01 11 1
  • 4. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Detection Devices Array detector Point detector
  • 5. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform File Formats – data storage • Lossless image formats • Lossy compression formats • Custom formats (microscope companies) • Sequence vs. single image per file • 8bit, 12bit, 16bit, 32bit, RGB Storage: – Always have at least 1 copy of the data – Very suitable fileservers (automatic backup)
  • 6. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Lossless Image Formats TIFF (with our without compression) BMP (windows uncompressed) GIF (graphics interchange format) PNG (portable network graphics) Raw data ‘text image’ Microscopy Primer http://micro.magnet.fsu.edu/primer
  • 7. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Image Format: TIFF Tag Image File Format – Image header with flexible set of ‘tags’ which can be used to store e.g. microscopic settings Flexible in color space and bit depth – Microscopy: grayscale 8bit, 16 bit (12bit data) – Color (e.g. Overlay): RGB (red green blue 8bit each) – Quantification: 32bit (floating point values) Always lossless: Uncompressed or compressed Multiple images possible in one file
  • 8. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Image Compression: TIFF Run Length Coding (RLE): first number discribes the color, the second the number of following pixels having the same color. LZW (Lempel-Ziv-Welch): Find repetative patterns of values and give them a number which is points to an entry of a „dictionary“ (LUT). (0,0,0), 6 (0,255,0), 9 (0,0,0), 2 (255,0,0), 6 1 2 3
  • 9. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Image Compression: TIFF Pros: Extra infos can be written in the ‚tags‘ (e.g. microscope data like objective lens, voxel size) Everybody can read it Lossless Flexible (8, 16, 32bit grayscale, 8:8:8bit RGB) Cons: Big files Compressed files can t be loaded by ImageJ 256 65536 graylevels Floating point values
  • 10. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Lossy Image Formats The lossy compression algorithm takes advantage of the limitations of the human visual senses and discards information that would not be sensed by the eye. (like mp3 in audio). Compression level is usually flexible, but the more compressed the more information is lost and artifacts become visible by eye From: www.wikipedia.org
  • 11. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Image Compression: JPG Split image into color and gray-scale information (color is less important than bounderies)  reduce high frequency color information. Group pixel into 8x8 blocks and transform through discrete cosine transform…
  • 12. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Image Compression: JPG Pros: Small Files True Color Usable for most photos (real life) and presentations (powerpoint) Cons: Do not use for quantification ! „Unrelevant“ photoinfos get lost Every file-saving reduces the quality
  • 13. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Image Viewers ImageJ (Java based, freeware, Win/MAC/Linux) Irfanview (www.irfanview.com/) – Freeware – Convert (e.g. tif  jpg) – Batch processing ACDSee (ACD Systems) Microscope companies – Zeiss Image Browser / Axiovision LE – Leica LCS Lite – Olympus Viewer
  • 14. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Image Representation ImageJ Imaris (Bitplane): – 4 floating licenses – installed on image processing workstations Photoshop, Paintshop, Illustrator, Corel Draw (, Powerpoint) Volocity (Improvision): Custom software of microscopes
  • 15. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Image Processing ImageJ (http://rsb.info.nih.gov/ij/index.html) – installed on all image processing workstations – Installation: http://pacific.mpi-cbg.de/wiki/index.php (Fiji=ImageJ+plugins+regular update) – Manual: www.uhnresearch.ca/facilities/wcif/imagej/ (also available as pdf) – Additional plugins: http://rsb.info.nih.gov/ij/plugins/index.html Metamorph (Universal Imaging), – installed on 2 image processing workstations Custom software of microscopes
  • 16. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Image Processing Basics Visual Image Inspection Lookup tables (LUT) and LUT operations Histogram, brightness, contrast Filter Threshold Measurements Color functions
  • 17. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Visual Image Inspection Displaying images, histogram Microscopy Primer http://micro.magnet.fsu.edu/primer
  • 18. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Visual Image Inspection Displaying images, histogram Intensity value Pixelcount
  • 19. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform LUT operations Lookup table (LUT) – Displays can only show 256 gray values (8bit) per color – Data is unchanged, it s only “mapped” differently Data Intensity Displayed Intensity 0 0 … … 179 0 180 5 181 10 … … 226 227 228 255 229 255 65535 255
  • 20. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Brightness, Contrast Contrast is the difference in visual properties that makes an object distinguishable from other objects and the background.Caution: Apply modifies the data!
  • 21. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Color LUT The pixel contains a „pointer“ to an array, where the actual pixel values are stored old LUT: 1: (0,102,255) 2: (51,102,255 3: (10,100,200) 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 1 1 3 3 3 3 3 3 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 1 1 3 3 3 3 3 3 new LUT: 1: (0,0,0) 2: (0,255,0) 3: (255,0,0) “HiLo” LUT
  • 22. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Color LUT The pixel contains a „pointer“ to an array, where the actual pixel values are stored old LUT: 1: (0,102,255) 2: (51,102,255 3: (10,100,200) 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 1 1 3 3 3 3 3 3 1 1 1 1 1 1 2 2 2 2 2 2 2 2 2 1 1 3 3 3 3 3 3 new LUT: 1: (0,0,0) 2: (0,255,0) 3: (255,0,0) “Rainbow” LUT
  • 23. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Non-linear Histogram Stretch Enhance contrast by (changing data): Raw data “Equalization” non-linear stretch based on square root of the intensity Linear stretch “Normalization”
  • 24. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Equalization
  • 25. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Gamma Gamma is a non-linear histogram adjustment 8 bit images: New intensity = 255 [(old intensity/255) gamma]
  • 26. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Filtering Image processing filters are mainly used to: – suppress the high frequencies in the image, i.e. smoothing the image, noise reduction – or suppress the low frequencies, i.e. enhancing or detecting edges in the image An image can be filtered either in the frequency or in the spatial domain. – Filtering in the frequency domain requires Fourier transform first and re-transformation after application of the filter. – Filtering in the spatial domain is done by convolving the image with the filterfunction.
  • 27. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Filtering Shifting and multiplying a filter kernel Filtered image
  • 28. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Noise Reduction: Mean mean Mean 1pt 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9 1 9
  • 29. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Noise Reduction: Gaussian Filtering with a gaussian bell-shaped kernel: 1 2 1 2 4 2 1 2 1 1 16 10 25 3 9 33 5 4 6 8 10 50 3 18 132 10 4 12 8 1 16
  • 30. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Noise Reduction: Median median Median 3x3 Median 5x5
  • 31. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Noise Reduction: Median, Mean Median, 1pt Mean, 1pt
  • 32. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Median-, Mean-, Max-, Min-Filter Median, 5pt Mean, 5pt Min, 2pt Max, 2pt
  • 33. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Mean-, Gauss-Filter Mean, 2pt, 4 pt Gauss, 2pt, 4 pt
  • 34. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Mean-, Median-Filter Mean, 2pt, 4 pt Median, 2pt, 4 pt
  • 35. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Min-, Max-Filter Min, 2pt Max, 2pt
  • 36. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Sharpen / Blur -1 -1 -1 -1 9 -1 -1 -1 -1 sharpen 1 1 1 1 2 1 1 1 1 blurring
  • 37. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Example: Edge-Finding with derivatives -1 -1 -1 0 0 0 1 1 1 -1 -1 -1 0 1 0 1 1 1
  • 38. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Background Subtraction Even background: – subtract average background from image Subtract “background image” (same exposure time without illumination) Uneven background: Rolling ball filter – Use kernel larger than diameter of largest object Original Image “Opening” Original Image - Opening
  • 39. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Line Profile Without background subtraction After rolling ball (50) background subtraction
  • 40. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Thresholding Thresholding is used to change pixel values above or below a certain intensity value (threshold): Threshholding is a simple method for Segmentation (separation and location of objects of interest)
  • 41. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Measuring Sizes Set Scale with pixel (voxel) size Include Scalebar
  • 42. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Measuring Length
  • 43. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Area Measurement 16bit image 32bit image 32bit image, background thresholded to “Not a Number” 16bit image, same threshold as in 32bit image but not applied
  • 44. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Analyze Particles Segmented objects
  • 45. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Threshold and Opening/Closing dilate erode Closing: Dilate/Erode Opening: Erode/Dilate
  • 46. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Color Functions RGB Merge /RGB Split
  • 47. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Effects causing Image degradation: Noise – Signal derived noise – Noise emerging from the digital imaging system Scatter – Caused by heterogeneous refractive index (RI) Glare – Random disturbance of light in the system Blur Deconvolution From Object to Image Object Image
  • 48. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Point Spread Function (PSF) A Point Spread Function is the 3D diffraction pattern of a “point” source of light. Widefield = hourglass shape Confocal = American Football shape
  • 49. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Convolution of an Object Object can be referred as accumulation of points Each point is visible as a PSF Image process hast to be - Linear - Shift invariant Convolution is in principle a reversible mathematical equation Object  PSF = Image  = convolution
  • 50. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Constrained Iterative Constrained: “Nonnegativity” Smoothing or regularization to suppress noise amplification Iterative: Best estimate is found in a successional serial of calculations.
  • 51. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Different Algorithms… …lead to different Results Huygens: CMLE 30 It AutoQuant: Blind 15 It SoftWorx: 30 It raw data AutoQuant: non blind 15 It
  • 52. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform 0 1000 2000 3000 4000 5000 6000 7000 0 200 400 600 800 1000 1200 1400 AQ_blind_15It_thPSF not deconvolved Signal improvement Higher signal to background ratio More distinct peaks
  • 53. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform WF Deconvolution Computational substraction of blur or reassignment to the assumed source Advantages: – Good light efficiency (esp. with reassignment) – CCD instead of PMT (high Quantum efficiency) – Fast stack recording possible  low bleaching Disadvantages: – Need for high computational systems – Artefacts can not be excluded
  • 54. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform WF Decon vs. Confocal To deconvolve or not to deconvolve That is not the question:  WF + Deconvolution is no real alternative to Confocal pictures as they can also be deconvolved
  • 55. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform Conclusions • Keep environment constant and convenient • Use powerful dyes • Think about required resolution (x, y, z, t, brightness, channel number) to minimize photostress • Use appropriate microscopy method
  • 56. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform • Use lossless file formats for archiving important data • Image processing is an important step in generating (optimal) results • Only use documented image processing steps/routines Summary
  • 57. Dr. Arne Seitz PT-BIOP course, Image Processing, EPFL 2010 BioImaging &Optics Platform More about image processing 1. Lecture M. Unser, EPFL see also website: http://bigwww.epfl.ch/ 2. Books a) W. Burger, M. J. Burge Digital Image Processing, Springer 2008 b) J. C. Russ The image processing Handbook, CRC Press 2007 3. PT-BIOP EPFL, SV-AI 0241, SV-AI 0140 http://biop.epfl.ch/