Project Setup Guide » History » Version 3
Nathanael Muin JUSTIN, 01/09/2025 02:02 PM
| 1 | 2 | Nathanael Muin JUSTIN | > h2. [[Team Members]] | [[Meeting Documentation]] | [[The Wiki]] | [[User Manual]] | [[Functional & Non-Functional Requirements]] | [[Math Document]] | [[UML Diagrams]] | [[Results]] |
|---|---|---|---|
| 2 | |||
| 3 | 1 | Nathanael Muin JUSTIN | h1. Project Setup Guide |
| 4 | 3 | Nathanael Muin JUSTIN | |
| 5 | ------------------------------------------------------------ |
||
| 6 | |||
| 7 | h1. Setting Up the Project |
||
| 8 | |||
| 9 | h2. Prerequisites |
||
| 10 | |||
| 11 | *Operating System:* |
||
| 12 | * Recommended: Mac OS. |
||
| 13 | * The code should generally run on Windows or Linux as well, provided Python 3.x is installed. |
||
| 14 | *Python Version:* |
||
| 15 | * You need Python 3.x (e.g., 3.8 or newer). |
||
| 16 | *Dependencies:* |
||
| 17 | * NumPy (version 2.2.0) |
||
| 18 | * OpenCV-Python (version 4.10.0.84) |
||
| 19 | * Python-Dotenv (version 1.0.1) |
||
| 20 | * You can install them via: |
||
| 21 | <pre> |
||
| 22 | pip install numpy==2.2.0 opencv-python==4.10.0.84 python-dotenv==1.0.1 |
||
| 23 | </pre> |
||
| 24 | |||
| 25 | h2. Project Folder Structure |
||
| 26 | |||
| 27 | A typical folder layout: |
||
| 28 | <pre> |
||
| 29 | . |
||
| 30 | ├── run.sh |
||
| 31 | ├── main.py |
||
| 32 | ├── image_configuration.py |
||
| 33 | ├── image.py |
||
| 34 | ├── image_configuration.env |
||
| 35 | └── lib/ |
||
| 36 | └── ... |
||
| 37 | </pre> |
||
| 38 | * *main.py:* The main entry point; orchestrates loading configs, applying masks, and displaying the image. |
||
| 39 | * *image_configuration.py:* Retrieves environment variables (e.g., file paths, projector distances). |
||
| 40 | * *image.py:* Reads the image and applies the overlap mask. |
||
| 41 | * *image_configuration.env:* Stores environment variables (SIDE, DISTANCE_BETWEEN_PROJECTOR_CM, etc.). |
||
| 42 | * *run.sh:* Shell script to run the project (optional but convenient). |
||
| 43 | |||
| 44 | |||
| 45 | h1. Step-by-Step Installation & Configuration |
||
| 46 | |||
| 47 | h2. Clone or Download the Repository |
||
| 48 | |||
| 49 | # Clone the repository (if using Git): |
||
| 50 | <pre> |
||
| 51 | git clone https://github.com/your-username/your-project.git |
||
| 52 | </pre> |
||
| 53 | Or download the project folder from your source (ZIP download, etc.) and unzip it locally. |
||
| 54 | # Navigate into the project directory: |
||
| 55 | <pre> |
||
| 56 | cd your-project |
||
| 57 | </pre> |
||
| 58 | |||
| 59 | h2. Install Dependencies |
||
| 60 | |||
| 61 | Ensure Python 3.x is available, then install the required libraries: |
||
| 62 | <pre> |
||
| 63 | pip install numpy==2.2.0 opencv-python==4.10.0.84 python-dotenv==1.0.1 |
||
| 64 | </pre> |
||
| 65 | (If you have a virtual environment, make sure it’s activated before installing.) |
||
| 66 | |||
| 67 | h2. Prepare the Configuration File |
||
| 68 | |||
| 69 | # Locate or create the file named image_configuration.env. |
||
| 70 | # Set the following environment variables: |
||
| 71 | <pre> |
||
| 72 | SIDE=left |
||
| 73 | IMAGE_FILE_PATH=/path/to/your/image.jpg |
||
| 74 | DISTANCE_BETWEEN_PROJECTOR_CM=100 |
||
| 75 | PROJECTION_WIDTH_CM=200 |
||
| 76 | |||
| 77 | # SIDE: which side of the image you are projecting (left or right). |
||
| 78 | # IMAGE_FILE_PATH: path to the .jpeg or .png image. |
||
| 79 | # DISTANCE_BETWEEN_PROJECTOR_CM: distance between your two projectors, in centimeters (x). |
||
| 80 | # PROJECTION_WIDTH_CM: total width of the final projection, in centimeters (y). |
||
| 81 | </pre> |
||
| 82 | # Save the file in the same directory as main.py. |