Skip to content

Instantly share code, notes, and snippets.

@nedhorning
nedhorning / autoCalibrateJPEG.R
Created July 10, 2015 19:42
R test script for calibrating JPEG images - this is a work in progress
setwd("/media/nedhorning/684EE5FF4EE5C642/AMNH/PhotoMonitoring/FilterTests/ChrisPhotos")
library(raster)
library(maptools)
library(stringr)
############################# SET VARIABLES HERE ###################################
# Enter the value for gamma *** Vout = Vin ^ gamma : Vin = Vout ^ (1/gamma) : gamma = log(Vout, Vin) : Vin = RAW DN and Vout = JPEG DN
blueGamma <- 0.8
redGamma <- 0.8