Skip to main content

Python wrapper for Intel RealSense cameras on Apple Silicon

Project description

realsense-applesilicon

Python wrapper for Intel RealSense cameras on Apple Silicon

Installation

System Requirements

  • macOS running on Apple Silicon (M1/M2)
  • Homebrew package manager
  • Python 3.8 or higher

Installing System Dependencies

# Install librealsense2 (required)
brew install librealsense2

Installing the Python Package

# Basic installation
pip install realsense-applesilicon

# With test dependencies
pip install realsense-applesilicon[test]

# With development tools
pip install realsense-applesilicon[dev]

# With documentation tools
pip install realsense-applesilicon[docs]

# With all optional dependencies
pip install realsense-applesilicon[all]

Dependencies

Core Dependencies

  • Python 3.8+
  • librealsense2 (system library)
  • numpy>=1.19.0,<2.0.0
  • opencv-python>=4.5.0,<5.0.0
  • cython>=0.29.0,<1.0.0

Optional Dependencies

Testing (install with pip install realsense-applesilicon[test])

  • pytest>=6.0.0,<7.0.0
  • pytest-cov>=2.10.0,<3.0.0

Development (install with pip install realsense-applesilicon[dev])

  • black>=22.0.0 (code formatting)
  • isort>=5.0.0 (import sorting)
  • flake8>=3.9.0 (code linting)
  • mypy>=0.900 (type checking)

Documentation (install with pip install realsense-applesilicon[docs])

  • sphinx>=4.0.0
  • sphinx-rtd-theme>=1.0.0

Usage

from realsense.wrapper import PyRealSense

# Initialize the camera
rs = PyRealSense(width=640, height=480, framerate=30)

# Start the camera
rs.start()

try:
    # Get frames
    frames = rs.get_frames()
    depth_frame = frames.get('depth')
    color_frame = frames.get('color')
    ir_frame = frames.get('infrared')
    
    # Process frames...
    
finally:
    # Stop the camera
    rs.stop()

Development

Setting up development environment

# Clone the repository
git clone https://github.com/yourusername/realsense-applesilicon.git
cd realsense-applesilicon

# Create and activate virtual environment
python -m venv venv
source venv/bin/activate

# Install development dependencies
pip install -e ".[dev,test,docs]"

Running tests

pytest tests/

Code formatting

# Format code
black .

# Sort imports
isort .

# Run linter
flake8 .

License

MIT License

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

realsense_applesilicon-0.1.0.tar.gz (107.6 kB view details)

Uploaded Source

Built Distributions

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

realsense_applesilicon-0.1.0-cp312-cp312-macosx_10_13_universal2.whl (226.5 kB view details)

Uploaded CPython 3.12macOS 10.13+ universal2 (ARM64, x86-64)

realsense_applesilicon-0.1.0-cp311-cp311-macosx_10_9_universal2.whl (226.1 kB view details)

Uploaded CPython 3.11macOS 10.9+ universal2 (ARM64, x86-64)

realsense_applesilicon-0.1.0-cp310-cp310-macosx_10_9_universal2.whl (226.0 kB view details)

Uploaded CPython 3.10macOS 10.9+ universal2 (ARM64, x86-64)

realsense_applesilicon-0.1.0-cp39-cp39-macosx_10_9_universal2.whl (227.7 kB view details)

Uploaded CPython 3.9macOS 10.9+ universal2 (ARM64, x86-64)

File details

Details for the file realsense_applesilicon-0.1.0.tar.gz.

File metadata

  • Download URL: realsense_applesilicon-0.1.0.tar.gz
  • Upload date:
  • Size: 107.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.13

File hashes

Hashes for realsense_applesilicon-0.1.0.tar.gz
Algorithm Hash digest
SHA256 fc98558cfc2d4291a05cdc221ee1910571ee73a681041e188766c76194dae9d8
MD5 16beda0344e26cef060f5203623902d0
BLAKE2b-256 822f1246b91cde84e0203b41f1a1434c162e8ccf68c762d9562e509b2f9a101a

See more details on using hashes here.

File details

Details for the file realsense_applesilicon-0.1.0-cp312-cp312-macosx_10_13_universal2.whl.

File metadata

File hashes

Hashes for realsense_applesilicon-0.1.0-cp312-cp312-macosx_10_13_universal2.whl
Algorithm Hash digest
SHA256 389fb82938cc8293a37956879f6dc66802fea79bcd802b42b8a0195fb23aca30
MD5 1306803154e43d5189991f6f2ae449d6
BLAKE2b-256 c27fd8d4fededdab6d80acc49a65c6e7d363e32e1a5895e520eb04ed9f0858bb

See more details on using hashes here.

File details

Details for the file realsense_applesilicon-0.1.0-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for realsense_applesilicon-0.1.0-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 856c1c112145c535b590a42dc05cf9ddf37a103196c82d16643f236620bf8f0b
MD5 ff9a37c362b2fe152f069bd7fe4f4479
BLAKE2b-256 64c796a6402d37aea064318f1f7eaa8e171d906556eeab2c768e64ca6bfc0680

See more details on using hashes here.

File details

Details for the file realsense_applesilicon-0.1.0-cp310-cp310-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for realsense_applesilicon-0.1.0-cp310-cp310-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 ae01b28434c5e99c51d142a9a455aa3d55e480e01b5427d133a29eb2030ea397
MD5 67177e822ec187a987306e905a96e1b2
BLAKE2b-256 8bc2ced95341c245b460825abf353da9d248e32fbd6e96320e30ea88922939bb

See more details on using hashes here.

File details

Details for the file realsense_applesilicon-0.1.0-cp39-cp39-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for realsense_applesilicon-0.1.0-cp39-cp39-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 7393f21de8264f8918b1c71bbe905adcaf1293f03d8ef915f720641041cbe4ff
MD5 35cecb7f6863d0438253fb9296d3751e
BLAKE2b-256 6650016f2170a317e7bfcd8d19e02b2f89bde7184e9ebbab61c063da15e4ea6c

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