EDIT: It was reported by some users that this method no longer works. I will post updated version for installation process shortly.
While using OpenCV on Linux I prefer using IDE as you can easily manage code and files when you are working on significantly bigger project. Following are the steps to configure CodeBlocks IDE on Ubuntu for OpenCV. I will be using opencv2.2 and CodeBlocks 10.5 in this post.
For OpenCV 2.3.1 with CodeBlocks on Ubuntu, refer to recent post
http://opencvlover.blogspot.in/2012/06/opencv-231-with-codeblocks-on-ubuntu.html
Installing CodeBlocks IDE and OpenCV
You can install both CodeBlocks and OpenCV using Synaptic package manager in ubuntu or just type following command in terminal
- for CodeBlocks:
sudo apt-get install codeblocks
- for Opencv:
sudo apt-get install libcv1 libcvaux1 libcvaux-dev libcv-dev libhighgui1 libhighgui-dev opencv-docFor OpenCV 2.3.1 Installation please refer to recent post
http://opencvlover.blogspot.in/2012/05/install-opencv-231-on-ubuntu-1204.html
Create CodeBlocks c++ project
Create codeblocks project from File > New > Project. A new project dialog will be opened. In project type select Console Application. Select Next. Now it will prompt you to name your project and select location for project files. Make sure to use GNU GCC compiler when prompted. Now your project creation in complete and you should see the codeblocks window as shown in below pic.
Cofiguring CodeBlocks for OpenCV
Now in menu bar go to Project > Build options. Under Linker tab, add "-lm -lcv -lhighgui -lcvaux"(without quotes) parameters in Other linker options. It should look like following pic.
Now, under Search Directories tab, put the location of your opencv include folder. If you have installed opencv using synaptic package manager or apt-get then most probably it should be /usr/include/opencv/. If codeblocks asks for keeping this directory as a relative path then hit Yes.
It should look like following pic.
Now we are done with the setup. We will check our setup now.
Just build and run the following code. It will create a window named Hello and window will disappear upon hitting ESC.
Code:
#include <iostream> #include <cv.h> #include <highgui.h> using namespace std; int main() { cvNamedWindow("Hello", 1); cvWaitKey(0); cvDestroyWindow("Hello"); return 0; }
which library shall i use for making image processing program?
ReplyDeletewhy I can't build that code. error said cannot find -lvc -lhighgui.. need help. thanks :)
ReplyDeleteIt doesn't work ;.
ReplyDeletedo it from here worked for me
Deletehttp://www.technical-recipes.com/2014/using-opencv-in-codeblocks-in-linux/
https://bayanlarsitesi.com/
ReplyDeleteAltınşehir
Karaköy
Alemdağ
Gürpınar
6J1
Denizli
ReplyDeleteKonya
Denizli
ısparta
Bayburt
TUF0WE
Sakarya
ReplyDeleteKayseri
Van
Konya
Samsun
K2CQZX
adıyaman
ReplyDeletesakarya
yalova
tekirdağ
amasya
TE45BH
elazığ
ReplyDeletevan
mardin
sakarya
düzce
1YQOU8
whatsapp görüntülü show
ReplyDeleteücretli.show
Z5XRU
https://titandijital.com.tr/
ReplyDeletekars parça eşya taşıma
konya parça eşya taşıma
çankırı parça eşya taşıma
yalova parça eşya taşıma
BEL8
Bolu Lojistik
ReplyDeleteMardin Lojistik
Kocaeli Lojistik
Diyarbakır Lojistik
İstanbul Lojistik
47S
3A173
ReplyDeleteBitlis Parça Eşya Taşıma
Kırklareli Lojistik
Tunceli Parça Eşya Taşıma
Sivas Evden Eve Nakliyat
Mersin Lojistik
CD441
ReplyDeleteÇerkezköy Boya Ustası
Bayburt Evden Eve Nakliyat
Binance Güvenilir mi
Kütahya Evden Eve Nakliyat
Siirt Evden Eve Nakliyat
699F8
ReplyDeleteTekirdağ Cam Balkon
order primobolan
Çerkezköy Fayans Ustası
Çerkezköy Parke Ustası
Coin Nedir
anapolon oxymetholone for sale
parabolan
Silivri Duşa Kabin Tamiri
Ardahan Evden Eve Nakliyat
10D14
ReplyDeleteBibox Güvenilir mi
Bingöl Parça Eşya Taşıma
Yozgat Şehir İçi Nakliyat
Gümüşhane Şehir İçi Nakliyat
Keçiören Fayans Ustası
Çanakkale Şehirler Arası Nakliyat
Batman Lojistik
İstanbul Evden Eve Nakliyat
Tekirdağ Parke Ustası
9C931
ReplyDeleteBinance Kimin
Binance Borsası Güvenilir mi
Görüntülü Sohbet Parasız
Görüntülü Sohbet Parasız
Twitter Takipçi Hilesi
Binance Referans Kodu
Bitcoin Nasıl Üretilir
Mexc Borsası Güvenilir mi
Twitter Retweet Satın Al
353C7
ReplyDeleteGörüntülü Sohbet
Binance Para Kazanma
Periscope Beğeni Satın Al
Binance Nasıl Üye Olunur
Coin Nasıl Üretilir
Sohbet
Telcoin Coin Hangi Borsada
Bitcoin Nasıl Kazanılır
Meta Coin Hangi Borsada
9CD3E
ReplyDeleteCoin Nasıl Oynanır
Kripto Para Nasıl Kazılır
Likee App Takipçi Hilesi
Spotify Takipçi Hilesi
Referans Kimliği Nedir
Bitcoin Nedir
Bone Coin Hangi Borsada
Okex Borsası Güvenilir mi
Btcturk Borsası Güvenilir mi
48AB7A2689
ReplyDeletewhatsapp görüntülü şov
BDC04862A3
ReplyDeleteucuz takipçi