Python tool API

The performance of Python isn't usually good enough for the low-level number crunching required by vision algorithms. Due to its expressive power, Python is however handy in expressing the high-level logic of complex algorithms whose low-level parts are implemented in native code. For this reason, Python is widely used in implementing vision software.

We are currently implementing a Python interface to the VisionAppster platform. It provides Python wrappers for all supported data types and lets you to make your existing Python code compatible with a simple wrapping mechanism. Here's a sneak peek:

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.Image,
                         '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]

One of the questions we still need to solve is which Python libraries to include in the standard offering and which as separately installable components. We are welcoming all feedback on this.