Is there a substitute for pcshow()?

Hello,
I got a 3D point cloud with " xyzPoints = depthToPointCloud(depthImage,depthDevice)". As I only have 2015a "pcshow" doesn't work. Is there a substitute command?
Thanks in advance!

4 commentaires

Image Analyst
Image Analyst le 21 Oct 2015
What does it do? What toolbox is it in (please list it below)?
lucca k
lucca k le 21 Oct 2015
what does what do? the comand "pcshow"? --> http://de.mathworks.com/help/vision/ref/pcshow.html
my point cloud is taken by a Kinect sensor. As I want to use it for an obstacle avoidance I need to see the points, transform and then filter them. all toolboxes I installed is the image aquisition toolbox
Image Analyst
Image Analyst le 22 Oct 2015
It looks like that pcshow() is in the Computer Vision System Toolbox, so you must have installed that too. It's now in the product list so maybe the developer will see it and answer.
lucca k
lucca k le 22 Oct 2015
pcshow() was implemented in 2015b. As I only have access to 2015a it can't work for me I think.

Connectez-vous pour commenter.

 Réponse acceptée

Walter Roberson
Walter Roberson le 19 Oct 2015
xyz = get(xyzPoints, 'location');
scatter3(xyz(:,1), xyz(:,2), xyz(:,3))
However, please show size(xyz) after the get(), as there is a different packing of values that might apply.

21 commentaires

lucca k
lucca k le 19 Oct 2015
Thank you Walter.I get this error. Do you maybe know why?
lucca k
lucca k le 19 Oct 2015
Try
xyz = xyzPoints.Location;
If that does not work please show size(xyz) and class(xyz)
lucca k
lucca k le 19 Oct 2015
Modifié(e) : lucca k le 19 Oct 2015
ok it didn't work. it sais " Attempt to reference field of non-structure array." d is size and c is class.
lucca k
lucca k le 19 Oct 2015
lucca k
lucca k le 19 Oct 2015
Walter Roberson
Walter Roberson le 19 Oct 2015
That's not a real point cloud!
Just use the scatter3 command but change the variable name to xyzPoints in the three locations.
lucca k
lucca k le 19 Oct 2015
this is the scatter I get
lucca k
lucca k le 19 Oct 2015
and this is the image I want a point cloud from
lucca k
lucca k le 19 Oct 2015
lucca k
lucca k le 19 Oct 2015
I would like a picture like that one to work on.
Walter Roberson
Walter Roberson le 19 Oct 2015
I am not going to try to fix this until after I have some sleep. I am finding the array meaning confusing.
lucca k
lucca k le 19 Oct 2015
Ok, sleep well. I hope to hear from you tomorrow :) Thank you
lucca k
lucca k le 20 Oct 2015
the array meaning is just the resolution of the camera I think.
lucca k
lucca k le 21 Oct 2015
Modifié(e) : lucca k le 21 Oct 2015
hello walter? are you there? I found out that in xyzpoints are more than 524288 elemts and this is way it cant be displayed.
Walter Roberson
Walter Roberson le 21 Oct 2015
My hands have been too sore to do much.
lucca k
lucca k le 22 Oct 2015
ok
Image Analyst
Image Analyst le 22 Oct 2015
I don't know that Walter has the Computer Vision System Toolbox. I don't either.
lucca k
lucca k le 22 Oct 2015
I do
lucca k
lucca k le 26 Oct 2015
so walter do you think you can solve this? why is the array unstructured? maybe I need to get 2015b somehow...
hey walter, it works now with that code:
showPointCloud(xyzPoints, 'VerticalAxis', 'y', 'VerticalAxisDir', 'down');
xlabel('X (m)');
ylabel('Y (m)');
zlabel('Z (m)');
Thank you very much for your help!

Connectez-vous pour commenter.

Plus de réponses (1)

Dima Lisin
Dima Lisin le 31 Oct 2015

2 votes

In R2015a the equivalent function is called showPointCloud.

Community Treasure Hunt

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

Start Hunting!

Translated by