Log in or register to post comments

TextTracker always null

July 21, 2017 - 11:19am #1

I'm trying to set up the region of interest using the SetRegionOfInterest from TextTracker class and having a problem with the TextTracker initialization. 

TextTracker textTracker = (TextTracker)TrackerManager.Instance.GetTracker<TextTracker>(); //return null

Rect regionOfInterestTracking =  new Rect(Screen.width * 0.1f, Screen.height * 0.1f,

	                                  Screen.width * 0.8f, Screen.height * 0.4f);

Rect regionOfInterestDetection = new Rect(Screen.width * 0.2f, Screen.height * 0.2f,

	                                  Screen.width * 0.6f, Screen.height * 0.2f);

textTracker.SetRegionOfInterest(regionOfInterestDetection, regionOfInterestTracking);

 

But it always returns a null reference error, what would be the possible approach for solving this?

 

TextTracker always null

July 21, 2017 - 5:42pm #5

That really helps, thank you :)

TextTracker always null

July 21, 2017 - 1:57pm #4

The implementation of TextTracker isn't accessible publicly, but TextEventHandler is a class present in the samples. It isn't part of the Vuforia/Scripts folder, but instead under SampleResources/TextReco/Scripts. You can also find it in the TextReco sample scene attached to the object called "TextRecognition." It shows an example of how to handle Text Reco events.

Thanks,

-Vuforia Support

TextTracker always null

July 21, 2017 - 12:16pm #3

It seems that I don't have the TextEventHandler.cs & TextTracker.cs inside the Scripts folder (path: myProgram/Assets/Vulforia/Scripts/)

Maybe there is an installation error? But it can detect words from the whole screen as expected.

I've downloaded the core sample from the link: https://developer.vuforia.com/downloads/samples

[vuforia-samples-core-unity-6-2-10.zip (123.85 MB)].

If that's the problem could you please provide me a link to download the text reco sample? 

Thank you :)

TextTracker always null

July 21, 2017 - 11:57am #2

Hello VY09,

I'm not seeing this issue when I test it locally. Could you check out the sample project's Text Reco scene and see if there is anything in the TextEventHandler.cs script that you might not be doing?

Thanks,

-Vuforia Support

Log in or register to post comments