Info

この質問は閉じられています。 編集または回答するには再度開いてください。

How to make an image (12 bit depth) from a double matrix?

2 ビュー (過去 30 日間)
Pushkal Sharma
Pushkal Sharma 2021 年 3 月 12 日
閉鎖済み: Rik 2021 年 8 月 21 日
この 質問 は DGM さんによってフラグが設定されました
I am running a pipeline which initially imports tif images (12-bit; 0 to 4095 pixel intensity value), converts values to doubles (it still stores original pixel values i.e. 0-4095) and finally do some processing. Afterwards I need to save them again as tif files for further processing on ImageJ, but it seems transferrring matrix data into image changes the original pixel values. I used imshow to generate an image and save it using Save As in the dropdown menu on matlab figure.
Is there a way to generate/store images from matrix without changing the original pixel values of a 12 bit image?
  1 件のコメント
Isaac Kafshkanan
Isaac Kafshkanan 2021 年 8 月 21 日
img_new = img - min(img(:)); %where img = name of your image
img_new = double(img_new)/max(img_new(:))*4095;

回答 (0 件)

この質問は閉じられています。

Community Treasure Hunt

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

Start Hunting!

Translated by