Академический Документы
Профессиональный Документы
Культура Документы
Theory:
Point Processing Techniques are among the simplest of all image enhancement techniques.
1. Negative of an Image:
2. Thresholding:
It displays high values in the specific region of an image and low values to other
regions by ignoring background.
NEGATIVE IMAGE
a = imread("My_photo.jpg");
img=rgb2gray(a);
sz = size(img);
for i = 1: sz(1)
for j = 1:sz(2)
end
end
figure(1);
imshow(img);
figure(2);
imshow(b)
Original Image
Negative Index
THRESHOLDING
image = imread('My_photo.jpg');
image1=rgb2gray(image);
[r,c] = size(image1);
s = image1;
for i=1:r
for j=1:c
if(s(i,j)<100)
s(i,j) = 1;
end
end
end
figure(1),imshow(image1);title('Original image');
figure(2),imshow(s);title('Thresholding image');
without_background = uint8(img);
with_background = uint8(img);
[n,m] = size(without_background);
l = 256;
for i=1:n
for j=1:m
%With out BackGround
without_background(i,j) = l-1;
else
without_background(i,j) = 0;
end
%With BackGround
end
end
end
figure,imshow(img);title('Original Image');
figure;
for i=1:n
for j=1:m
%With BackGround
without_background(i,j) = l-1;
end
end
end
figure;
imshow(with_background); title('Gray Level Slicing With BackGround');
Gray level Slicing without background Gray level Slicing with Background