loading
 
Anonymous 1 year
I've tried to call other objects recognition in section 2 by passing Cscript but It's also returned to call  object recognition sections 1

   
Steven Gentner from United States  [273 posts] 1 year
Hi,

It seems like the IF Statement is working correctly since the right of the pipeline is not showing any timing numbers for that section 1. So it appears that it is not being called at least when you took that screenshot.

One possibility is that the variables are NOT removed even if you do not call that section of code any more. The variable will stay in memory until either the program exits, gets over written by a new value or deleted when you remove a module that generates variables. In your case, because DEBUG_VAR is a custom variable they will remain.

I would also use

int i = getVariable("DEBUG_VAR2")

as i is an integer.

But I think your real issue is with

PushButton("Object Recognition", 0, "Train")

The issue is which Object Recognition module are you referring to? Since you have two and they are the same name the system will ALWAYS chose the first once since you specified a count of 0. This happens EVEN when the first module is not being executed since you are accessing the module via the User Interface ... which is not really the recommended way to do this.

So to fix your problem use

PushButton("Object Recognition", 2, "Train")

for your second CScript. This will tell the system that you mean the second OR module.

BUT did you see the "monitor folder" checkbox functionality? If you check that checkbox when you specify the folder to train from within the OR module, it will retrain automatically when new files are added or deleted from that folder. Its MUCH simpler and more efficient to use than causing buttons to be pushed.

STeven.


This forum thread has been closed due to inactivity (more than 4 months) or number of replies (more than 50 messages). Please start a New Post and enter a new forum thread with the appropriate title.

 New Post   Forum Index