Stopping at any point of the process

Scan Tailor specific announcements, releases, workflows, tips, etc. NO FEATURE REQUESTS IN THIS FORUM, please.

Moderator: peterZ

Post Reply
irmar
Posts: 2
Joined: 31 Mar 2024, 19:43
E-book readers owned: Pocketbook plus 360, Sigil on my PC
Number of books owned: 2000
Country: Greece

Stopping at any point of the process

Post by irmar »

Hello everyone!
I'm new here, I registered because I wanted to ask this question. I browsed many posts but none was "exactly" what I needed.
In few words, I'd like a way to be able to use only select processes, and be able to jump to "Output" even without completing all the steps. Which is not possible. Whenever you click on "Output" you get an error message saying that you first have to run batch from the selecting or from the adding margins job.

Let me explain the context. I mostly repair digital books related to crafts (crochet, knitting, jewellery making, embroidery...). These books typically have many pages with text and pictures, but also many pages with only pictures, which take up the whole page (no margins). But even the ones with margins, or the ones with only text, they have page numbers very near the corner which I don't want to obliterate.

So what I want is: sometimes to split pages, always to deskew, and then finish! No selecting content boxes, no adding extra margins everywhere. (And not changing my dpi if possible, because I have to constantly remember to change it back to what it was, which is super-annoying, sometimes one forgets)


It would be lovely if the program included the option to pick and choose which job you want to do, and only do that one or those two or three or whatever. But since there is no such thing, I spent more than two hours yesterday trying to find a workaround.
For the selecting, after spending time changing the selected area page by page, manually, I found the option to disable it for all pages. And that's fine for most pages. Not ideal, since some do need a minimum of tweaking. The ideal would be to be able to put "select the whole page" by default and then be able to tweak it if needed. Now you only have the option to let it select a very small portion (it's a hassle to enlarge it line by line) or the option to not select. Anyway, I can live with that, so I'm going to put this as default so from next time I won't have to worry about it.
But margins? No way. I put all margins to zero, for all pages, but in ST there are TWO different margins: an internal and an outside one. Since I had already selected the whole page as useful area, there was no inside margin. But the margin added to my pages was still there, without any visible option to remove it. Therefore, the output was still augmented with an added margin I hadn't asked for.
And don't tell me that it's because the page size wasn't consistent. It couldn't be that. It wasn't a bad scan, just that they scanned both pages and some were a bit crooked. But the size was consistent. Maybe a millimetre here and there because of the deskewing. But this was NOT a couple of millimetres, it was a thick margin, the same for every page, around 1,2 cm. wide. All around.
I spent so much time on this and now I have to use Photoshop to crop all the pages again. This book has around 200 pages so it will be long. I am considering scrapping all the ST output and splitting the pages one by one by hand on Photoshop - I think it will take me less time than cropping the margin off. Not to mention converting back to .jpg as they were before passing through ST. That's too much work, for no reason.
But it's a pity, because ST is awesome for the splitting part, out of 200 pages I only had to manually correct 4-5, and for the deskewing only about 10, which is great.

Is there a way that I didn't think of?
I read all the manuals and many posts here, with their answers, but didn't find anything, so I'd be grateful for any tips.

Thank you in advance!

(The picture below is of the original file. I couldn't upload the ST output as it was too large.)
Attachments
48-49.jpg
cday
Posts: 454
Joined: 19 Mar 2013, 14:55
Number of books owned: 0
Country: UK

Re: Stopping at any point of the process

Post by cday »

irmar wrote: 01 Apr 2024, 05:39 I spent so much time on this and now I have to use Photoshop to crop all the pages again. This book has around 200 pages so it will be long. I am considering scrapping all the ST output and splitting the pages one by one by hand on Photoshop - I think it will take me less time than cropping the margin off. Not to mention converting back to .jpg as they were before passing through ST. That's too much work, for no reason.
Welcome!

I can't help with Scan Tailor, I only ever had a quick look at the original version, but unless someone has a useful insight you are probably correct that there isn't a solution to your immediate problem. There are, or have been, several alternative developments of the original Scan Tailor though that you might check if you haven't already done so.

As you have Photoshop, my suggestion would be to look at creating several simple macros to perform individual steps of your workflow, to assign them to keyboard shortcuts, and to then to step though your images applying the particular steps required for each image. I used that method to perform enhancements selectively when I first started book scanning a fair while ago, and using the built-in macro recorder it was reasonably easy with a little practice.

Another possibility might be to investigate doing some or maybe all of the processing you require using batch files that call ImageMagick or NConvert. Overall, some ingenuity probably needed to develop a workflow that might start with your original images, the pages output from Scan Tailor or only the unsatisfactory pages, and possibly use a combination of methods to produce satisfactory output as easily as possible!
irmar
Posts: 2
Joined: 31 Mar 2024, 19:43
E-book readers owned: Pocketbook plus 360, Sigil on my PC
Number of books owned: 2000
Country: Greece

Re: Stopping at any point of the process

Post by irmar »

cday wrote: 01 Apr 2024, 07:34 As you have Photoshop, my suggestion would be to look at creating several simple macros to perform individual steps of your workflow, to assign them to keyboard shortcuts, and to then to step though your images applying the particular steps required for each image.
When you say macros, you mean Photoshop Actions? I create actions and use them quite often, but it's only for when all the images need the same fix. For instance, make all grayscale, or make all a certain width, or add a border to all of them, or make all of them a bit more luminous, or they are all yellowish and they need the same filter adjustment, or all need to be rotated by 90°. Batch treatment.
But here I am a bit hesitant, because pages are not all exactly the same, the white border added by Scan Tailor might be by 1-2 mm wider or narrower in each one because, as I said, the deskewing.
Of course it's worth trying with the narrowest instance, and then I'd have to only crop the ones that still have some.

I tried to research the software you mentioned at the end. These both work with command line in MS-Dos and I'm not very confident with that, but from a (very) superficial look at their batch features, the ones that would be useful to me are also be found in Photoshop - right?

Thanks for spending time to think of my predicament, I appreciate it! :)

Below an example of some work I did some time ago and that I'm somewhat proud of. This was how the page looked like:
The Art of Fair Isle (109) a - as it was-sm.jpg
and here it is after some TLC. Not 100% perfect by any means, but 100% usable if you actually want to knit that sweater.
The Art of Fair Isle (109) b - corrected-sm.jpg
cday
Posts: 454
Joined: 19 Mar 2013, 14:55
Number of books owned: 0
Country: UK

Re: Stopping at any point of the process

Post by cday »

irmar wrote: 01 Apr 2024, 20:31
cday wrote: 01 Apr 2024, 07:34 As you have Photoshop, my suggestion would be to look at creating several simple macros to perform individual steps of your workflow, to assign them to keyboard shortcuts, and to then to step though your images applying the particular steps required for each image.
Yes, when I started scanning I had a copy of Photoshop CS2, not sure what macros were called then or whether they have since been renamed.
I create actions and use them quite often, but it's only for when all the images need the same fix. For instance, make all grayscale, or make all a certain width, or add a border to all of them, or make all of them a bit more luminous, or they are all yellowish and they need the same filter adjustment, or all need to be rotated by 90°. Batch treatment.

But here I am a bit hesitant, because pages are not all exactly the same, the white border added by Scan Tailor might be by 1-2 mm wider or narrower in each one because, as I said, the deskewing.

Of course it's worth trying with the narrowest instance, and then I'd have to only crop the ones that still have some.
Understood, no easy answers, my suggestion was more that you might select a macro that was best suited to a particular image, so here for example perhaps alternative actions for different borders.
I tried to research the software you mentioned at the end. These both work with command line in MS-Dos and I'm not very confident with that, but from a (very) superficial look at their batch features, the ones that would be useful to me are also be found in Photoshop - right?
In general yes, I have limited command line experience myself, but ImageMagick I understand does support some very sophisticated operations although probably not any that would be useful to you.

So mainly brain storming ideas that might possibly be useful, with in the absence of any other suggestions the thought that a small library of custom actions might be your best way forward if it would be practical to step through a folder of images, or a folder of selected images needing some attention.

Anyone else have any ideas, particularly for some way to interrupt Scan Tailor operation after the initial operations have been completed? You could always test, for example, closing the program part way through and examine the images created at that point!!

Edit:

Which of the Scan tailor versions are you using and have you looked at the others? Unlikely that another version will support the option you need, but I see that there is a Universal version that allows some customisation, although probably only of the detailed settings used in each stage of processing.
Konos93a
Posts: 198
Joined: 19 Sep 2016, 10:00
E-book readers owned: kobo aura,kindle 1,kindle pw3,pocketbook inkpad 2
Number of books owned: 3000
Country: greece

Re: Stopping at any point of the process

Post by Konos93a »

που σαι;
a little off topic if u ever gonna build a scanner to capture with no moving image check this video
https://www.youtube.com/watch?v=mR2TQOHEDYc

now about your issue . u ask things that scan tailor dev teams dont do it anymore but u can also ask in github .dont expect much things
(there so many github branches and commits that advanced is a different programm than experimental version)

i suggest u to also look abbyfinereader version 12 . (final pdf results have smaller size than other versions)
check crop , deskew ,
straighter text lines (this command is very difficult to reproduce in python or a program)

then use scantailor any version and then djvusmall and then again abbyfineraer to edit.

https://github.com/ImageProcessing-Elec ... perimental here is 3 dudes who still deploy some stuff to edit colour images
and here the other version
i still use this https://github.com/4lex4/scantailor-adv ... 19.8.16_EA because seems simpler and the final sizes are smaller .
Post Reply