Scripts Reference
This document lists all available setup and run scripts for the 3D-Cam project.
Setup Scripts
These scripts create a virtual environment and install all dependencies:
Windows
setup_venv.bat- Batch file setup script (double-click or run from command prompt)setup_venv.ps1- PowerShell setup script
Linux/Raspberry Pi
setup_venv.sh- Bash setup script
Run Scripts
These scripts automatically set up the virtual environment (if needed) and run the programs:
Windows Batch Files (.bat)
visualize_3d.bat- Run 3D visualization tooldetect_pairs.bat- Run pair detection and trackingcapture_windows.bat- Run video capture (Windows)smooth_tracks.bat- Run track smoothing toolcalibrate_scale_windows.bat- Run image calibration (Windows version)calibrate_video.bat- Run video calibrationplot_z_histogram.bat- Run Z height histogram
Windows PowerShell (.ps1)
visualize_3d.ps1detect_pairs.ps1capture_windows.ps1smooth_tracks.ps1calibrate_scale_windows.ps1- Run image calibration (Windows version, PowerShell)calibrate_video.ps1plot_z_histogram.ps1
Linux/Raspberry Pi (.sh)
visualize_3d.sh- Run 3D visualization tooldetect_pairs.sh- Run pair detection and trackingcapture_raspi.sh- Run video capture (Raspberry Pi)smooth_tracks.sh- Run track smoothing toolcalibrate_scale_raspi.sh- Run image calibration (Raspberry Pi version)calibrate_video.sh- Run video calibrationplot_z_histogram.sh- Run Z height histogram
Usage
First Time Setup (Linux/Raspberry Pi)
# Make all scripts executable (one-time setup)
chmod +x *.sh
# Run any program (note the ./ before the script name)
./visualize_3d.sh
Why ./ and chmod +x?
./is required - Linux needs this to run scripts in the current directorychmod +xmakes files executable - only needed once per file- See Linux Basics for detailed explanation
First Time Setup (Windows)
Just double-click any *.bat file, or run from command prompt:
visualize_3d.bat
Or use PowerShell:
.\visualize_3d.ps1
What the Run Scripts Do
- Check if virtual environment (
venv/) exists - If not, run the setup script to create it and install dependencies
- Activate the virtual environment
- Run the Python program
Notes
- The run scripts are designed to be user-friendly - just double-click or run them
- They handle all setup automatically
- You can still use the setup scripts manually if you prefer
- The virtual environment is created once and reused for all programs