<html> <head> <meta content="text/html; charset=ISO-8859-1" http-equiv="Content-Type"> <title>mmdrobotop</title> <link href="../tbxdok.css" rel="stylesheet"> </head> <body> <table class="topNav"> <tr> <td class="index"> [<a href="../mmdemos/mmdpotatoes.html"><tt>mmdpotatoes</tt></a>] [<a href="index.html">Up</a>] [<a href="../mmdemos/mmdruler.html"><tt>mmdruler</tt></a>] </td> <td class="title">Demonstrations</td> </tr> </table> <h1>mmdrobotop <br> <span class="subtitle">Detect marks on a robot. </span> </h1> <div class="descr"> <H2>Description</H2> <div class="H2"> <p> 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. </p> </div> </div> <div class="script"> <H2>Demo Script</H2> <div class="H2"> <div class="slide"> <H3>Reading </H3> <div class="H3"> <p> <p> The gray-scale image of the robot top view is read. </p> <div class="example"> <div class="listing"> <pre class="user">>>> a = mmreadgray('robotop.tif');</pre> <pre class="computer"></pre> <pre class="user">>>> mmshow(a);</pre> <pre class="computer"></pre> </div> <table class="images"> <tbody align="center"> <tr class="image" valign="bottom"> <td><img width="320" src="../images/img_mmdrobotop_001.jpg"></td> <td class="spare"></td> </tr> <tr class="title" valign="baseline"> <td><a href="../images/img_mmdrobotop_001.jpg">a</a></td> <td class="spare"></td> </tr> </tbody> </table> </div> </p> </div> </div> <div class="slide"> <H3>Open top-hat</H3> <div class="H3"> <p> <p> It detects white regions smaller than a square of radius 4. </p> <div class="example"> <div class="listing"> <pre class="user">>>> b = mmopenth(a,mmsebox(4));</pre> <pre class="computer"></pre> <pre class="user">>>> mmshow(b);</pre> <pre class="computer"></pre> </div> <table class="images"> <tbody align="center"> <tr class="image" valign="bottom"> <td><img width="320" src="../images/img_mmdrobotop_002.jpg"></td> <td class="spare"></td> </tr> <tr class="title" valign="baseline"> <td><a href="../images/img_mmdrobotop_002.jpg">b</a></td> <td class="spare"></td> </tr> </tbody> </table> </div> </p> </div> </div> <div class="slide"> <H3>Opening</H3> <div class="H3"> <p> <p> It removes white objects smaller than a square of radius 1. </p> <div class="example"> <div class="listing"> <pre class="user">>>> c = mmopen(b,mmsebox());</pre> <pre class="computer"></pre> <pre class="user">>>> mmshow(c);</pre> <pre class="computer"></pre> </div> <table class="images"> <tbody align="center"> <tr class="image" valign="bottom"> <td><img width="320" src="../images/img_mmdrobotop_003.jpg"></td> <td class="spare"></td> </tr> <tr class="title" valign="baseline"> <td><a href="../images/img_mmdrobotop_003.jpg">c</a></td> <td class="spare"></td> </tr> </tbody> </table> </div> </p> </div> </div> <div class="slide"> <H3>Thresholding</H3> <div class="H3"> <p> <p> 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. </p> <div class="example"> <div class="listing"> <pre class="user">>>> d = mmthreshad(c,100);</pre> <pre class="computer">Warning: Converting input image from int32 to uint8.</pre> <pre class="user">>>> mmshow(a,d);</pre> <pre class="computer"></pre> </div> <table class="images"> <tbody align="center"> <tr class="image" valign="bottom"> <td><img width="320" src="../images/img_mmdrobotop_004.jpg"></td> <td class="spare"></td> </tr> <tr class="title" valign="baseline"> <td><a href="../images/img_mmdrobotop_004.jpg">a,d</a></td> <td class="spare"></td> </tr> </tbody> </table> </div> </p> </div> </div> </div> </div> <center> <table class="botNav"> <tr> <td class="index"> [<a href="../mmdemos/mmdpotatoes.html"><tt>mmdpotatoes</tt></a>] [<a href="index.html">Up</a>] [<a href="../mmdemos/mmdruler.html"><tt>mmdruler</tt></a>] </td> <td rowspan="2" class="xhtml"><a href="http://www.python.org"><img width="55" alt="Python" height="22" src="../PythonPoweredSmall.gif"></a></td> </tr> <tr> <td class="copyright">Copyright (c) 2003, Roberto A. Lotufo, UNICAMP-University of Campinas; Rubens C. Machado, CenPRA-Renato Archer Research Center.</td> </tr> </table> </center> </body> </html>