Skip to content

Instantly share code, notes, and snippets.

Avatar

Dimiter 'malkia' Stanev malkia

View GitHub Profile
@malkia
malkia / pcomp.md
Created October 24, 2019 06:15 — forked from reinsteam/pcomp.md
Links to materials about perceptual image comparison metric
View pcomp.md

Perceptual Image Differencing

  • [1983. Peter Burt and Edward Adelson. The Laplacian Pyramid as a Compact Image Code][1]
  • [1993. Scott Daly. The visible differences predictor: an algorithm for the assessment of image fidelity][2]
  • [1995. Andrew S. Glassner. In Principles of digital image synthesis, pages 59-66][3]
  • [1997. Gregory Ward-Larson, Holly Rushmeier, and Christine Piatko. A visibility matching tone reproduction operator for high dynamic range scenes][4]
  • [1999. Mahesh Ramasubramanian, Sumant N. Pattnaik, Donald P. Greenberg. A perceptually based physical error metric for realistic image synthesis][5]
  • [2004. Yangli Hector Yee, Anna Newman. A perceptual metric for production Testing][6]
  • [2004. HECTOR YEE, SUMANTA PATTANAIK and DONALD P. GREENBERG. Spatiotemporal Sensitivity and Visual Attention for Efficient Rendering of Dynamic Environments][7]
  • [2004. Hector Yee. *A Perceptual Metric for Production Testing (Submitted and Accepted in Journal of
View main.cpp
#include <type_traits>
#include <iostream>
#include <cassert>
#include <cstdint>
#include "murmur3_32_constexpr.hpp"
// Add compilers here
#define UNKNOWN -1
#define GCC 0
#define CLANG 1
@malkia
malkia / ProFi.lua
Created December 2, 2012 07:59 — forked from perky/ProFi.lua
ProFi, a simple lua profiler that works with LuaJIT and prints a pretty report file in columns.
View ProFi.lua
--[[
ProFi v1.3, by Luke Perkin 2012. MIT Licence http://www.opensource.org/licenses/mit-license.php.
Example:
ProFi = require 'ProFi'
ProFi:start()
some_function()
another_function()
coroutine.resume( some_coroutine )
ProFi:stop()
@malkia
malkia / ray-object.lua
Created July 5, 2012 05:21 — forked from geoffleyland/ray-object.lua
Raytrace using vector objects
View ray-object.lua
local sqrt = math.sqrt
local huge = math.huge
local delta = 1
while delta * delta + 1 ~= 1 do
delta = delta * 0.5
end
-- vectors -------------------------------------------------------------------
@malkia
malkia / ray-stack.lua
Created July 5, 2012 05:21 — forked from geoffleyland/ray-stack.lua
Raytrace avoiding vector objects
View ray-stack.lua
local sqrt = math.sqrt
local huge = math.huge
local delta = 1
while delta * delta + 1 ~= 1 do
delta = delta * 0.5
end
-- vectors -------------------------------------------------------------------
@malkia
malkia / safe_array.lua
Created April 24, 2012 17:18 — forked from stevedonovan/safe_array.lua
This defines an array with strict bounds checking. It is also impossible to set any existing index to a nil value, so the array remains free of holes. The table functions will not work on such arrays because they are userdata, giving an extra layer of pro
View safe_array.lua
local function out_of_range(i,n)
if type(i) == 'number' then
if i > 0 and i <= n then return true
else error('out of range',3)
end
else
error 'cannot index array by non-number type'
end
end
@malkia
malkia / hack.sh
Created April 1, 2012 04:25 — forked from erikh/hack.sh
OSX For Hackers
View hack.sh
#!/usr/bin/env sh
##
# This is script with usefull tips taken from:
# https://github.com/mathiasbynens/dotfiles/blob/master/.osx
#
# install it:
# curl -sL https://raw.github.com/gist/2108403/hack.sh | sh
#
View install-sdk
#!/bin/sh
SDK=`dirname $0`
SCRIPT=`basename $0`
SDKPARENT=`dirname $SDK`
PLATFORM=`uname -sp`
if [ "$PLATFORM" = "Darwin i386" -o "$PLATFORM" = "Darwin x86_64" ]; then
echo "iPhone Toolchain installer script by rpetrich"
echo ""