Figure 18 ROI Selection for Speed Estimation Result
Related Figures (19)
Fig. 1. Block Diagram for System Architecture view (P) and distance between object and camera (D) based on camera height (#1), field of view angle of the camera (7,), and angle of the camera (7,). Perpendicular view is used to calibrate estimated speed to standard unit, km/h. Video capturing layout is given by Fig. 2. From Fig. 2, we can get where f is focal length of the camera and v is vertical dimension of 35 mm image format which can be found from camera specifications. Then, we can get Smoothing is used to filter or reduce noise produced from background subtraction process. The noise generated from background subtraction is typically in salt and pepper type in which using median filter is good to reduce the noise. The illustration how median filter works is given by Fig. 3. Background subtraction using GMM can also be used to detect shadow, so to increase object detection accuracy, the shadow should be removed. This process will map foreground image produced from GMM to binary image which contain only pixel value 1 and O for identify moving object and background respectively. Equation (6) is used to this shadow removal and mapping process and illustration is given by Fig. Fig. 5. Closing Operation in Image Morphology In this paper, morphology operation is used to reconstruct image after shadow removal process. Shadow removal process usually creates a gap inside object which if that gap is too large, it can make object will be separated that can affect object detection accuracy. There are two fundamental processes in image morphology, erosion and dilation which erosion will do shrinking and thinning operation to objects and dilation will grow or thicken objects in binary image. From these two fundamental processes, there are opening and closing operation that is combination of erosion and dilation. Opening is the process that do erosion firstly and then followed by dilation, generally smooths the contour of an object, breaks narrow isthmuses, and eliminates thin protrusions. Closing is the process that do dilation firstly and then followed by erosion, generally smooths sections of contours but, as opposed to opening, it fuses narrow breaks and long thing gulfs, eliminate small holes, and fills gaps in the contours [7]. To reconstruct image which contain gaps, we will use this closing operation. Illustration of how closing operation works to an object on binary image is given by Fig. 5. G. Object Detection Fig. 4. Shadow Removal Process F. Morphology Operation Fig. 6. Object Detection based on Contour Finding (left) and Centroid based on Bounding Box (right). Green pixels represent border of the object, red point represents centroid point, and red rectangle represents bounding box H. Labeling and Tracking Fig. 7. Object at frame t. Left : a real object in video data. Middle : result of object detection in image processing. Right : bounding box and centroid of the object To illustrate how the vehicle speed is calculated while in ROI, we give an example in Fig. 7 and Fig. 8 that shows object position in frame ¢ and t+ 1 respectively. Then, we calculate the distance using Euclidean distance given by Fig. 9. Fig. 8. Object at frame t+ 1. Left : a real object in video data. Middle : result of object detection in image processing. Right : bounding box and centroid of the object Fig. 9. Illustration for Vehicle Speed Estimation from given example at Fig. 7 and Fig. 8. Fig. 10. Preprocessing Result on Background Subtraction GMM. Top : without preprocessing. Bottom : with preprocessing. As described before, video input data is extracted to frames and then each frame is processed firstly by preprocessing. Preprocessing is used to minimize solid shadow that can be detected as object in background subtraction process. We use contrast and brightness adjustment to do preprocessing. The result for this process is given by Fig. 10 which show that with preprocessing, we can get better result for object detection, the word better” in this paper means that shadow is not detected as object. After preprocessing and background subtraction Fig. 12. Shadow Removal Result. Left : before shadow removal. Right : after shadow removal Fig. 16. System Interface Fig. 11. Smoothing Result. Left : before smoothing. Right : after smoothing Fig. 17. ROI Regions Fig. 14. Object Detection Result. Left : before object detection. Right : after object detection Fig. 13. Morphology Closing Result. Left : before operation. Right : after operation which is given by Fig. 14 and Fig. 15 respectively. To integrate all processes together, we create an GUI interface in Java Programming to ease us to do experiment. GUI interface for the system in this paper is given by Fig. 16. Fig. 15. Speed Estimation Result. Left : before speed estimation. Right : after speed estimation from Fig. 18, the best ROI region for 60 degree is full region, for 50 degree is medium to fast region, and for 45 degree is same as 50 degree’s. Then this result will be a reference to do experiment using complete video data in the next. calculate accuracy Acc in percentage from relative error by using Equation 13 and the result for accuracy is given by Fig. 10 The detail about video data that is used in this paper is described at Table 1. Each video data has detail information about fps, T,, T-, H, and known speed of the vehicle. For example, video data’s name ”dtc-15-60d” means that the video is taken place at DTC which vehicle speed is 15 km/h and camera angle 60 degree. Notation V, is estimated speed which is result from the system and Err, is relative error from real speed and estimated speed in percentage (%). Then, we can Fig. 19. Accuracy of Speed Estimation based on Camera View Angle D. Evaluation