-
Notifications
You must be signed in to change notification settings - Fork 130
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: Dewarp before content selection #85
Comments
@Mister-Teatime say:
Or they can be separate steps of the complex "Transformation", if it is easier to implement them this way:
See also https://github.com/tibob/yasw , https://github.com/ImageProcessing-ElectronicPublications/yasw , trufanov-nok/scantailor-universal#67 , https://github.com/scantailor/scantailor/issues/317 . |
press pages on a flat surface of glass help you for better results .its something you cant avoid if you are a non-english reader (because english ocr had ridiculously good results ) reading b&w photo its the best way. https://www.youtube.com/watch?v=mR2TQOHEDYc use subs |
@konos93 say:
The scanning technique has been demonstrated very well, but not always (rather very rarely) you have to deal with a paper edition, more often you get someone’s scans in your hands. |
what about 2 surfaces of glass https://www.youtube.com/watch?v=n1ZKAbBjeJ0 check first 3 minutes |
sorry English is not my native language i understood what you said after i comment. yes its easy to scan your own books or the ones you find rather than change some one scans especially if they are not good digitalized very well. scanning is a difficult hobby. not very easy not very hard but it has its own difficulties |
@konos93 say:
And not my. ( https://translate.google.ru ) |
Sure, if you can get nice flat scans, that makes the processing easier -- but it takes time to set up, particularly the fancy 2-camera setup, and then it still takes longer to take the pictures themselves. I can set up a tripod, adjust settings on the camera and start shooting in less than 5 minutes, and then it's about 2 seconds per double-page, which is probably twice as fast as the method with a single glass pane, and a little faster than the 2-camera setup -- although I certainly admire the setup. I've seen professional book scanners of this type, and they're crazy expensive. However, I'm not doing this professionally, and highest quality is not my aim, either. I'm just trying to reduce the weight of my bookshelf by digitizing some books that I'll never read but might need sometimes to look something up. So the main aim is to have books readable, OCR to work well, and get small files. But all this still misses the point: If a feature to de-warp pages exists, then I think it should be applied at the point in the process where it is most useful. And I think that is before content selection. |
@konos93 said:
Agreed. I think there's a range of ambitions and abilities, and use cases, and usually I would be the sort of perfectionist who spends a month building a set up, then one minute per page to scan them, and another minute to post-process them ... and I've already done scans in this way, and they look really good. The content selection, page layout and picture selection all assume that the page and pictures are rectangular, so their automatic modes will often fail if that's not the case -- so dewarping first could really speed up the whole process. I've actually done a test where I simply selected the whole input image as content and only did the dewarping, then used the output from that in another scantailor project, and got results faster because all the automatic settings work so much better then -- but seems weird to me that you should need to go around twice in order to get the best use out of the dewarping tool. |
Maybe you should give a try to Scan Tailor Experimental. The dewrap function was moved to the 3rd stage, so apparently it has the functionality you want. It is not under development for very long time, but still very useful. |
2 camera 1500 pages per hour https://www.youtube.com/watch?v=n1ZKAbBjeJ0 600 pages 2 hours need till i start read on a Koreader ebook ,one smartphone camera https://www.youtube.com/watch?v=mR2TQOHEDYc 1100 pages per hour check first 3 min for both videos |
Thanks for the hint! That looks very useful. It's just a shame that with so many forks, I have to decide between multiprocessing and fancier settings (advanced), better user interface (universal), and "correct" workflow order. And Tulon states in that thread that he changed the architecture significantly, so I would assume that his changes would not be be trivial to translate into ST advanced. I'll definitely give the experimental fork a try |
This seems like a duplicate of #4 . |
I'm digitizing books which I'd rather not press flat against a scanner, which are much quicker digitized by means of setting up decent light, lying them flat on the floor and pointing a good camera straight down at them.
This causes quite a bit of warping (particularly with softcovers or thicker books), which the dewarping algorithm deals with reasonably well.
However, I have to select the pages, their content and in some cases pictures beforehand, and Scantailor assumes that most of these things were rectangular (which they only become after dewarping ...). For image maps, I can use polygons instead, for content selection I can adjust content boxes accoprdingly, but these workarounds take significantly more time than if the contents were nicely aligned, and sometimes the box around content will have corners off-page, despite ample page margins. Significantly warped content also seems to throw the automatic content selection off-balance, which means even more extra manual work.
This often makes me wish I could reverse the order of those steps, and do the dewarping first.
I'm not familiar with the code architecture (yet...?) but I would hope that it must be possible to change the order of processing steps to put dewarping before the content selection stage.
Proposed implementation( I'm not familiar with Scantailor's code structure, so I can only comment on what would make sense from a user's perspective -- so I accept that some of the following may not be practically realistic, or that there are smarter/faster ways to get a working implementation.):
My favourite implementation would be to bundle the dewarping with the deskewing step. It seems to me that the dewarp tool would be able to actually replace the "deskew" (i.e. rotation) function, as it can represent rotation, too. This might be overkill for users who really just need to rotate the contents a little, but since dewarping is already optional, it could stay optional, either following the rotation step, or optionally replacing it. ("deskew method: nothing | rotate | dewarp")
Thinking even one more step forward, since the dewarp tool can also represent pure rotation and perspective correction without warping, those could become different options for the same tool, rather than separate tools. "Rotation" would look similar to right now (sets one angle), adding the "Perspective" option would add a rectangular frame with all four corners movable (sets two additional angles for perspective), and activating the "Dewarp" option then allows users to deform the grid.
The text was updated successfully, but these errors were encountered: