Ads 468x60px

Wednesday, November 21, 2012

How to open and close a process from a python script

Hi guys

     I am giving some idea about  how we can start and stop a process using a python script. This will be useful when we need to start a process that is outside the script

I am running two python scripts. One is master script, this script will start the slave script. Slave script will execute continuously upto 5 sec and it will terminated by the master script

Master script

 import time  
 import subprocess  
 #starting process python  
 proc = subprocess.Popen(["python",""],shell=False)  
 #5 sec delay  
 #killing process["kill","-9","%d" %])  
 #waiting for killing  
 print 'poll = ',proc.poll()  

Slave script

 while 1:  
      print "hello"  


It will print hello upto 5 seconds after that it will stop and show this message

Sunday, November 4, 2012

Controlling Android Phones using Python and Linux

Hi all

  I am giving a brief tutorial on how to control android phone using python over wifi using PC.

Prerequisites on android phone

1)Wifi ADB Application: It is a tool for doing android debugging over wifi. Here is my previous tutorial about Wifi ADB

Prerequisites on PC

1)Ubuntu 12.04 


1)Start wifi adb using above tutorial
2)Start a private server using SL4A.

Thursday, November 1, 2012

New Arduino DUE

Hi all

   There is a newcomer in the arduino board series. It's arduino due. The main feature of this board is, it comes with an ARM based controller.

Technical Specification

Microcontroller                                           AT91SAM3X8E
Operating Voltage                                           3.3V
Input Voltage (recommended)                           7-12V
Input Voltage (limits)                                   6-20V
Digital I/O Pins                                           54 (of which 12 provide PWM output)
Analog Input Pins                                           12
Analog Outputs Pins                                   2 (DAC)
Total DC Output Current on all I/O lines           130 mA
DC Current for 3.3V Pin                                   800 mA
DC Current for 5V Pin                                   800 mA
Flash Memory                                                   512 KB 
SRAM                                                           96 KB (two banks: 64KB and 32KB)
Clock Speed                                                   84 MHz

Saturday, September 22, 2012

Speech Recognition on arduino


  I have seen a library for doing speech recognition on arduino. Check the following link for seeing more information.


  1. Letter based recognition
  2. Small memory footprint
  3. Arduino Compatible
  4. No training required
  5. Fixed point arithmetic
  6. 30% - 40% accuracy if based on phonemes, up to 80% if based on words.
  7. Plugs directly into an analogRead() port

Friday, September 21, 2012

Working with LinkSprite UART-Wifi Module

Hi all

    I purchased an UART-Wifi module from rhydolabsz.

Product link

Testing Wifi Module using the given PC tool

Saturday, September 15, 2012

Arduino PID library

PID Library implemented on arduino

Check this link

Thursday, September 6, 2012

Cubieboard: A threat to Raspberry Pi

Hi Guys

     I saw a new embedded board that can be a competition for the famous Raspberry Pi. The name of the board is Cubieboard. Specs given below

ROS and Kinect

Hi Guys

     The following video shows how we can interface kinect and ROS


Wednesday, September 5, 2012

How to hack your friends password in Ubuntu/Linux

Hi all 

     I got an interesting keylogger working in Linux Its name is Linux Keylogger (lkl).It will capture all keyevents and logging into a file



1)Extract zip file into some location
2)Open terminal in that location
3)Type the following commands
6)sudo make install

Tuesday, September 4, 2012

Turtlebot Simulation using ROS and Gazebo


     I am giving the instruction to simulate and control turtlebot using ROS and Gazebo

1)Install ROS and gazebo packages of Turtlebot from synaptic package manager

Video showing installation of ROS

mbed :An embedded board based on ARM

Description: The mbed Microcontroller is an ARM processor, a comprehensive set of peripherals and a USB programming and communication interface provided in a small and practical DIP package. The mbed is a super-easy-to-use rapid prototyping tool built on industry standard technology.

PCB: An opensource circuit designer

PCB is free software for designing printed circuit board layouts. It has many features and is capable of professional-quality output. It is available for UNIX operating systems, e.g., GNU/Linux, Mac OS-X, or Cygwin under Windows. pcb was orignally written by Thomas Nau of the University of Ulm, Germany, and is now maintained by harry eaton of the Johns Hopkins University Applied Physics Laboratory, Laurel, Maryland, USA.

Fritzing :An interactive circuit designer

Hi guys

       I have seen an interactive circuit designer called Fritzing. The main attraction of this software is, user can include arduino and lot of other breakout boards in the designing purpose. Its saves developer time and become more productive

Thursday, August 30, 2012

V-REP : An advanced robot simulator

V-REP is the Swiss army knife among robot simulators: you won't find a simulator with more functions, features, or more elaborate APIs.

The robot simulator V-REP, with integrated development environment, is based on a distributed control architecture: each object/model can be individually controlled via an embedded script, a plugin, a ROS node, a remote API client, or a custom solution. This makes V-REP very versatile and ideal for multi-robot applications. Controllers can be written in C/C++, Python, Java, Lua, Matlab or Urbi.

V-REP is used for fast algorithm development, factory automation simulations, fast prototyping and verification, robotics related education, remote monitoring, safety double-checking, etc.

Maple development board

The LeafLabs Maple is a microcontroller board based on the STM32F103RB microprocessor. The Maple runs at a maximum of 72 MHz, has 39 digital input/output pins, 16 analog inputs, native full speed USB, 3 USARTs (hardware serial ports), integrated SPI/I2C support, a power jack, and a reset button.

Wednesday, August 29, 2012

C++ Template:Hello World

Hi guys

     C++ templates are very useful when we write a generic code, ie it will work with all data types. I am giving a sample code which shows the working of templates

Setting OpenCV on eclipse working on Ubuntu 12.04

Hi all 

     I am giving instruction for setting opencv on eclipse IDE. I am using Eclipse INDIGO .

1)Install Eclipse and eclipse CDT plugin from synaptic package manager

Friday, August 24, 2012

Boost library on Ubuntu 12.04


       I am giving some instruction for setting boost library on Ubuntu 12.04

1)Install boost library using synaptic package manager

Sunday, August 19, 2012

ROS Video Tutorials Series 1

Hey guys

     I made some video tutorials about Robotic Operating System. I am giving the videos below

ROS Introduction

ROS Installation

Saturday, August 11, 2012

ARToolkit for ROS

I am giving the procedures for setting ARToolkit on ROS

1)Download ar_pose

git clone

ARToolkit for Ubuntu 12.04 32 bit

Hi all 

       I am giving  tips to run ARToolkit on Ubuntu 12.04. I got reference from the following link


1)Download ARToolkit 2.7 for linux and patch

Screen-recorder for Ubuntu 12.04

Hey guys

     I got a good screen-recorder for Ubuntu 12.04 for making you-tube video tutorials.

The application name is KAZAM Screencaster. 

Thursday, August 9, 2012

How to fix crash in Ubuntu 12.04?

Hi all 

  I got this error when i installed some libraries. This is how i fixed

Sunday, August 5, 2012

How to convert RGB to HSV using OpenCV


 I am sharing a simple program  which convert RGB image into HSV color space. I am handling cv::Mat instead of IplImage.


  /// HSV Conversion  
 #include "opencv2/highgui/highgui.hpp"   
 #include "opencv/cv.h"  
 #include <iostream>   
 #include <stdio.h>   
 using namespace std;   
 using namespace cv;   
  int main(int argc,   
   char *argv[]   
  /// input and hsv image variable  
  cv::Mat input,hsv;  
  input =imread(argv[1],1);  
  ///hsv conversion  
 ///displaying hsv and input  
  return 0;   

Setting cvbloblib in Visual studio 2010

Hey guys

           I am giving tutorials for setting cvbloblib in Microsoft Visual studio 2010

*Download cvblobllib from willogarage website

Setting OpenCV in Visual studio2010

Download cvbloblib for linux(Note:Windows version not working for me)

Extract all files to project folder

How to start with git using github

Hey guys
         This tutorial is absolutely for beginers. In this tutorial ,i am giving the steps to start a test repository on github


* Start an account in github

*Create a repository like shown below

How to set cvbloblib in Ubuntu 12.04

Hey guys

        I am giving the instruction for setting cvbloblib from OpenCV in Ubuntu 12.04

*Extract into some folder say desktop

Saturday, August 4, 2012

How to make You-tube videos in Ubuntu

Hey guys 

     There is a good tool available in Ubuntu, for recording the screen. The main purpose of recording screen is making you-tube videos. The tool is called gtk-recordscreen

You can install it by command line or through synaptic package manager

$sudo apt-get install recordmydesktop

From synaptic package manager

x-IMU:An Inertial Measurement Unit

The x-IMU was designed to be the most versatile IMU and AHRS platform available. Its host of on-board sensors, algorithms, configurable auxiliary port and real-time communication via USB, Bluetooth or UART make it both a powerful sensor and controller. The on-board SD card, battery charger (via USB), real-time clock/calendar and motion trigger wake up also make the x-IMU an ideal standalone data logger.

Meshlab: A 3D Viewer for Linux

MeshLab is an open source, portable, and extensible system for the processing and editing of unstructured 3D triangular meshes.

The system is aimed to help the processing of the typical not-so-small unstructured models arising in 3D scanning, providing a set of tools for editing, cleaning, healing, inspecting, rendering and converting this kind of meshes.


Installation in Ubuntu

$sudo apt-get install meshlab

How to convert opencv IplImage to cv::Mat and cv::Mat to IplImage

Hey guys

     This is a tutorial for converting OpenCV image handlers 

*IplImage to cv::Mat
*cv::Mat to IplImage

IplImage to cv::Mat example program


 ///Opencv 2.4.2   
 #include "opencv2/highgui/highgui.hpp"  
 #include <iostream>  
 #include <stdio.h>  
 using namespace std;  
 using namespace cv;  
 int main(int argc,  
    char *argv[]  
 ///Loading image to IplImage  
 IplImage *img=cvLoadImage(argv[1]);  
 ///converting IplImage to cv::Mat  
 Mat image=cvarrToMat(img);  
 return 0;  

Thursday, August 2, 2012

How to get 3D Coordinates from Kinect

This is a simple tutorial helps you to get the 3D coordinates from Kinect using OpenNI library

Code snippet

 xn::DepthGenerator & Xn_depth;  
 const XnDepthPixel * pDepthMap = Xn_depth.GetDepthMap();  
 XnPoint3D Point2D, Point3D;  
 Point2D.X = ii;   //x-pixels  
 Point2D.Y = jj;  //y-pixels  
 Point2D.Z = pDepthMap[jj*640+ii];Xn_depth.ConvertProjectiveToRealWorld(1, &Point2D, &Point3D);  

Example Code showing the usage of this snippet. This code combine OpenCV and OpenNI. It gives X,Y,Z coordinate of the desired x,y pixel that we supply through command line argument.

Setting OpenCV in Windows

Installing OpenNI in Windows 7

Setting OpenNI in Visual studio 2010

How to program using OpenNI in Visual C++ 2010 express

Hi Guys 

      Today i am going to show you how we can set OpenNI in Visual studio 2010


1)Install OpenNI in Windows 7

2)Creating an empty project

Wednesday, August 1, 2012

How to flip an image in OpenCV

OpenCV provides a function to flip an  image.


void flip(const Mat& src, Mat& dst, int flipCode)

Flips a 2D array around vertical, horizontal or both axes.

src – The source array
dst – The destination array; will have the same size and same type as src
flipCode – Specifies how to flip the array: 0 means flipping around the x-axis, positive (e.g., 1) means flipping around y-axis, and negative (e.g., -1) means flipping around both axes. See also the discussion below for the formulas.
The function flip flips the array in one of three different ways (row and column indices are 0-based):

Example code:


Monday, July 30, 2012

Kinect IR Pattern Captured using Mobile Camera


       I took a video of IR Pattern getting from Kinect IR projector. Its awesome :)

Saturday, July 28, 2012

Solved::cxtype.h not found in OpenCV

Hi Guys

  After OpenCV 2.3 version ,header file cxtype.h changed into cxcore.h. In latest version cxcore.h is in opencv\cxcore.h path .

Friday, July 27, 2012

How to do OpenCV haar-training in Windows 7

Hi guys

      I am giving the procedure for doing opencv haar training in Windows 7

2)Building Object marker utility program. I am giving the code for object marker utility. The purpose of this utility is to mark the object to be trained. If we want to train a bottle in an image, just mark the area of bottle using this utility

Basic functions of this utility

1)Press left button and mark the object
2)After marking press double click
3)Press "SPACE" for recording the area of object
4)Press "ENTER" for next image

//Code of Object marker utility

Sunday, July 22, 2012

Raspberry Pi Vs Gooseberry board

Comparison between two latest embedded boards

Raspberry Pi

Saturday, July 21, 2012

Camera calibration using OpenCV

Hi Guys

      I am giving the procedures for camera calibration using OpenCV

What is camera calibration

Camera resectioning is the process of finding the true parameters of the camera that produced a given photograph or video. Usually, the camera parameters are represented in a 3 × 4 matrix called the camera matrix.
This process is often called camera calibration, but "camera calibration" can also mean photometric camera calibration.

For more details refer Wiki Link

Camera calibration using OpenCV

1)Install and configure OpenCV in Visual studio 2008 .The tutorials are available in following link

2)Camera calibration program download from here

Tuesday, July 17, 2012

Basic Concepts of Digital Image Processing

Hi Everyone

        I like to share some basic concepts of Image processing. It is absolutely for beginers but also useful for experts for refreshing the basics again. I got most of the information  from Wikipedia. Lets start my tutorials

What is Image Processing

  Image processing is a form of signal processing, in which the input  will be an image. Image can  be  photograph or video or a live stream data from video camera . The output can be  an image or some parameters related to the input image

Most of the image processing technique treated images as a 2D signals and  apply standard signal processing into it.

Image processing can be digital or analog. We are mainly looking on digital image processing. 

Verbatim 32GB Pen-drive Review

Recently i purchased Verbatim 32-GB Pen-drive from flipkart. I am giving the specs of this pen drive .

Specifications of Verbatim Store'n'Go Pinstripe 32GB Pen Drive (Black)

Brand: Verbatim
Color: Black
Capacity: 32 GB
Dimensions: 54 x 21 x 9.22 mm
Form Factor: USB Flash Drive
Interface: USB 2.0
Model: 64058
OS Supported: Windows 2000, Windows XP, Windows Vista, Windows 7, Mac OS v9 or higher, Linux 2.4.0 or higher
Part Number: 64058
Type: Utility Pendrive
Variant: 32 GB
Warranty: 3 Years
Weight: 7.9 g

Monday, July 16, 2012

New ODROID Development board

Day by day new developments boards are coming to the market with interesting features and with a good price.

Here is the new board called ODROID. It comes with 2 version
1)ODROID -X : $129 development board 

2)ODROID-Q  :Tablet development  platform

Arduino and Sabertooth

Hi Guys 

  I am sharing the link of Arduino Sabertooth interface from dimensional engineering.
This library support all sabertooth models from dimension engineering.

Download library

Arduino and Sabertooth

Sunday, July 15, 2012

Wifi Android Debug Bridge(ADB)

We will get adb connection not only through USB but also through Wifi.
I think wifi is easier than USB because no wires :)
For enabling wifi adb, we need

Screenshots of the application

1)Install widget , widget looks like this.Tap on the widget to enable wifi adb

Android meets arduino

Amarino application on android enables communication between android device and arduino board.
The requirements are arduino board and a bluetooth adapter for communicating with android device.

The project website and google code link are given below

Screenshots of the amarino application

Saturday, July 14, 2012

Social Robot: My final year project(Opensource)

 Hi all

   I am publishing my final year B-tech project  called social robot as Opensource project.
It was an interesting robot which can communicate with people using speech recognition and synthesis  and has vision abilities. The main attraction of this project was the robot intelligence. It was done using Artificial Intelligence Markup Language(AIML).

The speech recognition and synthesis was done in WindowsXP using speech SDK from Windows.

Vision was done using Open Computer Vision library(OpenCV).The main features are

1)Faces,eye,nose detection
2)Motion detection
3)Face and motion tracking
4)Blob detection and color detection
5)Object detection

Speech system  and AIML work in the following fashion

Robot named Robin

Pong gaming Console: My mini project goes OpenSource

Pong game is a very popular video game. I implemented pong game in 8x8 led matrix.
It was my mini project done in the year 2010.

The main features of this game are

1)There are 10 levels  on this game. Speed of the ball will increase in each level.
Ball need to hit 10 times on paddle for entering into next level. There are 3 life for the user. If user finish 10 levels before loosing 3 life ,he will win and display congrats messages.

2)There are two paddles, one is on the top and other is on bottom. Both Paddles are controlling by a joystick.

3)Joystick has 3 keys. One for left move,one for right and one for RESET the game

4)It has an LCD for giving the details of levels and life.

5)It has two atmega-8 controllers. One for LED matrix controlling and one for LCD control.

6)The code is written in embedded c in avr-studio IDE. 


Wednesday, July 11, 2012

cvBlob in Windows7 using VisualStudio2010

Hi all
  I ported cvblob lib to Windows 7 using VS2010. This lib will work well  in Linux, but there are some issues on Windows. I tried some fixes and corrected it
I used OpenCV 2.4.2,
Windows 7

I am giving the screenshots below.

Setup  cvlib.lib

1)Setting an empty project. 

2)Configuration Type to Static library(.lib)

Tuesday, July 10, 2012

How to install OpenNI in Windows 7

Hi all 

This is a brief tutorial to install OpenNI in Windows 7. I am installing  OpenNI version 1.54 unstable.

The main feature of OpenNI 1.54 is, there is no Psi pose calibration in skeleton tracking. 
The skeleton tracking is also faster when we compared with Kinect SDK from Microsoft. OpenNI is crossplatform and available for C++,Java,C# languages.

Installation procedure

1)Download following files from the link 

2)Download the following files

Install all installers in the same order. Install avin2sensors drivers for installing primesense drivers for Kinect.

Take examples from the Sample folder from openNI.
Take NiViewer for viewing depth and rgb image..

Sunday, July 8, 2012

ROS Video Tutorials


I like to share some video tutorials of  Robotic Operating System

How to install ROS

ROS Nodes

ROS Module for speech recognition and localisation

Hark module

Video from youtube

Opensource 7DOF Robotic arm working in ROS


Clam arm link

MPU 6050 Interfacing with Arduino

The InvenSense MPU-6050 sensor contains a MEMS accelerometer and a MEMS gyro in a single chip. It is very accurate, since it contains 16-bits analog to digital conversion hardware for each channel. Therefor it captures the x, y, and z channel at the same time.
The MPU-6050 is not expensive, since it combines both an accelerometer and a gyro.

Buy MPU 6050 
Purchase from ebay

MPU 6050 with arduino

Video from youtube