Intensity trnsformtions Stefno Ferrri Università degli Studi di Milno stefno.ferrri@unimi.it Methods for Imge Processing cdemic yer 2017 2018 Sptil domin The sptil domin of n imge is the plne tht contins the imge pixels. The techniques tht opertes on the sptil domin mke direct use of the informtion contined into the mtricil representtion of the imge; in contrst to other techniques tht operte onto representtion of the imge in other domins (which is computed through suitle trnsform). This kind of techniques cn e formlized s: g(x, y) = T [f (x, y)] Generlly, sptil domin techniques re less computtionlly demnding. Stefno Ferrri Methods for Imge processing.. 2017/18 1
Trnsformtions in the sptil domin The opertor, T, is usully defined on suitle neighorhood of (x, y). A rectngulr neighorhood is usully preferred. When the neighorhood fll outside the imge, some extending criteri hve to e used ckground-pdding zero-pdding symmetry If the rdius of the neighorhood is 0, the trnsformtion involves only the considered pixel nd depends (only) y its intensity: s = T (r) intensity trnsformtion or gry-level mpping. Intensity trnsformtions Intensity trnsformtion techniques re lso clled point-processing, s opposed to the neighorhood processing techniques. Simple to implement (lgorithm, tle mp). They re used to enhnce imges tht re devoted to visul processing: no generl rule for stting the optimlity; ppliction-dependent; user-dependent. Stefno Ferrri Methods for Imge processing.. 2017/18 2
Imge negtive L-1 s 0 r 0 L-1 Sometimes, the detils re more detectle when the pixels intensity is reversed. For instnce, when the detils re white or light gry nd the ckground is drk nd covers the most of the imge. s = L 1 r Logrithmic trnsformtions L-1 s 0 r 0 L-1 s = c log(1 + r), c = L 1 log L Useful for representing idimensionl functions tht re defined on lrge intervls nd hve high nd smll peks. e.g.: f : [0, 1] 2 [0, 10 6 ] Stefno Ferrri Methods for Imge processing.. 2017/18 3
Gmm trnsformtions Also clled power-lw trnsformtions. s = c r γ (sometimes s = c (r + ɛ) γ ) Used for correcting the visuliztion devices output. Useful for contrst correction (or enhncement). A too lrge or too smll vlue for γ cn compromise the results. L-1 s γ=0.05 γ=0.1 γ=0.2 γ=0.5 γ=1 γ=2 γ=5 γ=10 γ=25 0 r 0 L-1 γ = 1, identity γ < 1, lightening γ > 1, drkening Gmm trnsformtions (2) If the gmm correction fctor of the verge visuliztion device is known in dvnce, suitle correction cn pplied to the imge intensity efore the visuliztion. Stefno Ferrri Methods for Imge processing.. 2017/18 4
. Gmm trnsformtions (3) c d () Originl imge. Gmm trnsformed imges with c = 1, γ = 0.6 (), c = 1, γ = 0.4 (c), nd c = 1, γ = 0.3 (d). Which is the est? Gmm trnsformtions (4) c d Gmm correction cn e pplied lso for drkening imges. () Originl imge. Gmm trnsformed imges with c = 1, γ = 3.0 (), c = 1, γ = 4.0 (c), nd c = 1, γ = 5.0 (d). Stefno Ferrri Methods for Imge processing.. 2017/18 5
Contrst stretching trnsformtions c d () Generl shpe of the contrst stretching trnsformtions. () Low-contrst imge. (c) A processed imge. (r 1, s 1 ) = (r min, 0) (r 2, s 2 ) = (r mx, L 1) (d) Thresholding cn e view s the limit of the contrst stretching. (r 1, s 1 ) = (r thr, 0) (r 2, s 2 ) = (r thr, L 1) Intensity level slicing trnsformtions Intensity level slicing trnsformtions highlight n intensity rnge. The trnsformtion in () sets ll the intensities tht re not in [A, B] to low vlue. The trnsformtion in () preserves the intensities tht re not in [A, B]. Stefno Ferrri Methods for Imge processing.. 2017/18 6
Intensity level slicing trnsformtions (2) c () Originl imge. () Vessels re highlighted y setting to L 1 the intensity levels tht re in the rnge of interest nd to 0 ll the others. (c) Vessels intensities re conserved, while the others re drkened. Bit-plne trnsformtion Insted of considering it s mtrix of integer, the imge cn e seen s composed of lyers of its. Stefno Ferrri Methods for Imge processing.. 2017/18 7
. Bit-plne trnsformtion I (2) Ech lyer contriutes to the finl ppernce of the imge, ut most of the informtion is in the higher lyers. Bit-plne trnsformtion (3) c Imges otined using: Stefno Ferrri Methods for Imge processing.. 2017/18 I () itplnes 8 nd 7; I () itplnes 8, 7, nd 6; I (c) itplnes 8, 7, 6, nd 5. 8
Homeworks nd suggested redings DIP, Sections 3.1, 3.2 pp. 105 119 GIMP Colors Brightness-Contrst Threshold Levels Curves Invert Auto Stretch Contrst Normlize Stefno Ferrri Methods for Imge processing.. 2017/18 9