基本信息
源码名称:基于小波变化的图像压缩
源码大小:4.68KB
文件格式:.m
开发语言:MATLAB
更新时间:2021-04-13
   友情提示:(无需注册或充值,赞助后即可获取资源下载链接)

     嘿,亲!知识可是无价之宝呢,但咱这精心整理的资料也耗费了不少心血呀。小小地破费一下,绝对物超所值哦!如有下载和支付问题,请联系我们QQ(微信同号):813200300

本次赞助数额为: 2 元 
   源码介绍

function varargout = bysj(varargin)
% BYSJ MATLAB code for bysj.fig
%      BYSJ, by itself, creates a new BYSJ or raises the existing
%      singleton*.
%
%      H = BYSJ returns the handle to a new BYSJ or the handle to
%      the existing singleton*.
%
%      BYSJ('CALLBACK',hObject,eventData,handles,...) calls the local
%      function named CALLBACK in BYSJ.M with the given input arguments.
%
%      BYSJ('Property','Value',...) creates a new BYSJ or raises the
%      existing singleton*.  Starting from the left, property value pairs are
%      applied to the GUI before bysj_OpeningFcn gets called.  An
%      unrecognized property name or invalid value makes property application
%      stop.  All inputs are passed to bysj_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 bysj

% Last Modified by GUIDE v2.5 26-Mar-2021 11:33:16

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @bysj_OpeningFcn, ...
                   'gui_OutputFcn',  @bysj_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 bysj is made visible.
function bysj_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 bysj (see VARARGIN)

% Choose default command line output for bysj
handles.output = hObject;

% Update handles structure
guidata(hObject, handles);

% UIWAIT makes bysj wait for user response (see UIRESUME)
% uiwait(handles.figure1);


% --- Outputs from this function are returned to the command line.
function varargout = bysj_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 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)
global X
axis off
[filename pathname] =uigetfile({'*.jpg';'*.bmp';'*.*'},'打开图片');
str=[pathname filename];
%%打开图像
X=imread(str);
%%打开axes1的句柄,进行axes1的操作
axes(handles.axes1);
%%在axes1中显示图像
imshow(X);


% --- 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 X
  X=rgb2gray(X);
axes(handles.axes2);
imshow(X);