## 1 Introduction  
Image applications are ubiquitous, and the availability of various sensors and platforms such as satellites, mobile phones, and drones is constantly increasing. Indoor positioning, video surveillance, and other social applications have an increasing demand for image reliability and current information. Sensor systems for real-time indoor and outdoor mapping, such as stereo-RGB cameras, RGB-D depth cameras, and other sensors' consumer markets, are constantly growing and low-cost sensors are ubiquitous, especially as the technology in smartphones and the Internet of Things grows increasingly advanced, which is a strong impetus for the development of real-time monitoring and mapping capabilities in indoor and outdoor environments. Moving object detection is an important aspect of real-time detection and mapping and includes detecting and extracting rigid or non-rigid moving objects in the complex background environments of an image sequence or video format. It has been one of the most prominent research areas of image vision and is frequently used in various fields such as video surveillance, assisted driving, scene analysis, target tracking, and target localization [1; 2; 3; 4; 5]. Moving objects are primarily detected using three methods: consecutive frame difference [6], background subtraction [7], and optical flow [8]. The consecutive frame difference method extracts moving objects by differencing two or more successive frames; however, it can only detect targets in a fixed backdrop because determining the target detection threshold is quite tricky. The problem of voids often accompanies the results; moreover, this method is easily disturbed by illumination variation and image noise [9; 10; 11]. The background subtraction method recovers the moving object by differentiating the background model from the current frame. Nevertheless, the algorithm's accuracy is affected by the background modeling method, making it highly complicated. Moreover, this approach is deeply disturbed by the 'ghosting' problem [12; 13; 14]. The optical flow method detects moving objects by calculating the flow vector between each pixel in the current frame and the pixel of the same name in the next frame. Next, it thresholds the image's optical flow field to identify moving objects [15; 16; 17]. Compared with the other two methods, the optical flow method requires no previous knowledge. It can directly estimate the moving object area and generate the motion parameters of moving objects. The optical flow method exhibits higher accuracy and robustness and has a better detection performance for targets with scale changes or deformations. The optical flow method of moving object detection and extraction essentially entails thresholding, classifying, and morphologically processing the optical flow vector values of each image's pixel in turn and then extracting the foreground region of the moving object. [PERSON] et al. [18] were the first to apply the image optical flow estimation to the detection segmentation of moving objects. They used the median radial basis function neural network to divide the images into different regions, such as the still image and motion information, and fuse other motion regions of the same target to extract moving objects. [PERSON] et al. [19] suggested object detection by optical flow and clustering for medical images. Moreover, they proposed the Euclidean norm of the optical flow vector and used it as the clustering features. However, their algorithm had low accuracy and a poor extraction effect with a moving background. [PERSON] et al. [20] introduced the Otsu algorithm to the optical flow method of target detection. They first normalized the optical image flow as a grey image. Next, they used the Otsu algorithm to translate it into a binary image. The Otsu algorithm is the primary method of the optical flow method for motion target detection [21; 22; 23; 24]. Their target extraction results were better under stationary background conditions but poorer results were obtained with a moving background.