Gray Consistency Optical Flow Algorithm Based on Mask-R-cnn and a Spatial Filter for Velocity Calculation
Donghua Zhao,Yicheng Wu,Chenguang Wang,Chong Shen,Jun Tang,Jun Liu,Hua Yu,Zhumao Lu
DOI: https://doi.org/10.1364/ao.441233
IF: 1.9
2021-01-01
Applied Optics
Abstract:The optical flow method has been widely used to measure the vehicle velocity by observing the stationary ground with a camera looking-down. However, when there are moving objects on the stationary ground, the interfering optical flow field will be generated, which decreases the velocity measurement accuracy of a vehicle relative to the ground. In order to reduce the effects caused by moving objects, this paper integrates pyramid Lucas–Kanade (LK) algorithm with the gray consistency method to use the information of color images thoroughly. First, a mask region with convolutional neural network (Mask-R-CNN) is used to recognize the objects that have motions relative to the ground, and it covers them with masks to enhance the similarity between pixels and to reduce the impacts of the noisy moving pixels. Then images are decomposed into three channels, red, green, and blue (i.e., R , G , and B ), and processed by median filter. Based on the gray consistency method, the optical flow can be obtained by the pyramid LK algorithm. Finally, the velocity is calculated by the optical flow value. The prominent advantages of the proposed algorithm are: (i) increase the velocity measurement accuracy of a vehicle relative to the ground; (ii) use the information of color images acquired with cameras thoroughly and obtain velocity calculation outputs with less fluctuation; (iii) reduce wrong values caused by noises that are from the origin image and introduced by similar color masks. Four experiments are conducted to test the proposed algorithm and results with superior precision and reliability show the feasibility and effectiveness of the proposed method for the velocity measurement accuracy of a vehicle relative to the ground.