{'fraction_non_alphanumeric': 0.019452313503305004, 'fraction_numerical': 0.01221277935158955, 'mean_word_length': 4.693906810035842, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
Fast Obstacle Distance Estimation using Laser Line Imaging Technique for Smart Wheelchair

This paper presents an approach of obstacle distance estimation for smart wheelchair. A smart wheelchair was equipped with a camera and a laser line. The camera was used to capture an image from the environment in order to sense the pathway condition. The laser line was used in combination with camera to recognize an obstacle in the pathway based on the shape of laser line image in certain angle. A blob method detection was then applied on the laser line image to separate and recognize the pattern of the detected obstacles. The laser line projector and camera which was mounted in fixed-certain position ensured a fixed relation between blobs-gap and obstacle-to-wheelchair distance. A simple linear regression from 16 obtained data was used to respresent this relation as the estimated obstacle distance. As a result, the average error between the estimation and the actual distance was 1.25 cm from 7 data testing experiments. Therefore, the experiment results show that the proposed method was able to estimate the distance between wheelchair and the obstacle.


INTRODUCTION
An automatic moving object such as smart wheelchair requires a sensing ability towards its environment condition. Basically, Smart Wheelchair is a conventional wheelchair which is actuated by electrical motor and controlled by a central processing unit so that it can perform set of actions based on the instruction from the user. These user instructions are generally given via joysticks or human voice such as done by Al-Rousan and Assaleh in 2011 [1]. However, the user still plays an important role to guide and monitor the movement of the wheelchair especially when there are obstacles in the front or beside the wheelchair. One of the most important information to conceive is obstructions in pathway which are bumpiness, hole and presence of obstacle. The smart wheelchair would have to decide an action once the poor pathway condition is detected. An avoidance system for these conditions plays important role to secure the moving object or the rider. Therefore, in order to provide more convenient use of the smart wheelchair, it is important to develop a better method to sense and detect obstacles in the environment around it.
Generally, a processing of environmental image captured by a camera is performed to sense the pathway condition. In this paper, a detection of poor pathway condition by sensing the view of environment is presented. The sight sensing utilizes camera, then the images captured were analysed using image processing method. However, by only utilizing a camera, the process of recognizing a poor pathway will need a longer time and complex computation. Therefore, in order to simplify image analysis and reduce algorithm complexity, a laser will be used in combination with camera based image processing system such as implemented by Zhang [2] on weld line detection. Based on the innovation and laser scanning method performed by Tian [3], we propose a new method to detect and recognize a poor pathway based on the shape of the laser line image shot in certain angle and then captured by a camera. After obtaining the image, a blob method detection was performed to separate and recognize the pattern of the obstacles. Before performing the obstacle detection by using laser line image, it is preferred to perform filtering process to obtain good quality image source such as performed by Utaminingrum [4].
This study focuses on developing a low-computationally poor pathways detection method that implement the IJECE ISSN: 2088-8708 1603 use of microcomputer which is embedded in a smart wheelchair system. An active imaging method that utilize a laser to illuminate the region of interest is selected to simplify image analysis and reduce algorithm complexity. In detail, this paper is divided into five sections. Section 2 provides the overview of related works. In section 3, the proposed method will be discussed and then section 4 will provide results and discussion. Finally, section 5 provides conclusion and future work.

RELATED WORK
Many approaches have been proposed on obstacle detection and collision avoidance. Obstacle detection based on ultrasonic sensor has been widely used in autonomous mobile robot application. Ultrasonic sensor was used to map the obstacle by measuring the distance between the robot and obstacles. A simple approach for detecting obstacle and avoiding collision has been proposed such by Gageik in a quadrocopter [5] and overlapped ultrasonic sensor method by Kim [6]. Even though ultrasonic are useful in smoky environment, the experiment showed not all surfaces can be detected which makes other sensor were required. Another general problem, distance estimation using ultrasonic requires additional time since the wave needs to travel into the surface of the obstacle and return back to the receiver. Farther distance even requires longer travel time of the ultrasonic wave.
In 2011, Dreszer et al. implemented the use of Microsoft Kinect sensor to monitor and learn the environment for obstacle detection and collision avoidance [7]. The Kinect sensor was equipped with infrared depth camera and run in small PC which was then mounted on an inverted pendulum robot so it can move and avoid obstacles. Similarly, Nissimov et al. implemented Kinect sensor in an agricultural robotic vehicles to explore greenhouse environment [8]. The research provided an approach for obstacle detection and avoidance by using color and depth information obtained from Kinect 3D. However, by using Kinect sensor, shiny and smooth surface of an object such as glass will prevent infrared wave to be reflected back which cause some error.
Barreto et al. proposed a method to measure a distance based on laser distance triangulation for image processing [9]. He developed a measurement technique on an embedded system which required smaller processing power compared to personal computer as x86 architecture. He used a CMOS camera and a laser to implement the laser triangulation distance measurement. However, the system was only aimed to detect the distance. For a moving wheelchair, instead of only considering the distance, it may also gain benefit if the system can recognize the height of an obstacle to decide the next action: whether to completely avoid or to drive above it.

PROPOSED METHOD
This study aims to detect an obstacle based on the response given by the laser line projection on the pathway. First, a line of laser was projected onto the pathway and a colored image of its view was acquired using a fixed CCD (Charge-Coupled Device) camera. A laser light was chosen for its focus and high intensity characteristic. The laser line and the camera were mounted in specific angle triangular configuration which will be discussed more in the next subsection. The captured image was then analyzed through image processing methods which consist of color-space conversion, segmentation, closing morphological filtering and blob detection ( Figure 1). The number of detected blobs and their centroids would be used as features in the obstacle distance calculation. The main processing unit used to process the image was Raspberry Pi 2 with 900 MHz quadcore ARM Cortex-A7 CPU and 1 GB of RAM equipped with standard Raspbian Wheezy OS and OpenCV version 3.0.

Image acquisition of Pathways view
The laser line used in this study was LN60-650 (class 2) that has 650 nm wavelength and 60 • fan angle. It projected a focused red line onto the pathway. The laser line projector was mounted in vertical pole in fixed height of 1.4 metres above the floor and at fixed angle of 60 • resulting a projection at 2.44 meters away horizontally from the laser mounted on the wheelchair. A CCD camera was used to acquire the images that result RGB color images each of 320x240 pixel size. This camera was also mounted in a horizontal pole with fixed 0.75 meters height above the floor. Since the laser and camera were placed in a fixed position, the projected laser was ensured to be in a fixed location in the captured image as well.
The triangular configurations of laser line image and CCD camera are shown in Figure 2 while the acquired image illustration is shown in Figure 3. These configurations were arranged to assure the wheel-chair would response to obstacle in 1 meter beforehand in order to secure the rider from stumbling over or crashing into the obstacle.

Color-Space Conversion from RGB to HSV
The acquired image in RGB color-space was then converted into HSV color-space. HSV color-space which comprises Hue, Saturation and Value is mainly used in segmentation where the object of interest is a color-specific. The study done by Mesko in 2013 and by Chmelar in 2015 used this color-space to detect red laser projection [11,10].

Laser-Line Segmentation using Thresholding Method
Mesko and Chmelar used laser line that has characteristics of red color and high intensity. In this study, the red color has Hue of (0, 70, 70) to (255, 255, 255) in 0 -255 intensity level. This range was then used as threshold to segment the red laserline from the background. Pixels in the cropped images whose intensity fall within both thresholds was then masked as 1, otherwise it was a non-laser object and masked as 0.

Morphological Filtering
Closing is a type of morphological filter for binary image that uses a structuring element to produce refined binary image within bounding box on the segmented image. The closing used dilation process followed by erosion. In this study, a 2x2 square structuring elements is used for the closing process. If there is a value of 1 in the segmented image, then dilation process will give value of 1 into its surrounding 2x2 pixels. In the other hand, erosion process change the value of 1 in the segmented image into 0 if the 2x2 surrounding pixels did not follow the structuring element. Both process would produce an enclosed segmented laser line. The closing process is then followed by another dilation process using a horizontal-shape structuring element of 3x15 in order to connect the line discontinuities. A blob in binary image is a region of adjacent connected-component. This method was performed after segmentation to label each contiguous foreground pixels. Labelling is a process of scanning foreground pixels (intensity of 1) from top-right to the top-left and move to subsequent lower pixels [12] and label each foreground pixels found in ascending order. This algorithm processes every row at a time. The first foreground pixel found is labeled as 1 and the second as 2 and so forth. This study used an 8-connected foreground which means consecutive foreground pixels was assigned to its north, east, south, west, north-east, south-east, north-west and south-west neighbor's label.

Blob Analysis
Each label was then assigned as a blob. Figure 4 shows the result of blob detection on the laser line image. There are three detected blobs which were illustrated as circles on the laser line image since the line was split into three parts. More obstacles generated more blobs such as shown in Figure 5. Therefore, it is still possible to detect small and thin objects such as the foot of a chair and table. The centroids were then calculated using the moment of the image or the center of mass such as illustrated in Equation 1 and 2. center x is centroid coordinate in horizontal axis, while center y is centroid coordinate in vertical axis. n represents number of pixels belonging to the segmented blob. x k and y k are the coordinates of blobs in horizontal and vertical axis respectively. The number of label and all centroids would be used in obstacle detection and obstacle-to-wheelchair distance estimation. ISSN: 2088-8708

Obstacle-Distance Estimation using Linear Regression
A no obstacle condition was defined where only 1 blob was detected in the labeled-blob image, meaning that there was no object destructs the laser projection. Once an obstacle presents in the pathway, the number of connected-components label becomes two or three where one higher blob appears on the obstacle. Two labels mean the obstacle presents on the side of pathway while three labels mean the obstacle presents in the middle of pathway. The centroid coordinate of higher blob (centerH x , centerH y ) was then subtracted with the centroid of lower blob (centerL x , centerL y ) resulting a blobs-gap.
The laser projector and camera that was mounted in fixed position ensured a fixed relation between blobsgap and obstacle-to-wheelchair distance. A simple linear regression was used to respresent this relation. Given there are n number of collected blobs-gaps (x i ), y i correspond to obstacle-to-wheelchair distances,x andȳ are respective averages, the coefficient a and constant b of linear regression y = ax + b were calculated using Equation 3 and 4.
In addition of measuring the distance, the triangular configuration of the laser line and the camera also provides indirect information about the height of the obstacle based on assumption. When there are more than 1 detected blob, it means that there is an obstacle obstructing the laser line projection. If the wheelchair moves forward, the pixel distance of detected blob will increase and it will be used to calculate the distance. However, if after specific time the blob number get lowered, then it can be concluded that the height of the obstacle is low, and the wheelchair can continue to move forward and pass over the obstacle. Therefore, the height assumption of the obstacle can be used to decide what action should be taken by the wheelchair; whether it should stop or pass over the obstacle.

RESULT AND DISCUSSION
Regression analysis of the relation between blobs-gap and the actual obstacle-to-wheelchair distance is shown in Figure 6. In order to obtain the regression formula, 16 data with different actual obstacle distance were captured using laser line imaging technique. There are two types of data, the triangle dots show the data for obstacle with 20 cm width while the circle dots show the data for obstacle with 33 cm width. Where x is the number of pixel, and y is the distance between the wheelchair and the obstacles. Finally, Equation 5 was then used to estimate actual distance of 7 testing data. The results of these calculation are shown in Table 1. From the Table, it can be concluded that the average error of measurements is 1.25 cm. The worst distance estimation happened when the actual distance was 80 cm, but was estimated as 74.19 cm. it was probably caused by bad data on the training phase which lead to less accurate regression formula. The best distance estimation happened when the actual distance was 90 cm where it only gave error of 0.06 cm. The captured line laser image had 320x240 pixels which was completely computed in 83 ms.

CONCLUSION
In this paper, a method to estimate the distance between wheelchair and obstacle has been presented. By using laser line along with camera which was mounted in fixed-certain position, a linear regression can be performed to relate the number of pixels in the captured image with the actual distance between the wheelchair and obstacles. A ISSN: 2088-8708 simple linear regression from 16 obtained data was used to represent this relation as the estimated obstacle distance. As a result, the average error between the estimation and the actual distance was 1.25 cm from 7 data testing experiments. From this result, it can be seen that this method is able to estimate the distance between wheelchair and the obstacles. However, there were still drawbacks in this research since it heavily depends on the laser line image. One of the problem happened when the light captured by the camera was too bright which make it hard to obtain clear laser line image.