If you have OpenCV 2.3, then yes, change the paths to match your system.
Here is simplified .pro file, fill the paths yourself:
TEMPLATE = app
DESTDIR = bin
TARGET = cvexample
DEPENDPATH += . src/cpp src/h src/ui
INCLUDEPATH += . src/h
UI_DIR = build
MOC_DIR = build
build_pass:CONFIG(debug, debug|release){
OBJECTS_DIR = build/debug
} else{
OBJECTS_DIR = build/release
}
# here, fille the correct path, if you have Opencv 2.3 in C:/OpenCV2.3/ then leave this as is
CV22_INCLUDE = C:/OpenCV2.3/modules
CV22_LIB = C:/OpenCV2.3/build/bin
DEFINES += OPEN_CV_22
INCLUDEPATH += $$CV22_INCLUDE/core/include/opencv2/core \
$$CV22_INCLUDE/highgui/include/opencv2/highgui \
$$CV22_INCLUDE/imgproc/include/opencv2/imgproc \
$$CV22_INCLUDE/core/include\
$$CV22_INCLUDE/imgproc/include
LIBS += -L$$CV22_LIB
LIBS += -lopencv_highgui230 -lopencv_core230 -lopencv_imgproc230
HEADERS += src/h/ImageCapture.h src/h/MainWidget.h
FORMS += src/ui/MainWidget.ui
SOURCES += src/cpp/ImageCapture.cpp src/cpp/MainWidget.cpp main.cpp
TEMPLATE = app
DESTDIR = bin
TARGET = cvexample
DEPENDPATH += . src/cpp src/h src/ui
INCLUDEPATH += . src/h
UI_DIR = build
MOC_DIR = build
build_pass:CONFIG(debug, debug|release){
OBJECTS_DIR = build/debug
} else{
OBJECTS_DIR = build/release
}
# here, fille the correct path, if you have Opencv 2.3 in C:/OpenCV2.3/ then leave this as is
CV22_INCLUDE = C:/OpenCV2.3/modules
CV22_LIB = C:/OpenCV2.3/build/bin
DEFINES += OPEN_CV_22
INCLUDEPATH += $$CV22_INCLUDE/core/include/opencv2/core \
$$CV22_INCLUDE/highgui/include/opencv2/highgui \
$$CV22_INCLUDE/imgproc/include/opencv2/imgproc \
$$CV22_INCLUDE/core/include\
$$CV22_INCLUDE/imgproc/include
LIBS += -L$$CV22_LIB
LIBS += -lopencv_highgui230 -lopencv_core230 -lopencv_imgproc230
HEADERS += src/h/ImageCapture.h src/h/MainWidget.h
FORMS += src/ui/MainWidget.ui
SOURCES += src/cpp/ImageCapture.cpp src/cpp/MainWidget.cpp main.cpp
To copy to clipboard, switch view to plain text mode
Bookmarks