Week 2
Week 2
Digital Image: A digital image is an image that has been digitized, which
means it has been changed into a sequence of numbers that computers
can understand.
Digital Image Mathematics
Spatial Coordinates:
▶ (x, y) for 2D images
▶ (x, y, z) for 3D images
▶ (x, y, t) for 2D videos
▶ (x, y, z, t) for 3D videos
Sometimes we abuse the notation pixel to refer the coordinates, and some-
times it refers to the value at the coordinates.
How do we define the coordinate set for a picture. Where to start and
where to end?
Digital Image Representation
Digital Image Representation
Digital Image Representation
Digital Image Representation
Digital Image Types (based on pixel value set)
clc
for i =1:256
for j=1:256
A(i,j)=j-1;
end
end
image(A);
colormap(gray(256))
axis(’image’)
Example 2
clear;
for i =1:256
for j=1:256
r = sqrt((i − 128)2 + (j − 128)2 );
if(r<80)
A(i,j)=255;
else
A(i,j)=0;
end
end
end
image(A);
colormap(gray(256))
axis(’image’)