03-05-2022, 02:18 PM
(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?