1-Auto Certificate
1-Auto Certificate
1-Auto Certificate
CHAPTER-1
INTRODUCTION & EXISTING SYSTEM
LITERATURE REVIEW:
ECE 1
Sri Indu Institute of Engineering & Technology
Mark-sheet embed the digital form in mark sheet using encrypted QR code, so
that any unauthorized user cannot retrieve any information.
ECE 3
Sri Indu Institute of Engineering & Technology
The system being automated and generalized, the system ensures to reduce
errors by reducing manual efforts. An added asset to the feature of system is that it
aims at improving and easing out the work of the existing system in very sophisticated
way.
The technology is rapid and able to generate, store & display the mark-sheets
of the students. The system provides advance reaction capabilities and automatic
operator of the internal calculation based on university rules with the information
from the database. It also works with various standards of the mark-sheets.
ECE 4
Sri Indu Institute of Engineering & Technology
1.5 ALGORITHM:
This is how our system will work. Steps for the implementation of system are
as follow:
Step 1: If admin is operating the system, login id and password. If student is
operating the system, they can access the system by providing the registration id.
Step 2: Check if provided login id and password or registration id is correct, if
not go back to step 1 and if correct proceed for the step 3.
Step 3: If admin is operating the system, he can access the system by updating
the database, changing the data in the database and can get the required information
from the database. If students are operating the system, the can only view the data.
Step 4: Then system will generate the gadget sheet of all the students and it
calculates the grade and grade point of each and every student as per the Credit based
grading system (CBGS).
Step 5: Then this system will generate the mark sheet by fetching the grades,
pointers and credits from the gadget sheet previously developed.
Step 6: Then this information of students’ marks are available to access to
students by providing authentication. Admin will get requested mark sheet in PDF
mark sheet for printing purpose. And only marks can be accessible to student.
Steps 7: These mark sheets then can be made printable by converting it into
portable document format.
ECE 5
Sri Indu Institute of Engineering & Technology
ECE 7
Sri Indu Institute of Engineering & Technology
CHAPTER-2
SOFTWARE TOOL-MATLAB
2.1 First look over the topic:
Every single day world is evolving very fast. Rapid development of the computer
technology has affected all the scientific areas. Medicine, automation, data analysis,
finances, biology, chemistry, economics and many, many more have benefited from the
technology expansion. People got interested in the possibilities of information technology
and they have noticed that computer can help them with daily tasks. This need has
motivated software programmers to create new systems, that would incorporate the ease
of use with the effectiveness of work. Those big changes have influenced also computer
related fields, including computer graphics as well as an image processing. Soon all
artists were about to experience a huge step towards the simplification of working with
graphics. The Internet was flooded with new applications used to process pictures. Some
of them are free and some others are commercial.
In the same time programmers were working on designing a system, that
would perform operations on vectors and matrixes in a simple, interactive way. Not
long time after creating MATLAB it became very popular, especially among teaching
facilities. Many libraries has been developed, among them Image Processing Toolbox.
In comparison to other image processing program it doesn’t score many points. First
of all, it is not free. Secondly, it does not provide an easy learnable environment –
some programming skills are needed. On the other hand it gives multiple
opportunities of illustrating mathematical equations. ’Normal’ applications lose with
MATLAB in the area of an image recognition and filters adaptation. No program
works better with using for example morphological transformation than MATLAB. It
also gives a lot of possibilities for creating linear and nonlinear filters. High level
programming language that hides unnecessary details from designers can definitely be
considered as an asset too. In order to decide if MATLAB is the right tool to
implement a software with, the future programmer has to take a closer look on the
main purpose of the application.
2.2 Main objectives of the study:
There are few goals resultant from this thesis. Main purpose is to learn new
ECE 8
Sri Indu Institute of Engineering & Technology
ECE 9
Sri Indu Institute of Engineering & Technology
MATLAB
There are many ways to support the learning process. Finding information
ECE 1
Sri Indu Institute of Engineering & Technology
might be a hard task if is it not well structured. The most helpful tools are written
materials.
ECE 1
Sri Indu Institute of Engineering & Technology
Stu-dies of previously mentioned topics are based on few books concerning image
processing and MATLAB. Some of the information may be withdrawn from
Cracow’s University of Technology lectures. Other valuable pieces of data might be
found on the Internet. The website of MATLAB producer Math works is also a wide
source of the toolboxes, as well as their functions and parameters.
After a broad study of all the topics of interest, the project of an application
will be created. In order to achieve that, a sketch draft will be drawn in the beginning.
Then the main window will be built, along with all the elements of the Graphical User
Inter- face. This process will be supported with MATLAB GUIDE tool, described
later. The next step of application production is designing the menu bar. Before
programming the actual code, it is very important to define possible constraints and
errors. Specification of these problems in the early stage of the project management
may have crucial influence on the program structure. Whole process of creating the
application will be followed by few tests along with results and comments. Finally, I
will present conclusions and point out the areas of the future development.
ECE 1
Sri Indu Institute of Engineering & Technology
CHAPTER-3
COMPUTER GRAPHICS
ECE 1
Sri Indu Institute of Engineering & Technology
Raster graphic images lose the quality while zooming in and it becomes
ECE 1
Sri Indu Institute of Engineering & Technology
“pixelated”. Secondly, saving images as a raster graphic gives the user bigger variety
of file for-mats. Vector graphics images do not provide many exterior file formats for
saving them separately from the vector graphic processing programs. Other
dissimilarity refers to transforming one type of graphics into another. Vector graphics
can be easily saved as bitmaps, which requires giving the resolution. On the other
hand changing raster graphics into vector image is a very difficult process.
3.2 Color systems:
Thinking about computer graphics, more features should be taken under the
investigation. In order to understand their meaning, color systems (or often called
color models) need to be presented. Color system used in computer graphics is usually
described as a three color system. It means that each color on the image is depicted
with three numerical values. Those values describe the color used in the picture.
Because of those three important numbers, all color systems have been divided into
two groups: additive and subtractive. For each one different algorithm is applied.
Additive color systems are based on adding three primary colors – red, green
and blue to black and mixing them towards getting new colors. More colors are
mixed, more close to white new result is. This color system is mostly used in
computer
There are three well known, common color systems: RGB, CMYK and HSV.
First one, additive system RGB stands for red (R), green (G) and blue (B). It is widely
used for any image file formats. Graphics that is using RGB model represents each
pixel as a three numerical values in brackets. First value is the amount of red, second
stands for green and the third one is blue. Those values are used to create color
presented on the screen. All values can’t outreach 255 and can’t be lower than 0. For
example trip-let (0,0,0) stands for black when (255,255,255) goes as white color.
Every other mix of values stands for different color. For better understanding how
colors are changing, Figure 1 presents the cube of RGB color. Axe X stands for red, Y
for green and Z for blue. With moving along all axes different colors can be created.
ECE 1
Sri Indu Institute of Engineering & Technology
ECE 1
Sri Indu Institute of Engineering & Technology
Basic knowledge about image properties and colormaps is important for image
processing. Colormap is a set of limited colors used in displaying image. There are
few different colormaps such as bitmap, grayscale, index color, high color and true
color. This chapter describes each one of them briefly.
Bitmap can be defined in many various ways. Usual meaning of bitmap is map
of bits. Considering image processing, bitmap gives the user possibility to store one bit
per pixel. Information included in that bit defines if the pixel has color (bit = 1) or
doesn’t have a color (bit = 0). White color is often used as option of “having the color”
Grayscale is a colormap that usually stores information about the image in
eight bits per pixel. Like mentioned before, with eight bits it is possible to create scale
of 256 shades of gray. Sometimes grayscale is described as carrying only one pixel
which stores information about brightness of black. Result is a scale of different tones
of gray. All range of gray may be represented as RGB triple value. All three numbers
have to be equal, for example (123,123,123) or (3,3,3).
Another useful colormap is called indexed colormap. Each pixel of image
stores in-formation about index to the place in colors array, for example set by the
user. The biggest palette can contain 256 colors. Indexed color is very useful. It saves
computer’s memory and disk space. Smaller color palettes can be used to represent
icons and pictures with small range of colors. Indexed colormap also supports setting
transparent color. Picking transparent pixels is very helpful when it comes to images
with irregular shapes. Thanks to that feature object on image can be put on a
background without necessity of deleting rectangular shape.
More advanced colormap is called true color. Information about the image is
stored in 24 bits, which equals 3 bytes. Each color from RGB model gets 8 bits for
storage of information about shade and channel of color. True color system uses at
least 256 tones of each color (red, green and blue), which gives huge range of usable
colors
- 16.777.216 possible variations. This system is often used in high quality
photographs and complex images Ozimek, lectures from Digital image processing.
There are plenty of colormaps but one more worth describing is called high
ECE 1
Sri Indu Institute of Engineering & Technology
color. It offers very wide range of colors, bigger than in true color system. The
ECE 1
Sri Indu Institute of Engineering & Technology
description of point on the image contains 16 bits of information. This amount allows
to code from 0 to 65535 different values for one RGB color, which gives
65535*65535*65535 color variations. The precision in high color system is twice
much better than in true color. Mostly because that high color is used while
photographing more prevalent colors, for example skin tones or skies Ozimek lectures
from Digital image processing.
In true color and high color system images, picture can be separated into three
RGB channels. Each color channel might be useful while processing computer
graphics. Having the knowledge about color maps and color systems is very
important.
ECE 1
Sri Indu Institute of Engineering & Technology
ECE 2
Sri Indu Institute of Engineering & Technology
known format. What is interesting, it can save raster graphics as well as vector
images. It contains information needed for printing and very often small-sized
preview of the image. EPS format files usually take bigger disk space than other
graphic files formats. Most often users save vector graphics in their “natural
environment” in order to keep ability of processing them later.
ECE 2
Sri Indu Institute of Engineering & Technology
CHAPTER-4
MATLAB ENVIRONMENT
The name MATLAB comes from two words: matrix and laboratory.
According to The MathWorks (producer of MATLAB), MATLAB is a technical
computing language used mostly for high-performance numeric calculations and
visualization. It integrates computing, programming, signal processing and graphics in
easy to use environment, in which problems and solutions can be expressed with
mathematical notation. Basic data element is an array, which allows for computing
difficult mathematical formulas, which can be found mostly in linear algebra. But
MATLAB is not only about math problems. It can be widely used to analyze data,
modeling, simulation and statistics. Mat-lab high-level programming language finds
implementation in other fields of science like biology, chemistry, economics,
medicine and many more.
In the following paragraph which is fully based on the Marth Works ‘Getting
started with MATLAB I introduce the main features of the MATLAB
Most important feature of MATLAB is easy extensibility. This environment
allows creating new applications and becoming contributing author. It has evolved
over many years and became a tool for research, development and analysis.
MATLAB also features set of specific libraries, called toolboxes. They are collecting
ready to use functions, used to solve particular areas of problems. MATLAB System
consist five main parts. First, Desktop Tools and Development Environment are set of
tools helpful while working with functions and files. Examples of this part can be
command window, the workspace, notepad editor and very extensive help
mechanism. Second part is The MATLAB Mathematical Function Library. This is a
wide collection of elementary functions like sum, multiplication, sine, cosine, tangent,
etc. Besides simple operations, more complex arithmetic can be calculated, including
matrix inverses, Fourier trans- formations and approximation functions. Third part is
the MATLAB language, which is high-level array language with functions, data
structures and object-oriented programming features. It allows programming small
ECE 2
Sri Indu Institute of Engineering & Technology
ECE 2
Sri Indu Institute of Engineering & Technology
complex programs. Fourth piece of MATLAB System is its graphics. It has wide tools
for displaying graphs and functions. It contains two and three-dimensional
visualization, image processing.
ECE 2
Sri Indu Institute of Engineering & Technology
described.
ECE 2
Sri Indu Institute of Engineering & Technology
medicine, music and all kinds of calculations. Next couple of paragraphs will shortly
present some toolboxes available in MATLAB. The descriptions are based on the
theory from Mrozek (2001, 387 – 395) about toolboxes and Math work com Very
important group of toolboxes are handling with digital signal processing.
Communication Toolbox provides mechanisms for modeling, simulation,
designing and analysis of functions for the physical layer of communication systems.
This tool-box includes algorithms that help with coding channels, modulation,
demodulation and multiplexing of digital signals. Communication toolbox also
contains graphical user interface and plot function for better understanding the signal
processing. Similarly, Signal Processing Toolbox, deals with signals. Possibilities of
this MATLAB library are speech and audio processing, wireless and wired
communications and analog filter designing.
Another group is math and optimization toolboxes. Two most common are
Optimization and Symbolic Math toolboxes. The first one handles large-scale
optimization problems. It contains functions responsible for performing nonlinear
equations and methods for solving quadratic and linear problems. More used library is
the second one. Symbolic Math toolbox contains hundreds of functions ready to use
when it comes to differentiation, integration, simplification, transforms and solving of
equations. It helps with all algebra and calculus calculations.
Small group of MATLAB toolbox handles statistics and data analysis.
Statistics toolbox features are data management and organization, statistical drawing,
probability computing and visualization.
ECE 2
Sri Indu Institute of Engineering & Technology
CHAPTER-5
IMAGE PROCESSING TOOLBOX
ECE 2
Sri Indu Institute of Engineering & Technology
HSV stands for hue-saturation-value colourmap. It starts from red and goes
through yellow, green, cyan, blue, magenta and comes back to red. It is very often
used to display periodic functions in MATLAB.
There are three more functions connected with changing colormap of image.
Im2bw produces black white picture from grayscale, indexed or RGB file. There is
couple of possible ways of defying parameters. To convert grayscale to binary
graphics it is enough to put in the brackets name of file as a parameter. Optionally,
there is a place after the comma for level of threshold that will be used while
conversion. Default value is 0.5 which stands for average density of threshold.
This constant must range be-tween zero and one. If the input picture is RGB,
im2bw converts it first to gray shades and then to black white. When dealing with
indexed image, user can also put color-map of it in the brackets, just after name of the
file. Similar operation existing in the toolbox is rgb2gray. It converts RGB image to
grayscale by eliminating the hue and saturation from it. Two of standard MATLAB
library function can be also considered as image processing operation.
Rgb2hsv and hsv2rgb are responsible for changing colormap from RGB to
HSV and vice-versa. Each map is a matrix with some number of rows and three
columns. In the RGB image those columns represent intensity of red, blue and green
color and respectively in HSV image, hue, saturation and color value.
ECE 2
Sri Indu Institute of Engineering & Technology
Spatial transformation functions are separate group that is responsible for all
changes concerning size, rotating and cropping an image. A simple and effective
command it takes two arguments in the round brackets – the name of the picture and
after the comma, a value that stands for multiplier. If this number is between zero and
one, then the result image is smaller. Respectively, if this constant is greater than one,
therefore the output picture is bigger than the original.
There is an independent function responsible for cropping operation cuts the
image to the selected rectangle. A user defines the area with mouse and as a result,
cropped image is displayed in a new figure, if not specified differently. Holding key-
board button Shift down instead of rectangle, picked area will be a square. MATLAB
Image Processing Toolbox offers wide range of functions, designed to deal with
spatial transformations but the most important ones are described above.
MATLAB main library offers two additional functions, which are worth
mentioning. flips the image along vertical axis. The same way, flips picture along
horizontal axis. The only disadvantage is, that both commands are defined to work
with two-dimensional matrixes.
5.3 Open, Save, Display functions:
result, user needs to put second variable that will stand for the map, just after the
comma in square brackets.
A very useful function exists in Image Processing Toolbox. show is
responsible for displaying an image. It works with black and white, grayscale and
color pictures. Simply, matrix that includes a graphic file or just a filename can be
treated as a parameter for this procedure. Alternatively, the image can be displayed
with its colormap. Map should be given after the comma in the brackets, along the
filename. The shown picture has to be in the current directory or specified by the path
to the file.
5.4 Other functions:
Last paragraph of this chapter will describe miscellaneous functions from
Image Processing Toolbox and MATLAB main library. Often used to displays
various information about the image. Among all the data fields, returned by this
procedure there are nine of them that are the same with every file format. Those are:
Filename – contains name of the image;
File Mod Date – last date of modification;
File Size – an integer indicating the size of the file, in bytes;
Format – graphic file extension format;
Format Version – number or string describing the file format version;
ECE 3
Sri Indu Institute of Engineering & Technology
After the first time saving, GUIDE stores the interface in two files- .fig file,
where the description of whole graphic part is placed and .m file, where the code that
controls the actions can be found. Each object properties are kept in the .fig file and
can be set directly from GUIDE tool, thanks to ready-built Property Inspector. All
actions, usually called ‘callbacks’ can be modified and changed in the .m file. Every
single component has ‘Tag’ property, which is used while creating the name of the
callback reference.
To get access to each attribute, Matlab offers command set. It requires
reference to the object that is about to be changed and the name of the property,
followed by its value. Among other characteristics, there is an action trigger - callback
operation. It is important to know, that any element can have its own specific
implementation of this function. Besides operations responsible for actions of objects,
there are two additional functions implemented in .m file:
Opening function – executes tasks before the interface becomes visible to the
user; Output function if need, it returns variables to the command line there is much
more behind mechanisms and techniques of programming GUI but this topic will be
explained closely in the next chapter.
ECE 3
Sri Indu Institute of Engineering & Technology
Most of GUIDE controls have common properties, responsible for the same
characteristics of a component. In addition every object has several supplementary
features. Each attribute can be queried with command get and changed by command
set, as mentioned before.
First group of attributes is responsible for control of visual style and
appearance. ‘Back ground color’ defines color of the rectangle of the control.
Similarly, ‘Fore- ground color’ sets tinge of the string that figures on the button.
Important field ‘CData’ allows to put a true color image on the button instead of the
text. Parameter ‘String’ places given word on the button. Line ‘Visible’ can take
either on or off value, the object can be visible or not. Even not seen, it still exists
ECE 3
Sri Indu Institute of Engineering & Technology
ECE 3
Sri Indu Institute of Engineering & Technology
ECE 3
Sri Indu Institute of Engineering & Technology
time control
ECE 3
Sri Indu Institute of Engineering & Technology
object is destroyed.
This characteristic is definitely an asset, because a programmer can set some
actions just before a component will be removed from the application. A more
complex field, called ‘Interruptible’, contains information concerning actions
triggered by the user, during executing of one of callback functions. This property can
take on or off value. In the first case, MATLAB will allow second operation to
interrupt first one. Accordingly, if off is the selected option, the main callback will not
be interfered.
There are properties important only for particular controls. Next four
paragraphs will briefly describe some of the components and their additional features.
ECE 3
Sri Indu Institute of Engineering & Technology
5.6.3 Axes:
ECE 3
Sri Indu Institute of Engineering & Technology
Every decent application should have the menu bar. An average computer user
is ac-customed to possibility of getting most things done with the help of the menu.
That is why MATLAB enables programmers to create two kinds of menus:
Menu bar objects – drop-down menus whose titles are situated on the top of the
figure Context menu objects – pop-down menus that appear after a user right – click
one of the component after entering GUIDE Menu Editor it is possible to create a
hierarchical menu, with- out any limitations of items amount. This tool helps
programmers on many levels process of making menu becomes intuitive and simple.
It enables setting of menu properties with Property Inspector, for every menu and
submenu element
There are several properties that can be set just after new menu is generated.
‘Label’ defines the name of the item that will be dis played to the user. ‘Tag’ value
determines the name, needed to identify the callback function. ‘Separator above this
item’ is responsible for a slim line between logically divided menu elements. Another
attribute ‘Check mark this item’ displays a check next to the menu item and indicates
ECE 4
Sri Indu Institute of Engineering & Technology
the current state of this item. To ensure that users can select any option property Enable
this item’ has to be marked. (Marchand Holland, 2003, 432-440).
Menu Editor is presented in Figure 10, below.
The ‘Accelerator’ field defines the keyboard equivalent that a user can press to
activate particular menu object. Presence of the shortcuts is valuable addition to the
GUI. Thanks to them the time and effort of action is reduced. Sequence Ctrl +
Accelerator selects the menu item. Only items that do not have a submenu can be
connected with some shortcut. ‘Callback’ is previously explained reference to the
function that performs an action. Whenever a menu item has a submenu, all elements
from there are called ‘children’ of the mentioned item. Parameter ‘Children’ lists all
submenu elements in a column vector. If there is no ‘children’, the field becomes an
empty matrix Another feature decides if an option is available to the user. If it is not
then ‘Enable value is set to off. In that case, the name of the menu item is dimmed and
indicates that it is not possible to select it. For nicer visual effect, a programmer can
ECE 4
Sri Indu Institute of Engineering & Technology
change the font color of the menu labels with ‘Fore ground Color’ attribute .When it
comes to the context menu, only one option is responsible for it. ‘Con-text Menu’ as a
default, takes ‘none’ parameter.
ECE 4
Sri Indu Institute of Engineering & Technology
CHAPTER-6
DESIGN AND IMPLEMENTATION OF AN IMAGE
PROCESSING APPLICATION
ECE 4
Sri Indu Institute of Engineering & Technology
Brightness of the image can be regulated with next element that is placed on
ECE 4
Sri Indu Institute of Engineering & Technology
the right side of the axes. Buttons ‘+’ and ‘-‘will allow quick and convenient
method of
ECE 4
Sri Indu Institute of Engineering & Technology
changing luminosity of the picture. Static Textbox positioned above will tell the user
what is the purpose of the buttons. Second static textbox was designed to show the
user information, which he/she would like to withdraw from the image. At the end of
designing GUI one button was created: restoring function. It will be responsible for
loading the original picture to the axes in case the user did not like the effect of
transformations. In all components the font was changed to the Arial type, size of 12
and dark blue color. The outlook of the application window after the first step of
designing process is presented in Figure.
ECE 4
Sri Indu Institute of Engineering &
ECE 3
Sri Indu Institute of Engineering &
After creating the graphical user interface it is time to connect it with Matlab
functions. There are two ways of doing it: the first one demands from a programmer
in
.m file, where he has to create all the components. What is more, properties for each
element must be set using only text. This is not the fastest method.
Thankfully,GUIDE mechanism comes in handy here. It is enough to drag and drop
the objects into the workspace and set their parameters with Property Inspector,
mentioned earlier. With this option the application will need an additional .fig file that
contains the interface. The technique used in this thesis mixes both – visual creation
of the GUI along with programming inside the .m file.
Every application needs to be very carefully thought through. The programmer
has to remember about user mistakes as well as unexpected and unusual order of
actions. Next paragraph will present how the problem of limits and constraints was
handled.
Just after opening the application, the buffer of the image is empty therefore
no operations can be performed. First adjustment was to disable menu options until
the picture is loaded. Of course options of opening, closing and getting help stay
active. During the opening of the image, the type of the input file is checked.
Respectively, some of the functions get activated only for grayscale pictures. Next
thing is the message box that shows up to inform the user about the type of the image
and available processing options. Figures 17 and 18 present both adjustments.
ECE 3
Sri Indu Institute of Engineering &
Next i will describe how the functions explained above are actually
implemented. In the couple of next paragraphs i will point out the most important
parts of the code. Full listing can be found in Appendix Starting with the procedure of
opening the file there are couple of methods used in order to prevent errors. Firstly,
the image is loaded into the two variables, one for using and one for restoring. Thanks
to the command handles followed with a ‘dot’, variable becomes global. Function file
allows selecting the file from the computer.
Instruction prevents from receiving an error when the user decides to cancel
opening. Command connects the name of the file with its path. This brings the
possibility of using read to load the picture. Later on show presents the image and all
the changes in GUI are updated with data command. Below are selected fragments of
the code.
[filename, pathname]=uigetfile(
{'*.jpg';'*.gif';'*.png';'*.bmp';'*.tif';'*.eps'},
'Select file');
if filename ==0
ECE 3
Sri Indu Institute of Engineering &
return;
end
handles.var=strcat(pathname,filename);
handles.plik=imread(handles.var)
; handles.oryginal =
imread(handles.var);
axes(handles.axes);
imshow(handles.plik);
if isgray(handles.plik) == 1
set(handles.histogram,'Enable','On');
guidata(hObject, handles);
Another function from the menu bar is saving the file. As discussed
previously, it can happen with or without the compression. Statement input file along
with in write are a fairly good mechanism of writing files. Compression allows to
decrease the size of an image which is presented in the chosen piece of code below.
[FileName,PathName]=uiputfile({'*.jpg';'*.tif';'*.png';'*
.gif'},'Save image');
imwrite(handles.plik,[PathName FileName],'Quality',50);
ECE 3
Sri Indu Institute of Engineering &
i = imfinfo(fullfile(handles.pathname,
ECE 4
Sri Indu Institute of Engineering &
handles.filename)); A1 = i.Filename;
A = strvcat('File Name: ',A1);
C1 = num2str(i.FileSize);
C2 = strcat(C1,'Bajts');
C = strvcat('File Size: ',C2);
I = strvcat(A,C,D,E,F,G,H);
set(handles.text3,'String',I);
handles.plik = imrotate(handles.plik,-
90,'bilinear','loose'); handles.plik =
fliplr(handles.plik); handles.plik =
imcrop(handles.plik);
Very important part of the application are filters. Blurring can be acquired
with three different methods, described in the previous section. Each filter is based on
connecting two powerful commands – special and filter. Adding noise takes a
parameter such as ‘salt pepper’, while removing noise is done with a median filter.
Some of the functions changes state of others, meaning their activation mode. There
would not be much sense in trying to change grayscale picture into a grayscale, for
example. Additionally, histogram equalization option was created in menu Also a
procedure that corrects contrast. Examples of code are illustrated below.
H = fspecial('gaussian');
handles.plik = imfilter(handles.plik,H);
H = fspecial('unsharp',0.05);
handles.plik = imfilter(handles.plik,H,'same');
handles.plik = imnoise(handles.plik, 'salt &
pepper',0.02); handles.plik =
medfilt2(handles.plik);
handles.plik = histeq(handles.plik);
handles.plik = imadjust(handles.plik);
ECE 4
Sri Indu Institute of Engineering &
Different type of functions, used in the application are those converting color
to grayscale and grayscale to bitmap. Since after transforming image to the black and
white it is not possible to regain the color data, most of the options are switched off.
handles.plik = rgb2gray(handles.plik);
set(handles.skala_szarosci,'Enable','Off');
handles.plik = im2bw(handles.plik);
set(handles.kontrast,'Enable','Off'
);
set(handles.skala_szarosci,'Enable'
,'Off');
After creating the first prototype of the program, an extra starting window was
de-signed. It allows selecting a language from English and Polish. To achieve
expected results openfig and close commands were used. Parameter for close is gcf,
which stands for handle to the current figure.
close(gcf);
openfig(english);
When the user decided that he wants to end image processing, he can close the
pro-gram from ‘File’ menu or with a shortcut ctrl+q.
ECE 4
Sri Indu Institute of Engineering &
CHAPTER-7
The Automatic Certificate Generation project overview is shown in Fig. 1. File name
of the blank certificate (A) is used as input in the code. Details to be written on the
certificate are obtained from an Excel sheet (B). The data is written over the blank
certificate and many such certificates are generated by the MATLAB code (C). The
certificates generated by the program can be saved in a folder with a unique file name.
7.1 Description:
The three major steps involved in this project are shown in Fig. 2. Base image
can be in any colour and should be in tif, jpg or png format. The image generated by
the program retains properties of the base image. Source code given here only inserts
text on the image. Data to be written can be in either xls or xlsx format. MS Excel is
preferred as it’s a powerful mathematical and statistical tool. It allows data to be
internally computed and analysed within the file.
ECE 4
Sri Indu Institute of Engineering &
The generated MATLAB figures or images can be saved into separate files or
a single file as per requirement. By default, the code saves the generated image in
format with a unique name. With simple code modifications, images can also be
ported to a PDF file.
Figure shows folder contents of the MATLAB working directory. Main Code,
Certificate Blank tittle and Registration_Details.xls files should be saved in the same
folder.
ECE 4
Sri Indu Institute of Engineering &
Main Code is the MATLAB M-file containing the main code, Certificate
Blank is the base image, and Certificate Topic from 1 through 6 are certificates
generated from the data in Registration_Details.xls. While running M-file, MATLAB
should be permitted to change directory to the location where the main folder is saved.
ECE 4
Sri Indu Institute of Engineering &
CHAPTER-8
8.1 CONCLUSION:
We have generated the gadget sheet calculating the grades, credits, grade
points of each courses and Grade Performance Index of whole semester considering
all the courses. Also determined the calculations for evaluation of marks for special
cases (ordinances for grace marks in case of failure as per the university rules).
The system automated and generalized the system ensures to reduce manual error by
reducing manual efforts. An added asset to the feature of the system is that aims at
improving and easing out the work of existing system in very sophisticated way.
ECE 4