Skip to content

Instantly share code, notes, and snippets.

View j5207's full-sized avatar
🏄‍♂️
Working

Ji Han j5207

🏄‍♂️
Working
  • Tusimple
View GitHub Profile
@joinAero
joinAero / camera.py
Created May 19, 2017 06:36
Use Kinect with OpenCV (Python)
import cv2
import sys
class Camera(object):
def __init__(self, index=0):
self.cap = cv2.VideoCapture(index)
self.openni = index in (cv2.CAP_OPENNI, cv2.CAP_OPENNI2)
self.fps = 0
@gocarlos
gocarlos / Eigen Cheat sheet
Last active February 11, 2024 14:07
Cheat sheet for the linear algebra library Eigen: http://eigen.tuxfamily.org/
// A simple quickref for Eigen. Add anything that's missing.
// Main author: Keir Mierle
#include <Eigen/Dense>
Matrix<double, 3, 3> A; // Fixed rows and cols. Same as Matrix3d.
Matrix<double, 3, Dynamic> B; // Fixed rows, dynamic cols.
Matrix<double, Dynamic, Dynamic> C; // Full dynamic. Same as MatrixXd.
Matrix<double, 3, 3, RowMajor> E; // Row major; default is column-major.
Matrix3f P, Q, R; // 3x3 float matrix.