Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

View Seanmatthews's full-sized avatar

Sean D Matthews Seanmatthews

  • Rowboat Entertainment
  • New York, NY
View GitHub Profile
@vurtun
vurtun / _GJK.md
Last active April 16, 2024 17:52
3D Gilbert–Johnson–Keerthi (GJK) distance algorithm

Gilbert–Johnson–Keerthi (GJK) 3D distance algorithm

The Gilbert–Johnson–Keerthi (GJK) distance algorithm is a method of determining the minimum distance between two convex sets. The algorithm's stability, speed which operates in near-constant time, and small storage footprint make it popular for realtime collision detection.

Unlike many other distance algorithms, it has no requirments on geometry data to be stored in any specific format, but instead relies solely on a support function to iteratively generate closer simplices to the correct answer using the Minkowski sum (CSO) of two convex shapes.

@maxim
maxim / gh-dl-release
Last active March 29, 2024 16:41
Download assets from private Github releases
#!/usr/bin/env bash
#
# gh-dl-release! It works!
#
# This script downloads an asset from latest or specific Github release of a
# private repo. Feel free to extract more of the variables into command line
# parameters.
#
# PREREQUISITES
#
@monabf
monabf / bluerov2_ardusub_sitl_tutorial.txt
Last active January 26, 2024 11:12
Tutorial on how to set up Gazebo simulations of the BlueROV2 (model provided by BlueElectrics), using SITL and ArduSub, and a package provided by kdkalvik for use with mavros.
This folder provides simulation of the BlueROV2 using Gazebo for the dynamics and ArduPilot SITL for the communication and ground control.
Source: https://gist.github.com/patrickelectric/60a1d300e0afadf85066cc5d8e3d51ff
http://discuss.bluerobotics.com/t/ardusub-simulation-sitl/481/30
-------------------------------------------------------------------------------------------------------------------------
@yohhoy
yohhoy / cv2ff.cpp
Created February 17, 2016 15:41
Convert from OpenCV image and write movie with FFmpeg
/*
* Convert from OpenCV image and write movie with FFmpeg
*
* Copyright (c) 2016 yohhoy
*/
#include <iostream>
#include <vector>
// FFmpeg
extern "C" {
#include <libavformat/avformat.h>
@Seanmatthews
Seanmatthews / laplace_of_gaussian_2D.cpp
Last active November 6, 2023 12:18
Compute Laplace of Gaussian kernel for a size and sigma using OpenCV
#include <opencv2/opencv.hpp>
#include <opencv2/imgproc.hpp>
#include <assert.h>
// Calculates Laplace of Gaussian kernel
cv::Mat createLOGKernel(int ksize, double sigma)
{
using namespace cv;
using namespace std;
@trhura
trhura / cvpicker.py
Created October 12, 2014 03:40
opencv color picker
#! /usr/bin/env python2
import cv2
import numpy as np
colors = []
def on_mouse_click (event, x, y, flags, frame):
if event == cv2.EVENT_LBUTTONUP:
colors.append(frame[y,x].tolist())
@carlos8f
carlos8f / zen.txt
Last active February 20, 2022 12:32
101 zen stories
Abraham Lincoln once asked one of his secretaries, If you call a tail a leg, how many legs does a horse
have?.
Five, replied the secretary.
No, said the President, The answer is four. Calling a tail a leg doesn't make it a leg.
A group of frogs were traveling through the woods, when two of them fell into a deep pit. All the other
frogs gathered around the pit. When they saw how deep it was, they told the two frogs that they were as
good as dead.
The two frogs ignored the comments and tried to jump up out of the pit with all of their might. The other
frogs kept telling them to stop, that they were as good as dead. Finally, one of the frogs took heed to what
@Seanmatthews
Seanmatthews / gopro_streaming.cpp
Last active November 24, 2021 14:31
GoPro Hero4 Black C++ Streaming With OpenCV
#include <boost/exception/exception.hpp>
#include <boost/thread.hpp>
#include <boost/chrono.hpp>
#include "opencv2/opencv.hpp"
#include "opencv2/highgui.hpp"
using namespace cv;
using namespace std;
@rbb
rbb / README.md
Created October 18, 2018 23:07
Setup autofs on Ubuntu 18.04

Mounting CIFS with automount on Ubuntu 18:

  1. Install the necessary applications/servers:

    sudo apt install autofs smbclient cifs-utils

  2. Configure autofs

create /etc/auto.cifs, with this variant from auto.smb, courtesy howtoforge

@nilsdeppe
nilsdeppe / emacs.el
Last active June 7, 2020 16:31
My Emacs init file
;;; initfile --- Summary:
;;; Commentary:
;; Emacs 25.1 and newer tested
;;; Code:
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Configuration/Customization:
;; Defines global variables that are later used to customize and set
;; up packages.
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;