Format For First Page: Group No. Roll No. Name As Per The Attendance List Small Photo
Format For First Page: Group No. Roll No. Name As Per The Attendance List Small Photo
Format For First Page: Group No. Roll No. Name As Per The Attendance List Small Photo
Group No. 50
Small Photo
GROUP No: 50 ROLL No: 1704108
Theory:
Unlike an analog frequency, a digitally generated frequency does not have infinite resolution.
A digital frequency can only take on discrete values. A digital sine wave, for example, can only
take on discrete values for frequency, phase, and amplitude. The frequency resolution of a
digitally generated sinusoid is limited by the period of the digital sample clock T = 1/f , and
S
the precision of the sinusoidal waveform amplitude is limited by the bit width of each digital
sample. The normalized values of these limits are respectively 0.5 and 1.0 cycles/sample.
Reasons for aliasing and how to handle aliasing?
In signal processing and related disciplines, aliasing is an effect that causes different signals to
become indistinguishable (or aliases of one another) when sampled. It also often refers to
the distortion or artifact that results when a signal reconstructed from samples is different
from the original continuous signal.
Aliasing can occur in signals sampled in time, for instance digital audio, and is referred to as
temporal aliasing. It can also occur in spatially sampled signals (e.g. moiré patterns in digital
images); this type of aliasing is called spatial aliasing.
An anti-aliasing filter (AAF) is a filter used before a signal sampler to restrict the bandwidth of
a signal to approximately or completely satisfy the Nyquist–Shannon sampling theorem over
the band of interest. Since the theorem states that unambiguous reconstruction of the signal
from its samples is possible when the power of frequencies above the Nyquist frequency is
zero, a real anti-aliasing filter trades off between bandwidth and aliasing. A realizable anti-
aliasing filter will typically either permit some aliasing to occur or else attenuate some in-
band frequencies close to the Nyquist limit. For this reason, many practical systems sample
higher than would be theoretically required by a perfect AAF in order to ensure that all
frequencies of interest can be reconstructed, a practice called oversampling.
Example:
Consider the analog signal ,
determine sampling and reconstruction signals.
T = 1 / 500
Reconstructed Signal
SAMPLING AND RECON
t=[0:0.1:2];
x2=sin(4*t);
T=pi/2;
n = t/T;
x3=sin(4*n*T);
figure(1);
plot(t,x2);
figure(2);
stem(n,x3);
GROUP NO: 50 ROLL NO: 1704108
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
GROUP NO: 50 ROLL NO: 1704108
EXPERIMENT 7: Implement contrast stretching, dynamic range compression
and bit plane slicing
Theory:
1. Contrast Stretching:
Contrast Stretching is used to increase the dynamic range of grey levels in an image.
It is required due to poor contrast. Poor Contrast normally occurs due to poor or
non-uniform illumination, non-linear dynamic range in an image sensor, wrong
setting of lens aperture. This technique simply increases the contrast of an image by
making dark regions darker and bright regions brighter
The linear normalization of a grayscale digital image is performed according to the
formula,
Dynamic range in photography describes the ratio between the maximum and
minimum measurable light intensities (white and black, respectively). In the real
world, one never encounters true white or black — only varying degrees of light
source intensity and subject reflectivity. Therefore the concept of dynamic range
becomes more complicated, and depends on whether you are describing a capture
device (such as a camera or scanner), a display device (such as a print or computer
display), or the subject itself.
One aim of HDR is to present a similar range of luminance to that experienced
through the human visual system. The human eye, through non-linear response,
adaptation of the iris, and other methods, adjusts constantly to a broad range of
luminance present in the environment. The brain continuously interprets this
information so that a viewer can see in a wide range of light conditions.
A bit plane of a digital discrete signal such as an image or sound, is a set of bits
corresponding to a given bit position in each of the binary numbers representing the
signal. For example, for 16-bit data representation there are 16 bit planes; the first
bit plane contains the set of the most significant bit, and the 16th contains the least
significant bit.
It is possible to see that the first bit plane gives the roughest but the most critical
approximation of values of a medium, and the higher the numbe r of the bit plane,
the less is its contribution to the final stage. Thus, adding a bit plane gives a better
approximation.
Digital steganography makes use of bit planes and the phenomena that too-
complicated visual patterns can not be perceived as “shape-informative”. It replaces
complex areas on the bit-planes of the vessel image with other complex data
patterns.
Bit Plane Slicing
img = imread('20200801_182446.jpg');
img = rgb2gray(img);
dimg = double(img);
s= 1;
z = mod(dimg,2);
z = 0;
for i=1:8
subplot(2,4,i);
s = s+1;
z = z+bit_plane*(2^(i-1));
end
figure;imshow(img);title('Original Image');
gray_img = rgb2gray(img);
MP = 255;
a = min(gray_img(:));
b = max(gray_img(:));
R = b-a;
scale = R/MP;
p = (gray_img - a) .* scale;
p = round(p);
h1 = hist(uint8(gray_img));
figure;plot(h1)
h2 = hist(uint8(p));
figure;plot(h2)
img2 = rgb2gray(img);
img=double(img2);
figure(1),imshow(img),title('Orginal Image');
x = 150/255;
y = 200/255;
[n,m] = size(img);
for i=1:n
for j=1:m
img(i,j)=img(i,j)/255;
end
end
for i=1:n
for j=1:m
img(i,j) = img(i,j)-(30/255);
end
end
end
for i=1:n
for j=1:m
img(i,j)=img(i,j)*255;
end
end
img=floor(img)
img=uint8(img)
figure(2),imshow(img),title('After Enhancement');
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner
Scanned with CamScanner