Are image morphological operations invalid for RGB images?
4 次查看(过去 30 天)
显示 更早的评论
Most (if not all) of the morphological operations (e.g. imdilate, imerode, imtophat, imbothat) specify that the input image should be grayscale or binary. However, using an RGB image does not yield an error. Why is this? Is it ill-advised to use these functions with RGB (or other 3D) images?
0 个评论
采纳的回答
Image Analyst
2015-10-10
It treats it like a 3D volumetric image, like a CT or MRI image, not like a 2D color image. However, it can operate color plane - by - color plane like I think you want, if you give it a kernel that is flat (no extent in the Z direction). You just have to know what you're doing. Usually doing morphological operations on the RGB color channels does not make sense and can produce color artifacts, whereas for a volumetric image it does make sense.
2 个评论
Image Analyst
2015-10-10
Well if it works and you're happy with the results, then fine. But you may find that how well objects "survive" that filtering very much depends on the relative size of your object and your filtering window width. You may also find some share artifacts and some extra noise than some other methods might give. The bottom hat filter is the morphological closing minus the original image. Basically it's assuming the local max will be the background image and this can be noisier than say, fitting a smoothed or regression function. But it's easy, and if it works, then use it.
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!