Thursday 12 December 2013

How to install Opencv in Visual Studio 2010 in windows 64 bit

Many of us ofcourse Programmers facing problem in OpenCv with Visual Studio 2010. Problem encounter at the beginning. Means installation of OpenCv in VS_2010 specially in windows 7 64bit computer. I have created a video in which this type of installation problem has solved. Here you can see the video click here.
Also I am describing here all the steps for installation. You may watch video or go step by step process to install.

Step-1: 

software requirement : 

1. Microsoft Visual Studio 2010 express


2. OpenCv Latest Version

Step-2:

After downloading vs2010 install it and when you run OpenCv .exe file it will extract all data to a directory in your computer. 
 It will look like this (for opencv)
Step-3:

Now you have done installing vs2010 and opencv. Now you have to configure property sheet in vs2010 project to properly run your c++ image-processing code. In property sheet configuration we just import opencv and it functions to visual studio to perform image-processing action. So get ready for that. step 4 explain how to configure property sheet.


Step-4:

Open visual Studio 2010 and create new project. Select win32 and console application as shown in figure below and click Ok.

Then click next.
Then check on empty project and click finish.
 Next go to property manager which is below right side in window.
Now right click on debug |win32 and select last option property. Then it will look like as image below
and
  

In above image there are three points.
      4a. VC++ directories
      4b. c/c++
      4c. Linker


4a.  VC++ directories :

   There are two field.
   include directory and library directory
In "include directory" you have to add include folder of opencv
in my case it is in folder "C:\Users\Krishna\Downloads\Programs\opencv\build\include"
In "Library directory" you have to add library folder of opencv as like "C:\Users\Krishna\Downloads\Programs\opencv\build\x86\vc10\lib"
this tutorial only describe for windows 64 bit users.
4b. C/C++ :

go to general  ->  additional include directory.
and add the include folder of opencv


4c. Linker :

There will be two tab "general" and "input"
In general tab add in additional library directories

 now go to the input tab. 
It is serious part of step 4 and you need to mare care about this part.
go to directory "C:\Users\Krishna\Downloads\Programs\opencv\build\x86\vc10\lib" and copy the name of all debug dll file and paste it in input part as in figure below
how to identify debug dll file? 
simple way is that if a file contains atleast one 'd' letter then it will be debug dll file. I am using opencv 4.6 so in my case it is

opencv_calib3d246d.lib
opencv_contrib246d.lib
opencv_core246d.lib
opencv_features2d246d.lib
opencv_highgui246d.lib
opencv_imgproc246d.lib
opencv_legacy246d.lib
opencv_nonfree246d.lib
opencv_objdetect246d.lib
opencv_photo246d.lib
opencv_stitching246d.lib
opencv_video246d.lib
opencv_videostab246d.lib


after that click Ok and again Ok to close property sheet.
Now you have done.

Step-5: 

Now go to solution explorer and right click on source -> add new source file and add c++ file
build and run your code.
Here is sample code just copy and paste.

#include <opencv\cv.h>
#include <opencv\highgui.h>

using namespace std;
using namespace cv;

int main()
{
IplImage* img =  cvLoadImage("c:\\p.jpg");
cvNamedWindow("Input_Image");
cvShowImage("Input_Image",img);
waitKey(300);
system("pause");

return 0;
}

I hope you run your code successfully. For any help regarding to this topic please comment I will help you always.
Thank You.

Friday 6 December 2013

Face Detection in OpenCv and Visual Studio 2010

Face detection was one of the my hobby project. I did it successfully. At the same time I learned OpenCv and its uses and various function. I am still learning. Here I will describe whatever i did in my face detection project. Here is my project result click here.

Sunday 1 December 2013

Access smartphone's webcam in opencv in c++

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 22 November 2013

BackTrack 5 Hacking Tutorial

Hi guys...
This is my first tutorial on backtrack5. In this tutorial you will know how to access any computer in LAN using backdooring method. All you need to create a payload (a virus) and send it to your friend computer and wait for open it. When your friend open this file you have full access to your friend's computer. There is a step by step tutorial in video. Click Here to see this video. Thank You

Wednesday 13 November 2013

Tell me about yourself. The best and precise answer for HR interview.

This is very common question in almost every interview. Interviewer asks this question to get you talking and they sense how well you present yourself immediately. In short they want to see you in action.They comes to know by asking this question is : How do you come across; how articulate are you; do you speak with confidence, poise, authority etc.
So for answering this question you need to very careful and well prepared for this question to impress interviewer. Here is some ways and examples to make yourself perfect by practicing this.

Tips

1. Don't speak lengthy history or wander off in different directions. Your response should be focused and purposeful.

Monday 4 November 2013

Solved TCS question paper

1) 28a + 30 b +31c =365 find a+b+c if a.b.c are natural numbers


2) P is 30% of Q
    Q is 20% of M
   M is 50% of N

what is P/N equal to.


3)Mother +daughter+infant age is 74. Mother age is 46 more then daughter and infant.And infant age is 0.4 of daughter. Find daughters age.


4) A takes 12 hrs to complete a work B takes 10 hrs to complete the same work time taken by them to make 2 publications working independently.

5)Some cards question. Probability of 1 ace which is red and one spade. Something like
This. Do go thru the cards ques. The decks and everything.


6)A finishes a work in 8 hrs
   B finishes a work in 10 hrs
  C  finishes a work in 12 hrs
A,B,C work together but A leaves after 2 hrs find the time t taken by B & C.


7)There are exactly 4 Thursdays and 4 Sundays in a month of 31. Find the first day.
You can calculate easily.

8)There were some questions of this type :-

J, K, L, M and N collected stamps. They collected a total of 100 stamps. None of them collected less than 10.
No two among them collected the same number.
(i) 3 collected the same number as K and M together.
(ii) L collected 3 more than the cube of an integer
(iii) The no. collected by J was the square of an integer.
(iv) Total no. collected by K was either the square or cube of an integer.
1. The no. collected by J was:
(1) 27 (2) 49 (3) 36 (4) 64
2. The no. collected by K was:
(1) 16 (2) 27 (3) 25 (4) 36
3. The difference of numbers collected by L & M was:
(1) 3 (2) 2 (3) 5 (4) 9

9)All numbers between 11 & 100 how many times is the number 4 used

10)A & B travelling from X to Y. A starts at 12 pm at a speed of 63m/hr. B at 1:30 pm at a speed of 84m/hr.At what time will B be 34m ahead of A?

11)There were2-3 visualizing questions also.
A cube was given in 1d. With dotted lines. Faces were marked. With 1 face as x. U had to
Tell that what will be face opposite x when it is folded as a cube.
12)Another time distance, a person runs around a rectangular field. Time given speed
Given. Find the distance. Apply perimeter formula 2(length+breadth). And length and breadth
Ratio given. Find area.

Monday 28 October 2013

New TCS question with solution

1. Three companies are working independently and receiving the savings 20%, 30%, 40%. If the companies work combinely, what will be their net savings?
suppose total income is 100
so amount x is getting is 80
y is 70
z =60
total=210

but total money is 300
300-210=90
so they are getting 90 rs less
90 is 30% of 300 so they r getting 30% discount


2. My flight takes of at 2am from a place at 18N 10E and landed 10 Hrs later at a place with coordinates 36N70W. What is the local time when my plane landed?
6:00 am b) 6:40am c) 7:40 d) 7:00 e) 8:00
Sol) The destination place is 80 degree west to the starting place. Hence the time difference between these two places is 5 hour 20 min. (=24hr*80/360).
When the flight landed, the time at the starting place is 12 noon (2 AM + 10 hours).
Hence, the time at the destination place is 12 noon - 5:20 hours = 6: 40 AM

3. A plane moves from 9°N40°E to 9°N40°W. If the plane starts at 10 am and takes 8 hours to reach the destination, find the local arrival time ?
Ans = Since it is moving from east to west longitide we need to add both
ie,40+40=80
multiply the ans by 4
=>80*4=320min
convert this min to hours ie, 5hrs 33min
It takes 8hrs totally . So 8-5hr 30 min=2hr 30min
So the ans is 10am+2hr 30 min
=>ans is 12:30 it will reach

4. A fisherman's day is rated as good if he catches 9 fishes, fair if 7 fishes and bad if 5 fishes. He catches 53 fishes in a week n had all good, fair n bad days in the week. So how many good, fair n bad days did the fisher man had in the week
Ans = Go to river catch fish
4*9=36
7*1=7
2*5=10
36+7+10=53...
take what is given 53
good days means --- 9 fishes so 53/9=4(remainder=17)  if u assume 5 then there is no chance for bad days.
fair days means ----- 7 fishes so remaining 17 --- 17/7=1(remainder=10) if u assume 2 then there is no chance for bad days.
bad days means -------5 fishes so remaining 10---10/5=2days.
  Ans: 4 good, 1 fair, 2bad. ==== total 7 days.

x+y+z=7--------- eq1
9*x+7*y+5*z=53 -------eq2
multiply eq 1 by 9,
9*x+9*y+9*z=35 -------------eq3
from eq2 and eq3
2*y+4*z=10-----eq4
since all x,y and z are integer i sud put a integer value of y such that z sud be integer in eq 4 .....and ther will be two value y=1 or 3 then z = 2 or 1 from eq 4

for first  y=1,z=2 then from eq1 x= 4
so 9*4+1*7+2*5=53.... satisfied
now for second y=3 z=1 then from eq1 x=3
so 9*3+3*7+1*5=53 ......satisfied
so finally there are two solution of this question
(x,y,z)=(4,1,2) and (3,3,1)...

5. Y catches 5 times more fishes than X. If total number of fishes caught by X and Y is 42, then number of fishes caught by X?
Ans = Let no. of fish x catches=p
no. caught by y =r
r=5p.
r+p=42
then p=7,r=35 


Download Mozila Firefox supported by IDM

Here is given mozila firefox software which supports Internet Download Manager. Using this browser integrated with IDM you can download Youtube video also.
Download mozila firefox from here. Mozila Firefox

You can also download IDM supported by Mozila Firefox click here

Saturday 26 October 2013

TCS mock test paper 2

1.1/3 of a number is 6 more than 1/6 of that number then what is the number?
(a) 12
(b) 36
(c) 24
(d) 48

2.The pace length P is the distance between the rear of two consecutive footprints. For men, the formula n/P = 180 gives an approximate relationship between n and P where, n = number of steps per minute and P = pace length in meters. Bernard knows his pace length is 120 cm. The formula applies to Bernard’s walking. Calculate Bernard’s walking speed in kmph.
(a) 236.16
(b) 8.78
(c) 15.56
(d) 23.62

3.The IT giant Tirnop has recently crossed a head count of 150000 and earnings of $7 billion. As one of the forerunners in the technology front, Tirnop continues to lead the way in products and services in India. At Tirnop, all programmers are equal in every respect. They receive identical salaries and also write code at the same rate. Suppose 24 such programmers take 24 minutes to write 24 lines of code in total, how long will it take 72 programmers to write 72 lines of code in total?
(a) 12
(b) 24
(c) 6
(d) 72

4.A sheet of paper has statements numbered from 1 to 40. For each value of n from 1 to 40, statement n says “Exactly n of the statements on this sheet are true." Which statements are true and which are false? (a) All statements are false. (b) The odd numbered statements are true the even numbered are false. (c) Second last statement is true and the remaining statements are false. (d) The even numbered statements are true and the odd numbered are false.

5.Alok and Bhanu play the following min-max game. Given the expression N = 25 + X + Y – Z, where X, Y and Z are variables representing single digits (0 to 9), Alok would like to maximize N while Bhanu would like to minimize it. Towards this end, Alok chooses a single digit number and Bhanu substitutes this for a variable of her choice (X, Y or Z). Alok then chooses the next value and Bhanu, the variable to substitute the value. Finally Alok proposes the value for the remaining variable. Assuming both play to their optimal strategies, the value of N at the end of the game would be
(a) 43
(b) 16
(c) 36
(d) 34

6.A sheet of paper has statements numbered from 1 to 40. For each value of n from 1 to 40, statement n says “At least n of the statements on this sheet are true." Which statements are true and which are false? (a)First half of the statements are true and the rest are false. (b) The odd numbered statements are true the even numbered are false. (c) First half of the statements are false and the rest are true. (d) The even numbered statements are true and the odd numbered are false.

7.10 suspects are rounded by the police and questioned about a bank robbery. Only one of them is guilty. The suspects are made to stand in a line and each person declares that the person next to him on his right is guilty. The rightmost person is not questioned. Which of the following possibilities are true? A) All suspects are lying. B) The leftmost suspect is guilty. C) Rightmost suspect is guilty.
(a) A only
(b) A and B
(c) B only
(d) B and C

8.The citizens of planet nigiet are 6 fingered and have thus developed their decimal system in base 6. A certain street in nigiet contains 1000 (in base 6) buildings numbered 1 to 1000. How many 3s are used in numbering these buildings?
(a) 108
(b) 192
(c) 54
(d) 102

9.One the Planet, Oz, there are 8 days in a week – Sunday to Saturday and another day called Oz day. There are 36 hours in a day and each hour has 90 minutes while each minute has 60 seconds. As on earth, hour hand covers the dial twice every day. Find the approximate angle between the hands of clock on Oz when the time is 14.40 a.m.
(a) 83
(b) 74
(c) 129
(d) 65

TCS HR interview question and answer

HR Interview Questions & Answers For Freshers :

1. Tell me about yourself?

I am down-to-earth, sweet, smart, creative, industrious, and thorough.

2. How has your experience prepared you for your career?

Coursework :

Aside from the discipline and engineering foundation learning that I have gained from my courses, I think the design projects, reports, and presentations have prepared me most for my career.

Work Experience :

Through internships, I have gained self-esteem, confidence, and problem-solving skills. I also refined my technical writing and learned to prepare professional documents for clients.

Student Organizations :

By working on multiple projects for different student organizations while keeping up my grades, I’ve built time management and efficiency skills. Additionally, I’ve developed leadership, communication, and teamwork abilities.

Life Experience :

In general, life has taught me determination and the importance of maintaining my ethical standards.


3. Describe the ideal job.

Ideally, I would like to work in a fun, warm environment with individuals working independently towards team goals or individual goals.I am not concerned about minor elements, such as dress codes, cubicles, and the level of formality. Most important to me is an atmosphere that fosters attention to quality, honesty, and integrity.

TCS email writting software

TCS email writting software. This software requires java for run. No installation require.Any querry related to this please comment.
to download click here

Thursday 24 October 2013

Full Adder using component

entity full_adder is
    Port (a : in std_logic;
             b : in std_logic;
             c : in std_logic;
             sum : out std_logic;
             carry : out std_logic);
end full_adder;
architecture Behavioral of full_adder is
component half_adder is
    Port (x : in std_logic;
             y : in std_logic;
             z : out std_logic;
             k : out std_logic);


Wednesday 23 October 2013

Line Follower Robot Using Arduino

How to make simple line follower robot using arduino uno. This is simple step by step tutorial to make it.
Here you will find video of tutorial click here
Soon tutorial will be uploaded.... 

Tuesday 22 October 2013

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

Sunday 20 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

TCS mock test 1.TCS unsolved question of 2013. Solve and comment your answer to help others and me also.



1.The difference between the ages of two of my three grandchildren is 3. My eldest grandchild is three times older than the age of my youngest grandchild and my eldest grandchild's age is two years more than the ages of my two youngest grandchildren added together. How old is my eldest grandchild?
(a) 12
(b) 13
(c) 10
(d) 15

2.A greengrocer was selling apple at a penny each, chickoos at 2 for a penny and peanuts at 3 for a penny. A father spent 7 pennies and got the same amount of each type of fruit for each of his three children. What did each child get?
(a) 1 apple, 2 chickoos, 2 peanuts (c) 1 apple, 3 chickoos, 2 peanuts
(b) 1 apple, 2 chickoos, 1 peanut (d) 1 apple, 1 chickoo, 1 peanut

3.The IT giant Tirnop has recently crossed a head count of 150000 and earnings of $7 billion. As one of the forerunners in the technology front, Tirnop continues to lead the way in products and services in India. At Tirnop, all programmers are equal in every respect. They receive identical salaries and also write code at the same rate.Suppose 12 such programmers take 12 minutes to write 12 lines of code in total. How long will it take 72 programmers to write 72 lines of code in total?
(a) 12
(b) 18
(c) 6
(d) 72

4.One day Rapunzel meets Dwarf and Byte in the Forest of forgetfulness. She knows that Dwarf lies on Mondays, Tuesdays and Wednesdays, and tells the truth on the other days of the week. Byte, on the other hand, lies on Thursdays, Fridays and Saturdays, but tells the truth on the other days of the week. Now they make the following statements to Rapunzel - Dwarf: Yesterday was one of those days when I lie. Byte: Yesterday was one of those days when I lie too. What day is it?
(a) Monday
(b) Sunday
(c) Thursday
(d) Saturday

5.Alok and Bhanu play the following min-max game. Given the expression N = 9 + X + Y – Z , where X, Y and Z are variables representing single digits (0 to 9). Alok would like to maximize N while Bhanu would like to minimize it. Towards this end, Alok chooses a single digit number and Bhanu substitutes this for a variable of her choice (X, Y or Z). Alok then chooses the next value and Bhanu, the variable to substitute the value. Finally Alok proposes the value for the remaining variable. Assuming both play to their optimal strategies, the value of N at the end of the game would be
(a) 20
(b) 18
(c) 27
(d) 0
Ans.  N=K+(X+Y-Z) ans = K+11
        N=K+(X-Y-Z) ans = K+2
        N=K+X*(Y-Z) ans = K+18
 no need to solve this.

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.

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