Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Flattening a scanned book
#28
Quote:What I did was the following:

01- I reproduced the steps presented by denzjos in post #18;  ( With this I created 3 paths: Top, Bottom and guides vectors )

02- I duplicated the paths (Top and Bottom);
03- This left me with 5 paths - Top, Bottom, Top copy, Bottom copy and Guides vectors;
04 - I applied the Replicate path by affine mapping plugin, between the paths: Top and Top copy, generating the Top replicate path;
05- I applied the Repliacte path by affine mapping plugin between the Bottom and Bottom copy paths, thus creating the Bottom replicate path.
06- Finally, I applied the script provided by rich2005 - Distortion Correction Between Paths  (on the Top repliaction and Bottom repliation paths) ... and voilà


(12-16-2023, 08:51 AM)denzjos Wrote: I tried the script with bended paths but it seems only working with straight paths. On my configuration the script is working fine (windows10 / gimp 2.10.36). I discovered the script is only working with straight paths parts this way (I could be wrong) :
Make a curved path on top and bottom.
Make a guides grid : Image / Guides / Grid  (use only vertical guides - max 17)
Delete the horizontal guide (because the minimal value for guides in the guide grid script is 1)   
Image / Guides / Guides To Path
Make guides invisible : Shift+CTRL+T
Top path : Tools / Chopping / Chop path by another path (chop curved path with converted guides)
Bottom path : Tools / Chopping / Chop path by another path (chop curved path with converted guides)
Edit / Join Strokes
Now using the script I got an error.
When I want to use the script this way I only miss a script / plugin to straighten the chopped bended path parts. Exist such a script / plugin?

(12-18-2023, 10:49 AM)denzjos Wrote: Krikor , thanks for the information but I can't get the handles from the the nodes symmetric. In your example the path layer 'top|chop' and 'top|chop copy' have a handle that point to the left direction. The path layer 'Path Top' have symmetric handles on the nodes. I can not reproduce this with the 'Replicate path by affine mapping'. After using the plugin the handles still pointing to the left and are not symmetric.


denzjos,

If you look closely, you will see that the handles automatically became symmetrical after Edit - Join Strokes

Just compare, before applying Join Strokes, the handles are facing to the left.

However....

I retraced my steps, as stated in post #21, but to my surprise I couldn't get the script to work correctly; only those error messages appeared as a result of using the script.

So I spent a lot of time retracing all the steps and looking for something I had done and not noted.

One of the things I did but didn't comment on, because I thought it hadn't made any difference, was to apply Edit - Reverse strokes twice on the same paths, trying to reorient the path nodes from left to right. (but then I thought it didn't make sense, so I didn't comment).

In short, even following my steps several times I was unable to get the script to work.

But when I get the .xcf (the same one I sent as an attachment in my previous post) I can make the script work perfectly.

This means that I was missing something in reproducing my own steps.

Fortunately I was able to make the script work again and curve the text depending on the paths created.

I started to create the curve with the paths so that the ends go beyond the margins of the documents.
In other words, go beyond the vertical paths on the sides.

   

With this, when the paths are chopped and before being joined, I remove these extreme "ends", leaving the second and penultimate nodes as the first and last respectively. This applies to both the upper and lower paths.

Also, I believe that the Alpha channel layer makes a difference!
Then add Alpha channel to the layer where the script will be applied.

It is necessary to ensure that all nodes are aligned (top and bottom).

Perhaps due to 'snap to guides' being active, I had the top node at position (-0.0, 94.1) while the bottom node was at (0.0, 94.1).

Only after correcting the top node to (0.0, 94.1) did the script work.

   

In other words, there are many small details, which, if not followed, prevent the correct execution of the script if curved paths are used, instead of straight ones (as per rich2005's example).
   


Attached Files
.xcf   NoName0002.xcf (Size: 680.69 KB / Downloads: 86)
                               .....
Samj PortableGimp 2.10.28 - Win-10 /64.
Reply


Messages In This Thread
Flattening a scanned book - by antoni gual - 12-13-2023, 10:38 AM
RE: Flattening a scanned book - by denzjos - 12-13-2023, 11:42 AM
RE: Flattening a scanned book - by antoni gual - 12-13-2023, 01:28 PM
RE: Flattening a scanned book - by PixLab - 12-13-2023, 02:18 PM
RE: Flattening a scanned book - by antoni gual - 12-13-2023, 09:27 PM
RE: Flattening a scanned book - by PixLab - 12-14-2023, 07:01 AM
RE: Flattening a scanned book - by rich2005 - 12-14-2023, 12:21 PM
RE: Flattening a scanned book - by antoni gual - 12-14-2023, 12:22 PM
RE: Flattening a scanned book - by denzjos - 12-14-2023, 05:45 PM
RE: Flattening a scanned book - by Krikor - 12-14-2023, 05:50 PM
RE: Flattening a scanned book - by PixLab - 12-14-2023, 11:43 PM
RE: Flattening a scanned book - by Krikor - 12-15-2023, 01:38 PM
RE: Flattening a scanned book - by PixLab - 12-15-2023, 03:40 PM
RE: Flattening a scanned book - by rich2005 - 12-15-2023, 04:38 PM
RE: Flattening a scanned book - by PixLab - 12-15-2023, 05:05 PM
RE: Flattening a scanned book - by Krikor - 12-15-2023, 05:45 PM
RE: Flattening a scanned book - by PixLab - 12-16-2023, 02:14 AM
RE: Flattening a scanned book - by denzjos - 12-16-2023, 08:51 AM
RE: Flattening a scanned book - by Krikor - 12-16-2023, 04:33 PM
RE: Flattening a scanned book - by denzjos - 12-16-2023, 05:07 PM
RE: Flattening a scanned book - by Ofnuts - 12-16-2023, 08:46 PM
RE: Flattening a scanned book - by Krikor - 12-16-2023, 06:50 PM
RE: Flattening a scanned book - by denzjos - 12-17-2023, 09:39 AM
RE: Flattening a scanned book - by Krikor - 12-17-2023, 04:07 PM
RE: Flattening a scanned book - by denzjos - 12-18-2023, 10:49 AM
RE: Flattening a scanned book - by Ofnuts - 12-18-2023, 12:00 PM
RE: Flattening a scanned book - by denzjos - 12-18-2023, 12:41 PM
RE: Flattening a scanned book - by Krikor - 12-18-2023, 02:31 PM
RE: Flattening a scanned book - by denzjos - 12-18-2023, 04:10 PM
RE: Flattening a scanned book - by denzjos - 12-18-2023, 07:08 PM
RE: Flattening a scanned book - by Krikor - 12-18-2023, 08:08 PM
RE: Flattening a scanned book - by Ofnuts - 01-04-2024, 04:06 PM
RE: Flattening a scanned book - by denzjos - 01-04-2024, 06:51 PM
RE: Flattening a scanned book - by Krikor - 01-04-2024, 12:53 PM

Forum Jump: