Ipmv Viva Questions
Ipmv Viva Questions
Ipmv Viva Questions
PMF
First we have to calculate the PMF (probability mass function) of all the pixels in this
image. If you donot know how to calculate PMF, please visit our tutorial of PMF
calculation.
CDF
Our next step involves calculation of CDF (cumulative distributive function). Again if
you donot know how to calculate CDF , please visit our tutorial of CDF calculation.
Calculate CDF according to gray levels
Lets for instance consider this , that the CDF calculated in the second step looks
like this.
Then in this step you will multiply the CDF value with (Gray levels (minus) 1) .
Considering we have an 3 bpp image. Then number of levels we have are 8. And 1
subtracts 8 is 7. So we multiply CDF by 7. Here what we got after multiplying.
Now we have is the last step, in which we have to map the new gray level values
into number of pixels.
Lets assume our old gray levels values has these number of pixels.
Now map these new values you are onto histogram, and you are done.
Lets apply this technique to our original image. After applying we got the following
image and its following histogram.
Differential chain code is rotational invariant so; shape number of rotated object is
same as the original object. Shape number of the original object is same as rotated
object.
7. Enhancement and restoration difference
ANS:
8. Code for checker board
ANS:
I came across the matlab built in function checkerboard. And I tried to
implement my own code.
First I declared the size of each square and then the number of rows
and columns. Then I declared two matrixes initialized with zeros and
ones. Using mod 2 I changed the colors or ones and zeros alternatively.
MATLAB CODE:
%Size of the square
sz=45;
%Number of rows
xvalue=8;
%Number of columns
yvalue=8;
%Intialize matrix A with zeros and matrix B with ones
A=zeros([sz sz]);
B=ones([sz sz]);
clear C
m=sz;
n=1;
num=2;
for i=1:xvalue
n1=1;
m1=sz;
for j=1:yvalue
if(mod(num,2)==0)
C(n:m,n1:m1)=A;
num=num+1;
else
C(n:m,n1:m1)=B;
num=num+1;
end
m1=m1+sz;
n1=n1+sz;
end
if(mod(yvalue,2)==0)
num=num+1;
end
n=n+sz;
m=m+sz;
end
imshow(C)
8X8 size:45
8X20 size:15
9. Why central shifting
Why:
his is normally done to accent image details that may be difficult for the
human viewer to observe. Our main goal in this paper is to apply a contrast
enhancement technique to recover an image from blurred images, also
improve image quality of it
11. Histogram plotting for rgb
pl = im.histogram()plt.bar(range(256),
pl[:256], color='r',
alpha=0.5)plt.bar(range(256),
pl[256:2*256], color='g',
alpha=0.4)plt.bar(range(256),
pl[2*256:], color='b',
alpha=0.3)plt.show()
18. Fax question, which method to use to get back the normal image except dilation
19. What is better sobel or perwitt and why.
ANS:
SOBEL IS BETTER
Sobel have slightly superior noise-suppression characteristics, an important issue when
dealing with derivatives.
In geometry, a hyperplane is a subspace whose dimension is one less than that of its ambient
space. If a space is 3-dimensional then its hyperplanes are the 2-dimensional planes, while if the
space is 2-dimensional, its hyperplanes are the 1-dimensional lines.
Histogram Specification
Contrast Stretching
36. Connectivity
ANS:
Connectivity between pixels
It is an important concept in digital image processing.
It is used for establishing boundaries of objects and components of regions in an image.
Two pixels are said to be connected:
● if they are adjacent in some sense(neighbour pixels,4/8/m-adjacency)
● if their gray levels satisfy a specified criterion of similarity(equal intensity level)
There are three types of connectivity on the basis of adjacency. They are:
a) 4-connectivity: Two or more pixels are said to be 4-connected if they are 4-adjacent with
each others.
b) 8-connectivity: Two or more pixels are said to be 8-connected if they are 8-adjacent with
each others.
c) m-connectivity: Two or more pixels are said to be m-connected if they are m-adjacent
with each others.
37. Clipping
ANS:
Clipping is used to enhance features within an image. You provide a threshold level to
determine how the clipping occurs. The values above (or below) the threshold level remain
the same while the other values are set equal to the level.