pcregistericp using GPU Support
古いコメントを表示
Has anyone tried using the function pcregistericp (which registers two point clouds using the itterative closest point method) on a GPU via Cuda?
The help for the function clearly says it does support
GPU Code Generation
(Generate CUDA® code for NVIDIA® GPUs using GPU Coder™.)
But my attempt fails. Here's the code in which I create the point cloud from a gpuArray set of points:
clc; clearvars;
load pcSet.mat % some point clouds here
%% First Pointcloud
pc1 = pointCloud(gpuArray(PC{1}.Location));
% create point clouds with gpuArray locations
%% Crfeating the second pointcloud with a small transformation
rot = eye(3); trans = [-3, 1, 2];
T = [rot;trans]; T = ([T, [0; 0; 0; 1]]); tf = rigid3d(T);
pc2 = pctransform(pc1, tf);
pcshowpair(pc1, pc2); % Two close point clouds can be seen here
%% ICP
[tform, pcm] = pcregistericp(pc2, pc1); % ERROR here
The error says:
Error using images.geotrans.internal.rigidtform3dImpl (line 62)
Translation must be a real, double or single vector with three elements.
Error in rigidtform3d (line 8)
self = self@images.geotrans.internal.rigidtform3dImpl(varargin{:});
Error in vision.internal.pc.parseICPInputs (line 26)
initTform = rigidtform3d([0 0 0], t);
Error in pcregistericp (line 9)
[unorgMoving, unorgFixed, configOptions, doExtrapolate, metric] = vision.internal.pc.parseICPInputs( ...
Error in gputest (line 16)
[pcm, tform] = pcregistericp(pc2, pc1); % ERROR here
採用された回答
その他の回答 (0 件)
カテゴリ
ヘルプ センター および File Exchange で GPU Computing についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!