Closed niranjanreddy891 closed 6 years ago
and where is the code you're using to view the cloud? are you using viewer.resetCamera()
?
This is the code which I am using for visualizing pcd file.
from __future__ import print_function
import numpy as np
import pcl
import pcl.pcl_visualization
cloud = pcl.load_XYZRGB('E:/Lidar-practice/new-files/testing/las14_type7_ALS_RIEGL_Q680i.pcd')
visual = pcl.pcl_visualization.CloudViewing()
visual.ShowColorCloud(cloud, b'cloud')
visual.resetCamera()
flag = True
while flag:
flag != visual.WasStopped()
end
Is there anyway to do the same thing using pclpy?
This should work:
from pclpy import pcl
path = r"C:\Users\David Caron\Downloads\las14_type7_ALS_RIEGL_Q680i.pcd"
reader = pcl.io.PCDReader()
pc = pcl.PointCloud.PointXYZRGBA()
reader.read(path, pc)
viewer = pcl.visualization.PCLVisualizer("cloud viewer")
viewer.addPointCloud(pc)
viewer.resetCamera()
while not viewer.wasStopped():
viewer.spinOnce(100)
Refer to the PCL documentation on PCLVisualizer: http://pointclouds.org/documentation/tutorials/pcl_visualizer.php
The function calls should be very close, once you change the syntax a bit. If you're familiar with PCL, you shouldn't be lost.
I plan on adding some examples when I get the time.
Hi, When I am converting las file to pcd file, then visualizing converted pcd file, I am unable to fit the output to the window properly. I tried using
R
in the keyboard. For zooming I used mouse and alsoF
. A small dot is being displayed in the output. Please go through the output which I have attached. window. But it couldn't help me. Can you please solve the issue?This is the file. It has both las file and the converted PCD file.
This is the code which I am trying to use.
las14_type7_ALS_RIEGL_Q680i.zip