Jump to content

correcting the deformation of a scanned page book


Recommended Posts

Hi everyone,

I'm looking for a mean to correct (with Paint.net of course) the deformation in a scanned book page.

I already googled in search of algorithms in order to build a plug-in or a codelab dll but with no succes.

Can s.o. help ?

Thanks in advance.

Link to comment
Share on other sites

What does the deformation look like? The problem is, depending on the scanner and the condition of the scanned page, there is really no single way to fix all deformations that could be there. It would have to be an incredibly intelligent (and therefore incredibly slow) algorithm to be able to account for most of the possible disfigurations.

If you post a screenshot, we can maybe give you advice for correcting that specific type of deformation, but it will by no means be an end-all solution.

If you don't really need an algorithm, and are only trying to fix a few pages, the better thing would be to post the examples in Questions & General Discussion, and we'll help you do it manually.

xZYt6wl.png

ambigram signature by Kemaru

[i write plugins and stuff]

If you like a post, upvote it!

Link to comment
Share on other sites

Do you mean you want to have a filter that tries to fix them automatically, or have some sort of interactive tool?

The first would be very hard (but necessary I guess if you have a lot of pages to fix).

The second would require some sort of mouse interaction with the image, which I don't think you can do in a PDN plug-in.

You also can't do much in PDN as it is as the only transformations currently supported are affine.

Link to comment
Share on other sites

Hi,

As requested i'm posting an example of image... this one is quite a bit exagerated but it shows very well the kind of problems i encoutered:


  • [*:w3o6wos4]Color correction in the curve of the page : i reduced it by substracting the gradient i extracted; but it's not my worst problem
    [*:w3o6wos4]Curvature correction on the border : i'm open to any procedure because none has - up to now - been good enough to recover this deformation. I also tried to find what algorithms are used in commercial programs but nothing usefull has come out.

So, if any procedure or algo can be usefull i'm open; of course, the best would a (semi-)automated plugin - i think it would imply calculus, aso. - but any other mean would be welcomed.

Thanks already for your help

13804_6bb6439c01d901545b0c39cd51d431d0

Link to comment
Share on other sites

I also tried to find what algorithms are used in commercial programs but nothing usefull has come out.

The "algorithm" used is to debind the book from its spine and scan each separate page, instead of pushing the book onto the scanning surface. As far as I know there is no way that really works to get rid of 'gutters' (as this deformation is called). The best way of doing it, however, is to add leveling that increases in strength further along the page, manually.

There is no way for the algorithm of really knowing how to level automagically only to get rid of the gutter and not ruin the rest of the image, since the decrease of light further along the sides might even be intentional, for example if it's a photo of some kind and not a scanned book page. The algorithm would need to be specific for books.

Link to comment
Share on other sites

    [*:1rso81hp]Curvature correction on the border : i'm open to any procedure because none has - up to now - been good enough to recover this deformation. I also tried to find what algorithms are used in commercial programs but nothing usefull has come out.

Here's what I would try: Get MadJiks tubeoblique plugin viewtopic.php?p=19735#p19735 and have a play with that.

My assumption here is that the curve of the page is a section of a larger cylinder. If we can stretch the image around the internal surface of a similar sized cylinder we should have a way of correcting some of the distortion.

My next recommendation would be the shape3D plugin - again with the cylinder shape. viewtopic.php?p=52345#p52345

Note: I haven't actually tried these techniques & they are probably only going to be useful if you have a small number of images to correct.

Hope this helps.

Link to comment
Share on other sites

Hi,

Thanks for you assitance.

@Ash: well, it is indeed scanned as correctly as possible... without damaging the book !! when you need a schema part of, say, a Campbell you so not want do have your book (or maybe the one you borrowed) wasted by pushing heavily on it while scanning take place; and i don't have a true book scanner...

@EER: using Shape3D should be the best method with existing pluging... i'll give a try. About the other plugin i already tried it but without success.

Thanks to you all...

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...