10.3D Visualisation

The CImg library has basic capabilities for visualizing and rendering 3D mesh objects, which can help the developer represent complex image data. In this chapter, we propose a quick tour of these possibilities, first describing the general principles governing the creation of 3D mesh objects, and then detailing the way these objects are internally represented in the library. Several examples are proposed to illustrate different practical use cases.

10.1 Structuring of 3D mesh objects

A 3D mesh object is completely defined with CImg by the union of four distinct structures:

  1. A set of 3D points, defining the N vertices of the object. The 3D coordinates of these points are stored in a CImg < T > image of size N×3 , where type ...

Get Digital Image Processing with C++ now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.