Skip to content Skip to sidebar Skip to footer

Opencv Android Camera Not Fullscreen

I am making an OpenCV App for Android that does heavy image processing. To increase my frame rate, I limited my frame size to 640 x 480 like so: private BaseLoaderCallback mLoader

Solution 1:

Step1: First you have to put these inside AndroidManifest.xml

<supports-screensandroid:resizeable="true"android:smallScreens="true"android:normalScreens="true"android:largeScreens="true"android:anyDensity="true" /><uses-permissionandroid:name="android.permission.CAMERA"/><uses-featureandroid:name="android.hardware.camera"android:required="false"/><uses-featureandroid:name="android.hardware.camera.autofocus"android:required="false"/><uses-featureandroid:name="android.hardware.camera.front"android:required="false"/><uses-featureandroid:name="android.hardware.camera.front.autofocus"android:required="false"/>

Step 2: Change this line in AndroidManifest.xml

android:theme="@style/AppTheme">

           toandroid:theme="@android:style/Theme.NoTitleBar.Fullscreen">

Step 3: Then change

<activityandroid:name=".MainActivity">

  to

<activityandroid:name=".MainActivity"android:screenOrientation="landscape"android:configChanges="keyboardHidden|orientation">

Step 4: After completing the above put this line to onCreate() method on java class

getWindow().addFlags(WindowManager.LayoutParams.FLAG_KEEP_SCREEN_ON);

if you successfully done these i hope it will working fine.

Post a Comment for "Opencv Android Camera Not Fullscreen"