Skip to main content

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)

Uploaded Source

Built Distribution

pekat_vision_sdk-1.4.4-py3-none-any.whl (6.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page