|[mmdpotatoes] [Up] [mmdruler]||Demonstrations|
The input-image is a gray-scale image of a rounded-shaped robot, viewed by a camera mounted on the ceiling. The procedure detects two white marks on top of the robot. This is a typical example of application of the top-hat operator in image segmentation.
The gray-scale image of the robot top view is read.
a = mmreadgray('robotop.tif');
It detects white regions smaller than a square of radius 4.
b = mmopenth(a,mmsebox(4));
It removes white objects smaller than a square of radius 1.
c = mmopen(b,mmsebox);
It detects the robot markers. This is a very robust thresholding (i.e., the result is not sensible to small changes in the value of the threshold parameter). The original image is overlayed by the detected robot markers.
d = mmthreshad(c,100);
Warning: converting image from scalar to uint8
|[mmdpotatoes] [Up] [mmdruler]|
|Copyright (c) 1998-2008 by SDC Information Systems|