Package: scan-image-slicer
Scan Image SlicerScan image slicer is a tool for detecting and separating images from a scanned image (or any image). The designed use case is for digitizing old photos, paper clippings and the like.Workflowcreate an empty input folder for the scanned images(optional) create a folder structure inside the input folder that is then used for naming and organizing the output imagescreate an empty output folder (the folder structure will be mirrored here from the input folder)scan as many images as you like and place/organize them inside the input folderconfigure the tool using the config file and command line argumentsslice and diceInstallation using pippip install scan-image-slicerRequirements with pip installPython 3.6+pipUsing the toolscan-image-slicer [options]The easiest way to use the tool is to first edit the default config file and then override the settings when needed with command line arguments, which are explained below.you need to run the tool once for the default config file to be createdlocation on Windows: Documents -> ScanImageSlicer -> config.yamllocation on Linux: ~/.config/ScanImageSlicer/config.yamllocation on MacOS: ~/Library/Application Support/ScanImageSlicer/config.yamllocation on Other: ~/.ScanImageSlicer/config.yamlHelp-h,--helpDisplay helpQuickstart-skip,--skip-confirmskip the confirm start questionModesOnly one mode can be used at a time.-test,--test-modeTest mode shows you the scanned image with added colored rectangles that depict detected and ignored images.blue rectangles are images that would be savedpurple rectangles are images that would be ignored-pre,--preview-modePreview mode shows you the individual sliced images one by one but does not save them unless you press the S key. Toggle filters with the F key.-slice,--slice-modeSlice mode slices each scanned image on the task list and saves the slices to the output folder. Use it after you have finalized your settings.Paths-i PATH,--input PATHinput folder for the scanned images-o PATH,--output PATHoutput folder for the sliced images-c FILE,--config FILEpath to the custom config fileImage detection & viewing-white 0..255,--white-threshold 0..255(default is 230)The white threshold value is used for image detection. Tweak it to match your scanner's background white color (the space between images). If possible, bump up your gamma value slightly in your scanning software for easier image detection.-min N,--minimum-size N(default is 3)Minimum size is used to discard too small images that are likely false positives. The value is in % of the total scanned image area.-view N,--view-height N(default is 800)The height of the image inside the image viewer (won't be upscaled).Scaling-scaleF N,--scale-factor Nscale sliced image using a scale factor value-scaleW N,--scale-width Nscale sliced image using a new width value-scaleH N,--scale-height Nscale sliced image using a new height valueOnly one method of scaling can be used at a time. All methods preserve the aspect ratio. A value of zero means the option is disabled.Filters & fixes-filtD 0..5,--filter-denoise 0..5(default is 1)Remove scanner noise from the sliced image. Higher values take more time. A value of zero means the option is disabled.-filtB N > 1.0,--filter-brightness N > 1.0(default is 1.0)Add brightness to the sliced image with values above 1.0.-filtC N > 1.0,--filter-contrast N > 1.0(default is 1.0)Add contrast to the sliced image with values above 1.0.-filtG N > 1.0,--filter-gamma N > 1.0(default is 1.0)Add gamma correction to the sliced image with values above 1.0.-pfix 0..89,--perspective-fix 0..89(default is 0)Add perspective correction to the sliced image. The given value is the maximum allowed 'tilt' of the sliced image in degrees. A value of zero means the option is disabled.File format-save JPEG|PNG|WEBP,--save-format JPEG|PNG|WEBP(default is PNG)-png 0..9,--png-compression 0..9(default is 3)Note: higher compression levels take more time per sliced image.-jpeg 0..100,--jpeg-quality 0..100(default is 95)-webp 1..101,--webp-quality 1..101(default is 90)Note: quality level of 101 is lossless.List information-listS,--list-scanslist scanned images name and ID-listF,--list-filesave scanned images name and ID as a text file at default config dir-listT,--list-taskslist added tasks-listC,--list-cmdslist given commandsAdd/Remove images to/from the task list-addA,--add-alladd all scanned images-addID [ID ...],--add-id [ID ...]add scanned images using IDs eg. 1 2 3-addN N,--add-new Nadd N amount of newest scanned images by creation time (ctime)-addO N,--add-old Nadd N amount of oldest scanned images by creation time (ctime)-addR N,--add-random Nadd N amount of random scanned images-remID [ID ...],--remove-id [ID ...]remove scanned images using IDs eg. 1 2 3Infobar-info,--show-infobarshow infobar on preview mode-fontS N,--font-scale Ninfobar font scale(default is 1.0)