Assume you want to 'scp' from machine A to B:
A > vi ~/.ssh/id_rsa.pub
Copy all text in id_rsa.pub
B > vi ~/.ssh/authorized_keys
Append copied text to end of authorized_keys
OR
A > scp ~/.ssh/id_rsa.pub username@ip_of_B:
B > cat ~/id_rsa.pub >> ~/.ssh/authorized_keys
B > rm ~/id_rsa.pub
Wednesday, September 30, 2015
Monday, September 9, 2013
Save OpenCV 2.4.6 Configs in a Property Sheet, VS2012
Pre Requirements:
Improtant: If you are building a x86 application (even though windows platform of the programming machine is x64), you must use "For x86" sections of the article. You can find or change the application platform from Build -> Configuration Manager -> Active Solution Platform after you create the project.
- Download the latest OpenCV version from http://opencv.org/downloads.html
- Extract it. ( C:\opencv )
- Start -> Right click My Computer -> Properties -> Advanced System Settings -> Environment Variables
- Select Path in System Variables. Add the following line.
For x86
;C:\opencv\build\x86\vc11\bin
For x64
;C:\opencv\build\x64\vc11\bin
- Save it.
- Restart Windows
Add property page
- Start new C++ console project in Visual Studio 2012
- View --> Property Manager (Property Manager will appear to side plane)
- Right click Debug --> Add New Project Property Sheet
- Name the property sheet, OpenCV.props
- Select tab, C++ --> General
- Add the following line to Additional Include Directories
- Select tab, Linker --> General
- Add the following line to Additional Library Directories
C:\opencv\build\x86\vc11\lib
For x64
C:\opencv\build\x64\vc11\lib
- Select tab, Linker --> Input
- Add the following lines to Additional Dependancies
opencv_imgproc246d.lib
opencv_highgui246d.lib
opencv_ml246d.lib
opencv_video246d.lib
opencv_features2d246d.lib
opencv_calib3d246d.lib
opencv_objdetect246d.lib
opencv_contrib246d.lib
opencv_legacy246d.lib
opencv_nonfree246d.lib
opencv_flann246d.lib - Click OK
- You have finished configuring. Test OpenCV
#include "opencv2\imgproc\imgproc.hpp"
#include "opencv2\core\core.hpp"
#include "opencv2\highgui\highgui.hpp"
using namespace cv;
int _tmain(int argc, _TCHAR* argv[])
{
Mat img = imread("C:\\Users\\Public\\Pictures\\Sample Pictures\\Koala.jpg");
imshow("Display",img);
waitKey();
return 0;
}
Reuse the Property Sheet
- Go to the project location in Windows Explorer.
- You will find a OpenCV.props file.
- Back up the file.
- Start new C++ console project in Visual Studio 2012
- View --> Property Manager (Property Manager will appear to side plane)
- Right click Debug --> Add Existing Project Property Sheet
- Locate your backed up OpenCV.props file.
- Now all OpenCV configurations are added to the project.
- Test with the above code.
Friday, July 26, 2013
Run Console Application in Qt Creater
There is a bug when you try to run in terminal, it does not take any input or output.
To fix this bug on Ubunut,
Tools --> Options --> Environment --> General
Change the Terminal from
x-terminal-emulator -e
to
/usr/bin/xterm -e
Thanks to https://bugs.launchpad.net/ubuntu/+source/qtcreator/+bug/566387
To fix this bug on Ubunut,
Tools --> Options --> Environment --> General
Change the Terminal from
x-terminal-emulator -e
to
/usr/bin/xterm -e
Thanks to https://bugs.launchpad.net/ubuntu/+source/qtcreator/+bug/566387
Thursday, May 16, 2013
Install OpenCV 2.4.5 on Visual C++ .NET 2010
Improtant: If you are building a x86 application (even though windows platform of the programming machine is x64), you must use "For x86" sections of the article. You can find or change the application platform from Build -> Configuration Manager -> Active Solution Platform after you create the project.
- Download the latest OpenCV version from http://opencv.org/downloads.html
- Extract it. ( C:\opencv )
- Start -> Right click My Computer -> Properties -> Advanced System Settings -> Environment Variables
- Select Path in System Variables. Add the following line.
For x86
;C:\opencv\build\x86\vc10\bin
;C:\opencv\build\common\tbb\ia32\vc10
(Only if the folder exists)
For x64
;C:\opencv\build\x64\vc10\bin
;C:\opencv\build\common\tbb\intel64\vc10
(Only if the folder exists)
- Save
it.
- Restart
Windows
- Start
new c++ console project in Visual Studio 2010
- Project
-> Properties
- Select C++
-> General tab
- Add
the following lines to Additional
Include Directories
C:\opencv\build\include\
C:\opencv\build\include\opencv
- Select Linker
-> General
- Add
the following lines to Additional
Library Directories
For x86
C:\opencv\build\x86\vc10\lib
For x64
C:\opencv\build\x64\vc10\lib
C:\opencv\build\x86\vc10\lib
For x64
C:\opencv\build\x64\vc10\lib
- Select Linker
-> Input
- Add
the following to Additional
Dependencies in Debug Configurations.
(245 is for opencv version 2.4.5. Change it appropreately for opencv
version)
opencv_core245d.lib
opencv_imgproc245d.lib
opencv_highgui245d.lib
opencv_ml245d.lib
opencv_video245d.lib
opencv_features2d245d.lib
opencv_calib3d245d.lib
opencv_objdetect245d.lib
opencv_contrib245d.lib
opencv_legacy245d.lib
opencv_nonfree245d.lib
opencv_flann245d.lib
- Add
the following to Additional
Dependencies in Release
Configuration,
if you want to build a release version. (Not required)
opencv_core245d.lib
opencv_imgproc245.lib
opencv_highgui245.lib
opencv_ml245.lib
opencv_video245.lib
opencv_features2d245.lib
opencv_calib3d245.lib
opencv_objdetect245.lib
opencv_contrib245.lib
opencv_legacy245.lib
opencv_nonfree245.lib
opencv_flann245.lib
- Opencv
is ready to use. Try the following example
#include
"stdafx.h"
#include
"opencv2\core\core.hpp"
#include
"opencv2\imgproc\imgproc.hpp"
#include
"opencv2\highgui\highgui.hpp"
using namespace cv;
int _tmain(int argc,
_TCHAR* argv[])
{
VideoCapture
cap(0);
do{
Mat img;
cap >>
img;
imshow("Disp",img);
}while(waitKey(30)<0);
return 0;
}
Friday, March 15, 2013
OpenCV on Android
First of all, you need JDK installed on your computer. (JRE is not sufficient). Unless download and install it.
http://www.oracle.com/technetwork/java/javase/downloads/index.html
You definelty need android SDK ADT Bundle.
http://developer.android.com/sdk/index.html
Simply extract it. Open Adroid SDK Manger from <extracted path>. Android 3.0 or higher must be installed.
<extracted path>\eclipse\eclipse.exe is your IDE.
First time you start eclipse IDE it will ask you to select working directory. (Close the welcome page) Working directory is the place you save you android projects. Therefore select a known <working directory> path.
If you do not have experience in android programming, do go through this article,
http://developer.android.com/training/basics/activity-lifecycle/starting.html
because android is not like a simple c program, it is a state machine.
Now it is the time to download OpenCV-Android-SDK from here,
http://sourceforge.net/projects/opencvlibrary/files/opencv-android/2.4.3/OpenCV-2.4.3.2-android-sdk.zip/download
Extract it to <working directory>.
Now you your installations are ready. Open Android Eclipse IDE.
File -> Import -> General -> Existing Projects into Workspace -> Next
Set the root directory path as OpenCV Android SDK folder. In the figure above "E:\AndroidOpenCV\" is my working directory.
From the projects list, only select the ones I have selected if you are new and finish it. Others require Android NDK.
First one in the list, OpenCV Library, is the most important. It must be in your working directory every time you build a OpenCV project. Others are some examples comes with OpenCV, that you can learn a lot from them.
If everything goes well you must see a screen like this. If so you are lucky and you can skip to Run Example Section of this post.
In some case you will not be such lucky, and there will be some error on the screen.
Run Example
This is what I summarized here.
http://developer.android.com/training/basics/firstapp/running-app.html
Run On Emulator
In your Eclipse IDE,
Window -> Android Virtual Device Manager -> New
Set as above figure and OK
Select TestAVD you created -> Start
Close Virtual Device Manager.
In Package Explorer in Eclipse IDE,
Right click the OpenCV - Sample - image-manipulations -> Run As -> Android Application.
This will run the application on your emulator :)
Run On Real Device
First of all you need an Android Device with Android 3.0 or higher and you must have USB drivers installed. Unless get them from manufactures website or may be here, http://developer.android.com/tools/extras/oem-usb.html .
Turn on Debugging mode on you android device. For example, in Samsung Galaxy,
Settings -> Developer Options -> Check USB Debugging, Check Allow mock locations.
Then connect your phone to computer.
In Package Explorer in Eclipse IDE,
Right click the OpenCV-Sample-image-manipulations -> Run As -> Android Application.
If prompt select your real device. Then application will be installed and run on your device.
In the first time use it will automatically download OpenCV Manager from Google Play.
The OpenCV sample will be running on you real device. Try Edge detection on your android device :)
These are the Tutorial provided from OpenCV. They may also helpful to you.
http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/O4A_SDK.html#o4a-sdk
http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/android_dev_intro.html
http://www.oracle.com/technetwork/java/javase/downloads/index.html
You definelty need android SDK ADT Bundle.
http://developer.android.com/sdk/index.html
Simply extract it. Open Adroid SDK Manger from <extracted path>. Android 3.0 or higher must be installed.
<extracted path>\eclipse\eclipse.exe is your IDE.
First time you start eclipse IDE it will ask you to select working directory. (Close the welcome page) Working directory is the place you save you android projects. Therefore select a known <working directory> path.
If you do not have experience in android programming, do go through this article,
http://developer.android.com/training/basics/activity-lifecycle/starting.html
because android is not like a simple c program, it is a state machine.
Now it is the time to download OpenCV-Android-SDK from here,
http://sourceforge.net/projects/opencvlibrary/files/opencv-android/2.4.3/OpenCV-2.4.3.2-android-sdk.zip/download
Extract it to <working directory>.
Now you your installations are ready. Open Android Eclipse IDE.
File -> Import -> General -> Existing Projects into Workspace -> Next
Set the root directory path as OpenCV Android SDK folder. In the figure above "E:\AndroidOpenCV\" is my working directory.
From the projects list, only select the ones I have selected if you are new and finish it. Others require Android NDK.
First one in the list, OpenCV Library, is the most important. It must be in your working directory every time you build a OpenCV project. Others are some examples comes with OpenCV, that you can learn a lot from them.
In some case you will not be such lucky, and there will be some error on the screen.
First of all make sure OpenCV Library is on you Package Explorer.
Right Click OpenCV Library on Package Explorer -> Properties
In Android tab check whether at least one project target is selected above Android 3.0
In Java Compiler tab check the java version is correctly configured.
Then errors in OpenCV library must be eliminated.
Then Right click a sample (OpenCV-Sample-image-manupilations) on Package Explorer -> Properties
In Android tab check whether at least one project target is selected above Android 3.0
and OpenCV Library is added as in this figure.
Run Example
This is what I summarized here.
http://developer.android.com/training/basics/firstapp/running-app.html
Run On Emulator
In your Eclipse IDE,
Window -> Android Virtual Device Manager -> New
Set as above figure and OK
Select TestAVD you created -> Start
Close Virtual Device Manager.
In Package Explorer in Eclipse IDE,
Right click the OpenCV - Sample - image-manipulations -> Run As -> Android Application.
This will run the application on your emulator :)
Run On Real Device
First of all you need an Android Device with Android 3.0 or higher and you must have USB drivers installed. Unless get them from manufactures website or may be here, http://developer.android.com/tools/extras/oem-usb.html .
Turn on Debugging mode on you android device. For example, in Samsung Galaxy,
Settings -> Developer Options -> Check USB Debugging, Check Allow mock locations.
Then connect your phone to computer.
In Package Explorer in Eclipse IDE,
Right click the OpenCV-Sample-image-manipulations -> Run As -> Android Application.
If prompt select your real device. Then application will be installed and run on your device.
In the first time use it will automatically download OpenCV Manager from Google Play.
The OpenCV sample will be running on you real device. Try Edge detection on your android device :)
These are the Tutorial provided from OpenCV. They may also helpful to you.
http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/O4A_SDK.html#o4a-sdk
http://docs.opencv.org/doc/tutorials/introduction/android_binary_package/android_dev_intro.html
Tuesday, December 11, 2012
Configure OpenCV 2.4 for Qt Creator on Ubuntu
First install Qt creator using Ubuntu Software Center
Open Qt Creator
File --> New file or project
Qt Widget Project --> Qt GUI Application --> Choose
Click Next for all.
Open .pro file and add the following lines
INCLUDEPATH += /usr/local/include/opencv
LIBS += -L/usr/local/lib
LIBS += -lopencv_core
LIBS += -lopencv_imgproc
LIBS += -lopencv_highgui
LIBS += -lopencv_ml
LIBS += -lopencv_video
LIBS += -lopencv_features2d
LIBS += -lopencv_calib3d
LIBS += -lopencv_objdetect
LIBS += -lopencv_contrib
LIBS += -lopencv_legacy
LIBS += -lopencv_flann
LIBS += -lopencv_nonfree
Save it.
Open .ui file.
Drag and drop a PushButton to window.
Click PushButton and chage the follwong properties
Right click PushButton --> Go to slot --> clicked() --> Ok
Include the following
#include <cv.h>
#include <highgui.h>
Add the following code
void MainWindow::on_btnDisplay_clicked()
{
cv::namedWindow("Disp");
cv::VideoCapture cap(0);
cv::Mat frame;
do{
cap >> frame;
imshow("Disp",frame);
}while(cv::waitKey(30)<0);
cv::destroyAllWindows();
}
Run it. You will see yourself on the screen, when you click Display button !!!
Open Qt Creator
File --> New file or project
Qt Widget Project --> Qt GUI Application --> Choose
Click Next for all.
Open .pro file and add the following lines
INCLUDEPATH += /usr/local/include/opencv
LIBS += -L/usr/local/lib
LIBS += -lopencv_core
LIBS += -lopencv_imgproc
LIBS += -lopencv_highgui
LIBS += -lopencv_ml
LIBS += -lopencv_video
LIBS += -lopencv_features2d
LIBS += -lopencv_calib3d
LIBS += -lopencv_objdetect
LIBS += -lopencv_contrib
LIBS += -lopencv_legacy
LIBS += -lopencv_flann
LIBS += -lopencv_nonfree
Save it.
Open .ui file.
Drag and drop a PushButton to window.
Click PushButton and chage the follwong properties
- objectName: btnDisplay
- text: Display
Right click PushButton --> Go to slot --> clicked() --> Ok
Include the following
#include <cv.h>
#include <highgui.h>
Add the following code
void MainWindow::on_btnDisplay_clicked()
{
cv::namedWindow("Disp");
cv::VideoCapture cap(0);
cv::Mat frame;
do{
cap >> frame;
imshow("Disp",frame);
}while(cv::waitKey(30)<0);
cv::destroyAllWindows();
}
Run it. You will see yourself on the screen, when you click Display button !!!
Configure OpenCV 2.4 for Eclipse
Open Eclipse IDE
File --> New --> C++ Project
Give a project name
Select project type Hello World C++ Project from Executables
Project --> Properties
C/C++ Build --> Settings
Cross G++ Compiler --> Includes
Add /usr/local/include/opencv to Include paths(-l)
Cross G++ Linker --> Libraries
Add /usr/local/lib to Library search path (-L)
Add the following to Libraries(-l)
opencv_core
opencv_imgproc
opencv_highgui
opencv_ml
opencv_video
opencv_features2d
opencv_calib3d
opencv_objdetect
opencv_contrib
opencv_legacy
opencv_flann
opencv_nonfree
Copy the following test app, build and run.
#include <iostream>
#include <cv.h>
#include <highgui.h>
using namespace std;
using namespace cv;
int main() {
cout << "!!!Hello World!!!" << endl;
VideoCapture cap(0);
Mat frame;
do{
cap >> frame;
imshow("Disp", frame);
}while(waitKey(30)<0);
return 0;
}
It works !
File --> New --> C++ Project
Give a project name
Select project type Hello World C++ Project from Executables
Project --> Properties
C/C++ Build --> Settings
Cross G++ Compiler --> Includes
Add /usr/local/include/opencv to Include paths(-l)
Cross G++ Linker --> Libraries
Add /usr/local/lib to Library search path (-L)
Add the following to Libraries(-l)
opencv_core
opencv_imgproc
opencv_highgui
opencv_ml
opencv_video
opencv_features2d
opencv_calib3d
opencv_objdetect
opencv_contrib
opencv_legacy
opencv_flann
opencv_nonfree
Copy the following test app, build and run.
#include <iostream>
#include <cv.h>
#include <highgui.h>
using namespace std;
using namespace cv;
int main() {
cout << "!!!Hello World!!!" << endl;
VideoCapture cap(0);
Mat frame;
do{
cap >> frame;
imshow("Disp", frame);
}while(waitKey(30)<0);
return 0;
}
It works !
Install Eclipse in Ubuntu
Downloaded Eclipse from website
http://www.eclipse.org/downloads/
If your downloaded file is eclipse-cpp-juno-linux-gtk.tar.gz
tar -xvf eclipse-cpp-juno-linux-gtk.tar.gz
cd eclipse
chmod +x eclipse
cd ..
mv eclipse /opt
gedit /usr/share/applications/eclipse.desktop
Copy the following and save it.
[Desktop Entry]
Name=Eclipse
Type=Application
Exec=/opt/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE
Name[en]=Eclipse
cd /usr/local/bin
ln -s /opt/eclipse/eclipse
Eclipse is ready
http://www.eclipse.org/downloads/
If your downloaded file is eclipse-cpp-juno-linux-gtk.tar.gz
tar -xvf eclipse-cpp-juno-linux-gtk.tar.gz
cd eclipse
chmod +x eclipse
cd ..
mv eclipse /opt
gedit /usr/share/applications/eclipse.desktop
Copy the following and save it.
[Desktop Entry]
Name=Eclipse
Type=Application
Exec=/opt/eclipse/eclipse
Terminal=false
Icon=/opt/eclipse/icon.xpm
Comment=Integrated Development Environment
NoDisplay=false
Categories=Development;IDE
Name[en]=Eclipse
cd /usr/local/bin
ln -s /opt/eclipse/eclipse
Eclipse is ready
Install OpenCV in Ubuntu 12.04
Copy the following script to gedit and save as opencv.sh . Open terminal.
chmox +x opencv.sh
./opencv.sh
This will complete opencv installation
arch=$(uname -m)
if [ "$arch" == "i686" -o "$arch" == "i386" -o "$arch" == "i486" -o "$arch" == "i586" ]; then
flag=1
else
flag=0
fi
echo "Installing OpenCV 2.4.3"
mkdir OpenCV
cd OpenCV
echo "Removing any pre-installed ffmpeg and x264"
sudo apt-get remove ffmpeg x264 libx264-dev
echo "Installing Dependenices"
sudo apt-get install libopencv-dev
sudo apt-get install build-essential checkinstall cmake pkg-config yasm
sudo apt-get install libtiff4-dev libjpeg-dev libjasper-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev
sudo apt-get install python-dev python-numpy
sudo apt-get install libtbb-dev
sudo apt-get install libqt4-dev libgtk2.0-dev
echo "Downloading x264"
wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20120528-2245-stable.tar.bz2
tar -xvf x264-snapshot-20120528-2245-stable.tar.bz2
cd x264-snapshot-20120528-2245-stable/
echo "Installing x264"
if [ $flag -eq 1 ]; then
./configure --enable-static
else
./configure --enable-shared --enable-pic
fi
make
sudo make install
cd ..
echo "Downloading ffmpeg"
wget http://ffmpeg.org/releases/ffmpeg-0.11.1.tar.bz2
echo "Installing ffmpeg"
tar -xvf ffmpeg-0.11.1.tar.bz2
cd ffmpeg-0.11.1/
if [ $flag -eq 1 ]; then
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab
else
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-shared
fi
make
sudo make install
cd ..
echo "Downloading v4l"
wget http://www.linuxtv.org/downloads/v4l-utils/v4l-utils-0.8.8.tar.bz2
echo "Installing v4l"
tar -xvf v4l-utils-0.8.8.tar.bz2
cd v4l-utils-0.8.8/
make
sudo make install
cd ..
echo "Downloading OpenCV 2.4.3"
wget -O OpenCV-2.4.3.tar.bz2 http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.3/OpenCV-2.4.3.tar.bz2/download
echo "Installing OpenCV 2.4.3"
tar -xvf OpenCV-2.4.3.tar.bz2
cd OpenCV-2.4.3
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE ..
make
sudo make install
sudo su
sudo echo “/usr/local/lib” >> /etc/ld.so.conf
sudo ldconfig
echo "OpenCV 2.4.3 ready to be used"
Special Thanks for the original writer. This is a little modified version of it
chmox +x opencv.sh
./opencv.sh
This will complete opencv installation
arch=$(uname -m)
if [ "$arch" == "i686" -o "$arch" == "i386" -o "$arch" == "i486" -o "$arch" == "i586" ]; then
flag=1
else
flag=0
fi
echo "Installing OpenCV 2.4.3"
mkdir OpenCV
cd OpenCV
echo "Removing any pre-installed ffmpeg and x264"
sudo apt-get remove ffmpeg x264 libx264-dev
echo "Installing Dependenices"
sudo apt-get install libopencv-dev
sudo apt-get install build-essential checkinstall cmake pkg-config yasm
sudo apt-get install libtiff4-dev libjpeg-dev libjasper-dev
sudo apt-get install libavcodec-dev libavformat-dev libswscale-dev libdc1394-22-dev libxine-dev libgstreamer0.10-dev libgstreamer-plugins-base0.10-dev libv4l-dev
sudo apt-get install python-dev python-numpy
sudo apt-get install libtbb-dev
sudo apt-get install libqt4-dev libgtk2.0-dev
echo "Downloading x264"
wget ftp://ftp.videolan.org/pub/videolan/x264/snapshots/x264-snapshot-20120528-2245-stable.tar.bz2
tar -xvf x264-snapshot-20120528-2245-stable.tar.bz2
cd x264-snapshot-20120528-2245-stable/
echo "Installing x264"
if [ $flag -eq 1 ]; then
./configure --enable-static
else
./configure --enable-shared --enable-pic
fi
make
sudo make install
cd ..
echo "Downloading ffmpeg"
wget http://ffmpeg.org/releases/ffmpeg-0.11.1.tar.bz2
echo "Installing ffmpeg"
tar -xvf ffmpeg-0.11.1.tar.bz2
cd ffmpeg-0.11.1/
if [ $flag -eq 1 ]; then
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab
else
./configure --enable-gpl --enable-libfaac --enable-libmp3lame --enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libtheora --enable-libvorbis --enable-libx264 --enable-libxvid --enable-nonfree --enable-postproc --enable-version3 --enable-x11grab --enable-shared
fi
make
sudo make install
cd ..
echo "Downloading v4l"
wget http://www.linuxtv.org/downloads/v4l-utils/v4l-utils-0.8.8.tar.bz2
echo "Installing v4l"
tar -xvf v4l-utils-0.8.8.tar.bz2
cd v4l-utils-0.8.8/
make
sudo make install
cd ..
echo "Downloading OpenCV 2.4.3"
wget -O OpenCV-2.4.3.tar.bz2 http://sourceforge.net/projects/opencvlibrary/files/opencv-unix/2.4.3/OpenCV-2.4.3.tar.bz2/download
echo "Installing OpenCV 2.4.3"
tar -xvf OpenCV-2.4.3.tar.bz2
cd OpenCV-2.4.3
mkdir build
cd build
cmake -D CMAKE_BUILD_TYPE=RELEASE ..
make
sudo make install
sudo su
sudo echo “/usr/local/lib” >> /etc/ld.so.conf
sudo ldconfig
echo "OpenCV 2.4.3 ready to be used"
Special Thanks for the original writer. This is a little modified version of it
Sunday, December 9, 2012
Install .deb file in Ubuntu
sudo dpkg -i .deb
This command may give error because the dependences may not be installed. If so,
sudo apt-get -f install
Note: Can applicable for google chrome, skype etc.
Sunday, December 2, 2012
Customize Ubuntu Boot Menu
Grub-Customizer is the best GUI I found to customize
Ubunutu boot menu. It allows you to select desired default boot or to
boot previously booted OS.
sudo add-apt-repository ppa:danielrichter2007/grub-customizer
sudo apt-get update
sudo apt-get install grub-customizer
Tuesday, November 27, 2012
Install OpenCV 2.3 on Visual C++ .NET 2008
The following articles assumes you are using Windows7 with x86 .NET. If you are developing x64 application replace x86 with x64
C:\OpenCV2.3\build\include
C:\OpenCV2.3\build\x86\vc9\lib
opencv_features2d230d.lib
opencv_highgui230d.lib
opencv_core230d.lib
opencv_imgproc230d.lib
opencv_ml230d.lib
opencv_objdetect230d.lib
opencv_video230d.lib
opencv_contrib230d.lib
opencv_calib3d230d.lib
opencv_features2d230.lib
opencv_highgui230.lib
opencv_core230.lib
opencv_imgproc230.lib
opencv_ml230.lib
opencv_objdetect230.lib
opencv_video230.lib
opencv_contrib230.lib
opencv_calib3d230.lib
- Ready .NET 2008 Installed on your computer.
- Download OpenCV-2.3.0-win-superpack.exe
- Let it extracted in default location (Unless there must be no spaces in the path)
- Start --> Right click computer --> Properties --> Advanced System Settings --> Environment Variables
- Select Path in System Variables --> Edit
Add the following to the end of text
- Restart Windows
- Create new C++ project in .NET
- Tools --> Options
- Projects and Solutions --> VC++ Directories
- Select Win32 under Platform for developing x86 application or select 64 for developing x64 application
- Select Include files in Show directories for
- Add the following path
C:\OpenCV2.3\build\include
- Select Library files in Show directories for
C:\OpenCV2.3\build\x86\vc9\lib
- Project->Properties
- Configuration Properties -> Linker -> Input
- Debug in 'Configuration'
- Add the following to the Additional Dependencies
opencv_features2d230d.lib
opencv_highgui230d.lib
opencv_core230d.lib
opencv_imgproc230d.lib
opencv_ml230d.lib
opencv_objdetect230d.lib
opencv_video230d.lib
opencv_contrib230d.lib
opencv_calib3d230d.lib
- Select Release in Configuration
- Add the following to the Additional Dependencies
opencv_features2d230.lib
opencv_highgui230.lib
opencv_core230.lib
opencv_imgproc230.lib
opencv_ml230.lib
opencv_objdetect230.lib
opencv_video230.lib
opencv_contrib230.lib
opencv_calib3d230.lib
- Now you are ready to use OpenCV
Subscribe to:
Posts (Atom)
