필터 지우기
필터 지우기

Problem with animated line, not drawing anything

조회 수: 10 (최근 30일)
Santiago Marin
Santiago Marin 2019년 9월 2일
댓글: Santiago Marin 2019년 9월 3일
I want to plot the value a metric takes while varying the filter sigma value, the code is as follows:
ImgOrg=imread('ROIOriginal_pgm25.png'); %Load the image
for sigmaVal=0.5:0.1:5
Imed=imgaussfilt(ImgOrg,sigmaVal); %Apply the filter with the sigma value
[peaksnr, ~] = psnr(Imed, ImgOrg); %Calculate the metric after applying the filter
h = animatedline;
addpoints(h,sigmaVal,peaksnr)
drawnow limitrate
end
But all I get is an empty figure, I can't see any line or any point. I'm in Matlab R2019a.

채택된 답변

Walter Roberson
Walter Roberson 2019년 9월 2일
Move the
h = animatedline;
to before the loop.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Animation에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by