Wednesday, April 23, 2014

State of The Art Of KhmerOCR Implementation

There aren't many articles when we search on the Internet about KhmerOCR topic, I, myself don't find a lot as well.

Of course, I believe that there are some people or companies might quietly in implementing the solution for that but without any announce I believe my presume below are relevant enough for people to understand about current situation of Khmer OCR.

Let's share around "State of The Art Of KhmerOCR" today ;)

I could find that, there are about several Khmer OCR researches being published through some organization, website and universities.


When we talk about Khmer OCR, we suppose around the solutions to make any characters from scanned images of handwritten, typewritten or printed text converts into machine-encoded text.

Solutions on OCR system, mostly focus on:

  • Pre-processing (usually is noise removal)
  • Segmentation
    • Line segmentation
    • Character segmentation
  • Recognition
  • Mapping (Character Assembling)

And there are some methods already used for Khmer OCR in segmentation or recognition part such as
  • Lagendre Moment Descriptor,
  • Wavelet Descriptor,
  • Hidden Markov model (HMM),
  • Back propagation,
  • Scale Invariant Fourier Transform (SIFT),
  • Fourier Descriptor, Hole detection
  • Template Matching
  • etc.
  • And (it seems) the last one is: Support Vector Machine (SVM)

Literature Review/History

I might miss some others but here are what I could find about what have done so far with this topic.
If you, guys, have know some more, please share to people through comment form. I will check and update.
  1. The Khmer Printed Characters Recognition using Lagendre Moment Descriptor by Chey Chanoeurn et al got 92% of accuracy on 10 Khmer consonants including ប ព ជ ក ភ ណ ឃ ស វ and ឆ
  2. 2005, The Khmer Printed Character Recognition Using Wavelet Descriptors by Chey Chanoeurn et al got the accuracy of 92.85%, 91.66% and 89.27% on 10 types of Khmer fonts in 3 different sizes.
  3. 2008, The Khmer Segmentation for font Limon S1, size 22 by Ing Leng Ieng, PAN Localization Project got the accuracy of 99.11%.
  4. 2009, The Khmer OCR for Limon R1 Size 22 by Ing Leng Ieng from PAN Localization Project using framing and Discrete Cosine Transform calculation for recognition based on Hidden Markov Model and got the accuracy of 98.88%.
  5. 2011, The Khmer Optical Character Recognition (OCR) by Mr. Kruy Vanna using Fourier Descriptors, Component’s Holes, and Component’s Location got accuracy of 97.9% on 19 types of Khmer font.
  6. 2012, The Khmer Printed Character Recognition uses combining of Edge Detection and Template Matching by Iech Setha et al for one font “Khmer OS Content” with font size of 36pt got accuracy of 99%
  7. 2013, The Khmer Printed Character Recognition using Support Vector Machine (SVM) based, by Pongsametrey SOK for one font “Khmer OS Content” with font size of 36pt got accuracy of 98.54% (32pt = 98.62%, 28pt = 98.18%) with training set of font size: 32pt
The research No. 7, I did it and it's submitted at Royal University of Phnom Penh (RUPP). So it's not publicly publish any where yet.

Who are doing it nowadays

That's who I have known around in Cambodia only, it might be people who does some study abroad is also doing it. Anyway here what I have known:
  • Institute of Technology of Cambodia (ITC), It seems, there're some continuing implementation of KhmerOCR there
  • Royal University of Phnom Penh (RUPP) also doing some more researches on this matter through students' researches, thesis and with their lecturers.
  • Open Institute (Open Forum,, I believe that this topic is still interesting by this NGO
  • And there are some other individuals as well as I heard (?)

What's Interesting

One opensource OCR engine, Tesseract OCR, it's a completed engine from the image processing to recognition and its output.

What we need for our Khmer language works for it, we need to analyze "how to train" our dataset.

I also did some training for Khmer as well for Tesseract for some letters, it seems that the system is good to go but there are some thing we need to aware before as I posted a question here.
I will try to write a post on how to train some characters that I did before.
Few Training Char, All Are Error

Why Tesseract at this time?
Previous researches are mostly using their own combination of methods to solve various issue for Khmer language such as in segmentation or recognition but the pre-processing process (image processing) is also important for a real OCR system and its accuracy.
And I could see that Tesseract OCR is ready for all of that.

Is There Anyone Already Try for Tesseract?
Yes, you can search on Google, it has already been trying since 2009 per my search on Google and around.
And it might be already made by some universities or lecturers but remaining unclear for me.

So, Is There Any Ready Tesseract OCR for Khmer?
My presumed answer: No, I've never heard that there's a ready training set for Khmer yet to use in Tesseract OCR Engine.

But, just today, I checked again at the repo of Tesseract (14 January 2014), I saw some Khmer config is added (Files: Khmer.unicharset, Khmer.xheights), we need to test if they are working.

Therefore, Students, Lecturers, some NGO or community should take part to help this.


The OCR system is very interesting for people nowadays.
We are using Khmer Unicode since it established in 2003 in the Kingdom and with Unicode, we have Google translate recently. Then, Khmer OCR should be also solved somehow as well.

We need more people to do it, to help, to share and publish.

Article Revision
  • 23/04/2014: Initial the article
  • If any mistake in above research, please alert me in comment.
  • More detail of each research, please find the published paper to read in detail

Monday, April 21, 2014

Finger Print Recorgnition, A Framework in C#

You might also interesting and there is an article to help us on that topic.

Fingerprint recognition is an active research area nowadays. An important component in fingerprint recognition systems is the fingerprint matching algorithm. According to the problem domain, fingerprint matching algorithms are classified in two categories: fingerprint verification algorithms and fingerprint identification algorithms.

This has been stated in CodeProject where you can find many articles related to .NET, it helps a lot.

If you want to go further, please read a newly published article: A Framework in C# for Fingerprint Verification

So if we want to have for Cambodia, example, to verify 1 person among 15 million people in Cambodia, above article can be a tool and machine learning can be a methodology to deal with huge data.

Tuesday, April 1, 2014

Inspired by a simple research - Save money by changing fonts

At Mashable, a research of 14-Year-Old student about "how much ink cost on publication", by choosing the right font.

Changing the standard typeface used by federal and state governments could save the United States roughly $370 million a year in ink costs, according to a peer-reviewed study by Suvir Mirchandani. The best part of the story? Mirchandani is just 14 years old. 
Using software called APFill Ink Coverage, he calculated how much ink was used in four representative fonts — Century Gothic, Comic Sans, Garamond and the default choice of most word processors, Times New Roman. 
The ink-preserving winner: Garamond. 

This research should do the same for Khmer fonts.

Read at Mashable