addpath /research/src/DNAdesign addpath /research/src/AFMutils filepath = '/research/windows/backups/afm/d/Rizal/02-08-03/real0803.'; tempim = showafm(sprintf('%s%03d',filepath, 030),0); %image2 = showafm(sprintf('%s%03d',filepath, 035),0); figure(1); imagesc(tempim); colormap gray; %figure(1); imagesc(image2); colormap gray; pause; image = histflatten(tempim); figure(2); imagesc(image); colormap gray; % h = [ 0 1 0 % 0 1 0 % 0 1 0]; % % vertfilt = imfilter(image, h); % medfilt = medfilt2(image); % figure(3); imagesc(vertfilt); colormap gray; pause; % figure(3); imagesc(medfilt); colormap gray; pause; inum = [0:40]; N = length(inum); im = cell(N); inf = cell(N); for i = 1:N figure(1); [tim, inf{i}] = showafm(sprintf('%s%03d',filepath, inum(i)),0); drawnow; im{i} = histflatten(tim); figure(2) imagesc(im{i}); axis xy; axis square; colormap gray; drawnow; % im2{i} = histeq(im{i}); figure(3) imhist(im{i}); drawnow; end