Check version of OpenCV


/ Published in: Bash
Save to your folder(s)

Type in the following commands. If you get the same output, it means that opencv is installed correctly

$ pkg-config opencv --cflags


-I/usr/local/include/opencv -I/usr/local/include

$ pkg-config opencv --libs


/usr/local/lib/libopencv_calib3d.so /usr/local/lib/libopencv_contrib.so /usr/local/lib/libopencv_core.so /usr/local/lib/libopencv_features2d.so /usr/local/lib/libopencv_flann.so /usr/local/lib/libopencv_gpu.so /usr/local/lib/libopencv_highgui.so /usr/local/lib/libopencv_imgproc.so /usr/local/lib/libopencv_legacy.so /usr/local/lib/libopencv_ml.so /usr/local/lib/libopencv_nonfree.so /usr/local/lib/libopencv_objdetect.so /usr/local/lib/libopencv_photo.so /usr/local/lib/libopencv_stitching.so /usr/local/lib/libopencv_ts.so /usr/local/lib/libopencv_video.so /usr/local/lib/libopencv_videostab.so


Copy this code and paste it in your HTML
  1. $ pkg-config opencv --cflags
  2.  
  3.  
  4. -I/usr/local/include/opencv -I/usr/local/include
  5.  
  6. $ pkg-config opencv --libs
  7.  
  8. pkg-config --cflags opencv
  9. pkg-config --libs opencv
  10.  
  11. Alternatively you can write a simple program and print the following defs:
  12.  
  13. CV_MAJOR_VERSION
  14. CV_MINOR_VERSION

URL: https://www.quora.com/How-do-I-check-if-OpenCV-is-installed-on-a-machine

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.