explaingit

gaoxiang12/slambook

7,417C++Audience · researcherComplexity · 4/5LicenseSetup · hard

TLDR

Example C++ code organized by chapter for a Chinese textbook on Visual SLAM, the technique robots and self-driving cars use to build a map and locate themselves within it simultaneously using camera images.

Mindmap

mindmap
  root((SLAM Book))
    What it does
      Textbook code examples
      Visual SLAM techniques
    Topics covered
      3D geometry
      Camera models
      Non-linear optimization
      Loop closure
      Dense reconstruction
    Tech stack
      C++ examples
    Audience
      Students
      Researchers
      Robotics engineers
    Editions
      First edition this repo
      slambook2 recommended
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

Things people build with this

USE CASE 1

Follow a Visual SLAM textbook chapter by chapter by compiling and running the matching C++ examples on your own computer.

USE CASE 2

Study how non-linear optimization is applied to camera pose estimation by reading and running the optimization chapter code.

USE CASE 3

Use the dense 3D reconstruction examples as a starting point for a robotics or computer vision research project.

Tech stack

C++

Getting it running

Difficulty · hard Time to first run · 1day+

Designed for older Linux environments, the author recommends switching to the updated slambook2 repository for better compatibility with modern systems.

MIT license, use, modify, and distribute freely for any purpose, including commercial use, with the copyright notice preserved.

In plain English

This repository contains the companion code for a Chinese textbook called "14 Lectures on Visual SLAM: From Theory to Practice," published in 2017. SLAM stands for Simultaneous Localization and Mapping, a technique used in robotics and computer vision where a device (such as a robot or a self-driving car) builds a map of its surroundings at the same time as it figures out its own position within that map. Visual SLAM specifically does this using camera images rather than laser sensors. The code is organized by chapter, with folders named ch2 through ch13 plus a project folder for chapter 9. Each chapter pairs written theory in the book with runnable C++ examples. Topics covered include 3D geometry, camera models, image processing, non-linear optimization, and techniques for detecting and closing loops in a map. The final chapter covers building dense 3D reconstructions from camera data. The author notes at the top of the README that a second edition of the book (slambook2) was released in 2019 with better compatibility for newer Linux systems, and that an English-language version (slambook-en) has also been completed. New readers are encouraged to switch to those newer repositories rather than this first edition. The code is published under the MIT license, meaning anyone can use, modify, or build on it without asking permission. The README is brief and primarily serves as orientation for people who already have the book in hand and want to run the examples on their own computer. It does not explain SLAM concepts itself, that content lives in the book. The repository has no description field, but the book citation and chapter list give a clear sense of the scope.

Copy-paste prompts

Prompt 1
I'm reading '14 Lectures on Visual SLAM' and want to compile and run the chapter 5 camera model examples on Ubuntu. Walk me through installing the required dependencies and building the code.
Prompt 2
Help me understand the loop closure detection code in the slambook and explain how it decides when the robot has returned to a previously visited location.
Prompt 3
I want to adapt the non-linear optimization example in slambook's ch6 to use my own camera calibration parameters. Show me which values to change and how to supply them.
Open on GitHub → Explain another repo

← gaoxiang12 on gitmyhub — every repo by this author, as a profile.

Verify against the repo before relying on details.