Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Sign In with Facebook Sign In with Google Sign In with OpenID


We have migrated to a new platform! Please note that you will need to reset your password to log in (your credentials are still in-tact though). Please contact if you have questions.
Welcome to the new platform of Programmer's Heaven! We apologize for the inconvenience caused, if you visited us from a broken link of the previous version. The main reason to move to a new platform is to provide more effective and collaborative experience to you all. Please feel free to experience the new platform and use its exciting features. Contact us for any issue that you need to get clarified. We are more than happy to help you.

templates file matlab

rigasrigas Posts: 1Member
good morning people

i am trying to create a new ocr program at matlab that it will take a jpg picture and only recognize zero and one numbers and then print them to a txt file. doing some googling i found out some interesting algorithms. the faster is one that takes the picture and compares it with some templates to decide which letter or number is. the problem is that trying to create my own templates file that it will help me complete the work. below i post the code using all 36 templates. if you have any idea how i could make it work for 2 numbers only please help

one=imread('letters_numbers1.bmp'); two=imread('letters_numbers2.bmp');
five=imread('letters_numbers5.bmp'); six=imread('letters_numbers6.bmp');
nine=imread('letters_numbers9.bmp'); zero=imread('letters_numbers.bmp');
letter=[A B C D E F G H I J K L M...
N O P Q R S T U V W X Y Z];
number=[one two three four five...
six seven eight nine zero];
character=[letter number];
templates=mat2cell(character,42,[24 24 24 24 24 24 24 ...
24 24 24 24 24 24 24 ...
24 24 24 24 24 24 24 ...
24 24 24 24 24 24 24 ...
24 24 24 24 24 24 24 24]);
save ('templates','templates')
clear all
Sign In or Register to comment.