Why image appear black and white image?

1 回表示 (過去 30 日間)
hla hla myint
hla hla myint 2020 年 10 月 8 日
コメント済み: Rik 2020 年 10 月 9 日
i convert 3 d image to 2 d image. Then I have used the imwrite function. But image was appeared the black and white image. Why?
  5 件のコメント
Image Analyst
Image Analyst 2020 年 10 月 9 日
What is the class of (the poorly-named) c? Is it double or uint8 or uint16?
You forgot to attach your file so we can't run your code.
You need to put v.jpg in single quotes otherwise it will think that v is a structure and the jpg field of that structure is a character array, which is not what I think it is.
imwrite(c, 'v.jpg');
Do not use JPG for image analysis - it introduces bad compression artifacts. Use PNG format instead.
imwrite(c, 'v.png');
What does this show in the command window
whos a
whos b
whos c
Rik
Rik 2020 年 10 月 9 日
"Do not use JPG for image analysis - it introduces bad compression artifacts. Use PNG format instead."
I whole-heartedly agree, but in medical imaging it appears to be common to convert perfectly good 12 bit precision DICOM files to JPEG. I don't understand why, but that seems to be the standard. Judging by the use of niftiread I assume this is a medical purpose as well, meaning this might just be conforming with the input requirements of the next step in the pipeline.

サインインしてコメントする。

回答 (0 件)

カテゴリ

Help Center および File ExchangeDICOM Format についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by