Rotate camera preview to Portrait Android OpenCV Camera
I had the same problem trying to implement OpenCV. I was able to fix it by making the following changes to the deliverAndDrawFrame method. Rotate the canvas object Canvas canvas = getHolder().lockCanvas(); // Rotate canvas to 90 degrees canvas.rotate(90f, canvas.getWidth()/2, canvas.getHeight()/2); Resize the bitmap to fit entire size of canvas before drawing // Resize Bitmap … Read more