Temp Cam

As a part the ThoughtWorks ART residency with Neil Harbisson and Moon Ribas, I am llooking for a way to capture temperature information visually.

Using an infrared camera and an Infrared filter I want to capture temperature information to be able to see where the heat (a head ring of 24 68ohm resistors at 3.7V) is at over time.

The camera used is an “infragram camera” made to capture health of plants. Using the IR filter we take away light from the picture generated by the camera allowing only heat information to be shown.

infracam1

RESULTS:

web cam

A macbook webcam output

webcam + IR filter

A macbook webcam with IR filter applied

IR camera + IR filter

Infragram camera with IR filter applied

 In order to have a measurement of the degrees captured by the camera, I made a simple Processing applet that maps the RGB information from the camera to degrees. Hovering on the video feed will show the degreed above the cursor of that spot.

Below is the processing code Im using:

/*
 * Reading and displaying an image from an attached Capture device. 
 * Avrage color info from camera
 * Map color to range of temperature
 * Sample color where mouse is
 * Show a degrees at cursor point
 * Show color picked as a rect
 */

import processing.video.*;

Capture cam;
float blue;

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

  String[] cameras = Capture.list();

  if (cameras == null) {
    println("Failed to retrieve the list of available cameras, will try the default...");
    cam = new Capture(this, 640, 480);
  } 
  if (cameras.length == 0) {
    println("There are no cameras available for capture.");
    exit();
  } else {
    println("Available cameras:");
    printArray(cameras);

    // The camera can be initialized directly using an element
    // from the array returned by list():
    cam = new Capture(this, cameras[0]);
    // Or, the settings can be defined based on the text in the list
    //cam = new Capture(this, 640, 480, "Built-in iSight", 30);

    // Start capturing the images from the camera
    cam.start();
  }
}

void draw() {
  if (cam.available() == true) {
    cam.read();
  }
  image(cam, 0, 0, width, height);
  // The following does the same as the above image() line, but 
  // is faster when just drawing the image without any additional 
  // resizing, transformations, or tint.
  //set(0, 0, cam);
  
  
  loadPixels();
  blue = blue(pixels[(width*mouseY)+mouseX]);
  float red = red(pixels[(width*mouseY)+mouseX]);
  float green = green(pixels[(width*mouseY)+mouseX]);
  float ave = (blue + green + red)/3;
  float temp = map(ave, 0, 255, 20, 133);
  fill (255);
  text(temp + " °C", mouseX -5, mouseY -20);
  fill(red, green, blue);  
  rect(20, 20, 35, 60, 5);
}

Leave a Comment

Required fields are marked *.