Giter Club home page Giter Club logo

eyevie's Introduction

IV - EyeVoxel

A header only C++ voxel library designed for supporting very large grids.

The IV::VoxelGrid will change its indexing strategy based on compile-time constants defining the upper bounds of the coordinate space. This adaptation removes floating point calculations from computing the storage index (assuming no quantization is performed).

The theoretically supported upper bound for the coordinate space volume is equal equal to: std::numeric_limits<std::uint128_t>::max() = X * Y * Z.

There are a few other classes which may be convenient.

Basics

IV::Specification

The template parameter of nearly all structures and algorithms accepts a IV::Specification structure that defines constexpr values and typename definitions.

Sections below describe how different parameters are filled.

IV::Specification::{Point,PointAccessor}

If you need to borrow point types from libraries such as Eigen or PCL or you even have your own special snowflake, you can.

A point can be anything you like, let's say it follows the popular convention:

union MyPoint {
     struct {
        float x;
        float y;
        float z;
    };

    float xyz[4];
};

You could define either one of these equivalent accessors:

struct PointAccessor {
    float& GetX(MyPoint& pt) { return pt.x; }
    float& GetY(MyPoint& pt) { return pt.y; }
    float& GetZ(MyPoint& pt) { return pt.z; }
};

struct PointAccessor {
    float& GetX(MyPoint& pt) { return pt.xyz[0]; }
    float& GetY(MyPoint& pt) { return pt.xyz[1]; }
    float& GetZ(MyPoint& pt) { return pt.xyz[2]; }
};

Structures

IV::CentroidPoint

A structure you probably expect. It maintains a running mean of of the <X, Y, Z> centroid is for a voxel.

IV::CorrelationPoint

Allows you to extract both the correlation and covariance matrix for a voxel in O(1) time. This point also has a constant memory overhead.

This structure is particularly useful when paired with Eigen::EigenSolver<...> for computing voxel planarity in constant time (minus the EigenSolver).

IV::OccupancyPoint<size_t X, size_t Y, size_t Z>

A structure for further subsampling a voxel into an occupancy grid.

For example, let's say you have an IV::VoxelGrid holding points stored in meters. And you have a Quantizer(0.16) which is sampling points into 16cm^3 voxels. You can further divide the space into an occupancy grid with 2cm^3 accuracy by specifying IV::OccupancyPoint<...>.

This is an example in 2D: IV::OccupancyPoint<4, 4, 4>

 <-{  16 cm  }->
|               |
+---+---+---+---+
| 0 | 1 | 0 | 0 |
+---+---+---+---+
| 0 | 1 | 0 | 0 |
+---+---+---+---+
| 0 | 1 | 1 | 0 |
+---+---+---+---+
| 0 | 0 | 1 | 1 |
+---+---+---+---+
^   ^
|   |
{4cm}

This is an example in 2D: IV::OccupancyPoint<2, 2, 2>

 <-{16cm}->
 |       |
 +---+---+
 | 0 | 1 |
 +---+---+
 | 0 | 1 |
 +---+---+
 ^   ^
 |   |
 {8cm}

eyevie's People

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.