An Unmanned Aerial Vehicle for Parking Slot Availability

—Due to the increasing number of vehicles, parking problems can be seen as a long-lasting problem which can lead to an increase in trafﬁc congestion in major metropolitan areas. Unmanned Aerial Vehicles (UAV), these days have become so advanced that can perform various tasks like monitoring of trafﬁc and detecting cars. As the camera mounted in a parking lot has a limited ﬁeld of view, the images captured from drones can be used for detecting empty parking spaces. This research project mainly concentrates on extracting the empty slots of parking from the images captured using an on board camera mounted on the drone. The images can be processed by applying image processing techniques that use various existing OpenCV libraries to detect the empty parking slots. Taking this further and applying region growing techniques to detect the empty parking slots available.This process uses less computational power compared to the existing deep learning methods.


I. INTRODUCTION
Unmanned Aerial Vehicles -UAVs (also known as drones) are the flying objects that do not have any pilot on board.They can be operated either from the ground station, or through autonomous on-board control algorithms.The small-sized drones have gained very close attention both within the research and the commercial world.The advancement of electrical technology, images collected from drones have become very useful and efficient in various applications, such as surveillance, aerial photography, defense, environmental analysis, traffic parameter estimation, and entertainment.Following is a Drone surveillance system based on Internet of Things proposed by the members of [2]. Fig 1. represents an Amatuer Drone used for surveillance and security of a crowd. The drone consists of various sensors like camera, gyroscope and Global positioning system (GPS). The amateur drone is connected to cloud through internet by using on-board SIM or Wifi. Below are various fields in which an UAV application can be deployed.

A. Computer Vision
Thanks to its wide range of applications and recent breakthroughs in many important problems, Computer vision has gained growing interest in recent years.In both scientific and real-world implementations, object detection and object tracking are under extensive investigation.Drones (or UAVs) Fig. 1. IoT based drone surveillance system fitted with cameras were rapidly deployed for a wide range of applications including farming, aerial photography, rapid distribution, surveillance, etc [3]. Consequently, automated interpretation of the visual data obtained from these platforms is becoming highly demanding, which is gradually taking computer vision to drones.Despite the great advances in general computer vision algorithms, such as detection and tracking, these algorithms are typically not suitable for handling dronecaptured sequences or images due to various challenges such as shifts in perspectives and sizes.The development and evaluation of new vision algorithms for drone-generated visual data is thus a key issue in drone-based applications.
1) Image Processing: Image Processing in drones is one of the major area of research which military is interested in.Drones with image processing capabilities can be used in surveillance like anonymous person tracking for security purposes. There are many other applications areas like traffic monitoring system and disaster management.In disaster management, as it difficult for relief workers to get to risk areas drones can be used to get if any individual is in a risky scenarios and can be rescued.
2) Object Extraction: Object extraction and recognition in drones can work in conjunction with image processing. Person identification can be done in a huge crowd where in an intelligence input suggests a huge risk to the gathering.Car detection can also be applied in real-time traffic scenario [7].

B. Cloud Computing
Deploying drones over the Cloud is an evolving research area inspired by the advent of cloud robotics and the paradigms of Internet-of-Drones (IoD). Architecture for drone communication can be developed and offered to clients as a Platformas-a-service(PaaS).As explained above in the drag-net based drone system, drones can be connected to cloud for processing related jobs. The limitations related to high processing needed for image processing in drones can be overcome by connecting it to the cloud.

II. LITERATURE REVIEW
There is a lot of research going on in Drones, especially in the area of surveillance. In the critical review part, i have gone through few research papers. [1], in their research proposed a drone based parking space detection system.It consists of two phases. Pre-process and detection process. In the pre-process the reference image of the lot is taken and the parking lot coordinates are marked and saved. The image of the parking lot captured by drone is color transformed and then passed to Naive Bayes classifier for training. Then the result is passed to the detection process. Feature extraction is performed in this phase to detect the vehicle color, Gradients and Harris corner. Based on the features extracted the parking lot status is determined if it is empty or occupied. This process is repeated for several frames repeatedly to get the final status of the parking space. Histogram of oriented gradients(HOG) is the technique used to determine the features. RANSAC algorithm is used to get the homography relation b/w image captured and the reference parking lot. Harris corner detection is used to detect the corners of the parking lot spaces.
In the research paper published by [4] they proposed a system to create a visual method for detecting the of Available Parking Slots.Their proposal consists of two phases. Parking lot detection stage and Slot occupancy classification stage. This system uses images extracted from Around view monitor(AVM) which is an image captured from a camera at a lateral point-of-view. AVM images are given as input data to the Parking lot detection stage. The feature extraction process is performed on the images to detect various features. Features from accelerated segment test(FAST) is a corner detection method which could extract featured like points which can further be used at a later point to perform computer vision tasks.Feature classification is used to classify the extracted features based on the proportions of parking slot and pavements. Guide line detection is performed using a RANSAC algorithm. After this stage the parking slot is recognised. The slot occupancy classification stage selects the slot to perform tasks. The features of the lot are extracted like Pavement or Non-Pavement. The results are the passed into a Naive Bayes classifier. After applying the classifier , the slot occupancy classification is determined.
In the research paper by [5], he tried to extract a vacant parking space from static images. The parking slot extraction features first selects an area based on Automatic ROI(Region of interest). Color histograms are applied on the static images and convert the RGB values by eliminating the luminance and chrominance values. Support Vector Machine (SVM) is an classification algorithm used to classify the training data and further apply the same to the input data. Harris corner detection is used to determine the interest points in the given image of the parking slot.Finally the feature vocabulary is created to determine the cars in the parking slots. Normalized Cross Correlation is used to compare feature vocabulary of the training set and to correct any error like coffee cup next to the car is detected as a car.The Training and testing phase involves in k-fold cross-validation test where the value of k is 5.Training sets are divided into 5 subsets and tests are carried out on alt the subsets.The results from all the subsets are average to get the accuracy as the final result. By reviewing the above described papers, the RANSAC algorithm can be seen as by far the famous one to detect the homography relation b/w image captured and the reference parking lot. Harris corner detection is the most used corner detection method which in my case is the most important part.
In the research paper published by [6], The parking lanes are identified using a marker-based approach. A reference marker is given to the system to identify the parking lane. After which various thresholding techniques are used to convert the image to a binary one. Sobel edge detection is then applies to detect the edges from the image and the image is checked for noise as a noisy image is not good for further processing. Then morphological operations are performed to pick objects similar to the reference marker.The image is then checked for broken contours and then filled and connected. Then the image is labelled based on pixel radius of 2 and each sub image is looked for pixels with a similar shape of reference marker. The techniques used in this paper can be used at the pre-processing stage after the image is acquired.

III. PROBLEM STATEMENT
The scope and scale of government oversight has expanded with the use of modern technologies. The use of digital communication has made communication more effective but also much more vulnerable. There is a huge gap in work that relates to surveillance. Governments are trying to fill that void as much as possible. Drones are one recent subject on the phenomenon. One major research area may be the implementation of drones for surveillance purposes. The best examples of real-time surveillance systems are anonymousperson detection systems and Live traffic monitoring systems.
There has been a huge increase in the number of passenger cars sold on the market with population growth. With this surge in cars, parking space issues arise. Public areas do not have enough parking spaces available.Particularly in metropolitan cities, this has been a huge issue. People park on the road side due to which there is a rise in accident rates and other costs involved with it such as parking tickets etc.Imagine a university scenario which has a large parking area. It is difficult for a person coming into the lot to find a parking space during busy hours when there are classes to attend. Because of this they are wasting a lot of time and money walking around in the lot to find a parking space. A system for showing the number of empty parking spaces available may be built in place.A drone can be used to take photographs from the parking lot at regular intervals. Such images can be processed using computer vision technology to get the parking spaces that are available.

IV. METHODOLOGY A. Process Flow
The Drone, in this paper, has been proposed to monitor the parking lot by capturing images of the lot. The images are stored in the cloud server. The image is retrieved from the cloud for image processing. The image pre-processing phase consists of various stages like Slot marking recognition, slot feature extraction. As mentioned from the literature review part above, the images captured by the drone are taken and various techniques are applied to them to detect the parking slot features like size and shape of the lot. At the initial stage, the images are converted to grayscale which helps in the preprocessing stage. Then the thresholding function is applied to image to convert the image from grayscale to binary.A binary image can be easily used to differntiate the white and black pixels in the image. Selecting a region of interest is non-mandatory method which can be applied based on the requirement.HoughTransform can then be applied to extract lines from the images which are the reference parking lines.The extracted lines can be used to detect the areas of the parking lot where cars can be parked.Once this is done, contours of the parking lines are drawn and each forms parking space forms a rectangle. Each of them are cropped into sub-images and the region growing technique can be applied to see if there is a car in the given sub-images. This would return the final result which is the number of empty parking spaces available in the parking lot.

B. Swimlane Activity Diagram
A swimlane diagram is a kind of flowchart that describes what activity is performed by whom. Similar to the lanes of a pool, a swimlane diagram creates clarity and responsibility of process steps for a person involved using horizontal or vertical swimlanes. These process steps are connected as a flow showing the start and stop of the process. The following is a swimlane diagram describing the process followed by drones to find the available parking slots in a parking lot. V. PROTOTYPING Google Colab Notebooks has been used for implementing this project. Colab is an open-source jupyter notebook environment by Google that runs entirely on the cloud.

A. Importing list of libraries
Firstly, there are certain libraries which can be used to apply the image processing techniques. They are cv2, numpy and matplotlib. cv2 is an opencv library. NumPy is a library for scientific computing in Python. Matplotlib is a library used for plotting and visualizing in python. They are imported using below code. 1 import cv2 2 import numpy as np 3 import matplotlib 4 from matplotlib.pyplot import imshow 5 from matplotlib import pyplot as plt

C. Converting the Image to Grayscale
Firstly the image needs to be converted from Color to Grayscale. It can be done using the below code.

D. Image Thresholding
Image Thresholding is a technique in OpenCV library. It is used to differentiate the dark and light pixels in the image using a threshold value that is set from 150 to 255.

E. Selecting the region of interest
The next step is to select the region of interest from the image. The place where the parking lot is selected from the image using the below code. 1

F. HoughLine Transform
HoughLine Transform is a feature extraction technique which has been used to detect the line from image.

G. Drawing rectangles for Parking
For extracting the exact position of parking spaces, first the exact rectangles needs to be drawn around the parking area.The same has been drawn using ballpark method and the values have been given manually.

H. Expected Output
To take the process further, the lines extracted from hough transform can be used to draw individual parking line inside the triangles. Then the image is cropped based on each parking space from the drawn rectangles. Each cropped image can be taken and field regrowing techniques can be applied on it to get the number of cars from the image. Otherwise, the image can processed using pre-trained models to detect the cars in the image.

VI. CONCLUSION AND FUTURE WORK
In this paper, i tried to implement drone surveillance of parking lot to detect empty slots. For this, i used image processing techniques which are based on the OpenCV libraries implemented using Python programming language. Using the prototype built, i achieved until detecting the marking lines of the parking lot. The prototype can be further enhanced to detect and count the number of cars in the given image by using other Deep Learning techniques like Masked-RCNN.

VII. ACKNOWLEDGEMENT
This research is being carried out under the supervision of professor Dr. Sabah Mohammed. I would like thank professor for showing a direction for my research work.