0

I have a scanned image (let's assume 300 DPI and grayscale). It's a scanned page, on which the printing was perhaps not perfectly straight to being with, plus the scanning itself may have introduced some non-uniform stretching in different areas. On the other hand, the original content does have a lot of guidelines for straightness - literal lines: Underlined text and some tables covering a lot of the page.

So, the different lines are not pairwise-parallel (or pairwise-perpendicular when it's a vertical vs horizontal line); thus whenever I use one of these lines to "straighten" the image out by rotation - other lines become not-parallel with their relevant axis.

I'm sure that academic literature has methods for straightening out such lines; but - are there tools I could use today (on a Linux or Windows PC) to specify which lines need to become straight, and have the image "straightened" non-uniformly based on the proximity of each pixel to different guidelines?

Even more complicated version: Same question, but the guidelines themselves are not merely rotated, but slightly curved, i.e. when we think of the guidelines as paths, which one specifies using points along them.

5
  • See this possibly related question with answers here. Is it possible to uncurl an image of a handwritten book page
    – Billy Kerr
    Oct 15 '21 at 18:46
  • @BillyKerr: The questions are definitely closely-related, but - none of the answers there provides a proper solution. They suggest manual work with you playing around with warp points. I want to specify features of the result, and have the warp worked out automatically. Also, all the answers there mention tools which are focused on the circumference of the image.
    – einpoklum
    Oct 15 '21 at 19:36
  • I don't know of anything that can do this automatically. Sorry. Maybe try a different approach such as OCR (Optical Character Recognition) software.
    – Billy Kerr
    Oct 15 '21 at 20:03
  • 2
    After a bit of searching - found a possible answer here
    – Billy Kerr
    Oct 15 '21 at 20:14
  • @BillyKerr: That looks very promising, thanks!
    – einpoklum
    Oct 15 '21 at 21:27
0

In Photoshop, there is a tool called "Transform Warp" (or "Warp Transform").

For GIMP, I think an equivalent is the "n-point deformation tool."

These sound like they might fulfill your requirement.

Any automated tool would probably lean on something like that after some form of registration/recognition pass to determine how to deform the image.

1
  • Nope, that doesn't do what I want. I mean, it is a manual tool whose action can correlate with what I want, but that's really n ot it.
    – einpoklum
    Oct 15 '21 at 19:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.