albertlee Posted December 6, 2005 Posted December 6, 2005 Hi I have found this php program especially interesting for academic purpose. This program is called pHpOCR. Its function is Optical Character Recognition. Website: http://phpocr.sourceforge.net/ Here you can know what I refer imidiately. You can view the screenshot: http://phpocr.sourceforge.net/screen1.jpg It is composed of 2 main php files: 1. index.php actual code: http://supershare.trap17.net/index.txt it can generate template for a new font type. It recognises the input image and parse the corresponding number to the output. 2, char_inc_6.php actual code: http://supershare.trap17.net/char_inc_6.txt it is basically the template The question is: Since I am not very familar with pHp, I do have some difficulties reading the code regarding its syntax. I would like to make the same thing in Java. I can read partially the code, but it's just too long. Can any tell me which part of the code, especially in the index.php, that scruntinizes the image input with the template and chooses the character for the parsed output? I want to know that bit of the code, because I want to change it a little so the index.php can also evaluate alphabets beside numbers.... sample of the program: http://supershare.trap17.net/index.php here, I implemented the program on my hosting. However, I change the code a little bit, so it's abit buggy. please help here., apreciate for any one taking interests here and help
Dave Posted December 7, 2005 Posted December 7, 2005 I'd familiarise myself with PHP before taking the plunge into quite a big project such as this.
RyanJ Posted December 7, 2005 Posted December 7, 2005 I'd familiarise myself with PHP before taking the plunge into quite a big project such as this. Indeed, I had a look at it and its quite a complex and hard too understand... learn the basics before you even try this or you'll end up being stick with no place too go, trust me on that one because I did it Cheers, Ryan Jones
Dave Posted December 7, 2005 Posted December 7, 2005 Plus, there's quite a few PHP functions that you just won't find in Java. I'm not saying that it's impossible to port over, but you definately need some experience with PHP and the various functions to understand what the script does in the first place.
RyanJ Posted December 7, 2005 Posted December 7, 2005 Plus, there's quite a few PHP functions that you just won't find in Java. I'm not saying that it's impossible to port over, but you definately need some experience with PHP and the various functions to understand what the script does in the first place. True, I've obly ever used Java for a few small tasks - its simmilar to PHP but in some cases as you have said it is a lot different Cheers, Ryan Jones
albertlee Posted December 7, 2005 Author Posted December 7, 2005 thanks for all the responses. I dont see why the code is difficult to understand, since pHp is relatively easy language compared to Java, and all I see in the functions of that code are conditional statement. So, the most difficult thing shouldn't be pHp itself, but the algorithm. However, I am not experienced with pHp, so the syntax is abit painful for me. Any way, this is how much I understand about the whole pHpOCR. in the char_inc_6.php, you can see an array, right? the array represents the template of every character the index.php decode from a picture of characters. Element of the array is one character as you can see in the char_inc_6.php, the illusion. The higher the number, indicates the darker part of one character. Here is the ReadMe file of the phpOCR. http://supershare.275mb.com/README.txt Btw, here are the clone codes in addition to the existing ones from my 1st post in case of broken link. 1, http://supershare.275mb.com/index.txt 2, http://supershare.275mb.com/char_inc_6.txt I dont really need to translate all of the code into Java now. I want to know the mechanism instead, the algorithm. please help thanks
albertlee Posted December 7, 2005 Author Posted December 7, 2005 thanks for all the responses. I dont see why the code is difficult to understand, since pHp is relatively easy language compared to Java, and all I see in the functions of that code are conditional statement. So, the most difficult thing shouldn't be pHp itself, but the algorithm. However, I am not experienced with pHp, so the syntax is abit painful for me. Any way, this is how much I understand about the whole pHpOCR. in the char_inc_6.php, you can see an array, right? the array represents the template of every character the index.php decode from a picture of characters. Element of the array is one character as you can see in the char_inc_6.php, the illusion. The higher the number, indicates the darker part of one character. Here is the ReadMe file of the phpOCR. http://supershare.275mb.com/README.txt Btw, here are the clone codes in addition to the existing ones from my 1st post in case of broken link. 1, http://supershare.275mb.com/index.txt 2, http://supershare.275mb.com/char_inc_6.txt I dont really need to translate all of the code into Java now. I want to know the mechanism instead, the algorithm. please help thanks
albertlee Posted December 7, 2005 Author Posted December 7, 2005 thanks for all the responses. I dont see why the code is difficult to understand, since pHp is relatively easy language compared to Java, and all I see in the functions of that code are conditional statement. So, the most difficult thing shouldn't be pHp itself, but the algorithm. However, I am not experienced with pHp, so the syntax is abit painful for me. Any way, this is how much I understand about the whole pHpOCR. in the char_inc_6.php, you can see an array, right? the array represents the template of every character the index.php decode from a picture of characters. Element of the array is one character as you can see in the char_inc_6.php, the illusion. The higher the number, indicates the darker part of one character. Here is the ReadMe file of the phpOCR. http://supershare.275mb.com/README.txt Btw, here are the clone codes in addition to the existing ones from my 1st post in case of broken link. 1, http://supershare.275mb.com/index.txt 2, http://supershare.275mb.com/char_inc_6.txt I dont really need to translate all of the code into Java now. I want to know the mechanism instead, the algorithm. please help thanks
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now