1Click飲みRomoCartTempescope色色[:iroiro]Other Projects


Auto-generated popup cards from 3D point cloud data

As a parent, one of the things I like about owning a depth camera (like a Kinect or an Asus Xtion) is that you can take 3D photos of your child.
This is great for immersing in old memories using things like the Oculus Rift,
but has the problem that you can't easily print them out and prop them up on your office desk, as you would do for normal photos.

Sure you could try 3D printing them, but they're still expensive (or really low resolution), and they still don't have the casual feel of printing out photos on paper. (They take up storage space, you can't keep one in your wallet, and they certainly can't be sent in an envelope.)

I noticed the possibility of using popup cards as an easy fix for this problem.
These are lightweight, can handle photo-level quality, and is 3D!
Popup cards, like the things you have in holiday cards.
In this mini-project, I created a program that automatically generates popup cards from 3D point cloud data (collected from an Xtion).

How it works

1. Take a 3D photo of your kid
 or your cat or whatever.

2. Cluster the 3D points into several "layers"
At the point cloud consists of individual coloured points floating in 3D space, which you can't just print onto paper.
Therefore you need to somehow reorganize the points into planes. 

While there are many ways of doing this, I took the quick and dirty approach of simply clustering the points by the distance from the camera.
The image below shows the points as seen from the side, and a histogram of the number of points at each distance from the camera.
You can see that there are peaks in the histogram where there are objects (people, walls, etc). Simply k-means clustering this lets you (sort of) split the points into a small number of layers composed of points that come from spatially close objects.

(Top) The original point cloud seen from the side (Bottom) Histogram of points for distance from camera
This is an example of clustering into 2 layers. You can see that the point cloud was separated into objects in the foreground (1st layer) and the entire back wall (2nd layer).
Point cloud separated into 2 layers
3. Merge the layers into a single card
Now that the point cloud is composed of planes, we can just merge them onto a single card, offsetting one layer from another slightly so that there's a 3D effect when they're cut out.
The below image was generated automatically from the layers, with the red lines added by the program to show where you should cut in order to make this card "popup"-able.
(There are actually some extra steps before this like cleaning the layers to ensure the card stands on its own, but I'm omitting this because it's boring.)
Cut the red dotted lines, and you get a 3D popup card.
And here we have (a rendering of) a popup card:

4. Print it
You can just print the card generated as above, cut the red dotted lines, and you get this:
Popup baby!
They're cheap and quick to mass produce.
The photo quality of the cards is somewhat low (because of the quality of the Xtion camera), but I hope you see that having a 3D popup card literally adds a new layer of expressibility compared to ordinary photos.


In this project, I proposed and implemented a simple algorithm to auto-generate popup cards from 3D point cloud data generated from off-the-shelf cameras.
This provides a much cheaper alternative to 3D printing models, while also adding an extra dimension of expressibility compared to 2D photos.

- Requiring everyone to take 3D photos using a Kinect/Xtion might be slightly unrealistic, but there are certainly more approachable alternatives (like 3D digital cameras e.g FinePix 3D).  We could also go towards a different direction, where we recognize objects from normal 2D photos and 3D-ify them.

- My main usecase for this is that I want to put (3D) photos of my kid on my work desk. There are actually many more benefits of this proposed method, like being able to fold them up and keep them in your wallet, or you could put them in an envelope and send them as holiday cards.

- I haven't released the source code or made this available as a webservice because I haven't had the time, but contact me if you're interested in making your own popup card.

- As a final side note, taking 3D photos of your family on occasions is highly recommended. They're great ways to look back on old memories.



そうするとこんな風に3Dで記録できるのでOculus Riftで没入したりできるのですが、



1. 子供をKinectで撮影する。

2. 点群をクラスタリングして数枚のレイヤーに分ける


3. 1枚のカードに結合する

4. 実際に印刷してみる