Professional Documents
Culture Documents
معالجة صور-جلسة3
معالجة صور-جلسة3
معالجة صور-جلسة3
:imhist
grayscale indexed
*+ ", :() . ! " # $ %&
.. *+ %/ 0 1. %& 2
% # $ %6 *+ * * ( ) , n .1 3" imhist . %&
.* + * 1 $6 #) && 7
. : 2 3& 1 ; < 100 * 8 9 * )
, = 6
I = imread('rice.png');
imshow(I)
#) ,
figure, imhist(I)
:
>, 0? & * @& * 0 A$ ( # / B : 1% C
(/ ) CA && D) 9 & * @& E *0 (< +1 F C ) < +1
.# ;
.& &+ * + 1 #) %6% # / B G& , 1 /
:*
I=imread('pout.tif');
subplot(1,2,1);
imshow(I)
subplot(1,2,2);
imhist(I,64)
* 1 %/ . & ? *+ & $A + %/ . + )
. & % / [0-255] * +
: *+ : H) B
:* + && : %6 1 .1
imadjust . %6 *+ && B" %6 1 •
:*
I=imread('pout.tif');
J=imadjust(I); % $%&' ()%* +,- $%&' .*/0 1 '23
subplot(1,2,1);
imshow(J)
subplot(1,2,2);
imhist(J,64)
. * truecolor ) ; 1 •
:*
RGB1 = imread('football.jpg');
RGB2 = imadjust(RGB1,[.2 .3 0; .6 .7 1],[]);
subplot(1,2,1);
imshow(RGB1),
subplot(1,2,2);
imshow(RGB2)
:*
[x,map]=imread('forest.tif');
I=ind2gray(x,map);
J=imadjust(I,[],[],0.5);
subplot(1,2,1);
imshow(I)
subplot(1,2,2);
imshow(J)
: 3 %& %6 1 .2
:*
I = imread('tire.tif');
J = histeq(I);
subplot(2,2,1);
imshow(I)
subplot(2,2,2);
imshow(J)
subplot(2,2,3);
imhist(I,64)
subplot(2,2,4);
imhist(J,64)
@A 3 %& %6 1 .3
:*
I=imread('pout.tif');
J=adapthisteq (I);
subplot(1,2,1);
imshow(J)
subplot(1,2,2);
imhist(J,64)
! "# $
H ,< +1 C K K 6 : 6 < +1 & % C
, // # 8$ ! * %/ + .A1 = N + < +1
: =0, C > & $ > , < +1 * & 3&9 7 & B
< +1 & %C # O P 1 % Q > # # ", •
.% C 1 + K0 < +1
CCD 8 * # $ 2 O * +& + 0 # # ", •
.< +1 7
.< +1 7 # $ ! */ •
: < +1 ?: H) B
filter2 : D0 %& < +1 , .1
average , Gaussian # 0 < +1 $ O D0 " % /
K = filter2(fspecial('average',3),J)/255;
figure, imshow(K)
L = medfilt2(J,[3 3]);
figure, imshow(L)
K = wiener2(J,[5 5]);
figure, imshow(K)