OpenCVLoader is used to load the OpenCV library.
To properly display the image from the camera, you need to detect the device’s current orientation and apply the necessary rotation to ensure the camera preview appears correctly oriented.
Before you can apply thresholding, you need to convert the color image to grayscale using the Imgproc.cvtColor OpenCV function.