邊緣檢測程序(matlab)


% Selectmethod:選擇邊緣檢測方法
% Loadnew Image:讀入被選擇的圖像
% Updatethreshctrl:數據更新
% Updatelogs1ze-:更新與LoG濾波器相關的數據
if nargin<l
action='initializeedgedetection'i
end:
feval(action, varargin
turn
號88函數 Initializeedgedetection
function Initializeedgedetection()
h= findobj (allchild(0),'tag''edgedetectionsoft')
if isempty(h)
figure(h(1))
return
ena
screend= get(0,'screendepth)i
if screend> 8
grayres=256;
else
grayres = 128;
e
Edgedetectionfig= figure(
Name','基於差分運算的數字圖像邊緣檢測軟件',
'numbertitle','off,' handlevisibility''on'
tag','基於差分運算的數字圖像邊緣檢測軟件',
Visible,'off,'resize','off
'busyaction','queue,'interruptible,'off',
Color',[.8.8.8]
Integer handle','off.
doublebuffer'on',
colormap',gray( grayres))
figpos= get( Edgedetectionfig,'position')
調節圖像窗口尺寸
figpos(3:4)=[560420];
horizdecorations =10; resize controls, etc
vertdecorations=45;
s title bar, etc.
e- get(0,'screens
if(so
size(3)<=1
No display connected apparentl
y
d
screens1ze(3:4)=[10000100000];
if(((figpos(3)+ horizdecorations)> screensize(3))
((figpos(4)+y
窗口尺寸太小
oratio
s)>
delete( Edgedetectionfig)i
creensize(4)))
r(['s
n resolutio
on 1s too
or text f
d
are to
g) te
n
dx screensize(3)- figpos(1)- figpos(3)- horizdecorations;
s edgesoft'1)
dy= screensize(4)- figpos(2)- figpos(4)-vertdecorationsi

 


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM