yuzhishishu = str2double(get(hObject,'String'));
yuzhishishu = yuzhishishu;
% Hints: get(hObject,'String') returns contents of edit3 as text
% str2double(get(hObject,'String')) returns contents of edit3 as a
% double
% --- Executes on button press in pushbutton7.
%目标检测部分
function pushbutton7_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton7 (see GCBO)
global im_1;
global hResult1;
global filename1;
global yh;
global N;
global M;
global ll_lev3;
global h;
global L;
global fenjieshishu;
global yuzhishishu;
im_1 = double(im_1);%注意这里一定要用双精度型数据,要不然会运行不了
h = daubcqf(4,'min');%获得滤波器的系数
[ll_lev3,yh,L]=mrdwt(im_1,h,fenjieshishu); %进行非抽样四层分解
[N,M]=size(im_1);
ll_lev3 =zeros([N,M]);
im_ff=mirdwt(ll_lev3,yh,h,fenjieshishu);%进行非抽样反变换
im_ff1 = uint8(im_ff);
im_target=zeros([N,M]);
T1 = (max(im_ff1(:)))/yuzhishishu;
for i=1:N
for j=1:M
if im_ff(i,j) > T1;
im_target(i,j)=im_ff(i,j);
end
end
end
figure(hResult1);
subplot(2,2,4),imshow(uint8(im_target),[]);
title('隐蔽目标检测结果','FontName','隶书','FontSize',16,'color',[0 0 1]);
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% --- Executes during object creation, after setting all properties.
function edit1_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end原文请找腾讯752018766优,文-论'文.网http://www.youerw.com
% --- Executes during object creation, after setting all properties.
function edit2_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');
end
% --- Executes during object creation, after setting all properties.
function edit3_CreateFcn(hObject, eventdata, handles)
% hObject handle to edit3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: edit controls usually have a white background on Windows.
% See ISPC and COMPUTER.
if ispc && isequal(get(hObject,'BackgroundColor'), get(0,'defaultUicontrolBackgroundColor'))
set(hObject,'BackgroundColor','white');