我正在尝试执行一篇论文: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获得手指的大致方向。
答案 0 :(得分:0)
请有人告诉我如何使用RANSAC拟合3D Pi平面,并获得如上图中在3D平面中的手的图像。