Std::vector objectPoints = Generate3DPoints() įor (unsigned int i = 0 i Generate3DPoints()įor (unsigned int i = 0 i < points. To simplify things, we can use a 'perfect' projection model (no camera lens distortions) with an arbitrary focal length (if you wish to display the image, you need to play around with the focal length according to your data, such that the projected points' values are in not too high, for example not above 2048, which is the width of a 2k resolution image). Computer Vision Toolbox algorithms provide point cloud processing functionality for downsampling, denoising, and transforming point clouds. Does anyone has anything to share It will be a good addition to Matlab. Now I want to convert it to 2D depth image of say 240320. You can alsot take a look at this question:īare in mind that you will not be able to reconstruct you original 3d data (since the depth info was lost in the projection process) Software de prueba 3D Point Cloud to 2D depth image Follow 129 views (last 30 days) Show older comments Wajahat on 0 Link Translate Commented: Walter Roberson on Hi I have a 3D point cloud.
This is based on the pinhole camera model, take a look here for example: In opencv a point cloud, or any 3d point for that matter can be projected onto a 2d image using projectpoints. I will assume that by 'convert' you mean project.
What do you mean by 'convert' a point cloud to a 2d image?