RealSkel
RealSkel copied to clipboard
Real-time Skeletonization for Sketch-based Modeling
Real-time Skeletonization for Sketch-based Modeling (SMI:2021)

Demo
We provide an executable software under directory "demo_exe/".

Let's create a rigged cat!
1. Split View: 2D View (left window), 3D View (right window)

2. Open Image: Ctrl+O (demo_exe/image/cat.png)

3. Sketch a torso

4. Adjust Contour

5. Parameter in the pop-up window

6. Create a leg in front of the torso

7. Create a symmetric leg behind the torso

8. View symmetric part


9. Create another part: press 'Space' in keybord: switch to 'Sketch Mode', you will see the colorful contour, then sketch, follow step 3-5



10. Create ear


11. Refine the skeleton

12. Finally!


Pick a joint, and hold the left-mouse-button to move.
'Dance! Dance! Dance!', too naive, too simple, the LBS deformation. Have to improve later on...
Tested Environment
- Ubuntu20.04 LTS, gcc-7 compiler
- Windows10, Visual Studio Community 2017/2019 x86_amd64 compiler
Prerequisites
Ubuntu20.04 LTS
-
cmake
: https://cmake.org/ -
VS Code
(Optional but Highly Recommended): https://code.visualstudio.com/docs/cpp/cmake-linux
Windows10
-
Visual Studio 2017/2019
-
git
: https://git-scm.com/ -
cmake
: https://cmake.org/ -
VS Code
(Optional but Highly Recommended): https://code.visualstudio.com/docs/cpp/cmake-linux
Dependencies
Qt, OpenCV, Boost, Libigl(Tetgen, Triangle, CGAL, Eigen) Please install Qt, OpenCV, Boost first, and modify the CMakeLists.txt according to your library's install path.
Ubuntu20.04 LTS
(1) Install Qt 5.12.2
- Download
qt-opensource-linux-x64-5.12.2.run
from https://download.qt.io/archive/qt/5.12/5.12.2/, click.run
to install
(2) Install OpenCV
sudo apt-get install libopencv-dev
(3) Install Boost
sudo apt-get install libboost-all-dev
Windows10
(1) Install Qt 5.12.2
- Download
qt-opensource-windows-x86-5.12.2.exe
from https://download.qt.io/archive/qt/5.12/5.12.2/, click.exe
to install, then selectMSVC 2017 64-bit
(2) Install OpenCV
- Download OpenCV source code from https://github.com/opencv/opencv/archive/4.2.0.zip
- CMake Configure:

- Build and Install: 1. open
OpenCV.sln
underbuild
directory with VS2017/VS2019. 2. Selectbuild type
asRelease
andBuild solution
. 3. gotoCMakeTargets/INSTALL
andBuild

(3) Install Boost
https://sourceforge.net/projects/boost/files/boost-binaries/1.74.0/, select suitable versions to download (boost_1_74_0-msvc-14.2-64.exe
for VS2019, boost_1_74_0-msvc-14.1-64.exe
for VS2017), click .exe
to install
Compile & Run
For Linux Users, type in the following commands:
mkdir build
cd build
cmake ..
make -j8
./main
For Windows Users
It's highly recommended using VS Code
and cmake tools from 'VS code' market place
to compile the source code.

- Select the
build type
asRealse
- Select a compiler:
Ctrl+Shift+P
, type inCMake: Select a Kit
, select a compiler (eg.Visual Studio Community 2017 x86_amd64
orVisual Studio Community 2019 x86_amd64
) - CMake Configuration:
Ctrl+Shift+P
, type inCMake Configure
. The configuration process will automatically download all dependencies of libigl. Wait untilCMake Configuration
successfully finishes.

- Build the solution: you will find
RealSkel.sln
under directorybuild/
, open.sln
with Visual Studio 2017/2019, switch toRelease Mode
, andBuild Solution
.

- Run the program: copy all
*.dll
and directoryplatforms/
fromdemo_exe
to yourbuild/Release/
directory. Clickmain.exe
, then you can run the program.


Other Issues
Adapt to CGAL
goto external\libigl\external\cgal\Surface_mesh\include\CGAL\Surface_mesh\Surface_mesh.h
, add the following code in Class SM_Index
size_type idx()const{return idx_;}
You should get something like this
class SM_Index
{
// ...
size_type idx()const{return idx_;}
// ...
};


The lazy way
You can also replace the file `external\libigl\external\cgal\Surface_mesh\include\CGAL\Surface_mesh\Surface_mesh.h' with Surface_mesh.h .