TeamCode/src/main/java/org/firstinspires/ftc/teamcode/opmodes/demo/JewelOpMode.java
@Override
    public void init() {
        telemetry.addData("Status", "Initialized");

        jewelDetector = new JewelDetector();
        jewelDetector.init(hardwareMap.appContext, CameraViewDisplay.getInstance());

        //Jewel Detector Settings
        jewelDetector.areaWeight = 0.02;
        jewelDetector.detectionMode = JewelDetector.JewelDetectionMode.MAX_AREA; // PERFECT_AREA
        //jewelDetector.perfectArea = 6500; <- Needed for PERFECT_AREA
        jewelDetector.debugContours = true;
        jewelDetector.maxDiffrence = 15;
        jewelDetector.ratioWeight = 15;
        jewelDetector.minArea = 700;

        jewelDetector.speed = JewelDetector.JewelDetectionSpeed.VERY_SLOW;

        jewelDetector.enable();


    }
/*
     * Code to run ONCE when the driver hits INIT
     */
Code to run ONCE when the driver hits INIT
Code to run ONCE when the driver hits INIT
@Override
    public void init() {
        telemetry.addData("Status", "Initialized");
        jewelDetector = new JewelDetector();
        jewelDetector.init(hardwareMap.appContext, CameraViewDisplay.getInstance());
        jewelDetector.areaWeight = 0.02;
        jewelDetector.detectionMode = JewelDetector.JewelDetectionMode.MAX_AREA; 
        jewelDetector.debugContours = true;
        jewelDetector.maxDiffrence = 15;
        jewelDetector.ratioWeight = 15;
        jewelDetector.minArea = 700;
        jewelDetector.speed = JewelDetector.JewelDetectionSpeed.VERY_SLOW;
        jewelDetector.enable();
    }
@ Override public void init ( ) { telemetry . addData ( "Status" , "Initialized" ) ; jewelDetector = new JewelDetector ( ) ; jewelDetector . init ( hardwareMap . appContext , CameraViewDisplay . getInstance ( ) ) ; jewelDetector . areaWeight = 0.02 ; jewelDetector . detectionMode = JewelDetector . JewelDetectionMode . MAX_AREA ; jewelDetector . debugContours = true ; jewelDetector . maxDiffrence = 15 ; jewelDetector . ratioWeight = 15 ; jewelDetector . minArea = 700 ; jewelDetector . speed = JewelDetector . JewelDetectionSpeed . VERY_SLOW ; jewelDetector . enable ( ) ; }
Code to run ONCE when the driver hits INIT
Code to run ONCE when the driver hits INIT
//Jewel Detector Settings // PERFECT_AREA //jewelDetector.perfectArea = 6500; <- Needed for PERFECT_AREA