Jump to content

RoboRealm computer vision


MindTorque
 Share

Recommended Posts

Just found a relatively simple means of doing vision on a PC.

RoboRealm can do many interesting things, including object recognition,

reading barcodes, controling servos (includes Phigets support), and is

well suited to controlling robots. I've only just begun experimenting with

it, so here's a simple example script to get you started with interfacing

to it with AutoIt. You can get RoboRealm from http://www.roborealm.com

Enjoy ;)

RoboRealm.au3

Link to comment
Share on other sites

This looks very interesting. I had a quick look at the Roborealm documentation and I didn't understand some of it. I see how you saved an image to disc, but do you understand how the "get image" instruction works. I would like to be able to grab an image and then perform some basic analysis of it. Saving to disc then loading it will not only slow things down but seems a bit silly.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

Martin,

I haven't yet had time to explore RoboRealm to the extent I'd like, but I

suspect that most analysis you'd likely wish to perform can be handled

by the broad variety of modules provided that can be inserted into the

pipeline, with the results put into one or more variables that AutoIt can

get via GetVariable - this way RoboRealm is doing all the "heavy lifting".

I agree that having to write it to disk and read it back would be rather

clunky, even if one uses a ramdisk to speed the process. I don't yet

know precisely how GetImage works, although I grabbed a look at the

type library if that's of any help to you. Here they are:

// Generated .IDL file (by the OLE/COM Object Viewer)
//
// typelib filename: RR_COM_API.dll
[
  uuid(2DDA153B-5603-4697-AAC9-2B6FDCF1DC64),
  version(1.0),
  helpstring("RR_COM_API 1.0 Type Library"),
  custom(DE77BA64-517C-11D1-A2DA-0000F8773CE9, 83951780),
  custom(DE77BA63-517C-11D1-A2DA-0000F8773CE9, 1303678299)
]
library RR_COM_APILib
{
    // TLib :    // TLib : OLE Automation : {00020430-0000-0000-C000-000000000046}
    importlib("stdole2.tlb");
    // Forward declare all types defined in this typelib
    interface IAPI_Wrapper;
    [
      uuid(5379A53A-B254-483B-9DA0-AF6BA0970BE3),
      helpstring("API_Wrapper Class")
    ]
    coclass API_Wrapper {
        [default] interface IAPI_Wrapper;
    };
    [
      odl,
      uuid(B3B82392-E613-4711-B619-E04555549903),
      helpstring("IAPI_Wrapper Interface"),
      dual,
      oleautomation
    ]
    interface IAPI_Wrapper : IDispatch {
        [id(0x00000001), helpstring("method Connect")]
        HRESULT Connect(
                        [in] BSTR hostname,
                        [out, retval] long* res);
        [id(0x00000002), helpstring("method Disconnect")]
        HRESULT Disconnect([out, retval] long* res);
        [id(0x00000003), helpstring("method GetDimension")]
        HRESULT GetDimension(
                        [out] VARIANT* width,
                        [out] VARIANT* height,
                        [out, retval] long* res);
        [id(0x00000004), helpstring("method GetImage")]
        HRESULT GetImage(
                        [in] BSTR name,
                        [out] VARIANT* image,
                        [out] VARIANT* width,
                        [out] VARIANT* height,
                        [out, retval] long* res);
        [id(0x00000005), helpstring("method SetImage")]
        HRESULT SetImage(
                        [in] BSTR name,
                        [in] VARIANT* image,
                        [in] VARIANT* width,
                        [in] VARIANT* height);
        [id(0x00000006), helpstring("method GetVariable")]
        HRESULT GetVariable(
                        [in] BSTR name,
                        [out, retval] BSTR* value);
        [id(0x00000007), helpstring("method SetVariable")]
        HRESULT SetVariable(
                        [in] BSTR name,
                        [in] BSTR value,
                        [out, retval] long* res);
        [id(0x00000008), helpstring("method DeleteVariable")]
        HRESULT DeleteVariable(
                        [in] BSTR name,
                        [out, retval] long* res);
        [id(0x00000009), helpstring("method Execute")]
        HRESULT Execute(
                        [in] BSTR str,
                        [out, retval] long* res);
        [id(0x0000000a), helpstring("method LoadProgram")]
        HRESULT LoadProgram(
                        [in] BSTR filename,
                        [out, retval] long* res);
        [id(0x0000000b), helpstring("method LoadImage")]
        HRESULT LoadImage(
                        [in] BSTR name,
                        [in] BSTR filename,
                        [out, retval] long* res);
        [id(0x0000000c), helpstring("method SaveImage")]
        HRESULT SaveImage(
                        [in] BSTR name,
                        [in] BSTR filename,
                        [out, retval] long* res);
        [id(0x0000000d), helpstring("method SetCamera")]
        HRESULT SetCamera(
                        [in] BSTR name,
                        [out, retval] long* res);
        [id(0x0000000e), helpstring("method Run")]
        HRESULT Run(
                        [in] BSTR name,
                        [out, retval] long* res);
        [id(0x0000000f), helpstring("method WaitVariable")]
        HRESULT WaitVariable(
                        [in] BSTR name,
                        [in] BSTR value,
                        [in] long timeout,
                        [out, retval] long* res);
        [id(0x00000010), helpstring("method WaitImage")]
        HRESULT WaitImage([out, retval] long* res);
        [id(0x00000011), helpstring("method LoadPPM")]
        HRESULT LoadPPM(
                        [in] BSTR filename,
                        [in] VARIANT* image,
                        [in] VARIANT* width,
                        [in] VARIANT* height,
                        [out, retval] long* res);
        [id(0x00000012), helpstring("method SavePPM")]
        HRESULT SavePPM(
                        [in] BSTR filename,
                        [in] VARIANT* image,
                        [in] VARIANT* width,
                        [in] VARIANT* height,
                        [out, retval] long* res);
        [id(0x00000013), helpstring("method Open")]
        HRESULT Open(
                        [in] BSTR hostname,
                        [in] VARIANT* port,
                        [out, retval] long* res);
        [id(0x00000014), helpstring("method Close")]
        HRESULT Close([out, retval] long* res);
        [id(0x00000015), helpstring("method GetVariables")]
        HRESULT GetVariables(
                        [in] BSTR name,
                        [out, retval] VARIANT* value);
        [id(0x00000016), helpstring("method SetVariables")]
        HRESULT SetVariables(
                        [in] VARIANT* names,
                        [in] VARIANT* values,
                        [out, retval] long* res);
        [id(0x00000017), helpstring("method SetParameter")]
        HRESULT SetParameter(
                        [in] BSTR mod,
                        [in] VARIANT* count,
                        [in] BSTR name,
                        [in] BSTR value,
                        long* res);
        [id(0x00000018), helpstring("method GetParameter")]
        HRESULT GetParameter(
                        [in] BSTR mod,
                        [in] VARIANT* count,
                        [in] BSTR name,
                        [out, retval] BSTR* res);
        [id(0x00000019), helpstring("method MinimizeWindow")]
        HRESULT MinimizeWindow([out, retval] long* res);
        [id(0x0000001a), helpstring("method MaximizeWindow")]
        HRESULT MaximizeWindow([out, retval] long* res);
        [id(0x0000001b), helpstring("method MoveWindow")]
        HRESULT MoveWindow(
                        [in] VARIANT* x,
                        [in] VARIANT* y,
                        [out, retval] long* res);
        [id(0x0000001c), helpstring("method ResizeWindow")]
        HRESULT ResizeWindow(
                        [in] VARIANT* width,
                        [in] VARIANT* height,
                        [out, retval] long* res);
        [id(0x0000001d), helpstring("method PositionWindow")]
        HRESULT PositionWindow(
                        [in] VARIANT* x,
                        [in] VARIANT* y,
                        [in] VARIANT* width,
                        [in] VARIANT* height,
                        [out, retval] long* res);
        [id(0x0000001e), helpstring("method SaveProgram")]
        HRESULT SaveProgram(
                        [in] BSTR filename,
                        [out, retval] long* res);
        [id(0x0000001f), helpstring("method Pause")]
        HRESULT Pause([out, retval] long* res);
        [id(0x00000020), helpstring("method Resume")]
        HRESULT Resume([out, retval] long* res);
    };
};

I hope you find the possibilities as fascinating as I do ;)

Link to comment
Share on other sites

  • 2 weeks later...

Martin,

If you want to grab the image to another application you can use the

virtual webcam driver to share it with up to 5 other applications - see

http://www.roborealm.com/help/Virtual_Camera_Driver.php for the

particulars. So far I'm quite impressed with the amount of options

RoboRealm provides although I'm still short on time to experiment

with it, but I've found such things as fiducials very handy.

Link to comment
Share on other sites

Thanks for the link.

Serial port communications UDF Includes functions for binary transmission and reception.printing UDF Useful for graphs, forms, labels, reports etc.Add User Call Tips to SciTE for functions in UDFs not included with AutoIt and for your own scripts.Functions with parameters in OnEvent mode and for Hot Keys One function replaces GuiSetOnEvent, GuiCtrlSetOnEvent and HotKeySet.UDF IsConnected2 for notification of status of connected state of many urls or IPs, without slowing the script.
Link to comment
Share on other sites

  • 2 months later...

Martin,

A couple of other possibilites... images can be written to and read from the clipboard

of course, for a more sophisticated scheme there's http://www.roborealm.com/help/Distributor.php

for farming the work of processing images across multiple computers. Appropirately talented

people can customize RoboRealm via their own plugins: http://www.roborealm.com/help/plugins.php

I haven't gotten that elaborate given that anything I've wanted to do so far has been

adequately addressed by their generous selection of modules.

Cheers :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...