The above video by Daniel Shiffman is great to get an understanding of how you might payback video from a camera. It also includes basic real time frame editing. This is also the beginning of a series of videos that explain various machine vision techniques and blob detection.
Here is a link to the processing website that shows sample code for video capture using the video library. This is the same library Daniel is using.
One thing to take note of is the line:
println("Available cameras:");
for (int i = 0; i < cameras.length; i++) {
println(cameras[i]);
}
Daniel also shows this around 18:22 in a slightly different way. This code prints a list of the available resolutions and frame rates of your camera, which will be different for each computer or webcam.