A comprehensive RealSense camera control system with calibration, IR emitter management, and image processing capabilities.
Use: realsense_r200_capture_image.py
- Take pictures and record videos
- Save camera intrinsics data
- Basic camera functionality testing
Use: camera_calibration.py
- Calibrate camera using checkerboard pattern
- Generates high-quality calibration data
- Outputs:
output/calibration_data.pkl- Complete calibration dataoutput/calibration_summary.json- Human-readable summaryoutput/camera_matrix.txt- Camera matrixcalibrated_images/- Undistorted images
Use: use_calibrated_camera.py
- Load calibration data automatically
- Apply undistortion to live camera feed
- Note: Shows purple IR dots when camera device = 0, normal when device = 1
Choose your IR control method:
- Shows purple IR dots from emitter
- Basic IR visibility control
- Device switching (0 = dots, 1 = normal)
- Runs both normal and dotted modes
- Save options:
- Color images
- Depth images
- Both color + depth
- Native R200 camera control
- Runs both normal and colorful depth windows
- Full IR Control:
=== REALSENSE IR EMITTER CONTROL ===
Controls:
'1' - Turn IR emitter OFF
'2' - Turn IR emitter ON
'3' - Decrease laser power
'4' - Increase laser power
'c' - Show color stream only
'd' - Show depth stream
'b' - Show both streams
's' - Save current frames
'q' - Quit
- Laser Power Control: Available
- Enhanced Controls:
Controls:
'1' - Turn IR emitter OFF
'2' - Turn IR emitter ON
'3' - Decrease laser power
'4' - Increase laser power
'5' - Adjust exposure (reduce IR visibility)
'6' - Reset exposure
'c' - Color stream only
'd' - Depth stream only
'b' - Both streams
's' - Save frames
'q' - Quit
- Features: Brightness control + dual window display (normal + colorful depth)
├── saved_images/ # Captured images
├── saved_videos/ # Recorded videos
├── calibration_images/ # Checkerboard calibration images
├── calibrated_images/ # Undistorted output images
├── output/ # Calibration data files
│ ├── calibration_data.pkl
│ ├── calibration_summary.json
│ └── camera_matrix.txt
└── realsense_captures/ # IR control captures
| Action | Key | Available In |
|---|---|---|
| Save image/frame | s |
All scripts |
| Start/stop video | r |
Capture scripts |
| IR emitter OFF | 1 |
IR control scripts |
| IR emitter ON | 2 |
IR control scripts |
| Decrease laser power | 3 |
Advanced IR scripts |
| Increase laser power | 4 |
Advanced IR scripts |
| Adjust exposure | 5 |
Universal control |
| Color stream only | c |
Multi-stream scripts |
| Depth stream only | d |
Multi-stream scripts |
| Both streams | b |
Multi-stream scripts |
| Quit | q |
All scripts |
The purple dots you see are infrared structured light patterns:
- Purpose: Enable depth sensing and 3D reconstruction
- Control: Can be turned ON/OFF or power adjusted
- Device behavior:
- Device 0 = Shows IR dots
- Device 1 = Normal view (no visible dots)
-
Capture test images:
python realsense_r200_capture_image.py
-
Calibrate your camera:
python camera_calibration.py
-
Use calibrated camera:
python use_calibrated_camera.py
-
Control IR emitter:
python realsense_universal_control.py
opencv-python>=4.5.0
pyrealsense2>=2.50.0
numpy>=1.21.0- IR dots are normal behavior for depth cameras
- Different scripts offer varying levels of IR control
- Calibration significantly improves image quality
- Save options vary by script (color, depth, or both)