Simple python 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
flask_receiver = ImageReceiver()
flask_receiver.set_callback(example_callback)
flask_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.
Source Distribution
Built Distribution
Close
Hashes for SimpleImageTransport-0.1-py2-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4e697fcdd3c0f798f256d31f19946bbcc6b7fcba98d8d635defd70e6d00c7c96 |
|
MD5 | 225fb3a14aeec88a57dc122f32ba660e |
|
BLAKE2b-256 | 4979cab064f9b014a42130bcaffa0a6e780293e7b1cc0e7b98e458678a364f50 |