Tech Tips

  1. Uncategorized
  2. 120 view

[Processing]How to use Camera

Outline

Try to develop program which use camera and draw the image to make AR app in the future.

Source Code

The source code is following.
It’s very easy to make it with Processing. How useful!
import processing.video.*;

// Definition camera device interface
Capture cam;

void setup() {
  // Set size
  size(640,480,P3D);
  // Create camera device interface
  cam = new Capture(this, width, height);
}

void draw() {
  // Check whether camera is available
  if (cam.available() == false) return;
  // Get camera image
  cam.read();
  // Draw camera image
  background(0);
  image(cam, 0, 0, width, height);
}

Result

camera
The result is like following.
Of course, actually, the result is movie.

Uncategorized recent post

  1. Run Amazon FreeRTOS on M5Stack Core2 for AWS …

  2. Udacity Self-Driving Car Engineer Nanodegree …

  3. Install sbt 1.0.0 and run sample template

  4. Visualization of Neural Network and its Train…

  5. [Machine Learning]Created docker image includ…

関連記事

PAGE TOP