Skip to content

Instantly share code, notes, and snippets.

@kyleingraham
kyleingraham / main.cpp
Created August 23, 2020 16:36
Calculate/Export Radiometric Response Function with OpenCV
#include <fstream>
#include <iostream>
#include <opencv2/core/utility.hpp>
#include <opencv2/imgcodecs.hpp>
#include <opencv2/photo.hpp>
void load_exposure_data(std::ifstream& list_file,
std::vector<cv::Mat>& exposures,
std::vector<float>& exposure_times);
@kyleingraham
kyleingraham / example.html
Created October 18, 2019 01:22
Globally Include Django CSRF Tokens in Forms When Using intercooler.js
{% load ic_csrf_token %}
{% ic_csrf_token %}
<label>
<select name="manufacturer"
ic-post-to="/models"
ic-target="#model-select"
ic-replace-target="true">
<option disabled selected>Select a manufacturer</option>
<option value="Audi">Audi</option>
@kyleingraham
kyleingraham / js-exif-rotate.html
Created February 15, 2019 18:37 — forked from runeb/js-exif-rotate.html
Auto-rotate images locally in the browser by parsing exif data
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<input id="file" type="file" accept="image/*" />
<br/>
<h2>As read:</h2>
<img id="placeholder1" width=300/><br/>
<h2>Rotated by exif data:</h2>
<img id="placeholder2" width=300/>
<script>