Perceptual Organzaton IV Introducton to Coputatonal and Bologcal Vson CS 0--56 Coputer Scence Departent BGU Ohad Ben-Shahar
Segentaton Segentaton as parttonng Gven: I - a set of age pxels H a regon hoogenety predcate based on vsual propertes of nterest a segentaton of the age s a eanngful partton of I nto regons R such that R R R I H R true H R R false j j j adjacent
Segentaton Is segentaton easy?
Segentaton Segentaton s conceptually ll defned segents
Segentaton Segentaton s conceptually ll defned 5 segents
Segentaton Segentaton s conceptually ll defned
Segentaton Segentaton s dffcult!!
Segentaton Segentaton s dffcult!!
Segentaton Segentaton s dffcult!!
Segentaton Segentaton s dual to boundary/edge detecton Segentaton Regons Make explct ntra-regon coherence Edges Boundares Make explct nter-regon dfferences
Segentaton Is segentaton dual to boundary/edge detecton???
Segentaton va thresholdng I x y t R x y R x y 0 I x y t t I x y
Segentaton va thresholdng y x I ax 3 n 3 I y x I t t y x I t t y x I t t y x I I y x R y x R t t
hi Autoatc global threshold selecton hi t I t t I
In real ages Nose gradual changes n llunaton Global thresholdng s lkely to fal Possble proveent: Local adaptve thresholdng
Local adaptve thresholdng I t I t I t 3 I t 4 I t 4 I t 44 0 y x I t t y x I y x R y x W y x W Wxy = wndow of pxel xy
Adaptve thresholdng
Representng segentatons Regon Adjacency Graphs RAGs Regon Pcture Trees
Splt and Merge Splt Merge
Regon ergng Regon ergng. For ntal segentaton. Copute RAG 3. Repeat Pck an edge e that connects two regons R and R j n the RAG H R R true If then erge the two regons and update the RAG Untl no ore regons can be erged j
Mergng statstcally slar regons Assupton: regon have constant feature value corrupted by statstcally ndependent addtve norally dstrbuted nose.? Hypothess H 0 : Regons should be erged. Ther feature values are all drawn fro the sae sngle noral dstrbuton wth paraeters 0 0 Hypothess H : Regons should not be erged. Ther feature values are drawn fro two dfferent noral dstrbutons wth paraeters and Whch hypothess should be selected?
Mergng statstcally slar regons? v v e P Probablty of any gven value v n ˆ Dstrbuton ean Dstrbuton varance ˆ ˆ v n 0 0 0 0 0 v e H v P H v v v P 0 0 0 0 v e e
Mergng statstcally slar regons? v v e P Probablty of any gven value v n ˆ Dstrbuton ean Dstrbuton varance ˆ ˆ v n v v e e H v P H v v v P e e
Mergng statstcally slar regons? v v e P Probablty of any gven value v n ˆ Dstrbuton ean Dstrbuton varance ˆ ˆ v n 0 0 H v v v P H v v v P L Lklhood rato
Regon splttng Regon splttng. For ntal segentaton. Copute RAG 3. Repeat Pck a node R n the RAG H R false If then splt the regon and update the RAG Untl no ore splts can be done
. For ntal segentaton. Copute RAG 3. Repeat Segentaton Approaches Splt and Merge Pck a node R n the RAG and exane t for splttng. Update RAG f splt s exercsed. Pck an edge e that connects two regons R and Rj n the RAG and exane t for ergng. Update RAG f erge s exercsed. Untl no ore splts can be done
Segentaton va relaxaton Contextual constrants X X Y Y Z Z X apple Y apple Z orange
Segentaton va relaxaton
Segentaton va relaxaton
Segentaton va clusterng
Proble forulaton: Segentaton va clusterng Gven a set of data ponts x fnd K clusters C j wth representatves j such that the total ft easure of data ponts to clusters s nzed D K k x C k d x n Least square error easure: d x x Iage segentaton as clusterng: x : feature vectors assocated wth pxels C j : segents j : representatve ean feature vector for seent j
Iteratve K-eans clusterng. Chose randoly the set of K cluster centers. Repeat K Allocate each data pont to the cluster whose center s nearest Update all to the center pont of ther cluster Untl cluster centers are unchanged
Iteratve K-eans clusterng 6-clusters
Graph theoretc approach to segentaton
Graph theoretc approach to segentaton
Graph theoretc approach to segentaton S j S j = slarty weght/affnty based on ntensty color texture etc
Graph theoretc approach to segentaton S j Segentaton = Graph cuts
Graph theoretc approach to segentaton Gven: a graph representaton VE of the age and a parwse slarty easure Copute: A partton of the graph nto dsjont sets V V V such that the total slarty s axzed wthn each V and s nzed between any two V anf V j Recursve forulaton: A partton of the graph nto dsjont sets A and B and apply recursvely to A and B.
Graph theoretc approach to segentaton A B V S j A B cut A B e A; e S e B e? Segentaton = Mnu cuts
Graph theoretc approach to segentaton cut A B e A; e S e B e W [ S j ] Slarty Matrx
Graph theoretc approach to segentaton cut A B e A; e S e B e W [ S j ] d S j j Degree of a node Slarty Matrx
Graph theoretc approach to segentaton cut A B e A; e S e B e W [ S j ] d S j j vol A A d Degree of a node Volue of a set Slarty Matrx
Graph theoretc approach to segentaton Noralzed cuts Ncut A B cut A B vol A cut B A vol B NP-Hard!!
Graph theoretc approach to segentaton B vol A B cut A vol B A cut B A Ncut x x A A x d n d d D 0 0 0 0 0 0 0 0 0 0 0 0 Degree Matrx Segentaton vectot Laplacan Matrx W D L
Graph theoretc approach to segentaton Ncut A B cut A B vol A cut B A vol B Ncut A B n y T L D W y T y Dy n y x b x A y b A b k k x 0 k d d
Graph theoretc approach to segentaton Ncut A B cut A B vol A cut B A vol B Ncut A B n L D W y y T L D W y T y Dy Dy n Relax allow any y z D y Mz z D LD z z
Graph theoretc approach to segentaton Gven an age for segentaton:. Set up a graph G=VE wth weghts easurng slartes between pxels.. Copute WDL 3. Solve for the egenvectors of D L D W D 4. Use the egenvector of the second saller egenvalue to bpartton the graph. 5. Apply recursvely as needed.
Graph theoretc approach to segentaton
Graph theoretc approach to segentaton
Graph theoretc approach to segentaton