Skip to main content

Python API for XIMEA cameras control

Project description

xiapipy

xiapipy is the official Python interface to the XIMEA xiAPI, providing full control over XIMEA cameras from Python. It exposes the complete feature set of XIMEA hardware and integrates naturally with popular imaging libraries such as OpenCV and Pillow.

Supported Platforms

OS Architecture
Windows x86 32-bit, x86 64-bit
Linux x86 64-bit, ARM 32-bit, ARM 64-bit
macOS x86 64-bit, ARM 64-bit (Apple Silicon)

Requirements

  • Python 3.x

Optional

Installation

pip install xiapipy

Quick Start

from xiapipy import xiapi

# Create camera instance and open device
cam = xiapi.Camera()
cam.open_device()

# Create image buffer and start acquisition
img = xiapi.Image()
cam.start_acquisition()

# Capture a frame
cam.get_image(img)
data = img.get_image_data_numpy()  # returns numpy array

# Clean up
cam.stop_acquisition()
cam.close_device()

Multiple Cameras

cam0 = xiapi.Camera(dev_id=0)
cam1 = xiapi.Camera(dev_id=1)

cam0.open_device()
cam1.open_device()

You can also open a camera by serial number:

cam = xiapi.Camera()
cam.open_device_by_SN("12345678")

Image Data

Retrieved images can be exported as:

  • get_image_data_raw() — raw bytes
  • get_image_data_numpy()numpy.ndarray (supports mono, raw, RGB, RGBA formats)

Links

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

xiapipy-4.33.23.tar.gz (22.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

xiapipy-4.33.23-py3-none-any.whl (23.0 MB view details)

Uploaded Python 3

File details

Details for the file xiapipy-4.33.23.tar.gz.

File metadata

  • Download URL: xiapipy-4.33.23.tar.gz
  • Upload date:
  • Size: 22.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.5

File hashes

Hashes for xiapipy-4.33.23.tar.gz
Algorithm Hash digest
SHA256 d8d7d3d6ffe9e7534832922f0bb85a774122674bb7d5593d3cb0eab0504fb139
MD5 2226156b1173396c1e8693500da39ea6
BLAKE2b-256 1a9aa6dacc8ec044468aec62970238b394587b067f310c891925d0311b4b53ff

See more details on using hashes here.

File details

Details for the file xiapipy-4.33.23-py3-none-any.whl.

File metadata

  • Download URL: xiapipy-4.33.23-py3-none-any.whl
  • Upload date:
  • Size: 23.0 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.11.5

File hashes

Hashes for xiapipy-4.33.23-py3-none-any.whl
Algorithm Hash digest
SHA256 485b9d904b99f4bcc47dbec0f830c16a7e1a5698cc26c9dceb55032d4973ce03
MD5 0bba7cda38a56ca2430767ee0c58150e
BLAKE2b-256 0360f8d46d218a7f0d123622a571064335a9e2c694651cb82d780d880afbba9a

See more details on using hashes here.

Supported by

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