im = imread('image.bmp');x = []; %creating empty matrix for x
y = [];%creating empty matrix for y
for i = [1: size(im,1)] for j = [1:size(im,2)] if 120 < im(i,j) < 200 { x = [x,i]; y = [y,j]; i = 1; j = 1; end } endend
MATLAB: How to make this code work? i am trying to threshold an image.
digital image processingimage analysisimage processing
Best Answer