Configuring Dev-Cpp for compiling C programs using the OpenCV May 8, 2012
Posted by viboon in : C , add a commentBefore configuring the Dev-Cpp, we need:
- Dev-Cpp
- MinGW
- CMake
- OpenCV
1. Download and extract or install Dev-Cpp, MinGW, CMake and OpenCV; also add C:\Dev-Cpp\bin\;C:\MinGW\bin\ into the system path.
2. Use CMake to build OpenCV binaries from the source code.
In CMake, fill in the source code and the binary generated directories.
Where is the source code: C:/OpenCVSource
Where to build the binaries: C:/OpenCV
Click “Configure” and select “MinGW Makefiles” as the generator.
Select “Specify native compilers”.
The C and C++ compilers are specified as follows:
C: C:/MinGW/bin/gcc.exe
C++: C:/MinGW/bin/g++.exe
Click “Finish”.
In the configuration screen type in “RELEASE” (or “DEBUG” if you want to build a debug version) for “CMAKE_BUILD_TYPE”.
Click “Configure” and “Generate”, respectively.
Go to the command prompt and inside the directory “C:\OpenCV” type:
mingw32-make
and
mingw32-make install
3. Configure the Dev-Cpp so it knows where to find OpenCV for your projects.
Go to “Tools -> Compiler Options”
Click “+” sign to add a new compiler named here, OpenCV.
On the section “Add these commands to the linker command line”
-lopencv_core231 -lopencv_highgui231 -lopencv_imgproc231 -lopencv_features2d231 -lopencv_calib3d231
In “Directories” tap, add the following into “Binaries”, “Libraries”, “C Includes” and “C++ Includes”.
*** Binaries ***
C:\mingw\bin
C:\OpenCV\bin
*** Libraries ***
C:\mingw\lib
C:\OpenCV\lib
*** C Includes ***
C:\mingw\include
C:\OpenCV\include
*** C++ Includes ***
C:\mingw\include
C:\OpenCV\include
Ref:
- http://opencv.willowgarage.com/wiki/InstallGuide
- http://opencv.willowgarage.com/wiki/MinGW
- http://opencv.willowgarage.com/wiki/DevCpp
Tags: C, CMake, compile, Dev-Cpp, MinGW, OpenCV
Related posts:
วารสารส่งเสริมเทคโนโลยี ฉบับที่ 222 April 15, 2012
Posted by viboon in : Manufacturing technologies , add a comment
แนะนำ…การใช้ของเหลวช่วยในกระบวนการตัดด้วยเลเซอร์ (ตอนที่ 1), วารสารส่งเสริมเทคโนโลยี ฉบับที่ 222 ประจำเดือน เมษายน-พฤษภาคม 2555
Tags: Laser, machining, Manufacturing technologies, วารสารส่งเสริมเทคโนโลยี
Related posts:
Lens making April 12, 2012
Posted by viboon in : Manufacturing technologies , add a commentTags: lens, Manufacturing technologies, Micromachining, polishing
Related posts:
Identify the Linux Distribution Being Used January 17, 2012
Posted by viboon in : Ubuntu , add a commentlsb_release -aTags: Ubuntu
Related posts:
Add/remove Startup Applications in Ubuntu 11.10 January 17, 2012
Posted by viboon in : Ubuntu , add a commentCopy or delete the program you want to automatically startup everytime a user logs in from /usr/share/applications/program.desktop to /etc/xdg/autostart folder.
For example, if you wish to start Firefox when you login, you have to run a following command to copy firefox.desktop to the /etc/xdg/autostart.
sudo cp /usr/share/applications/firefox.desktop /etc/xdg/autostart
To remove the program from the startup application, you have to remove the file as follows:
sudo rm /etc/xdg/autostart/firefox.desktop
Tags: application, startup, Ubuntu
Related posts:
Useful application indicators for Ubuntu 11.10 January 16, 2012
Posted by viboon in : Ubuntu , add a comment1. Weather indicator
sudo apt-get install indicator-weather
2. Dropbox Application Indicator
3. Sysmonitor Indicator
sudo add-apt-repository ppa:alexeftimie/ppa sudo apt-get update sudo apt-get install indicator-sysmonitor
4. System load indicator
sudo add-apt-repository ppa:indicator-multiload/stable-daily sudo apt-get update sudo apt-get install indicator-multiload
5. Touchpad Indicator
sudo add-apt-repository ppa:atareao/atareao sudo apt-get update sudo apt-get install touchpad-indicator
6. Battery status indicator
sudo apt-add-repository ppa:iaz/battery-status sudo apt-get update sudo apt-get install battery-status
7. Workspaces indicator
sudo add-apt-repository ppa:geod/ppa-geod sudo apt-get update sudo apt-get install indicator-workspaces
8. Keylock indicator
sudo add-apt-repository ppa:tsbarnes/indicator-keylock sudo apt-get update sudo apt-get install indicator-keylock
9. Pastie Clipboard Manager Indicator
sudo add-apt-repository ppa:hel-sheep/pastie sudo apt-get update sudo apt-get install pastie
Ref: http://www.techdrivein.com/2011/05/10-useful-application-indicators-for.html
Tags: application, indicator, install, Ubuntu
Related posts:
Clean recent documents opened in Ubuntu 11.10 January 16, 2012
Posted by viboon in : Ubuntu , add a commentDelete recently-used.xbel:
rm ~/.local/share/recently-used.xbel
Create a new empty file:
touch ~/.local/share/recently-used.xbel
Make sure the new file cannot be modified:
sudo chattr +i ~/.local/share/recently-used.xbel
now, your display of recent items is gone.
If you want to revert back, remove the i attribute of recently-used.xbel:
sudo chattr -i ~/.local/share/recently-used.xbel
Ref: http://knezevblog.blogspot.com/2010/05/how-to-ubuntu-clear-and-disable-recent.html
Tags: recently-used.xbel, Ubuntu
Related posts:
9 things to do after installing Ubuntu 11.10 January 16, 2012
Posted by viboon in : Ubuntu , add a comment1. Update Ubuntu (Repository cache)
sudo apt-get update sudo apt-get upgrade
2. Install ‘Ubuntu Restricted Extras’ – codecs/plugins
sudo apt-get install ubuntu-restricted-extras
To play encrypted DVD, you need to install libdvdread4.
sudo apt-get install libdvdread4 sudo /usr/share/doc/libdvdread4/install-css.sh
3. Install Additional (graphics card and webcam) drivers
sudo apt-get install cheese
4. Install Chromium Web browser for faster browsing
sudo apt-get install chromium-browser
And some codecs like FFmpeg for playing multimedia contents on web.
sudo apt-get install chromium-codecs-ffmpeg-extra
5. Install VLC Player
sudo apt-get install vlc
6. Install any Image editing program
sudo apt-get install gimp
with its some extra plugins
sudo apt-get install gimp-data-extras sudo apt-get install gimp-plugin-registry
Pinta is another image editing program. It is similar to MS paint.
sudo apt-get install pinta
7. Try Gnome shell
sudo apt-get install gnome-shell
8. Setup an online file backup program
Dropbox
sudo apt-get install nautilus-dropbox
9. Install gnome tweak tool
sudo apt-get install gnome-tweak-tool
Ref: http://blog.sudobits.com/2011/09/08/10-things-to-do-after-installing-ubuntu-11-10/
Tags: install, Ubuntu
