目录

Author's Notes 作者笔记

Introduction 介绍

Algorithm Description 算法描述

First Edge Position Estimation 第一边缘位置估计

The MTF Class MTF类

Definitive Edge Location 确定边缘位置

ESF and PSF Estimation (ESF和PSF估计)

MTF Estimation MTF估算

The Edge Class (Edge类)

Validation 验证

Installing and Using as a QGIS Plugin 安装并用作QGIS插件


Robust ESF, PSF, FWHM & MTF estimation from low-quality images and synthetic edge creation.

从低质量图像和合成边缘创建鲁棒ESF、PSF、FWHM和MTF估计。

Author's Notes 作者笔记

Estimating the MTF becomes difficult when the image is far from ideal, something that often happens with satellite data. I came up with the idea of using piecewise polynomials and optimization techniques to build a robust MTF estimator that doesn't rely on a given function and, being mostly numerical, is also more empiric.

当图像很不理想(译注:画质不好),估计MTF就变得很困难,卫星数据经常发生这种情况。我想到用分段多项式和优化技术来建立一个稳健的MTF估计器,它不依赖于给定的函数,而且主要是数值的,也更经验性。

Implementing this algorithm using Python and its numeric and scientific packages was a funny exercise. Surprisingly, it works pretty fine. I think it is robust, as expected, but it is also accurate. I validated it against third-party software. So it is maybe somewhat valuable. For this reason I've decided to open-source it using a GPLv3.0 license.

使用Python及其数字和科学包实现此算法是一个有趣的练习。令人惊讶的是,它工作得相当好。我认为它是稳健的,正如预期,但它也是准确的。我用第三方软件验证了它。所以它可能有点价值。因此,我决定使用GPLv3.0许可证来分享源代码。

Introduction 介绍

The Modulation Transfer Function (MTF) of an optical system represents the spatial frequency performance of such system. Its behaviour is directly related to the concepts of sharpness, contrast and spatial resolution. For this reason it is an important quality indicator, hence the need of an estimation method. The MTF can be inferred from the optical system design but, unfortunately, in the real world only its modulus can be empirically determined or measured from the actual system.

光学系统的调制传递函数(MTF)反映了光学系统的空间频率特性。它的行为与锐度、对比度和空间分辨率的概念直接相关。因此,它是一个重要的质量指标,因此需要一个估计方法。MTF可以从光学系统的设计中推断出来,但不幸的是,在现实世界中,只有其模量可以通过经验确定或从实际系统中测量。

One way to perform the estimation is to use actual images produced by the system. For example, the ISO 12233 provides an estimation standard focused on still picture cameras using test charts or standardized targets. There are multiple ways of estimating the MTF using images, all of them based on the same idea: Extracting spatial frequency performance information beyond the discrete values that the image directly provides.

执行估计的一种方法是使用系统生成的实际图像。例如,iso12233提供了使用测试图卡或标准化目标聚焦于静止图像相机的估计标准。利用图像估计MTF有多种方法,它们都基于相同的思想:提取图像直接提供的离散值之外的空间频率性能信息。

The Slanted-Edge methodology is an astute way of doing this. It uses a tilted knife-edge image and assumes that the transition between the two zones is straight and sharp in the object space. Under these assumptions it is then possible to estimate the sub-pixel position of the edge. Due to the knife-edge inclination it is then feasible to map multiple sub-pixel estimates that can be used to build a statistically robust model of the edge in the image space. This edge model can be immediately converted into a Point Spread Function (PSF) from which the MTF can be estimated.

斜边方法是一种精明的方法。它使用倾斜的刀口图像,并假设两个区域之间的过渡在对象空间中是直的和尖锐的。在这些假设下,可以估计边缘的亚像素位置。由于刀口倾斜,因此映射多个子像素估计是可行的,可用于在图像空间中建立边缘的统计稳健模型。这种边缘模型可以立即转换为点扩展函数(PSF),从中可以估计MTF。

Algorithm Description 算法描述

The algorithm implemented here is based on the slanted-edge sub-pixel sampling concept. I will describe it step by step following a real world example: An image acquired by an Earth-observation satellite on the Baotou Comprehensive Calibration and Validation Site.

这里实现的算法是基于倾斜边缘亚像素采样的概念。我将按照一个现实世界的例子一步一步地描述它:一个地球观测卫星在包头综合校准和验证站点获取的图像。

Baotou target
 

Currently the algorithm requires the pixels outside the target to be set to zero. Note that the target has two dark areas with different gray levels. The algorithm will use both, automatically recognizing when the transition goes from bright to dark or vice-versa. Only the edge closest to the vertical will be used. There won't be enough pixels near the center to obtain a reliable edge model, those will be automatically discarded.

目前,该算法要求将目标外的像素设置为零。请注意,目标有两个灰度不同的暗区。该算法将同时使用这两种方法,自动识别从亮到暗的过渡或从亮到暗的过渡。只使用最接近垂直面的边。中心附近没有足够的像素来获得可靠的边缘模型,这些像素将被自动丢弃。

Baotou features

The algorithm will also work with simple edge images.

该算法也适用于简单的边缘图像。

First Edge Position Estimation 第一边缘位置估计

The Transect class represents an image row. It contains the method needed to estimate the sub-pixel position of the edge in the represented row. For robustness the class requires a minimum number of data pixels in total and around the edge to be valid (__isValid).

横断类表示图像行。它包含了边缘评估行中的子像素位置所需的方法。为了保持健壮性,类需要在围绕边缘的一些数据像素数才能有效(__isValid)。

The row data is first smoothed and then differentiated to obtain a coarse estimation of the pixel position of the edge. The estimation is used later to set the initial conditions of the optimization that fits a Sigmoid function to the data. The optimization technique used allows you to easily set a different function if you are not comfortable with the Sigmoid modelling the Edge Spread Function (ESF). It is worth noting that the Sigmoid won't be used for the MTF calculation, it is only used for the estimation of the sub-pixel edge position.

首先对行数据进行平滑,然后进行差分,以获得边缘像素位置的粗略估计。该估计稍后用于设置优化的初始条件,以使数据符合Sigmoid函数。如果您对Sigmoid建模边缘扩展函数(ESF)不满意,使用的优化技术可以轻松设置不同的函数。值得注意的是,Sigmoid不会用于MTF计算,它只用于亚像素边缘位置的估计。

The optimization yields the function parameters, allowing us to work in a continuous domain. From here it is trivial to obtain the function derivative (Line Spread Function, LSF) and its inflection point, which corresponds to the estimated sub-pixel position of the edge.

优化得到函数参数,使我们能够在连续域中工作。由此很容易得到与边缘估计的亚像素位置相对应的函数导数(线扩展函数,LSF)及其拐点。

Sigmoid fitted to row data in a specific Transect. The red marker shows the estimated sub-pixel edge position. Circles are pixel values.
Sigmoid符合特定横断面的行数据。红色标记显示估计的亚像素边缘位置。圆圈是像素值。

The MTF Class MTF类

When instantiated, the class scans the image row by row creating transect instances. If the edge detection is not good enough (short transect, unreliable edge data, etc.) the transects are labeled as invalid and no longer used.

实例化时,该类逐行扫描图像,创建横断面实例。如果边缘检测不够好(样条短、边缘数据不可靠等),则样条被标记为无效,不再使用。

The method refineEdgeSubPx() performs a linear regression in order to check if the centers arrangement is straight as assumed. Outliers are removed during this process. The second run of this method allows the estimation of the edge angle.

方法refineEdgeSubPx()执行线性回归,以检查中心排列是否与假设的直线一致。在此过程中将删除异常值。该方法的第二次运行允许估计边缘角度。

Estimated sub-pixel edge locations of valid transects. The resulting line of the linear regression is shown in red.
有效断面的估计亚像素边缘位置。线性回归的结果线以红色显示。

Definitive Edge Location 确定边缘位置

Each transect has a sub-pixel edge position estimated using a function fitting. It has served its purpose and won't be used any longer. The definitive sub-pixel edge position of each transect is now defined by the resulting line of the second iteration of the linear regression (refineEdgeSubPx(), outliers removed).

每个横断面都有一个使用函数拟合估计的亚像素边缘位置。它已经达到了目的,不再使用了。现在,通过线性回归第二次迭代(refineEdgeSubPx()移除离群值)的结果行定义每个横断面的最终子像素边缘位置。

ESF and PSF Estimation (ESF和PSF估计)

The sub-pixel edge position is used to shift each transect to a common origin, hence creating a supersampled virtual edge. This way, instead of using the Sigmoid or other function, the edge is modelled as a spline, creating a numeric and more realistic representation of the ESF. The PSF is obtained by fitting the spline shape to a Gaussian function using a Levenberg-Marquardt optimization(calcOptimizedLsf).

子像素边缘位置用于将每个横断面移动到公共原点,从而创建超采样虚拟边。这样,边不是使用Sigmoid或其他函数,而是将边建模为样条曲线,从而创建ESF的数值和更真实的表示。通过采用Levenberg-Marquardt优化(calcOptimizedLsf)将样条曲线形状拟合到高斯函数,得到了PSF。

Green: Supersampled edge 绿色:超级采样边缘
Brown: Best-fit Gaussian resulting from the optimization 棕色:最佳拟合高斯优化结果
Red: Optimized ESF spline numeric model 红色:优化的ESF样条数值模型
Blue: Optimized PSF spline numeric model 蓝色:优化PSF样条数值模型

MTF Estimation MTF估算

The MTF is now straightforward to calculate from the optimized PSF numeric model using the real and discrete fast Fourier transform implemented in the NumPy package.

MTF现在可以直接从优化的PSF数值模型中使用在NumPy包中实现的实离散快速傅里叶变换进行计算。

The results are provided through a Matplotlib interactive widget with additional information on the console.

结果是通过Matplotlib交互式widget提供的,控制台上还有其他信息。

Matplotlib output example
Matplotlib输出示例

Console output example
控制台输出示例

The Edge Class (Edge类)

This class is intended for validation purposes. You can use it to create perfect synthetic edges for performance comparison with third-party software.

此类用于验证目的。您可以使用它创建完美的合成边缘,以便与第三方软件进行性能比较。

Synthetic edge sample
合成边缘示例

Validation 验证

The algorithm and its implementation has been validated using synthetic edges and actual edges using third-party software.

利用第三方软件,利用合成边和实际边缘对算法进行了验证。

Installing and Using as a QGIS Plugin 安装并用作QGIS插件

Check the instructions. 检查说明书。

原文:MTF_Estimator/Algorithm_Description.md at master · JorgeGIlG/MTF_Estimator · GitHub

代码:GitHub - JorgeGIlG/MTF_Estimator: Robust ESF, PSF, FWHM & MTF estimation from low quality images.

FidMTF: An MTF Estimator (FidMTF:一种MTF估计方法)相关推荐

  1. AdaFit:一种对基于学习的点云法线估计方法的新思考(ICCV2021)

    AdaFit: Rethinking Learning-based Normal Estimation on Point Clouds (2021-ICCV) 代码地址:https://github. ...

  2. 频偏纠正matlab实现,一种用于ZigBee的频偏估计方法及其系统与流程

    技术领域本发明涉及一种频偏估计方法,尤其涉及一种用于ZigBee的频偏估计方法,并涉及采用了该用于ZigBee的频偏估计方法的频偏估计系统. 背景技术: 无线通信接收机中,通过射频到基带的数据通常有一 ...

  3. Xgboost回归四种调参方法及Python简单实现

    前言 Xgboost对特征工程和数据处理比较友好,相比之下调参成为用好Xgboost重要的一环,本文分别从参数.调参方法.Python实现的维度进行梳理,作为调参思路的记录. 本文将关注以下几个问题: ...

  4. 基于 Python 的 8 种常用抽样方法

    抽样是统计学.机器学习中非常重要,也是经常用到的方法,因为大多时候使用全量数据是不现实的,或者根本无法取到.所以我们需要抽样,比如在推断性统计中,我们会经常通过采样的样本数据来推断估计总体的样本. 上 ...

  5. 数据科学中常见的9种距离度量方法

    选自towardsdatascience 作者:Maarten Grootendorst 机器之心编译 编辑:陈萍 在数据挖掘中,我们经常需要计算样本之间的相似度,通常的做法是计算样本之间的距离.在本 ...

  6. 基于视觉的在线地图:一种Transformer网络方法

    来源丨 计算机视觉深度学习和自动驾驶 arXiv在2021年10月3日上传论文"Translating Images into Maps",作者来自英国University of ...

  7. 一种高效的基于邻域空间聚合的点云语义分割不确定性估计方法(ICRA2021)

    Neighborhood Spatial Aggregation based Efficient Uncertainty Estimation for Point Cloud Semantic Seg ...

  8. 设置按钮不可见_华为手机居然有【3种录屏方法】,很多人都不知道,真的太实用了...

    使用华为手机已经有4-5年的时间了,感觉华为手机的功能越来越强大了,有很多功能让我对华为手机产生了粘性,如:局部截屏.滚动截屏.畅连通话.多屏协同等等,可见华为是真的在认真做产品.同样的,华为手机的录 ...

  9. 深度盘点:详细介绍机器学习中的7种交叉验证方法!

    来源:机器学习社区 本文约3400字,建议阅读10分钟 本文与你分享7种最常用的交叉验证技术及其优缺点,提供了每种技术的代码片段. 在任何有监督机器学习项目的模型构建阶段,我们训练模型的目的是从标记的 ...

  10. [转]设计高效SQL: 一种视觉的方法

    原文地址:http://www.itpub.net/thread-1357925-1-1.html 英文原文:http://www.simple-talk.com/sql/performance/de ...

最新文章

  1. OWA登录页面显示为英文而不是中文
  2. 1035 插入与归并
  3. linux下的sort、uniq、join的使用
  4. 两个数之间的最短路径问题
  5. HTTP协议中几个状态码
  6. Thymeleaf select 使用 和多select 级联选择
  7. ios 内存管理的理解(一) 简述
  8. java多线程初识4
  9. 计算机网络学习socket--day3
  10. 为什么会出现35岁就失业的魔咒?
  11. 小学计算机应用到英语课教案,人教版小学英语三年级上册unit one hello!文具单词教学信息技术应用成果(教学设计方案).doc...
  12. #洛谷oj:P3144 Closing the Farm S
  13. JAVA学习——GUI鼠标画图交互练习
  14. I/O流(万流齐发、万流归宗) 本章目标: 掌握 讲  解:★★★★★ http://kuaibao.qq.com/s/20200527A0LR3000?refer=spider 1.I/O流概
  15. PV,UV,IP,VV,CV的含义与区别
  16. 联想笔记本G400使用VS2013时,笔记本快捷键与软件快捷键冲突解决方案
  17. 在deepin系统下安装git
  18. 清华大学电子计算机学院山西籍导师,清华大学山西高考录取结束 96人创历史新高...
  19. ajax请求时拒绝访问,ajax跨域请求js拒绝访问的解决方法
  20. DEM、DOM、DLG、DRG、DTM、DSM概念解释及联系

热门文章

  1. Volatility工具使用
  2. 新物种爆炸:认知升级时代的新商业思维
  3. 一文到胃------合并(归并)排序原理
  4. 024 正交向量 正交矩阵及性质
  5. 《富爸爸穷爸爸》读书笔记 -- 第一章
  6. 关于电脑网速网占用问题(svchost.exe)(¥72)
  7. 真正优秀的人,更懂得尊重别人
  8. 服务器抓不到mrcp信息,MRCP学习笔记-语音识别资源的事件和headers详解
  9. ICMP隧道检测分析--icmptunnel
  10. yolov3/yolov4/yolov5/yolov6/yolov7/lite/fastdet/efficientdet各系列模型开发、项目交付、组合改造创新之—桥梁基建隧道裂痕裂缝检测实战