artoolkit5
artoolkit5 copied to clipboard
Camera Issue in ARMovie
Issue by ashutosh3ojha2007
Saturday Apr 15, 2017 at 06:10 GMT
Originally opened as https://github.com/artoolkit/artoolkit5/issues/286
I am able to run ARmovie App but Camera Surface is coming Very Small. I am using OnePlus 3 - Android Version -7.0
I tried Below Code also But not getting full screen surface -
Camera.Parameters parameters = camera.getParameters(); List<Camera.Size> sizes = parameters.getSupportedPreviewSizes(); Camera.Size cs = sizes.get(0); parameters.setPreviewSize(cs.width, cs.height); camera.setParameters(parameters);
My FrameLayout
`<FrameLayout android:id="@+id/mainLayout"
android:layout_width="match_parent"
android:layout_height="match_parent"
android:layout_weight="1">
</FrameLayout>`
How i Can Solve it?
Please check a screen shot also.

In some device i am getting Below camera surface -

Comment by Neuroforge
Saturday Apr 15, 2017 at 19:59 GMT
This appears to be taking the first size from a list.
Camera.Size cs = sizes.get(0);
Which other sizes are available?
Comment by ashutosh3ojha2007
Sunday Apr 16, 2017 at 04:38 GMT
Below sizes are available -
2560x1920 ; 2560x1536 ; 2048x1536 ; 2048x1232 ; 960x720 ; 640x480
This is probably an issue with the Android camera API v2 which isn't implemented yet in ARToolKit. We are aiming to get that in soon. @ashutosh3ojha2007 Which devices do you have for testing and what is the Android version for those?