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]
    

Log in to reply