loading
 
VBScript API Help
Anonymous
14 year
I am struggling and would appreciate some guidance!

I wish to execute a vbs which will load an image from my local machine via a variable built from a path name and an image name then use the api to pass that variable.  

Filename = "image1.png"
Matchpath = "C:\Match\"
ref_image = Matchpath & Filename

Then load via the api:   rr.loadImage "orig", ref_image   (I've tried with square brackets and without.)

Then do the same with another image to compare against.  

Next load a robo file to calculate the SUM_INTENSITY and either grab the result via the api ( rr.GetVariable("SUM_INTENSITY")) or write to a text file through the .robo file.  

Sadly, I am not able to do either.  I think I'm not loading my images correctly.  What am I doing wrong?  My .robo file is attached.

program.robo
Anonymous 14 year
The robofile seems about right. Perhaps the issue is with the system that is executing the API calls to RoboRealm. What language are you using to accomplish these API calls into RoboRealm?

First check that the API is enabled by using a cmd prompt and the following

telnet localhost 6060

where telnet is a network connection program, localhost reflects the machine you are on and 6060 is the default port that RoboRealm listens on. If this works the cmd screen will clear ... if not you'll get an error message. If you get an error message check the Options Button->API Server and the "Activate RoboRealm API Server".

STeven.
Anonymous 14 year
I am "talking" through the API as I can launch RoboRealm and other API calls work, just not the variables.  I am using VBScript.

What else can I try?

Thank you for your help!
Anonymous 14 year
Attached is my stripped down .vbs, the .robo file and the two images I'm trying to compare.  Maybe this will help to figure out what I'm doing wrong.  Thank you again!
blah.zip
Anonymous 14 year
Thanks for the zip file. That helped a lot to narrow down some of the issues. Seems like the Script.vbs need a bit of editing as some of the variables were not getting sent over correctly. There were also some timing issues that we discovered which would have caused you problems later on. These have been fixed in 2.21.0 so please download the latest copy in order to utilize the files below. I've posted the corrected files that assume version 2.21 is installed and appear to work for us. We've kept your configuration so things should work right off the bat. Let me know if you run into additional problems.

Note that the biggest change is the removal of the temp file which is not needed since you can grab the SUM_INTENSITY variable directly using the API and bypass the file system altogether. The Script.vbs file ends up being smaller and easier to understand as a result of this.

STeven.
blah2.zip
Anonymous 14 year
Thank you, STeven, your help is much appreciated!  

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