The problem is that instead of having paragraphs, I get one big chunk of 
text:

here is the output:

Warning: Invalid resolution 0 dpi. Using 70 instead.
Found 1 para image components.
Box[0]: x=64, y=40, w=1217, h=1529, confidence: 79, text: O. Indicar cuál 
de las siguientes 1gualdades entre expresiones regulares es verdadera:
(a) a(a+ba)* — (a +ab)*a
(b)  a(a+ba) — aa*b*a
(c) — a(a+ba)* — aa*(bay*
7. Dado el alfabeto » = (0, 1), se define £ como el lenguaje formado por 
las cadenas que cumplen que N(0) =
N(1) +1 donde N(0) es el número de apariciones del símbolo 0 y N(1) es el 
número 
de apariciones del símbolo
1. Indicar cuál de las siguientes gramáticas independientes del contexto 
genera ,
(a)
S — CB|BC|0C1 | 1C0/0
C > oc |1Coj0
B — OBLILBOJOL|LO
(6)
S — OAILJO
A — DAlJoBJO
B— 0BI0
(e)
S — CB|IBCIOCI |1C0]0]E
E- 0E1/1C0/0
B — 0B1|1Bojo1|10
8. Sca / cl lenguaje gencrado por la siguiente gramática:
S—-+A1B
A—0A|e
B_.0OB|IBlc
Indicar cuál de las siguientes afirmaciones es verdadera:
(a) Lesindependiente del contexto no regular
(b) — Z conticene la cadena vacía
(c) — Sea w la cadena de menor longitud de 7, entonces |w| =2
(d) — 7esregular y puede expresarse mediante la expresión regular 0*1(0+1)*
9. A la hora de trasladar la cabeza de la máquina de Turing en cada paso de 
ejecución de la máquina, ¿Cuál de las
siguientes afirmaciones es verdadera?
(a) — Las máquinas de Turing sólo pueden moverse una posición a la derecha.
(b) — Las máquinas de Turing sólo pueden moverse una posición a la izquierda
.
(c) — Las máquinas de Turing sólo pueden moverse una posición a la derecha 
o a la izquierda.
(d) Las máquinas de Turing pueden moverse cualquier número de posiciones a 
la derecha o a la izquierda.
Enter code here...




On Friday, 3 January 2020 16:44:51 UTC, Nils André wrote:
>
>
> Here is my code with tesseract4:
>
> #include 
> #include 
>
> int main() {
>   Pix *image = pixRead("image-001.ppm");
>   tesseract::TessBaseAPI *api = new tesseract::TessBaseAPI();
>   api->Init(NULL, "spa");
>   api->SetImage(image);
>   Boxa* boxes = api->GetComponentImages(tesseract::RIL_PARA, true, NULL, 
> NULL);
>   printf("Found %d para image components.\n", boxes->n);
>   for (int i = 0; i < boxes->n; i++) {
>     BOX* box = boxaGetBox(boxes, i, L_CLONE);
>     api->SetRectangle(box->x, box->y, box->w, box->h);
>     char* ocrResult = api->GetUTF8Text();
>     int conf = api->MeanTextConf();
>     fprintf(stdout, "Box[%d]: x=%d, y=%d, w=%d, h=%d, confidence: %d, 
> text: %s",
>                     i, box->x, box->y, box->w, box->h, conf, ocrResult);
>     boxDestroy(&box);
>   }
>   boxaDestroy(&boxes);
>   pixDestroy(&image);
> }
>
>
> The file i'm using is image-001.ppm 
> https://drive.google.com/file/d/1SVBet9sp0nnxhN0be6_byZMeH_HiEhP6/view?usp=sharing.
>  
> If you want to view it, it's the second page of this pdf: 
> https://drive.google.com/file/d/1nXEzreb3kQnamgadQAFe0ri8qRW94aCU/view
>
> On Friday, 3 January 2020 16:18:02 UTC, zdenop wrote:
>>
>> seems like you forget to attach you code, image, tesseract version 
>> details....
>>
>> Zdenko
>>
>>
>> pi 3. 1. 2020 o 17:13 Nils André <[email protected]> napísal(a):
>>
>>> I'm trying to extract paragraphs from an image so I tried 
>>> GetComponentImages using tesseract::RIL_PARA but I just get the whole image.
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "tesseract-ocr" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/tesseract-ocr/f6ca7c70-17c0-4ba3-aeba-e4a508e88fde%40googlegroups.com
>>>  
>>> <https://groups.google.com/d/msgid/tesseract-ocr/f6ca7c70-17c0-4ba3-aeba-e4a508e88fde%40googlegroups.com?utm_medium=email&utm_source=footer>
>>> .
>>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"tesseract-ocr" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tesseract-ocr/877fb0ed-f45e-462a-80d6-9eaa2747fa66%40googlegroups.com.

Reply via email to