/* 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 }