Skip to content

Instantly share code, notes, and snippets.

@n1ckfg
n1ckfg / convert-mat.py
Created June 14, 2021 22:02 — forked from iaalm/convert-mat.py
Convert between .mat and .h5
#!/usr/bin/python3
import h5py
import numpy
import scipy.io
import argparse
parser = argparse.ArgumentParser()
parser.add_argument("file", help="h5 file or mat file")
args = parser.parse_args()
@n1ckfg
n1ckfg / fill_depth_colorization.py
Created May 1, 2021 15:16 — forked from ialhashim/fill_depth_colorization.py
Python implementation of depth filling from NYU Depth v2 toolbox
# Original Matlab code https://cs.nyu.edu/~silberman/datasets/nyu_depth_v2.html
#
#
# Python port of depth filling code from NYU toolbox
# Speed needs to be improved
#
# Uses 'pypardiso' solver
#
import scipy
import skimage
@n1ckfg
n1ckfg / index.svg
Created March 19, 2021 05:26 — forked from spite/index.svg
WebGL in SVG via foreignObject
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
@n1ckfg
n1ckfg / FooTool.cs
Last active February 18, 2021 06:11 — forked from andybak/FooTool.cs
using System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using Conway;
using UnityEngine;
using Random = System.Random;
namespace TiltBrush.AndyB
{
@n1ckfg
n1ckfg / main-multi.cpp
Created January 30, 2021 19:44 — forked from prisonerjohn/main-multi.cpp
Sensing Machines FBOs
#include "ofApp.h"
int main()
{
ofGLFWWindowSettings settings;
settings.setSize(1280, 720);
settings.setPosition(glm::vec2(0, 0));
settings.resizable = true;
settings.decorated = true;
@n1ckfg
n1ckfg / main-multi.cpp
Created January 30, 2021 19:43 — forked from prisonerjohn/main-multi.cpp
Sensing Machines FBOs
#include "ofApp.h"
int main()
{
ofGLFWWindowSettings settings;
settings.setSize(1280, 720);
settings.setPosition(glm::vec2(0, 0));
settings.resizable = true;
settings.decorated = true;
@n1ckfg
n1ckfg / bitdepth.pde
Created January 6, 2021 08:07
Illustration of bit depth
int stepW, stepH;
color colA = color(255,0,0);
color colB = color(0,0,255);
color fillCol = colA;
int numRows = 5;
void setup() {
size(1024, 768, P2D);
noStroke();
@n1ckfg
n1ckfg / error.txt
Created December 30, 2020 20:08
Jetson nano ofxAzureKinect linking error
/home/pi/Development/openFrameworks/of_v0.11.0_linuxarmv7l_release/addons/obj/linuxarmv7l/Release/ofxAzureKinect/src/ofxAzureKinect/Stream.o: In function `ofxAzureKinect::Stream::releaseCapture()':
Stream.cpp:(.text+0x5c): undefined reference to `k4a_capture_release'
/home/pi/Development/openFrameworks/of_v0.11.0_linuxarmv7l_release/addons/obj/linuxarmv7l/Release/ofxAzureKinect/src/ofxAzureKinect/Stream.o: In function `ofxAzureKinect::Stream::setupImageToWorldTable(k4a_calibration_type_t, k4a::image&)':
Stream.cpp:(.text+0xe8): undefined reference to `k4a_image_create'
Stream.cpp:(.text+0x100): undefined reference to `k4a_image_release'
Stream.cpp:(.text+0x10c): undefined reference to `k4a_image_get_buffer'
Stream.cpp:(.text+0x1ac): undefined reference to `k4a_calibration_2d_to_3d'
/home/pi/Development/openFrameworks/of_v0.11.0_linuxarmv7l_release/addons/obj/linuxarmv7l/Release/ofxAzureKinect/src/ofxAzureKinect/Stream.o: In function `ofxAzureKinect::Stream::updateDepthInColorFrame(k4a::image const&, k4a::imag
@n1ckfg
n1ckfg / setup-azure-kinect-on-jetson-x-nx.md
Created December 30, 2020 06:20 — forked from madelinegannon/setup-azure-kinect-on-jetson-x-nx.md
Notes on Setting up the Microsoft Azure Kinect on Ubuntu 18.04
@n1ckfg
n1ckfg / bashrc_functions.txt
Last active December 30, 2020 06:33
bash commands
function maintenance {
sudo apt-get update -y
sudo apt-get upgrade -y
sudo apt-get autoremove -y
sudo apt-get autoclean -y
}
export PG_OF_PATH=/home/pi/Development/openFrameworks/of_v0.11.0_linuxarmv7l_release/
function projectGenerator {