Page 4 of 5 FirstFirst ... 2345 LastLast
Results 31 to 40 of 43

Thread: How to install these programs?

  1. #31
    Join Date
    Apr 2012
    Beans
    7,256

    Re: How to install these programs?

    OK that looks good

    I'm not sure how far you got in installing 2.1.0 from source but we should probably at least try to run the uninstall to minimize the chances of confusing the package management system. So go to your OpenCV 2.1.0 Build directory and

    Code:
    /usr/local/src/OpenCV-2.1.0-patched-V4L$ cd Build/
    /usr/local/src/OpenCV-2.1.0-patched-V4L/Build$ sudo make uninstall
    It should give you an output something like

    Code:
    Scanning dependencies of target uninstall
    .
    .
    .
    For example mine gives

    Code:
    Scanning dependencies of target uninstall
    CMake Error at cmake_uninstall.cmake:6 (MESSAGE):
      Cannot find install manifest:
      "/usr/local/src/OpenCV-2.1.0-patched-V4L/Build/install_manifest.txt"
    
    
    make[3]: *** [CMakeFiles/uninstall] Error 1
    make[2]: *** [CMakeFiles/uninstall.dir/all] Error 2
    make[1]: *** [CMakeFiles/uninstall.dir/rule] Error 2
    make: *** [uninstall] Error 2
    because I didn't actually install anything. If it either (1) finds no manifest (like mine) or finds it and successfully deletes everything then you can move on and install the above packages from the repositories, either via a package manager such as Synaptic or just with apt-get:

    Code:
    sudo apt-get install libopencv-dev libopencv-highgui-dev libcv-dev libhighgui-dev
    Then you can EITHER start with a completely fresh copy of headtrack and patch both the headtrack.c source code and Makefile, or start from where you are and just patch headtrack.c - the only change I had to make to headtrack.c is that the cvHaarDetectObjects function now takes a max size as well as a min size for the target: I don't know what the 'right' thing to put in there is, but it seems to work OK if you just set the max size equal to the size of the image:

    i.e.

    Code:
          faces = cvHaarDetectObjects( imggray, cascade, store, HAAR_SCALE, 2, 
                                       BIGGEST + ROUGH, SEARCH_SIZE);
    becomes
    Code:
          faces = cvHaarDetectObjects( imggray, cascade, store, HAAR_SCALE, 2, 
                                       BIGGEST + ROUGH, SEARCH_SIZE, cvGetSize(imggray));
    and so on (there are 3 such replacements in total). You can edit them manually or apply one of the attached patches; either

    Code:
    t61p:/usr/local/src$ cd headtrack
    t61p:/usr/local/src/headtrack$ patch -p1 < ../patch-headtrack-OpenCV2.3.txt
    t61p:/usr/local/src/headtrack$ make
    or if you want to start over and patch the source code and the original Makefile (I have tidied up the Makefile and added back the flightgear stuff since yesterday so that would be my recommendation)

    Code:
     t61p:/usr/local/src$ cd headtrack
    t61p:/usr/local/src/headtrack$ patch -p1 < ../patch-headtrack-OpenCV2.3-newmake.txt
    t61p:/usr/local/src/headtrack$ make
    both assuming that the patch file(s) are in the /usr/local/src directory on the same level as the top level headtrack directory.

    Since this way builds against properly installed system libraries, there's no need for the LD_LIBRARY_PATH hack, if 'make' succeeds you should be able to run it with

    Code:
    t61p:/usr/local/src/headtrack$ ./headtrack
    Or with the new Makefile you can 'make install' which will put it in the /usr/local/bin directory which is probably on your path so you can invoke from anywhere as

    Code:
    $ headtrack
    Good luck

  2. #32
    Join Date
    Jan 2010
    Beans
    103

    Re: How to install these programs?

    I feel a bit like someone learning a new language who's confronted with a native speaker who talks so fast he can't keep up! I've installed OpenCV-2.3 which is in /usr/include (in fact there are 2 folders, opencv which just includes a few files, and opencv2 which seems to be the full monty, not sure if the 1st one is a hangover from previous install, & if so what to do with it), and reinstalled headtrack back into /usr/local/src but slightly confused as to what to do next. You mention "attached patches" but I don't see them my side.

  3. #33
    Join Date
    Apr 2012
    Beans
    7,256

    Re: How to install these programs?

    Oops here you go, copy either / both of these into your /usr/local/src directory and then run the corresponding patch command that I posted above - depending whether you want the new Makefile or just the source code patch
    Attached Files Attached Files
    Last edited by steeldriver; May 12th, 2013 at 05:00 PM.

  4. #34
    Join Date
    Jan 2010
    Beans
    103

    Re: How to install these programs?

    I put patch-headtrack-OpenCV2.3-newmake.txt into/usr/local/src & ran

    Code:
    $:/usr/local/src/headtrack$ patch -p1 < ../patch-headtrack-OpenCV2.3-newmake.txt
    

    But then I get


    Code:
    $:/usr/local/src/headtrack$ make
    gcc -std=c99 -Wall -Wextra -msse -msse2 -fomit-frame-pointer -fno-strict-aliasing -I/usr/include/X11  -pthread -I/usr/local/include/opencv -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/gio-unix-2.0/ -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng12    -m64 -mtune=amdfam10 -O3   -c -o headtrack.o headtrack.c
    In file included from /usr/local/include/opencv/cv.h:1625:0,
                     from headtrack.c:42:
    /usr/local/include/opencv/cvcompat.h: In function ‘cvConvexHull’:
    /usr/local/include/opencv/cvcompat.h:383:38: warning: unused parameter ‘bound_rect’ [-Wunused-parameter]
    /usr/local/include/opencv/cvcompat.h: In function ‘cvMinAreaRect’:
    /usr/local/include/opencv/cvcompat.h:425:5: warning: left-hand operand of comma expression has no effect [-Wunused-value]
    /usr/local/include/opencv/cvcompat.h:425:5: warning: left-hand operand of comma expression has no effect [-Wunused-value]
    /usr/local/include/opencv/cvcompat.h:425:5: warning: left-hand operand of comma expression has no effect [-Wunused-value]
    /usr/local/include/opencv/cvcompat.h:425:5: warning: statement with no effect [-Wunused-value]
    /usr/local/include/opencv/cvcompat.h: In function ‘cvFindFundamentalMatrix’:
    /usr/local/include/opencv/cvcompat.h:542:48: warning: unused parameter ‘method’ [-Wunused-parameter]
    /usr/local/include/opencv/cvcompat.h: In function ‘cvFindChessBoardCornerGuesses’:
    /usr/local/include/opencv/cvcompat.h:573:55: warning: unused parameter ‘thresharr’ [-Wunused-parameter]
    /usr/local/include/opencv/cvcompat.h:574:47: warning: unused parameter ‘storage’ [-Wunused-parameter]
    /usr/local/include/opencv/cvcompat.h: In function ‘cvFindExtrinsicCameraParams’:
    /usr/local/include/opencv/cvcompat.h:638:12: warning: unused parameter ‘image_size’ [-Wunused-parameter]
    /usr/local/include/opencv/cvcompat.h: In function ‘cvFindExtrinsicCameraParams_64d’:
    /usr/local/include/opencv/cvcompat.h:663:12: warning: unused parameter ‘image_size’ [-Wunused-parameter]
    /usr/local/include/opencv/cvcompat.h: In function ‘cvUnDistortOnce’:
    /usr/local/include/opencv/cvcompat.h:757:37: warning: unused parameter ‘interpolate’ [-Wunused-parameter]
    /usr/local/include/opencv/cvcompat.h: In function ‘cvUnDistortInit’:
    /usr/local/include/opencv/cvcompat.h:767:46: warning: unused parameter ‘src’ [-Wunused-parameter]
    /usr/local/include/opencv/cvcompat.h:770:37: warning: unused parameter ‘interpolate’ [-Wunused-parameter]
    /usr/local/include/opencv/cvcompat.h: In function ‘cvUnDistort’:
    /usr/local/include/opencv/cvcompat.h:785:34: warning: unused parameter ‘interpolate’ [-Wunused-parameter]
    headtrack.c: In function ‘main’:
    headtrack.c:216:36: error: too many arguments to function ‘cvHaarDetectObjects’
    /usr/local/include/opencv/cv.h:1239:15: note: declared here
    headtrack.c:227:39: error: too many arguments to function ‘cvHaarDetectObjects’
    /usr/local/include/opencv/cv.h:1239:15: note: declared here
    headtrack.c:235:39: error: too many arguments to function ‘cvHaarDetectObjects’
    /usr/local/include/opencv/cv.h:1239:15: note: declared here
    headtrack.c:105:7: warning: variable ‘new_transmitterthread’ set but not used [-Wunused-but-set-variable]
    headtrack.c: In function ‘init’:
    headtrack.c:395:7: warning: statement with no effect [-Wunused-value]
    headtrack.c: In function ‘transmitter’:
    headtrack.c:426:32: warning: unused parameter ‘arg’ [-Wunused-parameter]
    headtrack.c: At top level:
    /usr/local/include/opencv/cxtypes.h:236:17: warning: ‘cvFloor’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxtypes.h:254:17: warning: ‘cvCeil’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxtypes.h:274:15: warning: ‘cvIsNaN’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxtypes.h:289:15: warning: ‘cvIsInf’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxtypes.h:308:17: warning: ‘cvRNG’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxtypes.h:324:18: warning: ‘cvRandReal’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxtypes.h:662:20: warning: ‘cvmGet’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxtypes.h:697:15: warning: ‘cvIplDepth’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxtypes.h:872:20: warning: ‘cvRectToROI’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxtypes.h:885:20: warning: ‘cvROIToRect’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxtypes.h:906:28: warning: ‘cvTermCriteria’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxtypes.h:958:26: warning: ‘cvPointTo32f’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxtypes.h:983:26: warning: ‘cvPoint3D32f’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxtypes.h:1003:26: warning: ‘cvPoint2D64f’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxtypes.h:1023:26: warning: ‘cvPoint3D64f’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxtypes.h:1062:25: warning: ‘cvSize2D32f’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxtypes.h:1138:22: warning: ‘cvRealScalar’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxtypes.h:1657:22: warning: ‘cvAttrList’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxcore.h:153:18: warning: ‘cvDecRefData’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxcore.h:174:17: warning: ‘cvIncRefData’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxcore.h:208:20: warning: ‘cvGetRow’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxcore.h:219:20: warning: ‘cvGetCol’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxcore.h:248:18: warning: ‘cvReleaseMatND’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxcore.h:271:25: warning: ‘cvGetNextSparseNode’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxcore.h:521:18: warning: ‘cvSubS’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxcore.h:1083:18: warning: ‘cvCloneSeq’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxcore.h:1126:23: warning: ‘cvSetNew’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxcore.h:1141:17: warning: ‘cvSetRemoveByPtr’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxcore.h:1156:22: warning: ‘cvGetSetElem’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxcore.h:1328:18: warning: ‘cvEllipseBox’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxcore.h:1421:18: warning: ‘cvFont’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxcore.h:1678:15: warning: ‘cvReadIntByName’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxcore.h:1693:18: warning: ‘cvReadRealByName’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxcore.h:1707:23: warning: ‘cvReadStringByName’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxcore.h:1719:17: warning: ‘cvReadByName’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxmisc.h:214:17: warning: ‘cvAlignPtr’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxmisc.h:220:15: warning: ‘cvAlign’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cxmisc.h:226:20: warning: ‘cvGetMatSize’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cv.h:628:24: warning: ‘cvCreateSubdivDelaunay2D’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cv.h:663:28: warning: ‘cvSubdiv2DNextEdge’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cv.h:669:28: warning: ‘cvSubdiv2DRotateEdge’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cv.h:674:28: warning: ‘cvSubdiv2DSymEdge’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cv.h:679:28: warning: ‘cvSubdiv2DGetEdge’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cv.h:687:30: warning: ‘cvSubdiv2DEdgeOrg’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cv.h:694:30: warning: ‘cvSubdiv2DEdgeDst’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cv.h:701:20: warning: ‘cvTriangleArea’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cv.h:871:18: warning: ‘cvCalcHist’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cv.h:1111:23: warning: ‘cvSURFPoint’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cv.h:1184:26: warning: ‘cvStarKeypoint’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cv.h:1203:32: warning: ‘cvStarDetectorParams’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:110:17: warning: ‘cvMatArray’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:126:18: warning: ‘cvMean’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:133:19: warning: ‘cvSumPixels’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:139:17: warning: ‘cvMean_StdDev’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:153:16: warning: ‘cvmPerspectiveProject’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:164:16: warning: ‘cvFillImage’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:213:18: warning: ‘cvRandInit’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:248:16: warning: ‘cvbRand’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:255:17: warning: ‘cvbCartToPolar’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:271:17: warning: ‘cvbFastArctan’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:285:18: warning: ‘cvbSqrt’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:295:18: warning: ‘cvbInvSqrt’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:305:18: warning: ‘cvbReciprocal’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:315:18: warning: ‘cvbFastExp’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:323:18: warning: ‘cvbFastLog’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:331:20: warning: ‘cvContourBoundingRect’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:337:18: warning: ‘cvPseudoInverse’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:382:16: warning: ‘cvConvexHull’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:407:16: warning: ‘cvMinAreaRect’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:432:18: warning: ‘cvFitLine3D’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:442:18: warning: ‘cvFitLine2D’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:452:17: warning: ‘cvFitEllipse’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:460:18: warning: ‘cvProject3D’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:503:17: warning: ‘cvHoughLines’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:515:17: warning: ‘cvHoughLinesP’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:528:17: warning: ‘cvHoughLinesSDiv’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:541:18: warning: ‘cvFindFundamentalMatrix’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:573:1: warning: ‘cvFindChessBoardCornerGuesses’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:584:16: warning: ‘cvCalibrateCamera’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:609:16: warning: ‘cvCalibrateCamera_64d’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:637:16: warning: ‘cvFindExtrinsicCameraParams’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:662:16: warning: ‘cvFindExtrinsicCameraParams_64d’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:691:17: warning: ‘cvRodrigues’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:702:17: warning: ‘cvProjectPoints’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:737:17: warning: ‘cvProjectPointsSimple’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:767:16: warning: ‘cvUnDistortInit’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:783:17: warning: ‘cvUnDistort’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:798:19: warning: ‘cvCalcEMD’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:812:18: warning: ‘cvKMeans’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:826:17: warning: ‘cvStartScanGraph’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:841:18: warning: ‘cvEndScanGraph’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:860:18: warning: ‘cvLineAA’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:866:18: warning: ‘cvCircleAA’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:872:18: warning: ‘cvEllipseAA’ defined but not used [-Wunused-function]
    /usr/local/include/opencv/cvcompat.h:881:18: warning: ‘cvPolyLineAA’ defined but not used [-Wunused-function]
    headtrack.c:421:16: warning: ‘decodeFloat’ defined but not used [-Wunused-function]
    make: *** [headtrack.o] Error 1

  5. #35
    Join Date
    Apr 2012
    Beans
    7,256

    Re: How to install these programs?

    Hmm... so unfortunately it looks like pkg-config still thinks you want to use the version of opencv that you installed manually into /usr/local - I had hoped that either (1) your 'make install' in OpenCV-2.1.0 hadn't got as far as altering the pkg-config database or (2) the 'sudo make uninstall' in /usr/local/src/OpenCV-2.1.0/Build would revert that or (3) the subsequent apt-get install would have overwritten it with the correct 2.3 location (which should be /usr/include)

    Did you make a note of the output from 'make uninstall' by any chance?

    EDIT: what is the output of

    Code:
    pkg-config --modversion opencv
    and

    Code:
    echo $PKG_CONFIG_PATH
    Last edited by steeldriver; May 12th, 2013 at 07:20 PM.

  6. #36
    Join Date
    Jan 2010
    Beans
    103

    Re: How to install these programs?

    Code:
    $:~$ pkg-config --modversion opencv2.1.0
    Anything to do with the two opencv folders in /usr/include?

  7. #37
    Join Date
    Aug 2012
    Location
    Pandora
    Beans
    72
    Distro
    Ubuntu 10.04 Lucid Lynx

    Re: How to install these programs?

    Code:
    sudo install ______________

  8. #38
    Join Date
    Apr 2012
    Beans
    7,256

    Re: How to install these programs?

    No unfortunately - we want it to be to do with the two folders in /usr/include but it is stubbornly pointing us to the one folder in /usr/local/include - if everything is configured correctly you should have seen

    Code:
    $ pkg-config --modversion opencv
    2.3.1
    Can you also post the output of

    Code:
    dpkg -l | grep -E 'libopencv-.*-dev'

  9. #39
    Join Date
    Jan 2010
    Beans
    103

    Re: How to install these programs?

    Code:
    $:~$ dpkg -l | grep -E 'libopencv-.*-dev'ii  libopencv-calib3d-dev                   2.3.1-7                                              development files for libopencv-calib3d
    ii  libopencv-contrib-dev                   2.3.1-7                                              development files for libopencv-contrib
    ii  libopencv-core-dev                      2.3.1-7                                              development files for libopencv-core
    ii  libopencv-features2d-dev                2.3.1-7                                              development files for libopencv-features2d
    ii  libopencv-flann-dev                     2.3.1-7                                              development files for libopencv-flann
    ii  libopencv-gpu-dev                       2.3.1-7                                              development files for libopencv-gpu
    ii  libopencv-highgui-dev                   2.3.1-7                                              development files for libopencv-highgui
    ii  libopencv-imgproc-dev                   2.3.1-7                                              development files for libopencv-imgproc
    ii  libopencv-legacy-dev                    2.3.1-7                                              development files for libopencv-legacy
    ii  libopencv-ml-dev                        2.3.1-7                                              development files for libopencv-ml
    ii  libopencv-objdetect-dev                 2.3.1-7                                              development files for libopencv-objdetect
    ii  libopencv-video-dev                     2.3.1-7                                              development files for libopencv-video

  10. #40
    Join Date
    Apr 2012
    Beans
    7,256

    Re: How to install these programs?

    Well I don't really know why it hasn't worked for you - I just went around the loop


    • purged libopencv*
    • did a sudo make install in my OpenCV-2.1.0 directory


    Sure enough, that forced pkg-config to pick up the 2.1.0 version, fwiw it puts the pc file in /usr/local/lib/opencv.pc


    • reinstalled libopencv-dev


    At this point pkg-config is still showing the version as 2.1.0 although I confirmed that a new pc file gets installed as /usr/lib/opencv.pc - presumably the default search order places /usr/local ahead of /usr in the search path - I thought it should be possible to override that by exporting a PKG_CONFIG_PATH=/usr/lib but it doesn't seem to work.

    However I then did


    • sudo make uninstall in my OpenCV-2.1.0 Build directory


    and the pesky /usr/local/lib/opencv.pc file was deleted as it should be, after which I was able to build headtrack against libopencv 2.3 as before.

    So I guess the puzzle is why sudo make uninstall didn't work to fully remove the 2.1.0 references for you - maybe try it one more time and make a careful note of any error messages? Remember that when you issue that command, you need to be in the Build directory that we created with mkdir way back when. You can use

    Code:
    find /usr -name 'opencv.pc'
    to flush out any other opencv.pc files that may be lurking - it will also tell us if 2.3 successfully installed its opencv.pc in /usr/lib

    We could use absolute paths in the headtrack Makefile instead of relying on pkg-config (or we could just manually delete the stuff in /usr/local) - but I'd rather fix your system properly so you don't have other build problems down the line. Your call though.
    Last edited by steeldriver; May 12th, 2013 at 11:34 PM.

Page 4 of 5 FirstFirst ... 2345 LastLast

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •