% Dave's Sub-program DEPINTL (called by DEPINT - which processes multiple images % DEP of beads/dna on INTerdigitated electrodes that via Looping arrangement % Scottish Parliament election day Th/6/5/1999 D.Bakewell % NOTES: Direction along electrode strips is referred to as LONGITUDINAL; % Direction perpendicular to Longitudinal is referred to as TRANSVERSE % pmxlng = 720 pmxtrv = 540 switch fmpg case 1 i=1:1:pmxtrv; k=1:1:pmxlng; input2=[]; %j=1+(cnt-1)*pmxlng:1:cnt*pmxlng; % use when series of MPEG frames loaded at once j=k; % use when series of MPEG frames loaded one at a time input2(i,k)=mpgim(i,j); case 2 % input file: user input switch ffile; case 1 ifcode = input('enter RGB tif filename WITHOUT "**.dib": ','s'); ifname = [ifcode ifnum] mapA = imread(ifname); message=['Reading in DIB file & -> Grayscale'] rgb = double(mapA)/255; input2 = rgb2gray(rgb); % RGB -> intensity gray case 2 switch fauto case 1 ifcode = input('enter RGB tif filename WITHOUT "**.tif": ','s'); end % end switch fauto INput file CODEname already entered in DEPINT ifname = [ifcode ifnum] ifdnam = [ifname '.tif'] message=['Reading in TIF file & -> Grayscale'] [r,g,b] = tiffread(ifname); input2 = rgb2gray(r,g,b); % RGB -> intensity gray case 3 ifcode = input('enter Gray tif filename WITHOUT "**.tif": ','s'); ifname = [ifcode ifnum] ifdnam = [ifname '.tif'] message=['Reading in GRAYSCALE TIF file'] input2 = imread(ifdnam,'tif'); % filename.fmt -> i=pmxtrv x j=pmxlng Uint8 array MATRIX coord sys. end % end Flag for FILE end % end Flag for MPeG % ------------------------------------------------------------------------- rotatim; % rotate image switch fauto case 1 ftralo = menu('Vert Per i Av option:','flexible/interpolation','non/integer periods'); case 2 ftralo=invar(5) end % end switch fauto switch ftralo % average over longitudinal/transverse directions case 1 tralong1; % average using interpolation in transverse, pixel sum longitudinal case 2 tralong2; % average by constructing non/integer transverse, pixel sum longitudinal end % end span vector construction