About error of helperVisualizeMotionAndStructureStereo
조회 수: 1 (최근 30일)
이전 댓글 표시
I am the following site
https://jp.mathworks.com/help/vision/ug/stereo-visual-simultaneous-localization-mapping.html
For reference, I'm thinking of running SLAM with my own stereo camera with the file name "stereoslam.m".
No error occurred up to the "Map Initialization" item, but the following error occurs in the "Data Management and Visualization" item.
Error: pointclouds.internal.pcui.validateAndParseInputsXYZC (line 47)
The input must be non-empty.
Error: pcplayer / parseInputs (line 518)
[X, Y, Z, C, map, ptCloud] =
pointclouds.internal.pcui.validateAndParseInputsXYZC (mfilename, varargin {:});
Error: pcplayer / view (line 199)
[X, Y, Z, C, map, ptCloud] = pcplayer.parseInputs (varargin {:});
Error: helperVisualizeMotionAndStructureStereo (line 41)
obj.MapPointsPlot.view (xyzPoints, color);
Error: stereoslam (line 79)
mapPlot = helperVisualizeMotionAndStructureStereo (vSetKeyFrames, mapPointSet);
I suspect that the "color" value of the helperVisualizeMotionAndStructureStereo function is the cause,
The following code on line 39 of the actual helperVisualizeMotionAndStructureStereo function
color = xyzPoints(:, 3);
When I checked the value of this color, it became the following value.
color =
0 × 1 empty single column vector
However, since xyzPoints of the workspace in "stereoslam.m" that I am making is written as "264x3 single", I think that the color value should be a sequence of all the values in the third column.
The following xyzPoints in the helperVisualizeMotionAndStructureStereo function
[xyzPoints, currPose, trajectory] = retrievePlottedData(obj, vSetKeyFrames, mapPoints);
How can I enter the value of xyzPoints in my workspace instead of this?
Also, if my thinking is wrong and the error is another cause, please let me know about the cause.
댓글 수: 0
답변 (1개)
Qu Cao
2021년 11월 22일
In helperVisualizeMotionAndStructureStereo.m, please note the following code in retrievePlottedData which discards xyzPoints outside the axis limits.
% Only plot the points within the limit
inPlotRange = xyzPoints(:, 1) > obj.XLim(1) & ...
xyzPoints(:, 1) < obj.XLim(2) & xyzPoints(:, 2) > obj.YLim(1) & ...
xyzPoints(:, 2) < obj.YLim(2) & xyzPoints(:, 3) > obj.ZLim(1) & ...
xyzPoints(:, 3) < obj.ZLim(2);
xyzPoints = xyzPoints(inPlotRange, :);
You can change the following properties in helperVisualizeMotionAndStructureStereo for your use case.
XLim = [-20 100]
YLim = [-100 40]
ZLim = [-5 15]
참고 항목
카테고리
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!