Skip to content

Instantly share code, notes, and snippets.

View jordanwesthoff's full-sized avatar

Jordan Westhoff jordanwesthoff

View GitHub Profile
@jordanwesthoff
jordanwesthoff / tmaker_list.sh
Created January 19, 2015 17:12
Time Lapse Maker Commands
#!/bin/bash
# Run this in the directory with all of the files to be made
ls -1v | grep png > files2.txt
@jordanwesthoff
jordanwesthoff / gist:40de005aa4a5070c5b79
Created February 2, 2015 19:35
Test GraphicsMagick
gm convert -verbose -gamma 2.2 A004C007_1404240S.00164.dpx A01.tiff
@jordanwesthoff
jordanwesthoff / all_curves.m
Last active August 29, 2015 14:15
This is a test function called all_curves, which is a basic tutorial to plotting multiple curves on a single plot in MATLAB. This function plots lines based upon a given interval of temperatures and then analyzes them using the contained MATLAB function black_bodyf to analyze them using Planck's energy equation for black body emitter sources.
% MATLAB
function all_curves(floor_temp, ceil_temp)
% Interactive example and tutotial for plotting multiple lines on a Matlab
% figure using black_body representative temperatures.
% Function takes in two values, a low (floor) temperature and a high (ceil)
% temperature and plots lines incremented between them. The function then
% plots each plotted_line based on each increment and then scales automatically to
% fit the values.
@jordanwesthoff
jordanwesthoff / 3d_lut.sh
Created February 17, 2015 14:38
Applying 3D LUT's in FFMPEG
#!/bin/bash
ffmpeg -i input -vf lut3d=<lut file> -c:a copy output
@jordanwesthoff
jordanwesthoff / gist:085b726ad2ebc3dba6fa
Created February 20, 2015 16:55
ImageMagick LUT operator
# Correct syntax to use imagemagick to apply a 3D LUT to an image frame
convert [input_frame] [LUT frame (must be HALD)] -hald-clut [output_frame_name]
@jordanwesthoff
jordanwesthoff / wind_chill.py
Last active August 29, 2015 14:15
Python script to simply calculate wind_chill
import os
import sys
import time
def getValue():
T = float(raw_input("Enter a number: "))
return T
def getValue():
V = float(raw_input("Enter a number: "))
@jordanwesthoff
jordanwesthoff / wind_chill.py
Created March 11, 2015 13:22
NOAA RealFeel Temperature Python Script
```
Basic script to parse the current time and then use the official NOAA algorithm to return the current RealFeel temperature.
Jordan Westhoff, RIT 2015
```
import os
import sys
import time
T = input('Enter the current temperature (F): ')
@jordanwesthoff
jordanwesthoff / OETF_cieplot_demo.m
Created March 17, 2015 20:29
MATLAB Script to generate CIEPlot of the REC.709 OETF Function
% Basic single use script to plot the correct CIE REC.709 OETF function
% Jordan Westhoff, RIT 2014
% Use exposure math to calculate the first portion of the OETF
G = 1.099;
B = 1 - G;
L = (G/10)^(20/11);
@jordanwesthoff
jordanwesthoff / generate_10_bit_Scale.m
Last active August 29, 2015 14:17
MATLAB based Lift, Gamma, Gain LUT slope generator for 10-bit imaging
% Idiot proof snippet of code to generate a scale of 0-max 10 bit values in MATLAB.
col_1 = [0:1:1023];
Ten_bit_vals= [col_1 col_1];
display(Ten_bit_vals)
@jordanwesthoff
jordanwesthoff / custom_saturation.m
Created March 18, 2015 18:25
MATLAB based saturation map function, REC.601 implementation
function custom_saturation(input_image, coefficient)
% USAGE
% Run the function with an input image as a string and with a coefficient
% for the level of saturation to apply to the image. Some common usages
% are:
%
% custom_saturation('panda.jpg', 0) -> This will entirely desaturate the
% image, panda.jpg
% custom_saturation('panda.jpg', 1) -> This will not modify the image sat.