This is something that bugs me: Tuning sharpening as to make MTF50 happy. The slanted edge is a test based on the ISO 12233 spec. Because the imagers I work with use 5x5 kernels for bayer interpolation and (further down the line) denoise + sharpening, the slanted edge ends up being spread on 5~6 pixels.
If I divide one cycle per 6 pixels, 1 obtain 0.16 cy/pix.
However, because sharpening is here, I can use that knob to increase the edge frequencies by adding over-sharpening. There is a trade-off: Once pixel values start clipping to black or white, the frequencies will not increase and will actually start dropping.
Here is a graph I made while working with some imagers. I had 8 sharpening levels to play with.
The "optimum" trade-off seems to be at "2"!
Here are crops of some of the edges after re-scaling them for better viewing.
Thursday, June 16, 2011
Sunday, June 12, 2011
Measuring sharpness: MTF
There are so many things I want to discuss about MTF... But I guess we have to start slowly.
Sharpness is the ability of an imaging system to reproduce the contrast changes in the scene. If those contrast changes happen smoothly, then the system doesn't need to be sharp. For instance: Taking a picture of a gray wall! Unless one is interested in the textures on the wall, an imager with a very soft lens could do a good job capturing the scene.
Here is a photo I took that has mostly soft edges:
On the other hand, very high variations in the image (= "high frequency patterns") require the imager to either out-resolve or low-pass the scene:

(landscapes, trees: all these are good tests for sharpness!)
Typically, slow contrast changes are easy to reproduce while quick variations are more difficult. Also, low-contrast changes (say: gray to slightly darker gray) are easier to reproduce than high contrast changes (e.g.: black to white).
In short: high frequency + high contrast = problem! Low-frequency + low contrast = easy!
To analyze sharpness, we can take pictures of sharpness patterns and analyze them. A very intuitive pattern is a succession of black and white lines, also called "line pairs". By making line pairs alternate more and more finely and taking a picture of the pattern one can assess the resolving limits of an imager. This is what DPReview does when analyzing a new camera for instance.
Line-pairs are a great way to measure sharpness "manually", i.e. with someone taking a look at a chart and deciding where the system limit is. However, it is difficult to automate such measurement. This spec from CIPA is (from what I've heard) used by Japanese camera makers but (still from what I've heard) fails to produce repeatable results or a consistent threshold to the system resolution. Let me know if you've heard otherwise: I'm very interested!
MTF is in theory a way to measure the maximum contrast an imager could reproduce for a given frequency. There is a good explanation of MTF on the Imatest website. Example: If I have a pattern that changes very slowly, then the imager should be able to reproduce this change very faithfully. If the pattern changes extremely quickly then it is more difficult for the imager to record this change. "Faithfully", in MTF language, translates to "100%", and the higher the frequency of the chart, the more difficult it is to reproduce, so the more this number will drop.
We are mostly interested in some key MTF levels: MTF50, since 50% of the original contrast is still somewhat acceptable, and the results beyond 50% are not stable and not telling. MTF30: 30% contrast is very low and most likely unacceptable, so MTF30 can also be used to somewhat define the threshold of acceptability.
(landscapes, trees: all these are good tests for sharpness!)
Typically, slow contrast changes are easy to reproduce while quick variations are more difficult. Also, low-contrast changes (say: gray to slightly darker gray) are easier to reproduce than high contrast changes (e.g.: black to white).
In short: high frequency + high contrast = problem! Low-frequency + low contrast = easy!
To analyze sharpness, we can take pictures of sharpness patterns and analyze them. A very intuitive pattern is a succession of black and white lines, also called "line pairs". By making line pairs alternate more and more finely and taking a picture of the pattern one can assess the resolving limits of an imager. This is what DPReview does when analyzing a new camera for instance.
Line-pairs are a great way to measure sharpness "manually", i.e. with someone taking a look at a chart and deciding where the system limit is. However, it is difficult to automate such measurement. This spec from CIPA is (from what I've heard) used by Japanese camera makers but (still from what I've heard) fails to produce repeatable results or a consistent threshold to the system resolution. Let me know if you've heard otherwise: I'm very interested!
MTF is in theory a way to measure the maximum contrast an imager could reproduce for a given frequency. There is a good explanation of MTF on the Imatest website. Example: If I have a pattern that changes very slowly, then the imager should be able to reproduce this change very faithfully. If the pattern changes extremely quickly then it is more difficult for the imager to record this change. "Faithfully", in MTF language, translates to "100%", and the higher the frequency of the chart, the more difficult it is to reproduce, so the more this number will drop.
We are mostly interested in some key MTF levels: MTF50, since 50% of the original contrast is still somewhat acceptable, and the results beyond 50% are not stable and not telling. MTF30: 30% contrast is very low and most likely unacceptable, so MTF30 can also be used to somewhat define the threshold of acceptability.
Next post: All the shortcomings of MTF!!
Let's get started!
Hi! This is a technical blog about image quality, image processing, image pipe... My background is in image segmentation / image processing but I've been doing a lot of ISP algorithms, ISP tuning for the past 5 years. I've been dealing with a lot of different hardware and software imagers for video cameras and I've written algorithms for "3A"s: Auto white balance, Auto exposure, Auto focus for several platforms.
I also own a DSLR and I love photography: My favorite types of photography are sports, macro and landscapes.
I wish to use this blog as a technical blog to share my thoughts and, hopefully, will be able to exchange ideas with peers from the imaging business!
I also own a DSLR and I love photography: My favorite types of photography are sports, macro and landscapes.
I wish to use this blog as a technical blog to share my thoughts and, hopefully, will be able to exchange ideas with peers from the imaging business!
Subscribe to:
Posts (Atom)



