image processing - cnr
TRANSCRIPT
![Page 1: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/1.jpg)
ImageProcessing
CosimoDistante
Lecture6:MonochromeandColorprocessing
![Page 2: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/2.jpg)
Pointwise operator: algorithms that execute simple operation on the single pixel without involving neighboring pixels
I0(i,j)=Opointwise[II(i,j)]
If II(i,j) > 150 then IO(i,j)=1 else IO(i,j)=0
![Page 3: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/3.jpg)
Local Operator: algorithms that define the new value of a pixel based on the intensity values of the neighboring pixels II input image, F(i,j) a window defined over the analysing pixel I0 output image
I0(i,j)=Olocale{II(ik,jl); (ik,jl)∈F(i,j)}
Median filter with window size 3×3
![Page 4: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/4.jpg)
Global Operator: algorithms that extract global information from the image They use all pixels of the image
R=Oglobal[II(i,j)]
![Page 5: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/5.jpg)
Histogram H(x) is the frequency of intensity value x The histogram HI(x) can be seen as the results of the global operatorfor the input image I With the histogram we loose spacial information
![Page 6: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/6.jpg)
R.S.Gaborski 6
0 50 100 150 200 250 3000
0.005
0.01
0.015
0.02
0.025
0.03
0 50 100 150 200 250 3000
0.01
0.02
0.03
0.04
0.05
0.06
0 50 100 150 200 250 3000
0.01
0.02
0.03
0.04
0.05
0.06
Original Dark Light
![Page 7: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/7.jpg)
Contrast manipulation Given: x gray level of input image II(i,j), y gray level of output image I0(i,j), T(x) the gray level transform (manipulation)
y=T(x)
![Page 8: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/8.jpg)
Linear
y=β(x-xa)
with xa≤x≤xb and the stretching coefficient obtained by the ratio of the output gray level range and input gray level range Δx=xb-xa.
β =Δ
Δ
yx
Example: the interval of the most frequent levels in the image is [50..100] Then Δx=50 different levels That can be stretched to 256 levels (Δy) to have a better quality
![Page 9: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/9.jpg)
Linear
stretching
![Page 10: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/10.jpg)
Linear with multiple paths
α =yxa
a ab
ab
xxyy
−
−=β
)()(
max
max
b
b
xxLyyL
−
−=δ
ya and yb are constants used to increase or decrease the global illumination
![Page 11: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/11.jpg)
Linear with multiple paths – special case
If α=0 and δ=0 Then stretching is related to interval (xa,xb) While are excluded (clipping) gray levels less than xa and greater than xb
This is useful when we know the object is in (xa,xb) in order to segment it. IF xa=xb≡xT, the output image is named Binary Image.
background object
![Page 12: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/12.jpg)
Quadratic transformation:
y=x2 Expand high gray level and compress lower gray level Square root transf. Opposite behavior as previous transf. Log transform Applied when the range of gray levels in input image is much wider than the wanted range in output image (in Fourier representation)
Non Linear
xy =
yxx
e
e
=+
+
log ( )log [ max( )]
11
0 50 100 150 200 250 3000
50
100
150
200
250
300
0 50 100 150 200 250 3000
50
100
150
200
250
300
0 50 100 150 200 250 3000
50
100
150
200
250
300
![Page 13: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/13.jpg)
Negative
Complementing with respect to the maximum gray level of the input image Inverse Useful to visualize very dark details of an image
y = 1x
with x > 0
xLy −= max
Imm. Original Negative Inverse
![Page 14: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/14.jpg)
R.S.Gaborski 14
HistogramEqualizaGon• ThehistogramequalizaGontransformaGongenerates
animagewithequallylikelyintensityvalues• Theintensityvaluesintheoutputimagecoverthefull
range,[01]• TheresulGngimagehashigherdynamicrange• Recallthevaluesinthenormalizedhistogramare
approximatelytheprobabilityofoccurrenceofthosevalues
• ThehistogramequalizaGontransformisthecumulaGvedistribuGonfuncGon(CDF)
![Page 15: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/15.jpg)
R.S.Gaborski 15
Histogram CDF
CUMULATIVEDISTRIBUTIONFUNCTION
![Page 16: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/16.jpg)
Histogram equalization
![Page 17: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/17.jpg)
Histogram equalization
![Page 18: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/18.jpg)
Histogram equalization Algorithm
GivenNxMthaimagesizeandLmaxthemaximumgraylevelsFirststepistocreatethehistogramoftheimageHI
ThenbuildthecumulaGvehistogramHc
ThencomputethemappingfuncGon
andremapeverypixel
Hc(x)
![Page 19: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/19.jpg)
R.S.Gaborski 19
InputImage OutputImage
HistogramEqualizaGon
![Page 20: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/20.jpg)
R.S.Gaborski 20
HistogramEqualizaGonExample
• g=histeq(f,nlev)wherefistheoriginalimageandnlevnumberofintensitylevelsinoutputimage
![Page 21: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/21.jpg)
Adaptive Histogram Equalization (AHE)
SinceoureyesadapttolocalregionsinsteadofenGreimage,itisusefultoopGmizeimageenhancementlocallyTheimageisdividedinagridofnon-overlappingregions
histogramequalizaGonappliedineachregion
![Page 22: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/22.jpg)
Contrast Limited Adaptive Histogram Equalization (CLAHE)
OperateaclipontheequalizedhistogramComputethecumulaGvehistogram
ßisthecliplimitandαclipfactor
smaxmaximumallowedslopeForX-rayimagessmax=4PerformhistogramequalizaGonlocallyandoperateaclippingredistribuGngthepixels
Nota%onchangeNisthenumberofgraylevelsMthetotalnumberofpixelsinImage
![Page 23: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/23.jpg)
Contrast Limited Adaptive Histogram Equalization (CLAHE)
h(n)
n
β h(n)-β Nota%onchangeNisthenumberofgraylevelsMthetotalnumberofpixelsinImage
![Page 24: Image Processing - CNR](https://reader033.vdocuments.us/reader033/viewer/2022041718/6253ee071a569c01733ba734/html5/thumbnails/24.jpg)
Contrast Limited Adaptive Histogram Equalization (CLAHE)
Original Image
CLAHE
Histogram Equalization