applying an image filtering technique on 'selected' pixels

3 次查看(过去 30 天)
Hi,
The feature extraction step of my algorithm, applies some filter on data and use the value of filtered pixels as the feature of original pixels of image.
My problem is that I need the feature of only small subset of pixels(threshold-ed pixels), not all of the image. and it is time consuming to filter all of the image, instead of only some pixels.
My question is how can I filter only selected pixels of an image? Is there any matlab function for this purpose?(I think I can not use imfilter)
Thank you.

回答(1 个)

Image Analyst
Image Analyst 2012-5-9
How time consuming is it? Give me a time in seconds. Cropping out all the small regions to their own subimages and then filtering, and then sending them back is one option but it may not be any faster.
  10 个评论
Image Analyst
Image Analyst 2012-5-10
Well, you can try what I said but I think with all the figuring out where contiguous blocks live, then extracting them, then filtering them, and then assigning them back to their original locations, and all the bookkeeping involved with that, it won't be more efficient. I think it will be a lot more complicated, harder to maintain, and in the end, probably not faster. But you're welcome to try. If you know that you're always going to filter one known constant block, like image3d(20:50, 42:69, 123:173), then it might not be too bad, but if you had dozens of irregularly shaped and connected blobs, then it could be complicated. And that's not even considering what you're going to do with the edge effects (boundary effects) where your filter kernel partially covers the voxels that you want to filter and partially includes voxels that you don't want to filter.
leila
leila 2012-5-10
Thank you for excellent guidance, your comments help me a lot.

请先登录,再进行评论。

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by