如何使用 SVD 和 RANSAC 在某些图像像素上拟合 3D 平面 Pi?



我正在尝试实现一篇论文:Fabio Dominio,Mauro Donadeo,Pietro Zanuttigh的"结合多个基于深度的手势识别描述符"。这部分以图像的形式附加(使用 SVD 和 RANSAC 拟合 3D 平面 Pi(,我无法理解(就目的而言(以及使用 MATLAB 的实现。 ![Paper_text]https://drive.google.com/open?id=1sIJfcGVgbNYdU_ZA7n_ASIR-A8KX9i7t ![Paper_Figure]https://drive.google.com/open?id=1hq8PBtZiVvM5lX0Dt2ysEAh5dHlLIrf6

我试图实现它的开始,但不知道如何形成论文中给出的轴(图 3(。我尝试过的代码也在这里给出。

![手势]https://drive.google.com/open?id=1xz8ajG-Zxc3mHQ9LbuoBh1UQAXMmf0SY

plot(hands(:,1),hands(:,2),'o'); % 'hands' are the image pixels of the 
%  hand palm region to be used in fitting
hold on;
modelLeastSquares = polyfit(hands(:,1),hands(:,2),1);
x = [min(hands(:,1)) max(hands(:,1))];
y = modelLeastSquares(1)*x + modelLeastSquares(2);
plot(x,y,'r-')
sampleSize = 2; % number of points to sample per trial
maxDistance = 2; % max allowable distance for inliers
fitLineFcn = @(hands) polyfit(hands(:,1),hands(:,2),1); % fit function 
using polyfit
evalLineFcn = ...   % distance evaluation function
@(model, hands) sum((hands(:, 2) - polyval(model, hands(:,1))).^2,2);
[modelRANSAC, inlierIdx] = ransac(hands,fitLineFcn,evalLineFcn, ...
sampleSize,maxDistance);
modelInliers = polyfit(hands(inlierIdx,1),hands(inlierIdx,2),1);
inlierPts = hands(inlierIdx,:);
x = [min(inlierPts(:,1)) max(inlierPts(:,1))];
y = modelInliers(1)*x + modelInliers(2); hold on;
plot(x, y, 'g-')
legend('Noisy points','Least squares fit','Robust fit');
hold off

![输出]https://drive.google.com/open?id=1wVwezBdxX-xREwZs7X2yjkzVZHn9nY0C

什么是 3D 平面 Pi,为什么以及如何使用 SVD 和 RANSAC进行安装?这部分论文的实际目的是使用SVD,RANSAC和PCA获得手指的大致方向。

请有人告诉我如何使用 RANSAC 适合 3D Pi 平面,并在该 3D 平面中获得手的图像,如上图所示。

最新更新