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.
25 lines
731 B
Java
25 lines
731 B
Java
/* Show backend computer vision for curious users */
|
|
void showCV() {
|
|
rectMode(CORNER);
|
|
|
|
stroke(100);
|
|
noFill();
|
|
rect(roiCornerX, roiCornerY, roiWidth, roiHeight); // Outlines region of interest
|
|
|
|
noFill();
|
|
stroke(255, 0, 0);
|
|
strokeWeight(3);
|
|
for (Contour contour : contours) {
|
|
beginShape();
|
|
for (PVector p : contour.getPoints()) {
|
|
vertex(p.x + roiCornerX, p.y + roiCornerY);
|
|
}
|
|
endShape(PConstants.CLOSE); // Draws outlines of moving objects
|
|
}
|
|
image(dst, roiCornerX + roiWidth, roiCornerY, roiWidth, roiHeight); // Displays backend cv
|
|
textSize(56);
|
|
text("Count: " + count, 300, 600); // COunts number of euglena in region of interest
|
|
}
|
|
|
|
|