A collection of computer-graphics and computer-vision labs in Python, progressing
from raster primitives and 3D projections to OpenCV image processing and YOLO object
detection. Real-time rendering is done with OpenGL/GLUT through the shared graphics
module; image work uses OpenCV, NumPy and Matplotlib.
| Lab | Topic |
|---|---|
1-lab |
Calculation strategies โ scalar vs. sequential/composed matrix pipelines |
2-lab |
Spatial transforms โ axonometric projection, custom rotation, layered drawing |
3-lab |
Raster algorithms โ Bresenham lines, vertical intersection, contour extraction |
4-lab |
Vector graphics โ least-squares fitting, painter's algorithm, orthogonal projection |
5-lab |
Fractals โ Sierpinski carpet and a recursive fractal tree |
6-lab |
OpenGL/GLUT โ interactive 3D bearing model |
7-lab |
OpenCV โ image transforms and histograms |
8-lab |
Image segmentation โ Otsu thresholding, k-means, Roberts cross |
9-lab |
Object detection โ YOLOv3 on highway-traffic video (OpenCV DNN) |
control-task |
3D face model with plane-normal back-face culling |
- Python with NumPy and
mathfor the geometry - PyOpenGL (GLUT) for real-time rendering via the local
graphicsmodule - OpenCV (
cv2) and Matplotlib for image processing and visualization
Each lab is self-contained โ run its main.py from inside the lab directory:
cd 8-lab
python main.pyDependencies: pip install numpy opencv-python matplotlib PyOpenGL PyOpenGL_accelerate.
Lab 9 additionally needs the YOLOv3 weights/config placed under 9-lab/model/.