Hello,
I will start with a small introduction, my name is Dave and I am currently working on a project at HAN University in Arnhem (Netherlands).
The goal of this project is to create an ambient intelligence environment, within this project we are integrating pattern recognition as well as movement detection (gesture recognition), and for these functionalities we want to make use of RoboRealm.
We did some experiments and were able to complete many tasks inside RoboRealm. Our next goal is to convert the variables from RoboRealm into Java so we can use java to create our own application to determine and execute the desired action. We have searched the RoboRealm site and found the API and Plugins (api.zip and plugins.zip). Within plugins.zip we found a good example of how to use java to obtain the variables from RoboRealm into java. After some trial and error we were able to understand the code and tried to extract variables other than height and width which were already present in the code.
We found a list of available variables (see screen) in the Socket Server Program module which we used to connect to our Java application. We then replaced the “height” in the code examples with variables like “mouse_click_y” and ”image_height”. When we tested our Java application we didn’t receive the results we expected, instead of the normal height in the example code (480) we received along (byte?) numbers and we can’t figure out what they mean or how to convert them into the actual values.
We are hoping someone knows a solution or can tell us what we are doing wrong and point us in the right direction, even entirely different approaches are welcome.
Working Example 1:
if (name.equalsIgnoreCase("height"))
{
System.out.println(data);
imageData.height = byteToInt(data);
System.out.println(imageData.height);
}
Output of example 1:
[B@addbf1
480
[B@addbf1
480
[B@addbf1
480
[B@addbf1
480
...
Adjusted Example:
if (name.equalsIgnoreCase("image_height "))
{
System.out.println(data);
int myIntVar = byteToInt(data);
System.out.println(myIntVar);
}
|
|