pcshow() in gui

2 次查看(过去 30 天)
Yonatan Chatzinoff
Yonatan Chatzinoff 2017-3-14
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
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
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:
  1. In for loop store every point cloud (stored in cell array before) in auto incrementing vector, e.g.:
  2. Create point cloud using pointCloud function
  3. 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 个)

Márcio Marques
Márcio Marques 2017-7-27
I have exactly the same problem!! Anyone can help?

类别

Help CenterFile Exchange 中查找有关 Point Cloud Processing 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by