im = imread('d:\comp vision\images\travis.jpg');
im = rgb2gray(im);
imshow(im)
%imshow(im), colormap(gray);
%gafilt = fspecial('gaussian', size(im), 2); % gaussian filter

%newim = filter2(gafilt,im);   

% figure, imhist(im)

J = histeq(im);

figure, imshow(J)

%figure, imhist(J)

%imwritesc(im, 'travisBW.jpg')

imwritesc(J, 'travishisteq.jpg')