Door Detection Based on Geometrical Features and Harris Corner

Door is a very significant element as it enables a person to enter a house or room. Though identifying doorway is an easy task for a regular person, for robots or visually impaired people it is a challenging task. To overcome this challenge, we have proposed a door detection method. Our proposed method is based on Prewitt edge detection method and Harris corner detector. Here, we are using a number of predefined rules to detect the doorframe correctly. To establish the robustness of our proposed method, we have formed a substantial dataset of scene images that are captured in various unfamiliar environments. Our experimental results validate that our proposed method is robust against changes in viewpoint, shapes, occlusions, illumination, colors, sizes, orientations, and textures of the door. The experimental results show that our proposed method reaches 87.45% accuracy as well as achieves lower false positive rate and lower computational time.


Introduction
Doors are regarded as one of the most significant and common markers in indoor environment. They provide a great deal of location information and assist in localization and route planning chores. One of the key challenges for blind and visually disabled adults is moving around in unknown surroundings. Smart guiding tools will provide a solution to this problem. Doors play an important role in delivering transfer points between segregated spaces. Besides, they can be used for sovereign navigation and self-localization by maintaining the entry and exit information among the well-regulated objects. Many autonomous and mobile applications will be benefited by an efficient and accurate door detection method, including indoor navigation and way finding for visually impaired people.
This paper proposes a distinctive technique that: (1) efficiently identifies door from different viewpoints; (2) offers a general solution for open and closed doors; and (3) detects the doors of various sizes. The existing door detection methods do not provide all these features in one framework.
The remaining paper is organized as follows: in Section II, we discuss the state of the art techniques. Then, in Section III the proposed method is explained. We present experimental outcomes in Section IV. Finally, we conclude and give a brief summarization of the future work in Section V.

Related Work
Worldwide researchers have implemented some methods for door detection. The existing methods have some deficiencies such as, when doors' size, shape, viewpoint and illumination changes, detecting the doors becomes difficult.
In indoor environment, usually doors separate different parts of buildings such as, rooms and corridors. For navigation, localization, mapping, and exploration tasks, the information if a robot is at a door is valuable. Established algorithms rely on vision-based methods to detect closed doors in a hallway, assisted by laser range data.
A Rule-based door detection method is used in [6]. The proposed method has some limitations like the robot should be near the doorframes and the doors must be open.
Automated 3D scanning based door detection is proposed in [7]. Here, a depth camera is used to capture images and used as a tool for detecting doors. The constant changing ratios and depth differences in the door images have been analyzed. To check the usefulness of the algorithm for indoor autonomous flying robots such as, the quad copter, tests were conducted using various heights and depths of the Kinect sensor. The algorithm performs best on a

Research Article Research Article Research Article Research Article
Research Article Research Article straight 3.5-meter path. The poor resolution of the depth images reduced the precision of the measurement.
Socially assistive robots have a significant ability to help in the living of many physically retarded persons around the world. Visually disabled individuals to identify objects, perform different household roles, adapt in indoor and outdoor conditions for several activities can use these devices. Door identification is one of the most critical tasks in indoor navigation. Reference [8] introduces a novel door identification strategy based on perception. It uses the geometric properties of 4-side polygons. The feasibility of the suggested approach is evaluated using a large image database of differing degrees of sophistication. There was not differentiated between doors and door-like artifacts in this proposed solution.
A robust door detection method is proposed in [11]. A method for defining door characteristics in pictures was introduced to obtain door positions from a series of random still images. The approach is based on the Canny edge detection and the Hough transformation algorithms. It uses fuzzy logic to calculate the probability of doors existence, and for detecting the door a series of predefined rules were used. There were only a few training images used in this process and only a smaller detection rate was achieved.
For a blind person a door detection algorithm was proposed in [13]. Instead of appearance features (color, texture, etc.), they proposed a robust image-dependent door detection algorithm based on general and stable features of doors (edges and corners). A standardized geometric door model is constructed by integrating edges and corners to detect doors. In addition, additional geometric data is used to differentiate doors from other objects of equal size and form (e.g. bookshelf, cabinet, etc.). The robustness and generalizability of the proposed detection algorithm were tested against a complicated database of doors obtained over a wide range of colors, textures, etc. from a number of different environments. The door could not be distinguished from rectangular objects, such as paintings and windows that are of similar structure to doors.
A fuzzy logic based door detection method is used in [12]. A scheme based on a variety of fuzzy logic principles were developed by the developers. In this scheme, typical doors in diverse settings have been successfully identified in real-time. This technique, however, failed to detect partly opaque doors. In addition, the geometric features of the door are not considered in this method.
In our proposed method, we first used the Prewitt edge detector to extract the edges, then we detect the corner of images by applying the Harris corner detector. Finally, we use certain predefined rules on the basis of those edges and corners to correctly detect the door.

Proposed Method
In our proposed door detection algorithm, unfamiliar environment are being considered. Our proposed algorithm considers the door's stable features.We integrated this stable features with the geometric information of the image. We also perform statistical analysis so that this method works properly. The overall proposed system structure is shown in Figure 1. Our proposed system consists of several phases. Each phase will be explored in depth in the coming sub-sections.

Image Pre-processing
Detecting the edges and corners of the images are an important phase of our proposed method. At first to detect the edges and corners more robustly, we convert the original RGB images into grayscale images. By this conversion, there is a reduction of complexity in the processing time. A single-layered image (Grayscale image) is simpler to deal with than a three-layered image (RGB color image). We need 8*3 = 24 bits (8 bit for each color component) to store a single color pixel of an RGB color image. Thus, when we transform an RGB image to a grayscale image, it takes just 8 bits to store a single pixel of the image.

Edge Extraction
In image processing, machine vision, and computer vision, edge detection is a fundamental method particularly, in the field of feature detection and feature extraction. Edges are very important features to identify an object in an image. Edges have emerged because of the changes in intensity. Edges indicate the borders between objects and surroundings or between objects. Edge detection involves a range of mathematical approaches. Typically, the points at which image brightness sharply varies are grouped into a series of line segments called edges.
Edge detection faces the challenges of noise and weak or faint borders. Several edge detectors have been developed in past years to solve these problems and produce precise edge maps. As a preprocessing phase, they use noise reduction techniques, for example, Canny [16], Prewitt [18], Wavelet transform, and SUSAN [19]. Each of those detectors has its own benefits and drawbacks.
We observe that in case of simple image for detecting edges, prewitt edge detection algorithm works better than the other edge detection algorithms. The benefits of the Prewitt operator include fast processing speed, relatively smooth and continuous edges. For this, we are using prewitt edge detection algorithm for detecting edges in our proposed method. The primary advantage of prewitt operator is simple approximation of the gradient magnitude. The second advantage of the prewitt operator is detecting edges and their orientations are simple [17]. We also found out that in our proposed method, the required processing time for edge detection and then preserve the desired edges by prewitt edge detector are better than that of canny edge detector. In Figure 2, we show that prewitt edge detector preserve the desired door structure better than that of canny edge detector.

Corner Detection
Another important phase of our proposed door detection method is properly detecting the corners in the images. Corners are stable local features in images. Corners are not much affected by illumination and have the property of rotational invariance. Many corner detection algorithm are developed over the years.
In our approach, to find out the most appropriate corner detector, we applied three intensity based corner detection algorithms such as KLT [20], SUSAN [19] and Harris [15]. Intensity based algorithms are characterized by their fast speed and their independence to other local features. In SUSAN corner values are calculated based on geometrical criteria. To find out the corners, Harris corner detector calculates the first order derivatives. Harris corner detection is simple to compute and fast. In addition, it is rotation, scale and illumination variation independent. KLT detector takes the information from inter-point displacement technique. In a fixed data set, scene images are processed by applying those three corner detector algorithms, we observe that the overall practical results reveal that the Harris detector provides the best quality corners as depicted in Figure 3.

Door Corner Candidate Grouping and Door Model Matching
In our proposed system, corners and edges are extracted first. A doorframe has four corners and four door lines, which are perpendicular to each other in ideal condition. Both horizontal doorframe lines are nearly parallel to the image's horizontal axis. Vertical lines of the doorframe should be perpendicular to the image's horizontal axis. An ideal door should have certain width and length. In our proposed system to detect a door in an image we considered the above mentioned general concept about the door.
The door model has four corners, C1, C2, C3, and C4, as seen in Figure 4. The coordinate of corner Ci is (xi, yi). The line connecting C1 and C2 is L12; the line connecting C2 and C3 is L23. L43 is the line connecting C4 and C3, and L14 is the line connecting C1 and C4. The Sizij determines the ratio between the length of the Lij and the diagonal length of the image DI. The orientation of Lij corresponding to an image's horizontal axis is measured by the Dirij variable. Equation (1) and equation (2), respectively, define Sizij and Dirij.
Our proposed door detection method can detect the door that are perceived from different viewpoints. It can also detect the partially occluded and different sizes doors. We consider any four corners from derived corners as candidates for a door corner that satisfies the following rules. If not all of the following rules were followed for any of the four corner groups, all four corner of the group will be removed without any further processing.
An ideal door should have a standard size. A door size should not be like as a window or a painting. For this, in our method we divided an image into three horizontally equal parts and we assumed that in the upper 1/3 of the image, at least one corner can be marked, and two corners are 2/3 of the image.
A certain range should be maintained by the height and width of an ideal door. In our method door height and width should be within the following range: We consider lower threshold "HeightThresL" value is 0.6 and upper threshold "HeightThresH" value is 0.8 for Siz12, Siz43. We also consider lower threshold "WidthThresL" value is 0.2 and upper threshold "WidthThresH" value is 0.5 for Siz23, Siz14.
Horizontal lines are just about parallel to the horizontal axis of the image, but due to different viewpoints, we consider slight deformation and it should be in specified range: Where μ_h and 2σ respectively define the mean and second standard deviation of the horizontal lines direction with the image's horizontal axis.
We consider those vertical lines that's are almost perpendicular to the image horizontal axis: Where μ_v and 2σ respectively define the mean and second standard deviation of the vertical lines direction with the image's horizontal axis. 360 degrees can be the number of four angles between the four sides of the doorframe.

Experimental Results and Performance Evaluation
With the purpose of evaluating the performance of our door detection model, we formed a database which contains 185 door images from a wide variety of environments. All the images have the size of 380*260 pixels. The database includes doors with different viewpoints, textures, colors, scales, occlusions and illumination conditions. Moreover, we divide the doors into three classes depending on the degree of deformation and occlusion, the difficulty of backgrounds, as well as the variations in lighting and size: Simple, Medium, and Complex. For simple images: only one door with no door-like artifacts and randomly colored walls are used in the pickup scenes. However, there might be non-uniform backgrounds and more than one door for medium images. Photos contain bookshelves, benches, numerous doors, windows, and multi-colored walls in complex sub-sets.
On MATLAB environment, the entire model is implemented and is operated on Windows 10 operating system with a hardware configuration of Intel Core i7 2.90 GHz processor with 8GB RAM. Experiments were conducted against different datasets of images in order to assess the performance of our algorithm.
In order to evaluate the performance of our door detection method, we presented our results according to true positive rate (TPR), false positive rate (FPR) and accuracy. The suggested algorithm achieves an 87.45 percent detection rate of accuracy with a 14.09 percent false positive detection rate, and 88.81 percent true positive rate. For each group, the TPR, FPR, and accuracy outcomes are described in Table I. Some samples of identified doors from various environments are shown in Figure 5. As the complexity of images increases, the true positive rate (TPR) and accuracy decreases, false positive rate increases gradually. As the complexity of images increase, the total computing time increases gradually. The processing time of images is shown in Table II  In our proposed method, some difficulties emerge in detecting the door as presented in Figure 6. The door is not correctly identified when the quantity of light changes abruptly in images as shown in 6(a). The door is not correctly detected when the door is partly opened 6(b). Door detection is not performed properly when the door is not clearly visible 6(c).

Conclusion
In this paper, we have presented a door detection method for indoor environment. Our aim was to create a new navigational door detection algorithm and to help visually impaired individuals navigate through unfamiliar indoor environment. Unlike existing algorithms using the Hough Transform or Canny Edge Detection, we developed a new door detection method where we used the Prewitt Edge Detection and Harris Corner Detector to detect the edges and corners. It detects the door's independence from viewpoints, picture orientations, illumination, occlusion, and texture of the door. The proposed model identified some geometric features in the scene images and compared them with our proposed predefined rules. Our presented door detection method strongly depends on edges and corners detection phases. Therefore, if all the edges and corners of the scene image are not effectively detected, the door cannot be correctly recognized. The proposed algorithm offers better accuracy and lower computational complexity than the state of the art technique. Our future work will consider the detection of multiple doors in an image and find out ways to increase the accuracy in complex images. Using wider dataset collections, enhancements can also be made by optimizing the threshold values.