Start a new topic
Solved

Combine Custom Camera with Basic Object Tracking

Hello Wikitude Support, 

I want to use the camera on the other device to track an object and show augmented reality elements around it, so I tried to combine Custom Camera with the js of Basic Object Tracking.
However, the background turned black and only showed the augmented reality elements when it recognized the object.

image

How can I fix it?


Thanks for any help.

Natalie


Hi,


Does it work when you run sample app with the without the Input Plugins and the camera of the device? If not please recheck if everthing is setup correctly.


If the issue persist, please let us know if you have any error messages, logoutput, if you debugged the app / experience, which device this is happening with and which SDK version you're using.


Thx and greetings

Nicola

Hi,

It works when I run the sample app. Both Custom Camera and Basic Object Tracking work normally when using them separately, but if I replace C's js file with B's, it turns black like the picture.


The SDK version is 8.0 and here are some messages when running the app:

19403-19403/com.wikitude.sdksamples E/libc: Access denied finding property "camera.hal1.packagelist"


19403-19403/com.wikitude.sdksamples E/libc: Access denied finding property "persist.camera.cfa.packagelist"

 

19403-20276/com.wikitude.sdksamples

V/CustomCameraPlugin: OpenGL error 1281 occurred at line 674 inside function GLuint YUVFrameInputPlugin::compileShader(const std::string &, const GLenum)


19403-20276/com.wikitude.sdksamples

V/CustomCameraPlugin: Surface not initialized. Skipping render() function.


19403-19403/com.wikitude.sdksamples E/libc: Access denied finding property "persist.camera.cfa.packagelist"


19403-20276/com.wikitude.sdksamples E/BpSurfaceComposerClient: Failed to transact (-1)


Thanks for helping.


Natalie

Hi Natalie,

I can reproduce the problem locally but don't have a fix for you immediately.

If you don't need 3d model rendering, then you won't run into the rendering problems but unfortunately you also won't get the correct number of currently tracked object targets from the plugin API.


I created an internal bug report now and we try to add it to our next release.


Best regards,
Andreas Schacherbauer

Hello Natalie,



we've been able to identify and solve the black frame rendering issue. It was a tiny issue of the sample itself that surfaced for some 3D models. Specifically, 3D models that enabled back face culling as part of their render state.


Since this is an issue of the sample app, you can actually fix it yourself very quickly by adding the following line of code to the render function. 

Any place before the actual render calls should be fine.


WT_GL_ASSERT(glDisable(GL_CULL_FACE));


Needless to say that this fix will be included with the next release of the SDK.



- Daniel


Login or Signup to post a comment