pcshow() in gui
7 次查看(过去 30 天)
显示 更早的评论
Hi all, I am using the Computer Vision toolbox to visualize point cloud data in a gui, and I keep on running into an error as follows. I call pcshow() and it works one time, but on the second call to pcshow(), I get the very long error
Property assignment is not allowed when the object is empty. Use subscripted assignment to create an array element.
Error in vision.internal.pc.initializePCSceneControl>localRotateStopMode (line 79)
btn.State = 'off';
Error in hgfeval (line 62)
feval(fcn{1},varargin{:},fcn{2:end});
Error in matlab.uitools.internal.uimode/modeControl (line 22)
hgfeval(hThis.ModeStopFcn);
Error in matlab.uitools.internal.uimode/set.Enable (line 173)
obj.Enable = modeControl(obj,value);
Error in matlab.uitools.internal.uimodemanager>localSetMode (line 173)
set(currMode,'Enable','off');
Error in matlab.uitools.internal.uimodemanager/set.CurrentMode (line 111)
obj.CurrentMode = localSetMode(obj,value);
Error in activateuimode (line 27)
set(hManager,'CurrentMode',hMode);
Error in rotate3d>setState (line 316)
activateuimode(fig,'Exploration.Rotate3d');
Error in rotate3d (line 226)
setState(hTarget,arg2,rotatestyle)
Error in vision.internal.pc.initializePCSceneControl>initUIMode (line 134)
rotate3d(hFigure,'on');
Error in vision.internal.pc.initializePCSceneControl (line 13)
initUIMode(hFigure);
Error in pcshow (line 132)
vision.internal.pc.initializePCSceneControl(hFigure, currentAxes, vertAxis,...
This error does not appear when I use pcshow() in contexts other than GUI (eg, direct successive calls to pcshow() with hold on, multiple subplots, etc).
If anyone has any thoughts I'd appreciate a tip! Thanks Yoni
3 个评论
Rida Khan
2017-3-30
Were either one of you able to solve the problem? I'm running into the same error and would really appreciate some help!
Krzysztof Gawlik
2017-4-12
The only way I found is to use scatter3 (slower) or plot3 with '.' sign (as fast as pcshow). But if you want to store all point clouds in suitable object and then view them together, just follow this simple steps:
- In for loop store every point cloud (stored in cell array before) in auto incrementing vector, e.g.:
- Create point cloud using pointCloud function
- View it using pcshow :)
for i=1:size(X,1) % X is our cell array storing all
% point clouds with m x n dimensions.
xcoor = [xcoor, pointCloud.Location(:,1)];
ycoor = [ycoor, pointCloud.Location(:,2)];
zcoor = [zcoor, pointCloud.Location(:,3)];
end
pointCloudOut = pointCloud([xcoor,ycoor,zcoor]);
pcshow(pointCloudOut);
回答(1 个)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Point Cloud Processing 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!