-
Notifications
You must be signed in to change notification settings - Fork 466
/
returnCAMmap.m
25 lines (19 loc) · 1.37 KB
/
returnCAMmap.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
function [curColumnMap] = returnCAMmap( featureObjectSwitchSpatial, weights_LR)
%RETURNCOLUMNMAP Summary of this function goes here
% Detailed explanation goes here
if size(featureObjectSwitchSpatial,4) ==1
featureObjectSwitchSpatial_vectorized = reshape(featureObjectSwitchSpatial,[size(featureObjectSwitchSpatial,1)*size(featureObjectSwitchSpatial,2) size(featureObjectSwitchSpatial,3)]);
detectionMap = featureObjectSwitchSpatial_vectorized*weights_LR;
curColumnMap = reshape(detectionMap,[size(featureObjectSwitchSpatial,1),size(featureObjectSwitchSpatial,2), size(weights_LR,2)]);
else
columnSet = zeros(size(featureObjectSwitchSpatial,1),size(featureObjectSwitchSpatial,2),size(weights_LR,2),size(featureObjectSwitchSpatial,4));
for i=1:size(featureObjectSwitchSpatial,4)
curFeatureObjectSwitchSpatial = squeeze(featureObjectSwitchSpatial(:,:,:,i));
featureObjectSwitchSpatial_vectorized = reshape(curFeatureObjectSwitchSpatial,[size(curFeatureObjectSwitchSpatial,1)*size(curFeatureObjectSwitchSpatial,2) size(curFeatureObjectSwitchSpatial,3)]);
detectionMap = featureObjectSwitchSpatial_vectorized*weights_LR;
curColumnMap = reshape(detectionMap,[size(featureObjectSwitchSpatial,1),size(featureObjectSwitchSpatial,2), size(weights_LR,2)]);
columnSet(:,:,:,i) = curColumnMap;
end
curColumnMap = columnSet;
end
end