How to extract the text displayed in a dot matrix LED display?

I need to extract the number from a display(LED dot matrix) Sample Image: I am using the example code given by p...