Single channel image (8bits) in android arwAcceptVideoImage

Community support forum for the ARToolKit v5.x for Android SDK.
maurosanjo
Posts: 4
Joined: Thu Aug 10, 2017 6:24 am

Single channel image (8bits) in android arwAcceptVideoImage

Postby maurosanjo » Fri Aug 11, 2017 4:01 am

Hello,

I intend to use artoolkit 5 with a OpenCV Android app, and since I have a single channel pre-processed image I was wondering if it is possible to fed ARToolKit Controller with a single channel image.

Checking videoAndroid.c it seems that the only video formats allowed are RGBA, NV21, 420f. Is it correct? Or is it possible to work with mono images?

When using android Camera2 we normally find only Yuv420888 video format available in preview mode, and a conversion to RGB is quite expensive, I only need Y plane for pattern finding, that's why I'm asking.

Regards

maurosanjo
Posts: 4
Joined: Thu Aug 10, 2017 6:24 am

Re: Single channel image (8bits) in android arwAcceptVideoImage

Postby maurosanjo » Fri Aug 18, 2017 11:40 am

As ARToolkit uses only lumma / intensity channel, at least for square markers black and white, all I had to do was set video format to NV21 and just call acceptImage with a byte array with valid size for NV21 but with values set only for lumma plane (rest filled with zero). This worked fine.


Return to “ARToolKit for Android”

Who is online

Users browsing this forum: No registered users and 2 guests