Skip to main content

Simple python 2/3 library for transporting images to a remote machine, applying transformations and returning a response.

Project description

SimpleImageTransport

Simple python 3 library for transporting images to a remote machine, applying transformations and returning a response.

Usage

Start a server on the remote machine:

from SimpleImageTransport import ImageReceiver

# Callback takes a single parameter image and returns a dict of useful data
def example_callback(img):
    return {'message': 'image received. size={}x{}'.format(img.shape[1], img.shape[0])}

# Initialize the application
image_receiver = ImageReceiver()
image_receiver.set_callback(example_callback)
image_receiver.run()

On the local machine you can send an image and get an appropriate response:

from SimpleImageTransport import ImageSender
import numpy as np

img = np.zeros((1080, 1920))

response = ImageSender(img)
print(response)  # {'message': 'image received. size=1920x1080'}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for SimpleImageTransport, version 1.3
Filename, size File type Python version Upload date Hashes
Filename, size SimpleImageTransport-1.3-py2-none-any.whl (4.8 kB) File type Wheel Python version py2 Upload date Hashes View
Filename, size SimpleImageTransport-1.3.tar.gz (3.0 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page