MTF Calculator - Python GUI App

My implementation of the MTF Calculator in Python since MATLAB is not a free product.  The Python output has been successfully cross-referenced with my MATLAB implementation.

MTF - horizontal profile

MTF - vertical profile

Slanted edge image for testing 

(Picture credits: Imatest)

Slanted Edge MTF Calculator (by Chuong Tran)

MTF Calculator (Python App) - User Documentation - by Chuong Tran

Version: 1.0 (as of March 18, 2025)

Introduction:

The MTF Calculator is a Python graphical user interface (GUI) application designed to estimate the Modulation Transfer Function (MTF) of an imaging system from a captured image containing a slanted edge.

MTF is a crucial metric for characterizing the spatial resolution and sharpness of an optical system. 1 This tool allows users to load an image, select a Region of Interest (ROI) containing a slanted edge, and calculate the MTF based on the analysis of the edge profile. The application also provides visualizations of the Edge Spread Function (ESF) and the resulting MTF curve, along with the ability to export the MTF data to a CSV file and capture a screenshot of the GUI.  

1. What Is the Modulation Transfer Function? | Olympus LS - Evident Scientific

evidentscientific.com

Key Features:

Workflow:

Recommendations for Accurate MTF Estimation:

Limitations:

Contact:

For questions or feedback regarding the MTF Calculator, please refer to the documentation or contact the developer (Chuong Tran).

This document provides a comprehensive overview of the MTF Calculator application and its functionality. By following the outlined workflow and considering the recommendations, users can effectively utilize this tool to assess the spatial resolution characteristics of their imaging systems.