Skip to content

Instantly share code, notes, and snippets.

@zabela
zabela / getGlobalContrastFactor.m
Created January 21, 2014 12:29
Algorithm to measure image contrast, adapted from "Global contrast factor-a new approach to image contrast" (Matkovic, Kresimir et al., 2005) http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.84.2683&rep=rep1&type=pdf
function [GCF, LC] = getGlobalContrastFactor( im )
%
% GCF = getGlobalContrastFactor( im )
%
% MATLAB algorithm implementation of the
% "Global contrast factor-a new approach to image contrast"
% (Matkovic, Kresimir et al., 2005)
%
% http://www.cg.tuwien.ac.at/research/publications/2005/matkovic-2005-glo/
%
@zabela
zabela / getColourfulness.m
Last active March 11, 2024 13:47
Algorithm to measure images colourfulness, adapted from "Measuring colourfulness in natural images" (Hasler and Susstrunk, 2003) http://infoscience.epfl.ch/record/33994/files/HaslerS03.pdf
function C = getColourfulness( im )
%
% C = getColourfulness( im )
%
% MATLAB algorithm implementation of the
% "Measuring colourfulness in natural images"
% (Hasler and Susstrunk, 2003)
%
% Input:
% im - image in RGB
@zabela
zabela / Folders.java
Last active December 19, 2015 10:48
A simple beginner Java application to create infite folders, one inside of another built in java. Perfect to mess with your friends xD
package Folders;
import java.io.*;
public class Folders {
public static void main(String[] args) throws IOException {
File file=new File(".");