problem with saving image with imwrite!
1 次查看(过去 30 天)
显示 更早的评论
My code:
load ('cl.dat')
c=reshape(cl,106,14)
ct=transpose(c)
imagesc(ct)
imwrite(ct,'f8.jpg','jpg')
I just want to save the image but it does not work,where is the problem?
0 个评论
回答(2 个)
Image Analyst
2013-5-29
"where is the problem?" - I was going to ask you the same thing. What does "it does not work" mean? Do you have an error message? Are you sure ct is uint8? What does
whos ct
report back?
4 个评论
Image Analyst
2013-5-29
mat2gray scales to 0-1 so you might need to use
ctUint8 = uint8(255*mat2gray(ct));
if you want it to look bright with a normal gray scale colormap.
Posting an image would help. I don't know what "clusters" means to you. Do you want to do image classification?
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Image Segmentation and Analysis 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!