Files
rtabmap/archive/2010-LoopClosure/Bayes/adjustLikelihood.m
matlabbe 69ac21f811 Adding OpenCV's GPU GFTT/ OpticalFlow and CudaSift support (#1330)
* Adding GFTT and SIFT Cuda support

* Working CudaSift

* Disable cudasift option when not available

* Added check to avoid re-allocating gpu memory everytime parseParameters is called. Added workaround of to detect/ignore invalid descriptors

* Added SIFT/PreciseUpscale and SIFT/Upscale parameters. Adjusted max octave to behave more like opencv

* Refactored how maximum features are thresholded, to be more similar to OpenCV version

* Updated loop closure benchmark scripts

* Cuda optical flow tmp commit

* Added Stereo/Gpu Vis/CorFlowGpu parameters (optical flow gpu integration for F2F odom and stereo correspondences)

* Fixed build without opencv cuda

* Fixed build with Opencv 4.10

* ZED: updated parameters to match zed sdk 4

* MRPT requires C++17

* updated max octave limit CudaSift
2024-09-13 14:22:54 -07:00

17 lines
387 B
Matlab

function LN = adjustLikelihood(L)
%ADJUSTLIKELIHOOD Adjust the likelihood with std dev and mean.
% LN = adjustLikelihood(L)
%
% L the likelihood (m,1)
% LN the likelihood normalized (m,1)
m = mean(L); % Calcul mean
s = std(L); % Calcul std dev
LN = zeros(size(L));
for i=1:length(L)
if L(i) > m + s
LN(i) = (L(i)-s)/m;
else
LN(i) = 1;
end
end