pywayne-cv-camera-model
Camera model wrapper for camera_models C++ library via pybind11. Use when working with pywayne.cv.camera_model module to load camera models from YAML configuration files, access camera properties (model type, image size, parameters), perform projection operations (lift_projective, space_to_plane), and export camera parameters as dictionaries.
What this skill does
# Pywayne Camera Model
This module wraps the `camera_models` C++ library via pybind11, providing a Python interface for camera operations.
## Quick Start
```python
from pywayne.cv.camera_model import CameraModel
from pywayne.cv.tools import write_cv_yaml
import numpy as np
# Create camera model
camera = CameraModel()
# Load from YAML file
camera.load_from_yaml('camera_config.yaml')
# Access properties
print(f"Model: {camera.model_type}")
print(f"Size: {camera.image_width}x{camera.image_height}")
```
## Loading from YAML
```python
from pathlib import Path
# Sample YAML configuration
yaml_data = {
"model_type": "PINHOLE",
"camera_name": "my_camera",
"image_width": 1280,
"image_height": 720,
"distortion_parameters": {"k1": 0.0, "k2": 0.0},
"projection_parameters": {"fx": 600.0, "fy": 600.0, "cx": 640.0, "cy": 360.0}
}
# Write YAML file
write_cv_yaml('camera_config.yaml', yaml_data)
# Load model
camera.load_from_yaml('camera_config.yaml')
```
## Supported Camera Models
| Model Type | Description |
|------------|-------------|
| `PINHOLE` | Standard pinhole camera with radial distortion |
| `PINHOLE_FULL` | Full pinhole model with all distortion parameters |
| `CATA` | Catadioptric camera model |
| `EQUIDISTANT` | Equidistant camera model |
| `OCAM` | Unified camera model |
## Projection Operations
### lift_projective()
Lifts a 2D image point to a 3D projective ray:
```python
# Input can be tuple, list, or numpy array
ray_3d = camera.lift_projective([u, v]) # Returns np.ndarray (x, y, z)
```
### space_to_plane()
Projects a 3D point onto the 2D image plane:
```python
# Input can be tuple, list, or numpy array
uv = camera.space_to_plane([x, y, z]) # Returns np.ndarray (u, v)
```
## Properties
| Property | Description |
|---------|-------------|
| `model_type` | Camera model type (enum) |
| `camera_name` | Name of the loaded camera |
| `image_width` | Image width in pixels |
| `image_height` | Image height in pixels |
## Parameters Dictionary
Export all camera parameters as a dictionary:
```python
params = camera.get_parameters_as_dict()
print(params)
```
Includes model-specific parameters:
- **Pinhole**: `k1`, `k2`, `p1`, `p2`, `fx`, `fy`, `cx`, `cy`
- **Pinhole Full**: `k1-k6`, `p1-p2`, `fx`, `fy`, `cx`, `cy`
- **CATA**: `xi`, `k1-k2`, `p1-p2`, `gamma1-2`, `u0`, `v0`
- **Equidistant**: `k2-k5`, `mu`, `mv`, `u0`, `v0`
- **OCAM**: `C`, `D`, `E`, `center_x`, `center_y`, `poly`, `inv_poly`
## Requirements
- `camera_models` - C++ library (auto-downloaded via gettool if missing)
- `numpy` - Array operations
- `pywayne.cv.tools.write_cv_yaml` - For writing YAML files
## Notes
- Library is automatically checked and downloaded via `gettool` if not found
- Supports both tuple/list and numpy array inputs for projection methods
- Output from projection methods is always `np.ndarray` with `dtype=np.float64`
Related in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.