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.

82 lines
3.0 KiB
Java

package oldfiles;/*
Previously implemented programs which we need to redo using classes
case 2 : // Starts clear program
clearScreen();
break;
case 3 : // Uses reduced screen raster
// rectangularStim(64, 5);
// proto488flashraster(screenWidth - 1500, 400, screenWidth - 6*menu.width, screenHeight - 400);
// heatup();
// squareCorridor();
// LEDtest();
// colorScreen();
// clearScreen();
// circleArrayStim(screenWidth - 1500, 800, 5, 5, 20, 5);
// angleMove(screenWidth - (displayWidth-750*cos(45*PI/360)-x-menu.width), centerY, 45, 750, 0.01);
// window(20, 20);
// separate(0.1);
// merge(0.1);
// shrinkingWindow(0.01, 0, 0, 255, 10);
// translateCircle(0.1);
// gradientWindow(0,0,0,0,0,15,500);
// randomLED();
// lineRotate(50, 0.01);
break;
case 4 : // Create LED sequences or paint backgrounds to be loaded later
angleGather(screenWidth - 1400, centerY, 45, 750);
// protoGather(screenWidth - 800, 300, screenWidth - 8*menu.width, screenHeight - 500);
break;
*/
class ClearScreen {
int timeElapsed, timeCurrent, timeInitial, euglenaCountInitial, euglenaCount,
roiCornerX, roiCornerY, roiWidth, roiHeight;
float euglenaReduction, targetReduction;
// opencv = new OpenCV(this, roiWidth, roiHeight);
// opencv.startBackgroundSubtraction(7, 3, .35);
// roiFrame = new PImage(roiWidth, roiHeight);
// break;
//
// /* Identify Euglena in a certain portion of the camera feed */
// void countEuglena() {
// roiFrame = get(roiCornerX, roiCornerY, 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
// euglenaCount = contours.size(); // Count number of outlines
// }
//
// void reset() {
// timeInitial = millis();
// timeElapsed = 0;
// identifyEuglena();
// euglenaCountInitial = euglenaCount;
// }
//
// ClearScreen(targetReduction){
// this.reset();
// }
//
// void mouseClicked(float x, float y){
// if (!point1complete){
// lineinprogress.x1 = x;
// lineinprogress.y1 = y;
// point1complete = true;
// } else {
// lineinprogress.x2 = x;
// lineinprogress.y2 = y;
// lineinprogress.visible = true;
// lines.add(lineinprogress);
//
// lineinprogress.draw();
// this.reset();
// }
// }
//}