0

Problem statement: I want to scan an image at maximum scanner resolution (6400 dpi on a Epson V850). This is partly possible from the Epson scanner "professional mode" in the software, provided that the scan area is limited to 21000 x 30000 pixels.

I'm ok with this limitation, I could simply scan small squares of the full area (at max resolution), then "stitch" them together afterwards.

I want to automate this, so I'm attempting to use pyinsane / SANE.

The issue is: the maximum resolution I can set is 1200, as you can see from the properties reported by pyinsane

  • dps_optical_xres=6400 ([])
  • dps_optical_yres=6400 ([])
  • resolution=300 ([50, 75, 100, 125, 150, 175, 200, 225, 250, 275, 300, 325, 350, 375, 400, 425, 450, 475, 500, 525, 550, 575, 600, 625, 650, 675, 700, 725, 750, 775, 800, 825, 850, 875, 900, 925, 950, 975, 1000, 1025, 1050, 1075, 1100, 1125, 1150, 1175, 1200])
  • xres=300 ([50, 1200, 1])
  • yres=300 ([50, 1200, 1])
  • optical_xres=6400 ([])
  • optical_yres=6400 ([])

So the question is: how do I override this setting so I am able to scan small areas at 6400dpi?

Again, using the EPSON Scan software I can scan at 6400dpi, provided the scanned area is small.

I know the limit exists for memory reasons, but it doesn't feel right that I can't adjust scan area and resolution, just like the Epson software allows to do.

The problems with using the Epson software is A) I can't automate the process, and B) I can't select an arbitrary scan area in terms of top-left to bottom-right coordinates.

I'm surprised how there is no definite answer on this yet. Let's try to have one once and for all, for posterity!

MC-8
  • 65
  • 2
  • 9

2 Answers2

1

First of all, beware Pyinsane2 is not maintained anymore. Its replacement is Libinsane. (I'm the author of both).

The maximum of 1200dpi comes of the constraint on xres and yres: xres=300 ([50, 1200, 1]) and yres=300 ([50, 1200, 1]) (resolution is just an alias to those 2 options created by Pyinsane2).

Based on what you say, my guess is that you can get this constraint to go to higher values by setting first the scan area to a smaller one (see tl-x, tl-y, br-x, br-y). However after that, I don't think Pyinsane2 will reload the constraint on resolution correctly and so the max will remain 1200dpi (whereas Libinsane should reload it correctly).

By the way, just to be pedantic, if you have options like dps_optical_xres or optical_xres, you are not using Pyinsane2 on top of Sane (Linux), but Pyinsane2 on top of WIA2 (Windows).

  • Thanks @Jerome for this, I've since then tried out Libinsane. Yes you are right that was WIA2 on Windows. I'm going to try your suggestion (setting a smaller area then see if the resolution constraint is reloaded in libinsane). If it works and I can stay well within the 21000 x 30000 limit it would be awesome! – MC-8 May 11 '21 at 18:01
  • Unfortunately it doesn't look like that setting a small scan area results in the resolution to change past 1200 (see full output of the "scan.py" example modified to add the various instructions. To be fair there are a fair amount of warnings and errors which may or may not be responsible for this. The scanner does work, and scan.py using the acceptable resolution produce a correct image. output of scan.py when I tried to change the resolution, and the xres/yres parameters: https://justpaste.it/3l1iw https://justpaste.it/6ozqk Default parameters scan: https://justpaste.it/8ejf6 – MC-8 May 12 '21 at 09:47
  • Unfortunately, it looks like a limitation from the WIA2 driver of your scanner. This wouldn't be the first time a manufacturer makes it possible to do more with their own application than with the generic TWAIN or WIA2 driver. There is however a fairly simple way to make sure of that: if you try scanning with the application "Windows Scan and Fax" (it uses WIA2 too AFAIK), can you reach a resolution of 6400dpi ? – Jerome Flesch May 12 '21 at 22:02
  • Also, can you enable the info and debug logs in scan.py and send me the output please ? (just remove the `if lvl <= (...)` in the `ExampleLogger`) – Jerome Flesch May 12 '21 at 22:07
  • Windows Scan and Fax doesn't reach 6400dpi either. I've also tried many other softwares (well, they all leverage either TWAIN / WIA2 anyway) with the same result. It looks like I can only go past 1200dpi with EPSON's software (which sadly has no command line interface). I don't have access to the scanner at the moment but will send these output as soon as I have! – MC-8 May 17 '21 at 13:31
0

For Linux there is ImageScan v3 with command line option.

I didn't try ImageScan v3 but scanimage (sane) on Ubuntu. 3200 ppi worked without problems.

  • Your answer could be improved with additional supporting information. Please [edit] to add further details, such as citations or documentation, so that others can confirm that your answer is correct. You can find more information on how to write good answers [in the help center](/help/how-to-answer). – Community Jan 09 '22 at 16:36