Monday 6 January 2014

IP-Webcam in opencv in c-plus-plus

This post describe you how to access ipwebcam from your smartphone to your project in opencv. I faced very difficulty to find solution of this problem on internet. Now I have solved this problem and decide to share it for helping others who is seeking with this problem.
First you need to download ip-webcam in your smartphone. I am using android v3.6 . You can download ipwebcam from google play store. Now when you start server it generate ip address based on your network. If you are using internet then it provide your isp address. If you connected to wifi then it will generate your device ip-address and If you are using tethering hotspot then it will generate gateway ip-address. Whatever when you get the ip-address you need to open it in your computer in any browser. I am supposing your ip-address is http://192.168.100.1:8080
Now come to second part ...
In Visual Studio 2010 and opencv I am using c++ programming. The only way to access webcam from mobile is write a code to download image from ip-address to your computer and you can use that image for further processing. Here is code.

//Code:

#include <math.h>
#include <opencv\cv.h>
#include <opencv\highgui.h>
#include <stdlib.h>
#include <iostream>
#include <stdio.h>
#include<UrlMon.h>
#include<tchar.h>
#pragma comment(lib,"urlmon.lib")


using namespace cv;
using namespace std;


int main()
{
    Mat capf;
    for(;;)
    {
HRESULT hr = URLDownloadToFile(NULL,
        _T("http://192.168.43.1:8080/shot.jpg"),
        _T("e:/ptest.jpg"),0,NULL);

    //IplImage *test=cvLoadImage("e:/ptest.jpg");
    capf=imread("e:\\ptest.jpg");
    imshow("test",capf);
    cvWaitKey(30);
    }
    system("pause");
    return 0;
}


This program grab an image from your mobile webcam and store it in particular location (any drive) and next line in code open that image in your opencv window for further processing. This process is slow but very usefull in various application.
I am not a professional so my explaination is rough type. All you need to grab information from this post. Further any query leave a comment. Thank You.

Friday 18 October 2013

Gate-2014 for ECE (ebook)

Only for Electronics student. There is a best study material available for MCQ and practicing.
download ebook   click here

Thursday 17 October 2013

reading analog input in arduino


Hi friends...!!!!!
Here i m going to explain how to read analog data from arduino and
i m supposed to u have basic knowledge of arduino uno shield. In arduino analog read perform analog to digital converter with 2^10 resolution.That mean if you are using 5V then it will divided by 2^10 which is 4.26mV change.Means for every change in 4.26mV there is change of bit value.Its bit value lies between 0-1023.
This is a simple example read analog reading.
1st step to make voltage divider circuit.Take input from arduino 5v source and ground pin.Connect it  to both side of potentiometer and middle pin of potentiometer goes to analog read input A0 pin of arduino.It will shown in figure below

compile c program in linux

hello frickies....
Here i'll teach you how to compile and run your c program in linux operating system.
First you go to your directory where your .c extension file present in your computer.As an example in my case it is in Desktop directory.I am using BackTrack OS which is also a family of Linux OS. You can also write your c code in vi or emac or any editor in linux.
Once you have written your c program you can see it using 'ls' command.As you can see in image below.

free idm download crack

hello friend....
Many of us are googling to fing idm crack.
here i have crack idm which work fine with almost all version of firefox. You can download and install it free.
There is no patch file for idm.So there is no chance of any virus issue.How to install idm in your computer is very easy.Tutorial for installation of idm will be provide in next post. Thank You.
 click here to download idm.zip