SIP - Scilab Image Processing Toolbox >> SIP - Scilab Image Processing Toolbox > percol
Test if binary image is percolated
p = percol(img [,direction])
- an image in which 0 is considered background, while positive values are considered object (also called site).
- 1 if percolation is to be tested horizontally; 0 if it is to be tested vertically
- 1 if image is percolated; 0 otherwise.
Function percol tests if an image is 4-connected from side to side. This is useful for analysing images comming from site percolation simulations. The percol routine has the advantage to be implemented in the C language.
a = 1*(rand(10,10) <= p)
- Ricardo Fabbri <ricardofabbri (AT) users DOT sf DOT net>
The latest version of the Scilab Image Processing toolbox can be found at