You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

15 lines
716 B
Java

/* Identify Euglena in a certain portion of the camera feed */
void identifyEuglena() {
roiFrame = get(610, 290, roiWidth, roiHeight); // Get pixels of interest and saves as image for valid image path
opencv.loadImage(roiFrame); // Input proper pixels into cv processing
opencv.updateBackground(); //Necessary for background subtraction
opencv.useGray(); //Create grayscale image
opencv.dilate(); //Clean up image
opencv.erode();
opencv.blur(3);
dst = opencv.getOutput(); //Save computer vision as separate image path
contours = opencv.findContours(); //Find outline of moving objects - euglena
count = contours.size(); // Count number of outlines
}