From: ImageAnalyst on 12 Jul 2010 20:09 On Jul 7, 2:45 pm, "eli goodwin" <egood...(a)uoregon.edu> wrote: [snip] > I tried this > lblmask = bwlabel(mask) > > then further along... > s = regionprops(lbl, lblmask, 'area'); > > and it didn't work. no areas were calculated and the resulting binary video was empty (all black). ----------------------------------------------------- Well look at your code. You passed in some undefined array as your first argument - it should have been lblmask. Then look at your second argument - it's the labeled image but it should be the original gray scale image. If what your other message was referring to was a way of taking a mean and area with a logical linear index like this: meanGL = mean(redImage(maskImage)); area = sum(maskImage(:)); as long as you're calculating the stats over all blobs in the image. You really only need regionprops() if you have multiple blobs, otherwise there are alternatives. -ImageAnalyst then, yes, you can do it that way.
First
|
Prev
|
Pages: 1 2 Prev: Diagonal matrix recognition Next: what does mean " Multichannel Image " |