Comments (20)
Is this the given initial image, or image generated after deskew?
from alyn.
Could you attach the initial image?
Probably the circles in the image are creating problems with hough transform calculations.
from alyn.
Ok will try and let you know soon
from alyn.
Yes
from alyn.
It worked correctly on the given image, without anything extra.
from alyn.
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.
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.
Try this for different values of sigma and number of peaks to find a fit that works best.
from alyn.
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.
Use skimage version >= 0.11
from alyn.
@Rashmi002 did the skew detect parameters work?
from alyn.
I am using skimage 0.13 version. How can i know skew detect parameter is working or not?
from alyn.
skew detect parameter is not working properly.
from alyn.
how can i finetune it?
from alyn.
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.
ok..I will let you know. Thanks for immediate response.
from alyn.
Hi @Rashmi002, did the code work?
from alyn.
Closing this.
from alyn.
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:
from alyn.
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)
- Unable to deskew the image HOT 3
- Import Error while detecting skew HOT 1
- How to use this? HOT 14
- Python 3 version HOT 3
- Documentation Improvement
- Error while deskewing the image HOT 4
- Cannot install Alyn HOT 1
- Cannot detect angles lower than 1° HOT 1
- Memory Error When Try to Deskew with Python3.7
- Angle of deviation calculation
- UserWarning HOT 1
- no deskew method in alyn module? HOT 2
- is it possible to deskew based on texts?
- No module named 'deskew' HOT 1
- Which is the original repository? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alyn.