-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathedge_detection_grouped.m
64 lines (62 loc) · 2.41 KB
/
edge_detection_grouped.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
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
dbstop if error
clear;
close all;
location = 'D:/OCT/';
cd(location);
filenames = dir([location,'*.tif']);
N = length(filenames);
reference_counterclockwise = [-1,+1; -1,0; -1,-1; 0,-1;...
+1,-1; +1,0; +1,+1; 0,+1];
reference_counterclockwise_r2 = [-2,+2; -2,+1; -2,0; -2,-1; -2,-2; -1,-2; 0,-2; +1,-2;...
+2,-2; +2,-1; +2,0; +2,+1; +2,+2; +1,+2; 0,+2; -1,+2];
rcc = reference_counterclockwise;
rccr = reference_counterclockwise_r2;
pos_init_next = @(x) mod(x + 3, 8) + 1;
errs = 0;
% prc = 27.5;
prc = 55;
pics_not_successful = [];
screensize = get( groot, 'Screensize' );
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 1. grouping_generation %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% Here, I will take turn to finish up those little job
% GROUP 1: 00~23
ns_idxs = 1:24;
[imgs_00_23, edges_00_23] = edge_detection_with_para(location,ns_idxs);
imgs_show(imgs_00_23, 0:23);
edges_show(edges_00_23, 0:23, imgs_00_23);
% GROUP 1: 24~30
ns_idxs = 25:31;
[imgs_24_30, edges_24_30] = edge_detection_with_para(location,ns_idxs);%,{},{},5);
imgs_show(imgs_24_30, 24:30);
edges_show(edges_24_30, 24:30, imgs_24_30);
% GROUP 1: 31~37
ns_idxs = 32:38;
[imgs_32_38, edges_32_38] = edge_detection_with_para(location,ns_idxs);%,{},{},5); %%
imgs_show(imgs_32_38, 32:38);
edges_show(edges_32_38, 32:38, imgs_32_38);
% GROUP 1: 38~44
ns_idxs = 39:45;
[imgs_39_45, edges_39_45] = edge_detection_with_para(location,ns_idxs);%,{},{},8); %%
imgs_show(imgs_39_45, 39:45);
edges_show(edges_39_45, 39:45, imgs_39_45);
% GROUP 1: 45~59
ns_idxs = 46:60;
[imgs_46_60, edges_46_60] = edge_detection_with_para(location,ns_idxs);%,{},{},4); %%
imgs_show(imgs_46_60, 46:60);
edges_show(edges_46_60, 46:60, imgs_46_60);
% GROUP 1: 60~70
ns_idxs = 61:71;
[imgs_61_71, edges_61_71] = edge_detection_with_para(location,ns_idxs);
imgs_show(imgs_61_71, 61:71);
edges_show(edges_61_71, 61:71, imgs_61_71);
% GROUP 1: 71~96
ns_idxs = 72:97;
[imgs_72_97, edges_72_97] = edge_detection_with_para(location,ns_idxs);
imgs_show(imgs_72_97, 72:97);
edges_show(edges_72_97, 72:97, imgs_72_97);
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% 2. valumn calculation %
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
=