Skip to content

Instantly share code, notes, and snippets.

View tomas789's full-sized avatar

Tomas Krejci tomas789

  • Ampiato.com
  • Czech Republic, Europe
View GitHub Profile
V2_02_medium (20 FPS) V2_03_difficult (20 FPS) V2_02_medium (10 FPS) V2_03_difficult (10 FPS)
Frame rate 20 FPS 20 FPS 10 FPS 10 FPS
Simulation time 80 s 80 s 80 s 80 s
Execution time 115.19 s 80.71 s 57.16 s 41.14 s
Real-time factor 0.69 0.99 1.40 1.94
RMSE 0.8277 m 0.9524 m 0.5909 m 0.4650 m
Final error 1.278 m (2.20 %TTD) 1.628 m (2.80 %TTD) 0.920 m (1.58 %TTD) 0.822 m (1.412 %TTD)
include Makefile.vars
all: \
reconstruction_global/ok.txt \
reconstruction_incremental/ok.txt
exports: \
export_keypoints \
export_matches \
//
// PtGrayCamera.hpp
// PtGrey
//
#ifndef PtGrayCamera_hpp
#define PtGrayCamera_hpp
#include <dc1394/dc1394.h>
#include <stdexcept>
@tomas789
tomas789 / README.md
Last active May 29, 2024 15:13
OpenCV <-> Objective-C++ (UIImage) conversion

OpenCV -> UIImage

cv::Mat mat /* = ... */;
UIImage* image = [UIImage fromCvMat:mat];

UIImage -> OpenCV

@tomas789
tomas789 / calibration.yaml
Created October 2, 2016 06:32
Sample camera calibration file for tonav (https://github.com/tomas789/tonav)
#--------------------------------------------------------------------------------------------
# Camera Parameters. Adjust them!
#--------------------------------------------------------------------------------------------
# Camera calibration and distortion parameters (OpenCV)
Camera.fx: 528.52949934564765
Camera.fy: 528.52949934564765
Camera.cx: 319.5
Camera.cy: 239.5
@tomas789
tomas789 / gist:10915069
Created April 16, 2014 18:07
C++/C++11 Variadic template CSV parser. Supports quoted strings, custom parsers, strongly typed, STL-like, generic, fast, highly customizable.
#include <functional>
#include <fstream>
#include <iostream>
#include <limits>
#include <sstream>
#include <tuple>
#include <vector>
template <typename ... TList>
struct DefaultParsersTuple;
@tomas789
tomas789 / llvmfcs.cpp
Created December 28, 2013 19:39
Dump functions from LLVM's bc file Compile: clang++-mp-3.3 `llvm-config-mp-3.3 --cxxflags --ldflags --libs core jit X86 bitreader` -std=c++0x -o llvmfcs llvmfcs.cpp Usage: llvmfcs filename.bc
#include <iostream>
#include <string>
#include <llvm/ADT/OwningPtr.h>
#include <llvm/Bitcode/ReaderWriter.h>
#include <llvm/IR/LLVMContext.h>
#include <llvm/IR/Module.h>
#include <llvm/Support/MemoryBuffer.h>
#include <llvm/Support/system_error.h>
@tomas789
tomas789 / jit2.cpp
Created December 28, 2013 18:42
Another LLVM JIT - Loading variable from memory clang++-mp-3.3 `llvm-config --cppflags --ldflags --libs core jit X86` jit2.cpp
#include <iostream>
#include <cstdint>
#include <string>
#include "llvm/ExecutionEngine/JIT.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Module.h"
#include "llvm/PassManager.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Analysis/Verifier.h"
@tomas789
tomas789 / jit.cpp
Created December 28, 2013 17:57
LLVM JIT Example - Example of very simple JIT using LLVM. It compiles function with prototype `int64_t()` returning value `765`. Build: clang++ `llvm-config --cppflags --ldflags --libs core jit X86` jit.cpp
#include <iostream>
#include <cstdint>
#include <string>
#include "llvm/ExecutionEngine/JIT.h"
#include "llvm/IR/IRBuilder.h"
#include "llvm/IR/Module.h"
#include "llvm/PassManager.h"
#include "llvm/Support/TargetSelect.h"
#include "llvm/Analysis/Verifier.h"
@tomas789
tomas789 / gist:7844152
Created December 7, 2013 15:46
Template-based Visitor pattern implementation in C++ PS: Even more generic version. Notice that actual visitor class have non-virtual methods. This allows to have them templated.
#include <iostream>
#include <utility>
template <typename ... Types>
class Visitor;
template <typename T>
class Visitor<T> {
public:
virtual void visit(T & visitable) = 0;