Hello guys
I got a smal Problem. I got a Logical array which i want to save as a jpg. But i have to convert it to a differend type of datatype. How i should convert it to save it? I want to use this:
imwrite(kl , [hg f1 '.jpg'],'jpg');
hg is the Path where i want to save it
f1 is the name of the new png
kl is the logical array
Thanks for your help :D

 採用された回答

KSSV
KSSV 2017 年 7 月 25 日

1 投票

If k1 is your logical..convert it to double
k1 = double(k1) ;

2 件のコメント

Martin Mieß
Martin Mieß 2017 年 7 月 25 日
i have alredy tried this, than i get this Error:
Error using imwrite>parse_inputs (line 531) Expected COLORMAP to be one of these types:
double, single, uint8, uint16, uint32, uint64, int8, int16, int32, int64
Instead its type was cell.
Error in imwrite (line 418) [data, map, filename, format, paramPairs] = parse_inputs(varargin{:});
Martin Mieß
Martin Mieß 2017 年 7 月 25 日
But thanks,
cause of your answer i rethought the error and realized that not kl was meant with the error, f1 was e cell not a char. Thanks for that answer :D

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeImages についてさらに検索

タグ

質問済み:

2017 年 7 月 25 日

コメント済み:

2017 年 7 月 25 日

Community Treasure Hunt

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

Start Hunting!

Translated by