Skip to content

Instantly share code, notes, and snippets.

@abrhm
abrhm / raii_value.cpp
Created March 12, 2018 09:37
RAII value
#include <iostream>
#include <type_traits>
template<typename T, class Deleter>
class raii_value
{
public:
static_assert(std::is_fundamental<T>::value, "raii_value must hold a fundamental type");
@kylemcdonald
kylemcdonald / main.cpp
Last active June 20, 2022 01:05
Depth in shader using openFrameworks.
#include "ofMain.h"
class ofApp : public ofBaseApp {
public:
ofShader shader;
ofEasyCam cam;
ofFbo fbo;
void setup() {
ofBackground(0);
ofFbo::Settings s;
@UnaNancyOwen
UnaNancyOwen / k4a_double_exponential_filter.h
Last active July 12, 2023 10:17
Double Exponential Smoothing Filter for Azure Kinect Body Tracking SDK
/*
k4a_double_exponential_filter.h
This file contains holt double exponential smoothing filter for filtering joints.
It was ported for Azure Kinect Body Tracking SDK based on following implementation.
https://social.msdn.microsoft.com/Forums/en-US/045b058a-ae3a-4d01-beb6-b756631b4b42
std::unordered_map<int32_t, double_exponential_filter> double_exponential_filter;
while( true )