Posts: 4
Threads: 1
Joined: Mar 2022
Reputation:
0
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
- Linux
Gimp version: 2.10
Using Gimp 2.10.30 on Windows 10 I have not been able to find a way to contract/expand an image along one axis in a way that would linearly depend on the position along the other axis and do nothing else.
The perspective tool apparently does not do the trick, because if I use it to create a trapezoid by contracting the bottom edge of the image horizontally, the content of the image also shifts vertically, and that is not the intention.
Perhaps I am missing something basic, but having spent quite some time experimenting with the available tools, I am still at a loss as to how to achieve this fairly simple effect.
Any advice would be greatly appreciated.
Posts: 1,133
Threads: 177
Joined: Sep 2018
Reputation:
113
Operating system(s):
- Windows (Vista and later)
Gimp version: 2.10
Posts: 231
Threads: 4
Joined: Jan 2019
Reputation:
17
Operating system(s):
- Windows (Vista and later)
- Linux
Gimp version: 2.10
Would the Unified Transform tool not do the job?
Posts: 4
Threads: 1
Joined: Mar 2022
Reputation:
0
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
- Linux
Gimp version: 2.10
03-03-2022, 05:10 PM
(This post was last modified: 03-03-2022, 05:14 PM by Esko.)
Thanks for your replies.
However, I have already tried those. It seems to me that the Perspective, Unified Transform, and Handle Transform tools all more or less share the same underlying functionality that has been packaged slightly differently. They all behave in a like manner, which does not really apply to this case.
If the Shear tool allowed itself to be defined using non-parallel edges and included a one-directional scaling functionality, that would be of help. Unfortunately, that is not the case.
Posts: 7,109
Threads: 155
Joined: Oct 2016
Reputation:
1,003
Operating system(s):
Gimp version: 2.10
Depends on the image, in Gimp a possibility is the g'mic plugin and interactive warp.
A better bet is not Gimp, Krita has a grid deform that will keep the vertical spacing.
example: https://i.imgur.com/VAQZ9M5.jpg
Posts: 4
Threads: 1
Joined: Mar 2022
Reputation:
0
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
- Linux
Gimp version: 2.10
03-03-2022, 08:22 PM
(This post was last modified: 03-03-2022, 09:57 PM by Esko.)
Thanks, I will have a look at those.
Edit: Yes, indeed. It seems that I will be able to use Krita for what I need.
Posts: 6,303
Threads: 271
Joined: Oct 2016
Reputation:
560
Operating system(s):
Gimp version: 2.10
There is my ofn-trapeze-transform script:
But as you can see, a problem with this type of transform is that straight lines aren't kept straight.
The script is also quite slow.
Posts: 4
Threads: 1
Joined: Mar 2022
Reputation:
0
Operating system(s):
- Windows Vista or 7, 8, 10 (64-bit)
- Linux
Gimp version: 2.10
Yes, that is a very nice and clear demonstration.
Perhaps I could explain how my need arises. I am manually stitching together a very large scanned document (The game board for the old board game Civilization by Avalon Hill, which I later plan to attach to some plywood for personal use). I am doing the piecewise scanning at 1200 dpi using an Epson Perfection v850 Pro scanner so that I can capture enough detail to perfectly align the individual scans, at least in theory. In addition to some shearing, the scanner systematically introduces a small but clearly observable trapezoidal distortion, which I need to correct, and thus my need.
In reality, it is difficult to know for certain whether the distortion is a two-dimensional perspective distortion or a one-dimensional trapezoidal distortion. I guess that both could be possible, or it could be a mix, depending on how the distortion arises in the scanning process. And in the end, after applying Median Blur to even out the original screen printing dots, it may make little practical difference which correction method is used, but it is nice to have both available. Initially at least, I would like to try and correct the distortion just along one dimension with a minimal effect on the image along the other, and see how that works out.
Krita seems to be able to natively handle the rather large scan files nicely, while the g'mic plugin also mentioned above is much too slow and unwieldy. A slow script would most likely be equally impractical.
At any rate, this project will be lengthy, slow, and fraught with challenges, and may never come to fruition. The ongoing first step is just to get the scan files aligned as well as possible. The more I try to use an excessively perfectionist approach in the beginning, the more confidently I can move on.
Posts: 7,109
Threads: 155
Joined: Oct 2016
Reputation:
1,003
Operating system(s):
Gimp version: 2.10
Quote: ...snip...In addition to some shearing, the scanner systematically introduces a small but clearly observable trapezoidal distortion, which I need to correct, and thus my need.
Now there is a coincidence This thread
https://www.gimp-forum.net/Thread-Compen...-a-scanner
Ofnuts is the one to ask.
Posts: 1,501
Threads: 68
Joined: May 2021
Reputation:
167
Operating system(s):
Gimp version: 2.10
03-08-2022, 11:52 AM
(This post was last modified: 03-08-2022, 12:05 PM by PixLab.)
(03-08-2022, 10:40 AM)rich2005 Wrote: Quote: ...snip...In addition to some shearing, the scanner systematically introduces a small but clearly observable trapezoidal distortion, which I need to correct, and thus my need.
Now there is a coincidence This thread
https://www.gimp-forum.net/Thread-Compen...-a-scanner
Ofnuts is the one to ask.
What a coincidence!
When I read Esko's comment about the scanner I thought exactly the same thing
@Esko, Ofnuts just put out a new script to fix scans' distortions (link on the rich2005's post above )
|