quran / ayah-detection Goto Github PK
View Code? Open in Web Editor NEWscripts to detect ayah markers from quran images
scripts to detect ayah markers from quran images
Assalamu Alaikum,
I am trying to generate metadata for Quran images. But for getting lines, I am confused about the parameters I need to pass. Can you please tell me how do i calculated max pixels and mode?
Documentation says:
there are 3 numbers you'll find configured in the main - line height (approximate height of each line), max pixels (a threshold - how many pixels in a line make the line a quran line vs a line of tashkeel between two lines), and mode (0 or 1 - i think this is used for how to handle the very first line - pass 0 for most cases).
If you could explain with an image, that would be appreciated. Better if you could explain using the following image. Thanks
ٱلسَّلَامُ عَلَيْكُمْ
Brother, I need help to run this script to generate Db for Quran Images. Unable to run the script
I have realized that the Chapters (Suar') in the top left menu is not correctly ordered.
I recommend checking the index in the Quran just to be sure.
Assalamu Alaikum,
I am working around with the script
on main.py, following code detects the ayahs using the template image.
ayat = find_ayat(img_gray, template)
find_ayat method returned follwoing array. Which is accurate as i matched the position on photoshop. And its perfect
[(599.0, 888.0), (533.5, 960.0), (792.0, 1035.0), (468.0, 1031.0), (580.0, 1114.0), (743.0, 1192.5), (634.0, 1341.0)]
But I am a little confused about the glyph values. On Page 4 i have 7 ayahs. But i am getting around 12 glyphs on this page. Can i get some more guidelines?
Glyphs i got on console:
#146 insert into glyphs values(NULL, 4, 1, 2, 5, 1, 599, 1011, 894, 970);
#146 insert into glyphs values(NULL, 4, 1, 2, 6, 1, 533, 599, 894, 970);
#171 insert into glyphs values(NULL, 4, 2, 2, 7, 1, 534, 1011, 953, 1029);
#146 insert into glyphs values(NULL, 4, 3, 2, 7, 2, 792, 1072, 1032, 1108);
#146 insert into glyphs values(NULL, 4, 3, 2, 8, 1, 468, 792, 1032, 1108);
#146 insert into glyphs values(NULL, 4, 4, 2, 9, 1, 580, 1081, 1108, 1184);
#171 insert into glyphs values(NULL, 4, 4, 2, 10, 1, 463, 580, 1108, 1184);
#146 insert into glyphs values(NULL, 4, 5, 2, 10, 2, 743, 1064, 1196, 1272);
#171 insert into glyphs values(NULL, 4, 5, 2, 11, 1, 479, 743, 1196, 1272);
#146 insert into glyphs values(NULL, 4, 6, 2, 11, 2, 634, 1001, 1271, 1347);
#207 insert into glyphs values(NULL, 4, 6, 2, 12, 1, 544, 634, 1271, 1347);
#207 insert into glyphs values(NULL, 4, 7, 2, 12, 2, 633, 911, 1372, 1447);
Also can you give me some instructions on how line number, surah number, ayah numbers are being calculated here. As i can see, i got the surah number & ayah numbers wrong. On page 4, i have surah al-fatiha.
Assalam Alaykom,
I'm interested in your project, but I'm having trouble understanding how to use it. Could you please update the readme file to make it more beginner-friendly? It would be great if you could provide clear instructions and explanations.
Additionally, it would be helpful if you could include an argument list for the Python files (that shows up using -h
), specifying the parameters and their order.
Thank you for considering these enhancements to improve the usability of your project.
how do you run these scripts...
i tried following steps but getting this issue while executing main.py 👍
Traceback (most recent call last):
File "main.py", line 121, in
if end_of_sura:
NameError: name 'end_of_sura' is not defined
i run first ayat.py and get res.png
then i run lines.py and test.png with 5 lines in surah fatihah while it should be 6 0r 7 if we include bismillah too.
but i cannot work out how to run main.py ..
please help
Jazakallah
Assalaamualaikum, may Allah protect you as always
I'm trying to use this library and the documentation that you wrote is difficult to understand for us. If you don't mind, please provide the example files that we will process.
Salamou alaykom,
This is not an issue just a question !
first of all thank you for opening the source for the tools you have done for the application. I really appreciate the fact you are sharing this knowledge with the community. Baraka Allahou fikom.
I want to port Quran Android to iOS (iPhone & iPad) (with your permission) and I want to share this project with the community as well.
I just started the seed of the project and hopefully when It reach certain point of maturity I will share the project with you and will open it for the community.
I'am in a R&D stage of the project. So far I was able to generate the image using the scripts you have shared (https://github.com/quran/quran.com-images) . Those scripts only generate the images but doesn't output any metadata ( location of each ayah and lines and coordinate inside the image). Will this scripts help me generate those meta data ? Or do you have any ready to use data for the base text you are using (madani for now but I think this script is made for qaloon and warsh scans ) ? The metadata need to be adapted to higher resolution (specially for retina display resolution )
Thank you !
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.