Opencv uses horizontal screen detection and display by default:
Solution, summary: 2 methods https://blog.csdn.net/u010112268/article/details/80420454
Method 1: The simplest, modify the onCameraFrame() function in FdActivity.java.
This method will bring a new problem, that is, the size of the rotated image becomes smaller and cannot be displayed on the full screen. (to be solved...)
Method 2: Modify the opencv library source code, that is, the deliverAndDrawFrame() function in CameraBridgeViewBase.cpp
A modification method https://blog.csdn.net/u010112268/article/details/80420454
Another modification method https://blog.csdn.net/yd_yandong/article/details/52698696?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task -blog-BlogCommendFromMachineLearnPai2-2.nonecase
There is also a modification method https://blog.csdn.net/daizhe/article/details/78253068
Finally, after using the method of this article to modify, the camera display rotation problem is solved, and the problem that the vertical direction cannot be detected is solved!
https://www.cnblogs.com/qq2523984508/p/10512396.html
=====================================================================================
Core.rotate() rotation
Core.flip() flip
reference:
https://www.cnblogs.com/qq2523984508/p/10512396.html
https://blog.csdn.net/u010112268/article/details/80420454
https://blog.csdn.net/xyx2999/article/details/79424043
https://www.imooc.com/article/255937
https://blog.csdn.net/qq_35952946/article/details/79036909
https://blog.csdn.net/tryflys/article/details/78926133
https://blog.csdn.net/weixin_43093006/article/details/98370872https://blog.csdn.net/yd_yandong/article/details/52698696?utm_medium=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.nonecase&depth_1-utm_source=distribute.pc_relevant.none-task-blog-BlogCommendFromMachineLearnPai2-2.nonecase
https://blog.csdn.net/daizhe/article/details/78253068
https://blog.csdn.net/wunghao8/article/details/38868281