What is the functionality of the distance evaluation function in the RANSAC MATLAB function?
이전 댓글 표시
Dear all,
I have used the RANSAC Matlab function for computing inlier points of the data. Can anyone please tell me the functionality of "distFcn" in the input argument of ransac?
Is the functionality of the distance evaluation function is a euclidean distance?
The following things mentioned with the help of RANSAC.
[model,inlierIdx] = ransac(data,fitFcn,distFcn,sampleSize,maxDistance)
sampleSize = 2; % number of points to sample per trial
maxDistance = 2; % max allowable distance for inliers
fitLineFcn = @(points) polyfit(points(:,1),points(:,2),1); % fit function using polyfit
evalLineFcn = ... % distance evaluation function
@(model, points) sum((points(:, 2) - polyval(model, points(:,1))).^2,2);
[modelRANSAC, inlierIdx] = ransac(points,fitLineFcn,evalLineFcn, sampleSize,maxDistance);
distFcn — Function to compute distances from model:
Function to compute distances from the model to the data, specified as a function handle. The function must be of the form: distances = distFcn(model,data)
If model is an n-element array, then distances must be an m-by-n matrix. Otherwise, distances must be an m-by-1 vector.
Thanks & regards
Sukumar.
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Process Point Clouds에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!