I have a problem with onPreviewFrame of android Camera. I want to take the picture every frame, blur it and display it. I tried the onPreviewFrame method along with OpenCV, so I put the byte[] in a Mat, blur it and convert the Mat to a Bitmap, but the image that I get converting the mat is always in landscape mode, but I have to display it in portrait mode. I read that all the methods of Android Camera don't change the order of byte[] received from onPreviewFrame(), I tried changing myself the byte or rotate the Mat but it get very slow. There's a way to get the byte[] to the correct orientation, or to get every frame the image always in a portrait mode?
I never used Camera2 api, there's a simple and fast way to get every frame the Image?