Universidad Panamericana: Project Title: Recognition of Forms

You might also like

Download as docx, pdf, or txt
Download as docx, pdf, or txt
You are on page 1of 7

Universidad Panamericana

Subject: Image Processing


Professor: Ernesto Moya Albor
Date: December 5th, 2017
Cicle: 1178

Project Title: Recognition of Forms

Team members

ID Name Career

0175851 Ortiz Bibriesca Daniela Michelle LIAD


199375 Pacheco Ibáñez Sofía LIAD

Rubrics
b-design c-economic c-sustain
b-analyze c-health
D E C V DSF UCAS
Universidad Panamericana – Facultad de Ingeniería 8
Procesamiento Digital de Imágenes
Otoño 2017
Universidad Panamericana – Facultad de Ingeniería 9
Procesamiento Digital de Imágenes
Otoño 2017

0175851 | Ortiz Bibriesca, Daniela Michelle | LIAD | 3° Semestre


0199375 | Pacheco Ibáñez, Sofía | LIAD | 3° Semestre

Final Project: Recognition of Forms


Abstract— In this practice the recognition of forms II. METHODOLOGY
programmed in Matlab is used so that from a given image, it is
A. Economic Variability
analysed in order to detect the shapes and figures that could be
found in it.
This program can be taken to a commercial market having
Index of Terms— Recognition of Forms, MatLab, software, different applications especially in the field of security. For
centroid, figures this, several factors must be considered, such as the time
invested in the execution of the program, the optimization of
I. INTRODUCTION the program, the field of application, as well as the cost of the
The recognition of forms or patterns is the science software in which the program will be executed. For the latter
responsible for describing and classifying objects, people, we find two main aspects that will be explained below.
signs, representations, etc. The operation of this is based on a
previously established set of all possible objects (patterns) to Use of proprietary software such as MatLab, Visual Studio,
be recognized. etc.

The scheme of a pattern recognition system consists of According to the research carried out directly in Mathworks,
several stages related to each other, meaning that the results of the license to install the Matlab software and be able to use it
a stage can modify the parameters of previous stages. for business purposes, carrying out and executing projects, has
a cost of approximately 40, 011 Mexican pesos. This license is
able to operate on Windows, Linux and Macintosh.

This cost is quite high; however, if another software is used to


Fig 1 General Scheme of a Pattern Recognition System implement the project as Visual Studio, the cost of the annual
license is approximately 10, 030 Mexican pesos, which in the
The process begins with the sensor, whose purpose is to long term makes this software more expensive than Matlab, so
provide a representation of the elements of the universe so that every time the company wants this software it will have to pay
they can be classified. After this, in the extraction of the license annually; on the contrary, Matlab's license is paid
characteristics, the information is filtered from the only once. According to the above, it can be said that four
representation pattern, with the intention of eliminating those years using Visual Studio is equivalent to the amount of
which are irrelevant for recognition. money invested in the acquisition of Matlab.
Finally, the classifier assigns the unknown patterns, to their The price can be an advantage in terms of the money that must
corresponding category of the different ones established at the be invested in the program; however, this can be
beginning. To be able to do this, a certain number of counterproductive because if the company stops using the
characteristics are analysed in order to classify the input software after a while because it found a better one or a more
signals. The system creates a model of each of the classes updated version, the money invested does not have the same
from a training sequence or set of feature vectors for each of effectiveness. In the case of Visual Studio whose payment is
the classes. annual, the money is not inverted again if that tool is
dispensable.
For the recognition system to be satisfactory, the dimensions
of the feature vectors must be presented a minimum of 10 Use of free or licensed GNU software such as octave, Python,
times in the class analysed, as well as the variabilities such as ANSI C, C ++, C #, etc.
noise, rotations, scale, deformations, etc. must be taken into
account. The analysis of the variabilities turns out to be more Although MatLab is a common software and frequently used
complex, because in the initial bases we must include patterns because it has the necessary tools for graphics, there are other
that have already experienced these modifications. types of software that are capable of performing activities
similar to those performed by Matlab. This type of software
are a solution for small companies because it provides
satisfactory results for some of the programs or processes to
be carried out.
Universidad Panamericana – Facultad de Ingeniería 10
Procesamiento Digital de Imágenes
Otoño 2017

security systems that are used for the checking of packages.


However, some of them do not have a graphical interface, so This type of programs are present mainly in airports,
the project will not work or it will have deficiencies because museums, and train stations, among others.
the changes in the image are not going to be displayed
graphically. This last thing presents a disadvantage in this type Taking into account the prices mentioned above, as well as the
of software, since it is essential to obtain a visual result in this execution of the program and its evaluation, the following was
type of processing. obtained. To

The following table shows a recent price breakdown of the


available products offered by Matlab:

offer this program to an organization with this need, the


money invested in the software used must be paid, as well as
the time and dedication invested on developing the program.

Due to the diverse tests that must be performed to ensure the


effectiveness of the recognition of forms in any situation, it is
estimated that its accomplishment will take between four and
six weeks to be completed and delivered to the client.

With this in mind and the price of the acquisition of


programming software, it is estimated that the cost for its use
will be $ 8,335 Mexican pesos, without counting the
remuneration that corresponds to each of the contracted
programmers. The salary of a programmer ranges between $
491,676 and $ 1,221,844 Mexican pesos depending on the
experience, speed, ingenuity and efficiency to develop
applications in the software provided as well as its updates.

Taking into account that the employees will develop their


work from their homes and occasionally attend the place
required to perform the relevant tests, the total cost of the
project, having a team of five trained people working eight
hours a day with a rest day at the week, it will be
approximately $ 150, 000 Mexican pesos. Being a high price,
it guarantees the ability to improve the program when it is
required, as well as the efficiency and correct solution in case
of a problem.
Table 1 Breakdown of prices and products offered by Matlab
B. Sustainability
This program has the characteristic of being able to be
implemented in a realistic context, an example of this are the
Universidad Panamericana – Facultad de Ingeniería 11
Procesamiento Digital de Imágenes
Otoño 2017

This project has certain keys for its sustainability both in the Evaluates and improves the quality of the software
design and in its execution. These keys are the following: development and maintenance process. [2]
- Implement and improve the characteristics regarding
recognition in order to be able to accomplish the
action easily, efficiently and correctly. III. CONCLUSIONS
- Identify possible measures to reduce the probability Currently the recognition of forms, as previously mentioned,
of error to a minimum. is fundamental for various places in the field of security for
- Facilitate the work of the user that requires this type customers and their comfort.
of program.
Using specifically the example of the airport, which through
To achieve the sustainability of a project like this, it is images of x-rays can detect the silhouette of what is inside
necessary to: packages, measure for which they have this type of programs
- Have the ability to generate ideas for the able to detect perfectly in case of encountering a weapon of
improvement of the project if necessary. fire, a white weapon or with something outside the norm that
- Have the ability to hire the correct people trained to is not allowed to enter the waiting room to later on take the
perform the work, an action that may reduce the flight.
number of people required to perform it.
- To have enough capital in order to be able to make In order to detect a shape with more precision, you need to
the necessary investment to acquire the necessary have a database, with each measurement of each object
tools for the development of the project. necessary for the user to obtain the name of the reflected
C. Licenses and Standards silhouette even though it may vary from one model to another.

If the user wishes to distinguish in more detail the analysed


There are different types of licenses when purchasing a
objects, the code will become more complex since in the
software, these are described below.
initial program a record of each measure and detail should be
1. Semi-free: It offers the content to the consumer free
kept so that it is unique to identify and not confused with
of charge for its use, distribution, copy and even, in
another type of object to analyse. In the case of the airport, if
some cases it is allowed to make modifications.
they do not have a large form recognition program, a weapon
However, they are not considered free software and
may pass into the room or even a toy may be mistaken for a
do not allow you to profit from such material, either a
gun.
copy or modification. [1]
2. Commercial: It is granted all software developed
In order to carry out this project, all the topics seen in class,
with the intention of being commercialized. It could
from how an image is read to segmentation of the images, as
be easily confused with proprietary software because
well as functions to convert to grey scale or even to binarize
of this condition. However, there is commercial
an image, were resumed. In the same way, other types of
software that can be free or proprietary, just as there
functions were needed, such as regionprops, which is a
is software that is not free and is not commercial. [1]
function in Matlab that is used to obtain the properties of a
3. Owner: It is a classification where the author of the
specific shape.
project limits the rights of copy, modification and
redistribution of your project. And in case the end
V. REFERENCES
user wishes to carry out any of these actions, it
requires to pay a certain amount to the author to have [1] Petrou, M. and Petrou C., Image Processing: The
the right to do so. [1] Fundamentals, Wiley, Singapore, 2010
[2] González, R. C., Woods, R.E. Digital Image Processing,
Just as there are international treats for trade, we can find Tercera Edición, Pearson Prentice Hall, New Jersey, 2008
international standards directly related to Software [3] http://www.cyta.com.ar/ta1202/v12n2a3.htm, 5 diciembre
Engineering. A couple of them will be mention on the 2017
following.
VI. APPENDIX
1. ISO/IEC 9001:2000 Standard
Promotes the adoption of processes when a quality clc; close all; clear
management system is developed, implemented and
improved to increase customer satisfaction by meeting %A=imread('Barco.png');
their requirements. [2] %A=imread('Figuras.png');
A=imread('FigurasFondoNegro.png');
figure; imshow(A)
2. ISO/IEC 12207 Standard
A2=rgb2gray(A);
Universidad Panamericana – Facultad de Ingeniería 12
Procesamiento Digital de Imágenes
Otoño 2017

figure; imshow(A2)
imwrite(A2, 'EscalaGrises.png');

%Binarization
BW=im2bw(A2);
[m, n] = size(A);
[i, j] = size(BW);

if((BW(1, 1) == 0) && (BW(i, j) == 0))


figure; imshow(BW)
imwrite(BW, 'Binaria.png');
end

if((BW(1, 1) == 1) && (BW(i, j) == 1)) Fig. 1 Original Image


BW=1-double(BW);
figure; imshow(1-BW)
imwrite(BW, 'Binaria.png');
end

CC=bwconncomp(BW);
BWP=regionprops(CC, 'Perimeter', 'Area',
'Centroid', 'BoundingBox'); %Properties of the
image

figure; imshow(A)
hold on

for k=1:length(BWP)
Recuadro=BWP(k).BoundingBox;
if(BWP(k).Area>10000) Fig. 2 Gray scale image (rgb2gray)
%Recangle coordenates
rectangle('Position', [Recuadro(1),
Recuadro(2), Recuadro(3), Recuadro(4)],
'EdgeColor', 'r', 'LineWidth', 2);
else
rectangle('Position', [Recuadro(1),
Recuadro(2), Recuadro(3), Recuadro(4)],
'EdgeColor', 'b', 'LineWidth', 2);
end

L=BWP(k).Perimeter^2/BWP(k).Area;

if(L>18 && L<27)


text(BWP(k).Centroid(1),
BWP(k).Centroid(2), 'Triángulo', 'Color',
'r'); Fig. 3 Binarized image (im2bw)
elseif (L<14.3)
text(BWP(k).Centroid(1),
BWP(k).Centroid(2), 'Círculo', 'Color', 'g');
elseif(L<18 && L>14.3)
text(BWP(k).Centroid(1),
BWP(k).Centroid(2), 'Rectángulo', 'Color',
'b');
else
text(BWP(k).Centroid(1),
BWP(k).Centroid(2), 'NO DEFINIDO', 'Color',
'r');
end
end

Fig. 4 Recognition of Forms image


Universidad Panamericana – Faculty of Engineering 7
Digital Image Processing
Autumn 2017

You might also like