Professional Documents
Culture Documents
197003516006
UAS Komputasi Fisika Medik adalah membuat program ekstraksi segmen
clc
close all
clear all
c= imread('citrabaru.tiff');
imshow(c)
imhist (c)
%prosesing
e= medfilt2 (c);
figure, imshow (e), title 'Med'
AB= adapthisteq(e);
figure, imshow (AB), title 'med & clahe'
AC= imsharpen (AB);
figure, imshow (AC), title 'med & clahe sharp'
%segmentasi 1 th
AE= multithresh (c, 2);
AG= imquantize (c, AE);
figure, imshow (AG, []), title 'citra biner segmentasi thresh 1'
%segmentasi 3 th
AH= multithresh (c, 3)
AK= imquantize (c, AH);
figure, imshow (AK,[]), title 'citra biner segmentasi & thresh'
%operasi Morfologi
st= strel ('disk', 20);
AL= imerode (AM, st);
AJ= imreconstruct (AL, AM);
figure, imshow (AJ), title 'hasil erode'
%karakteristik segmen
AR = bwlabel (ax);
AS = regionprops (AR, c,'all');
AT = size (AS,1);
fprintf {1, 'Blob MeanPiXal Area MajorAx MinorAX\n' }:
for k = 1 : AT
BlobMeanPixal= AS (k), Mean Intensity;
BlobArea= AS (k), Area;
BlobMajorAx= AS (k), MajorAxiaLenght;
BlobMinorAx= AS(k), MinorAxiaLenght;
fprintf (1, '%20 %15.if %10.if %5.if %12.if\n', 'k', BlobMeanPixal,
BlobArea, BlobMajorAx,BlobMinorAx);
end
Hasil Segmentasi
Hasil Pengolahan Citra