How To Install OpenCV in Ubuntu (Linux)

preview_player
Показать описание
In this post we will see How to Install OpenCV in Ubuntu for C/C++.
OpenCV is an image processing library created by Intel and later supported by Willow Garage and now maintained by Itseez. OpenCV means Intel® Open Source Computer Vision Library. It is a collection of C functions and a few C++ classes that implement some popular Image Processing and Computer Vision algorithms. OpenCV is Available on Mac, Windows, Linux (Terminal environment).

★★★Top Online Courses From ProgrammingKnowledge ★★★

★★★ Online Courses to learn ★★★

★★★ Follow ★★★

DISCLAIMER: This video and description contains affiliate links, which means that if you click on one of the product links, I’ll receive a small commission. This help support the channel and allows us to continue to make videos like this. Thank you for the support!
Рекомендации по теме
Комментарии
Автор

hey all commands are run with no error but when i was trying to run this command pkg-config --modversion opencv then they showing error. Error is (Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc')
Kindly help on this.


to the PKG_CONFIG_PATH environment variable
No package 'opencv' found

yashmiglani
Автор

It was really really helpful. Many thanks.

ramezanifard
Автор

I got this error while verifying the version
"Package opencv was not found in the pkg-config search path.
Perhaps you should add the directory containing `opencv.pc'
to the PKG_CONFIG_PATH environment variable
No package 'opencv' found"

hmswrth
Автор

for openvc Version 4.0.0 (v4.0), you must use -std=c++14:
g++ main.cpp -o output `pkg-config --cflags --libs opencv` -std=c++14
and change 'CV_LOAD_IMAGE_COLOR ' to cv::IMAGE_COLOR

emadmojtahedifar
Автор

Best tutorial ever!! Clear and concise instructions...well done!

PrajwalDsouza
Автор

sir i am having problem
error: ‘CV_CALIB_CB_ADAPTIVE_THRESH’ was not declared in this scope
drawChessboardCorners(drawToFrame, chessboardDimension, foundPoints, found, CV_CALIB_CB_ADAPTIVE_THRESH);

sangammanbuddhacharya
Автор

for some reason the pkg config, only shows the opencv 2.X.X

Dahaksha
Автор

Thanks for your sharing . May I ask a question, is there any difference between 'cloning folder by using sudo su(as admin) ' and 'under normal Home as usual' ? because I did as normal way :( miss your instructions (to use sudo su).

datapiburma
Автор

In here g++ main.cpp -o output `pkg-config --cflags --libs opencv`. What does `pkg-config --cflags --libs opencv` do? Can you explain?

korkmazkagan
Автор

i'm having this error:
E: Unable to locate package python3.5-dev
E: Couldn't find any package by glob 'python3.5-dev'
E: Couldn't find any package by regex 'python3.5-dev'

itsgia
Автор

Hi @ProgrammingKnowledge2, I followed step by step to download the Opencv on my Ubuntu 18.04. I've got the Opencv downloaded but the problem is I can't seems to get cv2 on my Ubuntu. Is there anyway to get cv2 on my system?

davidtan
Автор

excellent, simple, easy.. thank you.

vijaykumar-yqsf
Автор

hi, i'm really greatful for what you have done for us . my problem is when i wrote sudo su then press enter then i wrote below cd/opt/ and press enter it was appearing : there is no document with this type how can i solve this problem and thank you

kermadjislam
Автор

I get error as 'CV_PY_TO_ENUM'(cuda::Hostman::AllocType), what is this about?

afrazkhan
Автор

Please show a sample python program to show image. Thanks

prashantsingh
Автор

bro its working fine..now i am able to import cv dependencies in python script. Thank You so much..
GREAT WORK..

saitejareddyvenkat
Автор

E: Unable to locate package python3.5-dev
E: Couldn't find any package by glob 'python3.5-dev'
E: Couldn't find any package by regex 'python3.5-dev'

Not addressed, will have to try a different tutorial.

JohnSmith-geqc
Автор

i have installed opencv and import it but can't import cv2
plz help me

geetanjalisharma
Автор

i got error ''CMake Error: The source directory "/opt/opencv" does not exist.
Specify --help for usage, or press the help button on the CMake GUI.'

trendingfever......