Looking to set thresholds to an image but running into issues with the subplot?
Show older comments
%"sobelpic" is the name of the image.
%I'm getting an error that my subplot is too large.
%I'm thinking that I need to manipulate my threshs (somehow?) because ultimately I need to choose "0.34" as a threshold value according to my professor.
threshs = 0.01:0.01:0.8;
for i =1:length(threshs)
BW = im2bw(sobelpic,threshs(i));
subplot(1,2,i); %I can set this to (1,2,2) to get two images but I need more to choose from.
imagesc(BW);
title(['frame ',num2str(i)]);
end
t = input('which threshold?');
BW = im2bw(sobelpic,threshs(t));
BW = imcomplement(BW);
So ultimately I'd like to see 8 images in a sublot with thresholds from 0 to 1, where 0.34 is one of them. Thank you.
Original image is uploaded, the one I'm using has the sobel filter on it, named "sobelpic" in the code.

Accepted Answer
More Answers (0)
Categories
Find more on Images in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!