Point Cloud Library (PCL) bindings for Torch
WARNING: Work in progress! Expected v1 release date: 2015-12-20 If you want to help please contact @andreaskoepf.
Prerequisites:
Install using LuaRocks:
$ luarocks install pcl
local pcl = require 'pcl'
cloud = pcl.PointCloud(pcl.PointXYZ)
cloud:loadPCDFile('data/bunny.pcd')
pt = cloud:points() -- get tensor view to points
print(pt)
Capture cloud point with OpenNI2 device and show result live in a cloud viewer window.
local pcl = require 'pcl'
local s = pcl.OpenNI2Stream(pcl.PointXYZRGBA)
local v = pcl.CloudViewer()
s:start()
for i=1,1000 do
local c = s:read(1000)
if c ~= nil then
v:showCloud(c)
end
end
s:stop()