You are on page 1of 4

Lab Report Final BioEn 5900 00404942 Thomas Stock For the final analysis I made a Matlab program

that would give me at any line points I wanted the image intensity for the image. As can be seen in the graphic of the input you can see the characteristic of the input. The box on the side gives the Standard deviation of the line profile that was chosen. The graph on the right is the results that were normalized according to their highest value. No universal value was chosen because the lighting in each of the picture was different enough to make comparison difficult. The measure of mixing effectiveness was chosen on the standard deviation of the line. With the Inlet having a mix of 70% effective and the output at the three levels was 98% for .1 mL/hr, 97% for 1 mL/hr and 95% for 10mL per hour. The 2.5D outlet shows that the stairs were very effective in mixing the fluids, as the side with the stair was mixed and the side without the stairs wasnt. Included in this report is the Matlab code that was written.

0.9 0.8 0.7 0.6 0.5

Normalized Optical Intensity (univtless)

1.1 1

Mixer Results as a Function of Channel Width

Normalized Width (unitless) 0 0.2 0.4 2.5D outlet 1 mL 0.6 0.8 1 inlet .1mL

function varargout = Trace(varargin) % TRACE M-file for Trace.fig % TRACE, by itself, creates a new TRACE or raises the existing % singleton*. % % H = TRACE returns the handle to a new TRACE or the handle to % the existing singleton*. % % TRACE('CALLBACK',hObject,eventData,handles,...) calls the local % function named CALLBACK in TRACE.M with the given input arguments. % % TRACE('Property','Value',...) creates a new TRACE or raises the

% existing singleton*. Starting from the left, property value pairs are % applied to the GUI before Trace_OpeningFcn gets called. An % unrecognized property name or invalid value makes property application % stop. All inputs are passed to Trace_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 Trace % Last Modified by GUIDE v2.5 14-Dec-2011 21:17:25 % Begin initialization code - DO NOT EDIT gui_Singleton = 1; gui_State = struct('gui_Name', mfilename, ... 'gui_Singleton', gui_Singleton, ... 'gui_OpeningFcn', @Trace_OpeningFcn, ... 'gui_OutputFcn', @Trace_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 Trace is made visible. function Trace_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 Trace (see VARARGIN) % Choose default command line output for Trace handles.output = hObject; % Update handles structure guidata(hObject, handles); % UIWAIT makes Trace wait for user response (see UIRESUME) % uiwait(handles.figure1);

% --- Outputs from this function are returned to the command line. function varargout = Trace_OutputFcn(hObject, eventdata, handles) % varargout cell array for returning output args (see VARARGOUT);

% hObject % eventdata % handles

handle to figure reserved - to be defined in a future version of MATLAB 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 trace1. function trace1_Callback(hObject, eventdata, handles) % hObject handle to trace1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) p = ginput(2); % Get the x and y corner coordinates as integers sp(1) = min(floor(p(1)), floor(p(2))); %xmin sp(2) = min(floor(p(3)), floor(p(4))); %ymin sp(3) = max(ceil(p(1)), ceil(p(2))); %xmax sp(4) = max(ceil(p(3)), ceil(p(4))) ; %ymax %sp=sp/1000; xi=[sp(1),sp(1)]; yi=[sp(2),sp(4)]; %get frame c1_image=get(handles.edit2,'string'); b=imread(c1_image); c=rgb2gray(b); linepro=improfile(c,xi,yi); st=std(linepro); set(handles.edit1,'string',st) plot(handles.axes2,linepro); save('newpro.mat','linepro'); % --- Executes on button press in loadpic. function loadpic_Callback(hObject, eventdata, handles) % hObject handle to loadpic (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) [File,Path]=uigetfile({'*.*'},'File Selector'); filename1=File; [path,file,ext]=fileparts(filename1); %#ok<NASGU> filename=fullfile(path,file); pathname=Path; a=imread(filename1); axes(handles.axes1); imagesc(a); colormap(gray); set(handles.edit2,'string',filename1)

function edit1_Callback(hObject, eventdata, handles) % hObject handle to edit1 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA)

% Hints: get(hObject,'String') returns contents of edit1 as text % str2double(get(hObject,'String')) returns contents of edit1 as a double

% --- 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

function edit2_Callback(hObject, eventdata, handles) % hObject handle to edit2 (see GCBO) % eventdata reserved - to be defined in a future version of MATLAB % handles structure with handles and user data (see GUIDATA) % Hints: get(hObject,'String') returns contents of edit2 as text % str2double(get(hObject,'String')) returns contents of edit2 as a double

% --- 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

You might also like