#include "HxSF.h"
Go to the source code of this file.
Functions | |
HxImageRep L_HXIMAGEREP | HxConditionalDilation (HxImageRep im, HxImageRep mask, HxSF sf, int nrIter=1) |
function y=mmcdil_equ(f,g,b,n) y = mmintersec(f,g); for i=1:n dil = mmdil(y,b); y = mmintersec(dil,g); end. More... |
|
function y=mmcdil_equ(f,g,b,n) y = mmintersec(f,g); for i=1:n dil = mmdil(y,b); y = mmintersec(dil,g); end. default value=1. function y=mmcdil_equ(f,g,b,n) y = mmintersec(f,g); for i=1:n dil = mmdil(y,b); y = mmintersec(dil,g); end NOTE: mmunion takes the maximum of the two images
00039 { 00040 00041 HxImageRep res, ero; 00042 00043 res = ::HxMin(im, mask); 00044 // res=im.binaryPixOp(mask, "min"); 00045 00049 00050 HxImageRep tmp1, tmp2; 00051 int ncheck=10; 00052 tmp1 = res; 00053 00054 for(int i=0; i< nrIter; i++) 00055 { 00056 ero = HxDilation(res, sf); 00057 res = ::HxMin(ero, mask); 00058 00059 if( i% ncheck ==1) 00060 { 00061 tmp2 = res; 00062 if( HxPixSum(::HxEqual(tmp1, tmp2)).HxScalarIntValue().x() == res.numberOfPixels() ) 00063 break; 00064 else 00065 tmp1 = tmp2; 00066 } 00067 00068 } 00069 00070 00071 return res; 00072 } |