From cc786484d71a1da91ae0abfc819a942b0ef19d73 Mon Sep 17 00:00:00 2001 From: Andreas Fahrecker Date: Wed, 20 Mar 2024 07:07:58 +0100 Subject: [PATCH] Improved and Updated README.md --- README.md | 31 +++++++++++++++++++++++++++++-- 1 file changed, 29 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 55d63ee..a9c9ee9 100644 --- a/README.md +++ b/README.md @@ -37,14 +37,41 @@ pip install -r requirements.txt ``` ## Usage -Run the script with the path to the image you want to split as an argument: +### As Windows Executable +You can run the program with either the path to a single image you want to split or a directory containing multiple images. + +#### Single Image Mode ```sh -python main.py path_to_your_image.jpg +main.exe --image_path path_to_your_image.jpg +``` +The program will create two new images in the "left" and "right" directories with the suffixes _left and _right added to the original file name. + +#### Directory Mode +```sh +main.exe --directory path_to_your_directory ``` +The program will iterate over all images in the directory, and for each image, it will create two new images in the "left" and "right" directories with the suffixes _left and _right added to the original file name. + +### As a Python Script +You can run the script with either the path to a single image you want to split or a directory containing multiple images. + +To split a single image: + +```sh +python main.py --image_path path_to_your_image.jpg +``` The script will create two new images in the "left" and "right" directories with the suffixes _left and _right added to the original file name. +To split all images in a directory: + +```sh +python main.py --directory path_to_your_directory +``` + +The script will iterate over all images in the directory, and for each image, it will create two new images in the "left" and "right" directories with the suffixes _left and _right added to the original file name. + ## License This project is licensed under the terms of the MIT license.