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

Samyak Kumar
Samyak Kumar 2020년 11월 22일
Gaussian Blur is giving the same result.
for i = 1:360
smooth_specbeam(:,i) = imgaussfilt(SpecBeam0(:,i),1);
end
imagesc(squeeze(log10(abs(smooth_specbeam(385:4385, (1:360)))))) % Spectral Beamformed Plot Great Hall
KSSV
KSSV 2020년 11월 22일
Why you are using a loop? You apply it to the complete image. Read the documentation.
Samyak Kumar
Samyak Kumar 2020년 11월 22일
I dont have an image. I have a 2d matrix (6000 x 360), thats why. 'SpecBeam0' is my 2d matrix.
Image Analyst
Image Analyst 2020년 11월 22일
As per my answer below, waiting for you to upload it. And, a 2-D matrix can be considered as a matrix. Do you have the Image Processing Toolbox? Type ver to check?
Samyak Kumar
Samyak Kumar 2020년 11월 22일
Will this help
Samyak Kumar
Samyak Kumar 2020년 11월 22일
yes i have image processing toolbox

댓글을 달려면 로그인하십시오.

답변 (1개)

Image Analyst
Image Analyst 2020년 11월 22일

0 개 추천

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.

질문:

2020년 11월 22일

댓글:

2020년 11월 22일

Community Treasure Hunt

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

Start Hunting!

Translated by