Skip to content

Conversation

@dajuly20
Copy link

Summary

This PR adds a convenient wrapper script and fixes compatibility with newer OpenCV versions.

New: run.py Startup Script

A new run.py script in the project root provides an easy entry point for users:

./run.py -l, --list     # List available video devices
./run.py -u, --use <n>  # Run thermal camera with device number
./run.py -i, --install  # Install dependencies (python3-opencv, v4l-utils)
./run.py -h, --help     # Show help

Why? Users no longer need to remember the path to src/tc001v4.2.py or the exact parameter names. The wrapper handles everything from one place.

Fix: OpenCV Compatibility

Changed cap.set(cv2.CAP_PROP_CONVERT_RGB, False) to cap.set(cv2.CAP_PROP_CONVERT_RGB, 0.0).

Why? Newer OpenCV versions require a float value instead of bool, causing a TypeError on startup.

Documentation: v4l-utils Dependency

Added v4l-utils to the README dependencies section with installation instructions.

Why? v4l2-ctl --list-devices is required to find the camera device number, but the package wasn't listed as a dependency.

Documentation: Device Listing Example

Added example output of v4l2-ctl --list-devices to the README.

Why? Helps users understand how to identify their thermal camera (look for "USB Camera") and which device number to use (first /dev/videoX entry).

🤖 Generated with Claude Code

dajuly20 and others added 3 commits January 16, 2026 09:25
- Add run.py with --devices, --dev, --install-dependencies options
- Fix TypeError in tc001v4.2.py: use 0.0 instead of False for CAP_PROP_CONVERT_RGB
- Update README with v4l-utils dependency and device listing example

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- --devices → -l, --list (shorter and matches common CLI conventions)
- --dev → -u, --use (clearer intent: "use this device")
- --install-dependencies → -i, --install (concise)
- Remove redundant examples section from help output

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
- Add "Using the Wrapper Script" section with usage instructions
- Document all CLI options (-l, -u, -i, -h)
- Reorganize "Running Directly" as alternative method

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant