Experiment 2 - Color Detection
pip install opencv-python(Need to install python3 yourself, skip if already installed)cd OPENCV# Open OPENCV packagesudo python3 ./color_detection.py# Run Python file
Terminal display:

At this point, the Linux system will display the camera's real-time video. We need to test the buttons under the window focus. The effect is as follows:

The code implements:
- Multi-color detection using HSV color space
- Pre-defined color ranges for red, green, blue, yellow, white, black
- Custom color detection via trackbar controls
- Contour detection and bounding box drawing
- Image saving functionality
- Window size adjustment controls
