Contour not rendered for constant ZData
Show older comments
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);
Accepted Answer
More Answers (0)
Categories
Find more on Image Processing Toolbox in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!