Start a new topic

Object Recognition not working (SDK 8 + Unity)

Hi everybody,

hopefully I'm in the right section...


I have a little problem to get the object recognition running and it would be great if anyone could help me out with it.


I have followed the instructions for unity: https://www.wikitude.com/external/doc/documentation/latest/unity/objecttrackingnative.html#object-tracking and also the tutorial on youtube: https://www.youtube.com/watch?v=mpflhDwhSwM

Sadly I couldn't get anything to work as expected.


I'm not quite sure if there is a problem with the wto file or a general one.


Currently I'm using SDK Version 8, so I had to upload 30 images to the targets manager and got a wto file which I have placed into unity as in the tutorial. My WikitudeCamera Object is also set and there is the licence key inserted. Also I have created a small cube which should be shown after the recognition. If I try to run the application on my phone there comes a message with trial all over the screen and then everything is freezing. If I run it on my desktop I see the webcam video but nothing happens if the object comes in view...


I have also tried to change the wto file in the sample with mine, but that doesn't change anything.

Would be very cool if someone has a idea what I could try next, or maybe what I have not done right...


Thanks a lot!


1 person has this problem

Ah, that's why! In the glasses it isn't stretched too much.


Well, thank you a lot for your help and patience, Alexandru!

Cheers!

Hi, 


Regarding the focus issue, the device can only render the augmentations at a fixed focus distance, so when the target doesn't match this distance, you can either focus on the target, or the augmentation, but not on both at the same time.


The screenshots seem to look fine. The device stretches the rendered image to cover both eyes, so if you stretch the screenshots to double their original width, they don't appear distorted anymore. Does it look different when looking through the glasses?


Unfortunately, we don't have a calibration file for the bt-350.


Best regards,

Alexandru

P.S. the screenshots have swapped their places


By the way, maybe you have a ready to go calibration file for Moverio bt-350 for developers?

Hi, Alexandru,


I've checked the sample and I've found out that the scene is clear only on a certain distance, probably focal length. But if camera a lil bit closer to or a lil farther from the target, the scene appears doubled. Is this a feature of 3D rendering and there's no workaround?

And yes, the model is slightly flattened (but not that much as in the first screen) and stretched, but not that much as in the second screen, though it's visible.


And also it's probably not taken into account that the cam on Epson is to the right, so scenes in the sample app are rendered with the offset. Especially it's visible with firetruck tracking.

Hi, 


Please try to recalibrate the device, and also check the 3D Model On Target sample to see if Image Tracking is affected by this as well. If the issue persists, please send us some screenshots so that we can have a better understanding of what the problem is.


Thank you,

Alexandru

Pardon me, I haven't noticed that Epson Moverio SDK has already provided 3d object tracking. The sample project for Epson Moverio works, though in 3d mode rendered 3d objects are seem to be squeezed along Y-axis.


Maybe I haven't callibrated a cam carefully enough, maybe issue is in interpupillary distance or something, but in 3d mode objects are highly indistinct, hurt my eyes

The sample app runs without a hitch on Xiaomi Redmi 5 Plus with API level 25... So maybe the issue is in graphics API? Tho, glasses have  OpenGL ES >3.0 as well as Xiaomi phone.. But slightly lower API level.

Hi, Alexandru,


I've tried on Vuzix M300 but the app didn't respond to buttons and then the android launcher crashed. I'm not trying to get an app optimized for smart glasses. It should have run as a regular android app at least... This is another problem, but it would be great to get object reco for Vuzix and Moverio SDKs in the future.

I'll try another phone tomorrow, but my goal are glasses. 

Hi, 


Do you have any other device you can try on? We weren't able to reproduce your issue here.


Thank you,

Alexandru

Hello, Alexandru,

I've successfully compiled and run the WikitudeUnityExample and in the Unity Editor it works like a charm. However on the device I can only see the prompt to scan photos and a black screen when point my cam at a dude with the surf. The same black screen is when  I chose Simple Object Tracking and Instant Tracking.

 That's what logcat shows when Simple Object Tracking is loaded:
08-13 10:06:17.298: I/Unity(3924): URL Resource loaded successfully.
08-13 10:06:17.298: I/Unity(3924):  
08-13 10:06:17.298: I/Unity(3924): (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
08-13 10:06:18.578: I/Unity(3924): Targets loaded successfully.
08-13 10:06:18.578: I/Unity(3924):  
08-13 10:06:18.578: I/Unity(3924): (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
08-13 10:24:19.633: W/Unity(4186): UnityPlayerNativeActivity has been deprecated, please update your AndroidManifest to use UnityPlayerActivity instead
08-13 10:24:19.869: I/Unity(4186): SystemInfo CPU = Intel x86 SSE3, Cores = 4, Memory = 1902mb
08-13 10:24:19.870: I/Unity(4186): ApplicationInfo com.wikitude.unityexample version 8.0.0 build e946dff0-b623-47fc-8a8f-9a56b0ca5835
08-13 10:24:19.870: I/Unity(4186): Built from '2018.1/release' branch, Version '2018.1.9f1 (24bbd83e8b9e)', Build type 'Release', Scripting Backend 'il2cpp'
I get the logs below when I load Instant Tracking - Scene Picking

 

08-13 10:50:02.406: E/Unity(4186): Could not check if tracking can be started because the InstantTracker doesn't exist!
08-13 10:50:02.406: E/Unity(4186):  
08-13 10:50:02.406: E/Unity(4186): (Filename: ./Runtime/Export/Debug.bindings.h Line: 43)
Why doesn't InstantTracker exist? Camera doesn't open, obviously, why is it so?

 

Hi, 


That is expected. The project is saved with version 5.5 for backwards compatibility, but upgrading to a new version and reimporting it is not an issue.

It is also expected that it opens an empty scene, because you never opened any existing scene in that project. Have you tried building it?


Best regards,

Alexandru

Hi, Alexandru,


Unity warns that the project, namely wikitude example, was saved with another version of unity and gives no other option than re-import assets on startup. So when I do that Unity opens up an empty scene. The project tree is default: main camera, light.
So it seems like unity modifies it somehow anyway...

Hi, 


Can you please try the project provided in the download package, without any modifications with Unity 2018.1? Hopefully that will tell us if the issue is with the project setup or with the device.

If it still doesn't work, can you please post the console log from the app when the SDK is starting up?

Does the issue happen with image or instant tracking as well, or only with object tracking?


Thank you,

Alexandru

Hello, Alexandru,


I've switched to unity 2018.1.9f1 but got the same result, unfortunately. What else can it be?

Here are my player settings:

image


Hi, 


Unity 2018.2 is not supported at the moment. This will be fixed in the next update.

Until then, please use 2018.1.


Thank you,

Alexandru

Login or Signup to post a comment