#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... | |
|
||||||||||||||||||||
|
/input im /input mask /input sf /input nrIter number of iterations.
default value=1. function y=mmcero_equ(f,g,b,n) 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 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001