Rotate camera preview to Portrait Android OpenCV Camera

前端 未结 17 1538
日久生厌
日久生厌 2020-12-07 15:45

I am trying to use OpenCV 2.4.3.2 to create a camera app and do some opencv processing. I would like it to be able to have multiple UI orientations, not just Landscape.

17条回答
  •  伪装坚强ぢ
    2020-12-07 16:13

    If you're using the openCV 2.4.9 , try : 1) to copy the content of opencv tutorial-mixed processing in your code; 2) correct the mismatching errors (activity name and probably layout reference); 3)Modify your manifest by adding android:screenOrientation ="landscape" 4) correct minors errors and run !!!! bbaamm (it should work properly now)

    Note: with this method the status bar appaear on the right side when the phone is in portrait position . Since we are developing camera project, I advise you to remove the status bar from the preview.

    Hope it helps !!!

提交回复
热议问题