Image to Point Cloud Tiny Project

As part of my work on Henry VR for the Art Gallery of NSW with Andrew Yip I needed a quick and simple program to convert our painting paint element scans into 2D point clouds to be shown in 3D space in the VR experience.

These scans are in black and white – think of them like a depth image where the white is where the element has been detected the most, then it fades off to black where none of the particular element has been found on the painting.

An example of a depth image, the more towards white the closer that part is to the camera/viewpoint

I could of course use an existing tool, however they created too dense point clouds for us to use in a VR experience, or thinned out the points in a way that left the results looking displeasing. It was also hard to find a tool that easily allowed us to cut down on the points and remove the points that were the closest to black.

So, I created a quick and easy python script that runs off command line. It allows you to feed in any image (full color or black and white) and pick if you’d like to remove black parts of the image if it is black and white.

I can edit the script directly to change how many points I want and what level of black did I want the program to start removing points at. Being in python I can edit and save changes, then run it without compiling.

Script can be found here

Give it a whirl, if you need a way to view your creation I recommend MeshLab.