色差 又称色差 |Imatest

当前文档

所有文档版本

引言 |测量 | |去色
——非切边的CA修正

介绍

色差(CA)是多种降低镜头性能的像差之一。(其他包括昏迷、散光、球面像差和场曲率。)这是因为玻璃的折射率随光波长变化,即玻璃折弯不同颜色的程度不同。这种现象称为色散。它表现为色彩边缘,最明显地出现在图像边界附近的切线边缘。它有时会与另一种现象混淆,我们称之为像素偏移——一种颜色通道偏移,通常在传感器上均匀分布,可能由多芯片传感器的物理错位或解码错误引起。

最小化色差是镜头设计的传统目标之一。它是通过结合具有不同色散特性的玻璃元件实现的。但这个问题在多种镜头类型中依然存在,最显著的是超广角镜头、长焦镜头和极限变焦镜头。在许多为数码相机设计时,CA不再是主要考虑因素,因为只要校正除色前施加(只要不过于极端),可以在数字领域进行校正。


侧向和纵向CA;切线和径向线

测量技巧——侧向色差最好通过图像两侧或角落附近的(近)切线边缘测量,例如上图边缘B。在径向边如A上不可见。

Imatest不完全切线的边施加修正

像素偏移(CA)最好在图像中心附近的近垂直和水平边缘测量,CA最小。

如果兴趣区域中心(ROI)距离不到中心到角点距离的30%,CA无法可靠测量。此时,图表将以浅色显示,CA百分比将被省略。


CA测量的投资回报率(ROI)

 

上图展示了两种色差类型。

  • 纵向色差导致不同波长聚焦在不同的图像平面上。Imatest 无法仅凭单幅图像测量;它会导致MTF反应的降解——因为不同颜色的剂量不同。可以通过从多个距离获取SFRpluseSFR ISO棋盘格图像,批量分析,然后在FocusField后期处理器中运行所得的JSON文件来测量。
  • 侧向色差是指由于图像的放大率随波长不同而产生的色斑。它通常比纵向CA更显眼。我测量的是横向CA。

侧向色差最好在图像两侧或角落附近的切线(或近切线)边缘测量。 在径向边缘上看不到。切线曲线和径向线(相差90度)在上方测试图表插图中以红色和蓝色显示。由于典型的Imatest SFR边缘在垂直和水平方向的角度范围为3到7度,测量CA的最佳边缘是图像左右两侧的近垂直边缘。已过时的ISO 12233:2000图表(右图)有非常有限的合适边。一个是上方的矩形BSFRplus图表有多种尺寸和介质,更适合测量CA。

右边的缩略图来自一台1200万像素的紧凑型数码相机,色差相当高。所选区域如下所示。红边,是侧面CA的结果,清晰可见。该矩形右侧的黑白边缘同样有鲜艳的绿色边缘。Imatest分析边缘,生成一个表示侧向色差严重程度的数字。

Imatest 色差测量

通过Imatest SFR计算的R、G和B色通道的平均过渡,如下图所示。这些边已被归一化为渐近极限为0和1,即它们无量纲,在距离跃迁中心较远时趋近于0和1。注意,这三边并不是简单地偏移,这就像你可能预期的那样,如果三种颜色的焦距略有不同。由于解码处理(RAW转换),它们会被扭曲,如下文所述。当分析拜耳RAW图像(未解码)时,你会看到简单的变化。

色差的可见度与振幅最大(此处为红色)和最低振幅边(此处为蓝色)之间的面积成正比。该面积可用以下积分表示。

(displaystyle CA (text{area}) = int left[ Edge_{max}(x) – Edge_{min}(x) right] dx)

由于 x 具有以像素为单位的距离维数,而 Edge 是无量纲的,CA(面积) 具有像素单位——即使它是一个面积,也具有距离的单位。该方程定义的CA称为面积色差。右侧图中以品红色显示。CA(面积)= 1.88像素)。

交叉点之间的距离(过渡点的中心)也被显示出来。它与光学色差(镜头的实际色差,除非在原始转换时被校正过),但视觉意义较低。

色差数值(CA相对较高)(
转显示:显示水平从左向右递增

虽然像素面积是感知CA的良好衡量指标,但存在一些不足。

  • 它会惩罚像素数较多的相机。
  • 结果很大程度上取决于测量位置。大多数镜头的色差大致与距离图像中心成正比。

为了解决这些问题,色差也以图像中心到兴趣区域(ROI)距离的百分比表示,并校正了ROI相对于中心的角度。在上述例子中,CA(面积)= 图像中心到ROI距离的0.110%。修正内容详见下方绿色框。这种测量结果是最好的,因为它相对独立于测量位置和像素数。下表为CA严重程度提供了大致指南。图右侧显示的测量数据汇总于下表。

像素数为10-90%的上升距离(原始;未校正)和每张图片高度(PH)的上升。
CA(面积):像素中的色差面积。这是CA可见度的指标。即最高和最低水位之间的区域。以像素为单位,因为横轴以像素为单位,纵轴归一化为1。在色相关页面中有详细说明。测量方向为左上角剖所示轴线。 含义(现已过时):低于0.5;无关紧要。0.5-1:轻微;1-1.5:中等;1.5及以上:严重。
CA (area) as a percentage of the distance from the image center to the ROI. A better indicator than pixels (above) because it tends to be relatively consistent (at least in raw images).
Equal to 100% * (area between the channels with the highest and lowest levels) / (distance from center to the ROI in pixels), corrected for the angle of the ROI. This number is relatively independent of the ROI location because CA tends to be proportional to the distance from the image center. Explained in the page on Chromatic aberration. Measured along the radial line from the image center to the edge. Meaning: Under 0.04; insignificant. 0.04-0.08: minor; 0.08-0.15: moderate; over 0.15: serious.

A general equation for converting CA (in pixels) to CA (as percentage of distance from the image center to the ROI):

CA (%) = 100% * CA(pixels) ⁄ (distance in pixels from the image center to the ROI)

CA (crossing). Chromatic aberration based on the most widely separated edge centers (positions where the edges cross 0.5). Tends to be less indicative of CA visibility than CA (area) but more indicative of the actual lens chromatic aberration. Measured two ways: (A) in pixels along the axis indicated by Profile in the upper left, and (B) in percentage of the distance from the image center to center of the ROI along the line from the image center.
R-G, B-G Red−Green and Blue −Green crossing shift expressed as percentage of the distance from the image center to ROI, measured along the radial line from the image center. R-G is r(Rcross)-r(Gcross), where r is radius (from the image center).
R-G, B-G Red−Green and Blue −Green crossing shift expressed in pixels, measured along the axis indicated by Profile in the upper left. R-G is x(R)-x(G) for horizontal profiles or y(R)-y(G) for vertical profiles, where x and y are distances along the horizontal and vertical axes, respectively. The sign may be different from the sign in the percentage measurement, depending on the measurement quadrant.
x-pixel shift R-G, B-G Pixel shift in the x-direction (for near-vertical edges); y-pixel shift is shown for near-horizontal edges. This is most useful for measuring pixel shift from causes other than optical chromatic aberration, and is best measured near the center of the lens.
Average pixel levels in the dark and light areas. Clipping can occur if they are too close to 0 or 255.

Because Chromatic Aberration cannot be measured accurately near the image center, the chart is rendered in pale colors with the Region of Interest (ROI) is less than 30% of the distance from the center to the corner.

Severity of chromatic aberration
Chromatic Aberration in
percentage of distance
from the image center
Severity
0-0.04 Insignificant
0.04-0.08 Low. Hard to see unless you look for it.
0.08-0.15 Moderate. Somewhat visible at high print magnifications.
over 0.15 Strong. Highly visible at high print magnifications.
 

Purple fringing  is not chromatic aberration, though it’s sometimes mistaken for it.

It’s a saturation phenomenon in the sensor, also known as “blooming,” caused by overflow of electrons from highly saturated pixel sites to nearby unsaturated sites. It tends to be worst in cameras with tiny pixels (< 2μm). It has everything to do with the sensor and little to do with the lens.

The reason it’s purple is that most sensors are most sensitive to green, so that uncorrected (raw) output has a strong greenish cast (the compliment of purple). Color-correction makes the image neutral by boosting the red and blue = purple components. Hence the overflow from saturated pixels takes on a purple cast. This effect is shown in the two crops below of the area indicated by the red rectangle of the image on the right. The image on the left is a crop of the JPEG, straight out of the camera. The image on the right is a crop of the image converted from raw without color correction. The sky is still saturated, but purple fringing is not visible.

 


Crop of JPEG image


Crop of image converted from raw
without color correction

Imatest modules

The following Imatest modules can be used for chromatic aberration measurement. All but Dot Pattern measure Lateral Chromatic Aberration from tangential or nearly tangential slanted-edges, and also measure MTF. Some also measure optical distortion. Auto-detection slanted-edge modules are compared in www./docs/#sharpness.

Module Comments
SFRplus Measures a great many image quality factors. The slant angles on the sides of SFPlus test charts were designed to maximize the tangential component of the vertical edges. (Contrary to rumors, we were not drunk when we designed the chart.)
eSFR ISO Measures a great many image quality factors, including noise. Limited distortion measurements.
Checkerboard Can operate over a wide range of distances and/or Fields of View. Very accurate distortion measurements.
Dot Pattern Also measures Optical Distortion (but not MTF). Corresponds to several standards.
SFR Any slanted-edge, selected manually.
SFRreg Works with ultra-wide Fields of View. Does not measure distortion.

Demosaicing

Demosaicing is the process of converting Bayer RAW images, which have one color per pixel (RGRGRG…; GBGBGB…), to standard images, which have three colors per pixel. In the process of demosaicing, missing detail for each channel is inferred from detail in other channels. This is especially significant for Red and Blue pixels, which are half as common as Green. Demosaicing algorithms can be very mathematically sophisticated, but all of them can perform poorly in the presence of lateral CA, where detail is shifted from its expected location.

Demosaicing explains the shifted edges shown in the examples on this page. Lateral CA cannot be reliably corrected after demosaicing, but it can be corrected to near-perfection prior to demosaicing, and this is frequently done on modern cameras and camera phones. Correction coefficients can be calculated with Imatest Master, which can analyze Bayer RAW files created by converting manufacturer’s Camera RAW files. Details are in the page on RAW files.

Here is an example illustrating the same region for a RAW and demosaiced file. Canon EOS-40D, 17-85mm IS lens, 50mm, f/8.

Chromatic aberration before demosaicing: easy to correct
using a different magnification
for each color
((1-0.00024)x for red; 1.00062x for blue; 1 for green).
Chromatic aberration after demosaicing: difficult to correct.
Many recent cameras (since ~2011) have CA correction built-in.

R-G and B-G are the CA correction coefficients. They are the spacing between the Red and Green and Blue and Green crossings, respectively, expressed as percentage of the center-to-ROI distance. This measurement is relatively independent of the location of the measurement.

Chromatic Aberration correction for non-tangential edges

In Imatest, edge profiles are measured along horizontal or vertical lines. The blue line (x) on the right is an example. But chromatic aberration takes place along radial lines– lines from the center of the image to the region of measurement (shown in red on the right). Unless this line is vertical or horizontal, there will be a measurement error that must be corrected. The correction is illustrated on the right for a near-vertical edge, where the profile, and hence CA, is measured horizontally. In this illustration,

  • x=x1+x2 is the measured chromatic aberration, along a horizontal row of pixels.
  • C= the true chromatic aberration, along the radial line (angle = θ).
  • ϕ is the angle of the edge relative to vertical.

x1=Ccosθ;y=Csinθ 

x2=ytanϕ      (x2 may be negative if ϕ is negative.) 

x=x1+x2=Ccosθ+ytanϕ=C(cosθ+sinθtanϕ) 

C=true chromatic aberration=xcosθ+sinθtanϕ