location = '/MATLAB Drive/PE/Frames/';
ds = imageDatastore(location) ;
array=zeros(65,1080,1920);
G=fspecial('gaussian',15,sigma);
Img_smooth=conv2(Img,G,'same');
[Ix,Iy]=gradient(Img_smooth);
initialLSF=c0*ones(size(Img));
initialLSF(1:1080, 1:1920)=-c0;
hold on; contour(phi, [0,0], 'r','LineWidth',2);
title('Initial level set function');
imagesc(Img,[0, 255]); axis off; axis equal; colormap(gray); hold on; contour(phi, [0,0], 'r');
title('Initial zero level contour');
potentialFunction = 'single-well';
potentialFunction = 'double-well';
potentialFunction = 'double-well';
phi = drlse_edge(phi, g, lambda, mu, alfa, epsilon, timestep, iter_inner, potentialFunction);
imagesc(Img,[0, 255]); axis off; axis equal; colormap(gray); hold on; contour(phi, [0,0], 'r');
phi = drlse_edge(phi, g, lambda, mu, alfa, epsilon, timestep, iter_inner, potentialFunction);
imagesc(Img,[0, 255]); axis off; axis equal; colormap(gray); hold on; contour(phi, [0,0], 'r');
hold on; contour(phi, [0,0], 'r');
str=['Final zero level contour, ', num2str(iter_outer*iter_inner+iter_refine), ' iterations'];
hold on; contour(phi, [0,0], 'r','LineWidth',2);
str=['Final level set function, ', num2str(iter_outer*iter_inner+iter_refine), ' iterations'];
Gives Error:In contour (line 51)
Unable to perform assignment because the left and right sides have a different number of elements.