summaryrefslogtreecommitdiff
path: root/opencv-qt-integration-1
diff options
context:
space:
mode:
Diffstat (limited to 'opencv-qt-integration-1')
-rw-r--r--opencv-qt-integration-1/README.md15
1 files changed, 13 insertions, 2 deletions
diff --git a/opencv-qt-integration-1/README.md b/opencv-qt-integration-1/README.md
index 8e1de16..11142c8 100644
--- a/opencv-qt-integration-1/README.md
+++ b/opencv-qt-integration-1/README.md
@@ -1,7 +1,7 @@
OpenCV - Qt Integration
=======================
-This sample demonstrate how to display OpenCV's `cv::Mat` within a Qt GUI. Tested with Qt 5.3.0 on Mac OS X.
+This code sample shows the basics to display OpenCV's matrix (`cv::Mat`) within a Qt GUI. The code simply load the `flughahn.jpg` image from the `assets/` directory and display it using the `QLabel` widget.
![Screenshot](http://i.imgur.com/k1et0FY.png)
@@ -10,7 +10,7 @@ Within the `python/` directory, you will see the same code written in Python.
Compiling
---------
-Open `ImageViewer.pro` and modify the variables to match with your system. For example, you might need to modify the paths for includes and libraries especially if you're on Windows.
+Open `ImageViewer.pro` and modify the variables to match with your system. For example, you might need to modify the paths for the includes and libraries especially if you're on Windows.
INCLUDEPATH += /usr/local/include
LIBS += -L/usr/local/lib -lopencv_core -lopencv_highgui -lopencv_imgproc -lopencv_imgcodecs
@@ -21,3 +21,14 @@ Change your working directory and compile the code by typing:
make
If everything is ok, it will produce an executable: `ImageViewer` (Linux), `ImageViewer.exe` (Windows), or `ImageViewer.app` (Mac). Run the executable and you will see the GUI like the screenshot above.
+
+Known Issues
+------------
+
+The code using relative path to locate the input image:
+
+ img = cv::imread("../assets/flughahn.jpg");
+
+If the program cannot display the image and shows the "Cannot load the input image!" warning, try to use absolute path instead. For example:
+
+ img = cv::imread("/full/path/to/flughahn.jpg");