- Subject: Computer Vision (Visión Artificial)
- Degree: Bachelor's Degree in Computer Engineering (Grado en Ingeniería Informática)
- Institution: Escuela Politécnica, Universidad de Extremadura (UEx), Spain
- Lecturer: Prof. Dr. Pilar Bachiller Burgos
This repository contains the complete set of practical assignments developed for the Computer Vision course at the University of Extremadura. The coursework spans fundamental digital image processing, spatial filtering, geometric transformations, multi-view feature matching, and modern deep learning-based semantic segmentation techniques.
All applications feature interactive Graphical User Interfaces (GUIs) engineered using PyQt5 / Qt Designer integrated with OpenCV and NumPy for real-time video stream processing and image analysis.
.
├── prac0/ # Practice 0: Introduction to OpenCV & PyQt5 Integration
├── prac1/ # Practice 1: Image Processing & BGR Color/Histogram Adjustments
├── prac2/ # Practice 2: Spatial Filtering & Linear Transformations
├── prac3/ # Practice 3: Multi-View Person Matching & Occlusion Detection
├── prac4/ # Practice 4: Deep Learning Semantic Image Segmentation (FCN & ENet)
├── .gitignore # Git ignore rules for datasets, binary videos, and build artifacts
├── LICENSE # MIT Open Source License
└── README.md # Repository documentation (British English)
- Objective: Establish the development environment connecting OpenCV frame capture with PyQt5 windowing systems.
- Key Concepts: Camera stream reading, QImage/QPixmap conversion, real-time widget rendering.
- Objective: Develop an interactive application for digital image enhancements and color space adjustments.
- Features:
- Independent BGR channel modification.
- Brightness and contrast dynamic scaling.
- Real-time image histogram computation and display.
- Objective: Apply linear spatial filtering, pixel-level transformations, and morphological operations.
- Features:
- Custom filter kernels (Gaussian, Laplacian, Sobel, Sharpening).
- Morphological operations (Erosion, Dilation, Opening, Closing).
- Dynamic operation execution order pipeline managed via graphical dialogs (
operOrderForm.ui).
- Objective: Establish unique person-to-person matches across different camera angles in a multi-camera system using datasets from the CMU Panoptic Studio.
-
Key Methodology:
-
Joint Window Descriptors: For each person detected (provided via JSON body joint annotations), square image windows (
$31 \times 31$ to$41 \times 41$ pixels) are extracted around key skeletal joints (neck, shoulders, elbows, knees, eyes, etc.). - HSV Histogram Similarity: Color histograms over the Hue (H) and Saturation (S) planes are calculated to maintain illumination invariance.
- Pairwise Person Similarity:
-
Joint Window Descriptors: For each person detected (provided via JSON body joint annotations), square image windows (
-
Global Combination Optimization: Instead of greedy per-person matching, the algorithm computes all permutation combinations across the correspondence matrix
$M_c$ to select the global configuration maximizing total similarity:
-
Occlusion Detection: Evaluates bounding box intersection-over-area ratios (
$\frac{a_C}{a_1} > \tau$ ) to filter out occluded individuals prior to global matching, preventing erroneous matches.
-
Objective: Perform pixel-wise semantic image segmentation using deep neural network architectures loaded via OpenCV's
dnnmodule. -
Architectures Supported:
-
FCN (Fully Convolutional Network): Caffe model (
fcn.prototxt,fcn.caffemodel), trained on 21 categories (PASCAL VOC standard). Preprocessed with unnormalized BGR input ($500 \times 330$ ) and mean subtraction. -
ENet (Efficient Neural Network): Torch model (
enet-model.net), trained on 20 categories (Cityscapes / indoor-outdoor standard). Preprocessed with RGB normalized input ($1024 \times 512$ , scaled by$\frac{1}{255}$ ).
-
FCN (Fully Convolutional Network): Caffe model (
-
Features:
-
Category Filtering: Interactive selection dialog (
classes_dialog.ui) enabling users to isolate specific semantic classes (e.g. person, car, road). - Weighted Blending: Adjustable overlay opacity blending category color maps with original frames:
-
Category Filtering: Interactive selection dialog (
- Background Replacement (Video Matting Extension): Replaces background pixels (Category 0 / unselected categories) with custom background images loaded at runtime.
- Python 3.8 or higher
- Qt5 / PyQt5
Install all required libraries using pip:
pip install numpy opencv-python PyQt5 matplotlib shapelyEach practice directory contains a self-contained execution script. Navigate to the desired practice directory and run:
# Example: Launching Practice 3 (Multi-View Matching)
cd prac3
python3 proyVA.py
# Example: Launching Practice 4 (Semantic Segmentation)
cd prac4
python3 proyVA.pyAlternatively, executing shell scripts (where available):
./run.shThis repository is licensed under the MIT License.
- Author: Computer Science Student, Escuela Politécnica, Universidad de Extremadura (UEx)
- Academic Guidance: Prof. Pilar Bachiller Burgos
- Dataset Acknowledgements: CMU Panoptic Studio Dataset (Perception Lab, Carnegie Mellon University)