Porting tesseract ocr to emscripten

134 views
Skip to first unread message

Harsha Jayaweera

unread,
Jun 15, 2015, 5:58:02 AM6/15/15
to emscripte...@googlegroups.com
I'm planing to port tesseract OCR to emscripten.
Will it be enough if i just port only their cpp header files.
Or anything i should be aware of.
What is the best way to start doing this.

Gro Zep

unread,
Jun 16, 2015, 4:59:23 PM6/16/15
to emscripte...@googlegroups.com
I think it's just a little more harder than only porting headers files ..
instead try to make suitable for the configure and make files..

Harsha Jayaweera

unread,
Jun 17, 2015, 12:58:00 AM6/17/15
to emscripte...@googlegroups.com
Thanks for the reply. Yeah it is true. I started to port it and i ported leptonica first to LLVM byte code. and then did set $LIBLEPT_HEADERSDIR environment variable to byte code output path.

Then i ran emconfigure ./configure and then i got an error saying "configure: error: leptonica library missing". like i mentioned above i did set environment variable to previously build header files.

How can i solve this.

Harsha Jayaweera

unread,
Jun 17, 2015, 3:52:08 AM6/17/15
to emscripte...@googlegroups.com
In my knowledge tesseract ocr requires lib file (.a ) of leptonica but my emmake make output for leptonica contains .o files. So when i build llvm for tesseract it does not recognizes the leptonica. So how can i build .a lib files with emscripten in oder to build tesseract-OCR.
I'm using ubuntu.

Gro Zep

unread,
Jun 17, 2015, 10:18:22 AM6/17/15
to emscripte...@googlegroups.com
well..I don't know.it depend of you..:-)

.for myself .I plan to modify the makefile to avoid the search of the library ,in fact leptonica could be linked with tesseract after using emcc and is not needed for this step.
.but as  I'm in vacation I will wait few days before to work on it...

--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/UqvzMFbvvMU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-disc...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Harsha Jayaweera

unread,
Jun 17, 2015, 1:46:19 PM6/17/15
to emscripte...@googlegroups.com
Thank you. I't seems a smart way to do it. I'll try both ways and will let you know if there's any success or failure. Glad that you are interested in building tesseract also. 
Please share your knowledge and experience about how to get it done with us here if you able to successfully port tesseract-OCR to Javascript. 
Again Thank you.
To unsubscribe from this group and all its topics, send an email to emscripten-discuss+unsub...@googlegroups.com.

Gro Zep

unread,
Jul 1, 2015, 4:47:08 AM7/1/15
to emscripte...@googlegroups.com
hey Harsha !

have you follow you're work on translating tesseract.?..Today i'm back
to my office & i will work on it again..:-)

Best regards !

2015-06-17 19:46 UTC+02:00, Harsha Jayaweera
<harshapl400so...@gmail.com>:
> Thank you. I't seems a smart way to do it. I'll try both ways and will let
> you know if there's any success or failure. Glad that you are interested in
>
> building tesseract also.
> Please share your knowledge and experience about how to get it done with us
>
> here if you able to successfully port tesseract-OCR to Javascript.
> Again Thank you.
>
> On Wednesday, June 17, 2015 at 7:48:22 PM UTC+5:30, Gro Zep wrote:
>>
>> well..I don't know.it depend of you..:-)
>>
>> .for myself .I plan to modify the makefile to avoid the search of the
>> library ,in fact leptonica could be linked with tesseract after using emcc
>>
>> and is not needed for this step.
>> .but as I'm in vacation I will wait few days before to work on it...
>>
>> 2015-06-17 6:58 GMT+02:00 Harsha Jayaweera <harshapl400so...@gmail.com
>> <javascript:>>:
>>
>>> Thanks for the reply. Yeah it is true. I started to port it and i ported
>>>
>>> leptonica first to LLVM byte code. and then did set *$LIBLEPT_HEADERSDIR*
>>>
>>> environment variable to byte code output path.
>>>
>>> Then i ran emconfigure ./configure and then i got an error saying
>>> "*configure:
>>> error: leptonica library missing*". like i mentioned above i did set
>>> environment variable to previously build header files.
>>>
>>> How can i solve this.
>>>
>>>
>>>
>>> On Wednesday, June 17, 2015 at 2:29:23 AM UTC+5:30, Gro Zep wrote:
>>>>
>>>> I think it's just a little more harder than only porting headers files
>>>> ..
>>>> instead try to make suitable for the configure and make files..
>>>>
>>>> Le lundi 15 juin 2015 11:58:02 UTC+2, Harsha Jayaweera a écrit :
>>>>
>>>>> I'm planing to port tesseract OCR to emscripten.
>>>>> Will it be enough if i just port only their cpp header files.
>>>>> Or anything i should be aware of.
>>>>> What is the best way to start doing this.
>>>>>
>>>> --
>>> You received this message because you are subscribed to a topic in the
>>> Google Groups "emscripten-discuss" group.
>>> To unsubscribe from this topic, visit
>>> https://groups.google.com/d/topic/emscripten-discuss/UqvzMFbvvMU/unsubscribe
>>> .
>>> To unsubscribe from this group and all its topics, send an email to
>>> emscripten-disc...@googlegroups.com <javascript:>.
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "emscripten-discuss" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/emscripten-discuss/UqvzMFbvvMU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> emscripten-disc...@googlegroups.com.

Harsha Jayaweera

unread,
Jul 3, 2015, 10:58:49 PM7/3/15
to emscripte...@googlegroups.com
Wow... nice to hear it Gro. I'm still trying to do it without any significant progress. Now i'm tying to do it with visual studio in windows. Thanks you for replying.
Please let us know if you made any progress.
Good luck brother.
Best regards! ...
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "emscripten-discuss" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/emscripten-discuss/UqvzMFbvvMU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to

Gro Zep

unread,
Jul 8, 2015, 9:45:20 AM7/8/15
to emscripte...@googlegroups.com
done ! It works I'm able to use the library with an asm.js module, so keep going i'm sure you'll be able to do the same too..

>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>
>
> --
> You received this message because you are subscribed to a topic in the
> Google Groups "emscripten-discuss" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/emscripten-discuss/UqvzMFbvvMU/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> For more options, visit https://groups.google.com/d/optout.
>

--
You received this message because you are subscribed to a topic in the Google Groups "emscripten-discuss" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/emscripten-discuss/UqvzMFbvvMU/unsubscribe.
To unsubscribe from this group and all its topics, send an email to emscripten-disc...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages