0% found this document useful (0 votes)
88 views11 pages

Ipmv Mod 5&6 (Theory Questions)

Support vector machines (SVMs) are machine learning algorithms used for classification and regression. An SVM model represents different classes in a hyperplane in multidimensional space to divide datasets into classes and find a maximum marginal hyperplane. Key concepts include support vectors, which are closest to the hyperplane, and the hyperplane and margin. The goal is to divide datasets into classes using a hyperplane with the largest possible margin. Kernels like linear, polynomial, and radial basis function kernels are used to transform input data into a higher dimensional space to make problems more separable. SVMs offer high accuracy but have high training times, so are not suitable for large datasets.

Uploaded by

Ashwin A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
88 views11 pages

Ipmv Mod 5&6 (Theory Questions)

Support vector machines (SVMs) are machine learning algorithms used for classification and regression. An SVM model represents different classes in a hyperplane in multidimensional space to divide datasets into classes and find a maximum marginal hyperplane. Key concepts include support vectors, which are closest to the hyperplane, and the hyperplane and margin. The goal is to divide datasets into classes using a hyperplane with the largest possible margin. Kernels like linear, polynomial, and radial basis function kernels are used to transform input data into a higher dimensional space to make problems more separable. SVMs offer high accuracy but have high training times, so are not suitable for large datasets.

Uploaded by

Ashwin A
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 11

IPMV MOD 5&6 (THEORY QUESTIONS)

Explain SVM in detail?


Introduction to SVM
Support vector machines (SVMs) are powerful yet flexible supervised machine learning
algorithms which are used both for classification and regression. But generally, they are used
in classification problems.
Working of SVM
An SVM model is basically a representation of different classes in a hyperplane in
multidimensional space. The hyperplane will be generated in an iterative manner by SVM so
that the error can be minimized. The goal of SVM is to divide the datasets into classes to find
a maximum marginal hyperplane (MMH).

The followings are important concepts in SVM −


● Support Vectors – Data points that are closest to the hyperplane is called support
vectors. Separating line will be defined with the help of these data points.
● Hyperplane − As we can see in the above diagram, it is a decision plane or space
which is divided between a set of objects having different classes.
● Margin − It may be defined as the gap between two lines on the closet data points of
different classes. It can be calculated as the perpendicular distance from the line to the
support vectors. Large margin is considered as a good margin and small margin is
considered as a bad margin.
The main goal of SVM is to divide the datasets into classes to find a maximum marginal
hyperplane (MMH) and it can be done in the following two steps −
● First, SVM will generate hyperplanes iteratively that segregates the classes in best
way.
● Then, it will choose the hyperplane that separates the classes correctly.

SVM Kernels
In practice, SVM algorithm is implemented with kernel that transforms an input data space
into the required form. SVM uses a technique called the kernel trick in which kernel takes a
low dimensional input space and transforms it into a higher dimensional space. In simple
words, kernel converts non-separable problems into separable problems by adding more
dimensions to it. It makes SVM more powerful, flexible and accurate. The following are some
of the types of kernels used by SVM.
Linear Kernel
It can be used as a dot product between any two observations. The formula of linear kernel is
as below −
K(x,xi) = sum(x*xi)
From the above formula, we can see that the product between two vectors say 𝑥 & 𝑥𝑖 is the
sum of the multiplication of each pair of input values.
Polynomial Kernel
It is more generalized form of linear kernel and distinguish curved or nonlinear input space.
Following is the formula for polynomial kernel −
k(X,Xi) =1+sum(X*Xi)^d
Here d is the degree of polynomial, which we need to specify manually in the learning
algorithm.
Radial Basis Function (RBF) Kernel
RBF kernel, mostly used in SVM classification, maps input space in indefinite dimensional
space. Following formula explains it mathematically −
K(x,xi)=exp(-gamma*sum(x-xi^2))
Here, gamma ranges from 0 to 1. We need to manually specify it in the learning algorithm. A
good default value of gamma is 0.1.
Pros of SVM classifiers
SVM classifiers offers great accuracy and work well with high dimensional space. SVM
classifiers basically use a subset of training points hence in result uses very less memory.
Cons of SVM classifiers
They have high training time hence in practice not suitable for large datasets. Another
disadvantage is that SVM classifiers do not work well with overlapping classes.

Explain geometric boundary representation?


As information objects are digitized, more and more digital images have been generated. There
is an urgent demand for effective tools to facilitate the searching of images. The goal to find a
similar image from large collections or from remotely distributed databases is shared not only
by researchers, educators and professionals, but also by general users. Shape is an important
visual feature and it is one of the basic features used to describe image content. However, shape
representation and description is a difficult task. This is because when a 3-D real world object
is projected onto a 2-D image plane, one dimension of object information is lost. As a result,
the shape extracted from the image only partially represents the projected object. To make the
problem even more complex, shape is often corrupted with noise, defects, arbitrary distortion
and occlusion. Shape representation generally looks for effective and perceptually important
features based on their shape boundary information or boundary plus interior content. Various
features have been designed, including shape signature, signature histogram, shape invariants,
moments, curvature, shape context, shape matrix, spectral features etc. These various shape
features are often evaluated by how accurately they allow one to retrieve similar shapes from
a designated database. Some of these features are explained as follows.
(i) Signatures:
The signature of an object is a simple function representation that can be used to describe and
reconstruct a boundary. A Simple approach is to plot the distance from the centroid to the
boundary as a function of the angle. This is called the polar radii signature of the object.

Point C is the centroid. The phasor r completes 3600, we get a one dimensional representation
of r(Φ) will be constant, equal to the radius of the circle. The signature can thus be defined as
1-diemnsional representation of a boundary.

Consider another boundary in the shape of a square. In the case r(Φ) will be given by the
formula r(Φ)=x sec θ

(ii) Fourier Descriptors:


A common method of describing the contour of an object is by using 1-Dimesnional Fourier
Transform.

The figure shows a N-point digital boundary in the spatial Domain. Each of these edges
pixels can be defined by its x and y coordinates. Starting at an arbitrary point
(x0,y0),(x1,y1),(x2,y2)……..(xn-1,yn-1) points are encountered as we move in the counter
clockwise direction. Each of these points can be expressed as xr and yr for r=0,1……N-1.
These coordinates values can be used to generate a complex function of the form,
f(n)= x(n)+j y(n) for n=0,1,2,……..,N-1
Hence the x-axis is treated as real axis and y-axis as the imaginary axis. The Fourier
transform of this function f(n) yields the frequency components that describe the given edge.
The discrete Fourier transform (DFT) of f(n) is
F(u)=1/N∑N−1n=0f(n)e−j2πun/N for u=0,1,2,………...,N−1
F(u)=1/N∑n=0N−1f(n)e−j2πun/N for u=0,1,2,………...,N−1

The advantage of using this equation is that it reduces the edge description problem from 2-
Diemsnsional to 1-Dimension.
Substituting the value of f(n) we have,
F(u)=1/N∑N−1n=0[x(n)+jy(n)]e−j2πun/N for u=0,1,2,…..,N−1
F(u)=1/N∑n=0N−1[x(n)+jy(n)]e−j2πun/N for u=0,1,2,…..,N−1

The coefficients of F(u) are called Fourier descriptors. The inverse discrete fourier transform
(IDFT) of F(u) gives back f(n).
F(n)=∑N−1n=0F(u)e+j2πun/N for n=0,1,2,3……N−1
F(n)=∑n=0N−1F(u)e+j2πun/N for n=0,1,2,3……N−1

However instead of using all the F(u) coefficients, we only use few of them while remaining
terms are made zero,
f(n)=∑N−1n=0F(u)e+j2πun/N for n=0,1,2,3……N−1
f(n)=∑n=0N−1F(u)e+j2πun/N for n=0,1,2,3……N−1

Although only M terms are used for F(u), f(n) still has 0 to N-1 values. That is the same
number of points exist in the new approximated boundary but not as many terms are used in
the reconstruction of each point.

Explain statistical texture description methods?


Texture classification is an important research area in digital image processing. The main aim
of texture analysis is to improve the tonal information of an image, since texture is a major
property of an image that represents important information about the structural arrangement of
features in an image. Texture is measured statistically using a moving window throughout the
image. Statistical operators including skewness, kurtosis, variances, standard deviation,
maximum and mean, Euclidean distances are used for texture analysis. The statistical method
measures the coarseness and directionality of texture in terms of averages on a window of the
image. For achieving better classification accuracy, it is inevitable to study the main features
of the statistical method that includes contrast, entropy, homogeneity, auto correlation function,
power spectrum, different gray level statistics and cooccurrence matrices. Texture analysis
plays an important role in many image analysis applications.
Classification :-
Texture classification is a key field in many computer vision applications ranging from quality
control to remote sensing.
Texture classification refers to the process of grouping test samples of texture into classes
where each resulting class contains similar samples according to some similarity criterion.
1. Supervised Classification:
The goal of classification in general is to select the most appropriate category for an
unknown object. The Supervised Classification is based on some discrimination
function using several image features. First the data samples are collected and properly
normalized from all classes. Supervised classification procedures are the essential
analytical tools used for the extraction of quantitative information. A supervised
classification needs existing reference data to establish user-selected training sets.
2. Unsupervised Classification:
The second major approach to image classification is the unsupervised clustering of
image data, where no a priori information is required. A large number of clustering
algorithms are available in the literature. Cluster analysis is viewed as a process of
partitioning an image into groups such that patterns belonging to the same group are
similar to each other than the patterns belonging to different groups.
Applications:-
Texture analysis methods have been utilized in a variety of application domains. The role that
texture plays varies depending upon the application. Some of the texture analysis applications
are described here.
1. Inspection
2. Medical Image Analysis
3. Document Processing
4. Remote Sensing

1) Explain Canny edge detection algorithm with proper steps?


The purpose of edge detection in general is to significantly reduce the amount of data in an
image, while preserving the structural properties to be used for further image processing.
1. Detection: The probability of detecting real edge points should be maximized while
the probability of falsely detecting non-edge points should be minimized. This
corresponds to maximizing the signal-to-noise ratio.
2. Localization: The detected edges should be as close as possible to the real edges.
3. Number of responses: One real edge should not result in more than one detected
edge.
The algorithm runs in 5 separate steps:
1. Smoothing: It is inevitable that all images taken from a camera will contain some
amount of noise. To prevent that noise is mistaken for edges, noise must be
reduced. Therefore the image is first smoothed by applying a Gaussian filter. The
kernel of a Gaussian filter with a standard deviation of σ = 1.4.
2. Finding Gradients: The Canny algorithm basically finds edges where the
grayscale intensity of the image changes the most. These areas are found by
determining gradients of the image. Gradients at each pixel in the smoothed image
are determined by applying what is known as the Sobel-operator. First step is to
approximate the gradient in the x- and y-direction respectively.
3. Non-maximum Suppression: The purpose of this step is to convert the “blurred”
edges in the image of the gradient magnitudes to “sharp” edges. Basically this is
done by preserving all local maxima in the gradient image, and deleting
everything else. The algorithm is for each pixel in the gradient image:
1. Round the gradient direction θ to nearest 45degree, corresponding to the use
of an 8-connected neighbourhood.
2. Compare the edge strength of the current pixel with the edge strength of the
pixel in the positive and negative gradient direction, i.e. if the gradient
direction is north (theta = 90degree), compare with the pixels to the north and
south.
3. If the edge strength of the current pixel is largest; preserve the value of the
edge strength. If not, suppress (i.e. remove) the value.
4. Double Thresholding: The edge-pixels remaining after the non-maximum
suppression step are (still) marked with their strength pixel-by-pixel. Many of
these will probably be true edges in the image, but some may be caused by noise
or color variations for instance due to rough surfaces. The simplest way to discern
between these would be to use a threshold, so that only edges stronger that a
certain value would be preserved. The Canny edge detection algorithm uses
double thresholding. Edge pixels stronger than the high threshold are marked as
strong; edge pixels weaker than the low threshold are suppressed and edge pixels
between the two thresholds are marked as weak.
5. Edge-Tracking by Hysteresis: Strong edges are interpreted as “certain edges”,
and can immediately be included in the final edge image. Weak edges are
included if and only if they are connected to strong edges. The 5 logic is of course
that noise and other small variations are unlikely to result in a strong edge (with
proper adjustment of the threshold levels). Thus strong edges will (almost) only be
due to true edges in the original image. The weak edges can either be due to true
edges or noise/color variations. The latter type will probably be distributed
independently of edges on the entire image, and thus only a small amount will be
located adjacent to strong edges. Weak edges due to true edges are much more
likely to be connected directly to strong edges. Edge tracking can be implemented
by BLOB-analysis (Binary Large Object). The edge pixels are divided into
connected BLOB’s using 8-connected neighbourhood. BLOB’s containing at least
one strong edge pixel are then preserved, while other BLOB’s are suppressed.

Explain Homomorphic filtering in detail?


Homomorphic filtering is a generalized technique for signal and image processing, involving
a nonlinear mapping to a different domain in which linear filter techniques are applied,
followed by mapping back to the original domain.
Homomorphic filtering is sometimes used for image enhancement. It simultaneously
normalizes the brightness across an image and increases contrast. Here homomorphic filtering
is used to remove multiplicative noise. Illumination and reflectance are not separable, but their
approximate locations in the frequency domain may be located. Since illumination and
reflectance combine multiplicatively, the components are made additive by taking
the logarithm of the image intensity, so that these multiplicative components of the image can
be separated linearly in the frequency domain. Illumination variations can be thought of as a
multiplicative noise, and can be reduced by filtering in the log domain. To make the
illumination of an image more even, the high-frequency components are increased and low-
frequency components are decreased, because the high-frequency components are assumed to
represent mostly the reflectance in the scene (the amount of light reflected off the object in the
scene), whereas the low-frequency components are assumed to represent mostly the
illumination in the scene. That is, high-pass filtering is used to suppress low frequencies and
amplify high frequencies, in the log-intensity domain.
Operation
An image is a 2-D function. A grey level image is given as f(x,y) where f is the grey level and
x and y are the spatial coordinates. Images that are formed due to the fact that there is some
amount of light falling on the object and some amount of light reflecting from the object. Light
falling on the object is called illumination and light reflecting is called reflectance.
Since images that fall in the electromagnetic spectrum,
$0 \lt f(x, y) \lt ∞$
Based on this fact, the simple model for an image is given by
F(n1,n2) =i(n1,n2) x r(n1,n2) ………………….(1)
This model is known as illumination-reflectance model. This model can be used to address the
problem of improving the quality of an image that has been acquired under poor illumination
conditions. In the equation f(n1,n2) represents the image, i(n1,n2) represents illumination
component and r(n1,n2) represents the reflectance component. For many images, the
illumination is the primary contributor to the dynamic range and varies slowly in space, while
the reflectance component r(n1,n2) represents the details of the object and varies rapidly in
space. If the illumination and the reflectance component are taken separately, then the
logarithmic of the input function f(n1,n2) is taken. Because f(n1,n2) is the product of i(n1,n2)
with r(n1,n2), the log of f(n1,n2) separates the components as:
Ln[f(n1,n2)] =ln[i(n1,n2)] +ln[r(n1,n2)] …………………(2)
Taking Fourier transform on both sides,
F(k,l) =FI(k,l) +FR(k,l) …………………..(3)
Where FI(k,l) and FR(k,l) are the fourier transform of the illumination and reflectance
components respectively. Then the desired filter function H(k,l) can be applied separately to
the illumination and the reflectance component separately as:
F(k,l) x h(k,l) = FI(k,l) x H(k,l) + Fr(k,l) x H(k,l) …………………(4)
In order to visualize the image, inverse Fourier transform followed by exponential function is
applied. First the inverse Fourier transform is applied as:
F’(n1,n2) = F-1[F(k,l) x H(k,l)] =F-1[F1(k,l) x H(k,l)] +F-1[FR(k,l) x H(k,l)]…….(5)
The desired enhanced image is obtained by taking the exponential operation:
g(n1,n2)= eƒ’(n1,n2) ……………….(6)
Here g(n1,n2) represents the enhanced version of the original image ƒ(n1,n2). The sequence of
operation can be represented by the block diagram as:

Explain Noise Model in detail?


Noise is an unwanted signal or information which destroys image quality and causes
degradation in image quality. A digital image is corrupted by noise during image acquisition
or during image transmission. An image is affected by variety of reason such as
environmental condition during image acquisition or quality of sensing element themselves.
There are different types of noise in image which can destroy image quality.
Periodic noise:
This noise is generated from electronics interference, especially in power signal during image
acquisition. In a video stream the periodic noise is typically caused by the presence of electrical
or electromechanical interference during video acquisition or transmission. This type of noise
is most efficiently reduced with frequency domain filtering, which isolates the frequency
occupied by the noise and supress them using band-reject filter.
Structural noise:
Structural noise may be periodic, stationary or nonstationary, aperiodic, detector striping and
detector banding in nature. The periodic Structural noise commonly causes due to interface
between electronic components. The structural noise having periodic, stationary in nature have
fixed amplitude, frequency and phase.
White noise:
In signal processing, white noise is a random signal with a constant power spectral density.
The white noise is so named because it’s analogous to white light. In particular each sample
has a normal distribution with zero mean, then the signal is said to be Gaussian white noise.
Brownian noise:
Brown noise has a spectral density that is inversely proportional to its square of frequency. In
the other words its power significantly decreases as its frequency increases. As a result brown
noise has a lot more energy at low frequency as compare to its higher frequency.

Explain B-Spline algorithm in detail?


In the mathematical subfield of numerical analysis, a B-spline is a spline function that has
minimal support with respect to a given degree, smoothness, and domain partition. Any spline
function of given degree can be expressed as a linear combination of B-splines of that degree.
B-splines can be used for curve-fitting and numerical differentiation of experimental data. In
computer-aided design and computer graphics, spline functions are constructed as linear
combinations of B-splines with a set of control points. B-splines of order n are basis functions
for spline functions of the same order defined over the same knots, meaning that all possible
spline functions can be built from a linear combination of B-splines, and there is only one
unique combination for each spline function. B-spline function is a combination of flexible
bands that passes through the number of points that are called control points and creates smooth
curves. These functions enable the creation and management of complex shapes and surfaces
using a number of points. B-spline function and Bezier functions are applied extensively in
shape optimization methods.

A B-spline is a generalization of the Bezier curve. Let a vector known as the knot vector be
defined
T={t0,t1,……,tm} (1)

where T is a non decreasing sequence with ti belongs to [0,1] , and define control points P0, ...,
Pn. Define the degree as
P=m-n-1 (2)

The "knots" tp+1, ..., tm-p-1 are called internal knots.

Define the basis functions as

(3)

(4)

where j=1, 2, ..., p. Then the curve defined by

Specific types include the non-periodic B-spline (first p+1 knots equal 0 and last p+1equal to
1; illustrated above) and uniform B-spline internal knots are equally spaced). A B-spline with
no internal knots is a Bezier curve.

APPLICATION
Fitting a smooth surface on irregular data is a problem in many applications of data analysis.
Spline polynomials in different orders have been used for interpolation and approximation in
one or two-dimensional space in many researches. These polynomials can be made by different
degrees and they have continuous derivative at the boundaries. The advantage of using B-spline
basis functions for obtaining spline polynomials is that they impose the continuity constraints
in an implicit form and, more importantly, their calculation is much simpler.

You might also like