Hello, I need to threshold an image. This is what I've tried (see below) but I just get every pixel of the image with a value of 1. The original data is an ascii file. If it isn't possible to use im2bw in this situation then can anyone suggest an alternative way of thresholding?
imagedata2 = dlmread('C:\data\3d_cells\17_8um_exp0_002_bf_run1.asc');
level = graythresh(image2);
BW2 = im2bw(image2,level);
clims = [0,1.5];
imagebw=imagesc(BW2,clims); colormap gray