Closed ahsanaasim closed 4 years ago
salam 3alaikum, sorry for the very late reply - i had left this project for a while and started looking into it again. please re-open this issue and give me the updated details if you are still working on this and hopefully can help you sort whatever this problem is out in sha' Allah.
please accept my apologies and jazakAllah khairan. walsalam 3alaikum.
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.