<h5 dir="auto">System information (version)</h5>
<ul dir="auto">
<li>OpenCV =&gt; 4.1.0</li>
<li>Operating System / Platform =&gt; Windows 64 Bit</li>
<li>Compiler =&gt; Visual Studio 2015</li>
<li>Android Studio: 3.4.1</li>
<li>Android Device: Samsung A3 2016</li>
</ul>
<h5 dir="auto">Detailed description</h5>
<p dir="auto">I have created a project from sample tutorial OpenCV ( Camera preview ) and I set the front camera using the method setCameraIndex().<br>
But I get a wrong orientation when the front camera is opened.<br>
How can I solve this problem?</p>
<div class="highlight highlight-source-java notranslate position-relative overflow-auto" dir="auto" data-snippet-clipboard-copy-content="    package com.example.opencvtest;

    import org.opencv.android.BaseLoaderCallback;
    import org.opencv.android.CameraBridgeViewBase.CvCameraViewFrame;
    import org.opencv.android.LoaderCallbackInterface;
    import org.opencv.android.OpenCVLoader;
    import org.opencv.core.Mat;
    import org.opencv.android.CameraBridgeViewBase;
    import org.opencv.android.CameraBridgeViewBase.CvCameraViewListener2;

    import android.app.Activity;
    import android.content.pm.ActivityInfo;
    import android.hardware.Camera;
    import android.os.Bundle;
    import android.util.Log;
    import android.view.Menu;
    import android.view.MenuItem;
    import android.view.SurfaceView;
    import android.view.WindowManager;
    import android.widget.Toast;

    import java.lang.reflect.Method;

   public class MainActivity extends Activity implements CvCameraViewListener2 {
    private static final String TAG = &quot;OCVSample::Activity&quot;;

    private CameraBridgeViewBase mOpenCvCameraView;
    private boolean              mIsJavaCamera = true;
    private MenuItem             mItemSwitchCamera = null;

    private BaseLoaderCallback mLoaderCallback = new BaseLoaderCallback(this) {
        @Override
        public void onManagerConnected(int status) {
            switch (status) {
                case LoaderCallbackInterface.SUCCESS:
                {
                    Log.i(TAG, &quot;OpenCV loaded successfully&quot;);
                    mOpenCvCameraView.setCameraIndex(1);
                    mOpenCvCameraView.enableView();
                } break;
                default:
                {
                    super.onManagerConnected(status);
                } break;
            }
        }
    };

    public MainActivity() {
        Log.i(TAG, &quot;Instantiated new &quot; + this.getClass());
    }

    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        Log.i(TAG, &quot;called onCreate&quot;);
        super.onCreate(savedInstanceState);
        setRequestedOrientation(ActivityInfo.SCREEN_ORIENTATION_PORTRAIT);

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

        setContentView(R.layout.activity_main);

        mOpenCvCameraView = (CameraBridgeViewBase) findViewById(R.id.tutorial1_activity_java_surface_view);

        setDisplayOrientation();

        mOpenCvCameraView.setVisibility(SurfaceView.VISIBLE);

        mOpenCvCameraView.setCvCameraViewListener(this);
    }

    @Override
    public void onPause()
    {
        super.onPause();
        if (mOpenCvCameraView != null)
            mOpenCvCameraView.disableView();
    }

    @Override
    public void onResume()
    {
        super.onResume();
        if (!OpenCVLoader.initDebug()) {
            Log.d(TAG, &quot;Internal OpenCV library not found. Using OpenCV Manager for initialization&quot;);
            OpenCVLoader.initAsync(OpenCVLoader.OPENCV_VERSION_3_0_0, this, mLoaderCallback);
        } else {
            Log.d(TAG, &quot;OpenCV library found inside package. Using it!&quot;);
            mLoaderCallback.onManagerConnected(LoaderCallbackInterface.SUCCESS);
        }
    }

    public void onDestroy() {
        super.onDestroy();
        if (mOpenCvCameraView != null)
            mOpenCvCameraView.disableView();
    }

    public void onCameraViewStarted(int width, int height) {
    }

    public void onCameraViewStopped() {
    }

    public Mat onCameraFrame(CvCameraViewFrame inputFrame) {
        return inputFrame.rgba();
    }
    protected void setDisplayOrientation(Camera camera, int angle){
        Method downPolymorphic;
        try
        {
            downPolymorphic = camera.getClass().getMethod(&quot;setDisplayOrientation&quot;, new Class[] { int.class });
            if (downPolymorphic != null)
                downPolymorphic.invoke(camera, new Object[] { angle });
        }
        catch (Exception e1)
        {
            e1.printStackTrace();
        }
    }
}
"><pre class="notranslate">    <span class="pl-k">package</span> <span class="pl-s1">com</span>.<span class="pl-s1">example</span>.<span class="pl-s1">opencvtest</span>;

    <span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">opencv</span>.<span class="pl-s1">android</span>.<span class="pl-s1">BaseLoaderCallback</span>;
    <span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">opencv</span>.<span class="pl-s1">android</span>.<span class="pl-s1">CameraBridgeViewBase</span>.<span class="pl-s1">CvCameraViewFrame</span>;
    <span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">opencv</span>.<span class="pl-s1">android</span>.<span class="pl-s1">LoaderCallbackInterface</span>;
    <span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">opencv</span>.<span class="pl-s1">android</span>.<span class="pl-s1">OpenCVLoader</span>;
    <span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">opencv</span>.<span class="pl-s1">core</span>.<span class="pl-s1">Mat</span>;
    <span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">opencv</span>.<span class="pl-s1">android</span>.<span class="pl-s1">CameraBridgeViewBase</span>;
    <span class="pl-k">import</span> <span class="pl-s1">org</span>.<span class="pl-s1">opencv</span>.<span class="pl-s1">android</span>.<span class="pl-s1">CameraBridgeViewBase</span>.<span class="pl-s1">CvCameraViewListener2</span>;

    <span class="pl-k">import</span> <span class="pl-s1">android</span>.<span class="pl-s1">app</span>.<span class="pl-s1">Activity</span>;
    <span class="pl-k">import</span> <span class="pl-s1">android</span>.<span class="pl-s1">content</span>.<span class="pl-s1">pm</span>.<span class="pl-s1">ActivityInfo</span>;
    <span class="pl-k">import</span> <span class="pl-s1">android</span>.<span class="pl-s1">hardware</span>.<span class="pl-s1">Camera</span>;
    <span class="pl-k">import</span> <span class="pl-s1">android</span>.<span class="pl-s1">os</span>.<span class="pl-s1">Bundle</span>;
    <span class="pl-k">import</span> <span class="pl-s1">android</span>.<span class="pl-s1">util</span>.<span class="pl-s1">Log</span>;
    <span class="pl-k">import</span> <span class="pl-s1">android</span>.<span class="pl-s1">view</span>.<span class="pl-s1">Menu</span>;
    <span class="pl-k">import</span> <span class="pl-s1">android</span>.<span class="pl-s1">view</span>.<span class="pl-s1">MenuItem</span>;
    <span class="pl-k">import</span> <span class="pl-s1">android</span>.<span class="pl-s1">view</span>.<span class="pl-s1">SurfaceView</span>;
    <span class="pl-k">import</span> <span class="pl-s1">android</span>.<span class="pl-s1">view</span>.<span class="pl-s1">WindowManager</span>;
    <span class="pl-k">import</span> <span class="pl-s1">android</span>.<span class="pl-s1">widget</span>.<span class="pl-s1">Toast</span>;

    <span class="pl-k">import</span> <span class="pl-s1">java</span>.<span class="pl-s1">lang</span>.<span class="pl-s1">reflect</span>.<span class="pl-s1">Method</span>;

   <span class="pl-k">public</span> <span class="pl-k">class</span> <span class="pl-smi">MainActivity</span> <span class="pl-k">extends</span> <span class="pl-smi">Activity</span> <span class="pl-k">implements</span> <span class="pl-smi">CvCameraViewListener2</span> {
    <span class="pl-k">private</span> <span class="pl-k">static</span> <span class="pl-k">final</span> <span class="pl-smi">String</span> <span class="pl-c1">TAG</span> = <span class="pl-s">"OCVSample::Activity"</span>;

    <span class="pl-k">private</span> <span class="pl-smi">CameraBridgeViewBase</span> <span class="pl-s1">mOpenCvCameraView</span>;
    <span class="pl-k">private</span> <span class="pl-smi">boolean</span>              <span class="pl-s1">mIsJavaCamera</span> = <span class="pl-c1">true</span>;
    <span class="pl-k">private</span> <span class="pl-smi">MenuItem</span>             <span class="pl-s1">mItemSwitchCamera</span> = <span class="pl-c1">null</span>;

    <span class="pl-k">private</span> <span class="pl-smi">BaseLoaderCallback</span> <span class="pl-s1">mLoaderCallback</span> = <span class="pl-k">new</span> <span class="pl-smi">BaseLoaderCallback</span>(<span class="pl-smi">this</span>) {
        <span class="pl-c1">@</span><span class="pl-c1">Override</span>
        <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">onManagerConnected</span>(<span class="pl-smi">int</span> <span class="pl-s1">status</span>) {
            <span class="pl-k">switch</span> (<span class="pl-s1">status</span>) {
                <span class="pl-k">case</span> <span class="pl-smi">LoaderCallbackInterface</span>.<span class="pl-c1">SUCCESS</span>:
                {
                    <span class="pl-smi">Log</span>.<span class="pl-en">i</span>(<span class="pl-c1">TAG</span>, <span class="pl-s">"OpenCV loaded successfully"</span>);
                    <span class="pl-s1">mOpenCvCameraView</span>.<span class="pl-en">setCameraIndex</span>(<span class="pl-c1">1</span>);
                    <span class="pl-s1">mOpenCvCameraView</span>.<span class="pl-en">enableView</span>();
                } <span class="pl-k">break</span>;
                <span class="pl-k">default</span>:
                {
                    <span class="pl-en">super</span>.<span class="pl-en">onManagerConnected</span>(<span class="pl-s1">status</span>);
                } <span class="pl-k">break</span>;
            }
        }
    };

    <span class="pl-k">public</span> <span class="pl-smi">MainActivity</span>() {
        <span class="pl-smi">Log</span>.<span class="pl-en">i</span>(<span class="pl-c1">TAG</span>, <span class="pl-s">"Instantiated new "</span> + <span class="pl-smi">this</span>.<span class="pl-en">getClass</span>());
    }

    <span class="pl-c">/** Called when the activity is first created. */</span>
    <span class="pl-c1">@</span><span class="pl-c1">Override</span>
    <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">onCreate</span>(<span class="pl-smi">Bundle</span> <span class="pl-s1">savedInstanceState</span>) {
        <span class="pl-smi">Log</span>.<span class="pl-en">i</span>(<span class="pl-c1">TAG</span>, <span class="pl-s">"called onCreate"</span>);
        <span class="pl-en">super</span>.<span class="pl-en">onCreate</span>(<span class="pl-s1">savedInstanceState</span>);
        <span class="pl-en">setRequestedOrientation</span>(<span class="pl-smi">ActivityInfo</span>.<span class="pl-c1">SCREEN_ORIENTATION_PORTRAIT</span>);

        <span class="pl-en">getWindow</span>().<span class="pl-en">addFlags</span>(<span class="pl-smi">WindowManager</span>.<span class="pl-s1">LayoutParams</span>.<span class="pl-c1">FLAG_KEEP_SCREEN_ON</span>);

        <span class="pl-en">setContentView</span>(<span class="pl-smi">R</span>.<span class="pl-s1">layout</span>.<span class="pl-s1">activity_main</span>);

        <span class="pl-s1">mOpenCvCameraView</span> = (<span class="pl-smi">CameraBridgeViewBase</span>) <span class="pl-en">findViewById</span>(<span class="pl-smi">R</span>.<span class="pl-s1">id</span>.<span class="pl-s1">tutorial1_activity_java_surface_view</span>);

        <span class="pl-en">setDisplayOrientation</span>();

        <span class="pl-s1">mOpenCvCameraView</span>.<span class="pl-en">setVisibility</span>(<span class="pl-smi">SurfaceView</span>.<span class="pl-c1">VISIBLE</span>);

        <span class="pl-s1">mOpenCvCameraView</span>.<span class="pl-en">setCvCameraViewListener</span>(<span class="pl-smi">this</span>);
    }

    <span class="pl-c1">@</span><span class="pl-c1">Override</span>
    <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">onPause</span>()
    {
        <span class="pl-en">super</span>.<span class="pl-en">onPause</span>();
        <span class="pl-k">if</span> (<span class="pl-s1">mOpenCvCameraView</span> != <span class="pl-c1">null</span>)
            <span class="pl-s1">mOpenCvCameraView</span>.<span class="pl-en">disableView</span>();
    }

    <span class="pl-c1">@</span><span class="pl-c1">Override</span>
    <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">onResume</span>()
    {
        <span class="pl-en">super</span>.<span class="pl-en">onResume</span>();
        <span class="pl-k">if</span> (!<span class="pl-smi">OpenCVLoader</span>.<span class="pl-en">initDebug</span>()) {
            <span class="pl-smi">Log</span>.<span class="pl-en">d</span>(<span class="pl-c1">TAG</span>, <span class="pl-s">"Internal OpenCV library not found. Using OpenCV Manager for initialization"</span>);
            <span class="pl-smi">OpenCVLoader</span>.<span class="pl-en">initAsync</span>(<span class="pl-smi">OpenCVLoader</span>.<span class="pl-c1">OPENCV_VERSION_3_0_0</span>, <span class="pl-smi">this</span>, <span class="pl-s1">mLoaderCallback</span>);
        } <span class="pl-k">else</span> {
            <span class="pl-smi">Log</span>.<span class="pl-en">d</span>(<span class="pl-c1">TAG</span>, <span class="pl-s">"OpenCV library found inside package. Using it!"</span>);
            <span class="pl-s1">mLoaderCallback</span>.<span class="pl-en">onManagerConnected</span>(<span class="pl-smi">LoaderCallbackInterface</span>.<span class="pl-c1">SUCCESS</span>);
        }
    }

    <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">onDestroy</span>() {
        <span class="pl-en">super</span>.<span class="pl-en">onDestroy</span>();
        <span class="pl-k">if</span> (<span class="pl-s1">mOpenCvCameraView</span> != <span class="pl-c1">null</span>)
            <span class="pl-s1">mOpenCvCameraView</span>.<span class="pl-en">disableView</span>();
    }

    <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">onCameraViewStarted</span>(<span class="pl-smi">int</span> <span class="pl-s1">width</span>, <span class="pl-smi">int</span> <span class="pl-s1">height</span>) {
    }

    <span class="pl-k">public</span> <span class="pl-smi">void</span> <span class="pl-en">onCameraViewStopped</span>() {
    }

    <span class="pl-k">public</span> <span class="pl-smi">Mat</span> <span class="pl-en">onCameraFrame</span>(<span class="pl-smi">CvCameraViewFrame</span> <span class="pl-s1">inputFrame</span>) {
        <span class="pl-k">return</span> <span class="pl-s1">inputFrame</span>.<span class="pl-en">rgba</span>();
    }
    <span class="pl-k">protected</span> <span class="pl-smi">void</span> <span class="pl-en">setDisplayOrientation</span>(<span class="pl-smi">Camera</span> <span class="pl-s1">camera</span>, <span class="pl-smi">int</span> <span class="pl-s1">angle</span>){
        <span class="pl-smi">Method</span> <span class="pl-s1">downPolymorphic</span>;
        <span class="pl-k">try</span>
        {
            <span class="pl-s1">downPolymorphic</span> = <span class="pl-s1">camera</span>.<span class="pl-en">getClass</span>().<span class="pl-en">getMethod</span>(<span class="pl-s">"setDisplayOrientation"</span>, <span class="pl-k">new</span> <span class="pl-smi">Class</span>[] { <span class="pl-smi">int</span>.<span class="pl-k">class</span> });
            <span class="pl-k">if</span> (<span class="pl-s1">downPolymorphic</span> != <span class="pl-c1">null</span>)
                <span class="pl-s1">downPolymorphic</span>.<span class="pl-en">invoke</span>(<span class="pl-s1">camera</span>, <span class="pl-k">new</span> <span class="pl-smi">Object</span>[] { <span class="pl-s1">angle</span> });
        }
        <span class="pl-k">catch</span> (<span class="pl-smi">Exception</span> <span class="pl-s1">e1</span>)
        {
            <span class="pl-s1">e1</span>.<span class="pl-en">printStackTrace</span>();
        }
    }
}</pre></div>
<p dir="auto">Transferred from <a href="http://code.opencv.org/issues/3565" rel="nofollow">http://code.opencv.org/issues/3565</a></p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="|| Sergey Abdula on 2014-02-20 04:06
|| Priority: Normal
|| Affected: 2.4.0 - 2.4.7
|| Category: android
|| Tracker: Bug
|| Difficulty: Easy
|| PR: 
|| Platform: ARM / Android"><pre class="notranslate"><code class="notranslate">|| Sergey Abdula on 2014-02-20 04:06
|| Priority: Normal
|| Affected: 2.4.0 - 2.4.7
|| Category: android
|| Tracker: Bug
|| Difficulty: Easy
|| PR: 
|| Platform: ARM / Android
</code></pre></div>
<h2 dir="auto">Portrait orientation on Android</h2>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Hi,
If to change  android:screenOrientation from landscape to portrait mode in &quot;OpenCVTutorial 1 - Camera Preview&quot;, an image is rotated to 270 degree clockwise.

It's pretty basic feature for mobile applications (easy change orientation) and if I understand correctly, it was discussed last year (see http://stackoverflow.com/questions/14816166/rotate-camera-preview-to-portrait-android-opencv-camera). However, I could not find any opened or closed issue related to this problem.

There is kind of way to fix it (see http://littlecheesecake.me/blog/13804736/opencv-android-orientation) but it's required to rewrite the basic class (which is not good idea) and it does not work properly anyway.

Thanks in advance.

Sergey"><pre class="notranslate"><code class="notranslate">Hi,
If to change  android:screenOrientation from landscape to portrait mode in "OpenCVTutorial 1 - Camera Preview", an image is rotated to 270 degree clockwise.

It's pretty basic feature for mobile applications (easy change orientation) and if I understand correctly, it was discussed last year (see http://stackoverflow.com/questions/14816166/rotate-camera-preview-to-portrait-android-opencv-camera). However, I could not find any opened or closed issue related to this problem.

There is kind of way to fix it (see http://littlecheesecake.me/blog/13804736/opencv-android-orientation) but it's required to rewrite the basic class (which is not good idea) and it does not work properly anyway.

Thanks in advance.

Sergey
</code></pre></div>
<h2 dir="auto">History</h2>
<h5 dir="auto">Alexander Karsakov on 2014-02-20 06:53</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="-   Status changed from New to Open"><pre class="notranslate"><code class="notranslate">-   Status changed from New to Open
</code></pre></div>
<h5 dir="auto">Alexander Smorkalov on 2014-02-25 07:24</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="-   Target version set to 2.4.9
-   Difficulty set to Easy"><pre class="notranslate"><code class="notranslate">-   Target version set to 2.4.9
-   Difficulty set to Easy
</code></pre></div>
<h5 dir="auto">Sergey Abdula on 2014-03-14 02:43</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Hi Alex,

It will be nice to have a taken picture in correct orientation in portrait mode as well."><pre class="notranslate"><code class="notranslate">Hi Alex,

It will be nice to have a taken picture in correct orientation in portrait mode as well.
</code></pre></div>
<h5 dir="auto">Alexander Smorkalov on 2014-04-01 23:12</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="We cannot change API behavior in 2.4 branch. I reasign the task on 3.0 release (master branch). It will not be compatible with 2.4.x, so we can change API behavour and fix such issues.
-   Target version changed from 2.4.9 to 3.0"><pre class="notranslate"><code class="notranslate">We cannot change API behavior in 2.4 branch. I reasign the task on 3.0 release (master branch). It will not be compatible with 2.4.x, so we can change API behavour and fix such issues.
-   Target version changed from 2.4.9 to 3.0
</code></pre></div>
<h5 dir="auto">Stephen G on 2015-05-06 02:09</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Found the error in calculateCameraFrameSize in CameraBridgeViewBase.

A. mMaxWidth/Height are never set and should be (easily done by overriding onSizeChanged in the CameraView and calling setMaxFrameSize)

B. the supportedSizes list only list the max hieght/widths in one dimensions. the comparisons done in the weird double if statements need to be completed for width &lt;= maxAllowedWidth ... *&amp;&amp; height &lt;= maxAllowedWidth ...*. Then, the mScale calculate also needs to take this change into account with something like this: 
&lt;pre&gt;
mScale = Math.max(
    Math.min(((float) height) / mFrameHeight, ((float) width) / mFrameWidth),
    Math.min(((float) width) / mFrameHeight, ((float) height) / mFrameWidth)
);
&lt;/pre&gt;

This solution doesn't fill the whole screen, but it does keep the proper ratio.

Does it work? could it be updated for 3 since it's still in an RC state?"><pre class="notranslate"><code class="notranslate">Found the error in calculateCameraFrameSize in CameraBridgeViewBase.

A. mMaxWidth/Height are never set and should be (easily done by overriding onSizeChanged in the CameraView and calling setMaxFrameSize)

B. the supportedSizes list only list the max hieght/widths in one dimensions. the comparisons done in the weird double if statements need to be completed for width &lt;= maxAllowedWidth ... *&amp;&amp; height &lt;= maxAllowedWidth ...*. Then, the mScale calculate also needs to take this change into account with something like this: 
&lt;pre&gt;
mScale = Math.max(
    Math.min(((float) height) / mFrameHeight, ((float) width) / mFrameWidth),
    Math.min(((float) width) / mFrameHeight, ((float) height) / mFrameWidth)
);
&lt;/pre&gt;

This solution doesn't fill the whole screen, but it does keep the proper ratio.

Does it work? could it be updated for 3 since it's still in an RC state?
</code></pre></div>
<h5 dir="auto">Andrea Tomassetti on 2015-05-19 11:37</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Alexander Smorkalov wrote:
&gt; We cannot change API behavior in 2.4 branch. I reasign the task on 3.0 release (master branch). It will not be compatible with 2.4.x, so we can change API behavour and fix such issues.

Hi, I've just downloaded OpenCV 3.0RC1 for Android but there is the same issue. I'm wrong? It was fixed?

Thanks in advance"><pre class="notranslate"><code class="notranslate">Alexander Smorkalov wrote:
&gt; We cannot change API behavior in 2.4 branch. I reasign the task on 3.0 release (master branch). It will not be compatible with 2.4.x, so we can change API behavour and fix such issues.

Hi, I've just downloaded OpenCV 3.0RC1 for Android but there is the same issue. I'm wrong? It was fixed?

Thanks in advance
</code></pre></div>
<h5 dir="auto">Fabian Hoyos on 2015-07-03 16:25</h5>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="Hi, would I like to know if the bug Portrait orientation on Android is fixed in the version 3.0 of opencv Android SDK. I have the same problem when I use opencv Android sdk in mode portrait in the app to open the camera and face detection. 

Thanks for information. I hope soon know the solution, please."><pre class="notranslate"><code class="notranslate">Hi, would I like to know if the bug Portrait orientation on Android is fixed in the version 3.0 of opencv Android SDK. I have the same problem when I use opencv Android sdk in mode portrait in the app to open the camera and face detection. 

Thanks for information. I hope soon know the solution, please.
</code></pre></div>