i have only 3 weeks left so plzzz help me as soon as possible so that i may complete this project with in time.
What do you need help with? Reading the IR sensor? That's trivial. Reading the metal sensor? What is a metal sensor? If it is a switch that indicates whether the gate is opened or closed, reading it is trivial.
now arduino will send a signal to PC to switch ON camera then capture a picture.
No, it won't. The Arduino will send some data to the PC, via the serial port. Doing that is trivial.
Some application needs to be monitoring the serial port. That application will have some expectations about the data that tells it to start or stop doing something. Determining what those expectations are may be as easy as RTFM or it may involve reading the source code. Or, it may not be possible to determine.
But, since we don't know what that application is, we can't help you.
Image processing will also be used in this project to scan that person and rotate the camera according the movement of that person.
The image processing will not be done on the Arduino. The pan, tilt, and zoom are not likely to be done by the PC. The PC will need to send data to the Arduino. The Arduino will need to parse that data and move the servos.
Since you haven't mentioned what servos you have, how they are used to move the camera, or what application is sending what data that needs to be parsed, you're pretty much on your own here.
i want to know the code of Arduino, as well as complete method that how to complete this project.
You have not provided near enough detail yet. Lots of people here will be willing to help, if you stop blaming others for your problems and answer the questions that you are asked. And, if you show a little effort.