Giter Site home page Giter Site logo

Comments (20)

kakul avatar kakul commented on August 20, 2024

Is this the given initial image, or image generated after deskew?

from alyn.

kakul avatar kakul commented on August 20, 2024

Could you attach the initial image?

Probably the circles in the image are creating problems with hough transform calculations.

from alyn.

kakul avatar kakul commented on August 20, 2024

Ok will try and let you know soon

from alyn.

kakul avatar kakul commented on August 20, 2024

Yes

from alyn.

kakul avatar kakul commented on August 20, 2024

It worked correctly on the given image, without anything extra.

from alyn.

kakul avatar kakul commented on August 20, 2024

Follow these steps:

pip install virtualenv (use sudo if required)

virtualenv any-name-of-your-choice
cd any-name-of-your-choice
pip install alyn

create a file test.py or simply open python interpreter and write the following code:

from alyn import *

d = Deskew(input_file='input.jpg', display='Y', output_file='output.jpg', r_angle=0)
d.deskew()

The output will be saved as output.jpg, once you close the preview display window

from alyn.

kakul avatar kakul commented on August 20, 2024

In that case you will have to tweak the code a bit, change the default values that are used in skew angle calculation in skew_detect.py. You can supply your own values for sigma and number of peaks or modify the defaults in the code itself.

from alyn.

kakul avatar kakul commented on August 20, 2024

Try this for different values of sigma and number of peaks to find a fit that works best.

from alyn.

RashmiPandeyatGit avatar RashmiPandeyatGit commented on August 20, 2024

from alyn import *

d = Deskew(input_file='input.jpg', display='Y', output_file='output.jpg', r_angle=0)
d.deskew()

In this case error is generated.
from skimage.feature import canny
ImportError: cannot import name canny

from alyn.

kakul avatar kakul commented on August 20, 2024

Use skimage version >= 0.11

from alyn.

kakul avatar kakul commented on August 20, 2024

@Rashmi002 did the skew detect parameters work?

from alyn.

RashmiPandeyatGit avatar RashmiPandeyatGit commented on August 20, 2024

I am using skimage 0.13 version. How can i know skew detect parameter is working or not?

from alyn.

RashmiPandeyatGit avatar RashmiPandeyatGit commented on August 20, 2024

skew detect parameter is not working properly.

from alyn.

RashmiPandeyatGit avatar RashmiPandeyatGit commented on August 20, 2024

how can i finetune it?

from alyn.

kakul avatar kakul commented on August 20, 2024

https://github.com/kakul/Alyn/blob/master/alyn/skew_detect.py#L23
https://github.com/kakul/Alyn/blob/master/alyn/skew_detect.py#L25

Change these values.

from alyn.

RashmiPandeyatGit avatar RashmiPandeyatGit commented on August 20, 2024

ok..I will let you know. Thanks for immediate response.

from alyn.

kakul avatar kakul commented on August 20, 2024

Hi @Rashmi002, did the code work?

from alyn.

kakul avatar kakul commented on August 20, 2024

Closing this.

from alyn.

pharrellyhy avatar pharrellyhy commented on August 20, 2024

Hi,
I've played around deskew for a while and found if the image contains not only text but also picture, it didn't work well. One workaround is I can crop the region which only contains text. This solution may not work well too since I don't know which part of image contains only text. Do you have any idea on this situation? Below is my test image:
92_10

from alyn.

pharrellyhy avatar pharrellyhy commented on August 20, 2024

I also noticed that if the image contains more than one page, like the one I attached above, deskew will fail.

from alyn.

Related Issues (16)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.