loading
 
VB.Net and Shape Recognition
Anonymous
9 years
Hi there,

I've downloaded RoboRealm and it looks fantastic - I plan to interface to it from a VB.Net program.

I have worked through the "Shape Matching" Tutorial and also read through the "Reading Digital Displays" Tutorial. What I really want to do is combine the 2 (which I think should be quite easy) - but I don't want to do anything in VBScript I want to run it all from VB.Net via the API.

I've downloaded and run the VB.Net API example and it works fine - but what I have not been able to fathom out is how can I at any given point in time demand to know from the API which shapes the camera can see.

My idea is to have the Camera read a numeric display (2 digits) that will be a code that will tell the Robot exactly where it is at that point in time.

Any pointers greatly appreciated - I know this is possible, just don't know how?
Anonymous 9 years
Most of the modules within RoboRealm create variables that contain valuable information about what they have calculated. If you check the Shape_Match module you will see that it creates several variables that contain the currently matched shape. Those variables are what is displayed at the end of the Shape Matching tutorial on the image. You can see the variables by adding in the Watch_Variable module at any time ... those variables are what you would access via the API to communicate what RoboRealm currently sees in the image. That's why there are so many variable access routines in the API.

Does that make sense?

STeven.
Anonymous 9 years
STeven,

Thanks, but I think I'm acutally further back than I thought I was before.

Asssume that "interactively" I'm comfortable with setting up the shape matching to get the attached image. This shows a Square and a Circle successfully recognised.

What I want to do is be able to get to this stage from VB.Net using the API, and once there then be able to pick up the variables for the names of the 2 objects recognised to make decisions in my program.

So Sometimes it'll be:

Square followed by Circle

sometimes:

Circle followed by Square

etc. with various other shapes (or maybe even numbers and letters once I've got the hang of it).

Now I can know from the Digital Reader Turorial that this should be possible (but I don't fully understand the VBScript and how to convert it to VB.Net. I have run the example VB.Net application so I know I can communicate via the API.

So my guess is that the code should start somethign like:

Dim rr As Object

    Public Sub Main()

        rr = CreateObject("RoboRealm.API.1")

        ' open RoboRealm if not already running
        rr.Open("c:\mydownloads\RoboRealm\roborealm\RoboRealm.exe")


but I hate to admit it, I'm lost after that.

1. How do I specify my ShapeMatching to RoboRealm via the API ?

and

2. How do I pick up the names of the first 2 (or more) shapes recognised ?

I'm really trying to get to grips with this as I know it'll be fantastic - but I'm just not picking it up.

Many thanks in advance.
Anonymous 9 years
STeven,

I'm a little further forward now - I've got all I want running from a .robo file (see attached):

1. Shape Matching
2. VBScript
3. Watch Variable (this stage not really needed)
4. Write Variable to text file

Now if somone could just translate that so that it can all be run within VB.Net that would be fantastic - obviously I would not want to write the variable to a text file, I would just want it available for ther rest of my program.

Many thanks in advance.
B
program.robo

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