当前位置:网站首页>MATLAB image defogging technology GUI interface - global balance histogram
MATLAB image defogging technology GUI interface - global balance histogram
2022-07-24 15:22:00 【studyer_ domi】
1、 Content abstract
A little
431- Can communicate 、 consulting 、 Answering question
2、 Content description
A little
3、 Simulation analysis
function varargout = main(varargin)
% MAIN MATLAB code for main.fig
% MAIN, by itself, creates a new MAIN or raises the existing
% singleton*.
%
% H = MAIN returns the handle to a new MAIN or the handle to
% the existing singleton*.
%
% MAIN('CALLBACK',hObject,eventData,handles,...) calls the local
% function named CALLBACK in MAIN.M with the given input arguments.
%
% MAIN('Property','Value',...) creates a new MAIN or raises the
% existing singleton*. Starting from the left, property value pairs are
% applied to the GUI before main_OpeningFcn gets called. An
% unrecognized property name or invalid value makes property application
% stop. All inputs are passed to main_OpeningFcn via varargin.
%
% *See GUI Options on GUIDE's Tools menu. Choose "GUI allows only one
% instance to run (singleton)".
%
% See also: GUIDE, GUIDATA, GUIHANDLES
% Edit the above text to modify the response to help main
% Last Modified by GUIDE v2.5 14-Apr-2019 17:22:46
% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name', mfilename, ...
'gui_Singleton', gui_Singleton, ...
'gui_OpeningFcn', @main_OpeningFcn, ...
'gui_OutputFcn', @main_OutputFcn, ...
'gui_LayoutFcn', [] , ...
'gui_Callback', []);
if nargin && ischar(varargin{1})
gui_State.gui_Callback = str2func(varargin{1});
end
if nargout
[varargout{1:nargout}] = gui_mainfcn(gui_State, varargin{:});
else
gui_mainfcn(gui_State, varargin{:});
end
% End initialization code - DO NOT EDIT
% --- Executes just before main is made visible.
function main_OpeningFcn(hObject, eventdata, handles, varargin)
% This function has no output args, see OutputFcn.
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% varargin command line arguments to main (see VARARGIN)
% Choose default command line output for main
handles.output = hObject;
% Update handles structure
guidata(hObject, handles);
% UIWAIT makes main wait for user response (see UIRESUME)
% uiwait(handles.figure1);
% --- Outputs from this function are returned to the command line.
function varargout = main_OutputFcn(hObject, eventdata, handles)
% varargout cell array for returning output args (see VARARGOUT);
% hObject handle to figure
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Get default command line output from handles structure
varargout{1} = handles.output;
% --- Executes on selection change in popupmenu1.
function popupmenu1_Callback(hObject, eventdata, handles)
% hObject handle to popupmenu1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Hints: contents = cellstr(get(hObject,'String')) returns popupmenu1 contents as cell array
% contents{get(hObject,'Value')} returns selected item from popupmenu1
global Img2
% Specific algorithm implementation
val=get(handles.popupmenu1,'value');
switch val
case 1
if isequal(handles.Img1, 0)
msgbox(' Please load the image !', ' Prompt information ');
return;
end
Img2 = RemoveFogByGlobalHisteq(handles.Img1, 0);
axes(handles.axes2); imshow(Img2, []);
case 2
if isequal(handles.Img1, 0)
msgbox(' Please load the image !', ' Prompt information ');
return;
end
Img2 = RemoveFogByLocalHisteq(handles.Img1, 0);
axes(handles.axes2); imshow(Img2, []);
case 3
if isequal(handles.Img1, 0)
msgbox(' Please load the image !', ' Prompt information ');
return;
end
Img2 = RemoveFogByRetinex(handles.Img1, 0);
axes(handles.axes2); imshow(Img2, []);
end
% --- Executes during object creation, after setting all properties.
function popupmenu1_CreateFcn(hObject, eventdata, handles)
% hObject handle to popupmenu1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles empty - handles not created until after all CreateFcns called
% Hint: popupmenu 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 on button press in pushbutton1.
function pushbutton1_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton1 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% open
warning off all;
% Load the image
[FileName,PathName] = uigetfile({'*.jpg;*.tif;*.png;*.gif', ...
' All image files ';...
'*.*',' All the files ' },' Load the image ',...
'.\images\\sweden_input.jpg');
if isequal(FileName, 0) || isequal(PathName, 0)
return;
end
Img1 = imread(fullfile(PathName, FileName));
axes(handles.axes1);
imshow(Img1, []);
handles.Img1 = Img1;
handles.Img2 = 0;
guidata(hObject, handles);
% --- Executes on button press in pushbutton2.
function pushbutton2_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton2 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
global Img1 Img2
% Histogram
figure('Name', ' Histogram comparison ', 'NumberTitle', 'Off', ...
'Units', 'Normalized', 'Position', [0.1 0.1 0.5 0.5]);
one = rgb2gray(handles.Img1);
two = rgb2gray(Img2);
subplot(2, 2, 1); imshow(handles.Img1); title(' Original picture ','FontWeight', 'Bold');
subplot(2, 2, 2); imshow(Img2, []); title(' Processed graph ','FontWeight', 'Bold');
subplot(2, 2, 3); imhist(one,64); title(' Original gray histogram ', 'FontWeight', 'Bold');
subplot(2, 2, 4); imhist(two,64); title(' Processed gray histogram ', 'FontWeight', 'Bold');
one = rgb2gray(handles.Img1);
axes(handles.axes3);
imhist(one,64);
axes(handles.axes4);
imhist(two,64);
% --- Executes on button press in pushbutton3.
function pushbutton3_Callback(hObject, eventdata, handles)
% hObject handle to pushbutton3 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% Screenshot save
SnapImage();
% --- Executes on button press in pushbutton4.
function pushbutton4_Callback(hObject, eventdata, ~)
% hObject handle to pushbutton4 (see GCBO)
% eventdata reserved - to be defined in a future version of MATLAB
% handles structure with handles and user data (see GUIDATA)
% sign out
close();


4、 Reference paper
A little
边栏推荐
- Mysql库的操作
- 图的存储和遍历
- Outlook tutorial, how to set rules in outlook?
- Kubectl_ Easy to use command line tool: Oh my Zsh_ Tips and tricks
- Tiger mouth waterfall: Tongliang version of xiaohukou waterfall
- Conflict resolution of onblur and onchange
- Error when using Fiddler hook: 502 Fiddler - connection failed
- 文件操作详解
- Performance test - Preparation of test plan
- 25.从生磁盘到文件
猜你喜欢

matlab图像去雾技术GUI界面-全局平衡直方图

Route planning method for UAV in unknown environment based on improved SAS algorithm

Intuitive understanding of various normalization

Summary of feature selection: filtered, wrapped, embedded

Strongly connected component

Android section 13 detailed explanation of 03sqlite database

Jmeter-调用上传文件或图片接口

Intelligent operation and maintenance scenario analysis: how to detect abnormal business system status through exception detection

JMeter - call the interface for uploading files or pictures

Spark: get the access volume of each time period in the log (entry level - simple implementation)
随机推荐
Simple encapsulation of wechat applet wx.request
《Route planning method for UAV in unknown environment based on improved SAS algorithm》翻译
2022 robocom world robot developer competition - undergraduate group (provincial competition) -- fifth question tree and bipartite diagram (completed)
2022 RoboCom 世界机器人开发者大赛-本科组(省赛)-- 第三题 跑团机器人 (已完结)
24.原生磁盘的使用
ReentrantLock 可重入锁
[300 opencv routines] 238. Harris corner detection in opencv
Huffman tree (optimal binary tree)
ZABBIX administrator forgot login password
Outlook tutorial, how to set rules in outlook?
Chiitoitsu
Date class and time class definitions (operator overload application)
C. Recover an RBS
Spark: get the access volume of each time period in the log (entry level - simple implementation)
4279. Cartesian tree
[matlab] matlab drawing Series II 1. Cell and array conversion 2. Attribute cell 3. delete Nan value 4. Merge multiple figs into the same Fig 5. Merge multiple figs into the same axes
String application - calculate the longest true prefix of a string
Calculate the M-day moving average price of two stocks
C. Recover an RBS
Learning rate adjustment strategy in deep learning (1)