Q: What is the extract channel for the color yellow? I am trying to detect the color yellow on EasyOpenCV. The method asks for a COI, but I can't figure out what COI is the color yellow. I am using YCbCr. This is for OpenCV on FTC. The camera and all are working, I just need to know how to change the color from detecting red to detecting yellow.
        Mat YCbCr = new Mat();
        Mat leftborder;
        Mat rightborder;
        double leftavgfin;
        double rightavgfin;
        Mat outPut = new Mat();
        Scalar rectColor = new Scalar(255.0, 0.0, 0.0);

        public Mat processFrame(Mat input) {
            Imgproc.cvtColor(input, YCbCr, Imgproc.COLOR_RGB2YCrCb);
            Rect rightRect = new Rect(1,1,399,447);
            Rect leftRect = new Rect(400,1,399,447);
            input.copyTo(outPut);
            Imgproc.rectangle(outPut, rightRect, rectColor, 2);
            Imgproc.rectangle(outPut, leftRect, rectColor, 2);
            leftborder = YCbCr.submat(leftRect);
            rightborder = YCbCr.submat(rightRect);
            Core.extractChannel(leftborder, leftborder, 1);
            Core.extractChannel(rightborder, rightborder, 1);

            Scalar leftavg = Core.mean(leftborder);
            Scalar rightavg = Core.mean(rightborder);

            leftavgfin = leftavg.val[0];
            rightavgfin = rightavg.val[0];

            if (leftavgfin > rightavgfin){
                telemetry.addData("Side:", "Left");
            }

            if (rightavgfin > leftavgfin){
                telemetry.addData("Side", "Right");
            }

            return outPut;

        }
    }
}

