It's a small room scanner that can use first generation Kinect. Written with PCL and Qt in C++.
PS: This is my reanimated bachelor project. Don't judge the code quality :)
It's not that hard I promise.
- You'll need Windows 10 PC (It might work on Linux and macOS in principle, cause CMake and VCPKG are cross-platform. But I did not try it yet. Sorry).
- You'll need to install VCPKG. Just follow the official guide, it's pretty good. It's a Microsoft C++ package manager. This is a lot better for complex libraries such as PCL, Qt, etc, since you don't have to worry too much about building them. (Been there, done that, don't want to do it ever again).
vcpkg
contains all of the dependencies for the scanner. - You'll also need to install CMake. Which is a build automation system for the project.
- You also might want to install OpenNI2 SDK and Kinect1.8 SDK. They are supposed to be installed automatically by the
vcpkg
but just in case. Here is OpenNI2 and here is Kinect1.8. - You'll need Visual Studio 2019. Since that's the one I tested it on.
- The project depends on
qt5
qt5 serial port
vtk
pcl
openni2
boost
eigen
flann
qhull
opencv-2.4.10
aruco-1.2.5
cpu_tsdf
. My point here is, that it's a lot of libraries. Most of them are quite heavy. Be prepared to spend some quality time building the project. - First generation Kinect. This is the hardware this project is written to work with.
I use git bash and gonna write all of the commands in it.
git clone https://github.com/ilia-glushchenko/Kinect-3D-Scanner.git --recursive
cd Kinect-3D-Scanner
mkdir build && cd build
cmake ..
explorer .
- Open
RoomScanner.sln
- Build as usual in Visual Studio.
- Set
RoomScanner
as Stratup Project.
-
First let's connect your Kinect to the PC. (If you don't want to just keep reading, you can replay and record streams from virtual Kinect, cool yeah, I know. I am also gonna attach some sample streams, if there is no way you can get your hands on one of those Kinects anymore.)
-
The next step is to create a new project by clicking
Make Project
. It will create a new project directory.
-
Let's open it by clicking
Open Project
and selectingproject.ini
inside our new project folder. -
You'll be presented with 2 windows. It's a point cloud viewer and control ui window. It might look like there is a lot of stuff. But generally what you are interested
Start Stream
button,Record stream
,Replay recorded stream
checkboxes. You can start streaming from your Kinect by pressingStart Stream
. You can record it if you checkedRecord stream
. You can replay streams if you uncheckRecord stream
and checkReplay recorded stream
(Be careful there are no clever "foolproof" checkbox checks inside the app). -
Once you start the stream you'll be presented with two more windows. That contains the RGB and depth data. Notice how
Start Stream
button becameStop Stream
. That's the one you want to click to properly shut down the device and save your streams. -
To perform reconstruction you'll need to convert native OpenNI *.ONI stream file into PCL compatible *.PCD files. To do that check
Save Stream as PCD
checkbox, before starting the stream. You can do that from the replayed stream, there is no difference for the application. -
When you have saved your point clouds. You can click the final button
Perform Reconstruction
. To register (align) point clouds and then triangulate them using the TSDF algorithm.
To be continued...