Chapt 3 Bnay Iag Analyss Counação Vsual Intatva
Most oon nghbohoods Pxls and Nghbohoods Nghbohood Vznhança N 4 Nghbohood N 8 Us of ass Exapl: ogn nput output CVI - Bnay Iag Analyss
Exapl 0 0 0 0 0 output nput saída and wth th as? 0 0 0 0 0 0 0 0 80 60 00 40 60 0 00 80 30 40 0 00 80 30 40 0 00 80 30 40 80 60 00 40 60 CVI - Bnay Iag Analyss 3
Algoth Countng objts Hypothss: An objt s a st of onntd pxls onntvty 4 and wthout nn hols Out ons Inn ons CVI - Bnay Iag Analyss 4
How any objts? - - 5 4 4 6 4 5 # CVI - Bnay Iag Analyss 5
And now? - 3-4? 4 9 4 4 3 # CVI - Bnay Iag Analyss 6
Conntd Coponnt Analyss usv algoth nput output CVI - Bnay Iag Analyss 7
usv algoth - Exapl Nghbo 4 Nghbo 8 CVI - Bnay Iag Analyss 8
Unon-Fnd stutu CVI - Bnay Iag Analyss 9
Class CCA usng Unon-Fnd nput º stp quv. lasss º stp CVI - Bnay Iag Analyss 0
Apply th CCA algoth onsdng onntvty 4 Exs 3 3 3 3 3 3 4 5 4 0 3 0 0 4 0 5 04 What would b th sult onsdng onntvty 8? CVI - Bnay Iag Analyss
Stutung lnts Mophologal opatos ons35 ds5 ng5 W nd to dfn th nt.. ogn Dfnton: A dlaton of th bnay ag B by th stutung lnt S s dfnd as B S S b s b ss bb Dfnton: A oson of th bnay ag B by th stutung lnt S s dfnd as B S S b bb sbs S CVI - Bnay Iag Analyss
Mophologal opatons - Exapls CVI - Bnay Iag Analyss 3
Dlaton and Eoson Gnalzaton fo onohoat ags Opação Dlaton Eoson ul Th output pxl valu s th axu valu of all pxls n th nghbohood of th nput pxl. It s assgnd nu valu 0 to th oth pxls Th output pxl valu s th nu valu of all pxls n th nghbohood of th nput pxl. It s assgnd a axu valu o 55 to th oth pxls Dlaton of th bnay ag Dlaton of a onohoat ag CVI - Bnay Iag Analyss 4
Mophologal opatons Dfnton: Th losng of bnay g B by th stutung lnt S s dfnd by B S B S S Dfnton: A opnng of a bnay ag B by th stutung lnt S s dfnd by B S B S S B B S B S S B S B S CVI - Bnay Iag Analyss 5
Exapls of ophology to xtat shap ptvs Mdal applatons ag soluton of 5x5 opnng wth ds 3 followd by losng wth ds ognal bnazd possd Extaton of shap ptvs Subtaton btwn th ognal ag and th ag obtand wth th opnng opato usng a ds as th stutung lnt ognal opnng ons CVI - Bnay Iag Analyss 6
nput Inspton podu a b d f output CVI - Bnay Iag Analyss 7
Condtonal Dlaton Dfnton: Gvn two bnay ags ognal B and possd C and th stutung lnt S and lt C C C C S B Th ondtonal dlaton of C by S wth spt to B s dfnd by C S B C wh s th sallst ntg satsfyng C C 0 n n B C B V C B S V S CVI - Bnay Iag Analyss 8
gon popts Aa Cntod Pt pxls Pt lngth Culaty A A A N P 8 4 N P 4 8 4 8 4 N N N P A P C CVI - Bnay Iag Analyss 9
Popts ont. Culaty Man adal dstan Standad dvaton of adal dstan C 0 K K 0 K K CVI - Bnay Iag Analyss 0
tangl and otagon boundng box Popts lngths and boundas Axs lngth D Q D D Q os sn : : 45º 45º 0º 45º CVI - Bnay Iag Analyss
Popts nd od onts Sond od onts laton btwn onts and llpt gons Axs wth last sond od ont Foulaton Soluton ˆ tan f d f d 4 A A A A A V d sn os / CVI - Bnay Iag Analyss
gon Adjany Gaphs Pobl: gons that hav nn hols n th bagound Soluton: algoth wth 3 stps Aplaton of th CCA algoth tw: fogound pxls and bagound pxls 3 Buldng of gaph latons CVI - Bnay Iag Analyss 3
La Thshold Dfnton: o hstoga h of th onohoat ag I s dfnd by h I CVI - Bnay Iag Analyss 4
Otsu Mthod Autoat oputaton of th Thshold Lt us assu that w hav an ag I : wth and I x y dnots th gay lvl ntnsty n th oodnats x y. MaxVal Also assu that M 3... psnts th gay lvls n th ag I. Dfnng n as th nº of pxls at a gvn lvl M th total nº of th pxls n th ag s gvn by n MaxVal n W an oput th wghts of th pxls at th lvl as W a gong to assu that w hav two lasss of gay lvls P n / n C... C... MaxVal usng a thshold CVI - Análs Bnay Iag d Iagns Analyss Bnáas 5
Autoat oputaton of th Thshold Otsu Mthod Ida: nta-lass nzaton vaan Th wghts allow to oput th an of th gay lvls of th two lasss; Now w an oput th vaans fo th abov ans: W P w MaxVal P w w P / MaxVal w P / w P / MaxVal w P / CVI - Bnay Iag Analyss 6
Cálulo autoáto do la Otsu thn poposs th followng goodnss of th thshold wh w w B / W B w w w w w w W CVI - Bnay Iag Analyss 7 W B - wthn lass nta-lass vaan - btwn lass nt-lass vaan
usv Algoth Synopss of th Otsu algoth to fnd th thshold t Intalzaon P Fo := 0 to MaxVal w w P B h / C MaxVal 0 P La oputaton w 0 P0 w P w w w 0 w w ag ax B 0 Ognal MaxVal=55 t = 93 CVI - Bnay Iag Analyss 8
Coput hstoga and pobablts of ah ntnsty lvl St up ntal \oga_0 and \u_0 3 Stp though all possbl thsholds t = axu ntnsty 3. Updat \oga_ and \u_ 3. Coput \sga^_bt 4 Dsd thshold osponds to th axu \sga^_bt CVI - Bnay Iag Analyss 9