I just tried it.  Works for me on a fresh checkout... all the files are there.

Tom

On Wed, Jun 24, 2009 at 12:39, vidyanand<[email protected]> wrote:
>
> Hi Thomas
>
> I seem to be missing latin3-full.model in my checkout. I did a hg
> update today and did not get anything. I also do not have the
> TestImages directory.
>
> After update, I did a make clean and built it using make. While
> running "python test.py" I get the following error ( same one I
> mentioned earlier)
>
> vidyan...@vidyanand-laptop:~/work/projects/ocr/ocroswig$ python
> test.py
> 512 512
> Traceback (most recent call last):
>  File "test.py", line 6, in <module>
>    print image.data
>  File "/home/vidyanand/work/projects/ocr/ocroswig/iulib.py", line
> 129, in <lambda>
>    __getattr__ = lambda self, name: _swig_getattr(self, bytearray,
> name)
>  File "/home/vidyanand/work/projects/ocr/ocroswig/iulib.py", line 34,
> in _swig_getattr
>    raise AttributeError,name
> AttributeError: data
>
>
> On Jun 19, 5:30 pm, Thomas Breuel <[email protected]> wrote:
>> Give it another try; this is how the compilation works for me right
>> now (Ubuntu 9.04):
>>
>> $ ls
>> iulib.i        latin3-full.model  narray.pyc  ocropus-test.py
>> test2.py  TestImages  test.py
>> iulib_tests.py    Makefile       ocropus.i   README        test3.py
>> test.jpg    textbox.png
>> $ makeswig-I/usr/local/include -python -c++ iulib.i
>> g++ -g -fPIC -I/usr/local/include -I/usr/include/python2.5 -shared
>> iulib_wrap.cxx -o _iulib.so \
>>             -liulib -ltiff -lpng -ljpeg -lSDL -lSDL_gfx 
>> -lSDL_imageswig-I/usr/local/include -python -c++ ocropus.i
>> g++ -g -fPIC -I/usr/local/include -I/usr/include/python2.5 -fopenmp
>> -shared ocropus_wrap.cxx -o _ocropus.so \
>>         -locropus -liulib -ltiff -lpng -ljpeg -lSDL -lSDL_gfx -lSDL_image \
>>         -ltesseract_full -llept -lgsl -lm -lblas
>> $ python test.py
>> 512 512
>> 1.0
>> $
>>
>> Tom
>>
>> On Fri, Jun 19, 2009 at 12:39, vidyanand <[email protected]> wrote:
>>
>> > Hi Lakshmesha
>>
>> > I got the latest iulib and was able to get this to work. But Makefile
>> > needs a change forswigto work on ocropus.i.
>>
>> > The line is
>> >swig-python -c++ ocropus.i
>>
>> > Whereas it should be
>> >swig-I/usr/local/include -python -c++ ocropus.i
>>
>> > Also, once I got the make done. I am guessing I need to call ld ( GNU
>> > Linker)
>>
>> > So I tried the following 
>> > (http://www.dabeaz.com/cgi-bin/wiki.pl?SwigFaqLinuxSharedLibraries
>> > )
>>
>> >  ld -shared _iulib.so -o iulib.so
>>
>> > It goes through fine ( Shouldn't I be needing sudo privileges ?)
>>
>> > But when I run test2.py I am getting the following error. I need to do
>> > the same for
>>
>> > Traceback (most recent call last):
>> >  File "test2.py", line 1, in <module>
>> >    import iulib,numpy,pylab
>> > ImportError: _iulib.so: cannot open shared object file: No such file
>> > or directory
>>
>> > What am I doing wrong ?
>>
>> > thanks
>>
>> > On Jun 19, 12:38 pm, lakshmesha G V <[email protected]> wrote:
>> > > Hi Vidyanand,
>> > >  Sorry download iulib from the mercurial 
>> > > repositoryhttps://iulib.googlecode.com/hg/.
>> > > You can find the instruction in the 
>> > > sitehttp://code.google.com/p/iulib/source/checkout.
>>
>> > > These things are neccesary for ocroswig since while developing ocroswig,
>> > > some fixes were added to iulib.
>> > > So you have to use the latest iulib version. No changes were made to 
>> > > ocropus
>> > > however.
>>
>> > > Regards,
>> > > Lakshmesha
>>
>> > > On Thu, Jun 18, 2009 at 9:31 PM, vidyanand <[email protected]> wrote:
>>
>> > > > Hi Lakshmesha
>>
>> > > > I downloaded the same ( iulib-0.4 ) and installed it using scons and
>> > > > tried doing a make on ocroswig.
>>
>> > > > I still get the same error.
>>
>> > > > On Jun 18, 9:13 pm, lakshmesha G V <[email protected]> wrote:
>> > > > > Hi Vidyanand,
>> > > > >  You need to use the latest iulib for it. You can download it from 
>> > > > > the
>> > > > link
>> > > > > in sitehttp://code.google.com/p/iulib/downloads/list
>> > > > > Use it and give it a try.
>>
>> > > > > Regards,
>> > > > > Lakshmesha
>>
>> > > > > On Thu, Jun 18, 2009 at 4:48 PM, vidyanand <[email protected]> 
>> > > > > wrote:
>>
>> > > > > > Hi Thomas
>>
>> > > > > > I have ocropus 0.4 ( install from the tar file in downloads 
>> > > > > > sections)
>> > > > > > installed. I downloaded the latest version of ocroswig and am 
>> > > > > > trying
>> > > > > > to run make on it, but it fails with the following error.
>>
>> > > > > > /usr/local/include/colib/narray-util.h: In function ‘void
>> > > > > > colib::clampscale(colib::narray<T>&, colib::narray<S>&, T, T) 
>> > > > > > [with T
>> > > > > > = float, U = float]’:
>> > > > > > iulib_wrap.cxx:21719:   instantiated from here
>> > > > > > /usr/local/include/colib/narray-util.h:432: error: no matching
>> > > > > > function for call to ‘colib::narray<float>::at1d()’
>> > > > > > /usr/local/include/colib/narray.h:432: note: candidates are: T&
>> > > > > > colib::narray<T>::at1d(int) const [with T = float]
>> > > > > > /usr/local/include/colib/narray-util.h: In function ‘void
>> > > > > > colib::clampscale(colib::narray<T>&, colib::narray<S>&, T, T) 
>> > > > > > [with T
>> > > > > > = int, U = int]’:
>> > > > > > iulib_wrap.cxx:21785:   instantiated from here
>> > > > > > /usr/local/include/colib/narray-util.h:432: error: no matching
>> > > > > > function for call to ‘colib::narray<int>::at1d()’
>> > > > > > /usr/local/include/colib/narray.h:432: note: candidates are: T&
>> > > > > > colib::narray<T>::at1d(int) const [with T = int]
>> > > > > > /usr/local/include/colib/narray-util.h: In function ‘void
>> > > > > > colib::clampscale(colib::narray<T>&, colib::narray<S>&, T, T) 
>> > > > > > [with T
>> > > > > > = unsigned char, U = unsigned char]’:
>> > > > > > iulib_wrap.cxx:21851:   instantiated from here
>> > > > > > /usr/local/include/colib/narray-util.h:432: error: no matching
>> > > > > > function for call to ‘colib::narray<unsigned char>::at1d()’
>> > > > > > /usr/local/include/colib/narray.h:432: note: candidates are: T&
>> > > > > > colib::narray<T>::at1d(int) const [with T = unsigned char]
>> > > > > > make: *** [_iulib.so] Error 1
>>
>> > > > > > I am guessing the interface file is not compatible anymore with 
>> > > > > > that
>> > > > > > version. What do you suggest ?
>>
>> > > > > > I am new to theSWIGworld, but I could help out if you give me some
>> > > > > > pointers to get this to work.
>>
>> > > > > > thanks
>> > > > > > Vidyanand
>>
>> > > > > > On May 3, 5:30 am, Thomas Breuel <[email protected]> wrote:
>> > > > > > > I put up the very beginnings ofSWIGsupport in a new sub-project 
>> > > > > > > at
>> > > > > > > mercurial.iupr.org (ocroswig).
>>
>> > > > > > > If you're brave enough to compile and install the mercurial 
>> > > > > > > version
>> > > > of
>> > > > > > > OCRopus, you can give it a try.
>>
>> > > > > > > It actually can already do useful things: you can read/write 
>> > > > > > > images,
>> > > > > > convert
>> > > > > > > them to/from Python images or arrays, and you can invoke any of 
>> > > > > > > the
>> > > > major
>> > > > > > > components of OCRopus from it, including layout analysis and text
>> > > > line
>> > > > > > > recognition.  There is no documentation, though.
>>
>> > > > > > > Tom
>>
>> > > > > --
>> > > > > -Lakshmesha
>>
>> > > --
>> > > -Lakshmesha
>>
>>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"ocropus" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/ocropus?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to