Blob Detection in a bright area

edited December 2016 in Library Questions

Hello! I have a blob detection code, but in my work area is a window that lets in a lot of light and at that point the blob detection doesnt work I want to know how to keep detecting in this area. This is a part of my code, Im using 0.4f brightness

import processing.video.*; import blobDetection.*;

import java.awt.Color;

import oscP5.*; import netP5.*;

Capture cam; BlobDetection theBlobDetection; PImage img; boolean newFrame=false; color trackColor; float threshold = 20; float distThreshold = 75; // double lum = Luminance.lum(color); ArrayList puntos;

OscP5 oscP5; NetAddress myRemoteLocation; NetAddress supercollider;

// ================================================== // setup() // ================================================== void setup() { // Size of applet size(640, 480); // Capture cam = new Capture(this, 640, 480, 30); // Comment the following line if you use Processing 1.5 cam.start();

// BlobDetection
// img which will be sent to detection (a smaller copy of the cam frame);
img = new PImage(80,60); 
theBlobDetection = new BlobDetection(img.width, img.height);
theBlobDetection.setPosDiscrimination(true);
theBlobDetection.setThreshold(0.4f);// will detect bright areas whose luminosity > 0.2f;

ellipseMode(CENTER);

puntos = new ArrayList();

oscP5 = new OscP5(this,12001); myRemoteLocation = new NetAddress("127.0.0.1",12000); supercollider = new NetAddress("127.0.0.1",12000); }

Tagged:
Sign In or Register to comment.