How does a lens work to form an image on the camera's sensor...

Started 6 months ago | Discussions
GBJ
GBJ
Regular MemberPosts: 161
Like?
How does a lens work to form an image on the camera's sensor...
6 months ago

Hi DP Review photographers...

My camera is the D700.

I am looking for a book that explains the way a lens operates, primes and zooms, to focus and to reflect or refract an image onto the sensor of the camera.

I have been a photographer for many years now, well, not too many...about 4. I understand many of the details of how cameras work, as far as shutter speed, iso, aperture, and also how the mirror works to reflect the image into the viewfinder before it shuts to allow light to strike the sensor, and form an image. What I do not understand is how a lens operates. There are many specialized lenses with specific purposes, and they are built with elements of glass inside, or plastic.

I am looking for a book that explains the way a lens operates, primes and zooms, to focus and to reflect or refract an image onto the sensor of the camera. I've read a bit about how

light and color wavelengths come together at a point of convergence, and this seems like it is the point where the focus is achieved, and this distance from the camera's sensor is what is known as the focal length. Hopefully this is correct so far, but I am having a tough time trying to compare various bits of information from the internet. Is there one cohesive book that you know of that you would be willing to recommend with me, and others?

I am a bit confused because some website sources try to tell me that how a lens works is to refract a wide source of light down into a very small pinpoint on the sensor, and that focus is achieved when that light source forms the smallest diameter point it can on one spot on the sensor. I am definitely missing something here! Especially if you refer to the diagram I posted with this. In basic terms I understand the diagram representation.

Anyways, I hope my questions and recommendations for a good book or website will help other people also.

Thankyou for your time!

InTheMist
Senior MemberPosts: 2,534Gear list
Like?
Re: How does a lens work to form an image on the camera's sensor...
In reply to GBJ, 6 months ago

When you're focusing, it's not the entire world focused into a pinpoint - you're right, most examples illustrate that wrong.

Ever use a magnifying glass to burn something?  You don't focus the entire universe into a pinpoint, only the image of the sun.

This may help:

http://electronics.howstuffworks.com/camera1.htm

Sorry, I can't think of a book that explains it really well.

-- hide signature --

It's more important how an image looks as a thumbnail than how it looks at 100%.
http://inthemistphoto.com

 InTheMist's gear list:InTheMist's gear list
Nikon D800 Nikon 1 AW1 Nikon Df Nikon D810 Nikon AF-S Nikkor 14-24mm f/2.8G ED +11 more
Reply   Reply with quote   Complain
57even
Senior MemberPosts: 5,831Gear list
Like?
Re: How does a lens work to form an image on the camera's sensor...
In reply to GBJ, 6 months ago

You need a good primer on basic optics. The diagrams in these examples are next to useless.

The best explanation is to imagine how a lens would focus a single point, then two points, then all the points that make up a specific object.

Cameras capture light reflected off an object which radiates in all directions, including down your lens. If you imagine light streaming in straight lines from a given point, they will diverge. What a lens does is to refocus divergent rays to a single point....

In the diagrams above are three point objects. For simplicity only four of the billions of light rays from each object are shown.

In A the object is focused on the sensor. The curvature of the lens has the effect of bending light towards the centre of the lens (angle of refraction). However the angle through which it bends depends on the glass type (refractive index) and the curvature of the lens. If the distance from lens to sensor changes, the image will blur because the rays of light are not fully converged at the right point. (In this case I moved the sensor, in a camera you move the lens).

In B the closer object has rays which hit the lens at a steeper angle so they will not converge as quickly and will focus behind the sensor - the image will therefore be a blur covering all the points where light rays from that object hit. The further object will focus in front of the sensor, but the effect will be the same.

In C when you close down the aperture, you cut off the rays from the edges, so the blur radius also gets smaller and the objects appear sharper. Stop down more and they look sharper still (until diffraction starts to impact the overall sharpness). Effectively you are just using the centre part of the lens. Using a smaller lens would have the same effect. Of course, you also reduce the amount of light, so you need a longer exposure or higher ISO.

Please note most cameras have multiple elements in the lens, some which move and which don't. This so called compound lens corrects for the fact that (1) light of different wavelengths does not refract the same amount (chromatic aberration) and (2) that ground lenses do not focus exactly in the same point across the surface (spherical aberration). However a well corrected compound lens will combine multiple elements to get very close to a perfect lens. It also explains why aspherical elements are used in some complex lenses.

Hope that helps.

 57even's gear list:57even's gear list
Fujifilm X-Pro1 Nikon D800 Fujifilm X-E1
Reply   Reply with quote   Complain
Fogsville
Contributing MemberPosts: 526
Like?
Re: How does a lens work to form an image on the camera's sensor...
In reply to GBJ, 6 months ago
Reply   Reply with quote   Complain
GBJ
GBJ
Regular MemberPosts: 161
Like?
Re: How does a lens work to form an image on the camera's sensor...
In reply to 57even, 6 months ago

Wow, I am very thankful and impressed with the clarity of your explanation! You very quickly have showed me that the lens does not focus an image on the sensor in one point only...which should be obvious, but was not to me.

I can see by your well layed out diagram, that for example, a tree has elements that are closer and further away from the sensor. Each branch of the tree has a varying distance away from the sensor, and must be recorded on the sensor, but only the parts of the tree that are on one parallel plane from the sensor can be in complete focus, and the parts of the tree that are closer, or further away from that parallel plane of focus must be out of focus to the degree to which their distance varies from this plane of focus. Now I can see the development of the idea of depth of field.

From your diagram, I can imagine how each needle of the tree branch reflects it's own light ray towards the lens, and gets focused by the lens onto one pixel, or photon, of the sensor? 12 megapixel camera has 12 million pixels, or photo receptors, I think, and I can imagine each part of the tree having a designated pixel on the sensor to capture the image of the tree as a whole.

I know this can become a larger discussion.

Anyways, if you would be willing to write more on this topic, I would be very very keen to learn more.

Thankyou, 57 even,  for the time you have taken to post these diagrams and explain them!

Reply   Reply with quote   Complain
GBJ
GBJ
Regular MemberPosts: 161
Like?
Re: How does a lens work to form an image on the camera's sensor...
In reply to Fogsville, 6 months ago

Thanks Fogsville for the tip on these books. I'm going to see if I can get my hands on a copy of one at a local library, then hopefully order one to keep.

Reply   Reply with quote   Complain
lanefAU
Senior MemberPosts: 4,082Gear list
Like?
Re: How does a lens work to form an image on the camera's sensor...
In reply to GBJ, 6 months ago

I am looking at the top image, I guess if you are not using a DX lens, the image projection would be the same, but a smaller sensor will record a smaller view compared to a fullframe sensor.

So the crop occurs inside the camera at the sensor not in the field of view the lens is facing.

-- hide signature --

Veni Vidi Capi (I Came, I Saw, I Captured)
Ask not what the camera can do for you, but what you can do with the camera.
http://www.pbase.com/bingard/galleries

 lanefAU's gear list:lanefAU's gear list
G1 X II Nikon D810 Nikon AF-S Nikkor 16-35mm f/4G ED VR Nikon AF-S Nikkor 24-70mm f/2.8G ED Nikon AF-S Nikkor 70-300mm f/4.5-5.6G VR
Reply   Reply with quote   Complain
Leonard Shepherd
Veteran MemberPosts: 8,475Gear list
Like?
Re: 2 suggestions
In reply to GBJ, 6 months ago

The first is a lens puts a negative image (as with film) on the sensor with the top of the subject at the bottom of the image and the right of the subject on the left of the image.

In camera software converts the negative image at the sensor right way up and right way round.

Focal length is tricky.

Modern telephoto lenses have a telephoto construction with the physical length of the lens shorter than the focal length.

This makes them smaller and lighter (which most customers like) with better close up performance, though the trade off is that become less telephoto the closer you focus.

Modern wide angles have to be retro focus designs to allow space for the mirror to lift. Most are longer than their marked focal length. The trade off is they become less wide angle the closer you focus.

What matters most is have you got a good subject in the viewfinder, are you holding the camera steady enough and have you set the aperture to give you appropriate depth of field? These are acquired skills rather than text book reading.

-- hide signature --

Leonard Shepherd
We all aspire to take great photos but may always achieve this perhaps due to a lack of application, a lack of knowledge, or even a lack of talent.
The best photographers probably work quite hard at their photography.

 Leonard Shepherd's gear list:Leonard Shepherd's gear list
Nikon D800 Nikon D7100 Nikon AF-S DX Nikkor 18-200mm f/3.5-5.6G IF-ED VR Nikon AF-S DX Nikkor 12-24mm f/4G ED-IF Nikon AF-S Nikkor 16-35mm f/4G ED VR +19 more
Reply   Reply with quote   Complain
57even
Senior MemberPosts: 5,831Gear list
Like?
Re: How does a lens work to form an image on the camera's sensor...
In reply to GBJ, 6 months ago

GBJ wrote:

Wow, I am very thankful and impressed with the clarity of your explanation! You very quickly have showed me that the lens does not focus an image on the sensor in one point only...which should be obvious, but was not to me.

I can see by your well layed out diagram, that for example, a tree has elements that are closer and further away from the sensor. Each branch of the tree has a varying distance away from the sensor, and must be recorded on the sensor, but only the parts of the tree that are on one parallel plane from the sensor can be in complete focus, and the parts of the tree that are closer, or further away from that parallel plane of focus must be out of focus to the degree to which their distance varies from this plane of focus. Now I can see the development of the idea of depth of field.

Good stuff. Glad it was useful.

From your diagram, I can imagine how each needle of the tree branch reflects it's own light ray towards the lens, and gets focused by the lens onto one pixel, or photon, of the sensor?

Not quite. There is no relationship between a single photon and a pixel.

Light Capture

Imagine photons are rain drops and the photosites/pixels are buckets. You can get more water in the bucket if it rains harder, or if you leave it longer....

There is a constant stream of photons (or a "light wave") coming from each point on the tree. These will strike the light receptive photosite on the sensor which will create an electric charge proportional to the number of photons that hit it (effectively the photon energy will displace an electron from a silicon atom which will then be able to move or create a current). The brighter the light (more intensity) or the longer you expose the pixel, the more photons will hit it and the more electrons will be displaced.

The more raindrops you collect the heavier the bucket.

When the photosite is read out, these electrons create a voltage difference to the baseline which can be detected and stored, one at a time for each photosite. This voltage is therefore proportional to the number of photons captured. The voltage value is stored digitally.

Noise and Signal to Noise Ratio.

Imagine your buckets are not exactly the same size and some were already wet when you started, plus you have some losses when emptying the bucket and some spillage between them because of splashing....

For various reasons (such as heat and the electronics itself) the voltage read out is never zero even if no photons hit it. Similarly, there is statistical variation between photosites caused by manufacturing and the process of reading it out.

This voltage variation between photosites (even with the lens cap on) is called noise. A very low signal is hard to distinguish from noise. This is called the "noise floor" or the point at which the signal cannot be distinguished from other background noise. The noise is actually constant (more or less) but when you amplify the signal (increase ISO) you increase the noise too, which is why cameras get noisier at higher ISO. The signal is smaller (shooting in lower light) so the ratio of the signal intensity to noise intensity is lower (signal to noise ratio).

It is the ratio which dictates how visible the noise is.

Bit Depth

How accurate do the scales need to be to weigh your bucket?

Noise affects how many bits you need to store the voltage values electronically. For instance, a 14bit number can effectively store 2^14 discrete voltage values or about 16,000 intensity values.

However a photosite can record (typically at the larger end) up to 100,000 photons, so why not record 100,000 values? The answer is noise. If the variation (noise) is +/- 50 electrons, then the variation between equal signals is up to 100 electrons, so there is no point in recording more than 1,000 values because you wont be able to distinguish them. If the noise is +/- 5 electrons, then you can distinguish 10,000 values.

This is known as the bit depth of the sensor. Most sensors can just about manage 12bits (4096 values) but the larger the photosite, the bigger the number. A top end MF sensor can manage 14 or even 16 bits. A phone camera will struggle with 8.

Recording more bits than you need is fine (just more storage) but less is obviously a bad idea as you end up with fewer possible tones than you can actually capture.

Well Capacity, Dynamic Range and Exposure Range

How big is your bucket?

Photosites have a limit to their capacity. Any more photons cannot be recorded and that part of the image is "overexposed" or blown out. The limit is set by the physical light capture area of the photosite. The well capacity if defined as the maximum recordable number of electrons per photosite and varies between around 1,000 and 100,000 for phone cameras to MF cameras.

The signal to noise ratio at saturation defines the dynamic range of an individual photosite (number of visible tones or intensity values between noise floor and blow-out which is similar to bit depth above) but exposure range (which most people confuse with DR) is the difference in stops between the brightest and darkest object you can record in one shot.

The two are related, but easily confused. The first is a set property of the sensor, the second is a property of how the signal is processed by the camera (or the RAW processor). Camera makers to all kinds of tricks to make shots "look" nicer by fiddling with the tone curve, but this normally compresses the exposure range to increase contrast. Similarly many fiddle the RAW output by clipping the low end (shadow) bits to reduce apparent noise and smoothing the output. Hence ER seldom reaches the maximum possible DR.

You may think that for maximum exposure range you would want larger photosites. However this is not exactly true, because it is measured for a given print size. If you have more pixels, the difference between pixels is less obvious when you look at the same size print, so the reduced DR at the pixel level is compensated for by having more data to sample (hence reducing the visible variation between pixels hence less noise).

However the larger photosites usually win out at very high ISO when they manage to retain more faithful colour. So whereas base ISO ER may be related to sensor size, high ISO ER will start to take pixel size into account as well.

12 megapixel camera has 12 million pixels, or photo receptors, I think, and I can imagine each part of the tree having a designated pixel on the sensor to capture the image of the tree as a whole.

More or less.

However on a colour sensor each photosite only records one colour (half of them record green and the other half alternate between red and blue). These are combined mathematically to work out what the actual colour of each pixel was (RGB value) by comparing each one with its neighbours. This introduces some statistical uncertainty over the exact extent of that colour value so the solution is to "blur" the edges a bit, which means that the minimum detail level you can record is actually larger than one photosite unless you use a Foveon sensor.

Lenses are not perfect either. None can resolve a point to a point, but will have a "blur radius" even when in perfect focus. If the blur radius is much smaller than the sensor's resolution limit, then the camera is sensor limited. If its much larger it is lens limited.

If the two are comparable, then the overall resolution is actually a combination of the two. There is an approximate formula for working it out which is 1/R = 1/Lr + 1/Sr where R is camera resolution and Lr is lens resolution and Sr is sensor resolution. As you can see from this, if lens and sensor resolution are equal (=x) then the overall resolution is half the resolution of either.

1/R = 1/x + 1/x = 2/x hence R=x/2

This makes more sense if you look at the blur radii instead. Effectively it means you have to add the two blur radii together to get the total amount of blur. B = Lb + Sb.

This is not totally accurate because the blur radius is not uniform, but you get the general idea. However it does mean that as you cram more photosites onto a sensor you reach a point where for most lenses the increase in overall resolution is much less than the increase in sensor resolution. Compare DxO values for the D600 and D800 for some Nikon lenses and the differences are surprisingly small in many cases.

Hope all that is useful.

 57even's gear list:57even's gear list
Fujifilm X-Pro1 Nikon D800 Fujifilm X-E1
Reply   Reply with quote   Complain
57even
Senior MemberPosts: 5,831Gear list
Like?
Re: How does a lens work to form an image on the camera's sensor...
In reply to GBJ, 6 months ago

GBJ wrote:

Wow, I am very thankful and impressed with the clarity of your explanation! You very quickly have showed me that the lens does not focus an image on the sensor in one point only...which should be obvious, but was not to me.

I can see by your well layed out diagram, that for example, a tree has elements that are closer and further away from the sensor. Each branch of the tree has a varying distance away from the sensor, and must be recorded on the sensor, but only the parts of the tree that are on one parallel plane from the sensor can be in complete focus, and the parts of the tree that are closer, or further away from that parallel plane of focus must be out of focus to the degree to which their distance varies from this plane of focus. Now I can see the development of the idea of depth of field.

From your diagram, I can imagine how each needle of the tree branch reflects it's own light ray towards the lens, and gets focused by the lens onto one pixel, or photon, of the sensor? 12 megapixel camera has 12 million pixels, or photo receptors, I think, and I can imagine each part of the tree having a designated pixel on the sensor to capture the image of the tree as a whole.

I know this can become a larger discussion.

Anyways, if you would be willing to write more on this topic, I would be very very keen to learn more.

Thankyou, 57 even, for the time you have taken to post these diagrams and explain them!

Couple more points on optics....

Lens focal length = distance from lens optical centre to point of focus for parallel light rays (from an object at effective infinity). As you increase focal length, you reduce the range of angles at which light can enter the lens, which reduces the field of view and makes objects appear closer/larger (smaller field projected onto the same size sensor).

Sensor crop factor = ratio of field of view (in degrees) between FF sensor and smaller sensor for a given focal length.

Focal length multiplier = equivalent FF focal length for a given focal length on a smaller sensor.

For instance, with a 200mm lens, an APSC sensor will be able to record only 2/3 of the image (by width or height) of the FF sensor, hence the crop factor is .67.

This means it gives the same field of view as a 300mm lens on an FF body, hence the focal length multiplier is 1.5X. The two are often confused.

Note in neither case has the focal length changed.

F number. F number is a rather complex measurement of aperture which takes focal length into account. Because the field of view is so much smaller on long focal length lenses, the physical aperture has to be bigger to get the same image brightness  - hence long fast lenses are wide too, whereas a fast 50mm lens can be quite small.

F stop is the ratio between focal length and aperture diameter. F 2.8 means the focal length is 2.8X larger than the aperture diameter.

However actual light gathering depends on the area, hence 1 stop in aperture terms is not linear with F number. F2.0 is 1 stop slower than F1.4 because it is half the area. Confusing I know...

T number. F numbers are useful for DOF calculations, but all that glass actually cuts down the amount of light transmitted by the lens. T stops/numbers compensate for this. Hence a T1.4 lens may actually have a slightly larger physical aperture than an F1.4 lens. Movie makers rely on this to calculate accurate exposure.

Why are wide angle lenses so huge?

If wide angle lenses have a very short focal length, why are they so huge? The answer is because you cannot place the lens directly up against the sensor. All cameras have a limit for this.

This means you have to add concave elements to the front part of the lens to diverge the rays which are then focused internally by another group of lenses which (on their own) actually have a longer FL. This concave lens is normally quite bulbous to accommodate the wide field of view, and the further from the sensor the lens has to be, the larger the front element has to get (because the real FL of the internal group has to get longer). DSLRs have to clear the internal mirror, so wide angle lenses are a particular issue.

The combined lens has a focal length much shorter than it appears, but the optical centre of the lens is actually behind the rear element (DSLR registration distance is about 40mm, but lenses may have an effective FL of 12mm or even smaller....).

The problem is much less complex for mirrorless cameras as the lens can be much closer to the sensor.

OK have to check out now. If you have direct questions email me privately.

 57even's gear list:57even's gear list
Fujifilm X-Pro1 Nikon D800 Fujifilm X-E1
Reply   Reply with quote   Complain
kratlusk
New MemberPosts: 14
Like?
Re: How does a lens work to form an image on the camera's sensor...
In reply to GBJ, 6 months ago

Have a look on the pages linked @ http://www.pierretoscani.com/annexeGB.html

Cheers,

-- hide signature --

/Lars Holst Hansen
http://kratlusk.blogspot.dk

Reply   Reply with quote   Complain
GBJ
GBJ
Regular MemberPosts: 161
Like?
Re: How does a lens work to form an image on the camera's sensor...
In reply to 57even, 6 months ago

I hope the information I added to the diagram above is correct...if it is not, please correct any misperceptions. I believe the focus point representation is off.

I know the sensor never moves forward or back, and it is the lens elements and the Focal length distance from the sensor that moves,  so in my diagram I do not intend to make it seem as if the sensor would move forward to the 16mm distance, rather in reality the lens elements move backwards towards the sensor to create the 16mm focal distance.

Great information you have posted here, thanks again 57 Even! This is very generous of you to take time to share this knowledge with others.
Thanks also to everyone else.

One of the images from a suggested website helped my perception of points of focus. I'll attach it.

If there's any more information, I'd like to continue reading any posts from members!

Reply   Reply with quote   Complain
MPA1
Senior MemberPosts: 2,720Gear list
Like?
Re: How does a lens work to form an image on the camera's sensor...
In reply to GBJ, 6 months ago

Wrong. All wrong! It's magic and spirits. And electrickery.

Reply   Reply with quote   Complain
GBJ
GBJ
Regular MemberPosts: 161
Like?
Re: How does a lens work to form an image on the camera's sensor...
In reply to MPA1, 6 months ago

That's amusing! Well, maybe.

Reply   Reply with quote   Complain
Leonard Shepherd
Veteran MemberPosts: 8,475Gear list
Like?
Re: What is used for focus is
In reply to GBJ, 6 months ago

What is used for focus is a + shaped segment of the image (for cross type sensor) or a I segment if using a single direction sensor.

The segments are a little longer than the viewfinder AF boundary.

The sample goes through something similar to a beam splitter and is projected as 2 separate images on an AF detection line.

The camera AF then compares the 2 images and (if they are good for comparison) instructs the lens which way to turn and how far to get accurate focus.

The AF sensors detect only contrast (black and white). Different colours with similar black and white tones may not be accurately compared.

On a detail the camera sensor detects only in Black and White, though there is either a Red or a Green or a Blue filter above each pixel. The camera very cleverly compares detail from about 40 surrounding pixels before assigning a colour and density to each pixel site.

-- hide signature --

Leonard Shepherd
We all aspire to take great photos but may always achieve this perhaps due to a lack of application, a lack of knowledge, or even a lack of talent.
The best photographers probably work quite hard at their photography.

 Leonard Shepherd's gear list:Leonard Shepherd's gear list
Nikon D800 Nikon D7100 Nikon AF-S DX Nikkor 18-200mm f/3.5-5.6G IF-ED VR Nikon AF-S DX Nikkor 12-24mm f/4G ED-IF Nikon AF-S Nikkor 16-35mm f/4G ED VR +19 more
Reply   Reply with quote   Complain
57even
Senior MemberPosts: 5,831Gear list
Like?
Re: How does a lens work to form an image on the camera's sensor...
In reply to GBJ, 6 months ago

GBJ wrote:

I hope the information I added to the diagram above is correct...if it is not, please correct any misperceptions. I believe the focus point representation is off.

I know the sensor never moves forward or back, and it is the lens elements and the Focal length distance from the sensor that moves, so in my diagram I do not intend to make it seem as if the sensor would move forward to the 16mm distance, rather in reality the lens elements move backwards towards the sensor to create the 16mm focal distance.

Great information you have posted here, thanks again 57 Even! This is very generous of you to take time to share this knowledge with others.
Thanks also to everyone else.

One of the images from a suggested website helped my perception of points of focus. I'll attach it.

If there's any more information, I'd like to continue reading any posts from members!

The first diagram is a bit confusing because it is not showing light rays focusing on the sensor, it is merely showing view angle. The lines shown are only those passing through the lens' optical centre which are not refracted (as the lens is symmetrical). The second diagram shows more light rays passing through other parts of the lens onto the focal plane.

The focus point of a lens is where it focuses (ie the sensor, not the optical centre). The optical centre is the point in the lens which is exactly 1 focal length away from the focus point. Only in a symmetrical convex lens will this point be in the centre of a lens. The optical centre of a compound zoom lens (like in the second diagram) is quite hard to define just by looking at it. You have to know the relative focal lengths of each element and the distances between them at a given point. Because the focus group can move this sometimes affects the true focal length of a lens when focusing at less than infinity (typical example is Nikon 70-200). Focal length of a varifocal camera lens is ONLY defined at infinity for this reason.

You are correct that to get the equivalent view angle on APSC to match a 24mm lens on FF would require a 16mm lens. (24x0.67).

 57even's gear list:57even's gear list
Fujifilm X-Pro1 Nikon D800 Fujifilm X-E1
Reply   Reply with quote   Complain
Keyboard shortcuts:
FForum MMy threads