Visualization and Graphics ➤ Interaction ➤ Dept ICS ➤ Faculty of Science ➤ UU

https://webspace.science.uu.nl/~telea001/Site/TopBar

Additional material

This page lists pointers to additional material that complements the slides, recommended textbooks, and readings. The goal of this additional material is to help participants

  • understand in more details the theory and techniques discussed during the lectures
  • get more details about methods and techniques, e.g., implementation and "how to use" tips
  • use implementations of methods and techniques discussed in the course
  • customize existing technique implementations or build one's own

Important: Scan the entire list of resources below before digging deep into (and starting to use) one specific tool or library! There is overlap between the functionality of different tools. Hence, finding the best depends on checking them all against your specific requirements and constraints.

Datasets

You receive a single shape dataset with one label (class) per shape. This dataset comes from merging two well-known 3D shape benchmarks:

Princeton benchmark

One of the best-known benchmarks used in vision, graphics, 3D shape processing, and 3D shape retrieval. Contains about 1800 models in 19 classes (finer-grained subclasses are also available). The link also contains sample C code for

  • reading, writing and manipulating the shapes
  • visualizing the shapes
  • evaluating retrieval tasks and plotting retrieval quality metrics
  • building a minimalistic shape retrieval application

Labeled PSB Benchmark

A subset of 380 meshes from 19 shape classes from the Princeton Shape Benchmark. Meshes are segmented, with per-segment annotations. A rich set of features are also provided for these meshes:

  • curvature (64 features)
  • PCA components (48 features)
  • geodesic shape contexts (270 features)
  • geodesic distance features (15 features)
  • shape diameter (72 features)
  • distance from medial surface (24 features)
  • spin images (100 features)

The link also contains C++ and Matlab code for manipulating the above data and computing shape features.

Software demos and tutorials

Step 1. Read and view the data

OpenGL crash course

If unsure about your OpenGL skills, this mini-tutorial (with source code) will help you creating your first minimal 3D viewer.

Another OpenGL crash course

A second state-of-the-art GL course. Go to the legacy tutorials. The first 5-10 tutorials should be enough to get you going. Don't wander off too far over the website - there's too much material there to assimilate quickly.

3D meshes

Minimal sample code for all mesh types, including reading PLY files. 3D unstructured meshes are especially interesting to study.

Reading image data in OpenGL

Shows how to read the contents of the current window (which renders a 3D shape) into a PGM image file.

Step 2: Preprocessing and cleaning

Libraries

MeshLab tool

The best tool for interactive 3D mesh processing out there! Reads/writes most 3D mesh formats. Implements operations such as mesh refinement, simplification, cleaning, normal computation, smoothing, and computing statistics. Highly recommended to quickly inspect (and possibly fix) your 3D meshes.

PyMeshLab

A Python wrapper allowing you to use the functions of MeshLab (see above) in your program. Highly recommended if you want to batch process many shapes using MeshLab.

GeomView tool

Another tool for interactive 3D mesh processing. Slightly older than MeshLab.

Polygon Mesh Processing (PMP) library

PMP is an excellent, generic, C++ library for 3D mesh processing. It supports mesh importing (various formats), remeshing, cleaning, smoothing, curvature computation, and interactive visualization. A good solution for all your entire infrastructure!

Open3D library for 3D data processing

Open3D is the bigger brother of PMP. It is a state-of-the-art library for all types of 3D data processing. It also has bindings for C++ and Python.

OFF mesh tools

Handy collection of command-line tools to process meshes in OFF file format (Java). Supports mesh refinement, merging close vertices, reducing all faces to triangles.

VEDO

Powerful Python library for processing and visualizing 3D meshes, including functions for charting and plotting data.

Triangle mesh tools

Another handy collection of command-line tools to process meshes in PLY, OFF, OBJ formats (C++, source code included). Implements mesh viewing, format conversion, alignment, cleaning, and decimation.

Trimesh

Native Python library for 3D mesh processing.

PyMesh

Powerful Python library for 3D mesh processing. Offers more functionality than Trimesh, but is somewhat more complex to set up and use.

Hole filling

Sample code for hole filling on 3D meshes.

3. Feature extraction

PCA alignment

Sample code for aligning a shape's eigenvectors with the coordinate axes.

Simple mesh decimation and refinement

Sample code for simple area-based mesh decimation and refinement.

Shape property descriptors

Sample code for computing the shape descriptors A3,D1,D2,D3,D4.

Curvature computation of 3D surfaces

Sample code for computing and visualizing the curvature tensor for a 3D surface using PCA.

Reflective symmetry descriptor

Sample code for computing and visualizing the reflective symmetry descriptor of a 3D shape.

Convex hull

Sample code to compute the convex hull of a 3D point cloud. Uses the QHull library.

2D skeletonization

Probably the easiest-to-use algorithm to compute pixel-exact Euclidean skeletons of 2D binary shapes. Can process images up to 1000x1000 pixels in roughly a second on a modern CPU.

A GPU implementation of the same method (require NVidia CUDA) which runs about 50 times faster is available here.

4. Querying

Implementations of the Earth Mover's Distance (EMD) in C and Python:

https://pypi.org/project/pyemd/0.0.10/
https://docs.scipy.org/doc/scipy/reference/generated/scipy.stats.wasserstein_distance.html
https://samvankooten.net/2018/09/25/earth-movers-distance-in-python
https://github.com/garydoranjr/pyemd

Demo: Here is an interactive demo that allows you to sketch two distributions and computes their EMD.

5. Scalability

t-SNE toolkit

The original t-SNE implementation (in many programming languages), written and documented by its author.

t-SNE explained

Very readable blog walking you step-by-step through the full t-SNE theory and how to implement it!

How to use t-SNE effectively

Interactive webpage to try out t-SNE and understand its perplexity parameter setting.

Approximate Nearest Neighbors (ANN)

Easy-to-use C++ library for performing nearest neighbors search in n dimensions.

Autoencoders tutorial

Very readable but comprehensive tutorial on autoencoders including Python source code.

Bonus step

Computing the curvature histogram

Sample code to compute the histogram descriptor of a 3D shape's curvature.