This Python-based computer vision project demonstrates basic image acquisition and RGB channel manipulation using OpenCV and Matplotlib. An image is captured from a webcam, converted from BGR to RGB color space, and individual RGB channels are visualized using NumPy slicing.
- Webcam image capture
- BGR to RGB color space conversion
- Red, Green, and Blue channel isolation
- Multi-plot visualization using Matplotlib
- Python
- OpenCV
- NumPy
- Matplotlib
├── src/ # Source code
│ └── webcam_rgb_channels.py # Main script
├── README.md # Project documentation
├── requirements.txt # Python dependencies
├── .gitignore # Git ignore rules
└── LICENSE # MIT License
- Clone the repository:
git clone https://github.com/muhammadhassan24560/opencv-webcam-rgb-channel-visualization.git
- Navigate to the project directory:
cd opencv-webcam-rgb-channel-visualization
- Install dependencies:
pip install -r requirements.txt
- Run the script:
python src/webcam_rgb_channels.py
- The script captures a single frame from the webcam.
- RGB channel slicing is performed using NumPy indexing.
- Matplotlib is used for visualization instead of OpenCV windows.
- Real-time video processing
- Image filtering (blur, edge detection)