Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to compile opencv Hough forest implementation by Gall and Lempitsky
    primarykey
    data
    text
    <p>I'm trying to compile Gall and Lempitsky's Hough forest implementation written for opencv.</p> <p>It can be downloaded from their website <a href="http://www.vision.ee.ethz.ch/~gallju/projects/houghforest/index.html" rel="nofollow">here</a> <a href="http://www.mirrorcreator.com/files/0L6HNLEY/forest.tar.gz_links" rel="nofollow">[mirrors]</a>.</p> <p>It looks like it's having issues finding opencv. I installed opencv 2.3.1 (or 2.4.4 I'm not sure) on ubuntu using <code>sudo apt-get install libopencv-dev opencv-doc</code> and I can compile and run the examples in <code>/usr/share/doc/opencv-doc/examples</code></p> <p>I changed the make file paths as follows:</p> <pre><code># change paths if necessary # INCLUDES = -I/usr/pack/opencv-1.0.0-dr/amd64-debian-linux4.0/include/opencv # LIBS = -lcxcore -lcv -lcvaux -lhighgui -lml # LIBDIRS = -L/usr/pack/opencv-1.0.0-dr/amd64-debian-linux4.0/lib INCLUDES = -I/usr/include/opencv LIBS = -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_objdetect -lopencv_photo -lopencv_stitching -lopencv_ts -lopencv_video -lopencv_videostab LIBDIRS = -L/usr/lib </code></pre> <p>and the errors I get when I run <code>make all</code> are:</p> <pre><code>g++ -c -I/usr/include/opencv CRForest-Detector.cpp -O3 -Wno-deprecated CRForest-Detector.cpp: In function ‘void run_train()’: CRForest-Detector.cpp:543:27: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result] CRForest-Detector.cpp: In function ‘void run_detect()’: CRForest-Detector.cpp:521:27: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result] g++ -c -I/usr/include/opencv CRPatch.cpp -O3 -Wno-deprecated g++ -c -I/usr/include/opencv HoG.cpp -O3 -Wno-deprecated g++ -c -I/usr/include/opencv CRForestDetector.cpp -O3 -Wno-deprecated g++ -c -I/usr/include/opencv CRTree.cpp -O3 -Wno-deprecated g++ -L/usr/lib -lopencv_calib3d -lopencv_contrib -lopencv_core -lopencv_features2d -lopencv_flann -lopencv_highgui -lopencv_imgproc -lopencv_legacy -lopencv_ml -lopencv_objdetect -lopencv_photo -lopencv_stitching -lopencv_ts -lopencv_video -lopencv_videostab -o CRForest-Detector CRForest-Detector.o CRPatch.o HoG.o CRForestDetector.o CRTree.o -O3 -Wno-deprecated CRForest-Detector.o: In function `detect(CRForestDetector&amp;)': CRForest-Detector.cpp:(.text+0x3340): undefined reference to `cvLoadImage' CRForest-Detector.cpp:(.text+0x34a3): undefined reference to `cvCreateImage' CRForest-Detector.cpp:(.text+0x357b): undefined reference to `cvCreateImage' CRForest-Detector.cpp:(.text+0x35d9): undefined reference to `cvConvertScale' CRForest-Detector.cpp:(.text+0x3620): undefined reference to `cvSaveImage' CRForest-Detector.cpp:(.text+0x3634): undefined reference to `cvReleaseImage' ... </code></pre> <p>What do I need to change so that g++ sees the necessary libraries? How would I check if the required libraries are installed?</p> <hr> <p>EDIT:</p> <p>this is the output of <code>pkg-config --modversion opencv</code>: 2.4.4</p> <p>this is the output of <code>/usr/lib$ ls | grep "opencv"</code></p> <pre><code>libopencv_calib3d.a libopencv_calib3d.so libopencv_calib3d.so.2.3 libopencv_calib3d.so.2.3.1 libopencv_contrib.a libopencv_contrib.so libopencv_contrib.so.2.3 libopencv_contrib.so.2.3.1 libopencv_core.a libopencv_core.so libopencv_core.so.2.3 libopencv_core.so.2.3.1 libopencv_features2d.a libopencv_features2d.so libopencv_features2d.so.2.3 libopencv_features2d.so.2.3.1 libopencv_flann.a libopencv_flann.so libopencv_flann.so.2.3 libopencv_flann.so.2.3.1 libopencv_gpu.a libopencv_gpu.so libopencv_gpu.so.2.3 libopencv_gpu.so.2.3.1 libopencv_highgui.a libopencv_highgui.so libopencv_highgui.so.2.3 libopencv_highgui.so.2.3.1 libopencv_imgproc.a libopencv_imgproc.so libopencv_imgproc.so.2.3 libopencv_imgproc.so.2.3.1 libopencv_legacy.a libopencv_legacy.so libopencv_legacy.so.2.3 libopencv_legacy.so.2.3.1 libopencv_ml.a libopencv_ml.so libopencv_ml.so.2.3 libopencv_ml.so.2.3.1 libopencv_objdetect.a libopencv_objdetect.so libopencv_objdetect.so.2.3 libopencv_objdetect.so.2.3.1 libopencv_video.a libopencv_video.so libopencv_video.so.2.3 libopencv_video.so.2.3.1 </code></pre> <p>and the output of <code>/usr/include/opencv$ ls | grep ''</code></p> <pre><code>cvaux.h cvaux.hpp cv.h cv.hpp cvwimage.h cxcore.h cxcore.hpp cxeigen.hpp cxmisc.h highgui.h ml.h </code></pre> <p>are all the files I need here or am I missing something?</p> <hr> <p>EDIT 2:</p> <p>changed my includes and libs to the following as suggested: </p> <pre><code>INCLUDES = -I/usr/include/opencv LIBS = /usr/lib/libopencv_core.so /usr/lib/libopencv_highgui.so /usr/lib/libopencv_imgproc.so LIBDIRS = -L/usr/lib </code></pre> <p>which results in the following output:</p> <pre><code>user@user:~/Code/hough_forest$ make clean rm -f *.o *~ CRForest-Detector user@user:~/Code/hough_forest$ make all g++ -c -I/usr/include/opencv CRForest-Detector.cpp -O3 -Wno-deprecated CRForest-Detector.cpp: In function ‘void run_train()’: CRForest-Detector.cpp:543:27: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result] CRForest-Detector.cpp: In function ‘void run_detect()’: CRForest-Detector.cpp:521:27: warning: ignoring return value of ‘int system(const char*)’, declared with attribute warn_unused_result [-Wunused-result] g++ -c -I/usr/include/opencv CRPatch.cpp -O3 -Wno-deprecated g++ -c -I/usr/include/opencv HoG.cpp -O3 -Wno-deprecated g++ -c -I/usr/include/opencv CRForestDetector.cpp -O3 -Wno-deprecated g++ -c -I/usr/include/opencv CRTree.cpp -O3 -Wno-deprecated g++ -L/usr/lib /usr/lib/libopencv_core.so /usr/lib/libopencv_highgui.so /usr/lib/libopencv_imgproc.so -o CRForest-Detector CRForest-Detector.o CRPatch.o HoG.o CRForestDetector.o CRTree.o -O3 -Wno-deprecated CRForest-Detector.o: In function `detect(CRForestDetector&amp;)': CRForest-Detector.cpp:(.text+0x3a87): undefined reference to `cvLoadImage' CRForest-Detector.cpp:(.text+0x3b9e): undefined reference to `cvCreateImage' CRForest-Detector.cpp:(.text+0x3c61): undefined reference to `cvCreateImage' CRForest-Detector.cpp:(.text+0x3cae): undefined reference to `cvConvertScale' CRForest-Detector.cpp:(.text+0x3d03): undefined reference to `cvSaveImage' CRForest-Detector.cpp:(.text+0x3d12): undefined reference to `cvReleaseImage' CRForest-Detector.cpp:(.text+0x3d39): undefined reference to `cvReleaseImage' CRForest-Detector.cpp:(.text+0x3d67): undefined reference to `cvReleaseImage' ... </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload