Adding a filter to only white regions of image.
8 次查看(过去 30 天)
显示 更早的评论
Hello, i have grayscale image and black and white image of the grayscale image. I want to add laplace filter to grayscale image pixels where the pixel's values are 1 in black and white image. How can i do this.
0 个评论
采纳的回答
KALYAN ACHARJYA
2021-11-14
result_image=gray_image.*bw_image;
%Now you can apply the filter on result_image
4 个评论
KALYAN ACHARJYA
2021-11-14
You may apply the filter on whole image, and later discard its effect on those 0 pixels??
更多回答(1 个)
Image Analyst
2021-11-14
Looks like you've already accepted an answer so I guess you got it figured out. But here is where I'd refer you:
locallapfilt
Fast local Laplacian filtering of images
Syntax
Description
B = locallapfilt(I,sigma,alpha) filters the grayscale or RGB image I with an edge-aware, fast local Laplacian filter. sigma characterizes the amplitude of edges in I. alpha controls smoothing of details.
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Filtering and Enhancement 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!