Results 1 to 3 of 3

Thread: Configuring opencv

  1. #1

    Default Configuring opencv

    In openSUSE I can install openCV with zypper:

    Code:
     sudo zypper install opencv
    But it doesn't work:

    Code:
    artin@linux-vb3j:~>  
    martin@linux-vb3j:~>  
    martin@linux-vb3j:~> python 
    Python 2.7.13 (default, Jan 03 2017, 17:41:54) [GCC] on linux2 
    Type "help", "copyright", "credits" or "license" for more information. 
    >>> import cv 
    Traceback (most recent call last): 
     File "<stdin>", line 1, in <module> 
    ImportError: No module named cv 
    >>> import cv2 
    Traceback (most recent call last): 
     File "<stdin>", line 1, in <module> 
    ImportError: No module named cv2 
    >>> import cv3 
    Traceback (most recent call last): 
     File "<stdin>", line 1, in <module> 
    ImportError: No module named cv3 
    >>> exit() 
    martin@linux-vb3j:~> python3 
    Python 3.4.6 (default, Mar 22 2017, 12:26:13) [GCC] on linux 
    Type "help", "copyright", "credits" or "license" for more information. 
    >>> import cv 
    Traceback (most recent call last): 
     File "<stdin>", line 1, in <module> 
    ImportError: No module named 'cv' 
    >>> import cv2 
    Traceback (most recent call last): 
     File "<stdin>", line 1, in <module> 
    ImportError: No module named 'cv2' 
    >>> import cv3 
    Traceback (most recent call last): 
     File "<stdin>", line 1, in <module> 
    ImportError: No module named 'cv3'
    
    Code:
    linux-vb3j:~/Documents/C> g++ opencv_test.cpp  
    opencv_test.cpp:1:10: warning: missing terminating " character [enabled by default] 
    #include "opencv2/core.hpp' 
             ^ 
    opencv_test.cpp:1:10: error: #include expects "FILENAME" or <FILENAME> 
    martin@linux-vb3j:~/Documents/C> 
    
    The problem is that I can't actually find it as well:
    Code:
    
    martin@linux-vb3j:~/Documents/C> whereis opencv 
    opencv: 
    martin@linux-vb3j:~/Documents/C> opencv 
    If 'opencv' is not a typo you can use command-not-found to lookup the package that contains i
    t, like this: 
       cnf opencv 
    martin@linux-vb3j:~/Documents/C> type opencv 
    bash: type: opencv: not found 
    martin@linux-vb3j:~/Documents/C> man opencv 
    No manual entry for opencv 
    martin@linux-vb3j:~/Documents/C> zypper install opencv 
    Root privileges are required for installing or uninstalling packages.
    martin@linux-vb3j:~/Documents/C> sudo zypper install opencv 
    [sudo] password for root:  
    Retrieving repository 'openSUSE-Leap-42.3-Update' metadata ............................[done] 
    Building repository 'openSUSE-Leap-42.3-Update' cache .................................[done] 
    Loading repository data... 
    Reading installed packages... 
    'opencv' is already installed. 
    No update candidate for 'opencv-3.1.0-3.25.x86_64'. The highest available version is already 
    installed. 
    Resolving package dependencies... 
    
    Nothing to do.
    
    

  2. #2
    Join Date
    Jun 2008
    Location
    San Diego, Ca, USA
    Posts
    11,130
    Blog Entries
    2

    Default Re: Configuring opencv

    Been awhile since I've done anything with opencv,
    IIRC it's just a collection of libraries, there aren't any applications.

    So,
    I don't know what you're trying to do with the commands you're running, are you following some kind of reference (post a link if you are) or installing it as a prerequisite for an application (post a link to that as well if you are).

    As to where your files are located, and probably how your files are accessed (my guess is that a PATH should already point to your files), you can run the following
    Code:
    rpm -ql opencv
    Or, you can use the "find" or "locate" utilities (the latter is installable as part of the mlocate package).

    TSU
    Beginner Wiki Quickstart - https://en.opensuse.org/User:Tsu2/Quickstart_Wiki
    Solved a problem recently? Create a wiki page for future personal reference!
    Learn something new?
    Attended a computing event?
    Post and Share!

  3. #3

    Default Re: Configuring opencv

    Quote Originally Posted by tsu2 View Post

    Code:
    rpm -ql opencv
    Code:
    
    martin@linux-vb3j:~/Documents/C>  
    martin@linux-vb3j:~/Documents/C> rpm -ql opencv
    /usr/bin/opencv_annotation
    /usr/bin/opencv_createsamples
    /usr/bin/opencv_traincascade
    /usr/share/OpenCV
    /usr/share/OpenCV/OpenCVModules-release.cmake
    /usr/share/OpenCV/OpenCVModules.cmake
    /usr/share/OpenCV/haarcascades
    /usr/share/OpenCV/haarcascades/haarcascade_eye.xml
    /usr/share/OpenCV/haarcascades/haarcascade_eye_tree_eyeglasses.xml
    /usr/share/OpenCV/haarcascades/haarcascade_frontalcatface.xml
    /usr/share/OpenCV/haarcascades/haarcascade_frontalcatface_extended.xml
    /usr/share/OpenCV/haarcascades/haarcascade_frontalface_alt.xml
    /usr/share/OpenCV/haarcascades/haarcascade_frontalface_alt2.xml
    /usr/share/OpenCV/haarcascades/haarcascade_frontalface_alt_tree.xml
    /usr/share/OpenCV/haarcascades/haarcascade_frontalface_default.xml
    /usr/share/OpenCV/haarcascades/haarcascade_fullbody.xml
    /usr/share/OpenCV/haarcascades/haarcascade_lefteye_2splits.xml
    /usr/share/OpenCV/haarcascades/haarcascade_licence_plate_rus_16stages.xml
    /usr/share/OpenCV/haarcascades/haarcascade_lowerbody.xml
    /usr/share/OpenCV/haarcascades/haarcascade_profileface.xml
    /usr/share/OpenCV/haarcascades/haarcascade_righteye_2splits.xml
    /usr/share/OpenCV/haarcascades/haarcascade_russian_plate_number.xml
    /usr/share/OpenCV/haarcascades/haarcascade_smile.xml
    /usr/share/OpenCV/haarcascades/haarcascade_upperbody.xml
    /usr/share/OpenCV/lbpcascades
    /usr/share/OpenCV/lbpcascades/lbpcascade_frontalcatface.xml
    /usr/share/OpenCV/lbpcascades/lbpcascade_frontalface.xml
    /usr/share/OpenCV/lbpcascades/lbpcascade_profileface.xml
    /usr/share/OpenCV/lbpcascades/lbpcascade_silverware.xml
    martin@linux-vb3j:~/Documents/C> cd /usr/share/OpenCV/
    

    TSU
    Ok, now I have to build it ? or add it to some path ?

Tags for this Thread

Posting Permissions

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