Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6618683
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T20:52:00+00:00 2026-05-25T20:52:00+00:00

Using the javaocr framework from sourceforge. Trying to scan letters from a image, and

  • 0

Using the javaocr framework from sourceforge. Trying to scan letters from a image, and training the system to recognize them.

Getting this exception when loading trainer:

java.io.IOException: Expected to decode 26 characters but actually decoded 33 characters in training: /Developer/MAckan/bin/LETTERS/trainLetters.PNG
    at net.sourceforge.javaocr.ocrPlugins.mseOCR.TrainingImageLoader.load(TrainingImageLoader.java:111)

My code is like this:

loader.load(this,ClassLoader.getSystemResource("LETTERS/trainLetters.PNG").getPath(), new CharacterRange('A', 'Z'), images);

Another question is how to get it to train Scandinavian letters. If I enter a range A-Ö it expects 150 characters.

Then when I scan I try and scan a line in the image at the time:

scanner.addTrainingImages(images);

        final CharacterRange[] cr = new CharacterRange[1];
        cr[0] = new CharacterRange('A', 'Z');

        // get the first line of letters
        final int x1 = 0;
        final int y1 = 130;
        final int x2 = 640;
        final int y2 = 170;


        for (int i = 0; i < 15; i++) {
        final String text = scanner.scan(boardImage, x1, y1 + (i * 40), x2,
                    y2 + (i * 40), cr);
            System.out.println("scanned " + text);
        }

And I actually get output, but not the output I expect…
Anyone have experience with the javaocr framework?

Update:
Solved the training issue. The training image was missing a couple of charachters and Scandinavian is not supported (?). Still getting strange output.

Update2:
Solved the entire issue with writing my own comparison instead. I did some manipulation of the images (reduced colors and transperency) and compared pixel by pixel and returned a diff against alafabet images. The lowest diff “wins”. Works for this particular case, but I am still interested in getting OCR running.

Thanks.

/A

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T20:52:01+00:00Added an answer on May 25, 2026 at 8:52 pm

    Solved the entire issue with writing my own comparison instead. I did some manipulation of the images (reduced colors and transperency) and compared pixel by pixel and returned a diff against alafabet images. The lowest diff “wins”. Works for this particular case, but I am still interested in getting OCR running.

    Thanks everyone for contributing.

    /A

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Using VB or C#, I am getting a string of variable length from the
Using online interfaces to a version control system is a nice way to have
Using C# .NET 3.5 and WCF, I'm trying to write out some of the
Using C# and System.Data.SqlClient, is there a way to retrieve a list of parameters
Using PHP, I'm trying to give each specific text its own variable. I believe
Using jQuery's UI Tabs. This is my code. <div id=tabs> <ul> <li><a href=#tabs-1>Find a
Using jQuery, how do I get the value from a textbox and then load
Using XSLT 1.0, I'm trying to essentially create a small node set and then
Using Facebox with .NET (Web Forms) is painful--this primarily HTML site was designed by
Using the http://www.ifans.com/forums/showthread.php?t=132024 post from another question i am allowing the user to enter

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.