Project

General

Profile

Project Setup Guide » History » Revision 3

Revision 2 (Nathanael Muin JUSTIN, 01/09/2025 01:49 PM) → Revision 3/7 (Nathanael Muin JUSTIN, 01/09/2025 02:02 PM)

> h2. [[Team Members]] | [[Meeting Documentation]] | [[The Wiki]] | [[User Manual]] | [[Functional & Non-Functional Requirements]] | [[Math Document]] | [[UML Diagrams]] | [[Results]] 

 h1. Project Setup Guide 

 ------------------------------------------------------------ 

 h1. Setting Up the Project 

 h2. Prerequisites 

 *Operating System:* 
 * Recommended: Mac OS. 
 * The code should generally run on Windows or Linux as well, provided Python 3.x is installed. 
 *Python Version:* 
 * You need Python 3.x (e.g., 3.8 or newer). 
 *Dependencies:* 
 * NumPy (version 2.2.0) 
 * OpenCV-Python (version 4.10.0.84) 
 * Python-Dotenv (version 1.0.1) 
 * You can install them via: 
 <pre> 
 pip install numpy==2.2.0 opencv-python==4.10.0.84 python-dotenv==1.0.1 
 </pre> 

 h2. Project Folder Structure 

 A typical folder layout: 
 <pre> 
 . 
 ├── run.sh 
 ├── main.py 
 ├── image_configuration.py 
 ├── image.py 
 ├── image_configuration.env 
 └── lib/ 
     └── ... 
 </pre> 
 * *main.py:* The main entry point; orchestrates loading configs, applying masks, and displaying the image. 
 * *image_configuration.py:* Retrieves environment variables (e.g., file paths, projector distances). 
 * *image.py:* Reads the image and applies the overlap mask. 
 * *image_configuration.env:* Stores environment variables (SIDE, DISTANCE_BETWEEN_PROJECTOR_CM, etc.). 
 * *run.sh:* Shell script to run the project (optional but convenient). 


 h1. Step-by-Step Installation & Configuration 

 h2. Clone or Download the Repository 

 # Clone the repository (if using Git): 
 <pre> 
 git clone https://github.com/your-username/your-project.git 
 </pre> 
 Or download the project folder from your source (ZIP download, etc.) and unzip it locally. 
 # Navigate into the project directory: 
 <pre> 
 cd your-project 
 </pre> 

 h2. Install Dependencies 

 Ensure Python 3.x is available, then install the required libraries: 
 <pre> 
 pip install numpy==2.2.0 opencv-python==4.10.0.84 python-dotenv==1.0.1 
 </pre> 
 (If you have a virtual environment, make sure it’s activated before installing.) 

 h2. Prepare the Configuration File 

 # Locate or create the file named image_configuration.env. 
 # Set the following environment variables: 
 <pre> 
 SIDE=left 
 IMAGE_FILE_PATH=/path/to/your/image.jpg 
 DISTANCE_BETWEEN_PROJECTOR_CM=100 
 PROJECTION_WIDTH_CM=200 

 # SIDE: which side of the image you are projecting (left or right). 
 # IMAGE_FILE_PATH: path to the .jpeg or .png image. 
 # DISTANCE_BETWEEN_PROJECTOR_CM: distance between your two projectors, in centimeters (x). 
 # PROJECTION_WIDTH_CM: total width of the final projection, in centimeters (y). 
 </pre> 
 # Save the file in the same directory as main.py.