set_dir.asv - % smooth_wave - default 5. The higher it is,...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
function set_dir(dir_name, num_scans, rpm, smooth_image, smooth_wave) %$Revision: 1.7 $ $Author: nailon $ $Date: 2004/05/09 03:18:48 $ %set_dir(dir_name [, num_scans] [,rpm] [,smooth_image] [,smooth_wave]) - sets a global variables for the % directory path of the record images (and all intermediate files), % as well as the number of scanned images and the rpm of the record, % and some smoothing parameters. % If num_scans not specified, then the number of scanned images will % be set according to the number of .png files in dir_name. rpm will % be 78 by default. Typlical values are 100/33 for LPs and 78 for % SPs. If rpm is not specified it will first look for a file % plain-text file called rpm that contains the rpm value. If this % is not found, then the default will be 78. The rpm setting will % be written to the file rpm. % smooth_image - default 2. The higher it is, the more smoothing it % does on the image.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: % smooth_wave - default 5. The higher it is, the more smoothing % done on wave. global Gdir Gnum_scans Grpm Gdebug Gsmooth_image Gsmooth_wave global Gstart_end_thresh global Gend_panic_skip %filename = sprintf('%s/rpm',dir_name); if nargin < 3 result = exist(filename); if result == 0 rpm = 78; else rpm = load(filename); end end if (nargin < 4) smooth_image = 2; end if (nargin < 5) smooth_wave = 5; end Gsmooth_wave = smooth_wave; Gsmooth_image = smooth_image; % Update rpm value regardless %fid = fopen(filename, 'w'); commented out %fprintf(fid,'%f',rpm); %fclose(fid); if nargin < 2 s = dir(sprintf('%s/*.png',dir_name)); num_scans = length(s); end Gdir = dir_name; Gnum_scans = num_scans; Grpm = rpm; if Gdebug temp = '\nworking directory: %s, num_scans: %d, rpm: %f\n'; disp(sprintf(temp, Gdir, Gnum_scans, Grpm)); end Gstart_end_thresh = 0.3; if (Grpm==33) Gend_panic_skip=35; else Gend_panic_skip=10; end...
View Full Document

This note was uploaded on 04/20/2008 for the course ENGR 190 taught by Professor Staff during the Spring '08 term at Santa Clara.

Page1 / 2

set_dir.asv - % smooth_wave - default 5. The higher it is,...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online