Detection of objects in noisy images and site percolation on square lattices

We propose a novel probabilistic method for detection of objects in noisy images. The method uses results from percolation and random graph theories. We present an algorithm that allows to detect objects of unknown shapes in the presence of random no…

Authors: Mikhail A. Langovoy, Olaf Wittich

Detecti on of ob jects in nois y images and site p erc olation on square lattices Mikhail Lango v o y ∗ Mikhail L angovoy, T e chnische Univ ersiteit Eindhoven, EURANDOM, P.O. Box 513 , 5600 MB, Eindhoven, The Netherlands e-mail: langovoy@e urandom.tue. nl Phone: (+31) (40) 247 - 8113 F ax: (+31) (40) 247 - 8190 and Olaf Wittic h Olaf Wittich, T e chnische Univ ersiteit Eindhoven and EURANDOM, P.O. Box 513 , 5600 MB, Eindhoven, The Netherlands e-mail: o.witt ich@tue.nl Phone: (+31) (40) 247 - 2499 Abstract: W e propose a no vel probabilistic method for dete ction of ob- jects in noisy images. The method uses results from percolation and random graph theories. W e present an algorithm that all o ws to detect ob j ects of un- kno wn shap es in the presence of random noise. Our pr o cedure substant ially differs from wa velets-based algorithms. The algorithm has linear complex- ity and exponen tial accuracy and is appropriate for real-time systems. W e prov e results on consistency and algorithmic complexit y of our pro cedure. Keywords and phrases: Image analysis, signal detection, image recon- struction, percolation, noisy image. 1. In tro duction In this paper, we prop ose a new efficien t tec hnique for quic k detection of ob jects in noisy imag es. Our approach us es mathema tical p erc o lation theory . Detection of o b jects in noisy ima ges is the mo st basic pr o blem of image analy- sis. Indeed, when one lo oks at a noisy image, the first question to ask is whether there is any ob ject at all. This is also a primary question of interest in such diverse fields as, for example, cancer detection (Ricci-Vitiani et al. (20 07)), au- tomated urban analysis (Negri e t al. (2006)), detection of cracks in buried pip es (Sinha and Fieguth (200 6)), a nd other p o ssible applications in astr o nomy , elec- tron microscopy and neurolo gy . Moreov er, if ther e is just a random noise in the picture, it do esn’t make sens e to run computationa lly intensiv e pro c edures for image reco nstruction for this particular picture. Surpr is ingly , the v ast ma jority of image analys is metho ds, b o th in statistics and in engineer ing, skip this s tage and sta rt immediately with image reconstruction. The cr ucial difference o f our metho d is that we do not imp ose any shape or smo othness a ssumptions on the b oundary of the ob ject. This p ermits the ∗ Corresp onding author. 1 imsart-g eneric ver. 2007/04/13 file: Randomized_Algo rithms_and_Percolation_Square_3.tex date: September 12, 2018 M. L angovoy and O. Witt ich/Dete c tion in noisy images and p er c olation. 2 detection o f nonsmoo th, irregula r or disco nnected ob jects in noisy images, under very mild assumptions on the ob ject’s interior. This is e s pe c ia lly suitable, for example, if one ha s to detect a highly irregular non-conv ex o b ject in a noisy image. Although our detectio n pro c e dur e works for regular ima ges as w ell, it is precisely the class of ir regular images with unknown s ha p e wher e o ur metho d can be very adv antageous. Many mo dern metho ds of o b ject detection, especia lly the ones that ar e used by pra ctitioners in medical image analysis requir e to p erform a t leas t a pr elim- inary reconstruction of the image in or der for an ob ject to b e detected. This usually makes suc h metho ds difficult for a rigor ous analysis of p erfo rmance and for er ror con trol. Our approach is free from this drawback. Even though so me pap ers w ork with a s imila r s etup (se e Aria s-Castro et al. (2005)), b o th our ap- proach and our re s ults differ substantially from this and other studies of the sub ject. W e also do not use any wa velet-based techniques in the pres e n t pap er. W e view the ob ject detection problem as a nonpar ametric hypothesis testing problem within the class of dis crete s tatistical inverse pr o blems. In this pap er , we prop os e an algo rithmic so lution for this nonparametric hy- po thesis testing problem. W e prov e that o ur algorithm has linear complexity in terms of the num b er of pix e ls on the screen, and this pro cedure is not o nly asymptotically consis tent, but o n top of that has accura cy that grows expo ne n- tially with the ”num b er of pixels” in the ob ject of detection. The alg o rithm has a built-in data-dr iven stopping r ule, so there is no need in human as sistance to stop the a lgorithm at an appropriate s tep. In this pap er , we assume that the orig inal image is black-and-white and that the noisy image is grayscale. While our fo cusing o n gr ayscale imag es could have bee n a serio us limitation in ca s e of ima ge r econstruction, it essentially do e s not affect the sco pe of applications in the case of ob ject detection. Indeed, in the v ast ma jority of problems, an ob ject that has to b e detected either has (on the picture under ana lysis) a color that differs from the bac kgr ound colours (for example, in ro a ds detection), or ha s the s ame colour but of a very differ ent int ensity , or a t leas t a n ob ject has a relatively thick b oundary that differs in colour from the background. Moreover, in pr actical applications one often has some pr ior informa tion ab o ut colour s of both the ob ject o f interest and of the background. When this is the case, the method o f the presen t pap er is applica ble after simple res caling of colour v alues. The pap er is organize d as follows. In Sec tion 2 we describ e so me general assumptions that o ne makes in s tatistical pro ces sing of digita l imag e s. The s ta- tistical mo del itself is describ ed in details in Section 3. Suitable thr e sholding for noisy image s is crucial in our metho d and is dev elop ed in Section 4. Our algo- rithm for ob ject detection is presented in Sectio n 5. T heo rem 1 is the ma in res ult ab out consistency and co mputational c omplexity o f the algorithm. Section 6 is devoted to the pro of of the main theorem. 2. Basic framew ork In this sectio n we dis cuss s ome natural and very basic assumptions that we impo se on our mo del. Suppo se w e h av e an analogo us tw o -dimensional image. F or numerical or graphical pro cess ing of images on computers, the image alwa ys has to be dis- cretized. This is achieved via a pixelization pro cedure. imsart-g eneric ver. 2007/04/13 file: Randomized_Algo rithms_and_Percolation_Square_3.tex date: September 12, 201 8 M. La ngovoy and O. Witt ich/Dete c tion in noisy images and p er c olation. 3 A typical example of pixelization pro cedure is as follows. Consider an N × N grid on the squa re containing the imag e, and c o lor black those and only those pixels for whose the pixel’s interior has common p oints with the original image. The result is called a pixelized picture. After certain pro cedure o f pixelization, ea ch pixel gets a rea l num b er attached to it. This assumption means that o ur o nly data av ailable a re given as an array of N 2 real num b ers { Y ij } N i,j =1 . In order to perfor m s ta tistical imag e analysis, we will use only these N 2 nu mbers plus our mo del assumptions. This lea ds us to the following basis assumption. h A1 i Assume that we hav e a square s creen of N × N pix e ls, where we observe pixelized images. W e a ssume that we are getting o ur information abo ut the image from this scr een alone. In the present paper we are in terested in detection of ob jects that hav e a known colo ur. And this colour is differen t from the colo ur of the bac kgro und. Mathematically , this can b e roug hly for m ulated as follows. h A2 i The true (non-nois y) image s ar e black-and-white. Indeed, we are free to a ssume that all the pixels that belong to the meaningful ob ject within the digitalized image have the v alue 1 attached to them. W e ca n call this v alue a black c olour . Additionally , assume that the v alue 0 is attached to thos e and only those pixels that do not b elo ng to the o b ject in th e true image. If the num ber 0 is a ttached to the pixel, we ca ll this pixel white . In this paper we always assume that we observe a noisy image. The nois e itself can b e caus e d, for example, by channel defects or other tra nsmission erro r s, distortions, e tc. Medical scans pr ovide a classic example of noisy images: the scan is alwa ys made indirectly , through the bo dy . In astronomy , one also o bserves noisy imag e s: there ar e optical a nd technological er rors, atmos pher e conditions, etc. The o bserved v a lues o n pixels could b e different from 0 and 1. T his means that we will actually always ha ve a g r eyscale image in the b eginning of our analysis. h A3 i On ea ch pixel we hav e random nois e that has the distribution function F , where F has mean 0 and known v ariance σ > 0; the noise at each pix el is completely independent from nois es o n other pixels. An imp o rtant specia l case is when the noise is normally distributed, i.e. F = N (0 , σ ), where N (0 , σ ) stands for the normal distribution with mean 0 and known v a riance σ > 0. How ever, in general, the nois e do esn’t need to be smooth, symmetric or even contin uous. R emark 1 . W e limit ourselves to tw o - dimensional images only . How ever, our metho d mak es it possible to analyze also n − dimensional imag es, for ea ch n ≥ 1. R emark 2 . It doesn’t really matter if the screen is squar e or rectang ular. W e consider a squa re scre e n only to simplify o ur notation. R emark 3 . It is behind the scop e of the present pa p e r to discuss v arious wa ys to pixelize real-world analogous ima ges. One po ssible metho d of pixelization is often used in literature (see Arias-Castro et al. (2005) and related r eferences). imsart-g eneric ver. 2007/04/13 file: Randomized_Algo rithms_and_Percolation_Square_3.tex date: September 12, 201 8 M. L angovoy and O. Witt ich/Dete c tion in noisy images and p er c olation. 4 The way o f pixelizatio n plays an impo rtant role mostly for those problems in image ana lysis where one needs to give a symptotic estimates f or the b oundary of the ob ject. F or example, consider pixelizing a plane curve. Then o ne ca n cons ider also colouring blac k those pixels that hav e at lea st 4 common po int s with the curve (not necessa r ily 4 interior p oints), etc. How ever, for simpler pro blems like image detection (or crude estimation of o b ject’s shape or in terior ) it is often not impo rtant how many pixels y ou colour at the bounda ry of your ima ge. R emark 4 . Our metho d works not o nly for normal or i.i.d. noise. W e hav e chosen this t y p e of no ise in o rder to ac hieve relatively simple and explicit results. The metho d itself allows the treatment of more co mplicated situations, s uch as singular noise, discrete noise, pixel colo ur flipping, different noise in different screen areas, a nd depe nden t noise. 3. Statistical Mo del Now we are able to formulate the mo del more for mally . W e hav e an N × N array of obser v ations, i.e. w e obser ve N 2 real num b er s { Y ij } N i,j =1 . Denote the true v alue on the pixel ( i , j ), 1 ≤ i, j ≤ N , b y I m ij , and the corresp onding noise by σ ε ij . Therefore, by our mo del assumptions, Y ij = I m ij + σ ε ij , (1) where 1 ≤ i , j ≤ N , σ > 0 and, in accor dance with a ssumption h A 2 i , I m ij =  1 , if ( i , j ) be longs to the ob ject; 0 , if ( i , j ) do es no t belong to the o b ject. (2) T o stress the dependence on the no ise level σ , w e write assumption h A 3 i in the following wa y: ε ij ∼ F, E ε ij = 0 , V ar ε ij = 1 . (3) The noise here doesn’t need to be smo o th, symmetric or even contin uous. More- ov e r, all the r esults b elow ar e ea sily transfer r ed to the even mor e gener al c ase when the no ise has ar bitr ary but known distribution function F gen ; it is not necessary that the no is e has mea n 0 and finite v ar iance. The only adjustment to be made is to replace in a ll the statemen ts quan tities of the form F  · /σ  by the quantities F gen ( · ). The Algorithm 1 b elow and the main Theor em 1 ar e v alid without any changes for a general noise distribution F gen satisfying (8) and (9). Now we can pr o ceed to preliminary quantitativ e estimates. If a pixel ( i, j ) is white in the o riginal imag e, let us denote the corr esp onding pro ba bilit y distr ibu- tion of Y ij by P 0 . F or a bla ck pixel ( i , j ) we denote the c o rresp onding distribution of Y ij by P 1 . W e are free to omit dep endency of P 0 and P 1 on i and j in our notation, since a ll the noises are independent and iden tically distributed. imsart-g eneric ver. 2007/04/13 file: Randomized_Algo rithms_and_Percolation_Square_3.tex date: September 12, 201 8 M. La ngovoy and O. Witt ich/Dete c tion in noisy images and p er c olation. 5 Lemma 1. Su pp ose pixel ( i, j ) has white c olour in the original image. Then for al l y ∈ R : P 0 ( Y ij ≥ y ) = 1 − F  y σ  , (4) wher e F is the di stribution function of t he standar dize d n oise. Pr o of. (Lemma 1): By (3), P 0 ( Y ij ≥ y ) = 1 − P ( σ ε ij < y ) = 1 − F  y σ  . Lemma 2. Supp ose pixel ( i, j ) has black c olour in the original image. Then for al l y ∈ R : P 1 ( Y ij ≤ y ) = F  y − 1 σ  . (5) Pr o of. (Lemma 2): By (3) again, w e have P 1 ( Y ij ≤ y ) = P (1 + σ ε ij ≤ y ) = P ( σ ε ij ≤ y − 1) = F  y − 1 σ  . 4. Thresholding and Graphs of Images Now we a re ready to describe one o f the main ingredients of our method: the thr esholding . The idea of the thresholding is as follows: in the noisy grayscale image { Y ij } N i,j =1 , we pick some pixels that lo ok as if their real colour was blac k. Then w e colo ur a ll those pixels blac k, irresp ectively of the exact v alue of g r ey that was observed on them. W e take int o a ccount the int ensity of gr ey observed at those pixels only once, in the b eg inning of our pro cedures. The idea is to think that some pixel ”seems to hav e a bla ck co lour” when it is not v ery likely to obta in the observed grey v alue when adding a ”reasonable” no ise to a white pixel. W e colour white all the pixels that weren’t coloured black at the previous step. A t the end of this pro cedur e, w e would have a transformed v ector of 0’s and 1’s, call it { Y i,j } N i,j =1 . W e will b e a ble to analyse this transfo r med picture by using certain r esults from the mathematical theory o f perco lation. This is the main g oal of the present paper . But firs t we ha ve to give more details ab out the thresholding pr o cedure. Let us fix, for each N , a rea l num b e r α 0 ( N ) > 0, α 0 ( N ) ≤ 1, such that there exists θ ( N ) ∈ R satisfying the following condition: P 0 ( Y ij ≥ θ ( N ) ) ≤ α 0 ( N ) . (6) imsart-g eneric ver. 2007/04/13 file: Randomized_Algo rithms_and_Percolation_Square_3.tex date: September 12, 201 8 M. L angovoy and O. Witt ich/Dete c tion in noisy images and p er c olation. 6 Lemma 3 . Assume that (6) is satisfie d for some θ ( N ) ∈ R . Then for the smal lest p ossible θ ( N ) satisfying (6) it holds that F  θ ( N ) σ  = 1 − α 0 ( N ) . (7) Pr o of. (Lemma 3): Obvious by Lemma 1. In this pap er w e will a lwa y s pic k α 0 ( N ) ≡ α 0 for a ll N ∈ N , for s ome constant α 0 > 0. But we will need to hav e v a rying α 0 ( · ) for our future r esearch. W e ar e prepar ed to describ e our thresho lding principle for mally . Let p site c be the critic al pr ob ability for site p er c olation on Z 2 (see Gr immett (19 9 9) for definitions). As a first step, we transfo r m the observed noisy image { Y i,j } N i,j =1 in the following wa y: for all 1 ≤ i , j ≤ N , 1. If Y ij ≥ θ ( N ), s et Y ij := 1 (i.e., in the transformed picture the c o rre- sp onding pixel is colo ur ed black). 2. If Y ij < θ ( N ), s et Y ij := 0 (i.e., in the transformed picture the c o rre- sp onding pixel is colo ur ed white). Definition 1. The a b ove tra ns formation is called thr esholding at the level θ ( N ). The resulting vector { Y i,j } N i,j =1 of N 2 v alues (0’s and 1’s) is called a t hr esholde d pictur e . Suppo se for a moment that we ar e given the or iginal black and white image without noise. One can think of pixels fro m the original picture as of vertices of a planar graph. F urther more, let us colour these N 2 vertices with the same colours as the corres po nding pixe ls o f the o riginal ima ge. W e obtain a graph G with N 2 black or white vertices and (so far) no edges. W e add edg es to G in the following wa y . If any tw o black vertices ar e neigh- bo urs (i.e. the corr esp onding pixels hav e a common side), we connect these tw o vertices with a black edge. If a ny tw o white vertices ar e neighbo urs, we co nnect them with a white edge. W e will not add any e dges betw een non- neighbouring po int s, and w e will not connect v ertices of different co lours to each other. Finally , w e s e e that it is pos sible to view our blac k and white pixelized picture as a collec tio n of black and white ”clusters” on the very sp ecific planar graph (a square N × N subset of the Z 2 lattice). Definition 2. W e ca ll gr aph G the gr aph of the (pur e) pictur e . This is a very sp ecial planar graph, so ther e a re many efficient algorithms to work with blac k and white components of the gra ph. Poten tially , they could be used to efficient ly pro cess the picture. How ever, the ab ov e repres e n tation of the imag e as a graph is lost when one considers no isy images: because of the presence of random noise, w e get man y gray pixels . So, the a b ove cons tr uction do esn’t make sense anymore. W e ov ercome this obstac le with the help of the ab ov e thres holding pro cedur e. W e make θ ( N ) − thres ho lding of the noisy image { Y i,j } N i,j =1 as in Definition 1, but with a very specia l v alue of θ ( N ). O ur goal is to choo se θ ( N ) (a nd corres p o nding α 0 ( N ), see (6)) such tha t: imsart-g eneric ver. 2007/04/13 file: Randomized_Algo rithms_and_Percolation_Square_3.tex date: September 12, 201 8 M. La ngovoy and O. Witt ich/Dete c tion in noisy images and p er c olation. 7 1 − F  θ ( N ) σ  < p site c , (8) p site c < 1 − F  θ ( N ) − 1 σ  , (9) where p site c is the critica l pro ba bilit y for site per colation o n Z 2 (see Grimmett (1999), Kesten (1982)). In case if both (8 ) and (9) are satisfied, what do w e get? After applying the θ ( N ) − thresholding on the no is y picture { Y i,j } N i,j =1 , we obtained a (rando m) black-and-white image { Y i,j } N i,j =1 . Let G N be the graph of this image, as in Definition 2. Since G N is a random, we actually o bserve the so -called site p er c olation o n black vertices within the subset of Z 2 . F ro m this p oint, we can us e results fro m per colation theory to predict formation of black and white clusters on G N , as well as to estimate the n umber of clusters a nd their s iz es a nd shap es. Relations (8) and (9) are crucial here. T o explain this mor e formally , let us split the se t of vertices V N of the gra ph G N int o to groups: V N = V im N ∪ V out N , where V im N ∩ V out N = ∅ , and V im N consists of those and only thos e v ertices that co rresp ond to pixels b elong ing to the orig ina l ob ject, while V out N is left for the pixels from the ba ckground. Denote G im N the subgraph of G N with vertex set V im N , and denote G out N the subgraph of G N with vertex set V out N . If (8 ) and (9 ) are satisfied, w e will obser ve a so-called sup er critic al p er c olation of black clusters on G im N , and a sub critic al p erco lation of black clusters on G out N . Without g oing into m uch details on p erco la tion theory (the necess a ry introduc- tion can b e found in Grimmett (19 9 9) or Kesten (1982)), we men tio n that there will b e a high pr obability of forming relatively la rge black cluster s o n G im N , but there will be o nly little and sca rce black cluster s on G out N . The difference b etw een the two regio ns will be striking , and this is the main comp onent in our imag e analysis metho d. In this pa p er , mathematical p erc olation theory will b e used to der ive quan ti- tative results on behaviour o f clusters for b oth cases. W e will apply those results to build efficien t randomized algorithms that will b e able to detect and estimate the ob ject { I m i,j } N i,j =1 using the difference in p ercola tion phases on G im N and G out N . If the noise level σ is not too large, then (8) and (9) are s atisfied for some θ ( N ) ∈ (0 , 1). Indeed, one simply has to pick θ ( N ) close enough to 1. On the other hand, if σ is r elatively la r ge, it may happ en that (8) and (9) cannot b oth be satis fie d at the s a me time. Definition 3. In the framework defined b y relations (1)-(2) a nd assumptions h A 1 i - h A 3 i , we s ay that the no ise lev el σ is smal l enough (or 1-smal l ), if the system o f inequalities (8) and (9) is satisfied for some θ ( N ) ∈ R , fo r a ll N ∈ N . A very imp ortant practica l iss ue is that of choosing an optimal thr eshold v alue θ . F ro m a purely theoretica l p oint of view, this is not a big issue: o nce (8) and (9) holds for some θ , it is g uaranteed that after θ − thresho lding w e will observe qualitatively different b ehaviour of bla ck and white clusters in or outside of the true ob ject. W e will make use of this in what follo ws. How ever, for practical computations, especially for moderate v alues of N , the imsart-g eneric ver. 2007/04/13 file: Randomized_Algo rithms_and_Percolation_Square_3.tex date: September 12, 201 8 M. L angovoy and O. Witt ich/Dete c tion in noisy images and p er c olation. 8 v alue of θ is imp or tant. Since the goal is to make pe r colations on V im N and V out N lo ok as differen t as p os sible, one has to make the cor resp onding p ercolatio n probabilities for bla ck co lour, namely , 1 − F  θ ( N ) σ  and 1 − F  θ ( N ) − 1 σ  , as differen t as po ssible b oth from each other and from the critical probability p site c . There can b e several reasonable wa ys for c ho osing a suitable thr eshold. F or example, we can pro po se to c ho ose θ ( N ) a s a maximizer of the following function:  1 − F  θ ( N ) σ  − p site c  2 +  1 − F  θ ( N ) − 1 σ  − p site c  2 , (10) provided tha t (8) a nd (9) ho lds. Alterna tively , we can pr op ose to use a maximizer of sig n  1 − F  θ ( N ) − 1 σ  − p site c  + sig n  p site c − 1 + F  θ ( N ) σ  . (11) 5. Ob ject detection W e either obser ve a blank white scree n with accidental noise or there is a n actual ob ject in the blurr ed picture. In this section, we prop ose a n algorithm to make a decisio n o n whic h of the t wo poss ibilities is true. This algorithm is a statistical testing pro cedure. It is desig ned to so lve the questio n of testing H 0 : I ij = 0 for all 1 ≤ i , j ≤ N versus H 1 : I ij = 1 for some i, j . Let us c ho ose α ( N ) ∈ (0 , 1) - the pr ob ability of false dete ction o f an ob ject. More formally , α ( N ) is the ma ximal probability that the a lgorithm finishes its work with the decision that there w as an ob ject in the picture, while in fact there was just noise. In statistical terminolo gy , α ( N ) is the probability of an error of the first kind. W e allow α to dep end on N ; α ( N ) is connected with complexity (and ex- pec ted working time) of our ra ndomized a lgorithm. Since in our metho d it is crucial to observe some kind of p ercolatio n in the picture (at least within the image), the image has to b e ” not too small” in order to b e detectable b y the algorithm: o ne can’t o bserve a nythin g p er colation-a like on just a few pixe ls . W e will use perc olation theory to determine ho w ”large” precisely the ob ject has to be in or der to b e detectable. Some size assumption has to b e present in any detection pr oblem: for example, it is hop eles s to detect a single p oint ob ject on a v ery large screen even in the case of a mode r ate noise. F or an e a sy star t, we make the following (wa y to o strong) la rgeness assump- tions ab o ut the image: h D1 i Assume that the imag e { ( i, j ) | 1 ≤ i, j ≤ N , I ij = 1 } con tains a completely black square with the side of size at least ϕ im ( N ) pixels, where lim N →∞ log 1 α ( N ) ϕ im ( N ) = 0 . (12) imsart-g eneric ver. 2007/04/13 file: Randomized_Algo rithms_and_Percolation_Square_3.tex date: September 12, 201 8 M. La ngovoy and O. Witt ich/Dete c tion in noisy images and p er c olation. 9 h D2 i lim N →∞ ϕ im ( N ) log N = ∞ . (13) F urthermo re, we as s ume the obvious c onsistency assumption ϕ im ( N ) ≤ N . (14) Assumptions h D 1 i and h D 2 i are sufficient c onditions for our algorithm to work. They are wa y to o strong for our purpos es. It is poss ible to relax (13) a nd to replace a squa re in h D 1 i b y a triang le - shap ed figure. Although the a b ove tw o co nditions a re o f a symptotic character , most o f o ur estimates below are v alid for finite N as w ell. Nev ertheless , it is imp or tant to remark here tha t a symptotic results for N → ∞ a lso have int eres ting practical consequences. More specifica lly , assume tha t ph ysica lly we always hav e scr e ens of a fixed size, but the reso lution N 2 of our cameras can grow unboundedly . When N tends to infinity , w e see that the same physical ob ject that has, say , 1mm in width a nd in length, contains more and more pixe ls o n the pixelized image. Therefor e, for high-resolution pictures, our alg orithm could detect fine structures (lik e nerves etc.) that are not directly visible b y a human eye. Now w e ar e ready to for mu late o ur D et e ction Algo rithm . Fix the false detec- tion rate α ( N ) be fo re r unning the a lg orithm. Algorithm 1 (Detection). • Step 0. Find an optimal θ ( N ). • Step 1. Perform θ ( N ) − thresho lding of the noisy picture { Y i,j } N i,j =1 . • Step 2. Until {{ Black cluster of size ϕ im ( N ) is found } or { all blac k cluster s a r e found } } , Run depth-fir st sea rch (T arjan (19 72)) on the graph G N of the θ ( N ) − thresholded picture { Y i,j } N i,j =1 • Step 3. If a blac k cluster o f size ϕ im ( N ) was fo und, rep or t that an o b ject was detected • Step 4. If no blac k cluster was la r ger than ϕ im ( N ), rep or t that there is no ob ject. A t Step 2 o ur alg orithm finds and stores not only sizes of black clusters, but also co ordina tes o f pixels constituting each cluster. W e remind tha t θ ( N ) is defined as in (6), G N and { Y i,j } N i,j =1 were defined in Sectio n 1, and ϕ im ( N ) is any function sa tisfying (12). The depth-first sea rch algorithm is a standard pro cedure used for searching connected comp onents on g raphs. This pro cedur e imsart-g eneric ver. 2007/04/13 file: Randomized_Algo rithms_and_Percolation_Square_3.tex date: September 12, 201 8 M. L angovoy and O. Witt ich/Dete c tion in noisy images and p er c olation. 10 is a deterministic algorithm. The detailed description a nd rig orous complexity analysis can b e fo und in T ar jan (1972), or in the classic b o o k Aho et al. (197 5), Chapter 5. Let us prove that Algorithm 1 works, and determine its complexity . Theorem 1. L et σ b e 1-smal l. Supp ose assumptions h D 1 i and h D 2 i ar e satis- fie d. Then 1. Algorithm 1 fi nishes its work in O ( N 2 ) steps, i.e. is line ar. 2. If ther e was an obje ct in the picture , Algorithm 1 dete cts it with pr ob ability at le ast (1 − exp( − C 1 ( σ ) ϕ im ( N ))) . 3. The pr ob ability of false de te ction do esn ’t exc e e d min { α ( N ) , exp( − C 2 ( σ ) ϕ im ( N )) } for al l N > N ( σ ) . The c onstants C 1 > 0 , C 2 > 0 and N ( σ ) ∈ N dep end only on σ . R emark 5 . Dep endence o n σ implicitly means dep endence o n θ ( N ) as well, but this do esn’t sp oil Theo rem 1. Remember that we can c o nsider θ ( N ) to b e a function of σ in v iew of our comments b efor e (10 ) a nd (11). Theorem 1 means tha t Algor ithm 1 is of quick est po ssible or de r : it is line ar in the input s ize. It is difficult to think o f a n algorithm working q uick er in this problem. Indeed, if the ima ge is v ery small and loca ted in a n unknown place on the s creen, or if there is no image a t all, then any algo rithm solving the detection problem will hav e to at lea s t upload informa tion ab o ut O ( N 2 ) pixels, i.e. under general ass umptions of Theore m 1, a ny detection alg orithm will ha ve at least linear complexity . Another imp or tant point is that Algorithm 1 is not o nly co ns istent , but that it ha s ex p onential r ate o f a ccuracy . 6. Pro ofs This section is devoted to pro vide complete pro ofs of the above results. So me crucial estimates from per c olation theory are also pr e s ented for the reader ’s conv enience. Pr o of. (Theorem 1): Part I. Fir st w e prove the complexity result. Finding a suitable (approximate, within a pr edefined error ) θ fro m (10 ) or (11) takes a constant n umber of ope r - ations. See, for example, Krylov e t al. (1976). The θ ( N ) − thresho lding giv es us { Y i,j } N i,j =1 and G N in O ( N 2 ) oper ations. This finishes the analysis of Step 1. As for Step 2, it is known (see, fo r exa mple, Aho et al. (1975), Chapter 5, or T arjan (19 7 2)) that the standard depth-fir st sea rch finishes its work also in O ( N 2 ) steps. It tak es not mo re than O ( N 2 ) op era tions to save p ositions o f all pixels in all cluster s to the memor y , since one has no more than N 2 po sitions and clusters. This completes ana lysis of Step 2 and shows that Algorithm 1 is linear in the size of input data. imsart-g eneric ver. 2007/04/13 file: Randomized_Algo rithms_and_Percolation_Square_3.tex date: September 12, 201 8 M. La ngovoy and O. Witt ich/Dete c tion in noisy images and p er c olation. 11 Part I I. Now we prove the b ound on the probability of false detection. Deno te p out ( N ) := 1 − F  θ ( N ) σ  , (15) a probability of erroneously marking a white pixel outside of the imag e as black. Under assumptions of Theorem 1, p out ( N ) < p site c . W e prov e the following a dditional theor em: Theorem 2. Supp ose that 0 < p out ( N ) < p site c . Ther e exists a c ons t ant C 3 = C 3 ( p out ( N )) > 0 such that P p out ( N ) ( F N ( n )) ≤ ex p( − n C 3 ( p out ( N ))) , for al l n ≥ ϕ im ( N ) . (16) Her e F N ( n ) is the event that ther e is an erroneo usly marked black cluster of size gr e ater or e qual n , lying in the squar e of size N × N c orr esp onding to the scr e en. (An err one ously marke d black clu s t er is a black cluster on G N such that each of the pixels in the cluster was wr ongly c olour e d bla ck after the θ − thr esholding.) Before pro ving this result, we state the following theore m ab out sub critical site perc olation. Theorem 3 . (Aize nman-N ewman) Consider site p er c olation with pr ob ability p 0 on Z 2 . Ther e exists a c onstant λ site = λ site ( p 0 ) > 0 such that P p 0 ( | C | ≥ n ) ≤ e − n λ site ( p 0 ) , for al l n ≥ 1 . (17) Her e C is the op en cluster c ontaining the origin. Pr o of. (Theorem 3): See Bollob´ as and Riordan (2006). T o conclude Theor em 2 from Theorem 3, we will use the celebrated FKG inequality (see F ortuin et al. (1971), or Grimmett (1999), Theorem 2.4, p.34; see a lso Grimmett’s b o ok for some explana tion o f the terminology). Theorem 4. If A and B ar e b oth incr e asing (or b oth de cr e asing) events on the same me asur able p air (Ω , F ) , then P ( A ∩ B ) ≥ P ( A ) P ( B ) . Pr o of. (Theorem 2): Denote by C ( i, j ) the lar gest clus ter in the N × N scre e n containing the pixel with co ordinates ( i, j ), a nd by C (0) the larg est bla ck clus ter on the N × N screen con taining 0 . By Theor em 3, for a ll i , j : 1 ≤ i , j ≤ N : P p out ( N ) ( | C (0 ) | ≥ n ) ≤ e − n λ site ( p out ) , (18) P p out ( N ) ( | C ( i, j ) | ≥ n ) ≤ e − n λ site ( p out ) . Obviously , it only he lp ed to inequalities (17) and (18) that we have limited our clusters to only a finite subset instead of the who le lattice Z 2 . On a side note, there is no sy mmetry anymore b etw een arbitra ry points of the N × N finite square; luckily , this do esn’t a ffect the present pro of. imsart-g eneric ver. 2007/04/13 file: Randomized_Algo rithms_and_Percolation_Square_3.tex date: September 12, 201 8 M. L angovoy and O. Witt ich/Dete c tion in noisy images and p er c olation. 12 Since { | C (0) | ≥ n } and { | C ( i, j ) | ≥ n } are increasing events (on the mea- surable pair corres po nding to the standard random-g r aph mo del on G N ), w e hav e that { | C (0 ) | < n } and { | C ( i, j ) | < n } are decr easing ev ents for all i , j . By FKG inequality for decreasing even ts, P p out ( N ) ( | C ( i, j ) | < n fo r a ll i, j, 1 ≤ i, j ≤ N ) ≥ Y Y 1 ≤ i,j ≤ N P p out ( N ) ( | C ( i, j ) | < n ) ≥ (b y (18)) ≥  1 − e − n λ site ( p out )  N 2 . W e denote below by C a b the ” a o ut of b ” binomia l coe fficie n t. It follows that P p out ( N ) ( F N ( n )) = P p out ( N )  ∃ ( i, j ) , 1 ≤ i, j ≤ N : | C ( i , j ) | ≥ n  ≤ 1 −  1 − e − n λ site ( p out )  N 2 = 1 − N 2 X k =0 ( − 1) k C k N 2 e − n λ site ( p out ) k = N 2 X k =1 ( − 1) k − 1 C k N 2 e − n λ site ( p out ) k = N 2 e − n λ site ( p out ) + o  N 2 e − n λ site ( p out )  , bec ause we assumed in (16) tha t n ≥ ϕ im ( N ), and log N = o ( ϕ im ( N )). More- ov e r, w e see immediately that Theorem 2 follows now w ith some C 3 such that 0 < C 3 ( p out ( N )) < λ site ( p out ( N )). The expo nent ial b ound on the pro bability o f fals e detection follows from Theorem 2. Part II I. It rema ins to prove the low er b ound on the pr obability o f true detection. First w e prov e the following theorem: Theorem 5 . Consider site p er c olation on Z 2 lattic e with p er c olation pr ob ability p > p site c . L et A n b e the event that ther e is an op en p ath in the r e ctangle [0 , n ] × [0 , n ] joining some vertex on its left s ide to some vertex on its right side. L et M n b e the maximal numb er of vertex-disjoint o p en left-right cr ossings of the r e ctangle [0 , n ] × [0 , n ] . Then ther e exist c onstant s C 4 = C 4 ( p ) > 0 , C 5 = C 5 ( p ) > 0 , C 6 = C 6 ( p ) > 0 such that P p ( A n ) ≥ 1 − n e − C 4 n , (19) P p ( M n ≤ C 5 n ) ≤ e − C 6 n , (20) and b oth ine qualities holds for all n ≥ 1 . imsart-g eneric ver. 2007/04/13 file: Randomized_Algo rithms_and_Percolation_Square_3.tex date: September 12, 201 8 M. La ngovoy and O. Witt ich/Dete c tion in noisy images and p er c olation. 13 Pr o of. (Theorem 5): One proves this by a sligh t mo dification of the cor resp ond- ing result for bond pe r colation on the sq uare lattice. See pro of of L e mma 11.22 and pp. 294 - 295 in Grimmett (1999). Now supp ose that we have an o b ject in the picture that s atisfies assump- tions of Theorem 1. Consider any ϕ im ( N ) × ϕ im ( N ) squar e in this image. After θ − thresholding of the picture by Algor ithm 1 , w e observe on the selected square site perc olation with probability p im ( N ) := 1 − F  θ ( N ) − 1 σ  > p site c . Then, by (19) o f The o rem 5, there exists C 4 = C 4 ( p im ( N )) such that there will be at le ast one cluster of size no t less than ϕ im ( N ) (for ex a mple, one could take any of the existing left-rig ht crossing s as a pa rt of such cluster ), provided that N is bigger than certain N ( p im ( N )) = N ( σ ); and all that happens with probability at least 1 − n e − C 4 n > 1 − e − C 3 n , for s ome C 3 : 0 < C 3 < C 4 . Theorem 1 is prov ed. Ac knowledgmen ts. The authors would like to thank Laurie Da vies, Remco v an der Ho fstad, Artem Sap o zhniko v , Shota Gugushvili a nd Geurt Jongblo ed for helpful disc us sions. References Alfred V. Aho, J ohn E. Hop cr oft, and Jeffrey D. Ullman. The design and analysis of c omputer algorithms . Addison-W esley P ublishing Co., Reading , Mass.-Londo n-Amsterdam, 1975. Seco nd print ing, Addison- W esley Se r ies in Computer Scie nc e and Information Pro cessing. Ery Arias-C a stro, David L. Do no ho, and Xiao ming Huo. Near-optimal detection of geometric ob jects by fast multiscale metho ds. IEEE T r ans. Inform. The ory , 51(7):240 2–24 25, 2005 . ISSN 00 18-94 48. B´ ela Bollob´ as and Oliver Riordan. Pe r c olation . Cam bridge University Press, New Y ork, 2006. ISBN 978-0 -521- 87232-4; 0-521- 8723 2 -4. C. M. F ortuin, P . W. K asteleyn, and J. Ginibre. Correla tion inequalities on some partia lly ordere d sets. Comm. Math. Phys. , 22:89– 1 03, 197 1. ISSN 0010- 3616. Geoffrey Grimmett. Per c olation , volume 321 of Grund lehr en der Mathema- tischen Wissenschaften [F u ndamental Principles of Mathematic al Scienc es] . Springer-V erlag, Berlin, second e dition, 1999. ISBN 3-540 - 6490 2 -6. Harry Kesten. Per c olation the ory for mathematicians , volume 2 of Pr o gr ess in Pr ob ability and Statistics . Birkh¨ auser Bosto n, Mass ., 1982 . ISBN 3-764 3- 3107- 0. imsart-g eneric ver. 2007/04/13 file: Randomized_Algo rithms_and_Percolation_Square_3.tex date: September 12, 201 8 M. L angovoy and O. Witt ich/Dete c tion in noisy images and p er c olation. 14 V. I. Kr ylov, V. V. Bobko v, and P . I. Monastyrn y ˘ ı. Vychislitelnye meto dy. Tom I . Izda t. “Nauk a”, Mos c ow, 197 6. M. Negri, P . Gamba, G. Lisini, and F. T upin. Junction-aw are extraction and regular iz ation of urban road netw or ks in high-reso lution sar images. Ge o- scienc e and R emote S en sing, IEEE T r ansactions on , 4 4(10):29 62–29 71, Oct. 2006. ISSN 0196 -2892 . . Lucia Ricci- Vitiani, Dario G. Lo mbardi, Ema nuela Pilo zzi, Mauro Biffoni, Matilde T o dar o, Cesare Pesc hle, and Rugg ero De Maria. Identification and expansion o f human colon-ca ncer-initiating ce lls. N atur e , 4 45(712 3):111– 115, Oct. 2007. ISSN 0028- 0836. Sunil K. Sinha and Paul W. Fieg uth. Automated detection of cracks in buried concrete pip e images. Automation in Construct ion , 15(1):58 – 72, 2006. ISSN 0926- 5805. . Rob ert T arjan. Depth-first search and linear gr a ph algor ithms. SIAM J. Com- put. , 1(2):146–1 60, 19 72. ISSN 0097-5 397. imsart-g eneric ver. 2007/04/13 file: Randomized_Algo rithms_and_Percolation_Square_3.tex date: September 12, 201 8

Original Paper

Loading high-quality paper...

Comments & Academic Discussion

Loading comments...

Leave a Comment