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