Nothing Special   »   [go: up one dir, main page]

JETIR2204008

Download as pdf or txt
Download as pdf or txt
You are on page 1of 10

© 2022 JETIR April 2022, Volume 9, Issue 4 www.jetir.

org (ISSN-2349-5162)

LINEAR ALGEBRA IN IMAGE PROCESSING


#1
M.DURGA DEVI M.Sc,MCA,M.Tech(CSE) Assistant Professor, Department of M.Sc Mathematics,
CH.S.D.ST.THERESA’S COLLEGE FOR WOMEN(A), ELURU.
Email: m.devi.mca.06@gmail.com
#2
G.Sai naga sushma, pursuing M.Sc Mathematics, CH.S.D.ST.THERESA’S COLLEGE FOR
WOMEN(A), ELURU.

Email: sushmagottapu370@gmail.com

Abstract:

Linear algebra is a branch of mathematics that is fundamental to computer plates. It studies vectors, direct
changeovers, and matrices. Linear algebra is used in nearly all cipher-ferocious tasks. It can efficiently be
used to break any direct ornon-direct set of equations. Among the most common tools in electrical
engineering and computer wisdom are thickish grids of numbers known as matrices. The numbers in a
matrix can represent data, and they can also represent fine equations. Similar to arrays in programming,
the size of a matrix is defined by the number of rows and columns it has. The basics of matrix computation
and show you how to combine changeovers using matrices. Matrices are used for nearly all computer
plates calculations, including camera manipulation and the projection of your 3D scene onto a 2D viewing
window. When a transformation takes place on a 2D airplane, it's called 2D transformation. Changeovers
play an important part in computer plates to budge the plates on the screen and change their size or
exposure. The generalities of Linear Algebra are vital for understanding the proposition behind Machine
Knowledge, especially for Deep Knowledge. They give you better dubitation for how algorithms really
work under the hood, which enables you to make better opinions. Some of the computer plates operations
that can be easily done by using the direct algebra are Rotation, turning, gauging, Bezier angles,
reflections, fleck and cross products, projections, and vector fields. Other more complex operations like
adulterants bear the combination of direct algebra with other fine tools.

Key words: Linear algebra, Image processing, matrix addition, multiplication, subtraction, rotation.
Introduction:

There are numerous common uses of direct algebra that we encounter in our everyday lives without
noticing, one of which you're using right this alternate. The letters you're reading are being generated by
a series of direct equations that determine the placement of points and lines to form shapes, or in this case
letters. This conception can be plant on nearly any screen that you look at. Be it your phone, computer
examiner, electric billboard, or TV. From simple electronic games, like Atari’s pong in the 1970s, to
ultramodern day 3-D drafting programs, similar as Autodesk’s Fusion 360, the images we see are the result
of computer programs reading and manipulating matrices. As our calculating power as increases, so has
the scale of the matrices. Two dimensional images can be formed with matrices of two rows, likewise,
three dimensional images calculate on three row matrices. The first three aero planes allow us to form

JETIR2204008 Journal of Emerging Technologies and Innovative Research (JETIR) www.jetir.org a47
© 2022 JETIR April 2022, Volume 9, Issue 4 www.jetir.org (ISSN-2349-5162)

shapes with length, range and depth. Fresh aero planes can be used to store information similar as color
palettes that a program will apply to an object or variables that will change, including the shading of an
object to pretend light and murk as it moves or instructions for a program to make an object vanish at
certain times or with certain triggers.

Analogous to arrays in programming, the size of a matrix is defined by the number of rows and columns
it has. Linear algebra is a branch of mathematics that's abecedarian to computer plates. It studies vectors,
direct metamorphoses, and matrices. It isn't essential that you know the fine details that are covered in this
section, since they can be handled internally in OpenGL or by software libraries. Linear algebra is used in
nearly all cipher-ferocious tasks. It can efficiently be used to break any direct or non -direct set of
equations. Among the most common tools in electrical engineering and computer wisdom are bl ockish
grids of figures known as matrices. The figures in a matrix can represent data, and they can also represent
fine equations.

The generalities of Linear Algebra are pivotal for understanding the proposition behind Machine Literacy,
especially for Deep Literacy. They give you better suspicion for how algorithms really work under the
hood, which enables you to make better opinions.
The basics of matrix calculation and show you how to combine metamorphoses using matrices. Matrices
are used for nearly all computer plates computations, including camera manipulation and the protuberance
of your 3D scene onto a 2D viewing window. When a metamorphosis takes place on a 2D aero plane, it's
called 2D metamorphosis. Metamorphoses play an important part in computer plates to budge the plates
on the screen and change their size or exposure.

Some of the computer plates operations that can be fluently done by using the direct algebra are Rotation,
turning, spanning, Bezier angles, reflections, fleck and cross products, protrusions, and vector fields. Other
more complex operations like pollutants bear the combination of direct algebra with other fine tools.

In Computer Graphics, matrices are used to represent numerous different types of data. Games that involve
2D or 3D plates calculate on some matrix operations to display the game terrain and characters in game.
In this paper, the process of Linear Algebra in Computer Graphics is bandied with exemplifications from
different areas of Computer Graphics.
The first operation of Linear Algebra can be seen in the polygonal structure of 3D characters and terrain
in computer games and other operations of 3D plates. Polygons are used to make images appear three
dimensional because of their geometric parcels. Utmost of the time, this is done through dividing the object
into lower and lower polygons where the lowest rendered corridor are triangles. This makes generating 3D
objects a part of the picture process of the polygons. The simplest illustration of use of polygons in 3D
plates are in the form of line frame models of objects. A 3D wireframe is a cadaverous representation of a
real- world object. For illustration, a cell can be represented as an object with eight vertices connected
through lines or cables to make it appear three dimensional.

JETIR2204008 Journal of Emerging Technologies and Innovative Research (JETIR) www.jetir.org a48
© 2022 JETIR April 2022, Volume 9, Issue 4 www.jetir.org (ISSN-2349-5162)

From 2D to 3D:

In order to make the move to three-dimensional space, we need to introduce a few new mathematical concepts.
We need to know how to represent points in 3D space, how to move points between different coordinate frames,
and how to remove the third dimension when projecting points onto the screen.

The Cartesian plane has two perpendicular axes (commonly labeled and ). When we want to speak of things
that are perpendicular, we’ll call them orthogonal. Points are identified by specifying their extent along each
axis. For example, the point is 3 units to the right along the x axis and 5 units up along the y axis, relative to the
origin. The origin is identified as the point having coordinates(0,0). We turn the Cartesian plane into a 3D
coordinate space by adding another orthogonal axis, which we’ll name .

Handedness:

Handedness refers to the orientation of the z-axis in a given 3D space. If the z-axis conforms to the so-called
right-hand rule, x X y=z, then the space is said to be right-handed. Alternatively, if the z-axis points in the other
direction, x X y=-z, the space is left-handed.

JETIR2204008 Journal of Emerging Technologies and Innovative Research (JETIR) www.jetir.org a49
© 2022 JETIR April 2022, Volume 9, Issue 4 www.jetir.org (ISSN-2349-5162)

Example 1

To start with a simple example, a common exercise used in math courses when first learning about
Cartesian coordinates is to map out an image using coordinates on the x and y axes and then connecting the
points with lines. If we wanted to draw a square, 2 units by 2 units, we would produce the image shown below:

Here we have four separate points at different coordinates on a Cartesian plane that, once connected by line
segments, forms a recognizable image. This image can be represented within a linear matrix:

Where each column represents a set of coordinates, with the first row containing the x-coordinate, and the
second row containing the y-coordinate. We can also represent images in three dimensions. If we were to extend
the square into the third dimension to create a cube, our matrix would be as follows:

The object can then be modified through linear transformations. We could shear the top of the cube to make a
new shape or stretch the points on one side to create a rectangle, or shrink a portion of the cube to form a new
shape.

Application of the linear algebra in image processing

Image processing can be defined as the processing of images using fine operations. With the preface of
computers, the processing is performed by means of computer visual algorithms to digital images, which
are attained by a process of digitalization or directly using any digital device.

JETIR2204008 Journal of Emerging Technologies and Innovative Research (JETIR) www.jetir.org a50
© 2022 JETIR April 2022, Volume 9, Issue 4 www.jetir.org (ISSN-2349-5162)

Digital Image processing isn't just limited to retouch or resize images captured by the camera; it's
extensively used currently. Some of the major fields are drug, remote seeing, data transmission and
garbling, robotics, computer vision, pattern recognition, film assiduity, microscope imaging and image
stropping and restoration. Some of the computer plates operations that can be fluently done by using the
direct algebra are Rotation, turning, spanning, Bezier angles, reflections, fleck and cross products,
protrusions, and vector fields. Other more complex operations like pollutants, bear the combination of
direct algebra with other fine tools. How can an image be represented as a matrix?

Let's consider the following image and its black & white variant .

If we zoom in the black & white image, we get:

Notice that the image can be represented as a grid of 16x16 small pieces, which are called pixels (the smallest
graphical element of an image, which can take only one color at a time). If we can assign numbers to each color,
then, the grid of pixels can be represented as a numerical matrix.

If in the previous image, we assign 1 to the white color, and 0 to the black one, then, the image can be represented
as a 16 x 16 matrix, whose elements are the numbers 0 and 1.

JETIR2204008 Journal of Emerging Technologies and Innovative Research (JETIR) www.jetir.org a51
© 2022 JETIR April 2022, Volume 9, Issue 4 www.jetir.org (ISSN-2349-5162)

Using the same procedure, we can also represent grayscale image as matrices, but in this case, there are more
than two numbers. For this purpose, most of the digital files use numbers between 0 (black) and 255(white) as
a representation of the intensity.

Matrix representation of color images depends on the color system used by the program that is processing the
image. For didactic purpose we will use the RGB (the most popular one), where each pixel specifies the amount
of Red (R), Green (G) and Blue (B), and each color can vary from 0 to 255. Thus, in the RGB, a pixel can be
represented as a tri-dimensional vector (r, g, b) where r, g and b are integer numbers from 0 to 255.

Most of the programs store the tri-dimensional vector as a single integer, using the following mapping function:

v = f (r, g, b) = r*65536 + g*256 + b

Notice that 65536 = 2562

The opposite procedure (get the numerical value for every color from the integer value) can be done using the
following formulas:

r = v / 65536

g = (v % 65536) / 256

b = v % 256

JETIR2204008 Journal of Emerging Technologies and Innovative Research (JETIR) www.jetir.org a52
© 2022 JETIR April 2022, Volume 9, Issue 4 www.jetir.org (ISSN-2349-5162)

where % is an operator to get the reminder of the integer division and / is referring to the integer division
operator.Let's see an example. Colour is represented as the vector (131, 197, 29), and as 8635677 when mapping
to a single integer value. Other programs store the vectors as hexadecimal values, concatenating the three values
in hexadecimal notation. This is how colours are stored in web pages. The previous example is represented
as 83C51D in this notation.

Introduction to Transformations:

A geometric metamorphosis is a function that maps a point to another point. The most common
metamorphoses in computer plates are restatement, gyration, and scal ing. In three confines, gyration and
scaling can be represented as an addition of a 3 × 3 matrix by a 3D point. Unfortunately, restatement
cannot be represented in this way, but there's a expression we ’ll see below that nonetheless allows us to
capture all the metamorphoses we wish to perform using matrix addition.

First, we’ll consider the family of transformations known as linear transformations.

A linear transformation ‘T’ must obey these two properties:

In words, the first condition means that spanning the input before the metamorphosis is the same as
spanning the affair after the metamorphosis. The alternate condition means that the metamorphosis of
totalities is equal to the sum of the converted inputs.

Identity

The identity transformation maps every point onto itself. It is a matrix with ones along the diagonal and zeros
everywhere else:

Scale

Another common transformation is scaling. Here is a matrix that will scale points up (or down) along each axis:

Sx, Sy,and Sz are the scale factors along the x, y, and z axes, respectively. You can see that if Sx= Sy= Sz =1the
matrix is the identity matrix.

JETIR2204008 Journal of Emerging Technologies and Innovative Research (JETIR) www.jetir.org a53
© 2022 JETIR April 2022, Volume 9, Issue 4 www.jetir.org (ISSN-2349-5162)

Rotation

Rotation in three dimensions is a complex topic. Fortunately, we don’t need to understand all the intricacies to
use them. First, we consider rotation around the Z axis, then generalize to rotation around any axis.

Rotate Around the Z Axis

Rotation around the Z axis is the simplest to visualize, since points that lie in the X-Y plane stay in the X-Y
plane when rotated around the Z axis. Here is a 3×3 matrix that will rotate points about the Z axis:

It is important to note that  is in radians, and a positive angle results in a counterclockwise rotation.
Matrices that represent rotation around the X or Y axis can also be formulated, and look very similar.

Shear

Shear is a somewhat less commonly used transformation that moves points parallel to an axis. Shearing terms
arise in the off-diagonal elements of matrices.

Affine Geometry

If you work through some examples, it will become obvious that rotation, scaling, and shear are all linear
transformations, but translation is not. The fact that a transformation is linear is what allows us to write it as a
matrix.

Translation

The last transformation we will encounter is a translation, which moves points along a vector in space. One
straightforward way to implement this is with vector addition, where we map from one point to another by
adding a vector. Consider the formula below, where is a point and is the vector, we wish to translate by.

It is impossible to build a 3×3 matrix that can be multiplied with a point to produce the translation above.
However, we can use a handy trick in the fourth dimension to handle all of our transformations in a unified way,
starting with translations.

JETIR2204008 Journal of Emerging Technologies and Innovative Research (JETIR) www.jetir.org a54
© 2022 JETIR April 2022, Volume 9, Issue 4 www.jetir.org (ISSN-2349-5162)

Example 2

If we take a matrix that forms a diamond, such as matrix A shown below, and multiply it to
transformative matrix T, the diamond will be sheared to the right to form a new image.

A 3-D image could even be formed on this plane with the addition of more vectors. Adding the three vectors
shown below and connecting the lines makes a slanted box. This is called a perspective projection and is a
common way of generating 3d images without utilizing a third plane. The advantage of this is that using only
two planes saves computing power that would otherwise be used if we were to include another plane. This may
not seem important, but when you have thousands of processes occurring at once, minimizing the amount of
work that your program does can be beneficial.

JETIR2204008 Journal of Emerging Technologies and Innovative Research (JETIR) www.jetir.org a55
© 2022 JETIR April 2022, Volume 9, Issue 4 www.jetir.org (ISSN-2349-5162)

Conclusion:

Using computer plates, it's illustrating to possible numerous operations of Mathematics. All standard ways
to manipulate images (matrix operations, geometric metamorphoses, edge discovery, etc.) may be
performed by applying fine operations to the matrix associated with each image. A natural link between
Linear Algebra and Digital Image Processing, supported by contemporary technologies and computational
tools can be explored in abecedarian Linear Algebra courses.

References:

[1] Lay, David C., et al. Linear Algebra and Its Applications: Study Guide. Addison-Wesley, 2012.

[2] Linear algebra with mathematics.

[3] 3D math primer for graphics and game development, word worth publishing,. inc 2002 by Dunn and
parberry.

JETIR2204008 Journal of Emerging Technologies and Innovative Research (JETIR) www.jetir.org a56

You might also like