problem with saving image with imwrite!

조회 수: 1 (최근 30일)
Milenko
Milenko 2013년 5월 29일
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?

답변 (2개)

Image Analyst
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
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?
Milenko
Milenko 2013년 5월 29일
yes,exactly i want image classification.

댓글을 달려면 로그인하십시오.


Milenko
Milenko 2013년 5월 29일
>> whos ct Name Size Bytes Class Attributes
ct 14x106 11872 double

카테고리

Help CenterFile Exchange에서 Image Segmentation and Analysis에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by