Hi,
Can anyone help and point me to write direction, I am trying to get the contour of 190 grayscale images but getting error. Code and error shown below.
Code:
srcFile=dir('C:\Users\muhammad\Desktop\newexperiment\*.jpg') for i=1:length(srcFile) filename=strcat('C:\Users\muhammad\Desktop\newexperiment\',srcFile(i).name); I=imread(filename); C=imcontour(I,3); path=strcat('C:\Users\muhammad\Desktop\newexperiment\',srcFile(i).name); imwrite(C,path); end
Error:
Warning: Contour not rendered for constant ZData
> In contour (line 51)
In imcontour (line 46)
In ContImages (line 8)
Error using imwrite (line 427)
Expected DATA to be nonempty.
Error in ContImages (line 10)
imwrite(C,path);
Best Answer