Skip to content

Instantly share code, notes, and snippets.

@tsulej
tsulej / strokes.pde
Created March 13, 2015 11:03
Give the pencil stroke (or lightning) effect to the image
// Original: http://www.openprocessing.org/sketch/145401
// adaptation to images, Tomasz Sulej, generateme.blog@gmail.com
// put image filename here:
String imagefilename = "tree.jpg";
// run, after 30 iterations result will be saved automatically
// or click mouse when ready
/////////////////////////////////////
@tsulej
tsulej / lens.glsl
Created May 5, 2015 09:43
GLSL Shader and Processing - 2D example
// shader example for Processing
// uniform - variables set in Processing sketch using shader.set()
// varying - variables set by Processing itself
// image to process
uniform sampler2D texture;
// mouse position normalized
uniform vec2 inp;
// vertex color
@tsulej
tsulej / crt.pde
Created June 26, 2015 13:15
CRT filter
// based on http://www.magneticrealms.com/posts/2014/02/03/a-crt-filter-without-shaders/
// generateme.tumblr.com
// generateme.blog@gmail.com
void setup() {
PImage img = loadImage("w.jpg");
size(img.width,img.height);
noFill();
smooth(8);
@tsulej
tsulej / deploy.prototxt
Created July 10, 2015 21:18
Oxford102 deploy file
name: "oxford102"
input: "data"
input_dim: 10
input_dim: 3
input_dim: 227
input_dim: 227
layer {
name: "conv1"
type: "Convolution"
bottom: "data"
@tsulej
tsulej / createIndexFiles.sh
Last active November 14, 2016 22:51
Bash scripts for preparing images for deep neural network training
#!/bin/bash
# script creates train.txt and val.txt prepared by processImages.sh script
# it assumes that all images are processed and there are 10 images minimum in each category
results_folder="images"
rm train.txt
rm val.txt
@tsulej
tsulej / deploy.prototxt
Created August 8, 2015 23:10
Train your own net prototxt files
name: "MYNET"
input: "data"
input_dim: 1
input_dim: 3
input_dim: 224
input_dim: 224
layer {
name: "conv1/7x7_s2"
type: "Convolution"
bottom: "data"
@tsulej
tsulej / dots2.pde
Last active September 13, 2017 17:57
dots2 code for MCCC Project
// DOTS2 example code for http://mcreativecoding.tumblr.com project
// Tomasz Sulej, generateme.blog@gmail.com
// http://generateme.tumblr.com
// @2015
// move mouse to change visualisation
// click to change parameters
// space to save animation frames
@tsulej
tsulej / chladni.pde
Last active November 27, 2015 15:07
Chladni
// GenerateMe
// chladni pattern generator
// press space to save
// click to random change
float b1 = 1;
float b2 = 1;
float b3 = 1;
float b4 = 1;
float b5 = 1;
@tsulej
tsulej / nlinesvfield.pde
Created April 29, 2016 19:42
Nonintersecting lines vector field drawing
// generateme.tumblr.com, 2016
// idea by zach lieberman
// choose variant
int variant = 0; // 0 or 1;
void setup() {
size(800, 800);
background(0, 5, 25);
strokeWeight(0.8);
@tsulej
tsulej / font2vertex.pde
Last active May 6, 2016 08:16
Create vertex shape from bitmap fonts
// create vertex glyphs from fonts
final static int stepsize = 10; // less - more accuracy
final static int beams = 20; // more - more accuracy
final static int NONE = -1;
final static int shape_type = NONE; // or any shape type used in beginShape() function
final static boolean curve = true; // only with shape NONE
HashMap<String, ArrayList<PVector>> letters = new HashMap<String, ArrayList<PVector>>();