A Python module for communication with PEKAT VISION
Project description
PEKAT VISION SDK
A Python module for communication with PEKAT VISION
Requirements
- numpy
- python-opencv (optional)
- PEKAT VISION 3.10.2 or higher
Installation
Type pip install pekat-vision-sdk
Usage
import cv2
from PekatVisionSDK import Instance
p = Instance('C:\\Users\\Peter\\PekatVisionProjects\\test_project')
# response - only context
context = p.analyze('path_to_image.png')
# response - heatmap and context
img_heatmap, context = p.analyze('path_to_image.png', response_type='heatmap')
# response - annotated image and context
img_annotated, context = p.analyze('path_to_image.png', response_type='annotated_image')
p.stop()
You cand send image in numpy array:
import cv2
img_np = cv2.imread('path_to_image.png')
p.analyze(img_np, response_type='annotated_image')
Access to already running PEKAT VISION instance
p = Instance(port=8100, host='192.168.10.0', already_running=True)
If secure image analyze is enabled for the Pekat project, you need to use the 'api_key' parameter with the corresponding API key that was generated for the project:
p = Instance(port=8000, host='127.0.0.1', already_running=True, api_key='write_your_api_key_here')
Remote analyzer enables you to connect to a remotely running PEKAT VISION. It is possible to connect from multiple PCs simultaneously. PEKAT VISION behaves as a server automatically.
Multiple cameras
# start projects
p1 = Instance('C:\\Users\\Peter\\PekatVisionProjects\\project_camera_1')
p2 = Instance('C:\\Users\\Peter\\PekatVisionProjects\\project_camera_2')
p3 = Instance('C:\\Users\\Peter\\PekatVisionProjects\\project_camera_3')
# response - only context
# in loop
context1 = p1.analyze('path_to_image_camera_1.png')
context2 = p2.analyze('path_to_image_camera_2.png')
context3 = p3.analyze('path_to_image_camera_3.png')
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
pekat_vision_sdk-1.4.4.tar.gz
(5.7 kB
view hashes)
Built Distribution
Close
Hashes for pekat_vision_sdk-1.4.4-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c9bf12d9ed71e57348fd290a658d71a9b0200ca3ca8417c591eb9ca185204c8 |
|
MD5 | 98a2125aa09fc2c4c1edc3cb5ac256ab |
|
BLAKE2b-256 | bf288073efc7627c0a109ef7b913b706c3f6f82f305c3b94789d6b7839b17e82 |