Discussion:
[vtkusers] Generate Cloud Point From Depth Map Image
maskjp
2018-10-17 02:49:14 UTC
Permalink
depthmaptopointcloud.zip
<http://vtk.1045678.n5.nabble.com/file/t342591/depthmaptopointcloud.zip>

I wrote a code in python to generate a depth map of a 3D model and save it
as an image.
But when I wrote code to generate the point cloud from the image, only part
of the point cloud was generated.

I set the same camera parameters but not work.

I attached the code and 3D model in this post.

Anyone have any idea? very appreciative.

Thanks!



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.ki
maskjp
2018-10-19 16:05:17 UTC
Permalink
I figure out the problem. When I use the vtkBMPReader, the output of this
class is a 3 channel vtkImageData, but the vtkDepthImageToPointCloud only
receive a 1 channel depth image. So We need to use vtkImageExtractComponents
to get the first channel of the vtkBMPReader output.

But I still don't understand how vtk compute projection transform matrix.



--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com

Visit other Kitware open-source projects at http://www.kitware.com/opensource/opensource.html

Please keep messages on-topic and check the VTK FAQ at: http://www.vtk.org/Wiki/VTK_FAQ

Search the list archives at: http://markmail.org/search/?q=vtkusers

Follow this link to subscribe/unsubscribe:
https://public.kitware.com/mailman/listinfo/vtkusers
Allie Vacanti
2018-10-30 13:42:19 UTC
Permalink
Depending on settings, there are a few ways it can be computed.
vtkCamera::ComputeProjectionTransform is the starting point for tracking
down the specifics:

https://github.com/Kitware/VTK/blob/master/Rendering/Core/vtkCamera.cxx#L1035-L1127

HTH,
Allie
Post by maskjp
I figure out the problem. When I use the vtkBMPReader, the output of this
class is a 3 channel vtkImageData, but the vtkDepthImageToPointCloud only
receive a 1 channel depth image. So We need to use
vtkImageExtractComponents
to get the first channel of the vtkBMPReader output.
But I still don't understand how vtk compute projection transform matrix.
--
Sent from: http://vtk.1045678.n5.nabble.com/VTK-Users-f1224199.html
_______________________________________________
Powered by www.kitware.com
Visit other Kitware open-source projects at
http://www.kitware.com/opensource/opensource.html
http://www.vtk.org/Wiki/VTK_FAQ
Search the list archives at: http://markmail.org/search/?q=vtkusers
https://public.kitware.com/mailman/listinfo/vtkusers
Loading...