rusmanr / video-tracker

Automatically exported from code.google.com/p/video-tracker
0 stars 0 forks source link

Error when i use make #3

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago

 Hallo,  
i have installed opencv and wxWidgets. and they r working fine. 
now when i run the make . i get the following error . i am unable to 
solve it. 

/usr/lib64/gcc/x86_64-suse-linux/4.0.2/../../../../x86_64-suse-linux/bin/ld:   
ski                                                                             
pping incompatible ./libblob.a when searching for -lblob   
/usr/lib64/gcc/x86_64-suse-linux/4.0.2/../../../../x86_64-suse-linux/bin/ld:   
ski                                                                             
pping incompatible ./libblob.a when searching for -lblob   
/usr/lib64/gcc/x86_64-suse-linux/4.0.2/../../../../x86_64-suse-linux/bin/ld:   
can                                                                             
not find -lblob   
collect2: ld returned 1 exit status   

plz help me to resolve the error. 

Regards 

Shoaib   

Original issue reported on code.google.com by donotnee...@gmail.com on 23 Apr 2007 at 9:52

GoogleCodeExporter commented 9 years ago
are you compiling it under Linux? I notice you are compiling under Suse and 64 
bit
arch. you must have a library liblob.la you can find compiled for x86 cpu here. 
http://opencvlibrary.sourceforge.net/cvBlobsLib
But you must ricompile it on your own to make it works.

Let me know,
best regards.

Original comment by iacopo.m...@gmail.com on 23 Apr 2007 at 10:01

GoogleCodeExporter commented 9 years ago
Thanks the program compiled successfully . 
But when i try to run video tracker . i get following error. 

error while loading shared libraries: libcxcore.so.1: cannot open shared object 
file: No such file or directory 

Regards 

Original comment by donotnee...@gmail.com on 23 Apr 2007 at 12:06

GoogleCodeExporter commented 9 years ago
Mhhh it seems to be a openCV core library problem. Did you install the openCv 
from a
RPM or compiling it by your self? I suggest to compiled it by yourself 
installing
moreover ffmpeg via svn with  svn checkout svn://svn.mplayerhq.hu/ffmpeg/trunk 
ffmpeg
and configuring correctly with --prefix=/usr or /opt if you are in suse.
When you compile the openCV be sure, that at the end of the 'configure' 
procedure, it
reports you something like 'ffmpeg yes and gtk yes'...

Regards,
iacopo

Original comment by iacopo.m...@gmail.com on 23 Apr 2007 at 12:11

GoogleCodeExporter commented 9 years ago
I have installed ffmpeg . But it is in folder /home/shoaib/.local  
I am using Suse but i donot have rifghts to install in usr or opt.  
Now even after installing ffmpeg. when i run configure for opencv. 
i get the ffmpeg status like this. 
 Use ffmpeg:               no 

 I donot know why the opencv donot detect ffmpeg. 

Original comment by donotnee...@gmail.com on 24 Apr 2007 at 12:10

GoogleCodeExporter commented 9 years ago
probably the error was not due to ffmpeg bkz when i used the follwing line the 
error was removed. 

export LD_LIBRARY_PATH=/home/shoaib/.local/lib:/home/shoaib/.local/lib 

i am running exe with command. 
./video-tracker 
i get 
ERROR: capture is NULL 

what are the arguments that i must give. I am new in linux . 

Regards 

Original comment by donotnee...@gmail.com on 24 Apr 2007 at 1:14

GoogleCodeExporter commented 9 years ago
Good that was an export library error!
Now you must run it with ./video-tracker video.avi

Original comment by iacopo.m...@gmail.com on 24 Apr 2007 at 1:40

GoogleCodeExporter commented 9 years ago
I have used the  
./video-tracker foreman.avi 

but the error  
ERROR: capture is NULL 

is still there 

what u say about this 

Original comment by donotnee...@gmail.com on 24 Apr 2007 at 3:01

GoogleCodeExporter commented 9 years ago
This is my output:
$ ~/src/videotracker/src >./videotracker Video/single_car2.avi

-----------
Frame #1
-----------
Frame #2
-----------
Frame #3
-----------
Frame #4
Blob center:    (x:589, y:182)
Kalman center:  (x:590, y:182)
ConDens center: (x:476, y:202)

Original comment by iacopo.m...@gmail.com on 24 Apr 2007 at 3:08

GoogleCodeExporter commented 9 years ago
can u send me this input file  
single_car2.avi 
so that i can test it on my pc. 
probably the input file may not be accepted by the program. 

Regards 

Original comment by donotnee...@gmail.com on 24 Apr 2007 at 3:28

GoogleCodeExporter commented 9 years ago
I will send you that file tomorrow...

bye

Original comment by iacopo.m...@gmail.com on 25 Apr 2007 at 9:54

GoogleCodeExporter commented 9 years ago
http://www.rogepost.com/n/0661637431
here is where you can download the video.

Enjoy!

Original comment by iacopo.m...@gmail.com on 26 Apr 2007 at 6:58

GoogleCodeExporter commented 9 years ago
I am getting the following error when I tried to run the below C++ program 
using opencv:

#include <iostream>
#include "cv.h"
#include "cxcore.h"
#include "highgui.h"
#include "BlobResult.h"
#include "BlobExtraction.h"
#include "Blob.h"
#include "BlobLibraryConfiguration.h"
#include <stdio.h>

int main( int argc, char **argv)
{
  IplImage* input;
  IplImage* output;

  input = cvLoadImage("src.jpg", 1);
  output = cvCreateImage(cvSize(input->width, input->height), IPL_DEPTH_8U, 1);

    CBlobResult blobs;
    blobs = CBlobResult(input, NULL, 100, true ); 
    int i;
    CBlob Blob;
    int iMaxx, iMinx, iMaxy, iMiny, iMeanx, iMeany; 
    // for each blob 
    for  (i=0; i<blobs.GetNumBlobs(); ++i) 
    { 
    // get the blob info 
    Blob = blobs.GetBlob(i); 
     // Get max, and min co-ordinates
    iMaxx=(int)Blob.MaxX(); 
    iMinx=(int)Blob.MinX(); 
    iMaxy=(int)Blob.MaxY(); 
    iMiny=(int)Blob.MinY(); 
    // find the average of the blob (ie estimate its centre) 
    iMeanx=(iMinx+iMaxx)/2; 
    iMeany=(iMiny+iMaxy)/2; 
    // mark centre 
    cvLine( output, cvPoint(iMeanx, iMeany), cvPoint(iMeanx, iMeany),CV_RGB(255, 0 , 0),
4, 8, 0 ); 
    // Mark box around blob
    cvRectangle (output, cvPoint (iMinx, iMiny), cvPoint (iMaxx,iMaxy ), CV_RGB(255,
255, 255), 1, 8, 0); 
// print the blob centres 
    printf("n%d, X: %d, Y: %dn", i, iMeanx, iMeany); 
    } 

    cvNamedWindow("inputimage", CV_WINDOW_AUTOSIZE);
    cvNamedWindow("outputimage",1);
    cvShowImage("inputimage", input);
    cvShowImage("outputimage",output);

    cvWaitKey(0);

    cvReleaseImage( &input );
    cvReleaseImage( &output);
    //cvReleaseImage( &dst );
    cvDestroyAllWindows(); 
    return 0;
}

error:
-------

Building target: blobtracking
Invoking: GCC C++ Linker
g++ -L/usr/lib -Xlinker -lcxcore -lcv -lhighgui -lBlob -lBlobResult
-lBlobLibraryConfiguration -lBlobExtraction -o"blobtracking"  ./src/blobtrack.o 

-lcv -lBlobExtraction -lBlobLibraryConfiguration -lBlob -lBlobResult -lhighgui 
-lcvaux
/usr/bin/ld: cannot find -lBlob
collect2: ld returned 1 exit status
make: *** [blobtracking] Error 1
make: Target `all' not remade because of errors.
Build complete for project blobtracking

----------------------------------------------------------

I tried to compile the above program in ubuntu 7.10 and eclipse
I included the following in project properties in both debug and release mode:
In GC++ Linker -> Libraries -> cv highgui cvaux Blob BlobExtraction BlobResult 
and
                               BlobLibraryConfiguration
               -> in miscellaneous -> -lcxcore -lcv -lhighgui -lBlob -lBlobResult  
                                      -lBlobLibraryConfiguration -lBlobExtraction

Still i m getting the error.
Please help me to resolve this error. Very urgent.

Regards 
Priya

Original comment by priyakri...@gmail.com on 30 Jan 2009 at 6:52

GoogleCodeExporter commented 9 years ago
The error seems caused by the linker that doesn't load the correct dynamic 
library 
Blob.so one passed throughout -lBlob parameter.
Moreover why do you pass two times the library at the linker?

g++ -L/usr/lib -Xlinker -lcxcore -lcv -lhighgui -lBlob -lBlobResult
-lBlobLibraryConfiguration -lBlobExtraction (first time)-o"blobtracking" 
./src/blobtrack.o  
-lcv -lBlobExtraction -lBlobLibraryConfiguration -lBlob -lBlobResult -lhighgui
-lcvaux (second time)

change that in :

g++  ./src/blobtrack.o  -o blobtracking -L/usr/lib -lcv -lBlobExtraction
-lBlobLibraryConfiguration -lBlob -lBlobResult -lhighgui -lcvaux 

In my program I put the libblob.a static library in the same directory of the 
binary
and then passed the compiler this: -L. -lblob

Where did you pick the Blob library?

Original comment by iacopo.m...@gmail.com on 30 Jan 2009 at 10:20

GoogleCodeExporter commented 9 years ago
I downloaded the blobs library for linux from
http://opencv.willowgarage.com/wiki/cvBlobsLib.

I put libblob.a in the same directory of the binary.
Then I compiled the program. Still error.
/usr/bin/ld: cannot find -lBlob
collect2: ld returned 1 exit status-lBlob

Can you tell me where to change 
g++  ./src/blobtrack.o  -o blobtracking -L/usr/lib -lcv -lBlobExtraction
-lBlobLibraryConfiguration -lBlob -lBlobResult -lhighgui -lcvaux 

Original comment by priyakri...@gmail.com on 2 Feb 2009 at 5:14

GoogleCodeExporter commented 9 years ago
if the filename of the library is liblob.a try to pass the compier -lblob 
withouth 
the "B", but with "b" in the same case of the filename.

This option can be set in Eclipse Project under C/C++ Linker options when you 
set 
the linking library. So try to erase the string in Eclipse in Miscellaneous.

Original comment by iacopo.m...@gmail.com on 2 Feb 2009 at 12:24

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
my program is in the following directory:

/abc/workspace/blobdetection:

I am using eclipse cdt in ubuntu 7.10.
I tried to write the C++ code using opencv and 
eclipse by managed make c++ project.

in the blob detection program I included the following headers.

#include <iostream>
#include "cv.h"
#include "cxcore.h"
#include "highgui.h"
#include "BlobResult.h"
#include "BlobExtraction.h"
#include "Blob.h"
#include <stdio.h>

and in project -->properties --> C/C++ Build --> Tool settings

-->GCC C++ Linker-->Libraries--> cv
                 highgui
                     Blob
                 BlobResult
                 BlobExtraction 
         --> Libraries seach path-->/usr/lib    
         --> miscellaneous->-lcxcore -lcv -lhighgui -lBlob -lBlobResult     
                                    -lBlobExtraction 

I tried sudo make in the terminal from the /abc/workspace/blobdetection 
directory.
But its not generatin libblob.a 

error: /usr/bin/ld: cannot find -lBlob

Original comment by priyakri...@gmail.com on 4 Feb 2009 at 5:35

GoogleCodeExporter commented 9 years ago
I explained you why you get this error: the linker system does not find the 
library
lBlob. 
First of all if you set the GCC C++ Linker-->Libraries, you don't have to do 
twice in
the miscellaneous->-lcxcore -lcv -lhighgui -lBlob -lBlobResult          
-lBlobExtraction . So erares the "miscellanesous" string in Eclipse.
Then the library path of opencv is correct /usr/lib, but instead what is the 
library
path of the other Blob Lib?

Follow me: but the lblob.a file taken from this svn and put it in
/abc/workspace/blobdetection and then fix the Eclipse project like this:

GCC C++ Linker-->Libraries--> cv
                  highgui
                              cxcore
                  blob

Tell me the result, however I suggest you to experience with command line
compiling,linking, static/dyanmic library  and the Makefile env. under Linux.
The Eclipse CDT configuration tools is only a GUI to configure the Makefile to
compile the project.
http://en.wikipedia.org/wiki/Make_(software)

Original comment by iacopo.m...@gmail.com on 4 Feb 2009 at 9:19

GoogleCodeExporter commented 9 years ago
[deleted comment]
GoogleCodeExporter commented 9 years ago
thanks a lot for ur help. I put libblob.a in /usr/lib not in
/abc/workspace/blobdetection.
In c++ linker --> cv
                  highgui
                  blob

            --> Libraries seach path-->/usr/lib 
        --> miscellaneous->-lcxcore -lcv -lhighgui -lblob 

its working now.
Once again thanks.

Original comment by priyakri...@gmail.com on 4 Feb 2009 at 12:13

GoogleCodeExporter commented 9 years ago
Ok! Well done. You are welcome. The best of development in linux is that "you 
understand what you are doing" because the shell is difficult, but if you keep 
in 
mind what writing, you cannot go wrong. This is the opposite that happens when 
you 
use the IDE and wizard env. Thery are good to use if you have a previous idea 
of how 
works the things "under the hood".

Original comment by iacopo.m...@gmail.com on 4 Feb 2009 at 12:47