loading
 
2 different Multiple blob array
Sudeep Pillai from United States  [2 posts]
9 years
Hi,
I've currently set my program to detect 2 different sets of blobs (red and yellow) in my case. This is the current setup

Video Feed (Marker Src) -> Color Threshold (yellow) -> Blob Filter (creating BLOBS array) -> Revert to Src -> Color Threshold (red) -> Blob Filter (creating another BLOBS array)

Since both blob filters are writing to the same BLOBS array, I'd like to set the first BLOBS array to a different array.

I tried using a VB script to write to a new array, but have been unsuccessful.

As of now it looks like
rBLobs = GetArrayVariable("BLOBS")
SetArrayVariable "RBLOBS",rBlobs

Im using the latest Roborealm as of 7/25/2008

Please let me know how i can solve this
Anonymous 9 years
That seems correct. Perhaps the placement of the VBScript module was not correct? Did you have it after the first blob creation?

Included below is an example as you describe it with your code that appears to work quite nicely. (Note that the VBScript module could also be replaced with the Set_Variable module)

It is easier if you include the image and robo file in these posts so that we can be sure that we are looking exactly at the solution you are trying to create. Please use the buttons under the text areas to upload up to 6 images and 1 robofile. (i.e. the .robo file that you can save from RoboRealm that includes the current processing pipeline).

Thanks,
STeven.
program.robo
Sudeep Pillai from United States  [2 posts] 9 years
Hi Steven,
I really don't understand what went wrong, but that's exactly what I had written for my VBscript program. Furthermore, it was placed immediately after the blob filter module as I had to write the BLOBS array into another array before i could overwrite the BLOBS array with another blob filter.

The error I had received said something in the order of an 'invalid procedure call' when i tried to SetArrayVariable "RBLOBS",rBlobs

Anyways, I'm glad this helped. Also, you mentioned that this could be done using the SetVariable module. Does it also allow to set arrays as opposed to single variables. I had tried doing the same with the setVariable module, but i could only get it to set single integer variables and not arrays

Thanks again for the code.
Sudeep
Anonymous 9 years
Sudeep,

Most likely the dll that you were using was out of date. That error message happens when the routine does not exist. The SetArrayVariable was a later routine that perhaps was not in the correct place on your machine. Do a quick scan to see where the SimpleSite.dll is and if it is the most current in the RR download. That's the dll that contains the routines for the VBScript module.

Same issue with the SetVariable ... once upon a time you could not set arrays with it. Included below is a script that does ... seems to work in the same way as the VBScript routine (they were both created together).

If you find this script does not work you may have an older version of RR running on your computer.

STeven.
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