Gambar
Awal
Listing Program Matrik Min dengan Matlab
. >> gbr = imread(D:\gelombangcinta.jpg);
>>
msk = [-1 0 -1; 0 4 0; -1 0 -1];
>>
gr = rgb2gray(gbr);
>>
thr = graythresh(gr);
>>
imbw = im2bw(gr,thr);
>>
hasil = conv2(double(imbw),msk,'valid');
>>
imshow (gbr)
>>
figure, imshow(hasil)
hasil
Listing
Program Matrik Plus dengan Matlab
>>
gbr = imread(D:\gelombangcinta.jpg);
>>
msk = [1 2 1; 2 4 2; 1 2 1];
>>
gr = rgb2gray(gbr);
>>
thr = graythresh(gr);
>>
imbw = im2bw(gr,thr);
>>
hasil = conv2(double(imbw),msk,'valid');
>>
imshow (gbr)
>>
figure, imshow(hasil)
hasil
Post a Comment