[image processing] synthesis and separation of RGB three colors based on Matlab image [including Matlab source code phase 401]

1, Introduction

Synthesis and separation of RGB three colors of image based on matlab

2, Source code

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

% Copyright 2002-2003 The MathWorks, Inc.

% Edit the above text to modify the response to help rgb1

% Last Modified by GUIDE v2.5 17-Dec-2008 10:31:18

% Begin initialization code - DO NOT EDIT
gui_Singleton = 1;
gui_State = struct('gui_Name',       mfilename, ...
                   'gui_Singleton',  gui_Singleton, ...
                   'gui_OpeningFcn', @rgb1_OpeningFcn, ...
                   'gui_OutputFcn',  @rgb1_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 rgb1 is made visible.
function rgb1_OpeningFcn(hObject, eventdata, handles, varargin)
A=imread('aa.jpg');
axes(handles.axes1);
imshow(A);

% 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 rgb1 (see VARARGIN)

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

% Update handles structure
guidata(hObject, handles);

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


% --- Outputs from this function are returned to the command line.
function varargout = rgb1_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)
global A;
val=get(hObject,'value');
if(val==1)
    A=imread('aa.jpg');
elseif(val==2)
    A=imread('a.jpg');
elseif(val==3)
    A=imread('b.jpg');
end
axes(handles.axes1);
imshow(A);
% 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 = get(hObject,'String') returns popupmenu1 contents as cell array
%        contents{get(hObject,'Value')} returns selected item from popupmenu1


% --- 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
    set(hObject,'BackgroundColor','white');
else
    set(hObject,'BackgroundColor',get(0,'defaultUicontrolBackgroundColor'));
end

3, Operation results

4, Remarks

Complete code or write on behalf of QQ 1564658423
Review of previous periods > > > > >
[signal processing] sleep state detection based on matlab HMM [including Matlab source code 050]
[signal processing] CDR noise and reverberation suppression based on MATLAB [including Matlab source code phase 051]
[signal processing] solve the problem of sparse signal recovery based on MATLAB least square method [including Matlab source code phase 052]
[signal processing] audio watermark embedding and extraction based on MATLAB wavelet transform [including Matlab source code phase 053]
[signal processing] signal separation based on matlab ICA algorithm [including Matlab source code phase 054]
[signal processing] archiving of pulse rate of pulse signal based on matlab GUI interface [including Matlab source code phase 237]
[signal processing] virtual signal generator based on matlab GUI interface (various waveforms) [including Matlab source code phase 271]
[signal processing] electronic organ based on matlab GUI interface signal generator [including Matlab source code phase 272]
[signal processing] design and implementation of digital electronic organ based on MATLAB [including Matlab source code phase 273]
[radar communication] radar digital signal processing based on MATLAB [including Matlab source code phase 281]
[radar communication] simulation of linear frequency modulation (LFM) pulse compression radar based on MATLAB [including Matlab source code phase 283]
[radar communication] airborne radar imaging based on mtatlab range Doppler (RD), CS and RM algorithms [including Matlab source code phase 284]
[radar communication] modern radar system analysis and design [including Matlab source code 285]
[signal processing] integrated speech signal processing platform based on matlab GUI [including Matlab source code phase 290]
[signal processing] voice signal acquisition based on matlab GUI [including Matlab source code phase 291]
[signal processing] speech amplitude modulation based on matlab GUI [including Matlab source code phase 292]
[signal processing] speech synthesis based on matlab GUI [including Matlab source code phase 293]
[signal processing] speech fundamental frequency recognition based on matlab GUI [including Matlab source code phase 294]
[signal processing] voice signal encryption and decryption based on matlab GUI [including Matlab source code phase 295]
[signal processing] speech enhancement based on MATLAB wavelet transform [including Matlab source code 296]
[signal processing] speech Fourier transform noise reduction and mixing based on matlab GUI [including Matlab source code phase 297]
[signal processing] speech enhancement based on matlab GUI Wiener filter [including Matlab source code 298]
[audio processing] GUI voice signal processing based on MATLAB 2 [including Matlab source code 299]
[radar communication] radar positioning based on matlab GUI [including Matlab source code phase 302]
[radar communication] radar pulse compression based on matlab GUI [including Matlab source code phase 303]
[radar communication] radar positioning simulation based on matlab GUI [including Matlab source code phase 304]
[radar communication] identify radar data based on matlab SVM [including Matlab source code phase 305] ##Title
[edge detection] subpixel edge detection based on matlab interpolation [including Matlab source code phase 306]
[pattern recognition] handwritten numeral recognition based on matlab GUI Bayesian minimum error rate [including Matlab source code phase 308]
[pattern recognition] PCA handwritten numeral recognition based on MATLAB [including Matlab source code 309]
[pattern recognition] English printed character recognition based on Matlab feature matching [including Matlab source code 310]
[Pattern recognition] handwritten numeral recognition based on MATLAB knowledge base [including Matlab source code 311]
[pattern recognition] bank card number recognition based on MATLAB [including Matlab source code phase 312]
[image recognition] expression detection based on MATLAB [including Matlab source code 317]
[image detection] LSD line detection based on MATLAB [including Matlab source code phase 318]
[image fusion] infrared and visible light fusion and registration algorithm [including Matlab source code phase 319]
[image recognition] fall detection based on MATLAB frame difference method [including Matlab source code phase 320]
[image recognition] wall crack recognition based on MATLAB combined BCOSFIRE filter [including Matlab source code 321]
[pattern recognition] fall detection based on MATLAB median filter and binarization [including Matlab source code phase 344]
[image steganography] image steganography based on matlab DCT [including Matlab source code 365]
[image steganography] image steganography extraction based on matlab LSB [including Matlab source code 366]
[image steganography] JPEG image steganography based on MATLAB Gaussian model [including Matlab source code 367]
[image steganography] image adaptive steganography algorithm based on MATLAB wow [including Matlab source code 368]
[pattern recognition] face recognition based on Matlab GUI, SVM and PCA [including Matlab source code 369]
[video recognition] behavior recognition based on MATLAB trajectory method [including Matlab source code 375]
[pattern recognition] fruit classification based on matlab GUI HSV and RGB model [including Matlab source code 380]
[image processing] digital image processing platform based on matlab GUI [including Matlab source code phase 381]
[image segmentation] retinal image segmentation based on MATLAB [including Matlab source code phase 382]
[pattern recognition] gesture recognition based on matlab k-means clustering [including Matlab source code 386]
[image processing] human iris location based on Hough transform [including Matlab source code phase 387]
[image processing] target tracking based on matlab Kalman filtering [including Matlab source code phase 388]
[image segmentation] image segmentation based on matlab GAC Level Set Method [including Matlab source code phase 389]
[image segmentation] image segmentation based on Matlab watershed algorithm [including Matlab source code 390]
[image denoising] image denoising based on wavelet transform [including Matlab source code phase 391]
[image fusion] image fusion based on MATLAB wavelet transform [including Matlab source code phase 392]
[image recognition] object counting based on MATLAB image recognition [including Matlab source code phase 393]
[image enhancement] image enhancement based on matlab fuzzy set [including Matlab source code phase 394]
[image retrieval] image retrieval based on matlab GUI comprehensive features [including Matlab source code 395]

Tags: MATLAB image processing

Posted by yendor on Fri, 15 Apr 2022 08:35:54 +0930