how to export a matrix as an image file?

4 ビュー (過去 30 日間)
navid zed
navid zed 2017 年 2 月 13 日
回答済み: Jan 2017 年 2 月 13 日
Hello guys, I have a matrix that includes numbers between -1 & 1. I wanna export it as an image file without any change in numbers of matrix. thank you

回答 (2 件)

KSSV
KSSV 2017 年 2 月 13 日
doc imwrite

Jan
Jan 2017 年 2 月 13 日
This will not work. Image files contain values e.g. from 0 to 255 for the red, green and blue channel. I do not know any image file format, which accept negative values and I could not imagine, what the value could have as physical meaning.
Either store the array as array, or scale the data to values from 0.0 to 1.0 or from 0 to 255, or to 65536, and store it as grey scale image. See doc imwrite .

カテゴリ

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

Community Treasure Hunt

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

Start Hunting!

Translated by