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
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.
Source Distribution
Built Distribution
Close
Hashes for SimpleImageTransport-1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bb1b814eccdd4e463e83fa53883606cc36b7740d192867071a7f83f86241797f |
|
MD5 | 1e18ab8cbe24f731f92f2a7869dc603b |
|
BLAKE2b-256 | b7940d49c834dfcdb3f33946b17db86ec2ffa65d994516c8db8d72b7219bb325 |