Principal Component Analysis for video compression
This repository contains code for implementing Principal Component Analysis (PCA) for video compression. PCA is a technique used for reducing the dimensionality of data while preserving most of its variance, and it is based on the Singular Value Decomposition (SVD).
This project focuses on the classic 1878 video 'Sallie Gardner at a Gallop'. The idea is to showcase the efficiency of PCA in reducing data size while retaining essential information, in a visual way.
- Some Octave or MATLAB familiarity
- Basic understanding of PCA and SVD (see for example my linear algebra course)
- Octave Installation guide
- JupyterLab Installation guide
-
Clone or Download the Repository:
- Open a terminal or command prompt.
- Clone the repository using
git clone [repository URL]
. Replace[repository URL]
with the actual URL of the repository.
-
Prepare Frame Files:
- Navigate to the
AlternativeFrameSets
folder in the cloned repository. - Place your own frame files (in JPEG format, one for each frame of the video). The repository already includes some frame sets for experimentation.
- Navigate to the
-
Open and Run the Notebook:
- Open JupyterLab by running
jupyter lab
in your terminal or command prompt. - In JupyterLab, navigate to the repository directory and open
VidPCA.ipynb
.
- Open JupyterLab by running
We welcome contributions! Feel free to submit pull requests with more examples
This project is licensed under the MIT License - see the LICENSE file for details.