Giter Site home page Giter Site logo

Comments (6)

prokoudine avatar prokoudine commented on July 28, 2024 1

Turns out, you can use Deskew for this use case as well, if you crop close enough first :)

2019-01-23 04-31-37

from gimp-deskew-plugin.

prokoudine avatar prokoudine commented on July 28, 2024

Well, two things :)

  1. Deskew was designed to handle scanned documents, not photos.

  2. You will have a lot more luck with GIMP 2.10.6 where you can easily fix rotation with the Measure tool. Just drag a line across the border of your image, then click 'Straighten' button in tool's options dock.

from gimp-deskew-plugin.

pr3sidentspence avatar pr3sidentspence commented on July 28, 2024

Ahhh, thanks,

I discovered deskew because it was supported by another Gimp plugin (script, to be precise) DivideScannedImages.

Yeah, we've done that in the past, but we're talking tens of thousands of images. I need automation. The good news is I think I've managed to get it working with ImageMagick scripts.

from gimp-deskew-plugin.

jdl51 avatar jdl51 commented on July 28, 2024

pr3sidentspence,

Ahhh, thanks,

I discovered deskew because it was supported by another Gimp plugin (script, to be precise) DivideScannedImages.

Yeah, we've done that in the past, but we're talking tens of thousands of images. I need automation. The good news is I think I've managed to get it working with ImageMagick scripts.

How did you manage to get it working using ImageMagick scripts. I'm facing the same issue with deskew not working on GIMP 2.10 in linux. I'm trying to archive a bunch of scanned family photos and need to straighten thousands of photos after using "Adams divide scanned images" script.

from gimp-deskew-plugin.

pr3sidentspence avatar pr3sidentspence commented on July 28, 2024

How did you manage to get it working using ImageMagick scripts.

Sorry I didn't see this sooner. See this PowerShell script: https://gist.github.com/pr3sidentspence/84af7b1eca2a0f1ae416dab2950c5b83 . Specifically, the function rotator. It expects to find an image in a subdirectory called "small" (created by the function makeSmalls). Doing gap detection and deskewing on giant images takes a long time, so I create smaller versions first, get the results from ImageMagick then apply those results to the full original. Occasionally, IM would give me results that couldn't be correct (in my case anyway) and I would throw out those results and not deskew that image.

function rotator {
Write-Host Determining if $_ needs straightening
$rotation = & magick small$_ -background $colour -deskew 20% -print %[deskew:angle]\n null:
if ($rotation -lt $rotThresh) {
& magick small$_ -background "$colour" -rotate $rotation small$_
& magick singles$_ -background "$colour" -rotate $rotation singles$_
Write-Host $rotation degrees of rotation applied
}
else {
Write-Host the $rotation value was over the rotation threshold of $rotThresh
}
}

from gimp-deskew-plugin.

pr3sidentspence avatar pr3sidentspence commented on July 28, 2024

PS- It sounds like it's too late for you, but that script will allow one to scan a number of photos at once, and automatically separate, deskew, and crop (leaving some of the background showing) the photos. The only caveat is that there can only be a single column of photos on the scanner. I didn't code a hard limit on the number of photos there could be, but if they get small enough the math will stop working.

from gimp-deskew-plugin.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.