Note that there are some explanatory texts on larger screens.

plurals
  1. POOCR scan of letters. Failed in loading training letters
    primarykey
    data
    text
    <p>Using the javaocr framework from sourceforge. Trying to scan letters from a image, and training the system to recognize them.</p> <p>Getting this exception when loading trainer:</p> <pre><code>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) </code></pre> <p>My code is like this:</p> <pre><code>loader.load(this,ClassLoader.getSystemResource("LETTERS/trainLetters.PNG").getPath(), new CharacterRange('A', 'Z'), images); </code></pre> <p>Another question is how to get it to train Scandinavian letters. If I enter a range A-Ö it expects 150 characters.</p> <p>Then when I scan I try and scan a line in the image at the time:</p> <pre><code>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 &lt; 15; i++) { final String text = scanner.scan(boardImage, x1, y1 + (i * 40), x2, y2 + (i * 40), cr); System.out.println("scanned " + text); } </code></pre> <p>And I actually get output, but not the output I expect... Anyone have experience with the javaocr framework? </p> <p>Update: Solved the training issue. The training image was missing a couple of charachters and Scandinavian is not supported (?). Still getting strange output.</p> <p>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.</p> <p>Thanks.</p> <p>/A</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload