Im currently progrmming an AxisCamera to pick up reflective tape and crop rectangle around the tape. i have most of the code down except for the parameters of the HSL Threshold, here is what i have:
public void cameraCapture() throws AxisCameraException, NIVisionException {
if (joy1.getRawButton(3)) {
ColorImage initImg;
BinaryImage dataImg;
ParticleAnalysisReport] particle;
int trgCnt;
SmartDashboard.putString("Taken Picture", "Picture begun...");
if(camera.freshImage()) {
initImg = camera.getImage();
//RIGHT HERE
dataImg = initImg.thresholdHSL(0, 0, 0, 0, 0, 0); //set threshold to bright colors(UNFINISHED)
//No clue how to find these parameters
dataImg = dataImg.removeSmallObjects(false, 1); //remove small pixles from image
dataImg = dataImg.convexHull(false); //fill in rectangles selected
dataImg = dataImg.particleFilter(critCollection); //filter rectangles
trgCnt = dataImg.getNumberParticles();
if(trgCnt > 0) {
particle = dataImg.getOrderedParticleAnalysisReports();
SmartDashboard.putString("Taken Picture", "binary mapping finished....calling Aim");
Aim(particle);
} else {
SmartDashboard.putString("Taken Picture", "No particles to manipulate, picture was not taken?");
}
dataImg.free();
initImg.free();
}
}
}
i don’t know how to find the values. The function requires:
int hueLow
int hueHigh
int saturationLow
int saturationHigh
int luminenceLow
int luminenceHigh
I was told the NI tool “Particle Classification Training” would help, but i am not sure how to go about finding these limits of an image, how can i attain these values? Example image that i would use(im looking for the green boarder): http://dl.dropbox.com/u/78573135/IMAG0051.jpg