region segmentation - ucf crcvcrcv.ucf.edu/gauss/regions.ppt.pdforientation of the region e=...
TRANSCRIPT
![Page 1: Region Segmentation - UCF CRCVcrcv.ucf.edu/gauss/Regions.ppt.pdfOrientation of the Region E= ÚÚ(xsinq-ycosq+r)2B(x,y)dxdy r2=(xsinq-ycosq+r)2 Substitute r in E and differentiate](https://reader036.vdocument.in/reader036/viewer/2022071417/61157019ca19f0297e523b1c/html5/thumbnails/1.jpg)
1
Region Segmentation
Segmentation
![Page 2: Region Segmentation - UCF CRCVcrcv.ucf.edu/gauss/Regions.ppt.pdfOrientation of the Region E= ÚÚ(xsinq-ycosq+r)2B(x,y)dxdy r2=(xsinq-ycosq+r)2 Substitute r in E and differentiate](https://reader036.vdocument.in/reader036/viewer/2022071417/61157019ca19f0297e523b1c/html5/thumbnails/2.jpg)
2
![Page 3: Region Segmentation - UCF CRCVcrcv.ucf.edu/gauss/Regions.ppt.pdfOrientation of the Region E= ÚÚ(xsinq-ycosq+r)2B(x,y)dxdy r2=(xsinq-ycosq+r)2 Substitute r in E and differentiate](https://reader036.vdocument.in/reader036/viewer/2022071417/61157019ca19f0297e523b1c/html5/thumbnails/3.jpg)
3
Initial Segmentation
Segmentation
• Partition f(x,y) into sub-images: R1, R2, ….,Rn such thatthe following constraints are satisfied:–
–
– Each sub-mage satisfies a predicate or set of predicates• All pixels in any sub-image musts have the same gray levels.
• All pixels in any sub-image must not differ more than somethreshold
• All pixels in any sub-image may not differ more than somethreshold from the mean of the gray of the region
• The standard deviation of gray levels in any sub-image must besmall.
jiRR ji ≠= ,fI
),(1
yxfRi
n
i
==U
![Page 4: Region Segmentation - UCF CRCVcrcv.ucf.edu/gauss/Regions.ppt.pdfOrientation of the Region E= ÚÚ(xsinq-ycosq+r)2B(x,y)dxdy r2=(xsinq-ycosq+r)2 Substitute r in E and differentiate](https://reader036.vdocument.in/reader036/viewer/2022071417/61157019ca19f0297e523b1c/html5/thumbnails/4.jpg)
4
Simple Segmentation
ÁÁË
Ê <=
Otherwise0
),( if1),(
TyxfyxB
ÁÁË
Ê <<=
Otherwise0
),( if 1),( 21 TyxfT
yxB
ÁÁË
Ê Œ=
Otherwise 0
),( if 1),(
ZyxfyxB
HistogramHistogram graphs the number of pixels in an image with a Particular gray level as a function of the image of gray levels.
For (I=0, I<m, I++) For (J=0, J<m, J++) histogram[f(I,J)]++;
imhist
![Page 5: Region Segmentation - UCF CRCVcrcv.ucf.edu/gauss/Regions.ppt.pdfOrientation of the Region E= ÚÚ(xsinq-ycosq+r)2B(x,y)dxdy r2=(xsinq-ycosq+r)2 Substitute r in E and differentiate](https://reader036.vdocument.in/reader036/viewer/2022071417/61157019ca19f0297e523b1c/html5/thumbnails/5.jpg)
5
Example
Segmentation Using Histogram
ÁÁË
Ê <<=
Otherwise0
),(0if 1),( 1
1
TyxfyxB
ÁÁË
Ê <<=
Otherwise0
),( if 1),( 21
2
TyxfTyxB
ÁÁË
Ê <<=
Otherwise0
),( if 1),( 32
3
TyxfTyxB
![Page 6: Region Segmentation - UCF CRCVcrcv.ucf.edu/gauss/Regions.ppt.pdfOrientation of the Region E= ÚÚ(xsinq-ycosq+r)2B(x,y)dxdy r2=(xsinq-ycosq+r)2 Substitute r in E and differentiate](https://reader036.vdocument.in/reader036/viewer/2022071417/61157019ca19f0297e523b1c/html5/thumbnails/6.jpg)
6
Realistic Histogram
Peakiness Test
˜̃¯
ˆÁÁË
Ê-˜
¯
ˆÁË
Ê +-=
).(1.
2
)(1
PW
N
P
VVPeakiness ba
![Page 7: Region Segmentation - UCF CRCVcrcv.ucf.edu/gauss/Regions.ppt.pdfOrientation of the Region E= ÚÚ(xsinq-ycosq+r)2B(x,y)dxdy r2=(xsinq-ycosq+r)2 Substitute r in E and differentiate](https://reader036.vdocument.in/reader036/viewer/2022071417/61157019ca19f0297e523b1c/html5/thumbnails/7.jpg)
7
Connected Component
˙˙˙˙˙˙
˚
˘
ÍÍÍÍÍÍ
Î
È
01010
01100
00000
11011
01000
˙˙˙˙˙˙
˚
˘
ÍÍÍÍÍÍ
Î
È
000
000
00000
0
0000
cd
cc
aabb
a
4
Connectedness
![Page 8: Region Segmentation - UCF CRCVcrcv.ucf.edu/gauss/Regions.ppt.pdfOrientation of the Region E= ÚÚ(xsinq-ycosq+r)2B(x,y)dxdy r2=(xsinq-ycosq+r)2 Substitute r in E and differentiate](https://reader036.vdocument.in/reader036/viewer/2022071417/61157019ca19f0297e523b1c/html5/thumbnails/8.jpg)
8
Connected Component
˙˙˙˙˙˙
˚
˘
ÍÍÍÍÍÍ
Î
È
01010
01100
00000
11011
01000
˙˙˙˙˙˙
˚
˘
ÍÍÍÍÍÍ
Î
È
000
000
00000
0
0000
cc
cc
aabb
a
8
Recursive Connected ComponentAlgorithm
![Page 9: Region Segmentation - UCF CRCVcrcv.ucf.edu/gauss/Regions.ppt.pdfOrientation of the Region E= ÚÚ(xsinq-ycosq+r)2B(x,y)dxdy r2=(xsinq-ycosq+r)2 Substitute r in E and differentiate](https://reader036.vdocument.in/reader036/viewer/2022071417/61157019ca19f0297e523b1c/html5/thumbnails/9.jpg)
9
Sequential
˙˙˙˙˙˙
˚
˘
ÍÍÍÍÍÍ
Î
È
01110
01100
00000
11011
01000
˙˙˙˙˙˙
˚
˘
ÍÍÍÍÍÍ
Î
È
00
000
00000
0
0000
ccd
cc
aabb
a
d=c
Sequential ConnectedComponent Algorithm
![Page 10: Region Segmentation - UCF CRCVcrcv.ucf.edu/gauss/Regions.ppt.pdfOrientation of the Region E= ÚÚ(xsinq-ycosq+r)2B(x,y)dxdy r2=(xsinq-ycosq+r)2 Substitute r in E and differentiate](https://reader036.vdocument.in/reader036/viewer/2022071417/61157019ca19f0297e523b1c/html5/thumbnails/10.jpg)
10
Recursive
˙˙˙˙˙˙
˚
˘
ÍÍÍÍÍÍ
Î
È
01110
01100
00000
11011
01000
˙˙˙˙˙˙
˚
˘
ÍÍÍÍÍÍ
Î
È
00
000
00000
0
0000
ccc
cc
aabb
a
Steps in Segmentation UsingHistogram
1. Compute the histogram of a given image.2. Smooth the histogram by averaging peaks and
valleys in the histogram.3. Detect good peaks by applying thresholds at the
valleys.4. Segment the image into several binary images
using thresholds at the valleys.5. Apply connected component algorithm to each
binary image find connected regions.
![Page 11: Region Segmentation - UCF CRCVcrcv.ucf.edu/gauss/Regions.ppt.pdfOrientation of the Region E= ÚÚ(xsinq-ycosq+r)2B(x,y)dxdy r2=(xsinq-ycosq+r)2 Substitute r in E and differentiate](https://reader036.vdocument.in/reader036/viewer/2022071417/61157019ca19f0297e523b1c/html5/thumbnails/11.jpg)
11
Example: Detecting Fingertips
Example-II
93 peaks
![Page 12: Region Segmentation - UCF CRCVcrcv.ucf.edu/gauss/Regions.ppt.pdfOrientation of the Region E= ÚÚ(xsinq-ycosq+r)2B(x,y)dxdy r2=(xsinq-ycosq+r)2 Substitute r in E and differentiate](https://reader036.vdocument.in/reader036/viewer/2022071417/61157019ca19f0297e523b1c/html5/thumbnails/12.jpg)
12
Smoothed Histograms
Smoothed histogram (averaging using mask Of size 5)54 peaks (once)After peakiness 18
Smoothed histogram21 peaks (twice)After peakiness 7
Smoothed histogram11 peaks (three times)After peakiness 4
Regions
(0,40) (40, 116)
![Page 13: Region Segmentation - UCF CRCVcrcv.ucf.edu/gauss/Regions.ppt.pdfOrientation of the Region E= ÚÚ(xsinq-ycosq+r)2B(x,y)dxdy r2=(xsinq-ycosq+r)2 Substitute r in E and differentiate](https://reader036.vdocument.in/reader036/viewer/2022071417/61157019ca19f0297e523b1c/html5/thumbnails/13.jpg)
13
Regions
(116,243) (243,255)
Geometrical Properties
ÂÂ= =
=m
x
n
y
yxBA0 0
),(
A
yxyB
yA
yxxB
x
m
x
n
y
m
x
n
yÂÂÂÂ
= == = == 0 00 0
),(
,
),(
Area
Centroid
![Page 14: Region Segmentation - UCF CRCVcrcv.ucf.edu/gauss/Regions.ppt.pdfOrientation of the Region E= ÚÚ(xsinq-ycosq+r)2B(x,y)dxdy r2=(xsinq-ycosq+r)2 Substitute r in E and differentiate](https://reader036.vdocument.in/reader036/viewer/2022071417/61157019ca19f0297e523b1c/html5/thumbnails/14.jpg)
14
Perimeter & Compactness
A
PC
p4
2
=
Perimeter: The sum of its border points of the region. A pixel which has at least one pixel in its neighborhood from the background is called a border pixel.
Compactness
Circle is the most compact, has smallest value
Area decreases
Orientation of the Region
dxdyyxBrE ),(2ÚÚ=
Least second moment
0cossin =+- rqq yx
)cos,sin( qrqr-
qqr
qqr
sincos
cossin
0
0
sy
sx
+=
+-=
Minimize
![Page 15: Region Segmentation - UCF CRCVcrcv.ucf.edu/gauss/Regions.ppt.pdfOrientation of the Region E= ÚÚ(xsinq-ycosq+r)2B(x,y)dxdy r2=(xsinq-ycosq+r)2 Substitute r in E and differentiate](https://reader036.vdocument.in/reader036/viewer/2022071417/61157019ca19f0297e523b1c/html5/thumbnails/15.jpg)
15
Orientation of the Region
dxdyyxByxE ),()cossin( 2ÚÚ +-= rqq
22 )cossin( rqq +-= yxr
Substitute r in E and differentiate Wrt to and equate it to zeror
0)cossin( =+- rqq yxA),( yx is the centroid
qqqq 22 coscossinsin cbaE +-=
qq 2sin2
12cos)(
2
1)(
2
1bcacaE ---+= ydxdyxByc
ydxdyxByxb
ydxdyxBxa
¢¢¢=
¢¢¢¢=
¢¢¢=
ÚÚÚÚÚÚ
),(
),(
),(
2
2
dxdyyxBrE ),(2ÚÚ=
yyyxxx -=¢-=¢ ,
Substitute value of r
Orientation of the Region
ca
b
-=q2tan
ydxdyxByc
ydxdyxByxb
ydxdyxBxa
¢¢¢=
¢¢¢¢=
¢¢¢=
ÚÚÚÚÚÚ
),(
),(
),(
2
2
22
22
),(
),(2
),(
yAyxByc
yxAyxxyBb
xAyxBxa
-=
-=
-=
 Â
 Â
 Â
qq 2sin2
12cos)(
2
1)(
2
1bcacaE ---+=
22
22
)(2cos
)(2sin
cab
ca
cab
b
-+
-±=
-+±=
q
q
Differentiating this wrt q
yyyxxx -=¢-=¢ ,
![Page 16: Region Segmentation - UCF CRCVcrcv.ucf.edu/gauss/Regions.ppt.pdfOrientation of the Region E= ÚÚ(xsinq-ycosq+r)2B(x,y)dxdy r2=(xsinq-ycosq+r)2 Substitute r in E and differentiate](https://reader036.vdocument.in/reader036/viewer/2022071417/61157019ca19f0297e523b1c/html5/thumbnails/16.jpg)
16
Moments
dxdyyxByxm qppq ),(Ú Ú=
General Moments
ÂÂÂÂ= == =
==m
x
n
yy
m
x
n
yx yxyBMyxxBM
0 0
1
0 0
1 ),( ,),(
ÂÂÂÂÂÂ= == == =
===m
x
n
yxy
m
x
n
yy
m
x
n
yx yxxyBMyxByMyxBxM
0 0
2
0 0
22
0 0
22 ),( ,),( ,),(
Discrete
Half size, mirrorRotated 2, rotated 45
![Page 17: Region Segmentation - UCF CRCVcrcv.ucf.edu/gauss/Regions.ppt.pdfOrientation of the Region E= ÚÚ(xsinq-ycosq+r)2B(x,y)dxdy r2=(xsinq-ycosq+r)2 Substitute r in E and differentiate](https://reader036.vdocument.in/reader036/viewer/2022071417/61157019ca19f0297e523b1c/html5/thumbnails/17.jpg)
17
Hu moments