-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathProcess_V1SS.m
More file actions
34 lines (26 loc) · 1.05 KB
/
Copy pathProcess_V1SS.m
File metadata and controls
34 lines (26 loc) · 1.05 KB
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
function [TT, Tt] =Process_V1SS(outm,nThetas)
sigmax = 3.65;
sigmay = sigmax / 8;
Surroundsize = 3;
[Rest, Ort] = max(outm, [], 1);
Rests(:,:,:)=Rest(1,1,:,:,:);
Orts(:,:,:)=Ort(1,1,:,:,:);
for c = 1:size(Rests, 3)
P_Channel = Rests(:, :, c);
P_Orientation = Orts(:, :, c);
ss = LocalStd(P_Channel, 45 / 2);
ss = ss ./ max(ss(:));
ss = max(ss(:)) - ss;
ss = NormaliseChannel(ss, 0.7, 1.0, [], []);
for t = 1:nThetas
theta = (t - 1) * pi / nThetas;
theta = theta + (pi / 2);
responsec = imfilter(Rests(:, :, c), GaussianFilter2(sigmax, sigmay, 0, 0, theta), 'symmetric');
responses = imfilter(Rests(:, :, c), GaussianFilter2(sigmax * Surroundsize, sigmay * Surroundsize, 0, 0, theta), 'symmetric');
response = max(responsec - ss .* responses, 0);
P_Channel(P_Orientation == t) = response(P_Orientation == t);
end
Rests(:, :, c) = P_Channel;
end
[TT, Tt] = ChannelMax(Rests, Orts);
end