# I have a question regarding OCR

**URL:** <https://discourse.processing.org/t/i-have-a-question-regarding-ocr/39466>\
**Category:** Libraries\
**Created:** [October 28, 2022, 9:05am UTC](https://discourse.processing.org/t/i-have-a-question-regarding-ocr/39466 "2022-10-28T09:05:10Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![GWAK](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GWAK](https://discourse.processing.org/u/GWAK)\
**Post date:** [October 28, 2022, 9:05am UTC](https://discourse.processing.org/t/i-have-a-question-regarding-ocr/39466/1 "2022-10-28T09:05:10Z")

</div>

[http://www.magicandlove.com/blog/2015/11/26/processing-with-ocr/](http://www.magicandlove.com/blog/2015/11/26/processing-with-ocr/)

The version I’m using: tess4j-3.4.8.jar

```auto
import net.sourceforge.tess4j.*;
import java.awt.image.BufferedImage;
 
Tesseract ocr;
BufferedImage img;
PImage pimg;
String res, show;
int idx;
 
void setup() {
  size(400, 600);
  background(0);
  ocr = new Tesseract();
  ocr.setDatapath(dataPath(""));
  ocr.setLanguage("ssd");
  
  pimg = loadImage("a4.jpg");
  img = (BufferedImage) pimg.getNative();
  show = "";
  idx = 0;
  try {
    res = ocr.doOCR(img);
    println(res);
  } 
  catch (TesseractException e) {
    println(e.getMessage());
  }
  frameRate(25);

}

```

> **[GitHub - Shreeshrii/tessdata\_ssd: Tesseract 4 traineddata for recognizing...](https://github.com/Shreeshrii/tessdata_ssd)**
>
> Tesseract 4 traineddata for recognizing Seven Segment Display - GitHub - Shreeshrii/tessdata\_ssd: Tesseract 4 traineddata for recognizing Seven Segment Display

I want to operate using the ‘ssd.traineddata’ used in the site above, but an error occurs.

```auto
Failed loading language 'ssd'
Tesseract couldn't load any languages!

```

By any chance, does anyone know the cause?

---

<div class="post-metadata">

**Author:** ![GWAK](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GWAK](https://discourse.processing.org/u/GWAK)\
**Post date:** [October 29, 2022, 12:00am UTC](https://discourse.processing.org/t/i-have-a-question-regarding-ocr/39466/2 "2022-10-29T00:00:55Z")

</div>

Works on tess4j-4.0.0.

---

<div class="post-metadata">

**Author:** ![GWAK](https://avatars.discourse-cdn.com/v4/letter/g/13edae/32.png) [@GWAK](https://discourse.processing.org/u/GWAK)\
**Post date:** [October 29, 2022, 12:08am UTC](https://discourse.processing.org/t/i-have-a-question-regarding-ocr/39466/3 "2022-10-29T00:08:33Z")

</div>

![ffig](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/7/5/75d3e6920e519eaf1379a6da4b20a5d64474e17f.jpeg)

It is recognized only by putting a number in front of the 7-segment number.

Environment :

1. Works on tess4j-4.0.0.
2. ssd.traineddata

The problem is that the number must be entered arbitrarily in front of it to be interpreted.  
It is not immediately recognized as a 7-segment number.  
Why?
