Different Modules For Car Parking System

You might also like

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

Different Modules for Car Parking

System Demonstrated Using Hough


Transform for Smart City Development

Janak D. Trivedi, M. Sarada Devi and Dhara H. Dave

Abstract Searching for the parking space is a time-consuming task while visiting
for shopping or unknown cities. Real-time parking management gets benefited for
the development of the smart city and also reduces time for finding the parking
place. In this chapter, different two types of modules for car parking are simulated
using a combination of Hough transform, edge detection, and color enhancement
method. Different car parking modules are circular shape-based: (i) parallel parking
with a different radius and (ii) angle parking with the same radius. Real-time video
is captured using an android smartphone with an IP camera. The proposed research
work can enhance the solution for real-time parking solution in big malls and theater.
Limitation and future scope of this will give motivation toward research work on an
intelligent transportation system (ITS) development in India. For small-scale version
here, we have used toy cars and bus with a different color for parking modules.

1 Introduction

Due to increase in population of the world numbers of vehicles on the roads are
increasing day by day. One of the major challenges in the cities is to manage the
parking of vehicles. Reports suggest that as much as 30% of traffic flow delays and
restrictions are due to drivers in search of parking. Smart parking is a vehicle parking

J. D. Trivedi (B) · D. H. Dave


Electronics and Communication Department, GEC Bhavnagar,
Gujarat Technological University, Gujarat, India
e-mail: Trivedi_janak2611@yahoo.com
D. H. Dave
e-mail: dave.dhara24888@gmail.com
M. Sarada Devi
Electronics and Communication Department, AIT Ahmedabad,
Gujarat Technological University, Gujarat, India
e-mail: saradadevim1@gmail.com

© Springer Nature Singapore Pte Ltd. 2020 109


A. N. R. Reddy et al. (eds.), Intelligent Manufacturing and Energy Sustainability,
Smart Innovation, Systems and Technologies 169,
https://doi.org/10.1007/978-981-15-1616-0_11
110 J.D. Trivedi et al.

system that helps drivers find a vacant spot by using real-time data which can be used
to direct drivers to available parking spaces.
Lack of sufficient space available for parking gives a headache to vehicle owners,
where to park their own cars in minimum time? In the past few years, the Indian
central government also has been trying to develop cities to become smart cities
as an urban development program. Intelligent transportation system (ITS) plays an
important role in smart cities development. In real-time traffic management, ITS
covers accident monitoring and helping them immediately, parking space availability,
minimum traffic congestions, automatic traffic light signals management, automatic
number plate recognition, and many more things.
In this chapter, automatic parking management is discussed with different park-
ing modules like circles with the same radius and circle with a different radius. In
these, all parking modules’ feature selection plays an important role. Section 2 dis-
cusses the technology gap between theoretical and practical implementation of the
smart parking. Next, Sect. 3 explains about various different methods or techniques
available earlier for real-time parking management. Section 4 is focused on Hough
transform for the circle and straight-line detection. Section 5 gives a basic idea of
IP webcam smartphone applications, and is related to the proposed methods with a
flowchart. Simulation results for all the different modules are explained in Sect. 6,
and the last section gives future scope with the limitation of this work.
We would like to draw your attention to the fact that it is not possible to modify
a paper in any way, once it has been published. This applies to both the printed
book and the online version of the publication. Every detail, including the order of
the names of the authors, should be checked before the paper is sent to the volume
editors.

2 Technology Gap

Currently, the manual parking system available in the Indian city, so there is no direct
information available, for all the users. The man who manages parking only knows
where to park a vehicle for maximum time duration and effective parking within
the parking area. If I had to fix my parking slot in advance or I want to know the
actual parking system with EMPTY and BLOCK parking spot identification, I can
save both my time and fuel. This way I can save energy and also reduce noise and
traffic consumption and definitely my money. I can decide my parking by seeing all
the information available for a parking spot in my smartphone before I will go for
the parking place, and with the help of parking fees, I have assured my parking spot
also. The use of available land space to the parking with the help of a smartphone and
real-time traffic management possibility here is presented in this chapter with earlier
method descriptions. The novel proposed method is discussed using flowchart and
its credibility verified using simulation results.
Different Modules for Car Parking System Demonstrated … 111

3 Background

In past, [1] gives a mathematical model for parking space detection near the zoo
area in terms of supply and demands of the available parking spaces. For every
parking space, the demand for parking space for the specific time period is measured,
and according to that, effective collection of parking fees is done. Parking fees is
in accordance with the final destinations and parked vehicle distance. Maximum
likelihood method [2] was explained for various choices of parking places with
different parameters like parking charges, the walking time, the required time for
parking, etc. Bus parking facility in [3] was discussed. Computer-based assignment
and mathematical modeling system is developed for bus parking to prevent blockage
and reduce time for arriving and departure of buses. In this method, probability of
assigning a correct label for each bus with dynamic control buses is an important
thing to be validated. Monday to Friday was a different situation compared to public
holidays and Sundays. Minimum parking effect in [4] concludes deregulating the
quantity and increasing the quality of parking will improve transportation and land
use. Parking fees was based on the number of registered vehicle per year, effective
land prize and different situation during parking. Parking fees collection should be
with a different strategy like higher parking fees with near to destination location and
lower parking fees for far to destination location. Parking fees handled by private
firms in Taiwan was explained in [5], with the proper understanding between private
and government firm with the different stages of selections. In this proposed agenda,
the government is a leader and a private firm is a support system to the government.
This is the best balance system for any government system like in India where our
Honorable Prime Minister is trying to develop smart cities for a better future.
Real-time parking information was discussed in [6] based on a genetic algorithm.
Finding a proper parking place for a driver to reduce search in time, less pollution,
and noise. Bayesian network-based parking was discussed in [7] with three main
parameters—parking period, parking location, and parking duration with information
available from China. Global climate change and smart city development force to
think about intelligent transpiration system with automatic parking management.
On-street parking fees compare to off-street parking, and traffic congestion issues,
illegal parking, how it can be solved using proper parking management! explained
in the same. This paper gives parking management for China, the country which has
more or less same population as India. In [8] many parking facilities in Beijing are
investigated and chosen six indexes, including nature of the parking lot, bus traffic,
subway traffic, location, number of parking spaces and distribution of the parking
lot. Through those, area of surrounding parking facility was classified based on land
use functionality. On-street parking model [9] was discussed for truck delivery in
the urban area and also included Toronto City for parking location as a case study.
Revenue generation and its management [10] were explained in the parking field.
Parking request is managed using multiple-garage intelligent model. Parking, Safety
and design characteristics-based level of service for street parking is discussed in
112 J.D. Trivedi et al.

[11] for Kolkata. Blob analysis-based perpendicular and forward parking detection
using image processing is explained in [12].
We proposed real-time parking management for small modules using Hough trans-
forms which aim to locate and find real-time parking slot detection and identification.
Research work based on finding a location of parking using circle Hough transform
and proper thresholding operation are elaborated in this chapter.

4 Hough Transform

Hough transform (HT) is a very good transformation technique for detecting an object
using different shapes. Image segmentation is the first step in digital image processing
for segmentation of the particular object. The basic idea is very simple—how to detect
the straight line!
Figure 1a shows, straight line AB with two different points (xi, yi) and (xj, yj)
in image plane, x-y. Straight line AB in the image plane used basic line equation as
shown in Eq. (1),

P = x cos θ + y sin θ (1)

where P is the distance from the coordinate system center to the straight line AB
(as shown in the above figure) and θ is the angle from one of the axes with the line
connecting to the center. Every point in the straight line AB follows Eq. (1). Now
with the help of Hough transform, take a point from the image which is nothing but
point that exists in the edge. For every point, we have an infinite number of lines
with particular P and particular θ which is shown on the straight line AB. Let us
draw another straight line passing through the same point (xi, yi) CD which has
different P1 and different θ 1, the similar way an infinite number of a straight line
passing through the point (xi, yi) with different (P, θ ). The second point (xj, yj) has
an infinite number of straight lines with different (P, θ ) which are passing through

Fig. 1 a A simple illustration of how Hough transform works, for a straight line and point. b x-
y coordinate to P-θ mapping for a line [13]
Different Modules for Car Parking System Demonstrated … 113

the same point. From those an infinite number of straight lines, there is one common
(P, θ ), so there is only one line which has two points on the same line with two
different votes and that is the procedure for finding P and θ for straight line AB. If
we consider third point x on the same straight line AB, we have also found a different
straight line passing through the same point with different (P, θ ). But for common (P,
θ ) it has a maximum three votes, for that particular point x indicated edge detected
line from that particular image. This is basic Hough transform: For every point, that
edge detector found votes for the possibilities in these case lines. If we have multiple
points on the same line, then we have multiple votes. So, for working with a real-time
condition, we are going to go x-y coordinate system which is the image coordinate
system to a new coordinate system, which has theta θ and row P, shown in Fig. 1b.
Figure 2a, discretized in Fig. 2b in P, θ index. Now, with the help of Eq. (1), each
and every point is discretized in P, θ form. Like put the value of the point (xi, yi)
with different θ degree value, from θ = 1, 2, 3, etc., and we can able to find rho value
for respective θ . Sometimes, that point value measurement is called ‘accumulator.’
So keep voting for every single point. θ varies from θ min to θ max, and rho value
changes in sinusoidal fashion as shown in Fig. 2.
Sinusoidal nature comes from the sin and cosine nature of Eq. (1). For the second
point (xj, yj), get another sinusoidal waveform with different votes and there would be
a place which corresponds to rho of the straight line AB that is starting to accumulate
votes for every point. The next step is from the accumulator to find the maximum
value of that line. There would be a chance of multiple accumulators for multiple
lines.

Fig. 2 Variation of theta value affecting change in rho value [13]


114 J.D. Trivedi et al.

4.1 Find Circle Using Hough Transform

A circle can be written down in Eq. (2),

(x − x0)2 + (y − y0)2 = r 2 (2)

where r indicates the radius of the circle, with respect to (x0, y0) coordinates and (x,
y) point. Every point in a circle holds this Eq. (2), with center (x0, y0) coordinates.
As we have to find rho and theta for straight lines, in circles, we have to find centers
and radius for a circle. In this case, we have to find three parameters x0, y0, and r.
Therefore, our accumulator will not be on a plane, but it will be a three-dimensional
accumulator. The procedure is same, as in the earlier case, find the point with edge
detector, every point is not a vote for a circle, but it gives us coordinates x0, y0
and then runs through accumulator with x-y coordinates of respective x0, y0 centers.
Every point votes for multiple centers and multiple radii. We can limit the center and
the radius; if we know the dimensions of that object and limit the votes of the radius,
then we can know how the large object is in an image!

5 IP Webcam

Designed modules can be processed with the help of IP webcam installed in the
smartphone. IP webcam is useful for connecting android device to an operating
device like desktop and laptop. Hypertext Transfer Protocol (HTTP) gives IP address;
using that IP address, first connect our system with an android device by creating
hotspot features in a smartphone. Then, click on start server button in whichever
smartphone we have used. Here, Asus ZenFone Max Pro M1 device is used, which
has inbuilt 16 megapixel camera resolution for a back and front camera, 6 GB RAM,
and 64 GB available storage capacity. We can also view on the Web browser with the
help of HTTP address, and we can change video resolution, orientation, and many
other parameters related to audio, image, and video operations. So, in nutshell, IP
webcam application provides us a real-time camera, which is interfaced to the current
operating system. There is much more application like this available, which will be
useful as IP camera application.

6 Proposed Method

Circular Hough transform (CHT) is applied to one of the parking modules with
the three-step requirement: first, computation of accumulator array; second, center
estimation; and third, radius estimation. Circle Hough transform is implemented by
Different Modules for Car Parking System Demonstrated … 115

Fig. 3 Flowchart of the proposed method for parking module

two different techniques: (1) two-stage method and (2) phase-coding method. The
two-stage method is based on radial histogram computations, and the phase-coding
method is based on computations of complex value in accumulator array, and radius
information encoded in the phase of the array. For parking module with different
radii as shown in Fig. 4 here, we have used the two-stage method. The flowchart of
the proposed method is shown in Fig. 3.

6.1 Step-by-Step Procedure

First step: Read real-time video using Hypertext Transfer Protocol and link that to the
MATLAB for further image processing and real-time parking detection. The second
step applied general Hough transform and circle Hough transform (CHT) which are
116 J.D. Trivedi et al.

explained in the earlier section with equations. The third step is to check different light
conditions and select coordinate and its locations. The fourth step added sensitivity
level and accordingly controlled light conditions, dust, and color combinations of
different cars. The fifth step checked reference saved data and compared continuously
with real-time available information of parking status for both different radius and
same radius modules. The sixth step is to find real-time circle location for parking
status. The seventh step is to find parking status availability using circle detection
with same and different radius. The final step checked available parking slots with
the help of Eqs. (3) and (4),


N
[Iref (r, c) > Icur (r, c)] − T (3)
i=1


N
{[Iref (r, c) < Icur (r, c)] + T } > 0 (4)
i=1

where N indicates a number of array elements, I ref is reference image, I cur is a current
image, r indicates row number of the image, c indicates column number of image,
and T indicates threshold values.
Generally, HT is used for finding straight lines, circles, ellipse, etc., which have
controllable number of parameters; otherwise, accumulator takes lot of memory and
lot of computational time to find the maxima. Figure 3 represents a flowchart of
the parking module and respective parking module, and its graphical user interface
(GUI) is shown in Fig. 4. The circle shape detection for a different radius will not
affect final real-time parking simulation results.

Fig. 4 Parking module and its graphical user interface (GUI) with a different radius and a parallel
parking
Different Modules for Car Parking System Demonstrated … 117

Fig. 5 All empty and all block parking spot

Fig. 6 Individual parking slot, checking from 1 to 12

7 Simulation Results

The proposed method is applied for two different cases: (1) circle with different
radius parallel parking and (2) circle with the same radius—angle parking, using
live video streaming from IP-based smartphone. Performance analysis parameters
like true positive (which is higher) and false negative (which is nil) have checked
with different colors, size, numbers, and location of available small toy cars. Their
respective modules with simulation results using a graphical user interface (GUI) are
shown in Figs. 4, 5, 6, 7, 8, and 9.

7.1 Circle with Different Radius—Parallel Parking

Parking module is running with several assumptions and with particular lighting
conditions. Light changes reflect false identification of circle, and parking module
118 J.D. Trivedi et al.

Fig. 7 Real-time parking slot checking for different available parking locations of different radius
module

will not give accurate results. For this parking module, we have used an android
smartphone with 1920 × 1820 resolutions with full light source available. Here,
parking slot ‘Empty’ represents parking for a vehicle available and parking slot
‘Block’ means parking not available for that particular slot. Figure 5 shows the result
for all parking slot available as EMPTY and BLOCK for not available car parking
slot with green and red colors, respectively.
Figure 6 represents 12 different parking slots with one car parking and remaining
eleven empty slots. Figure 7 shows more than one filled parking slot with the help of
small toy cars with different colors which is giving 100% accurate result, with fixed
camera position and without varionations in light intensity.
Different Modules for Car Parking System Demonstrated … 119

Fig. 8 Parking module and its simulation results with same radius—angle parking

Fig. 9 Individual and random parking slot, checking from 1 to 32 locations

7.2 Circle with the Same Radius, Angle Parking

In the earlier case, different radius-based circle shape detection is helpful for imple-
mentation of real-time parking. Now consider another case for circle, with the same
radius, with an increasing number of parking slots up to 32 for small-scale imple-
mentation, simulation results are shown in Fig. 8 . In this, total of 32 parking spots
have been detected using CHT. First check all the parking spot EMPTY, with red
120 J.D. Trivedi et al.

color circle mark on it as simulation results. Then, in Fig. 9, the vehicle with dif-
ferent color toys is placed, and we can see changes in simulation results and also
notice that when toy cars are not present in a parking place, then parking availability
is not affected. Performance measurements such as true positive value is high and
false negative value is almost nil for the controlled light conditions, which are best
in terms of results.

8 Conclusion and Future Work

Simulation results are shown here for two different cases: a circle with different
radius shape parallel parking and circle with same radius parallel parking real-time
detection using simple Hough transform and circular Hough techniques with the help
of IP webcam smartphone-based application. For easy in visibility Empty parking
slot is indicated using ‘Green’ color and parked slot is indicated using ‘Red’ color.
Limitation of this work is change in light effect on simulation results for all the
cases discussed above. So here fixed camera position and minimum changing light
are the assumptions for real-time implementation of this work. In future work, we
will address this limitations and develop real-time parking system with minimum
processing time and maximum efficiency.

References

1. Dirickx, Y.M., Jennergren, L.P.: An analysis of the parking situation in the downtown area of
West Berlin. Transp. Res. 11(3), 1–11 (1975)
2. der Goot, D.: A model to describe the choice of parking places. Transp. Res. Part A Gen. 16(2),
109–115 (1982)
3. Marlin, P.G., Nauss, R.M., Smith, L.D., Rhoades, M.: Computer support for operator assign-
ment and dispatching in an urban transit system. Transp. Res. Part A Gen. 22(1), 13–26
(1988)
4. Shoup, D.C.: The trouble with minimum parking requirements. Transp. Res. Part A Policy
Pract. 33, 550 (1999)
5. Tsai, J.F., Chu, C.P.: Economic analysis of collecting parking fees by a private firm. Transp.
Res. Part A Policy Pract. 40(8), 690–697 (2006)
6. Caicedo, F.: Real-time parking information management to reduce search time, vehicle
displacement and emissions. Transp. Res. Part D Transp. Environ. 15(4), 228–234 (2010)
7. Zong, F., Wang, M.: Understanding parking decisions with a Bayesian network. Transp. Plan.
Technol. 38(6), 585–600 (2015)
8. Yin, J., He, Y., Sun, X.: Area classification of surrounding parking facility based on land use
functionality. Open J. Appl. Sci. 06(07), 380–385 (2016)
9. Amer, A., Chow, J.Y.J.: A downtown on-street parking model with urban truck delivery
behavior. Transp. Res. Part A Policy Pract. 102, 51–67 (2017)
10. Roper, M.A., Triantis, K., Taylor, G.D., Teodorović, D.: Revenue management in the parking
industry: a multiple garage intelligent reservation model. Transp. Plan. Technol. 41(3), 286–300
(2018)
Different Modules for Car Parking System Demonstrated … 121

11. Das, D., Ahmed, M.A.: Level of service for on-street parking. KSCE J. Civ. Eng. 22(1), 330–340
(2018)
12. Campbell, S., Holguín-Veras, J., Ramirez-Rios, D.G., González-Calderón, C., Kalahasthi, L.,
Wojtowicz, J.: Freight and service parking needs and the role of demand management. Eur.
Transp. Res. Rev. 10(2), (2018)
13. Gonzalez, R.C., Woods, R.E.: Digital image processing. Chapter-10, (2002)
14. Davarci, A., Schick, N., Marchthaler, R.: Detection of perpendicular parking spaces with a
mono camera. ATZ Worldw. 120(12), 66–69 (2018)

You might also like