#include "HxSF.h"
Go to the source code of this file.
Functions | |
HxImageRep L_HXIMAGEREP | HxThinning (HxImageRep im, HxSF sf1, HxSF sf2) |
This should be implemented (Rein) as repetitive substraction from the image of result of HitOrMiss. More... |
|
This should be implemented (Rein) as repetitive substraction from the image of result of HitOrMiss. As they are not rotation invariant, the structuring elements of have to be rotated
00210 { 00211 // return HxSub(im,HxHitOrMiss(im,sf1,sf2)); 00212 00213 00214 HxImageSignature sig = im.signature(); 00215 HxSizes sizes(3, 3, 0); 00216 HxValue val(0); 00217 // HxValue val(2); 00218 HxSFFactory SFFi = HxSFFactory::instance(); 00219 HxSF sf; 00220 //Prepare the flat SF 00221 sf = SFFi.makeFlatSF(sig, sizes, val); 00222 00223 00224 HxImageRep contur = HxMorphologicalContour(im,sf); 00225 00226 HxImageRep res = im; 00227 for(int i=0;i<20;i++) 00228 { 00229 res = HxErosion(res,sf); 00230 //res= HxSub(im,contur); 00231 //contur = HxMorphologicalContour(res,sf); 00232 00233 } 00234 return res; 00235 /* 00236 HxTagList tags; 00237 HxAddTag(tags, "connectivity", 8); 00238 00239 return im.queueBasedOp(contur, "thinning", tags); 00240 00241 */ 00242 } |