Skip to content

Instantly share code, notes, and snippets.

@stanchiang
stanchiang / equirectangularToStereographic.m
Created July 13, 2017 15:32 — forked from OrganicIrradiation/equirectangularToStereographic.m
Equirectangular to Stereographic Projections (Little Planets) in MATLAB
% Based upon code by nicoptere: http://en.nicoptere.net/?p=315
function outImage = equirectangularToStereographic(FILENAME,OUTSIZE,CAMDIST,WORLDROTATION)
if nargin < 2
OUTSIZE = [1080,1920];
end
if nargin < 3
CAMDIST = 8;
end
if nargin < 4
WORLDROTATION = 0;
@stanchiang
stanchiang / CMDeviceMotion.swift
Created August 30, 2016 03:37 — forked from travisnewby/CMDeviceMotion.swift
Determine the direction of "gaze" of the device in any orientation
extension CMDeviceMotion {
func gaze(atOrientation orientation: UIInterfaceOrientation) -> SCNVector4 {
let attitude = self.attitude.quaternion
let aq = GLKQuaternionMake(Float(attitude.x), Float(attitude.y), Float(attitude.z), Float(attitude.w))
let final: SCNVector4
switch UIApplication.sharedApplication().statusBarOrientation {
@stanchiang
stanchiang / gist:b4e4890160a054a9c1d65f9152172600
Last active July 31, 2016 16:41
blurring_nonhumans in video
# import the necessary packages
from __future__ import print_function
from imutils.video import VideoStream
from imutils.object_detection import non_max_suppression
from imutils import paths
import numpy as np
import argparse
import imutils
import cv2

Note: This is an older post that I did back when I thought I might have time to be a blogger. Oh I was oh so wrong. However, it has proven useful for some folks on stackoverflow. Thus I'm keeping it alive here on Gist.

One of my past projects dealt heavily with an open source Apple technology called HTTP Live Streaming. It’s an HTTP based streaming protocol that at its most fundamental level provides a way to stream video and audio from just about any server with nothing but a few free software tools provided by Apple**. However, it has a few additional features that I think make it a really exciting tool. Yet, I haven’t seen HTTP Live Streaming used very much. This is probably mainly due to the combination of a lack of good/clear documentation, and Apple’s Live Streaming Developer Tools being command line based also make the barrier to entry higher than many developers want to deal with.

The hope is to share my understanding of how to use this technology to: