PageRenderTime 26ms CodeModel.GetById 18ms app.highlight 5ms RepoModel.GetById 2ms app.codeStats 0ms

/normalizeAnnularHistogram.m

http://github.com/gallamine/Photonator
Objective C | 24 lines | 19 code | 5 blank | 0 comment | 1 complexity | 2c5a42e0f5c61bbbd878d85946fd88b9 MD5 | raw file
 1%%
 2
 3% Determine correct normalization for a 2d histogram of points on the x/y
 4% plane. By taking the histogram of the radius, the data is skewed by the
 5% area of the annular rings. This needs to be corrected. - WCC 6/7/11
 6
 7% figure(4);
 8% cnt = hist3([rec_loc_final(:,1) rec_loc_final(:,2)],'Edges',{-2:1e-3:2 -2:1e-3:2});
 9% finalPdf = cnt./max(max(cnt));
10% 
11% imshow(finalPdf);
12% colormap(jet);
13
14
15figure(4);
16cnt = hist3([recPosY' recPosX'],'Edges',{-0.3:1e-2:0.3 -0.3:1e-2:0.3});
17% finalPdf = cnt./max(max(cnt));
18imshow(finalPdf,[0 1])
19colormap(jet);
20
21[cnt,bins] = hist(distances,100);
22binDelta = [bins] - [0 bins(1:end-1)];
23cntNorm = cnt./(pi.*(2.*bins.*binDelta - binDelta.^2));
24bar(bins,cntNorm);