quick MTF for Line_pair and SFR
Project description
Copyright (c) 2022 lorry_rui , Fremont ,USA
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
*for image quaility test purpose like lens focus test @ Lorry RUi
======================= Homepage: quickMTF
- PyPI Package Page
- Source Code .. image:: https://github.com/Lorrytoolcenter/quickMTF/doc/linepair2.png :align: center .. image:: doc/linepair2.png :width: 600
:github_url: https://github.com/Lorrytoolcenter/quickMTF
Main Features
- Quick calculation of MTF values for both linepair and slant edge MTF.
- Built-in GUI for image debugging and location picking.
- Plot MTF chart
- GUI:
- Check measure position percentage feature
- Undo: Undo one test.
- Clear all: Clear all tests.
- Save current display: Save the current scene.
- Save current image: Save the image with markers based on image size.
Mail to: :lorryruizhihua@gmail.com
This is a GUI Sample
.. image:: https://github.com/Lorrytoolcenter/quickMTF/doc/manual.png
.. image:: doc/manual.png :width: 600
.. image:: doc/sfr.png :width: 600
sample code for using lib quickMTF
.. code-block:: python
from quickMTF.quickMTF import quickMTF import cv2
if name == 'main': test = quickMTF() ROI_width = 600 ROIX = 1593 ROIY = 1500 image = cv2.imread("image.jpg") image = image[ROIY:ROIY+10, ROIX:ROIX+ROI_width]
print(test.quicklinepairMTF(image, library='cv2')) # linepair chart MTF value and pixels/line pair
print(test.quicksfrMTF(image, cp=0.5)) # CP means cycles/pixel and out MTF value per c/p and slant angle
print(test.quicksfrCP(image, mtf_indx=30)) # MTFindex means MTF and out Cycles/pixel per MTF value and slant angle
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for quickMTF-2023.3.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e7d5bdd18f584e1d889f318710d9a623c58728d87297ce38ba83a928de39f79f |
|
MD5 | 6e122b2f286920b1dc5824b6655be352 |
|
BLAKE2b-256 | b842a0fd0579f0f821d9fc1fbd167ed759e893a27f190c31797a77bd2107a027 |