画像処理
/** * blur blur blur * * @author aa_debdeb * @date 2016/02/27 */ void setup(){ size(500, 500); frameRate(30); } void initialize(){ background(random(255), random(255), random(255)); stroke(random(255), random(255), random(255)); strokeWeig…
入力画像 出力画像 入力画像を工夫しないと上手くいかない. /** * Image by Delaynay Triangulation * * @author aa_debdeb * @date 2015/12/13 */ Delaynay delaynay; void setup(){ size(540, 360); smooth(); noLoop(); PImage image = loadImage("photo…
入力画像 出力画像 /** * Unsharp Masking * * @author aa_debdeb * @date 2015/12/01 */ void setup(){ size(512, 512); noLoop(); PImage image = loadImage("blur_lena.jpg"); image(image, 0, 0); int winSize = 5; int halfWinSize = winSize / 2; prin…
/** * Decrease in the peripheral light quantity * * @author aa_debdeb * @date 2015/11/06 */ void setup(){ size(640, 424); PImage image = loadImage("image.jpg"); image(image, 0, 0); noFill(); stroke(0); strokeWeight(1); for(int i = 0; i < 4…
/** * Patchwork Image * * @author aa_debdeb * @date 2015/10/30 */ void setup(){ size(512, 512); PImage image = loadImage("lena.jpg"); image(image, 0, 0); loadPixels(); color[][] colors = new color[width][height]; for(int x = 0; x < width; …
画像を重ねる(多重露光する) /** * Multiple Exposure * * @author aa_debdeb * @date 2015/10/29 */ void setup(){ size(640, 424); PImage image1 = loadImage("image1.jpg"); PImage image2 = loadImage("image2.jpg"); image(image1, 0, 0); tint(255,…
/** * Image Like Super NES * * @author aa_debdeb * @date 2015/10/28 */ void setup(){ size(512, 512); PImage image = loadImage("lena.jpg"); image(image, 0, 0); loadPixels(); int cLevel = 5; int levelStep = 255 / cLevel; for(int x = 0; x < w…
画像の色を反転する /** * Reversed Color Image * * @author aa_debdeb * @date 2015/10/27 */ void setup(){ size(512, 512); PImage image = loadImage("lena.jpg"); image(image, 0, 0); loadPixels(); for(int x = 0; x < width; x++){ for(int y = 0; …
/** * Pointilism Image * * @author aa_debdeb * @date 2015/10/26 */ void setup(){ size(512, 512); PImage image = loadImage("lena.jpg"); image(image, 0, 0); loadPixels(); color[][] colors = new color[width][height]; for(int x = 0; x < width;…
/** * Edge Detection by Sobel Filter * * @author aa_debdeb * @date 2015/10/23 */ PImage image; void setup(){ size(512, 512); noStroke(); image = loadImage("lena.jpg"); image(image, 0, 0); loadPixels(); color[][] greys = new color[width][he…
/** * Blurred Image * * @author aa_debdeb * @date 2015/10/24 */ int blurWidth = 15; void setup(){ size(512, 512); noStroke(); PImage image = loadImage("lena.jpg"); image(image, 0, 0); loadPixels(); color[][] colors = new color[width][heigh…
画像を表示する /** * Display Image * * @author aa_debdeb * @date 2015/10/23 */ size(512, 512); PImage image = loadImage("lena.jpg"); image(image, 0, 0); 画像に色をつける /** * Tint Image * * @author aa_debdeb * @date 2015/10/23 */ PImage i…