Image-9 Bluescreen2 Advanced

< CS101

Here we'll look at more advanced Bluescreen techniques.

Red Monkey / Blue Monkey

monkey in front of blue background


image-bluescreen2-1

Solution code:

    // red-high -> monkey
    if (pixel.getRed() > avg * 1.05) {

    // flip: red-low -> background
    if (pixel.getRed() < avg * 1.05) {

    // blue-low -> monkey
    if (pixel.getBlue() < avg * 0.95) {

Bluescreen Multi-Pass


image-bluescreen2-2

Solution code:

  // Your code here
  if (pixel.getBlue() > avg * 1.2) {  // select blue (back2)
    pixel2 = back2.getPixel(pixel.getX(), pixel.getY());
    pixel.setRed(pixel2.getRed());
    pixel.setGreen(pixel2.getGreen());
    pixel.setBlue(pixel2.getBlue());
  }

Post-Processing Paint

Here we have banana.jpg
yellow banana with red bricks

On the Mac, Preview has a primitive edit mode. 1. make a copy of your original file first, so you don't mess up the original. Open the copy in Preview. 2 Click the pencil to enter edit mode. 3 Click the circle to draw circles. 4 Click the colors, selecting blue and also a fill-color of blue. Draw/arrange blue circles or whatever. Windows has a similar simple paint program.

yellow banana with blue circles painted in post


image-bluescreen-3

> exercises