A tool for detecting and slicing images from a scanned image.
Project description
Scan-Image-Slicer (SCIS)
Scan-Image-Slicer (SCIS) is a versatile tool designed for detecting and slicing images from scanned documents or photographs. Whether you're digitizing old photos, processing paper clippings, or working with large batches of images, SCIS offers efficient and customizable solutions to streamline your workflow.
Modes:
SCIS offers four distinct modes of operation, each tailored to specific tasks and requirements:
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. Supports multicore processing for faster performance.
2. Test Mode
- Enables a graphical user interface (GUI) for fine-tuning image detection parameters. Useful for adjusting detection sensitivity and minimum/maximum slice size to achieve optimal results.
3. Preview Mode
- Provides 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 for optimal results.
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 the first (ID = 0) image:
scan-image-slicer --count-mode --add-id 0 --white-threshold 235 --minimum-size 5 --maximum-size 40
-
Slice 5 randomly picked scanned images and save the slices in WebP format:
scan-image-slicer --slice-mode --add-random 5 --save-format webp --threads 4
Further info:
List of command-line arguments with explanation on each here.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file scan_image_slicer-2.0.0.tar.gz
.
File metadata
- Download URL: scan_image_slicer-2.0.0.tar.gz
- Upload date:
- Size: 36.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | cdd464726fad31b9f87a3365d7a3833c7535ac686ed294cb4c2e7c0750305a08 |
|
MD5 | efd277ab2c7e3dce55568d74c979db94 |
|
BLAKE2b-256 | cd41af72dad5b8c24dce8b7f005604822629664a159e74e05333bdd3dbb584e0 |
File details
Details for the file scan_image_slicer-2.0.0-py3-none-any.whl
.
File metadata
- Download URL: scan_image_slicer-2.0.0-py3-none-any.whl
- Upload date:
- Size: 35.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.31.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | dad7949e71ad82d88a7259a95c38823a785ec3bbea42678c5cd0e4e0660748de |
|
MD5 | 250939d3d978a70f8840af76d1bbee7b |
|
BLAKE2b-256 | 3a14bcb49e426b641bb4112687a1b83786262dc7c6d5f7fc6949b16f1eb780f6 |