How do I smoothen an imagesc plot?

21 views (last 30 days)
Samyak Kumar
Samyak Kumar on 22 Nov 2020
Commented: Samyak Kumar on 22 Nov 2020
This plot has alot of noise. I mean the light blue lines are more than normal and i need to smoothen it. I used the smooth function but that does not work properly. I want to make it look like the image below.
Please help.
  7 Comments
Samyak Kumar
Samyak Kumar on 22 Nov 2020
yes i have image processing toolbox

Sign in to comment.

Answers (1)

Image Analyst
Image Analyst on 22 Nov 2020
You could threshold the image and then use bwareaopen() or bwareafilt() to find small blobs and set them to zero.
% Get mask of blobs above the background level.
mask = grayImage < someValue;
% Get a mask of only the small blobs
smallBlobs = bwareafilt(mask, [1, smallestAcceptableArea]);
% Erase image by setting small regions equal to the min value
grayImage(mask) = min(grayImage(:));
You, of course, need to determine the values of someValue and smallestAcceptableArea.
Attach your original gray scale image (not a pseudocolor image in a screenshot like you did) if you need more help.

Community Treasure Hunt

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

Start Hunting!