matlab图像示例笔记3
mat2gray
将dicom变为greyim2uint8
The image on the right has higher contrast, with intensity values that fill the entire intensity range [0, 255].
如果指定空矩阵 ([]),则 imshow 使用 [min(I(:)) max(I(:))]。换言之,使用 I 中的最小值作为黑色,使用最大值作为白色。
imadjust
You must specify the intensities as values between 0 and 1 regardless of the class of I. If I is uint8, the values you supply are multiplied by 255 to determine the actual values to use; if I is uint16, the values are multiplied by 65535.
figure,
imshow(pout_histeq);
title(‘Histeq’);
ROI
Create a Binary Mask
You can use the createMask function of the imroi base class to create a binary mask for any type of ROI object — impoint, imline, imrect, imellipse, impoly, or imfreehand.