Horus Doc || C++ Reference || Class Overview   Pixels   Images   Detector   Geometry   Registry || Doxygen's quick Index  

HxConditionalErosion.h File Reference

More...

#include "HxSF.h"

Go to the source code of this file.

Functions

HxImageRep L_HXIMAGEREP HxConditionalErosion (HxImageRep im, HxImageRep mask, HxSF sf, int nrIter=1)
 /input im /input mask /input sf /input nrIter number of iterations. More...


Detailed Description


Function Documentation

HxImageRep L_HXIMAGEREP HxConditionalErosion HxImageRep    im,
HxImageRep    mask,
HxSF    sf,
int    nrIter = 1
 

/input im /input mask /input sf /input nrIter number of iterations.

default value=1. function y=mmcero_equ(f,g,b,n)
y = mmunion(f,g);
for i=1:n
ero = mmero(y,b);
y = mmunion(ero,g);
end

NOTE: mmunion takes the maximum of the two images

00024 {
00025 
00026     HxImageRep res, ero;
00027 
00028     res = ::HxMax(im, mask);
00029 
00030     HxImageRep tmp1, tmp2;
00031     int ncheck=10;
00032     tmp1 = res;
00033 
00034     for(int i=0; i< nrIter; i++)
00035     {
00036         ero = HxErosion(res, sf);
00037         res = ::HxMax(ero, mask);
00038 
00039         if( i% ncheck ==0)
00040         {
00041             tmp2 = res;
00042             if( HxPixSum(HxEqual(tmp1, tmp2)).HxScalarIntValue() == res.numberOfPixels() )
00043                 break;
00044             else
00045                 tmp1 = tmp2;
00046         }
00047     }
00048     return res;
00049 }


Generated on Tue Feb 3 14:18:46 2004 for C++Reference by doxygen1.2.12 written by Dimitri van Heesch, © 1997-2001