Metadata-Version: 2.1
Name: scan-image-slicer
Version: 2.0.2
Summary: A tool for detecting and slicing images
Keywords: scanner,scan,slice,slicer,image,photo,digitize
Author-email: hiemb <highonember@gmail.com>
Requires-Python: >=3.10
Description-Content-Type: text/markdown
Classifier: Development Status :: 4 - Beta
Classifier: Operating System :: OS Independent
Classifier: License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)
Classifier: Environment :: Console
Classifier: Intended Audience :: End Users/Desktop
Classifier: Topic :: Scientific/Engineering :: Image Recognition
Classifier: Topic :: Scientific/Engineering :: Image Processing
Classifier: Topic :: Multimedia :: Graphics :: Capture :: Scanners
Requires-Dist: pillow
Requires-Dist: pillow_lut
Requires-Dist: FreeSimpleGUI
Requires-Dist: numpy
Requires-Dist: opencv-python
Requires-Dist: imutils
Requires-Dist: ConfigArgParse
Requires-Dist: tqdm
Requires-Dist: PyYAML
Requires-Dist: ruamel.yaml
Requires-Dist: scipy
Project-URL: Home, https://github.com/hiemb/scan_image_slicer
Project-URL: Source, https://github.com/hiemb/scan_image_slicer

Scan-Image-Slicer (SCIS)
---
**Scan-Image-Slicer (SCIS)** is a versatile tool designed for detecting and slicing images from scanned documents or photographs.

### Modes:
SCIS offers four distinct modes of operation, each tailored to specific tasks:

#### 1. Count Mode
- Use this mode to count the slices within images without performing any further processing. Ideal for estimating the space needed for the image slices.

#### 2. Test Mode
- Shows a GUI for fine-tuning image detection parameters. Used for adjusting detection sensitivity and minimum/maximum slice size.

#### 3. Preview Mode
- Shows a GUI for previewing sliced images and adjusting filtering options. Allows users to customize filters to their preferences before slicing.

#### 4. Slice Mode
- Initiates the slicing process, creating individual images from slices and saving them to the designated output folder. Supports multicore processing  for efficient batch slicing.

Suggested Workflow
---

#### 1. Scan items (photos, paper clippings etc..):
- Begin by scanning your items, preferably in large batches to streamline the process. Leave some space between the items for easier detection. Save the scans in one of the following file formats: **JPEG, PNG, WEBP, BMP or TIFF**.
- Name the scans however you like as **SCIS does not re-use the file names**.
- Take advantage of the auto-rotate option (**--auto-rotate**), which automatically rotates slices 90 degrees clockwise/counter-clockwise if the slice width is smaller than its height.
- Organize your scans into folders within the designated input directory. For example, if you have wedding photos, create a folder named "Weddings" inside the input folder and place your scans there.
- **The naming of sliced images is derived from the folder structure within the input directory**. Each subfolder adds a layer to the naming scheme. Alternatively, you can place scanned images directly into the input folder, and they will be named generically.

#### 2. Install SCIS:
- Install latest Python with TkInter support.
- Install SCIS using pip (or pipx).

        pip install scan-image-slicer
- **Run the app once to create the default configuration file.**

- Address missing input/output paths as prompted by editing the default config file.

#### 3. Test Mode:
- Use the test mode to fine-tune image detection. Remember to **save** your detection parameters.

        scan-image-slicer --test-mode --add-random 5

#### 4. Preview Mode:
- Utilize the preview mode to preview sliced images and adjust filtering options according to your preferences.

        scan-image-slicer --preview-mode --add-random 5

#### 5. Slice Mode:
- Initiate the slice mode to create images from slices and save them to the designated output folder.

        scan-image-slicer --slice-mode --add-all

#### 6. Additional Information:
- For more details on available options, refer to the configuration file or run the help command.

        scan-image-slicer --help

Examples:
---

#### Basic Usage:
- List all compatible images in the input folder showing image ID, name and size:

        scan-image-slicer --list-images

- Test image detection by counting the slices from 5 random images

        scan-image-slicer --count-mode --add-random 5

- Slice 5 randomly picked images and save the slices in WebP format:

        scan-image-slicer --slice-mode --add-random 5 --save-format webp

Further info:
---

List of command-line arguments with explanation on each [here](./COMMANDS.md).

