-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathLog_fixedPad_imseq.m
44 lines (40 loc) · 1.33 KB
/
Log_fixedPad_imseq.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
% This function uses ffts to rotate a laplacian of gaussian (LoG) filter
% around an image containing fibers.
%
%%%% USAGE: [LogFilt, dsOG] = Log_fixedPad_imseq(imSeq, params,padSize)
%
%%%% INPUTS
% for LoG params see fftLoG_fixedPad for clarification
% padSize = [X Y] fixed pad for images
% im = input image (designed for images containg fibers)
%
%%%% OUTPUTS
% LogFtil = The preferred angle for each pixel in the input image.
% NaN for regions that were less than the filter threshold.
% dsOG = original image scaled to match LoG scale
%
%
% DEPENDENCIES
% MakeFil.m = Function for making the filters (see Losert Lab 2d log
% GitHub page)
%
% CHANGE LOG
% Original Code Nick Mennona
function [LogFilt, dsOG] = Log_fixedPad_imseq(imSeq, params,padSize)
%
filSig = params.filSig;
numSig = params.numSig;
numAngs = params.numAngs;
filtThresh = params.filterThreshold;
LogFilt = [];
dsOG = [];
for tt=1:size(imSeq,3)
tempFrame = imSeq(:,:,tt);
[tempFil, tempOG] = fftLoG_fixedPad(filSig,numSig,numAngs,filtThresh,tempFrame,padSize);
LogFilt = cat(3,LogFilt,tempFil);
dsOG = cat(3,dsOG,tempOG);
if mod(tt,10)==0
disp(['Reading Frame ' num2str(tt)])
end
end
end