-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathdemo_one_channel_0.m
More file actions
55 lines (40 loc) · 1.07 KB
/
demo_one_channel_0.m
File metadata and controls
55 lines (40 loc) · 1.07 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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
%%
% Add SynQuant Java class into Matlab
% javaaddpath("../SynQuant-master/target/SynQuantExtra-1.2.9.jar");
javaaddpath("./libs/SynQuantExtra-1.2.9.jar");
javaaddpath("./libs/commons-math3-3.6.1.jar");
javaaddpath("./libs/ij-1.50b.jar");
%%
% Read data
f0 = "../data/2019April4 - Cx ACM - 1_oir_corrected-1.tif (green).tif";
% f0 = "../data/2019April4 - Cx ACM - 1_oir_corrected-1.tif (red).tif";
obj = Tiff(f0);
img = read(obj);
dat = double(img);
figure
imshow(img)
%%
% construct SynQuant Java objects
minSz = 10;
maxSz = 100;
noiseStd = 20;
zThr = 10;
[H1,W1,D1] = size(img);
p = paraP3D(0.05, zThr, 0, 255, minSz, maxSz, 0.5, 4);
q = paraQ3D(1, 1, 0.8);
q.ExtendedDistance = 0;
q.zAxisMultiplier = 1;
q.curTps = 0;
q.synZscore = zeros(1,1,H1,W1);
q.var = noiseStd*noiseStd;
% Reshape input image for SynQuant
datx = zeros(D1,H1*W1,'uint8');
for ii=1:D1
tmp = img(:,:,ii)';
datx(ii,:) = tmp(:);
end
% detection for one channel
particle3D_det = ppsd3D(datx, W1, H1, 1e-6, p, q);
k0 = squeeze(particle3D_det.ppsd_main.kMap);
z0 = squeeze(particle3D_det.ppsd_main.zMap);
%%