-
Notifications
You must be signed in to change notification settings - Fork 2
/
main_funtion.m
33 lines (26 loc) · 842 Bytes
/
main_funtion.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
clc;
clear all;
close all;
%--------------------LOAD YOUR SAVED CLASSIFIER----------------------%
%--------------------CHANGE YOUR PATH DIRECTORY-----------------------%
pathDirectory='%----YOUR PATH----%';
files = fullfile(pathDirectory, '**/*.ppm');
theFiles = dir(files);
for j = 1 : length(theFiles)
baseFileName = theFiles(j).name;
fullFileName = fullfile(theFiles(j).folder, baseFileName);
fprintf(1, 'Now reading %s\n', fullFileName);
im = imread(fullFileName);
f1 = figure('Name', baseFileName);
imshow(im);
%------MASKING FUNCTION-------%
[br,bb,by,or] = rybmasks(im);
%------DETECTION FUNCTION-----%
drawboxred(model,im,br);
drawboxred(model,im,or);
drawboxblue(model,im,bb);
drawboxyellow(model,im,by);
drawnow;
pause(2);
close(f1);
end