Sunday, April 7, 2013

My First OpenCV Sample Program

This is my first OpenCV code that was compiled and run on my Ubuntu 13.04 machine.

#include <opencv2/core/core.hpp>
#include <opencv2/highgui/highgui.hpp>
int main() {
    // read an image
    cv::Mat image = cv::imread("my_photo.jpg");
    // create image window named "My Image"
    cv::namedWindow("My Photo");
    // show the image on window
    cv::imshow("My Photo", image);
    // wait key for 5000 ms
    cv::waitKey(5000);
    return 1;
}
g++ -o hello hello.cpp `pkg-config opencv --cflags --libs`
./hello

Saturday, April 6, 2013

Sunday, March 17, 2013

Ubuntu: How to Convert FLV file to MP3 Using ffmpeg

We can download video in FLV format from YouTube using Flashgot Add-On on Firefox web browser.

In order to extract the MP3 from the FLV video file, please follow the following procedure.

First, install ffmpeg software:

sudo apt-get install ffmpeg

Once ffmpeg is installed, convert FLV file to MP3 using the following command:

ffmpeg -i flv_file.flv output_file.mp3

Ubuntu: Install Adobe Reader

sudo add-apt-repository "deb http://archive.canonical.com/ precise partner"
sudo apt-get update
sudo apt-get install acroread

Monday, March 4, 2013

Ubuntu: Install C++ Boost

Command to install C++ Boost packages:

sudo apt-get install libboost-dev libboost-doc

Tuesday, February 26, 2013

LibreOffice Calc: Toggles between relative, mixed and absolute referencing

 
F4 function key in Microsoft Excel toggles between relative, mixed and absolute referencing.

In LibreOffice Calc, use Shift+F4 to perform the same task.

Thursday, February 7, 2013