Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

Sorry, I give you wrong blog. try ref: http://lh2078.blog.163.com/blog/static/56811372201051911038896/

and code there:

CV_IMPL void lhMorpRemoveSmallObject(const CvArr* src,CvArr dst,IplConvKernel * element ,int iterations) { IplImage temp = cvCreateImage(cvGetSize(src),8,1); cvGetImage(src,temp); cvErode(src,temp,element,iterations); lhMorpRDilate(temp,src,dst,NULL,-1); cvReleaseImage(&temp); }

Sorry, I Hi about removing small area, you can ref:http://lh2078.blog.163.com/blog/static/56811372201051911038896/ But this blog is Simple Chinese word. If you have grey regin, i think you must give a thresh, and removesmall object. finally use brainy pic and orginal pic , then you can give you wrong blog. try ref: http://lh2078.blog.163.com/blog/static/56811372201051911038896/

and want. I don't know it's good for you or not. The code there:

CV_IMPL void lhMorpRemoveSmallObject(const CvArr* src,CvArr dst,IplConvKernel * element ,int iterations) { IplImage temp = cvCreateImage(cvGetSize(src),8,1); cvGetImage(src,temp); cvErode(src,temp,element,iterations); lhMorpRDilate(temp,src,dst,NULL,-1); cvReleaseImage(&temp); }