loading
 
C# questions
Ringo from United States  [18 posts]
10 years
I can start the camera and set up a green filter using
rr.execute("<head><version>1.50</version></head><RGB_Filter><min_value>0</min_value><channel>2</channel></RGB_Filter>");

but how do I do things like turn on the Center_of_gravity module?
is there a list of proper syntax somewhere? Also, is the <head> and <version> stuff above necessary? is it in every command?
Thansk,
ringo
Anonymous 10 years
ringo,

you don't need the head and version tags ... those only help with the exchange of RoboRealm programs to have an attached version that just alerts a user if a higher version is needed when they run a program.

The best way to create these xml config strings is to use RR to create the configuration that you need, save it as a .robo file and then load that robo-file in an editor and remove the head, version tag. Then remove all newlines and pop that text into your routine above.

STeven.
ringo  [1 posts] 10 years
Never mind, I see the easy way now. I set up all the filters in RoboRealm, then save the .robo file and just call that from my c# app.  This is just too cool!!!!!!
Anonymous 10 years
Oh, I didn;t realize the .robo file was just xml (makes sense now). so I can get the info from there, or just call the robo file itself.
I'll be chasing balls in no time!!
Ringo
Anonymous 10 years
Next question, how can I show the Video feed in my C# app instead of just in RoboRealm?
Anonymous 10 years
Have a look at the Get_Image API command.

STeven.
Anonymous 10 years
Thanks, I guess it is a C# question more than an roborealm question. Once I use get_image how would I display it in a picturebox or whatever container is appropriate?
Thanks
Ringo
Anonymous 10 years
Good question. We're not terribly familiar with that area. Perhaps that question has been answered on one of the other newgroups? Perhaps a quick search on google could find you some code examples.

STeven.
Ringo from United States  [18 posts] 10 years
Showing the picture in C# is much easier than I thought. I was trying to use getImage then put that in a picturebox, but it is not that complicated.
I just dropped a WebBrower onto my form and set the url to
http://localhost:8080/index.html
and poof!! video in my C# app. I'll just edit index.html to get rid of the buttons and use my c# buttons to do everything. Too cool!!
Ringo
Anonymous 10 years
Ringo, nicely done!! Guess that is one use of the WebBrowser object ... just make sure to have java installed.

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