Log in or register to post comments

How to change from UDT to CR?

November 22, 2013 - 2:54am #1

Hi

I'm developing an iOS application that uses both Cloud Recognition and User Defined targets. Theese are supposed to work in two different views with two different viewcontrollers but I'm having trouble getting them to work together and I've managed to find a strange bug (I think).

When changing views I change from a CREAGLView to an UDTEAGLView so I think my problem has nothing to do with rendering. I beleive my problem lies in any of the QCARUtils files I'm using.

I start my app in CR-mode and everything works fine. When I change to UDT view everything works as supposed there aswell, I can create targets etc... But the problems start when I change back from UDT to CR. After changing back to CR-view the app seems to be in constant "search-mode" and even though I show targets that it should find and that it could find before I switched to UDT-view it will keep scanning. I'm looking at the log and see that I'm receving new transactions, so I'm guessing that somewhere I have disabled target-finders ability to create new targets or something like that.

I've tried deactivating the user-defined-dataset but to no avail... I've also tried to reinitialise the visualSearch (- (void)initVisualSearch) but also to no avail. However if I DON'T reinitalise this happnes to my "Scanpoints" when i go back to the CR-view: (bild.png)

I'm using iOS and I'm trying to use push-segues to go between viewcontrollers.

I've also tried cehcing out this article: https://developer.vuforia.com/resources/dev-guide/simultaneous-use-cloud-reco-udt-and-device-databases but It dosen't help me where I'm stuck right now. Thanks in advance guys!

Also a bonus question: Is it ok to have multiple databases say two and have 1000 recos a month on each of them and manually changing between the two (I'm kind of in that position right now), without needing to pay accorind to: https://developer.vuforia.com/cloud-recognition-service

Thanks

//Marcus

AttachmentSize
Image icon bild.png344.11 KB

How to change from UDT to CR?

December 18, 2013 - 6:43am #10

Sorry, but Vuforia does not officially support changing of the scan lines and feature points in this way.

At present the restriction is purely to be able to change colours.

 

Thanks

N

How to change from UDT to CR?

December 18, 2013 - 2:46am #9

Hello,

   How can we customize scan line & feature points in cloud reco app as shown in image named "bild.png" uploaded by Marcus ? 

 

How to change from UDT to CR?

November 26, 2013 - 4:49am #8

Does it work the first time ok?

.. but not the second time or afterwards?

N

How to change from UDT to CR?

November 26, 2013 - 4:44am #7

Nope =)

How to change from UDT to CR?

November 26, 2013 - 4:36am #6

Great to hear :)

Managed to find out why the Visual search points bugged for me and what can be done about it. 

Sorry, do you still have this problem?

 

N

 

How to change from UDT to CR?

November 25, 2013 - 4:50am #5

Hi Again NalinS

So I finaly managed to solve this problem.

The problem was that the update method wasn't called when I got back to my CR view:

void VisualSearch_UpdateCallback::QCAR_onUpdate(QCAR::State& state)

This is because when I changed view to UDT-view I initialized a new EAGLView wich registered for a different callback/update method:

 

void ImageTargetsBuilder_UpdateCallback::QCAR_onUpdate(QCAR::State& state)

So I managed to solve the problem by just registering the Visual-search as the callback function once again with: QCAR::registerCallback(&qcarUpdate);

Thanks for all the help you are really great!

However I still get my nice little .png smiley as "visual search points" (as shown in the attached picture) if I don't reinitialize visual search after going back... but I guess thats not the biggest problem.

Anyway Thanks alot!

// Marcus

Edit:

Managed to find out why the Visual search points bugged for me and what can be done about it. 

How to change from UDT to CR?

November 22, 2013 - 7:54am #4

I'm just wondering how to get to the root of the problem here.

One thing you could do is to step through the debugger for a successful target id for CR and compare it agains an unsuccessful id.

The other thing you could perhaps do as a test is to have a single EAGLView that handles both UDT and CR too see whether the problem recurs in this scenario.

 

N

How to change from UDT to CR?

November 22, 2013 - 5:59am #3

Hi NalinS

thanks a lot for your reply!

I've tried starting and stopping the search but this dosen't help. (Not in that method though but it seems equal to the EAGLView code entercontentmode() and enterscanningmode() that I use instead. ) This only seems to turn on and of the "search" for new targets, my problem isn't that it isn't searching, as I can see in my log that I get transactions, it is that either I never receive a "SUCESS" answer i.e. I never get this:

2013-11-22 14:45:34.544 LiveARt[2623:5307] INFO/AR(2623) 2013-11-22 14:45:34: ImageTracker: Successfully created dataset

2013-11-22 14:45:34.848 LiveARt[2623:5307] INFO/AR(2623) 2013-11-22 14:45:34: Successfully created ImageTarget.

after one of theese:

2013-11-22 14:45:33.824 LiveARt[2623:ae8f] INFO/AR(2623) 2013-11-22 14:45:33: Completed CloudReco transaction with ID 'a24cb0cfcc6641c8a1e7ec49189050cb'

I get "Completed CloudReco transaction with ID" after, but never seem to FIND the target... the toggleSearchMode and enterscanningMode etc. only seem to stop searching (i.e. stoping the transactions) and dosen't help me with actually finding anything.

Also I'd love to not initialise the visualsearch again, I always use [qUtils getInstance] so I shouldn't initialise anything else (and I'm using pause and resume already), however the strange bug forces me to do it in my case... any word on that? And just out of cuiosity, say I'd manage to replicate it AND be able to find targets would I be allowed to use it? (With this bug you might be able to disable the scanning points? (change the my file to a compleatly clear (alpha only) picture))

Bonus q ellaboration:

Yes right now I'm just using it for development of course and if I where to release I would of course buy the appropriate package, it's just now however that I'm wondering since I am able to have as many databases as I want in my target manager (although only one in the app). I just don't wanna end up in trouble for circumventing the rules... (guess I already am but atleast I'm honest and I am still developing...)

 

How to change from UDT to CR?

November 22, 2013 - 4:40am #2

Hi Marcus

This ought to be possible, as per the articlae you described, so the trackers should be able to co-exist.

In the CR sample this code starts and stops the tracker:

- (void) toggleVisualSearch:(BOOL)visualSearchOn

{

    QCAR::TrackerManager& trackerManager = QCAR::TrackerManager::getInstance();

    QCAR::ImageTracker* imageTracker = static_cast<QCAR::ImageTracker*>(

                                                                        trackerManager.getTracker(QCAR::Tracker::IMAGE_TRACKER));

    assert(imageTracker != 0);

    QCAR::TargetFinder* targetFinder = imageTracker->getTargetFinder();

    assert (targetFinder != 0);

    vsAutoControlEnabled = NO;

    if (visualSearchOn == NO)

    {

        targetFinder->startRecognition();

        isVisualSearchOn = YES;

    }

    else

    {

        targetFinder->stop();

        isVisualSearchOn = NO;

    }

}

You should also hunt down other calls for StartRecognition.

You also need to make sure that Vuforia can co-exist between instances of the ViewControllers - it may be sensible to only init Vuforia once, and then pause/resume as each ViewController exits/enters.

Also a bonus question: Is it ok to have multiple databases say two and have 1000 recos a month on each of them and manually changing between the two (I'm kind of in that position right now), without needing to pay accorind to:https://developer.vuforia.com/cloud-recognition-service

Well, once you launch your App you need pay, as the developer account is for development use, so not sure where this fits in.

 

N

 

 

 

 

Log in or register to post comments