shilinc

导航

直方图均衡

clear
clc
close all
I = imread('lena.png');
%I = 0.2989*J(:,:,1)+0.5870*J(:,:,2)+0.1140*J(:,:,3);
%Converting an 8-Bit %RGB Image to Grayscale
%I=rgb2gray(J);
imshow(I)
J=histeq(I,256);%256个灰度级
figure
imshow(J)
imwrite(J,'lena256.png','png')
K=imadjust(J);
figure
imshow(K)
% BW1 = edge(I,'sobel');
% BW2 = edge(I,'canny');
% figure
% imshow(BW1)
% figure, imshow(BW2)
增强前的图像

增强后的图像

posted on 2006-04-21 13:23  SHILIN  阅读(321)  评论(0)    收藏  举报