Project

General

Profile

Actions

Project Setup Guide » History » Revision 3

« Previous | Revision 3/7 (diff) | Next »
Nathanael Muin JUSTIN, 01/09/2025 02:02 PM


Team Members | Meeting Documentation | The Wiki | User Manual | Functional & Non-Functional Requirements | Math Document | UML Diagrams | Results

Project Setup Guide


Setting Up the Project

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:
    pip install numpy==2.2.0 opencv-python==4.10.0.84 python-dotenv==1.0.1
    

Project Folder Structure

A typical folder layout:
.
├── run.sh
├── main.py
├── image_configuration.py
├── image.py
├── image_configuration.env
└── lib/
    └── ...
  • 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).

Step-by-Step Installation & Configuration

Clone or Download the Repository

  1. Clone the repository (if using Git):
    git clone https://github.com/your-username/your-project.git
    

    Or download the project folder from your source (ZIP download, etc.) and unzip it locally.
  2. Navigate into the project directory:
    cd your-project
    

Install Dependencies

Ensure Python 3.x is available, then install the required libraries:

pip install numpy==2.2.0 opencv-python==4.10.0.84 python-dotenv==1.0.1

(If you have a virtual environment, make sure it’s activated before installing.)

Prepare the Configuration File

  1. Locate or create the file named image_configuration.env.
  2. Set the following environment variables:
    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).
    
  3. Save the file in the same directory as main.py.

Updated by Nathanael Muin JUSTIN 4 months ago · 3 revisions