Project

General

Profile

Actions

User Manual » History » Revision 8

« Previous | Revision 8/15 (diff) | Next »
Nathanael Muin JUSTIN, 01/09/2025 03:00 PM


Wiki | Team Members | Meeting Documentation | Functional & Non-Functional Requirements | Our Project | Project Setup Guide | Math Document | UML Diagrams | Results

User Manual

1. Introduction
This project demonstrates how to display and “mesh” an image across two adjacent projectors, producing one larger, seamless image. It does so by applying a “mask” to the overlapping region so that the final displayed image appears continuous. The code uses OpenCV and NumPy for image processing and relies on python-dotenv for reading configuration variables (e.g., image path, projector spacing) from a .env file.

2. System Requirements
  • Operating System: Mac OS (recommended/tested)
  • Python: 3.x (e.g., Python 3.9+)
  • Required Python Libraries:
    1. numpy==2.2.0
    2. opencv-python==4.10.0.84
    3. python-dotenv==1.0.1

Setup

Step 1: Configure the Environment
  • Locate the image_configuration.env file and adjust the settings if needed:
  • IMAGE_FILE_PATH: Path to the image you want to project.
  • SIDE: Set as either left or right to specify the projector's position.
  • DISTANCE_BETWEEN_PROJECTOR_CM: Distance between the two projectors in centimeters.
  • PROJECTION_WIDTH_CM: The total width of the projection area in centimeters​.
Step 2: Preparing the Code
  • Ensure the main.py script is in the working directory.
  • Ensure the required images (e.g., Left.jpg, Right.jpg) are properly placed as referenced in the code.

Configuration

  • Create/Edit Your .env File
    1. A sample image_configuration.env might look like this:
      SIDE=left
      IMAGE_FILE_PATH=/path/to/my_image.jpg
      DISTANCE_BETWEEN_PROJECTOR_CM=100
      PROJECTION_WIDTH_CM=200
      
  • Variables
  • SIDE
    1. Accepts left or right (which side of the projection this device is responsible for).
  • IMAGE_FILE_PATH
    1. Local path (absolute or relative) to your .png or .jpeg image.
  • DISTANCE_BETWEEN_PROJECTOR_CM
    1. The distance in centimeters between the two projectors (x).
  • PROJECTION_WIDTH_CM
    1. The total width of the final projection in centimeters (y).
      Make sure that image_configuration.env is placed in the same directory where it will be read by the code.

Running the Application

  1. Open a terminal in the project directory.
  2. Run the following command to execute the script:
    # ./run.sh
    
  3. The script will automatically:
    • Load the configuration from image_configuration.env.
    • Process the images using the settings provided.
    • Split and align the image for projection on two projectors.
  • Alignment: The software handles automatic alignment of the image sections for both projectors.
  • Projection Area: Adjust the position of the projectors to ensure proper overlapping at the image boundaries.

Troubleshooting

Issue 1: Misaligned Images
  • Ensure the DISTANCE_BETWEEN_PROJECTOR_CM and PROJECTION_WIDTH_CM are accurate.
  • Verify both projectors are calibrated and aligned physically.
Issue 2: Missing Libraries
  • Install the required libraries using:
    pip install -r requirements.txt
    
Issue 3: Image File Not Found
  • Verify that the image file path in image_configuration.env matches the image's location.

Updated by Nathanael Muin JUSTIN 4 months ago · 8 revisions