Posts: 6,340
Threads: 272
Joined: Oct 2016
Reputation:
563
Operating system(s):
Gimp version: 2.10
(03-04-2022, 01:34 PM)PixLab Wrote: (03-04-2022, 11:54 AM)Krikor Wrote: (03-01-2022, 08:24 PM)Ofnuts Wrote: It's not very hard either. You just have to make a careful scan and create a path with anchors at the right places.
Allow me to disagree with that...
I agree with @Krikor, I read the manual... twice (second time very slowly) and still don't picture out the full process
I think it's the way you wrote the manual, IMHO you give too much info while explaining, thus I got lost.
Also you speak about portrait mode but images and paths are horizontal in your example (thus my second read), should the path not be vertical on these landscape images?
I'll try tomorrow when I will successfully decode the whole thing in simple steps,
something like
step 1 scan that paper,
step 2 put upside down that paper and re-scan it,
step 3 import in GIMP
step 4 in the layer stack, which one I put on top? the second scan?
...
step 99 save as xcf as we can use it as template for future scan
My examples are crops of portrait orientation images.
Posts: 1,046
Threads: 87
Joined: Aug 2018
Reputation:
83
Operating system(s):
- Windows (Vista and later)
Gimp version: 2.10
(03-04-2022, 03:50 PM)Ofnuts Wrote:
- A 7px error isn't bad if you are scanning a 600PPI (my scanner is 76px). If you used a lower definition, it's proportionally worse (7px @300PPI would translate to 14px@6OOPPI
- What is the picture above? The anchors are not on the lines, so it is after you ran the "fix" part?
In the previous attempt, the image skewed during printing. I scanned the image without noticing this deviation (0.16º).
So I redid the process again, but this time I scanned with a resolution of 600ppi.
Generating an output of : Scanner map 600PPI (5, 0.513, 0.551)
But I still don't quite understand what was done or how to take advantage of it.
I guess I'll have to read the manual again...
.....
Samj Portable - Gimp 2.10.28 - Win-10 /64.
Posts: 6,340
Threads: 272
Joined: Oct 2016
Reputation:
563
Operating system(s):
Gimp version: 2.10
(03-04-2022, 07:54 PM)Krikor Wrote: (03-04-2022, 03:50 PM)Ofnuts Wrote:
- A 7px error isn't bad if you are scanning a 600PPI (my scanner is 76px). If you used a lower definition, it's proportionally worse (7px @300PPI would translate to 14px@6OOPPI
- What is the picture above? The anchors are not on the lines, so it is after you ran the "fix" part?
In the previous attempt, the image skewed during printing. I scanned the image without noticing this deviation (0.16º).
So I redid the process again, but this time I scanned with a resolution of 600ppi.
Generating an output of : Scanner map 600PPI (5, 0.513, 0.551)
But I still don't quite understand what was done or how to take advantage of it.
I guess I'll have to read the manual again...
Forgetting the script for a while so if you do:
- Scan image upright ->Image1
- Scan image rotated ->Image2
- Load image1 in Gimp
- Load image2 as layer over image1
- Rotate image2 layer
- Set image2 layer to Difference mode
- Find best alignment
You never get more that 5px of distance between the two images? If so, you scanner is good enough and doesn't need the fix.
Otherwise, the vertical bands in your displace map aren't expected, the resulting map should look like a uniform gradient (even if looking up close it is a sequence of gradients):
Your anchors could be off by one pixel but with a max delta of 5px this is relatively important.
PS: What paper did you scan? The numbers in your displace map says it is based on a 14mm grid?
Posts: 1,046
Threads: 87
Joined: Aug 2018
Reputation:
83
Operating system(s):
- Windows (Vista and later)
Gimp version: 2.10
(03-05-2022, 09:18 AM)Ofnuts Wrote: Forgetting the script for a while so if you do:
- Scan image upright ->Image1
- Scan image rotated ->Image2
- Load image1 in Gimp
- Load image2 as layer over image1
- Rotate image2 layer
- Set image2 layer to Difference mode
- Find best alignment
You never get more that 5px of distance between the two images? If so, you scanner is good enough and doesn't need the fix.
Otherwise, the vertical bands in your displace map aren't expected, the resulting map should look like a uniform gradient (even if looking up close it is a sequence of gradients):
Your anchors could be off by one pixel but with a max delta of 5px this is relatively important.
PS: What paper did you scan? The numbers in your displace map says it is based on a 14mm grid?
I don't know if I managed to be precise in centering the anchors on the horizontal path.
I have doubts about how to actually find the value for the offset parameter, I hope I did it correctly.
- I opened a new image in Gimp, selecting the A4 300 ppi template.
- I used a script to divide the sheet into 15 equal parts, creating guides.
- I used another script to turn these Guides into paths.
- Stroke this path (I think with the value of 1 or 3, I don't remember well).
- Then print this image.
So I followed (or I think I followed) the instructions in ofn-scanner-fix.html
.....
Samj Portable - Gimp 2.10.28 - Win-10 /64.
Posts: 6,340
Threads: 272
Joined: Oct 2016
Reputation:
563
Operating system(s):
Gimp version: 2.10
(03-05-2022, 12:40 PM)Krikor Wrote: (03-05-2022, 09:18 AM)Ofnuts Wrote: Forgetting the script for a while so if you do:
- Scan image upright ->Image1
- Scan image rotated ->Image2
- Load image1 in Gimp
- Load image2 as layer over image1
- Rotate image2 layer
- Set image2 layer to Difference mode
- Find best alignment
You never get more that 5px of distance between the two images? If so, you scanner is good enough and doesn't need the fix.
Otherwise, the vertical bands in your displace map aren't expected, the resulting map should look like a uniform gradient (even if looking up close it is a sequence of gradients):
Your anchors could be off by one pixel but with a max delta of 5px this is relatively important.
PS: What paper did you scan? The numbers in your displace map says it is based on a 14mm grid?
I don't know if I managed to be precise in centering the anchors on the horizontal path.
I have doubts about how to actually find the value for the offset parameter, I hope I did it correctly.
- I opened a new image in Gimp, selecting the A4 300 ppi template.
- I used a script to divide the sheet into 15 equal parts, creating guides.
- I used another script to turn these Guides into paths.
- Stroke this path (I think with the value of 1 or 3, I don't remember well).
- Then print this image.
So I followed (or I think I followed) the instructions in ofn-scanner-fix.html
Not too good, because you are adding the accuracy of your printer to the mix (not very trustable for end-user printers, especially inkjet ones). When you use off-the-shelf ruled paper the accuracy is the accuracy of the rules pattern which is normally very good.
The offset is the distance from your first anchor to the edge of the paper (which should normally be the edge of the scan, since to ensure verticality you have to tuck the side of the sheet against the side of the glass). But if you scanned a 21cm sheet with rules 14mm apart, the first rule in on the edge so offset should be 0? Or is that some printer margin?
Posts: 1,046
Threads: 87
Joined: Aug 2018
Reputation:
83
Operating system(s):
- Windows (Vista and later)
Gimp version: 2.10
(03-05-2022, 02:18 PM)Ofnuts Wrote: Not too good, because you are adding the accuracy of your printer to the mix (not very trustable for end-user printers, especially inkjet ones). When you use off-the-shelf ruled paper the accuracy is the accuracy of the rules pattern which is normally very good.
The offset is the distance from your first anchor to the edge of the paper (which should normally be the edge of the scan, since to ensure verticality you have to tuck the side of the sheet against the side of the glass). But if you scanned a 21cm sheet with rules 14mm apart, the first rule in on the edge so offset should be 0? Or is that some printer margin?
The image I generated with the Gimp when printed had margins applied by the printer, even though I set the margins to zero.
The graph paper I have isn't cut properly, so there's no way to make a perfect fit parallel to the edge of the scanner.
I could try with a small notebook paper, inverting the sheet 90º while scanning.
.....
Samj Portable - Gimp 2.10.28 - Win-10 /64.
Posts: 6,340
Threads: 272
Joined: Oct 2016
Reputation:
563
Operating system(s):
Gimp version: 2.10
(03-07-2022, 07:45 PM)Krikor Wrote: (03-05-2022, 02:18 PM)Ofnuts Wrote: Not too good, because you are adding the accuracy of your printer to the mix (not very trustable for end-user printers, especially inkjet ones). When you use off-the-shelf ruled paper the accuracy is the accuracy of the rules pattern which is normally very good.
The offset is the distance from your first anchor to the edge of the paper (which should normally be the edge of the scan, since to ensure verticality you have to tuck the side of the sheet against the side of the glass). But if you scanned a 21cm sheet with rules 14mm apart, the first rule in on the edge so offset should be 0? Or is that some printer margin?
The image I generated with the Gimp when printed had margins applied by the printer, even though I set the margins to zero.
The graph paper I have isn't cut properly, so there's no way to make a perfect fit parallel to the edge of the scanner.
I could try with a small notebook paper, inverting the sheet 90º while scanning.
The problem with printers (especially house inkjet ones) is that you can have a small angle, so your vertical lines aren't. If you create a correction from that it will add angle in the opposite direction.
|