Blob Detection
In the case of a binary image, shown below:
blob = connected region of "on" symbols.
4 blobs that are 8-connected!
Go to http://www.cosc.canterbury.ac.nz/mukundan/covn/Label.html for an Applet that does component labeling
Algorithm 1 -Recursive 1.Initialize your label image with no labels for all pixels.
2.Scan your binary image and find the first non-zero pixel, that has no label. Create a label for it in the label image.
3.Find all unmarked non-zero neighbors and mark them as visited with the same label id.
4.For each of these neighbors, go to step 3.
5.Repeat step 2 until you have scanned the entire image. ALGORITHM version a (here labeling where blob /object point has thresholded value of 0 in the binary image) oid compLabel(int i, int j,int m){
ALRGORITHM version b (here labeling where blob /object point has thresholded value of 1 in the binary image) void setLabels(){ void compLabel(int i, int j,int m){ |
Algorithm 2 -Iterative Scan the array, raster fashion.
|