I have a three dimmensional matrix, 2D dimensions of the matrix makes up the image ([894 896]) and the third dimension of the matrix is the images in time (100). Thus, the 3D matricie as a whole is: ([894 896 100]).
I have converted all of these images to binary images and traced the outline using "edge()" method. Thus, I have an image with a traced outline (just 0's and 1's). I now want to save these coordinates so I use the "find()" command. However, I don't know how to perform this on a 3D matrix? Basically for each of the 100 images I would like an outlined result with coordinate points. I have done this for one image so I know it works, I just want to do it automatically so that way I am not doing it 100 times manually.
How can I use "edge()" function on a 3D matrix? From the code below, "PLIFdata(:,:,i)" is just a 848x896x100 matrix.
PLIFadjust = zeros(848,896,100);
PLIF_binary = zeros(848,896,100);
PLIF_gaussfilt = zeros(848,896,100);
PLIF_sharpen = zeros(848, 896, 100);
PLIF_edge = zeros(848, 896, 100);
%% Tracing
n = 100;
for i = 1:n
PLIFadjust(:,:,i) = mat2gray(imadjust(PLIFdata(:,:,i)));
PLIF_binary(:,:,i) = mat2gray(PLIFadjust(:,:,i));
PLIF_gaussfilt(:,:,i) = imguidedfilter(imgaussfilt(PLIF_binary(:,:,i)));
PLIF_sharpen(:,:,i) = imsharpen(PLIF_gaussfilt(:,:,i), 'Radius', 1, 'Amount', 10);
PLIF_sharpen(PLIF_sharpen > .25) = 1;
PLIF_edge(:,:,i) = edge(PLIF_sharpen(:,:,i), 'Sobel');
[y, x, z] = find(PLIF_edge(:,:,i)); ------------------------------> What I am not sure how to compute?
end