kakul / alyn Goto Github PK
View Code? Open in Web Editor NEWDetect and fix skew in images containing text
License: MIT License
Detect and fix skew in images containing text
License: MIT License
Hi,
I tried deskewing the image, but the program gave following error:
'
line 32, in deskew
rot_angle = 90 + angle + self.r_angle
TypeError: ufunc 'add' did not contain a loop with signature matching types dtype('S46') dtype('S46') dtype('S46')
'
Can you help me figure out the source??
I can`t get how you are calculating the angle of deviation, and why do we we calculate the average??
I used following commands to deskew input image
------python skew_detect.py -i 146_b.bmp
------./deskew.py -i 146_b.bmp -d Yes -o test.bmp -r 80
deskew.py line 1: Deskews file after getting angle: command not found
I install alyn module via pip, but pycharm shows that there are no deskew method and skewdetect method?
When I install Alyn on ubuntu16.04 via pip3,then I type a import alyn,I get the following message:
import alyn
Traceback (most recent call last):
File "", line 1, in
File "/usr/local/lib/python3.5/dist-packages/alyn-0.1.1-py3.5.egg/alyn/init.py", line 2, in
ImportError: No module named 'deskew'
can you help me figure out where is the problem?
Hi,
I have already pip installed alyn but it seems to still not be able to detect the alyn package. "import alyn" cannot work either. What should I do to fix this?
I have applied skew_detect and skew_correction on given image but its showing incorrect result. In image rectangle and text is not aligned properly.
Hi Folks,
does anybody know which is the original repository?
https://github.com/sbrunner/deskew
or
https://github.com/kakul/Alyn
Best regards
Sascha
Hello,
I did some experiments and it looks like this method can't detect skews below one degree. Could you confirm this?
This is the output for the testing image (I manually introduced a skew of -0.5°):
Angle bins: [[0.50279329608938206, 0.50279329608938206], [90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 90.0, 88.994413407821213, 90.0, 90.0, 88.994413407821213], [], [-88.994413407821227, -88.994413407821227, -88.994413407821227, -88.994413407821227]]
Estimated Angle: 90.0
Average Deviation from pi/4: 44.6480446927
This is the ouput with a non skewed image:
Image File: c:\users\dturato\appdata\local\temp\1\tmp7u2snw.png
Angle bins: [[], [90.0, 90.0, 90.0, 90.0, 90.0], [], []]
Estimated Angle: 90.0
Average Deviation from pi/4: 45.0
So it looks like is detecting something, but it is someway lost in the final computation of the angle single value.
The current setup breaks with Python3. Work out a way to make this compatible with Python3.
My concern is skew_detect only and I installed this software via pip.
But there is no command installed. How can I use this?
I git-clone this repo and run skew_detect.py but it requires python-tk. Because I should run this server there is no GUI. Why does it depend on python-tk? The dependency is strange to me.
In sd.run()
I am getting following error.
alyn-test/myenv/local/lib/python2.7/site-packages/skimage/io/_io.py:49: UserWarning: `as_grey` has been deprecated in favor of `as_gray`
warn('`as_grey` has been deprecated in favor of `as_gray`')
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.