Atlassian uses cookies to improve your browsing experience, perform analytics and research, and conduct advertising. Accept all cookies to indicate that you agree to our use of cookies on your device. Atlassian cookies and tracking notice, (opens new window)
Confluence
For you

Creative Coding
Results will update as you type.
  • Moving Poster Template
  • Programming Basics 2017_
  • Programming Basics 2018
  • Project: Game 2018
  • Programming Basics 2019
  • Programming Basics 2020

/
Moving Poster Template

Moving Poster Template

Dec 13, 2017



  • Use this template for creating your Moving Poster
  • Take care that your work appears correctly at different resolutions
  • Avoid editing the OpenCV and setupScreen files
  • You may need to adjust the lighting situation for the face tracking to work correctly

Tips for optimising Performance: 

  • Printing to the console is quite slow. Be sure to comment any print() and println() cals in your code before presenting.
  • Optimise any graphic and videos so they are no bigger that absolutely necessary. 
  • Resizing images in real time is very slow. You can speed this up by resizing any images at the program start. See the example below. 
  • As a last resort, we can reduce the monitor resolution to speed things up 


Resizing images
PImage bg;

void setup() {
  size(640, 360);

  bg = loadImage("image.jpg");
  bg.resize(width,height); // we rescale the image once here, instead of in the draw loop
}

void draw() {
  image(bg, 0, 0);
  // this is much faster than image.(bg, 0,0, width, height) which would rescales the graphics every frame
}



Exporting for flip book


Template with PDF export function. 



For exporting images the folowing code can be used (PDF doesn't work with 3D for example) :


Resizing images
void setup() {  
	size(2100,2970,P3D); 
}
void draw() {
//code for exporting image on each frame  
   save("export/frame"+frameCount+".png");
  if (frameCount == 30) {
    exit();
  }
}







, multiple selections available,
{"serverDuration": 59, "requestCorrelationId": "bfdc61225bb84e5eb08e6c5ff048c906"}