Why is the subplot not holding the plot ?It just plots the 1st part and does not wait for 2nd to get computed?
조회 수: 1 (최근 30일)
이전 댓글 표시
clear all;
close all;
aa=imread ('cm.jpg');
%Digital negative-------
figure(1);
subplot (2, 2, 1);
imshow ([255-aa]);
title ('Digital negative of image net');
%Thresholding of image-------
t=input ('Enter threshold value ');
r=double(aa);
[row col]=size(r);
for i=1:1:row
for j=1:1:col
if(r(i,j)>t);
r(i, j)=1;
else
r(i,j)=0;
end
end
end
subplot(2, 2, 2);
imshow(r);
title ('Thresholding of image');
댓글 수: 0
답변 (1개)
Image Analyst
2018년 10월 27일
It should wait at this line
t=input ('Enter threshold value ');
for you to enter a number, then continue. That's what it does for me. Are you saying it does not wait for you to enter something in the command window?
You might like my interactive thresholding app: https://www.mathworks.com/matlabcentral/fileexchange/29372-thresholding-an-image
댓글 수: 2
Image Analyst
2018년 10월 28일
Do even see the 'Enter threshold value ' prompt in the command window?
You don't have any m-file of variable also called input, do you? What does this say
>> which -all input
참고 항목
카테고리
Help Center 및 File Exchange에서 Subplots에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!