This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
I=imread('CIMG0017.JPG'); | |
GR=rgb2gray(I); | |
I3=GR>150; | |
imshow(I3) | |
K = medfilt2(I3); | |
L=bwlabel(K); | |
s = regionprops(L, 'Area'); | |
alan = cat(1, s.Area); | |
imshow(L) | |
q=find(alan>1500); %1500 pikselden küçük olanlar seçilir. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function [img] = lpfilter ( n , r , I) | |
mask=fspecial ('disk', r ); % r yarıçaplı çember matrisi oluşturur | |
q= floor ( ( n-(2*r+1) ) / 2 ) ; | |
D = padarray(mask,[q q]); % çemberin etrafını resmin boyutu kadar sıfırlarla doldurur. | |
D = padarray(D,[1 1],'pre'); | |
D=D>0; % çemberin matris değerlerini 1 yapar. | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mov=aviread('output.avi'); % Futbol videosunu mov isimli matrise yükler. | |
a=size(mov); % a(2)'ye videonun kaç frameden oluştuğu bilgisi atanır. | |
for i=1:a(2) | |
video(:,:,:,i)=frame2im(mov(i)); %video matrisine frameler atanır. | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
clear all | |
I = imread('para.jpg'); %paraların olduğu resmi okur | |
I=rgb2gray(I); | |
%% İLK DEĞERLER | |
bir=0; elli=0; ybes=0; on=0; bes=0; h=0; | |
%% | |
I= imnoise(I,'salt & pepper',0.02); % tuz biber gürültüsü ekler | |
figure | |
imshow(I) |