I am using an algorithm to determine a threshold for image analysis of nuclei in MATLAB. This algorithm measures all the pixel intensities within a nucleus and calculates a value that is used as a cutoff to distinguish background noise from foreground. I know how to apply this value to the image of the nuclei to see what effect the cutoff has, but I would like to apply the threshold to a mesh plot. By chance does anyone know how to do this I cannot post images yet but I have added example code of my image analysis
% First I load image
i = imread('nucleus.tif')
% I calculate the value of the threshold using my algorithm using my function
ci99 = getCI99('nucleus.tif')
% say for example that the calculated value is 100. I would apply this threshold to the image of the nucleus with the following command
imshow(picture , [ 100, inf]) % The resulting image only shows pixels at and above the calculated threshold.
I use the following code to make a mesh plot of a nucleus
% Mesh Plot
I=imread('nucleus.tif');
[x,y]=size(I);
X=1:x;
Y=1:y;
[xx,yy]=meshgrid(Y,X);
i=im2double(I);
figure;mesh(xx,yy,i);
colorbar
figure;imshow(i)
I am trying to apply the cutoff to the mesh plot analogous to the way I apply the threshold to the original image.
I would really appreciate any help.
Thanks