資源簡介
刀刃法求MTF曲線 matlab 數字圖像處理

代碼片段和文件信息
%{
?Slant?Edge?script
?File:?MTFscript.m
?Written?by:?Patrick?Granton?
?September?2?2010?
?Contact?e-mail?patrick.granton@maastro.nl
?
Tested?using?Matlab?7.7.0.471?(R2008b)
including?the?imaging?toolbox?on?a?mac?using?OSX?10.5.8
?
A?Gaussian?fitting?tool?has?been?used?in?this?code.?You?can?download?this?
tool?on?the?Matlab?central?website?here:?http://www.mathworks.com/matlabcentral/fileexchange/11733-gaussian-curve-fit
?
?
%%%%%%%%%%%%%%%%%%%%Notes?on?script%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
?
General?comments:
?
This?code?can?be?used?to?measure?the?pre-sampled?MTF?of?an?image?which?is?a?
quantity?that?describes?the?resolution?of?linear?imaging?system.?The?code
is?based?on?measuring?the?pre-sample?MTF?using?a?precision?machined?
edge?that?is?aligned?-?with?respect?to?the?columns?or?rows?of?an?image?-?
at?an?angle?between?1-5?degrees.??
?
To?learn?more?about?the?pre-sampled?MTF?consult?the?references?at?the?end
of?this?script.
When?you?run?this?script?your?image?containing?the?edge?with?appear?with?the?
cropping?tool.?Crop?your?image?to?the?region?containing?only?the?edge.?
Double-click?your?cropped?area?for?the?script?to?continue.?
Samei?Flynn?and?Reimann?(Ref.2?)?have?a?good?description?on?how?to?
fabricate?the?edge?to?measure?the?pre-sampled?MTF.?
?
%%%%%%%%%%%%%%%%%%%%%Begin?script%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
?
%}
%Identify?and?initialize?all?variables
?
isotropicpixelspacing?=?0.2;?
%?isotropic?detector?pixel?spacing?in?mm?(i.e.?pixel?pitch).??
%?set?this?value?to?your?detector
?
pixel_subdivision?=?0.10;?
%?keep?between?0.03?-?>?0.15??
%?Samei?Flynn?and?Reimann?(Ref.2?)suggest?that?0.1?subpixel?bin?spacing?
%?provides?a?good?trade-off?between?sampling?uniformity?and?noise.
?
bin_pad?=?0.0001;
%?Bin_pad?adds?a?small?space?so?that?all?values?are?included?the?histogram?
%?of?edge?spread?distances.
?
span?=?10;
%?span?is?used?to?smooth?the?edge?spread?function?
%?Samei?Flynn?and?Reimann?(Ref.2?)?use?a?forth?weighted
%?Gaussian-weighted?moving?polynomial.?
?
edge_span?=?4;
%?Used?to?improve?the?location?of?the?edge
?
boundplusminus?=?2;?
%?boundplusminus?is?a?variable?that?is?used?to?crop?a?small?section?of?the
%?edge?in?order?to?used?to?find?the?subpixel?interpolated?edge?position.
?
?
boundplusminus_extra?=?6;
%?boundplusminus_extra?incorperates?addition?pixel?values?near?the?edge?to?
%?include?in?the?binned?histogram.?
?
?
%%%%%%%%%%%%%%%%%%%%%%%%%LOAD?IMAGE%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
?
?
Button_Image_Import?=?questdlg(‘What?type?of?image?would?you?like?to?import??‘...
????‘Image?type?‘...
????‘Dicom‘‘Tiff?or?Jpeg‘‘Matlab?file‘‘Tiff?or?Jpeg‘);
?
switch?Button_Image_Import
????
????ca
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????6148??2010-09-03?14:06??MATHWORKS_MTF\.DS_Store
?????文件??????264118??2010-08-27?15:46??MATHWORKS_MTF\512by512_edgeImage.dcm
?????文件??????104157??2010-09-03?13:49??MATHWORKS_MTF\MTF_output.jpg
?????文件???????15380??2010-09-03?13:53??MATHWORKS_MTF\MTFsc
?????文件???????15381??2010-09-03?14:03??MATHWORKS_MTF\MTFsc
?????文件??????155012??2010-09-03?13:50??MATHWORKS_MTF\screenshot.png
?????文件??????????82??2010-09-03?14:06??__MACOSX\MATHWORKS_MTF\._.DS_Store
?????文件??????????82??2010-09-03?13:53??__MACOSX\MATHWORKS_MTF\._MTFsc
?????文件?????????325??2010-09-03?13:50??__MACOSX\MATHWORKS_MTF\._screenshot.png
?????文件????????1349??2014-02-12?13:15??license.txt
- 上一篇:蜂窩網無線定位仿真程序
- 下一篇:matlab代碼_小波矩特征提取
評論
共有 條評論