Skip to main content

A tool for detecting and slicing images

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.

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

scan_image_slicer-2.0.1.tar.gz (36.2 kB view details)

Uploaded Source

Built Distribution

scan_image_slicer-2.0.1-py3-none-any.whl (36.0 kB view details)

Uploaded Python 3

File details

Details for the file scan_image_slicer-2.0.1.tar.gz.

File metadata

  • Download URL: scan_image_slicer-2.0.1.tar.gz
  • Upload date:
  • Size: 36.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.31.0

File hashes

Hashes for scan_image_slicer-2.0.1.tar.gz
Algorithm Hash digest
SHA256 6a33f11c2c995bb1273bc760038bf42d913493704b14f2a6b1deccf62e213765
MD5 5e37a42f6531c7f96a143b4dbdaff906
BLAKE2b-256 4f2f2cfca5c5421aee1752402a277bf22a88a7e1c67a0635aeb162b02af0b33c

See more details on using hashes here.

File details

Details for the file scan_image_slicer-2.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for scan_image_slicer-2.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 3a35a2fdb9d24c59ddddd03048adf681d6be80f1b3e88f6b76c2e31b00026c9c
MD5 f427a461c14d8ed5058532a0441ecd3a
BLAKE2b-256 37080d93e8657650fdb1ba15554f884d71cbd0951f664744cf370629c498226f

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page