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.19.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.19-py3-none-any.whl (22.7 MB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: xiapipy-4.33.19.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.19.tar.gz
Algorithm Hash digest
SHA256 c1aa7e110c1bc7cc69a8e30a1e3f8d5c10b505558bdcecbbe8e5c81e2b210a95
MD5 ef9dd6afc2a0c12e8263273b0c932ea1
BLAKE2b-256 5b3cdcdba8ff800732fd782db4971f76a9189c66c556bb907404f5d87a2fa842

See more details on using hashes here.

File details

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

File metadata

  • Download URL: xiapipy-4.33.19-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.19-py3-none-any.whl
Algorithm Hash digest
SHA256 7872117526309662e7e6bcc7ca08daa3b775a84702befd7979a4a0f2dd517e7c
MD5 4fd98e2591151408f75b0aa7cceadc5c
BLAKE2b-256 9424205d08f057c5b19dca95e9ccdc6ad490ca73491e41d868a35f4872dcac35

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