Image Qualite Debruitage
Image Qualite Debruitage
• DICOM -
Digital Image Communication in Medecine
• PACS -
Picture Archiving and communication system
• RAS -
Radiologist Aid System
3.6 Displays and Workstations
87
Fig. 3.15 A reading room as part of a PACS displays images on monitors ins
Active and passive components of the depicted system control the lighting
l
ospita permission of Planilux, Warstein, Germany)
H
ms in a
n Syste
Fig. 3.2 The departmental Radiology Information System o(RIS)
r
io
mat and the Picture Archiving Anotherand
problem is the limited spatial and contrast resolution o
I nf
Communication System (PACS) are responsible for organizing,
3.1 transferring and archiving image
contrast range of today’s TFT monitors is quite satisfactory, but m
and the influence from external lighting can reduce perceived image
data and image meta data fessional reading system will allow to control such influence (see
example).
The spatial resolution of a conventional monitor is about 2 meg
a digital radiograph may contain up to 4096 × 4096 pixels (=16 me
Hospital information systems evolved from the need to create a paperless admin- are few monitors that are able to display such a resolution. Henc
istration of inpatients and outpatients in a hospital. Development was initiated from reading station is much more expensive than a conventional TFT m
Furthermore, a reading room usually contains several light bo
the hospital administration and in many cases evolved from data base systems for to display several images at the same time. Using several monitor
a partial replacement since there will never be enough monitor sp
patient data administration. In early times, these systems were in-house adaptations many images as can be displayed on a big light box (see Fig. 3.15
of data base systems or completely locally developed solutions. With information and compare it to Fig. 3.14). A suitable user interface for switchin
has to make up for this deficiency.
stored in such a system being increasingly used for administrating and scheduling There are no legal standards for the display of digital radiograph o rksta
s, w t
ican College of Radiology (ACR) has developed some m
recommend
, me
services performed in patient stay, they have evolved into fully grown hospital in- 3 n s y s t e
g e s
distinguishes between the images used for sdiagnosis
q u i ima rmiss
itio er (interpretation
formation systems accessible by all departments of a hospital. for other purposes (clinical review, ac
teaching, d
en According
retc.). d pe to
f r o m t o k i n
agetos satisfy
quality should be sufficient ionneeds
ratthe iththe clinical circ
(wof
DICOM
• DICOM (.dcm)
• NIFTI (.nii)
• Analyze (.hdr .img)
• Gis (.ima .dim) -> France
• Minc (.mnc) -> Montreal Neurological Institute (MNI)
• Nrrd (.nrrd) -> USA
Repères de l’image
– Neurologique
(vue de haut - comme un chirurgien)
z (b - blue)
Repères
x (r - red)
y (g - green)
• Neurologique
– Droite à droite
(vue chirurgien)
• Radiologique
– Droite est à gauche
(vue du radiologue qui regarde une pellicule)
Plus de détails:
http://www.grahamwideman.com/gw/brain/orientation/orientterms.htm
Imagerie et axe des coupes
Coronal
Sagittal
Axial
Résolution
Pixel Voxel
“picture element” ‘’Volume element’’
93 Δy mm 93 Δy mm
Δx mm Δz mm
Δx mm
Exemple imagerie 3D
0.43mm
FLAIR 0.43mm
FLAIR
12
93
6 mm
0.43 mm
0.43 mm
Imagerie numérique 3D
• Acquisition anisotrope
• Souvent, Δx = Δy != Δz
(Δz >> résolution dans le plan)
• E.g. FLAIR, agent de contraste,
imagerie animale,
imagerie clinique
93
6 mm
0.43 mm
0.43 mm
Imagerie numérique 3D
• Acquisition isotrope
• Souvent, Δx = Δy = Δz
• E.g. T1 isotrope, IRM de diffusion, IRM
fonctionnelle
Δy mm
Δz mm
Δx mm
Volume partiel
• Grrrr....
• Effort de la communauté
mrtrix, nibabel (python package)
Information importante dans l’entête
************************************************
• Taille du voxel Image: "Rat Sprague-Dawley (LDS97-j18) [PT]"
************************************************
Format: DICOM
• Taille de l’image Dimensions:
Voxel size:
240 x 240 x 1
0.25 x 0.25 x 1.175
Dimension labels: 0. left->right (mm)
1. posterior->anterior (mm)
• Matrice de Data type:
2. inferior->superior (mm)
unsigned 16 bit integer (little endian)
transformation Data layout: [ -0 -1 +2 ]
Data scaling: offset = 0, multiplier = 2.06052e-06
Comments: Rat Sprague-Dawley (LDS97-j18) [PT]
DOS: 23/02/2010 12:20:00
• Type des données Transform: 1
0
0
1
0
0
-59.75
-59.75
0 0 1 0
0 0 0 1
Qualité de l’image
Améliorer la qualité d’image: comment?
• Égalisation d’histogramme
• Rehaussement de contours
• Débruitage
Contraste et résolution
CMichelson égaux
Occurrence
(# de pixels)
H(I)
normalized
• H(l)histogram Hpixels
représente le # de (l) is computed
normd’intensité l from H (l) by
H (l)
Hnorm (l) = !I .
max
k=Imin H (k)
MIP
MIP
M. Descoteaux et al. / Medical Image Analysis 12 (2008) 497–513
ration of the multi-scale geometric flow on a 256 ! 256 ! 68 MRA image. An MIP of the data is shown at the top left and t
fferent stages of the evolution from three seeds. The bottom right figure depicts an MIP of the input MRA data masked by th
Rehaussement de contraste
4.2.1 Contrast Enhancement
4.2.1 Contrast Enhancement
Some of the contrast enhancement techniques can be directly related to contrast
•measures
Linéaire (Demo)
described in the previous section. The simplest method increases global
Some of the contrast
contrast. enhancement
If the range techniques
of possible intensity can
values Imin to Ibe
max
directly
exceeds the related
range of to con
measures described
intensities fminintothe
fmaxprevious section.
, linear contrast The simplest
enhancement method
is carried out creatingincreases
new gl
ontrast. If•values
À l’aide
the grange d’une
from intensities fonction
of possiblef for every de transfert,
pixel
intensity byvalues I g(f)
min to Imax exceeds the rang
ntensities• fOnmin se to concentre
fmax , linear sur les intensités
!contrast Imax dans laisplage
" enhancement carried50 à
out creating
g(f ) = f − fmin + Imin . (4.12)
values g from 120intensities f for every pixel fmaxby− fmin
The function to map f on g is called the transfer function. Contrast enhancement
! wmin to w
in an arbitrary intensity window " max with
Imax Imin < wmin < wmax < Imax can
be achieved withg(f ) = transfer
a similar f − ffunction.
min As there may +pixels
be Imin .with values f (4
fmax − fmin
outside the window, (4.12) is changed to (see Fig. 4.6)
The function to map f on g is called the transfer
Imin ,
function.
if f < wmin , Contrast enhancem
n an arbitrary intensity
g(f ) = window
(f − wminw Imaxto w
) wmin −w Imin ,with
+max Imin
if wmin ≤ f<≤w max , < wmax < Imax
wmin
max min
be achieved with a similar Imaxtransfer
, function. As ifthere f > wmay
max . be pixels with valu
178 178 178 178 177 174 173 168 167 164 162 160 157 156 153 151 147 145 143 140 138 135 131 127 125 125 122
180 180 180 180 180 178 176 173 171 167 167 164 162 160 156 155 151 149 146 143 140 139 136 132 130 128 127
185 184 184 184 182 180 179 177 175 171 170 167 165 163 160 160 155 153 151 148 145 142 139 137 136 133 129
194 194 191 187 185 185 183 182 180 176 175 174 170 170 153 163 161 158 155 152 150 147 144 141 139 136 136
199 199 197 194 192 188 185 184 183 180 178 176 173 171 145 165 163 160 157 155 152 149 147 144 141 139 137
202 201 203 199 199 195 192 188 187 184 183 180 177 176 116 171 167 166 161 159 158 155 153 149 146 143 141
206 205 205 204 201 200 198 197 183 144 169 184 177 178 81 174 172 168 160 164 162 159 156 153 151 149 145
209 210 211 209 207 205 204 205 151 72 97 123 89 156 72 173 169 157 140 172 169 167 163 160 157 154 151
215 215 213 213 213 209 209 208 147 65 86 98 66 76 79 169 165 122 85 154 174 172 169 166 163 160 158
225 225 223 220 219 217 215 214 127 50 60 88 50 27 27 85 108 83 57 127 178 178 175 171 168 165 163
230 230 229 227 226 225 224 223 141 62 73 63 28 13 7 38 33 41 52 119 123 150 174 172 166 170 168
233 232 166 107 200 231 187 182 115 91 65 47 17 5 5 37 13 7 52 89 63 56 87 52 49 63 167
85 92 51 36 47 60 42 39 36 12 5 13 20 20 19 14 7 32 43 43 50 53 52 51 39 46 40
74 83 92 67 38 48 51 81 47 38 44 50 27 29 35 28 35 29 34 44 40 38 44 33 36 29 24
124 123 110 114 61 66 56 113 70 18 102 113 25 60 74 14 63 107 130 118 64 141 137 143 136 127 133
137 138 105 107 84 96 100 127 107 42 125 124 112 75 80 21 55 79 122 124 65 116 120 136 133 113 114
134 135 112 112 98 89 85 93 79 57 105 113 114 94 100 64 90 98 118 133 125 121 116 136 122 113 114
126 128 114 112 110 102 98 99 79 66 92 87 80 78 85 84 100 103 116 129 122 118 115 130 119 111 112
Rehaussement avancé
4.2 Image Enhancement Techniques 123
• Petit rappel
– Opérateurs: gradient, Laplacien
– Convolution
where uavg () and vavg () are the average values in some neighborhood around (i, j ).
http://www.dmi.usherb.ca/~jodoin/cours/imn259/index.html
http://scil.dinf.usherbrooke.ca/imn359
Opérateur: gradient d’une image
Gradient:
178 178 178 178 177 174 173 168 167 164 162 160 157 156 153 151 147 145 143 140 138 135 131 127 125 125 122
180 180 180 180 180 178 176 173 171 167 167 164 162 160 156 155 151 149 146 143 140 139 136 132 130 128 127
185 184 184 184 182 180 179 177 175 171 170 167 165 163 160 160 155 153 151 148 145 142 139 137 136 133 129
194 194 191 187 185 185 183 182 180 176 175 174 170 170 153 163 161 158 155 152 150 147 144 141 139 136 136
199 199 197 194 192 188 185 184 183 180 178 176 173 171 145 165 163 160 157 155 152 149 147 144 141 139 137
202 201 203 199 199 195 192 188 187 184 183 180 177 176 116 171 167 166 161 159 158 155 153 149 146 143 141
206 205 205 204 201 200 198 197 183 144 169 184 177 178 81 174 172 168 160 164 162 159 156 153 151 149 145
209 210 211 209 207 205 204 205 151 72 97 123 89 156 72 173 169 157 140 172 169 167 163 160 157 154 151
215 215 213 213 213 209 209 208 147 65 86 98 66 76 79 169 165 122 85 154 174 172 169 166 163 160 158
225 225 223 220 219 217 215 214 127 50 60 88 50 27 27 85 108 83 57 127 178 178 175 171 168 165 163
230 230 229 227 226 225 224 223 141 62 73 63 28 13 7 38 33 41 52 119 123 150 174 172 166 170 168
233 232 166 107 200 231 187 182 115 91 65 47 17 5 5 37 13 7 52 89 63 56 87 52 49 63 167
85 92 51 36 47 60 42 39 36 12 5 13 20 20 19 14 7 32 43 43 50 53 52 51 39 46 40
74 83 92 67 38 48 51 81 47 38 44 50 27 29 35 28 35 29 34 44 40 38 44 33 36 29 24
124 123 110 114 61 66 56 113 70 18 102 113 25 60 74 14 63 107 130 118 64 141 137 143 136 127 133
137 138 105 107 84 96 100 127 107 42 125 124 112 75 80 21 55 79 122 124 65 116 120 136 133 113 114
134 135 112 112 98 89 85 93 79 57 105 113 114 94 100 64 90 98 118 133 125 121 116 136 122 113 114
126 128 114 112 110 102 98 99 79 66 92 87 80 78 85 84 100 103 116 129 122 118 115 130 119 111 112
Gradient d’une image et convolution
Masque du filtre
Le laplacien
Fig. 4.10 The gradient is a
vector that is always Gradient toujours
orthogonal to an edge. The
L’opérateur gradient (nabla) est un vecteur de La divergence est le produit scalaire entre nabla
where uavg () and vavg () are the average values in some neighborhood around (i, j ).
deux dérivées partielles: et uncan
The solution vecteur
be found2D using optical flow techniques. Interpolation is then carried
out along displacement vectors. Using the quadratic (4.17) for enforcing smoothness
of the displacement field will create a smooth interpolation. This behavior is desired
if slices are not too thick and a smooth variation of displacement within a slice is
the norm. For thick slices, two neighboring pixels in one slice may be displaced
Souvent on traite comme un simple vecteur. to different sites in the next slice (e.g., if a new structure appears in the next slice
Pour une fonction f(x,y), on obtient que: between Lethem). In suchscalaire
produit a case, discontinuity-preserving
entre nabla et leconstraints
gradientsuchestas the one
presented in Sect. 4.3.4 may be more appropriate for achieving the desired results.
ce qu’on appelle le laplacien:
Soit f(x,y) une image d’entrée. L’objectif est de calculer une image dont les
contours ont été rehaussés. Pour ce faire, on utilise fréquemment le filtre laplacien:
Filtres passe-haut
Dérivée seconde et Laplacien
Image originale
Rehaussement de contours
I(x,y) G*I(x,y)
(droite)
Filtres passe-haut
Rehaussement de contours
Filtres passe-haut
Rehaussement de contours laplacien
maximum
curvature minimum
curvature
e1
p e2
49
Bruit et débruitage
Remerciements et inspirations:
- Pierre-Marc Jodoin - IMN259
http://www.dmi.usherb.ca/~jodoin/cours/imn259/index.html
En général, le bruit est blanc, c-à-d que sa distribution fréquentielle est globalement uniforme
Bruit gaussien
Bruit de Rayleigh
ou appelé bruit
Ricien
Bruit
Bruit poivre et sel
Une métrique de qualité est une fonction qui mesure la qualité visuelle d’une image. Ainsi
plus une image est dégradée par du flou, du bruit ou des artéfacts de compression (e.g. JPEG)
plus la qualité sera faible.
Une métrique beaucoup plus souvent utilisée est le PSNR en traitement d’image
Le problème avec MSE, SNR et PSNR est qu’une légère modification d’une image, parfois
même imperceptible par l’œil humain, peut avoir un effet majeur sur ces métriques. Par consé-
quent, d’autres métriques ont été proposés. Une des plus utilisée est MSSIM
Z Wang, A Bovik, H. Sheikh, E. Simoncelli Image Quality Assessment: From Error
Visibility to Structural Similarity, IEEE TIP, 13(4), 2004
Problème avec ces métriques
‘‘d’analyse d’image classique’’
Neurospin
CEA Saclay
France
mean( S )
std( fond )
Débruitage
Gaussien?
Stationnaire?
Indépendent?
= +
• ‘‘moyennage’’ intelligent
Débruitage
• Filtrage linéaire
– Filtrage passe-bas
– Convolution avec une Gaussienne
– Diffusion linéaire
– Problème:
• Lissage isotrope. Lisse les contours en enlevant du bruit.
– Besoin d’un modèle de contour
• Filtrage non-linéaire
– Filtrage le long des contours, pas à travers.
– Préserve les contours
• Méthodes avancées
– NL means
– Block matching
http://scikit-image.org/docs/dev/api/skimage.restoration.html
Filtrage Gaussien (isotrope)
Comme nous l’avons vu, le filtre gaussien est excellent pour réduire le bruit dans
une image. Toutefois, il a pour inconvénient de dénaturer les contours.
Étant un filtre linéaire, le filtre gaussien est partout le même. Équivalent à une
équation de diffusion isotrope. Aussi, avec le thm de convolution, équivalence
dans Fourier.
Filtrage linéaire / isotrope
http://scil.dinf.usherbrooke.ca/imn359
• On peut faire mieux avec les ondelettes et la Fast Wavelet Transform (FWT)
(voir les Démo de mon cours IMN359)
Gaussian
Smoothing
Hard WT Soft WT
Diffusion isotrope / linéaire
Démo Python
Diffusion linéaire
L’équation est souvent appelée l’équation de la diffusion de la chaleur
on peut voir u(x,y,t) comme une version filtrée de f(x,y). Le filtrage s’opère en
vertu des propriétés de la diffusion.
Diffusion linéaire
(Charbonnier)
(Perona-Malik)
Diffusion : linéaire et non-linéaire
Diffusion linéaire
Diffusion non-linéaire -
filtrage anisotrope
Résultats avec la diffusivité de Perona-Malik
Fig. 4.19 Diffusion filtering in a CT body image. While noise is reduced and contrast is enhanced,
small structures start to disappear and at some locations (indicated by arrows), the course of the
boundary starts to change
Fig. 4.19 Diffusion filtering in a CT body image. While noise is reduced and contrast is enhanced,
small structures start to disappear and at some locations (indicated by arrows), the course of the
boundary starts to change
Fig. 4.20 Diffusion filtering in an MR brain image. Since structures are much smaller than in the
Diffusion : linéaire et non-linéaire
L’inconvénient avec les approches basées sur la diffusion est leur
lenteur. Il existe toutefois des moyens pour accélérer les calculs:
(1) Implémentation sur architecture parallèle (comme les GPUs par exemple)
(2) Utiliser un optimiseur implicite (Jacobi, Gauss-Seidel, SOR)
(3) Approche multirésolution
Quelques autres filtres
Filtre non-linéaire : filtre médian
Utile pour contrer le bruit poivre et sel (aussi appelé bruit impulsionnel - speckle noise en anglais)
Exemples:
médiane
• Limitations:
– Pour les images constantes par morceau
– Choix du voisinage
Filtrage bilatéral
• Lissage non-uniforme
2
*h *h1
Filtrage bilatéral
Filtrage gaussien classique :
Filtrage bilatéral :
Taille du noyau
Gaussien
Filtrage bilatéral
Filtrage bilatéral
(s,t)
output input
input
σs = 2
σs = 6
σs = 18
Filtrage bilatéral
Note 1 : le filtrage bilatéral fonctionne mal en présence d’images
fortement bruitées.
Filtrage bilatéral
Note 2 : en présence d’images fortement bruitées, on peut rendre
ce filtre itératif.
Itération 0 Itération 1
Itération 2 Itération 3
Filtrage bilatéral
• Mieux que le Gaussien mais lisse quand même trop les contours
Hard WT Soft WT
Hard WT Soft WT
Buades, B. Coll, J.M. Morel "A non local algorithm for image denoising“
IEEE Computer Vision and Pattern Recognition 2005, Vol 2, pp: 60-65, 2005
g(x,y)
où
où
et
75
Redondance dans les images et opérateur
‘‘patch-based’’
Patch similarity
Pourquoi est-ce que le filtre NLmeans est
meilleur que le bilatéral?
NLM
Hard WT Soft WT
Image sub-sampling
Block averaging
Estimator aggregation
Débruitage NLmeans pour l’IRM en
optimisant la position des blocs a priori
! 6 heures de calculs
Before After
https://sites.google.com/site/pierrickcoupe/softwares/denoising-for-
medical-imaging/mri-denoising
Extension pour le bruit Ricien
Rician distribution:
Second Moment
Rician NLM
Extension pour le bruit Ricien
Avant Après
Filtrage NLmeans
Une implémentation directe du NLmeans est très coûteuse
en temps de calcul. Il existe toutefois des moyens pour accélérer les calculs:
Filter /
threshold
Noisy Denoised
patches Patches
R
thr
R R
filtrage
R
thr
R
t
R R
?
Fusion
R
t
Block matching versus NL means
120