The camera does not filter the light per se.
The actual truth is the all the light rays that go through the lens contains information about SOME images - the thing you need to understand is that only rays emitting from a certain object will come into focus on the sensor.
Generally speaking, a lens will always produce an image of any given object (as long as the object is in the field of view of the lens), but the location of the image is directly dependent on the distance between the object and the lens (and also the effective focal length of the lens).
Since the sensor is always a fixed distance from the lens (ignoring for a moment focusing mechanisms), then only objects with the right distance from the lens can come into focus on the sensor, BUT objects that are a different distance from the lens also come into focus - just on other planes that do not coincide with the sensor.
So the fraction of light 'with information' (aka, focusing on the sensor) is the fraction of the total incoming light that has originated from the right'right' distance such that it would come into focus. This region is called the focal plane of the camera (in the object space), and its depth ifis called the 'depth of field' (you may have heard of it:).