Hardware advice for machine vision project I am working in facial feature detection in video images. I was hoping to get some general advice about camera/lens technologies to determine if I can upgrade my camera/lens. 

Basically, the problem is this:

I want to obtain high resolution images of facial features. 

I currently use a Thorlabs DC1545M CMOS camera and a 16mm focal length lens. Generally, when I extract the facial features, the image regions have acceptable resolution if the face is about 40cm or less from the camera. If face moves further away from the camera, the resolution of the facial features starts to get too low for my purposes. Additionally, the camera/lens has a short depth of field so the face will often go a little ‘out of focus’ as the face moves.

For this region I was hoping to improve my camera and lens setup. However, I am not strong on camera hardware so I am not entirely sure if what I am thinking is available. 

Basically, my ideal camera would do the following:


It would have an optical zoom.
The zoom would be programmable.
It would be able to have a long depth of field so the image stays in focus. Basically the face will be closer than about 100cm to the camera so I would like face to stay in focus.
I would like the camera to be sensitive to infra-red light (Near IR).


One other thing. Right now, I could use off-the-shelf camera/lens. However, I would also be interested in board level camera/lens components.

I was hoping someone could give me ideas about what I should be looking for. 


Are there problems with my specification? 
Do you know of any cameras/lens with the specification? 
Do you have any general advice about what I should be thinking about before looking to buy a camera for this kind of research???
The things you can control with the camera selection are:


Resolution
Sensor size
Sensitivity
Frame rate


The things you can control with the lens selection are:


Focal length
Minimum depth-of-field (DoF)
Field of view (FoV)
Minimum aperture
Zoom functionality


Each of these interact with each other so it is often difficult to find the right trade off.

The sensor size and resolution are usually related. For example, it is hard to find sensors with resolution above 1024 * 1200 in a 1/3" sensor. 

The resolution and thus sensor size will dictate what lenses can be used with the camera, then combined with the FoV of the lens will dictate how many pixels the face covers in the image. 

First decide how far off-centre the face can move. That will guide you minimum FoV. The work out how far away the face can be, and how many pixels wide it must cover. Using the average width of a face, the FoV angle, and the depth you can work out the minimum resolution you need. 

Using the minimum resolution and DoF, choose a camera and lens combination. Pay close attention to the maximum sensor size the lens can accomodate, and note that the FoV changes with the sensor size.

The DoF is a function of the lens focal length and the aperture. To increase the DoF you have to reduce the aperture. E.g. f/1.8 is wide open, f/22 is almost closed. A smaller aperture will let less light in, and thus the camera exposure and gain will need to be increased. Choosing a camera with high sensitivity will allow you to get better images with less gain increase while keeping the exposure short enough to not be blurry.

Motor driven zoom lenses are available.

Near-IR is possible with many camera manufacturers, as they actually have to put in a filter to block IR, so making a near-IR one is easy - just take the filter out.

But probably my best piece of advice is to contact the camera manufacturer and ask them. They have people that will take your specifications and recommend a camera / lens pair for you. Personally, I have used Point Grey cameras.