img = imread('ImageProcessing_1/BerkeleyTower.png');
img = imread('ImageProcessing_1/BerkeleyTower.png');
gray = rgb2gray(img);
imhist(gray);
bogotobogo.com site search:
Начало формы
imadjust()
imadjust() adjust image intensity values. It maps the values in intensity image of an input to new values in output image. This increases the contrast of the output image.
img = imread('ImageProcessing_1/Rachmaninoff.jpg');
gray = rgb2gray(img);
adj_img = imadjust(gray, [0.3,0.7],[]);
subplot(121);
imshow(gray);
title('input');
subplot(122);
imshow(adj_img);
title('adjusted');
Input file : Rachmaninoff.jpg.
im2bw()
im2bw() converts the grayscale image to a binary image. We'll use the adjusted image.
img = imread('ImageProcessing_1/Rachmaninoff.jpg');
gray = rgb2gray(img);
adj_img = imadjust(gray, [0.3,0.7],[]);
bw_img = im2bw(adj_img);
subplot(121);
imshow(adj_img);
title('input image');
subplot(122);
imshow(bw_img);
title('binary image');
|