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.21.tar.gz (22.4 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.21-py3-none-any.whl (22.7 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xiapipy-4.33.21.tar.gz
  • Upload date:
  • Size: 22.4 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.21.tar.gz
Algorithm Hash digest
SHA256 97c26f860d02e3d17ebc98fb732c0b1b607f2a99d4e7998d97b3e5041c032ca5
MD5 f12f7ce5a87271597635da1ed7b4348d
BLAKE2b-256 792b79df9f7ad7e543ddf56c940fc839db36349d0c2e8a27046ff96f8f8ec5e5

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xiapipy-4.33.21-py3-none-any.whl
  • Upload date:
  • Size: 22.7 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.21-py3-none-any.whl
Algorithm Hash digest
SHA256 84c1775720de52a4d0575d838d930444aacb6139c5a79d79451ea85540c0dc1c
MD5 722bf0b0203f749872a8ecf3493b1e92
BLAKE2b-256 d0639b05addc39d0425e7701ec49defc758caeb6082a516df8cf1eaebf7120f8

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