[mmdrobotop] [Up] [mmdsoil] | Demonstrations |
The input image is a gray-scale image of a ruler, that has a number touching a tick mark. This number and mark are detected based on morphological and connected filtering.
The close top-hat operator followed by a thresholding is applied.
>>> b = mmthreshad( mmcloseth(a,mmsebox(5)),40);
Warning: Converting input image from int32 to uint8.
>>> mmshow(b);
![]() |
|
b |
The vertical lines longer than 50 pixels are detected.
>>> c = mmopen(b,mmseline(50,90));
>>> mmshow(c);
![]() |
|
c |
It detects all objects vertically connected to the ruler tick mark. Note that the 3x1 rectangle is used as structuring element in the vertical reconstruction.
>>> f = mminfrec(d,b,mmseline(3,90));
>>> mmshow(f);
![]() |
|
f |
It uses an opening by an elementary cross structuring element to eliminate the artifacts.
>>> h = mmopen(g);
>>> mmshow(h);
![]() |
|
h |
It detects the objects connected to ruler tick marks. A reconstruction from the ruler marks detected is applied.
>>> i = mminfrec(h, b);
>>> mmshow(i);
![]() |
|
i |
[mmdrobotop] [Up] [mmdsoil] | ![]() |
Copyright (c) 2003, Roberto A. Lotufo, UNICAMP-University of Campinas; Rubens C. Machado, CenPRA-Renato Archer Research Center. |