Вы находитесь на странице: 1из 20

Chapter 1

Chapter 1
Introduction
Road signs are important to ensure smooth traffic flow without bottle necks or
mishaps. Road symbols are the pictorial representations having different necessary
information required to be understood by driver. Road signs in front of thevehicle are
ignored by the drivers and this can lead to catastrophic accidents. The proposed system is a
traffic sign board detection system .An added advantage of the system is that the users can
help by updating the road signs which would be verified and then added into the system.It
is implemented in such a way that it acts as a boon to drivers to make easy decisions.The
objective of this work is to increase the traffic safety by providing a detection system and
improves traffic safety.

Department of Computer Science and Engineering, AJCE 1


Chapter 2

Chapter 2
Literature Survey
2.1 A Smart Driver Alert System for Vehicle Traffic using Image
Detection and Recognition Technique

Road signs are important to ensure smooth traffic flow without bottle necks or
mishaps. Road symbols are the pictorial representations having different necessary
information required to be understood by driver. Road signs in front of the vehicle are
ignored by the drivers and this can lead to catastrophic accidents. This paper presents
an overview of the traffic sign board detection and recognition and implements a
procedure to extract the road sign from a natural complex image, processes it and
alerts the driver using voice command It is implemented in such a way that it acts as a
boon to drivers to make easy decisions.

2.2Android Based Signboard Detection using Image and Voice Alert


System

Very often we see that many road accidents take place. This can be due to
driver’s or rider’s ignorance of traffic signals and road signs. Many people die in
these road accides which is a great loss for the family. Android Based signboard
detection is one such approach where the driver gets information about upcoming
hurdle in advance. Also, whenever it detects a pedestrian movement the vehicle stops
and speed reduces in speed limited zones. This approach can help in avoiding
mishaps to a greater extent. At night it is difficult for driver to keep track of
signboards, answer of these issues and problem is the ‘android based signboard
detection system using image and voice alert system’.

Department of Computer Science and Engineering, AJCE 2


Chapter 3

Chapter 3
System Study
3.1 Existing System
There exists a number of traffic detection systems. Traffic sign detector is an
existing system.This app detects traffic signs and lights using camera and announces
what was detected.

It also keeps the detection history for further review.But the hurdles such as that
of the crashing of electric posts etc cannot be reported using this.And as a result the road
blocks remains unknown which increases the traffic problems.

3.2 Proposed System


Road signs give out a number of messages regarding the road and what you as a
driver should expect on the road. They keep the traffic flowing freely by helping drivers
reach their destinations and letting them know entry, exit and turn points in advance. Pre-
informed drivers will naturally avoid committing mistakes or take abrupt turns causing
bottlenecks. Road signs, indicating turns, directions and landmarks, also help to save
time and fuel by providing information on the route to be taken to reach a particular
destination. Road signs are placed in specific areas to ensure the safety of drivers. These
markers let drivers know how fast to drive. They also tell drivers when and where to turn
or not to turn.

In this system, the road signs are recognized and displayed.An added advantage is
the provision by which the users can update the road signs .Firebase storage is used to
store the images of the road signs captured by the user.The system also helps by
providing an option by which the users can alert about the hurdles on the road such as
any blocks etc.

Department of Computer Science and Engineering, AJCE 3


Chapter 4

Chapter 4
System Analysis and Design
4.1 Feasibility Study
A feasibility study is an evaluation and analysis of the potential of the proposed
project which is based on extensive investigation and research to give full comfort to the
decisions makers. Feasibility study is a test of system proposed according to its
workability, impact on organization, ability to meet user needs and effective use of
resources. Feasibility studies aim to objectively and rationally uncover the strengths and
weaknesses of an existing business or proposed venture, opportunities and threats as
presented by the environment, the resources required to carry through, and ultimately the
prospects for success. In its simplest terms, the two criteria to judge feasibility are cost
required and value to be attained. As such, a well-designed feasibility study should
provide a historical background of the business or project, description of the product or
service, accounting statements, details of the operations and management, marketing
research and policies, financial data, legal requirements and tax obligations. Generally,
feasibility studies precede technical development and project implementation. During the
study the problem definition is crystallized, as aspects of the problems to be included in
the system are determined. Feasibility study can estimate costs and benefits with greater
accuracy stage. A feasibility study evaluates the project's potential for success; therefore,
the perceived objectivity is an important factor in the credibility to be placed on the study
by potential investors and lending institutions. Four important test of feasibility study are
described below.

4.1.1 Legal Feasibility

This determines whether the proposed system with legal requirements, e.g. a data
processing system must comply with the local Data Protection Acts.

4.1.2 Operational Feasibility


Operational feasibility is a measure of how well a proposed system solves the
problems, and takes advantage of the opportunities identified during scope definition

Department of Computer Science and Engineering, AJCE 4


Chapter 4

and how it satisfies the requirements identified in the requirements analysis phase of
system development. The operational feasibility assessment focuses on the degree to
which the proposed development projects fits in with the existing business environment
and objectives with regard to development schedule, delivery date, corporate culture,
and existing business processes.

4.1.3 Economic Feasibility


The purpose of the economic feasibility assessment is to determine the positive
economic benefits to the organization that the proposed system will provide. It includes
quantification and identification of all the benefits expected. This assessment typically
involves a cost/ benefits analysis.

4.1.4 Technical Feasibility


The technical feasibility assessment is focused on gaining an understanding of the
present technical resources of the organization and their applicability to the expected
needs of the proposed system. It is an evaluation of the hardware and software and how it
meets the need of the proposed system.

4.2 System Specification


4.2.1 Software Specification
1. OS : Android

2. Platform : Android Studio and Java

3. Front End : Android

4. Back End : Java

5. Database Server :Firebase

4.2.2 Hardware Specification


A PC (Personal Computer) and an Android device with an active network connection are
required to get access to this application. PC minimum requirements are:

1. CPU : Core 2 duo or higher

Department of Computer Science and Engineering, AJCE 5


Chapter 4

2. Main memory : 4 GB or higher

3. Hard disk : 2 GB or higher

4. VDU : 1280 x 800 minimum screen resolution

5. OS : Microsoft Windows 2, 7 or 10 (32 bit or 64 bit)

4.3 Background Study


4.3.1 Android Studio
Android is a mobile operating system (OS) currently developed by Google, based
on the Linux kernel and designed primarily for touch screen mobile devices such as smart
phones and tablets. Android's user interface is mainly based on direct manipulation, using
touch gestures that loosely correspond to real-world actions, such as swiping, tapping and
pinching, to manipulate on-screen objects, along with a virtual keyboard for text input. In
addition to touch screen devices, Google has further developed Android TV for
televisions, Android Auto for cars and Android Wear for wrist watches, each with a
specialized user interface. Variants of Android are also used on notebooks, game consoles,
digital cameras, and other electronics. Android's source code is released by Google under
open source licenses. Android is popular with technology companies that require a ready-
made, low-cost and customizable operating system for high-tech devices.

Android Studio is the official integrated development environment (IDE) for


Android platform development. It is freely available under the Apache License 2.0. Based
on JetBrains' IntelliJ IDEA software, Android Studio is available for download on
Windows, Mac OS X and Linux.

The features of Android Studio are:

1. Gradle-based build support.

2. Android-specific refactoring and quick fixes.

3. Lint tools to catch performance, , version compatibility and other problems.

4. ProGuard integration and app-signing capabilities.

Department of Computer Science and Engineering, AJCE 6


Chapter 4

5. Template-based wizards to create common Android designs and components.

6. A rich layout editor that allows users to drag-and-drop UI components, option to


preview layouts on multiple screen configurations.

7. Support for building Android Wear apps.

4.3.2 Java
Java is a general-purpose computer-programming language that is concurrent,
class-based, object-oriented, and specifically designed to have as few implementation
dependencies as possible. It is intended to let application developers "write once, run
anywhere" (WORA), meaning that compiled Java code can run on all platforms that
support Java without the need for recompilation. Java applications are typically compiled
to bytecode that can run on any Java virtual machine (JVM) regardless of computer
architecture. As of 2016, Java is one of the most popular programming languages in
use, particularly for client-server web applications, with a reported 9 million
developers. Java was originally developed by James Gosling at Sun Microsystems(which
has since been acquired by Oracle Corporation) and released in 1995 as a core component
of Sun Microsystems' Java platform. The language derives much of
its syntax from C and C++, but it has fewer low-level facilities than either of them.

The latest version is Java 10, released on March 20, 2018, which follows Java
9 after only six months in line with the new release schedule. Java 8 is still supported but
there will be no more security updates for Java 9. Versions earlier than Java 8 are
supported by companies on a commercial basis; e.g. by Oracle back to Java 6 as of
October 2017 (while they still "highly recommend that you uninstall" pre-Java 8 from at
least Windows computers).

4.3.3 Firebase
Firebase is a mobile and web application development platform developed by
Firebase, Inc. in 2011, then acquired by Google in 2014.

Firebase Auth is a service that can authenticate users using only client-side code.
It supports social login providers Facebook, GitHub, Twitter and Google (and Google Play

Department of Computer Science and Engineering, AJCE 7


Chapter 4

Games). Additionally, it includes a user management system whereby developers can


enable user authentication with email and password login stored with Firebase.

Firebase provides a realtime database and backend as a service. The service


provides application developers an API that allows application data to be synchronized
across clients and stored on Firebase's cloud. The company provides client libraries that
enable integration with Android, iOS, JavaScript, Java, Objective-C, swift and
Node.js applications.

The database is also accessible through a REST API and bindings for
several JavaScript frameworks such as AngularJS, React, Ember.js and Backbone.js.
The REST API uses the Server-Sent Events protocol, which is an API for creating HTTP
connections for receiving push notifications from a server. Developers using the realtime
database can secure their data by using the company's server-side-enforced security
rules. Cloud Firestore which is Firebase's next generation of the Realtime Database was
released for beta use.

Firebase Storage provides secure file uploads and downloads for Firebase apps,
regardless of network quality. The developer can use it to store images, audio, video, or
other user-generated content. Firebase Storage is backed by Google Cloud Storage.

4.4 System Design


4.4.1 Development Method
Creating the design is the first step in the development phase for many engineered
product system. It may be defined as the process of applying various techniques and
principles for the purpose of defining a device, a process or a system in sufficient detail to
permit its physical realization. The purpose of design phase is the first step in moving
from the problem domain to the solution domain The design process translates the
requirements of the representation software that can be accessed for quality before coding
begins. Design and specification of the system are in accordance with prescribed rules and
practice of the organization. During system design, the major data structures for the
software are identified; without these, the system modules cannot be meaningfully defined
during design.

Department of Computer Science and Engineering, AJCE 8


Chapter 4

In the design specification, a formal definition of these data structures should be


given. Many design methodology views every software system as having some inputs that
are converted into the desired outputs by the software system. The software is viewed as a
transformation function that transforms the given inputs into the desired outputs; During
design, structured design methodology aims to control and influence the structure of the
final program. During system design only the module specification is obtained, because
the internal details of the modules are defined later.

Hence, a design specification will necessarily contain specification of the major


data structures and modules in the system. After design is approved, the modules will have
to be implemented in the target language. This requires that the module “headers" for the
target language first be first created from the design. This translation of the design for the
target language can introduce errors if it is done manually. To eliminate these translation
errors, if the target language is known, it is better to have a design specification language
whose module specification can be used directly in programming. This not only minimizes
the translation errors that may occur, but also reduces the effort required for translating the
design to programs.

4.5 Modular Design


A module is a logically separable part of a program. Module specification is the
major part of system design specification. All modules in the system should be identified
when the system design is complete and these modules should be specified in the
document. To specify a module, the design document must specify

(a) the interface of the module


(b) the abstract behavior of the module
(c) all other modules used by the module being specified.

Department of Computer Science and Engineering, AJCE 9


Chapter 5

Chapter 5
Implementation

Department of Computer Science and Engineering, AJCE 10


Chapter 6

Chapter 6
Testing and Evaluation
6.1 Testing Criteria and Methods
Testing is the process of executing a program with the intent of finding any errors.
A good test of course has this high probability of finding a yet undiscovered error. A test
is vital to the success of the system. System test makes a logical assumption that if all
parts of the system are correct, then the goal will be successfully achieved. For any
software that is newly developed primarily importance is given to testing of the system. It
is the last opportunity of the developer to detect the possible errors in the software before
handing it over to the customer. Testing is the process by which the developer will
generate a set of test data, which gives the maximum probability of finding all types of
errors that can occur in the software. There are two fundamental properties for a testing
criterion: reliability and validity. A criterion is reliable if all the sets that satisfy the
criterion detect the same error. That is, it is insignificant which of the sets satisfying the
criterion is chosen; every set will detect exactly the same errors. A criterion is valid if for
any error in the program there is some set satisfying the criterion that will reveal the error.
A fundamental theorem of testing is that if a testing criterion is valid and reliable, if a set
satisfying the criterion succeeds, then the program contains no errors.

6.2 Integration Testing

In integration, testing the modules developed will be joined one by one and its
working is verified for errors and correctness. The data passing between modules and web
pages are checked so that information is send to the customer.

6.3 Unit Testing

Unit testing is the first step in the testing process and is usually conducted
by the programmer to ensure that a program operates as defined by the user. The
programmer generally creates their own test cases, inputs the data to the program and
verifies the results. Unit testing is essentially for verification of the code produced during

Department of Computer Science and Engineering, AJCE 11


Chapter 6

verifies the results. Unit testing is essentially for verification of the code produced during
the coding phase, and hence the goal is to test the internal logic of the modules.

6.4 System Testing


System testing is either conducted by the programmer, the programmer’s manager
or by a Quality Control Unit and design documents before it is delivered to the users.

Department of Computer Science and Engineering, AJCE 12


Chapter 7

Chapter 7
Conclusion and Future Work
Roadin has been developed with the main objective of increasing the traffic
safety.The different road signs can be detected using this system.Also an added
advantage is the provison of reporting blocks on the roads by which the users can reroute
their travel direction.This would save time as well as make it easier for the user.

This System can be improved by added features like giving a voice alert,or by
providing an option by which the accidents can be reported to the hospital
authorities.Also machine learning can be used in the server side .

Department of Computer Science and Engineering, AJCE 13


Appendix A

Appendix A
Sample Code
ReportFragment.java

package com.example.roadin;

import android.content.pm.PackageManager;
import android.location.Location;
import android.os.Bundle;

import android.support.annotation.NonNull;
import android.support.annotation.Nullable;
import android.support.v4.app.ActivityCompat;
import android.support.v4.app.Fragment;
import android.support.v4.content.ContextCompat;
import android.util.Log;
import android.view.LayoutInflater;
import android.view.View;
import android.view.ViewGroup;
import android.widget.TextView;

import com.google.android.gms.location.FusedLocationProviderClient;
import com.google.android.gms.location.LocationServices;
import com.google.android.gms.tasks.OnCompleteListener;
import com.google.android.gms.tasks.Task;

import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;
import android.text.TextUtils;

import com.google.firebase.database.DatabaseReference;
import com.google.firebase.database.FirebaseDatabase;

import java.util.HashMap;
import java.util.Map;

import java.util.Locale;

/**
* A simple {@link Fragment} subclass.

Department of Computer Science and Engineering, AJCE 14


Appendix A

*/
public class ReportFragment extends Fragment {

public ReportFragment() {
// Required empty public constructor
}

private static final String TAG = "Report_Frag";

private FusedLocationProviderClient mFusedLocationProviderClient;


private static final int
PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION = 1;
private boolean mLocationPermissionGranted;

// The geographical location where the device is currently located.


That is, the last-known
// location retrieved by the Fused Location Provider.
private Location mLastKnownLocation;

private TextView mLatitudeText;


private TextView mLongitudeText;
private String mLatitudeLabel = "LAT";
private String mLongitudeLabel = "LNG";

Button submit;
EditText desc1,desc2;
FirebaseDatabase mdatabase;
DatabaseReference ref;
//details details;
String pid;
@Override
public View onCreateView(LayoutInflater inflater, ViewGroup container,
Bundle savedInstanceState) {
// Inflate the layout for this fragment
return inflater.inflate(R.layout.fragment_report, container, false);
}

@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle
savedInstanceState) {
super.onViewCreated(view, savedInstanceState);

// Construct a FusedLocationProviderClient.
mFusedLocationProviderClient =
LocationServices.getFusedLocationProviderClient(this.getActivity());

Department of Computer Science and Engineering, AJCE 15


Appendix A

// Prompt the user for permission.


getLocationPermission();
// Get the current location of the device and set the position of the map.
getDeviceLocation();

mLatitudeText = (TextView) view.findViewById


((R.id.latitude_text));
mLongitudeText = (TextView) view.findViewById
((R.id.longitude_text));
submit=(Button) view.findViewById(R.id.button4) ;
desc1=(EditText) view.findViewById(R.id.desc1) ;
desc2=(EditText) view.findViewById(R.id.desc2) ;
mdatabase = FirebaseDatabase.getInstance();
ref = mdatabase.getReference("details");
//details = new details();

submit.setOnClickListener(new OnClickListener() {
public void onClick(View view) {
getValues();
//Intent myIntent = new Intent(MainActivity.this,
// NewActivity.class);
//startActivity(myIntent);
}
});

private void getValues()


{
String d1 = desc1.getText().toString().trim();
String d2 = desc2.getText().toString().trim();
String l1=mLatitudeText.getText().toString().trim();
String l2=mLongitudeText.getText().toString().trim();
//Toast.makeText(getContext(),d1, Toast.LENGTH_SHORT).show();
if (!(TextUtils.isEmpty(d1))||!(TextUtils.isEmpty(d2))) {
mdatabase = FirebaseDatabase.getInstance();
ref = mdatabase.getReference("details");
pid = ref.push().getKey();

Map details = new HashMap();


details.put("lat",l1);
details.put("lon",l2);
details.put("place",d1);
details.put("desc",d2);
ref.child(pid).setValue(details);

Department of Computer Science and Engineering, AJCE 16


Appendix A

Toast.makeText(this.getActivity(), "data uploaded",


Toast.LENGTH_SHORT).show();
/* startActivity(new Intent(MainActivity.this,New_Activity.class)); */
} else {
Toast.makeText(this.getActivity(), "you should enter
data in all fields", Toast.LENGTH_SHORT).show();
}

private void getDeviceLocation() {


/*
* Get the best and most recent location of the device, which may be null in rare
* cases when a location is not available.
*/
try {
if (mLocationPermissionGranted) {
Task<Location> locationResult =
mFusedLocationProviderClient.getLastLocation();
locationResult.addOnCompleteListener(this.getActivity(), new
OnCompleteListener<Location>() {
@Override
public void onComplete(@NonNull Task<Location> task) {
if (task.isSuccessful()) {
mLastKnownLocation = task.getResult();
mLatitudeText.setText(String.format
(Locale.ENGLISH, "%s: %f",
mLatitudeLabel,
mLastKnownLocation.getLatitude()));
mLongitudeText.setText(String.format
(Locale.ENGLISH, "%s: %f",
mLongitudeLabel,
mLastKnownLocation.getLongitude()));
} else {
Log.d(TAG, "Current location is null. Using defaults.");
Log.e(TAG, "Exception: %s", task.getException());
}
}
});
}
} catch (SecurityException e) {
Log.e("Exception: %s", e.getMessage());
}
}
/**

Department of Computer Science and Engineering, AJCE 17


Appendix A

* Prompts the user for permission to use the device location.


*/
private void getLocationPermission() {
/*
* Request location permission, so that we can get the location of the
* device. The result of the permission request is handled by a callback,
* onRequestPermissionsResult.
*/
if (ContextCompat.checkSelfPermission(this.getActivity()
.getApplicationContext(),
android.Manifest.permission.ACCESS_FINE_LOCATION)
== PackageManager.PERMISSION_GRANTED) {
mLocationPermissionGranted = true;
} else {
ActivityCompat.requestPermissions(this.getActivity(),
new String[]{android.Manifest.permission
.ACCESS_FINE_LOCATION},
PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION);
}
}

/**
* Handles the result of the request for location permissions.
*/
@Override
public void onRequestPermissionsResult(int requestCode,
@NonNull String permissions[],
@NonNull int[] grantResults) {
mLocationPermissionGranted = false;
switch (requestCode) {
case PERMISSIONS_REQUEST_ACCESS_FINE_LOCATION: {
// If request is cancelled, the result arrays are empty.
if (grantResults.length >0
&& grantResults[0] == PackageManager.
PERMISSION_GRANTED) {
mLocationPermissionGranted = true;
}
}
}
}

Department of Computer Science and Engineering, AJCE 18


Appendix B

Appendix B
Screenshots

Department of Computer Science and Engineering, AJCE 19


Bibliography

1. “Android Based Signboard Detection using Image and Voice Alert System ”,
Sanchita Bilgaiyan, Sherin James, Sneha. S Bhonsle, Shruti Shahdeo, Keshavamurthy

2. “A Smart Driver Alert System for Vehicle Traffic using Image Detection and
Recognition Technique”, Harini S, Abhiram V, Rajath Hegde

Department of Computer Science and Engineering, AJCE 20

Вам также может понравиться