From: Image Analyst on 26 Apr 2010 20:54 Nathan: Did you know that if you use the "thicken" option for bwmorph(), it won't join objects, unlike dilate which WILL join objects? If you extract out one blob at a time, dilate it and OR it back it, you will have joined/connected separate blobs. -ImageAnalyst
From: Nathan on 26 Apr 2010 21:11 On Apr 26, 5:54 pm, "Image Analyst" <imageanal...(a)mailinator.com> wrote: > Nathan: > Did you know that if you use the "thicken" option for bwmorph(), it won't join objects, unlike dilate which WILL join objects? If you extract out one blob at a time, dilate it and OR it back it, you will have joined/connected separate blobs. > -ImageAnalyst Ah, yeah. I've noticed that. Sometimes my blobs, through thresholding and whatnot, should be connected while they aren't, so dilate is what I was looking for. Thanks, though. -Nathan
From: Image Analyst on 26 Apr 2010 21:29 Are you sure you're not looking for imclose(), which will connect and smooth boundaries while maintaining roughly the original size of the blob (because it dilates but then shrinks back down by following that with an erosion)?
From: Nathan on 27 Apr 2010 16:52 On Apr 26, 6:29 pm, "Image Analyst" <imageanal...(a)mailinator.com> wrote: > Are you sure you're not looking for imclose(), which will connect and smooth boundaries while maintaining roughly the original size of the blob (because it dilates but then shrinks back down by following that with an erosion)? Ah, no. I have multiple options in my program to edit a given sub- image to find the area of each blob. I somewhat automate finding each blob using a pretty decent thresholding technique (the Triangle method that you either mentioned to me or you've heard me speak of before in a different thread). This thresholding, due to an uneven background level, causes some blobs to be slightly smaller than they should be, and therefore one dilate is usually sufficient to fill in the full area of the blob. I also have options for eroding, a usage of the graythresh at a given threshold, and some manual manipulations available for me (such as splines, filling in regions, drawing single pixels, and deleting rectangular regions). I will also look into eroding a selected region now that I think of it, but as far as I can tell the same scenario applies as imdilate/ imerode and bwmorph with 'dilate' or 'erode' Thanks for your interest in helping me out. (Note that I DO have some functional form of imclose implemented such that the user is allowed to dilate and erode manually as they please) -Nathan
From: Nathan on 27 Apr 2010 18:03 On Apr 27, 1:52 pm, Nathan <ngrec...(a)gmail.com> wrote: > On Apr 26, 6:29 pm, "Image Analyst" <imageanal...(a)mailinator.com> > wrote: > > > Are you sure you're not looking for imclose(), which will connect and smooth boundaries while maintaining roughly the original size of the blob (because it dilates but then shrinks back down by following that with an erosion)? > > Ah, no. I have multiple options in my program to edit a given sub- > image to find the area of each blob. I somewhat automate finding each > blob using a pretty decent thresholding technique (the Triangle method > that you either mentioned to me or you've heard me speak of before in > a different thread). This thresholding, due to an uneven background > level, causes some blobs to be slightly smaller than they should be, > and therefore one dilate is usually sufficient to fill in the full > area of the blob. > > I also have options for eroding, a usage of the graythresh at a given > threshold, and some manual manipulations available for me (such as > splines, filling in regions, drawing single pixels, and deleting > rectangular regions). > > I will also look into eroding a selected region now that I think of > it, but as far as I can tell the same scenario applies as imdilate/ > imerode and bwmorph with 'dilate' or 'erode' > > Thanks for your interest in helping me out. > > (Note that I DO have some functional form of imclose implemented such > that the user is allowed to dilate and erode manually as they please) > > -Nathan Ah, imerode seems to not be the same thing as using bwmorph with the 'erode' option. Test example on r2010a/r2009b/r2009a/r2007b: >> tmp = bwmorph(true(5),'erode',1) tmp = 0 0 0 0 0 0 1 1 1 0 0 1 1 1 0 0 1 1 1 0 0 0 0 0 0 >> tmp2 = imerode(true(5),ones(3)) tmp2 = 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 This makes me question whether imerode is working correctly... Eroding a 5x5 matrix full of ONES/TRUE should at least get rid of the outer layer, as the bwmorph with 'erode' does. Could someone tell me why imerode does not (and has not) do this? So far: 1 point for using bwmorph, 0 points for using imdilate/ imerode. -Nathan
First
|
Prev
|
Next
|
Last
Pages: 1 2 3 Prev: Error compiler MATLAB. Next: call by reference for calllib |