mitre_sfr (v1.3) 使用指导

目录

 

User Guide for mitre_sfr Computer Program (mitre_sfr计算机程序用户指南)

Procedure流程: 

1) Construct Opto-Electronic Conversion Function (OECF)构造光电转换函数

2) Define the Region Of Interest (ROI) 定义感兴趣区域

3) Determine the pixels per inch (ppi) scale 确定每英寸像素(ppi)比例:

4) Manual edge tilt angle (optional) 手动边缘倾斜角度(可选)

5) Run mitre_sfr 运行mitre_sfr


User Guide for mitre_sfr Computer Program (mitre_sfr计算机程序用户指南)

译者注:The MITRE Corporation是一个向美国政府提供系统工程、研究开发和信息技术支持的非营利性组织。本SPR算法由C语言开发且开源,代码&文档下载链接 MITRE - Image Quality Evaluation。本文资料来自sfr\SFR_1.4.2\UserGuide.pdf

The mitre_sfr computer program computes the spatial frequency response of an imaging system from the digital image of an edge target, following the technique defined in:
ISO 12233:2000, “Photography – Electronic still-picture cameras – Resolution measurements,” First Edition, 2000-09-01
The mitre_sfr code is restricted to operation on 8 bits per pixel grayscale images input in TIFF, PGM, or raw format.

mitre_sfr计算机程序根据边缘目标的数字图像,按照中定义的技术计算成像系统的空间频率响应:
ISO 12233:2000,“摄影-电子静像照相机-分辨率测量”,第一版,2000-09-01
mitre_sfr码仅限于对以TIFF、PGM或raw格式输入的8位/像素灰度图像进行操作。

Procedure流程: 

1) Construct Opto-Electronic Conversion Function (OECF)构造光电转换函数

If the imaging system has a nonlinear response to input energy, i.e., OECF curve is nonlinear, then obtain or create the corresponding OECF file at discrete points.
如果成像系统对输入能量有非线性响应,即OECF曲线是非线性的,则在离散点处获取或创建相应的OECF文件。
• This file has one floating point pair of data values per line; first value is the input energy, second value is the corresponding output grey level
• 该文件每行有一对浮点数据值;第一个值是输入能量,第二个值是相应的输出灰度
• Data is sorted on grey level, and linear interpolation is used for missing values.
• 数据按灰度排序,缺失值采用线性插值。
• All pixel grey levels in the selected edge Region Of Interest (ROI) must be within the max & min grey level range of the OECF.
• 所选感兴趣边缘区域(ROI)中的所有像素灰度必须在OECF的最大和最小灰度范围内。
• Optional comment lines are allowed at the beginning of the data file; they must begin with the pound sign: #
• 在数据文件的开头允许有可选的注释行;它们必须以英镑符号开头:#
• An OECF curve is not needed if the input/output response is linear
• 如果输入/输出响应为线性,则不需要OECF曲线

2) Define the Region Of Interest (ROI) 定义感兴趣区域

• View the softcopy image of the slanted edge target (using your image display software)
• 查看斜边目标的软拷贝图像(使用图像显示软件)
• Locate an area of slanted edge transition.
• 确定倾斜边缘过渡区域。
• Construct a ROI rectangle within the edge area with the following properties:
• 在边缘区域内构建具有以下属性的ROI矩形:
  o Vertical slanted edge: ROI width is less than height
  o 垂直斜边:ROI宽度小于高度
  o Horizontal slanted edge: ROI width is greater than height
  o 水平斜边:ROI宽度大于高度
  o Only one edge allowed in the ROI, approximately centered
  o 在ROI中只允许一条边,大致居中
     If one side of the edge requires a larger area to reach stability, the ROI should be expanded on the other side as well, so that the edge is approximately centered.
     如果边缘的一侧需要更大的区域才能达到稳定,则ROI也应该在另一侧扩展,以便边缘大致居中。
  o Black/white transition of edge must continue from end to end of the ROI
  o 边缘的黑/白过渡必须从ROI的端到端继续
  o Where the edge transition crosses the ROI border cannot be less than 5 pixels from a corner of the ROI.
  o 边缘过渡穿过ROI边界的位置与ROI一角落的距离不能小于5像素。
  o The edge transition should appear as a straight line within the ROI, and the ROI area should avoid image blemishes, nonuniformity, dust, etc.
  o 边缘过渡应在ROI内呈直线,ROI区域应避免图像污点、不均匀性、灰尘等。
  o Within the ROI, width of each side of slanted vertical edge, or height of each side of slanted horizontal edge, should be 20 to 60 pixels, measured from ROI center to ROI edge
  o 在感兴趣区域内,从感兴趣区域中心到感兴趣区域边缘测量,倾斜垂直边缘每侧的宽度或倾斜水平边缘每侧的高度应为20到60像素
  o ROI height for slanted vertical edge or width for slanted horizontal edge should be 80 to 300 pixels
  o 倾斜垂直边缘的ROI高度或倾斜水平边缘的宽度应为80到300像素
• Identify the location and size of the selected ROI:
• 确定所选ROI的位置和大小:
  o Record the (column, row) of upper left corner of ROI, the ROI width and height, or,
  o 记录ROI左上角的(列、行),ROI的宽度和高度,或者,
  o Record the (column, row) of the approximate center of the ROI (a point near the edge transition) and the ROI width and height
  o 记录ROI的近似中心(靠近边缘过渡的点)的(列、行)以及ROI的宽度和高度
  o These measurements are in pixel units with coordinate reference:
      upper left corner (col,row) of Entire image is (0,0) [not! (1,1)]
    with columns in integer pixel steps increasing to the right, and rows in integer pixel steps increasing towards the bottom.
  o 这些测量值以像素单位表示,并带有坐标参考:
       整个图像的左上角(列,行)是(0,0)[不是(1,1)]
     整数像素步进的列向右增加,整数像素步进的行向下增加。

3) Determine the pixels per inch (ppi) scale 确定每英寸像素(ppi)比例:

•  An accurate assessment of ppi might be obtained from any one of a variety of sources, depending on the type of imaging system and available information. For example, ppi might be computed from system design data, measurement of sensor element size, inspection of sensor ‘spec sheets’, or measurements on the edge image itself. In the latter case it is assumed that there is a fiducial mark on each side of the target edge, with known distance between, then the ppi scale would be given by:
• 根据成像系统类型和可用信息,可从多种来源中的任何一种获得ppi的准确评估。例如,ppi可以根据系统设计数据、传感器元件尺寸测量、传感器“规格表”检查或边缘图像本身的测量来计算。在后一种情况下,假设在目标边缘的每一侧都有一个基准标记,两者之间的距离已知,则ppi标度将由下式给出:

pixels between fiducials in image / fiducial distance on target
图像中基准点之间的像素 / 目标上的基准距离

 

 

4) Manual edge tilt angle (optional) 手动边缘倾斜角度(可选)

If default mitre_sfr processing generates a poor estimate of the edge tilt angle, it is possible to override it with user specified edge information. Record the locations (columns and rows) of two well-separated points along the edge transition. For example, for a vertical edge, the two points where the edge transition crosses the upper and lower ROI boundaries could be used, although the selected points may also lie outside the ROI - see Figure 3. Zooming-in on the displayed image enables accurate location of the edge transition; you can use fractional column or row if the edge transition appears to lie between two pixels. Processing will assume a straight-line edge between these two points. The diagnostic image and/or verbose LSF output can help double check if the edge points define the expected edge transition.
如果默认的mitre_sfr处理生成了对边缘倾斜角度的错误估计,则可以使用用户指定的边缘信息覆盖它。沿边缘过渡记录两个完全分离的点的位置(列和行)。例如,对于垂直边缘,可以使用边缘过渡穿过上下ROI边界的两个点,尽管所选点也可能位于ROI之外-参见图3。放大显示的图像可以准确定位边缘过渡;如果边缘过渡位于两个像素之间,则可以使用分数列或分数行。处理将假定这两点之间有一条直线边。诊断图像和/或详细LSF输出有助于仔细检查边缘点是否定义了预期的边缘过渡。

 

5) Run mitre_sfr 运行mitre_sfr

• Multiple options can be selected from the runtime menu display; separate selected option letters by spaces or no space, but not by commas.
• 可从运行时菜单显示中选择多个选项;按空格或不按空格分隔选定的选项字母,但不能用逗号分隔。
• The output file is named SFROUT.txt
  Data is always appended to this output file.
• 输出文件名为SFROUT.txt
  数据总是追加到此输出文件。
• There are two runtime alternatives:
• 有两种运行时替代方案:
   1) Command line命令行:
        If input/output (OECF) is linear如果输入/输出(OECF)是线性的:
          > ./mitre_sfr image.tif linear ULcol ULrow width height ppi
        If input/output is nonlinear如果输入输出是非线性的:
          > ./mitre_sfr image.tif OECF.txt ULcol ULrow width height ppi
        User will then be asked to select options (see description below).
        然后将要求用户选择选项(请参阅下面的说明)。
   2) Interactive mode (from a terminal window)交互模式(从终端窗口):
          > ./mitre_sfr
        • Menu options菜单选项:
          a Compute edge tilt angle from user entered points 从用户输入的点计算边缘倾斜角度
          b Auto-refine input region 自动优化输入区域
          c ROI defined by center point instead of UL corner 由中心点而不是UL角点定义的ROI
          d Create diagnostic image (_box.tif) 创建诊断图像(_box.tif)
          e Verbose output 详细输出
          f Reverse image polarity 反转图像极性
          h Help & Program Notice 帮助和程序注意
          n Don’t compare output to PIV spec 不要将输出与PIV规范进行比较

The default (no options) output contains the SFR and information about the ROI, OECF, and computed edge angle.
默认(无选项)输出包含SFR以及有关ROI、OECF和计算的边角的信息。

a – Edge angle and location is based upon user entered information rather than using ISO specified centroid approximation. User enters column and row information of two pixels on the edge (fractional values allowed). The two points should be well separated (not necessarily within ROI) and the edge should be linear between them; see Figure 3.
a – 边缘角度和位置基于用户输入的信息,而不是使用ISO指定的质心近似值。用户输入边缘上两个像素的列和行信息(允许分数值)。两个点应该很好地分开(不一定在ROI内),并且它们之间的边缘应该是线性的;见图3。

b - Allows program to determine the ROI; user inputs a preliminary ROI search area centered approximately on an edge pixel. The search will not use pixels outside this area. The code will check to see what size/location ROI gives the best line-fit based on maximizing R2, and then uses this ROI for the SFR computations.
b - 允许程序确定ROI;用户输入一个大致以边缘像素为中心的初步ROI搜索区域。搜索不会使用此区域以外的像素。代码将检查什么大小/位置ROI在最大化R2的基础上提供了最佳的直线拟合,然后使用这个ROI进行SFR计算。

c - ROI defined by center point, width, height, instead of ULcorner, width, height
c - ROI由中心点、宽度、高度定义,而不是右上角点、宽度、高度

d - The diagnostic image shows where the selected ROI lies within the image; it stretches the scale by a factor of 4 in the measurement direction and shows where the best fit line lies in that area, and what pixels contribute to the SFR.
d - 诊断图像显示所选ROI在图像中的位置;它将比例在测量方向上拉伸4倍,并显示最佳拟合线在该区域的位置,以及哪些像素有助于SFR。

e - The verbose output adds the intermediate ESF and LSF profiles.
e - 详细输出添加中间ESF和LSF配置文件。

f - TIFF image header information generally contains the correct image polarity, which will then be correctly read by the TIFF reader in mitre_sfr. In some cases, however, the TIFF header may contain the wrong polarity information. The ESF listing in the verbose output mode can be used to verify that the expected polarity was read correctly: a black-to-white edge should have a smaller value at the beginning of the edge listing and a larger value after it. If the ESF shows the opposite trend, this option will force a polarity reversal.
f - TIFF图像头信息通常包含正确的图像极性,然后由mitre_sfr中的TIFF读取器正确读取。但是,在某些情况下,TIFF头可能包含错误的极性信息。详细输出模式中的ESF清单可用于验证预期极性是否正确读取:从黑到白的边在边清单的开头应该有一个较小的值,后面应该有一个较大的值。如果ESF显示相反的趋势,此选项将强制极性反转。

n - By default the output SFR will be compared to the PIV 500 ppi MTF spec. Use this option to turn off the PIV spec checking.
n - 默认情况下,输出SFR将与PIV 500 ppi MTF规格进行比较。使用此选项可关闭PIV规格检查。

• Data input 数据输入:
image filename - The input 8 bpp grayscale image can be in uncompressed TIFF, PGM, or raw format. If raw format, the number of header bytes, image width and height (in pixels) must be known and typed-in.
图像文件名-输入的8 bpp灰度图像可以是未压缩的TIFF、PGM或raw格式。如果是原始格式,则必须知道并键入标题字节数、图像宽度和高度(以像素为单位)。
OECF – if linear, press RETURN
              if nonlinear, type-in the OECF data filename
OECF – 如果是线性的,请按RETURN
              如果是非线性的,输入OECF数据文件名
pixels per inch – type-in ppi (floating point entry allowed)
每英寸像素 – 输入ppi(允许浮点输入)
ROI size/location – default type-in: ROI ULcorner, width, height
                               option c type-in: ROI center, width, height
ROI大小/位置 – 默认输入:ROI右上角、宽度、高度
                          选项c输入:ROI中心、宽度、高度

 

• Output Parameters 输出参数

The output is both written to the runtime display window and appended to the output file: SFROUT.txt
输出既写入运行时显示窗口,又附加到输出文件:SFROUT.txt

The SFR is reported in terms of modulation versus spatial frequency in cy/mm at the object plane (the input ppi is used to scale the frequency axis to the object plane). This SFR has been corrected for the small error incurred by computing the derivative of the discrete sampled ESF as finite differences.
SFR以调制与目标平面上的空间频率(单位:cy/mm)的关系来报告(输入ppi用于将频率轴缩放到目标平面)。由于将离散采样的ESF的导数作为有限差分进行计算所产生的小误差,对该SFR进行了修正。

Additional information is reported about the straight line that is fitted along the edge transition, i.e., R2 of edge fit, edge tilt angle, number of rows per phase rotation, and number of phase rotations of the edge used in the SFR computation. If R2 is not close to 1.0 then the diagnostic image should be examined to see if the edge has any noticeable curvature within the ROI (if it does, then define a new ROI within a straight portion of the edge). The computed edge tilt angle with respect to the vertical (for near vertical edge) or horizontal (for near horizontal edge) needs to be reasonably correct for an accurate assessment of SFR. If possible, crosscheck the computed tilt angle with its true value, if known from other sources. An inaccurate assessment of tilt angle in SFR could be due to high noise, edge curvature, edge non-uniformities, or artifacts/blemishes on the edge; the diagnostic image is useful to see if the edge fit is systematically good.
报告了关于沿边缘过渡拟合的直线的附加信息,即边缘拟合的R2、边缘倾斜角、每个相位旋转的行数以及SFR计算中使用的边缘的相位旋转数。如果R2不接近1.0,则应检查诊断图像,以查看边缘在ROI内是否有任何明显的曲率(如果有,则在边缘的笔直部分内定义一个新的ROI)。相对于垂直(近垂直边缘)或水平(近水平边缘)计算的边缘倾斜角需要合理正确,以便准确评估SFR。如果可能,交叉检查计算出的倾斜角及其真实值(如果从其他来源知道)。SFR中倾斜角度的不准确评估可能是由于高噪声、边缘曲率、边缘不均匀性或边缘上的伪影/瑕疵造成的;诊断图像有助于查看边缘拟合是否良好。

For a near vertical edge, including many edge rows in the assessment will give a more consistent SFR curve, as long as the edge fit continues to be reliable at both ends of the ROI. Rows where the edge fit moves away from the true edge location will contaminate the SFR with bad data, and give the impression that the edge is blurry. If the edge is linear, then additional rows of data tend to improve the edge fit, and hence the SFR. If the edge is not quite linear, then smaller measurement areas may be needed (with concurrent increase in ‘noise’ and less reliable line fit measurements). For the sake of consistency, at least 5 phase rotations are needed for accurate SFR computation. A warning is printed in the problem report area if the ROI isn’t large enough to rely on the SFR results. When this occurs increase the maximum dimension to allow at least 5 row cycles. (Number of rows expected per cycle is listed in the output.) The number of rows included in the SFR is listed, and the number of pixels on each side of the line fitted to the edge transition is listed.
对于接近垂直的边缘,包括评估中的许多边缘行,只要边缘拟合在ROI的两端继续可靠,将提供更一致的SFR曲线。边缘拟合偏离真实边缘位置的行将用错误数据污染SFR,并给人留下边缘模糊的印象。如果边是线性的,那么额外的数据行往往会改善边拟合,从而改善SFR。如果边缘不是很线性,那么可能需要更小的测量区域(同时增加“噪声”和不太可靠的线拟合测量)。为了保持一致性,精确的SFR计算至少需要5次相位旋转。如果ROI不足以依赖SFR结果,则在问题报告区域中会打印警告。出现这种情况时,增加最大尺寸,以允许至少5行循环(输出中列出了每个周期预期的行数。)列出了SFR中包含的行数,并列出了适合边缘过渡的线的每一侧的像素数。

Verbose ESF and LSF: The 4X over-sampled ESF and LSF curves are printed only in the vicinity of the edge. The x-values are in pixel units relative to the center of the best edge fit. With the type of discrete derivative used in mitre_sfr, i.e., [-1,1], the ESF is binned offset from the LSF (i.e., ESF x-values are actually 0.125 greater than reported). The LSF peak or centroid should be located near zero.
详细ESF和LSF:4X过采样ESF和LSF曲线仅打印在边缘附近。x值以像素为单位,相对于最佳边拟合的中心。对于mitre_sfr中使用的离散导数类型,即[-1,1],ESF与LSF的组合偏移量(即ESF x值实际上比报告值大0.125)。LSF峰值或质心应位于零附近。

Diagnostic Image: The diagnostic image shows the original image with the ROI box and any user defined edge endpoints inscribed, plus a blowup of the ROI area. The ROI blowup is stretched by a factor of 4 in the across-the-edge direction, but has no zoom in the along-the-edge direction. Inscribed into the ROI blowup is the edge location used for the SFR computation (solid line) as well as dotted lines marking the edge of the pixels that actually contribute to the final SFR value. If the inscribed edge line has an angle different from the actual edge, then the computed SFR is suspect. If the angle of the edge line is good, but the location is slightly offset from the actual edge, then only slight variations in SFR are expected if the edge shifts. A serious offset of edge line from the true edge center should be investigated. Menu option ‘a’ can be used to force the edge line to lie in specific locations.
诊断图像:诊断图像显示原始图像,其中包含ROI框和任何用户定义的边缘端点,以及ROI区域的放大图。ROI放大在沿边缘方向上被拉伸了4倍,但在沿边缘方向上没有缩放。在ROI放大图中刻有用于SFR计算的边缘位置(实线)以及标记实际有助于最终SFR值的像素边缘的虚线。如果内切边缘线与实际边缘的角度不同,则计算的SFR是可疑的。如果边缘线的角度良好,但位置与实际边缘略有偏移,则如果边缘发生偏移,则SFR仅会有轻微变化。应调查边缘线与真实边缘中心的严重偏移。菜单选项“a”可用于强制边缘线位于特定位置。

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值