joefisherman joefisherman - 1 year ago 115
C++ Question

OpenCV Makefile Error

I am new to OpenCV. I was trying to run the code in the link below on Ubuntu.

Particle Tracker

I did as they said in the README file but I could not get it work.

I get the errors in the link below when I typed

in the console.


What am I doing wrong?


Edit: I have OpenCV installed.

Answer Source

As requested, here is the makefile that worked on my system. Remember that you have to configure your build environment to find the shared libraries (e.g., either through ldconfig or LD_LIBRARY_PATH).

CFLAGS = -O2 -Wall
LIBS = -lopencv_core -lopencv_imgproc -lopencv_highgui
SRCS = main.cpp condens.cpp lbp.cpp selector.cpp filter.cpp hist.cpp
HEADERS =  condens.h lbp.h selector.h filter.h state.h hist.h

particle_tracker: $(SRCS) $(HEADERS)
        g++ $(CFLAGS) -o particle_tracker $(SRCS) $(LIBS)

.PHONY clean:
        rm -f particle_tracker particle_tracker.exe
Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download