clear all;
close all;
clc;
imtool close all;
workspace;
fontSize = 20;
fontSize1 = 14;
Read in a standard MATLAB gray scale demo image.
folder = 'F:\image';
b = imread('CT-Brain-9541.jpg');
info
imfinfo('CT-Brain-9541.jpg')
ans =
Filename: 'F:\image\CT-Brain-9541.jpg'
FileModDate: '01-Apr-2016 01:02:54'
FileSize: 20248
Format: 'jpg'
FormatVersion: ''
Width: 354
Height: 396
BitDepth: 24
ColorType: 'truecolor'
FormatSignature: ''
NumberOfSamples: 3
CodingMethod: 'Huffman'
CodingProcess: 'Sequential'
Comment: {}
size
b1= size (b);
[rows columns numberOfColorBands] = size(b);
subplot(2,2,1);
imshow(b, []);
title('original CT brain image', 'Fontsize', fontSize);
set(gcf, 'Position', get(0,'Screensize'));
meanredPlane1 = mean2(b(:, :, 1));
meangreenPlane1 = mean2(b(:, :, 2));
meanbluePlane1 = mean2(b(:, :, 3));
redPlane1 = b(:, :, 1);
greenPlane1 =b(:, :, 2);
bluePlane1 = b(:, :, 3);
subplot(2, 2, 2); imagesc (b<40);
colorbar; title('disease');
subplot(2, 2, 4); imagesc (redPlane1);
colorbar; colormap('jet');
subplot(2, 2, 3); hist(single(b(:)),256);
str1=sprintf('Histogram of CT brain', 'Fontsize', fontSize);
title(str1);
xlabel('Intensity values','Fontsize', fontSize1);
ylabel('Number of pixels', 'Fontsize', fontSize1);
No comments:
Post a Comment