From: Abhishek D. <adu...@gm...> - 2012-03-30 15:54:10
|
Glad to hear that you are moving ahead. Yes, you are right. We did not use any standard debugging tools. Some printf() statements placed at strategic locations helped get along. But you are welcome to use some standard logging tool. To be honest, I do not remember the if we used any standard file format. Sorry about that. :) Bye On Thu, Mar 29, 2012 at 12:48 PM, Chris Hellberg <ch...@ch...>wrote: > Thanks Abhishek. That didn't directly fix the problem but it tidied thigs > up and it turns out I had to add the omp library as well as -lboost_system. > > Now it's compiled ok, but bailing after I try to feed it a file: > > chellberg@chellberg-t400:~/**code/rtftr-0.2-ch$ ./rtftr > > Real Time Face Tracking and Recognition (RTFTR) - version 0.2rc1 > Visit http://rtftr.sourceforge.net for details > See COPYING file, that came with the source, for the license. > > [avi @ 0x97f0c00] non-interleaved AVI > [avi @ 0x97c7920] non-interleaved AVI > FaceInfoManager: Read total 4 records from '/home/chellberg/code/rtftr-0.* > *2-ch/data/common/**TrainiFaceInfo_DataFile.xml' file > Initializing Adaboost module ... Done > Initializing Haar cascaded module(OpenCV) ... Done > Initializing kepenekci module ...terminate called after throwing an > instance of 'boost::archive::archive_**exception' > what(): input stream error > Аварийный останов > > > But I'm happy with small victories and I'll start adding in some debug > options to see where things are bailing. I didn't notice any debug flags > anywhere in the code. Were you guys just setting breakpoints and custom > debug output as you went? > > Also, is there any particular format that you fed it or it requires? > > /Chris > 28/03/12 20:40, Abhishek Dutta написал: > >> For example: if there is a library /usr/lib64/libABCDE.so, the to >> compile a program that uses this library, you have to do something like >> this: >> >> gcc -o test -I/usr/local/include/ABCDE -L/usr/lib64/ -l*ABCDE* test.cc >> >> >> (-l options specified the library to link and -L describes the location >> of where the library can be found). >> >> Hope this helps :) >> >> Bye >> >> On Wed, Mar 28, 2012 at 8:03 PM, <ch...@ch... >> <mailto:chris@chrishellberg.**com <ch...@ch...>>> wrote: >> >> __ >> >> Thanks Lakesh. I've specified the full path of the octave library in >> the linker - is my syntax ok or do I need to use -l before the >> library name or something else? I tried that just to check but seems >> to make it worse. >> >> /chris >> Enviado desde mi dispositivo BlackBerry® de Orange. >> ------------------------------**------------------------------** >> ------------ >> *From: * lakesh <lak...@gm... >> <mailto:lakesh.kansakar@gmail.**com <lak...@gm...>>> >> *Date: *Wed, 28 Mar 2012 11:48:43 -0400 >> *To: *Chris Hellberg<chris@chrishellberg.**com<ch...@ch...> >> <mailto:chris@chrishellberg.**com <ch...@ch...>>> >> *Cc: *Abhishek Dutta<adu...@gm... >> <mailto:adu...@gm...>>; <rtftr-devel@lists.**sourceforge.net<rtf...@li...> >> <mailto:rtftr-devel@lists.**sourceforge.net<rtf...@li...> >> >> >> *Subject: *Re: [Rtftr-devel] Linked libraries >> >> >> Hi Chris, >> >> I think it is the issue with linking the library I guess. You have >> installed the octave and boost library, they are present in the lib >> folder, but when you compile the project you need to provide the >> path to those libraries as well. Looking at the log, it shows that >> it couldn't find the libraries. So, I think it is the issue with the >> path. >> >> On Wed, Mar 28, 2012 at 9:59 AM, Chris Hellberg >> <ch...@ch... <mailto:chris@chrishellberg.**com<ch...@ch...>>> >> wrote: >> >> Hi Abhishek, >> >> Thanks - that's good to hear :) >> >> I made a couple of changes - updated the boost filesystem to be v3 >> compatible and added absolute library references into the >> Makefiles. >> >> But there are a couple of errors that I can't quite figure out. >> When I >> make from the top of the source dir, I get the following compile >> errors >> (plus many more that are similar): >> >> make[2]: Вход в каталог `/home/chellberg/code/rtftr-0.**2-ch' >> g++ -DHAVE_CONFIG_H -I. -I./src -I/usr/local/include/octave-3.** >> 4.3 >> -I./src/adaboost -I./src/kepenekci -I./src/rowleynn >> -I./src/subspacelda >> -I/usr/include/gtk-2.0 -I/usr/include/glib-2.0 >> -I/usr/lib/i386-linux-gnu/**glib-2.0/include >> -I/usr/include/glib-2.0/glib >> -I/usr/include/cairo -I/usr/include/pango-1.0 >> -I/usr/lib/i386-linux-gnu/gtk-**2.0/include >> -I/usr/include/gdk-pixbuf-2.0 >> -I/usr/include/atk-1.0 -I/usr/include/libxml2 -I/usr/local/include >> -I/usr/include -g -O2 -MT RtftrUserInterface.o -MD -MP -MF >> .deps/RtftrUserInterface.Tpo -c -o RtftrUserInterface.o >> RtftrUserInterface.cc >> mv -f .deps/RtftrUserInterface.Tpo .deps/RtftrUserInterface.Po >> /bin/bash ./libtool --tag=CXX --mode=link g++ -g -O2 -g -Wall >> -DHAVE_CONFIG -o rtftr RtftrUserInterface.o >> /usr/local/lib/octave/3.4.3/**liboctave.so >> ./src/subspacelda/librtftr_**subspacelda.a >> ./src/kepenekci/librtftr_**kepenekci.a >> ./src/adaboost/librtftr_**adaboost.a >> ./src/librtftr_common.a -lxml2 -lml -lfftw3 -lvigraimpex -lcvaux >> -lhighgui -lcv /usr/lib/libboost_**serialization.so >> /usr/lib/libboost_filesystem.**so /usr/lib/libcxcore.so.2.1 >> mkdir .libs >> g++ -g -O2 -g -Wall -DHAVE_CONFIG -o rtftr RtftrUserInterface.o >> /usr/local/lib/octave/3.4.3/**liboctave.so >> /usr/lib/libboost_**serialization.so /usr/lib/libboost_filesystem. >> **so >> /usr/lib/libcxcore.so.2.1 ./src/subspacelda/librtftr_** >> subspacelda.a >> ./src/kepenekci/librtftr_**kepenekci.a >> ./src/adaboost/librtftr_**adaboost.a >> ./src/librtftr_common.a /usr/lib/libxml2.so -lml >> /usr/lib/libfftw3.so >> -lm /usr/local/lib/libvigraimpex.**so -lpng12 -lcvaux -lhighgui >> -lcv >> ./src/subspacelda/librtftr_**subspacelda.a(**SubspaceRecognize.o): >> In >> function `SubspaceRecognize::Recognize(**_IplImage*)': >> /home/chellberg/code/rtftr-0.**2-ch/src/subspacelda/** >> SubspaceRecognize.cc:223: >> undefined reference to `operator*(Matrix const&, Matrix const&)' >> /home/chellberg/code/rtftr-0.**2-ch/src/subspacelda/** >> SubspaceRecognize.cc:225: >> undefined reference to `operator*(Matrix const&, Matrix const&)' >> /home/chellberg/code/rtftr-0.**2-ch/src/subspacelda/** >> SubspaceRecognize.cc:227: >> undefined reference to `operator*(Matrix const&, Matrix const&)' >> /home/chellberg/code/rtftr-0.**2-ch/src/subspacelda/** >> SubspaceRecognize.cc:228: >> undefined reference to `operator*(Matrix const&, Matrix const&)' >> ./src/subspacelda/librtftr_**subspacelda.a(**SubspaceRecognize.o): >> In >> function `Array': >> /usr/local/include/octave-3.4.**3/octave/Array.h:199: undefined >> reference >> to `dim_vector::safe_numel() const' >> /usr/local/include/octave-3.4.**3/octave/Array.h:201: undefined >> reference >> to `Array<double>::fill(double const&)' >> ./src/subspacelda/librtftr_**subspacelda.a(**SubspaceRecognize.o): >> In >> function `MArray<double>::transpose() const': >> /usr/local/include/octave-3.4.**3/octave/MArray.h:84: undefined >> reference >> to `Array<double>::transpose() const' >> ./src/subspacelda/librtftr_**subspacelda.a(**SubspaceRecognize.o): >> In >> function `Array<double>::as_matrix() const': >> /usr/local/include/octave-3.4.**3/octave/Array.h:292: undefined >> reference >> to `dim_vector::redim(int) const' >> ./src/subspacelda/librtftr_**subspacelda.a(SubspaceTrain.o)**: In >> function >> `Array': >> /usr/local/include/octave-3.4.**3/octave/Array.h:199: undefined >> reference >> to `dim_vector::safe_numel() const' >> /usr/local/include/octave-3.4.**3/octave/Array.h:201: undefined >> reference >> to `Array<double>::fill(double const&)' >> ./src/subspacelda/librtftr_**subspacelda.a(TrainImageMapIO.**o): >> In >> function >> `binary_oarchive_impl': >> /usr/include/boost/archive/**binary_oarchive_impl.hpp:84: >> undefined >> reference to >> `boost::archive::basic_binary_**oprimitive<boost::archive::** >> binary_oarchive, >> char, >> std::char_traits<char> >> >::basic_binary_oprimitive(**std::basic_streambuf<char, >> std::char_traits<char> >&, bool)' >> ./src/subspacelda/librtftr_**subspacelda.a(TrainImageMapIO.**o): >> In >> function >> `common_oarchive': >> /usr/include/boost/archive/**detail/common_oarchive.hpp:75: >> undefined >> reference to >> `boost::archive::detail::**basic_oarchive::basic_** >> oarchive(unsigned >> int)' >> ./src/subspacelda/librtftr_**subspacelda.a(TrainImageMapIO.**o): >> In >> function >> `invoke<TrainImageMap>': >> /usr/include/boost/archive/**detail/oserializer.hpp:253: undefined >> reference to >> `boost::archive::detail::**basic_oarchive::save_object(**void >> const*, boost::archive::detail::basic_**oserializer const&)' >> ./src/subspacelda/librtftr_**subspacelda.a(TrainImageMapIO.**o): >> In >> function >> `~common_oarchive': >> >> >> The octave library is present: >> >> chellberg@chellberg-t400:~$ ls -la >> /usr/local/lib/octave/3.4.3/**liboctave.so >> lrwxrwxrwx 1 root root 18 2012-03-28 03:00 >> /usr/local/lib/octave/3.4.3/**liboctave.so -> liboctave.so.0.0.0 >> chellberg@chellberg-t400:~$ >> >> The offending lines are: >> >> 221: Matrix projected_image; >> 222: if(mAlgorithm == "PCA") { >> 223: projected_image = mSubspace.transpose() * test_image; >> 224: } else if(mAlgorithm == "LDA") { >> 225: projected_image = mSubspace * test_image; >> 226: if(mSeparateNonFaces == true) { >> 227: Matrix projected_image_for_filtration = >> mSubspaceForFiltration.**transpose() * test_image; >> 228: Matrix reconstructed_image = >> mSubspaceForFiltration * >> projected_image_for_**filtration; >> 229: float sum = 0; >> 230: for(int i = 0; i < reconstructed_image.rows(); >> i++) { >> 231: sum += (reconstructed_image.elem(i,0) - >> test_image.elem(i,0)) * (reconstructed_image.elem(i,0) - >> test_image.elem(i,0)); >> 232: } >> 233: float distance = sqrt(sum); >> 234: if(distance >= (mThreshold1 *mMaxDistance ) ) { >> 235: return -2; >> 256: } >> 237: } >> 238: } >> >> >> Not quite sure what isn't being included properly by the linker. >> >> Cheers, >> >> Chris >> >> 28/03/12 13:13, Abhishek Dutta написал: >> > Yes, we are excited to see you join us. Thanks for that. >> > >> > Start firing your questions :) >> > >> > Good luck >> > Abhishek >> > >> > On Wed, Mar 28, 2012 at 12:56 PM, <ch...@ch... >> <mailto:chris@chrishellberg.**com <ch...@ch...>> >> > <mailto:chris@chrishellberg.**com <ch...@ch...> >> >> <mailto:chris@chrishellberg.**com <ch...@ch...>>>> >> wrote: >> > >> > Hi Guys, >> > >> > I've started updating a local copy of rtftr source to >> address newer >> > versions of libraries that rtftr references. I've fixed >> several of >> > them but stumped on a couple of issues. >> > >> > Are you guys still around to help with a couple of linker >> problems? >> > >> > Cheers, >> > >> > Chris >> > Enviado desde mi dispositivo BlackBerry® de Orange. >> > >> ------------------------------**------------------------------** >> ------------------ >> > This SF email is sponsosred by: >> > Try Windows Azure free for 90 days Click Here >> > http://p.sf.net/sfu/sfd2d-**msazure<http://p.sf.net/sfu/sfd2d-msazure> >> > ______________________________**_________________ >> > Rtftr-devel mailing list >> > Rtf...@li...urceforge.**net<Rtf...@li...> >> <mailto:Rtftr-devel@lists.**sourceforge.net<Rtf...@li...> >> > >> > <mailto:Rtftr-devel@lists.**sourceforge.net<Rtf...@li...> >> >> <mailto:Rtftr-devel@lists.**sourceforge.net<Rtf...@li...> >> >> >> > https://lists.sourceforge.net/**lists/listinfo/rtftr-devel<https://lists.sourceforge.net/lists/listinfo/rtftr-devel> >> > >> > >> > >> > >> > -- >> > Abhishek >> > http://abhishekdutta.org >> >> >> ------------------------------**------------------------------** >> ------------------ >> This SF email is sponsosred by: >> Try Windows Azure free for 90 days Click Here >> http://p.sf.net/sfu/sfd2d-**msazure<http://p.sf.net/sfu/sfd2d-msazure> >> ______________________________**_________________ >> Rtftr-devel mailing list >> Rtf...@li...urceforge.**net<Rtf...@li...> >> <mailto:Rtftr-devel@lists.**sourceforge.net<Rtf...@li...> >> > >> https://lists.sourceforge.net/**lists/listinfo/rtftr-devel<https://lists.sourceforge.net/lists/listinfo/rtftr-devel> >> >> >> >> >> -- >> Have a nice day >> >> >> >> >> -- >> Abhishek >> http://abhishekdutta.org >> > > -- Abhishek http://abhishekdutta.org |