Group Details Private


  • Python API – request for comments

    We are welcoming all feedback related to the upcoming Python API. What kind of an API would you want to see? Which libraries should be included? NumPy and OpenCV will be included, but which other libraries would you like to have?

    Here's a sneak peek of what is coming out:

    import visionappster as va
    class Binarize:
        """Binarizes an image using a static gray-level threshold.
        def level_min(self):
            return 0
        def process(self,
                    inputs: {'image': va.int32,
                             'level': {'type': va.int32,
                                       'min': lambda: self.level_min(),
                                       'max': 255,
                                       'default': 127}},
                    outputs: {'image': {'type': va.Image,
                                        'imageType': 'raw'}}) -> va.int32:
            # Implementation here: read inputs and write to outputs
            return va.SUCCESS
    tools = [Binarize]
    posted in Tools
  • RE: JavaScript tool on Builder

    This is intentional. The JavaScript API hasn't stabilized, and we didn't want to publish the details yet. If you are OK with a breaking your app when upgrading, here's how you get a list of functions and definitions available to JS code in the JavaScript tool:

    for (var i in VisionAppster)

    If you put this code to a JavaScript tool and run it, you'll see all API entries in the console.

    For example, this creates a new color image:

    var img = VisionAppster.image(640, 480, VisionAppster.Rgb32);

    When it comes to using external libraries, the answer is yes in principle, but the feature isn't publicly available. Integrating something like Node.js modules may or may not be supported in the future.

    posted in Builder
  • RE: Concurrent compound function calls

    Nothing to be sorry about. This is really valuable feedback to us. I cannot directly tell what's going on, but we are trying to reproduce the problem in a controlled setting. The two issues could indeed be related. Thanks for reporting.

    posted in Builder
  • RE: Function calls and signals

    I see. While I'm still unsure which part of the whole pipeline is failing, this is a good description that will help us dig it deeper. Thanks for reporting.

    posted in Builder
  • RE: Function calls and signals

    It's hard to say exactly what happens. But I wonder if this is what you actually wanted to do. When you call the MyInput function, JavaScriptMyInput gets executed. The results will be passed back to your client code using a callback function. This is how tool function APIs work, please see here for details.

    The outputs of the tool that is exposed as an API function are available to the processing graph. In your case, they will trigger the rest of the graph, producing a signal at the end. If clients connect to this signal, they will be delivered whatever comes out of the pipe independent of who triggered the graph. Thus, there is no 1:1 correspondence between what you sent to what you receive.

    Another thing that may cause a discrepancy is your script code at the end. If it does not set the output parameter, it will not be sent. In this case, the parameter must be flagged asynchronous.

    What you probably want to do is to bundle your graph into a single compound tool and make that a function API.

    posted in Builder
  • RE: Where is it and how is it used?

    The answer is "it depends". 🙂

    va-run is the way to run stand-alone apps, which are usually UI apps. You can run stand-alone server apps with it as well (like you did by va-run main.qml), but they are not hugely useful without a web server that provides a remote interface.

    The web server is started by the Engine service that runs in the background. There is a web-based management interface through which you can install, start and stop apps.

    The .vapkg file contains a component that in your case is an executable app. You can upload .vapkg files to the service through the web interface or directly from the Builder. Once you install the uploaded packages, the front page automatically shows you all installed apps.

    Hope this helps. 🙂

    posted in Engine
  • RE: Can I use a GigE camera?

    Yes and no. 🙂

    We are currently closing the 3.0 release, which brings in major changes. GigE support is still there, but we won't be able to include prebuilt drivers in the release. Pylon and Pleora GigE driver support is planned to be back in 3.1. We are also planning to support GenTL as a way to implement custom camera drivers.

    Meanwhile, if you aren't afraid of C or C++, you can use the tool API to get images from cameras.


    posted in Installation
  • RE: string and array type tool input/output

    A fix to this bug will be included in the next release (2.9).

    posted in Tools