Mobile video resolutions

The plugin is optimized for performance, and compatibility to run on low / mid-range devices, also I found that marker detection is more reliable on lower resolutions.

However it’s possible to change the resolution from the source code:

It’s recommended to use 4:3 resolutions only! The plugin will crop the final image to match with your screen aspect ratio!

IOS:

ARToolkitDevice.cpp

NSString *vconf = [NSString stringWithFormat : @”%@ %@ %@ %@ %@”, @”-format=BGRA”, @”-fliph”, @”-flipv”, @”-preset=cif“, @”-position=rear”];

-preset parameter can be:: cif, 480p, 720p, 1080p, low, medium, high

Android:

Change the default values to increase the resolution:

Update from plugin version 1.6

SampleProject\Plugins\ARToolkitPlugin\Source\ARToolkitPlugin\Private\ARToolkitPlugin.cpp

int FrameWidth = 320;
int FrameHeight = 240;

SampleProject\Plugins\ARToolkitPlugin\Source\ARToolkitPlugin\ARToolkitPlugin_APL.xml

surfaceTexture.setDefaultBufferSize(320,240);

later on the same file….

cameraParam.setPreviewSize(320, 240);

Plugin version 1.5 or below:

AndroidJNI.cpp 

//Camera
FrameWidth = 320;
FrameHeight = 240

GameActivity.java

surfaceTexture.setDefaultBufferSize(320,240);

later on the same file….

cameraParam.setPreviewSize(320, 240);