Abstract
This study aimed to apply a microprocessor on a wireless automated vehicle to achieve real-time tracking of moving objects. The targets captured by the camera on the vehicle were first separated from their background through background subtraction. Next, morphological processing was performed to remove unnecessary information. An enhanced seeded region growing method was used to achieve image segmentation by labeling and segmenting the targets effectively, thus enhancing the accuracy and resolving the problem of object concealment. The corresponding red, green, and blue colors of each target were calculated through a color space, which was then converted into an enhanced luminance/chroma blue/chroma red (YUV) color space for color histogram modeling and storage, so as to increase the system’s tracking speed. The enhanced YUV colors also achieved accurate tracking in dark places. After inputting the next image, an enhanced agglomerative hierarchical clustering method was used to agglomerate and connect pixels with the same YUV for tracking. A proportional-integral-derivative controller controlled the motors on the camera lens and the vehicle so that the target could be tracked properly in real-time. The experimental results revealed that our proposed tracking method performed better than conventional tracking methods.
Keywords
Introduction
In computer vision research, detecting and tracking moving objects has been a popular topic of interest. However, in the past, innovative ideas could not be realized in real-time applications because computers had overly slow computational speeds. Recently, thanks to technological advancements in the computer industry and semiconductor manufacturing, significant developments have been made in computer vision. Rising computational speeds have led to major breakthroughs in algorithm development, which have facilitated the materialization of real-time object-tracking systems.
Even though many tracking algorithms have been proposed, many issues still need to be resolved. For instance, most algorithms underperform when dealing with multiple tracking targets and concealed objects. Although smart algorithms (e.g., genetic algorithms, particle swarm algorithms, ant colony algorithms, and hierarchical clustering) [1] can better deal with multi-object tracking and concealed object detection, several limitations remain, such as the results becoming trapped as locally optimal solutions or convergence speed and precision may be substandard. In addition, when applied in real-time object detection, monitoring whether an algorithm’s speed achieves real-time outcomes is imperative.
In this study, we applied an enhanced seeded region growing method, an enhanced luminance/chroma blue/chroma red (YUV) color space method, and an enhanced agglomerative hierarchical clustering method combined with a series of well-known algorithms to perform object detection and tracking. We installed a proportional-integral-derivative (PID) controller on an automated vehicle and then wirelessly transmitted data from a computer to the automated vehicle. This way, we could initiate or terminate the tracking process and remotely control and monitor the vehicle’s movement. Furthermore, the automated vehicle used in this study could track on 30∘ slopes and adapted to uneven terrain. The main contributions of this study can be summarized as follows:
Effectively improving the accuracy of the seeded region growing method for multiple targets labeling and segmentation to resolve concealed object detection. When objects of varying sizes conceal the target, the algorithm can easily and quickly identify the target. Improving the YUV color space method so that the automated vehicle can still be tracked even in dimly lit areas. Improving the agglomerative hierarchical clustering method to achieve better object classification and detection accuracy. Achieving real-time wireless data transmission without base stations, as well as remotely controlling and monitoring the traveling status of an automated vehicle.
The remaining sections of this paper can be summarized as follows. Section 2 is a literature review. Section 3 introduces the system framework, including the hardware structure and the software interface. Section 4 describes the target detection and modeling process, which consists of background subtraction, morphological processing (using erosion and dilation), image segmentation (using the enhanced seeded region growing method), and target modeling (using the enhanced YUV color space method). Section 5 describes the target tracking process, including the enhanced agglomerative hierarchical clustering method and the use of the PID controller to control the camera lens and vehicle motors. Section 6 shows the experimental results and discussion. Section 7 draws the conclusions, recommendations, and prospects of this study.
McKenna et al. [2] previously designed an adaptive background subtraction method that detects shifting regions and eliminates objects’ shadows. Wren et al. [3] used blobs to represent a person’s neck, torso, and limbs in a movement region. The positions of the blobs were determined by their brightness distribution, and the positions were then used to track a moving person in an indoor setting. Birchfield and Rangarajan [4] proposed the concept of spatiograms, which can be used to compare the changing regions in subsequent images and analyze the relationship between a moving object and shifting regions in an image. Peterfreund [5, 6] added motion information as a contour feature to track objects. In the study by Fujiyoshi and Lipton [7], the detected shifting regions were processed morphologically and through low-pass filtering. A “star” was then created, and its variation cycles were analyzed to determine whether a tracked person was walking or running. Jang and Choi [8] used texture, color, and boundary information to create a feature model for an object and then tracked the object through Kalman filtering. Comaniciu et al. [9] designed a mean shift-based tracking technique that achieves tracking by tabulating the brightness data of a shifting region, assigning different weights based on position, composing the feature model of the target, and identifying the most similar regions between an image and the target model. KaewTrakulPong and Bowden [10] used color as the primary tracking feature. They applied the Munsell color space instead of the common red/blue/green (RGB) color space to convert RGB into 11 basic color column spaces. Karaulova et al. [11] created hierarchical human modules using bar charts to represent the human body in different postures. Ju et al. [12] used articulation points to constrain the activity of patches and achieved tracking by analyzing the activity cycles of these articulations.
MacLachlan and Mertz [13] developed a system that combines linear feature extraction, tracking, and motion assessment to achieve a lower false motion report rate and accurately estimate vehicles and pedestrians’ motion. As part of their study, Kruglov and Kruglov [14] examined the effectiveness of methods for determining the motion of objects between frames in a video sequence, especially as applied to the task of controlling roundwood parameters. Hou et al. [15] devised a system to create 3D images and track objects in a plane space. Two charge-coupled devices capture dynamic environment images, digitalized by an image grabber and transformed into a 3D environment image through digital image processing. Object recognition and location followed, leading to object tracking. A multi-object detection and tracking technique was proposed by Elhoseny [16], in which video clips were first converted into morphological operations based on the frame rate using a region-growing model. After separating the targets, parameter optimization through Kalman filtering was performed using a probability-based Grasshopper algorithm. By using the optimal parameters, the selected targets were tracked in each frame through a similarity measure. Liu et al. [17] developed a fuzzy detection strategy to prejudge tracking results. The test results on the OTB100 dataset demonstrated that the strategy enhanced the tracking robustness in complex environments while maintaining a good tracking speed.
Visually, a fixed tracking window is unsuitable because a moving object gradually becomes larger as it moves closer to an observer. Bradski [18] developed the CAMShift algorithm that adjusts the tracking window according to the size and angle of the target. Liu et al. [19] modified the CAMshift algorithm through Kalman filtering. In the hue/saturation/value (HSV) color space, the H, S, and V vectors track a moving target, accurately determine its trajectory, and estimate its upcoming position through Kalman filtering. The algorithm overcomes the limitations of the original CAMShift algorithm, such as divergence in the tracking process. Du [20] recently proposed a Kalman filtering-based approach that expands the CAMShift algorithm. This modified CAMShift algorithm can track rapidly moving objects when the camera is moving. However, the robustness decreases when the object is concealed or the background changes rapidly.
Furthermore, with the ascension of deep learning in recent years, there have been pivotal advancements in computer vision, which is now widely applied in the various aspects of object tracking. Zhou et al. [21] and Park et al. [22] reviewed the latest advancements and research on single- and multi-object tracking and presented several potential directions for future research. Kim et al. [23] proposed a radar-based system that uses the You Only Look Once V3 (YOLOv3) algorithm for object detection and deep simple online and real-time racking (SORT) for tracking. Hong et al. [24] developed a real-time unmanned aerial vehicle-based tracking solution in which the images captured by the vehicles are sent to the cloud through base station networks. In doing so, the authors optimized the network structure of the YOLOv4 and improved the deep SORT algorithms. The detection-tracking mode of the system enables multiple target detection and tracking. Pegoraro et al. [25] proposed using two millimetre-wave radar-based neural network structures for tracking people indoors. Relatedly, Chung et al. [26] used a kernelized correlation filter to achieve real-time tracking of the hand region as a region of interest within the range of a webcam. The images were inputted into two deep convolutional neural networks to identify and comparatively analyze different hand gestures.
System framework
The system structure discussed in this study is shown in Fig. 1. It consists of a computer terminal and an automated vehicle terminal connected through wireless transmission. The computer sends data to the vehicle to initiate or terminate tracking and collects data on the vehicle’s movement status.
The system structure.
The external structure of the Pixy sensor: (a) front, (b) rear.
The Intel(R) Core(TM) i5-4440 CPU @ 3.10 GHz processor was used as the computer’s central processing unit, and a 12.00 GB random-access memory was installed. The operating system was Windows 7 Pro 64-bit. This study used a Pixy camera lens (see Fig. 2) to acquire images from external sources and import them into the system. The Pixy sensor uses its mounted NXP LPC4330, 204 MHz, dual-core microprocessor to perform computing instead of a computer. The internal codes of the microprocessor can be edited using Keil uVision5 software when connected to a computer through a micro-universal serial bus (USB). The tracking status of the lens can be viewed through the Qt Creator environment on a computer. The Pixy sensor uses an OmniVision OV9715 lens that captures images in RGB colors at a resolution of 1280
We used an Arduino Mega2560 R3-compatible version (see Fig. 3) as the microprocessor development board. The board has 54 digital input/output pins (15 of which can be used as pulse width modulation outputs), 16 analog inputs, four universal asynchronous receiver/transmitter serial ports, and uses a 16 MHz oscillator. Because it has a bootloader, the board enables direct USB download, saving the need to pass through an external program. The power can be directly supplied through USB or externally through analog-to-digital converter and batteries.
Arduino Mega2560 R3.
We used the XBee module (with the ZigBee protocol) in this study, which included the XBee expansion module V03 (see Fig. 4), the XBee series 2 (see Fig. 5), and the SparkFun XBee Explorer USB (see Fig. 6) to fulfill the low cost, low power consumption, and wireless transmission network demands. The computer was connected to the SparkFun XBee Explorer USB, whose main function is to receive real-time vehicle movement data, transmit them to the C# program on the computer, and decode and verify the authenticity of the data. The data will be displayed if they are true; if not, they are removed, and the preceding data will be kept. We also used the trackable Zumo robot (see Fig. 7, smaller than 10
XBee expansion module V03.
XBee series 2.
SparkFun XBee Explorer USB.
Zumo robot.
Figure 8 shows the operating interface (written in C#) for monitoring the route of the automated vehicle. The left side of the image displays the tracked route. From the drop-down menu, we first choose the XBee COMPORT USB port connected to the computer, click the COMPORT check button, and then select the Start or Stop button to operate.
Operating interface for vehicle route tracking.
The first step in target tracking is completely separating the targets from the background image. The targets in this study were segmented through morphological and image segmentation. The color histogram model of each target was built to facilitate subsequent tracking (to be detailed in Section 5). Figure 9 depicts the target detection and modeling architecture.
Target detection and modelling architecture.
Background subtraction is a widely used method in foreground object detection. Its advantages include its capability to fully segment foreground objects, lower internal fragmentation than other methods, a low calculation load, and suitability in real-time systems. First, a background image is created, and then the background image is subtracted from a camera-captured image. The foreground objects are formed when the difference is greater than or equal to the threshold
where
When the pixels of the target are extremely close to the background image, the target may be partially affected by
The morphological processing operations used in this study were erosion and dilation.
In erosion, the external noise of the target and its uneven sections are removed by determining the target pixels’ four- or eight-neighbor positions. For example, as long as a non-target is located at the target pixel’s four- or eight-neighbor position, then the target pixel is changed into the background. Dilation is mainly used to repair the fragmented pixels of a target by changing all the four- or eight-neighbor positions of the pixels as target images.
In subsequent experiments, we performed one dilation and two erosions.
Image segmentation
After identifying the targets, we must clearly separate them and track them individually. In image segmentation, an image is segmented into several non-overlapping regions based on greyness, color, texture, and shape. These features exhibit similarities in the same region and distinct differences between different regions. On this basis, we proposed the enhanced seeded region growing method, which differs from the conventional seeded region growing method as it reduces the use of many unnecessary seeds, effectively shortens the computational time, and is useful for real-time tracking.
The operating procedure of the enhanced seeded region growing method is as follows. First, scan each pixel from left to right, top to bottom. Then, label a pixel if it is a target based on the corresponding top and left positions: place a new label if there are no labels on the top and left positions; otherwise, use the smallest label to mark the position. When the top and left labels are of different sizes, the larger label is changed to a smaller label and regarded as a seed. After a single scanning, determine the four-neighbor position of a seed, set the position of a larger label as a new seed, and repeat this step until no seeds are produced.
Target modeling
Because changes in brightness strongly affect the modeling or tracking process, we modified the color space used in target modeling by applying the enhanced YUV color space, which can identify objects easily in bright and dim areas. Because cameras often capture color images in RGB, we converted the RGB color space to the enhanced YUV color space using the following equations:
We used color histograms during the modeling process. After target identification through the enhanced seeded region growing method, we selected each target by plotting a rectangular frame that fits the size of the target. The RGB color space was then converted to the enhanced YUV color space, and the YUV color histogram inside the frame was stored in memory.
Tracking a detected target aligns the position of a moving object in a preceding image to the next image and prompts the vehicle to move forward. The tracking algorithm used in this study was derived from cluster analysis, in which objects or samples that share common features are integrated to be internally homogeneous and externally heterogeneous, thus minimizing the within-group differences and maximizing the between-group differences. More specifically, the process involves classifying different observation values as different clusters based on distance, defining the data structures, and grouping similar observation values into the same cluster.
Enhanced agglomerative hierarchical clustering
Similarity in this study was represented by the distance between each pixel as derived using the Euclidean distance. The shorter the distance, the higher the similarity. At first, each pixel was regarded as an independent cluster, and the similarity between neighboring pixels was calculated. Two extremely similar clusters were agglomerated to form a new cluster, and their relationship was documented as a dendrogram. The process of agglomerating two similar clusters was repeated until all pixels belonged to the same cluster. Dendrograms represented the relationships between the clusters, and based on our needs, different cluster sizes were generated in the data set. Unlike agglomerative hierarchical clustering (where each target is viewed as a cluster at the start), our enhanced method combined each pixel with the nearest pixels around it and completed all calculations before the classification process. This prevented inaccurate classifications where improper categories were assigned.
Schematic of the vehicle tracking system.
Schematic of tracking a target with respect to the horizontal and vertical errors.
If multiple targets were identified by the algorithms, as mentioned earlier, the vehicle would randomly select one target for tracking. Figure 10 depicts the vehicle tracking system. The lens motor calculates a tracked object’s
Performing horizontal and vertical tracking using the lens motor is inadequate because real-time tracking cannot be accomplished if the object is outside of the range of the lens’ rotational angle limits. Based on the rotational error, the PID controller’s proportional control can control the rotational speeds of the left and right motors so that a turning object can be tracked and the object is kept at the center of the image. Furthermore, the object’s size can be calculated based on its width and height in an image, thus allowing us to determine its distance from the lens. An object becomes bigger when it is closer to the lens, and vice versa. Here, the wheel speed is controlled using the PID controller’s proportional control concerning the error of the object’s size differences. A smaller size indicates a further distance. Here, the vehicle motor speed can be increased so that the vehicle approaches the object quickly, thus increasing the object size until the set size is reached. The wheel speed is then decreased, thereby completing the real-time vehicle tracking.
Experimental results and discussion
To summarize Sections 5 and 6, the algorithmic sequence of the entire system consists of the following 11 steps:
Extract a 320 Display the object’s color using the buttons and light-emitting diodes and select the most similar RGB colors near the center of the image. Perform image subtraction on the colors selected in Step 2 through background subtraction, thus identifying the target and performing thresholding. Perform one dilation and two erosions on the thresholded object image. Label the targets using enhanced seeded region growing. Save the labeled targets as enhanced YUV values and perform color histogram modeling. Connect similar YUV pixels through enhanced agglomerative hierarchical clustering after inputting the next coded image. Output the position of the randomly selected target in terms of Control the lens motor using the vertical and horizontal errors and control the vehicle motor using the rotational error, thus fixing the target at the center of the image. Control the vehicle motor using the error of the object’s size, thus tracking the target at a suitable size. Return to Step 7 to input the next coded image.
We used MATLAB to simulate the agglomerative hierarchical clustering and enhanced hierarchical clustering methods. Cluster quality is used to evaluate the performance of hierarchical clustering methods. We randomly generated 1500 data points representing pixels, which were submitted to the two algorithms for comparison. The classification spiral plots of the simulation results are shown in Fig. 12, assuming that the data consisted of four categories. Table 1 shows the time required to generate the results in Fig. 12 using the two methods.
Figure 12 shows that the enhanced agglomerative hierarchical clustering method classified the data more appropriately, as the data were properly grouped, and there were no misclassified data. Even though the enhanced agglomerative hierarchical clustering method took longer to generate the results, as shown in Table 1, the time was still within the allowable range (for non-urgent applications). Thus, the enhanced agglomerative hierarchical clustering method performed better concerning our topic.
Time taken to generate the results in Fig. 12
Time taken to generate the results in Fig. 12
Classification spiral plots created through (a) agglomerative hierarchical clustering, and (b) enhanced agglomerative hierarchical clustering.
Conventional YUV at a saturation of (a) 100% and (b) 50%.
Enhanced YUV at a saturation of (a) 100% and (b) 50%.
Tracking performance in different scenarios: (a) single target at normal lighting, (b) single target inside a dimly lit box, (c) multiple targets concealed by a small object, (d) multiple targets concealed by a large object, (e) an object represented by four colors in a rectangle against a simple background, (f) an object represented by four colors in a rectangle against a complex background.
Route of the automated vehicle when tracking a target (red curve) and the statuses of the relevant parameters.
The vehicle tracking an object on a 30∘ slope: (a) top view, (b) side view, (c) front view, (d) rear view, (e) size comparison with other objects.
Figure 13 shows a conventional YUV color space at 100% and 50% saturations. The conventional YUV color space is easily affected by lighting. Both images show a dark region close to the center, which indicates that the classification was inadequate. Objects may not be properly tracked because the target cannot be identified if the colors are not displayed clearly.
For the enhanced YUV color space shown in Fig. 14, the colors only occur at the edges at 100% saturation, so the corresponding colors can be identified quickly. At 50% saturation, there are no dark or black regions at the center of the image, which means that the corresponding colors were not unidentified. In this way, the external environment is less likely to affect the tracking process. Therefore, the enhanced YUV color space overcomes the limitation of the conventional YUV space, which is that tracking cannot be performed properly in dark and dimly lit settings.
Different test experiments
Figure 15 shows the tracking results obtained from various experiments using our approach. The experiments included single- and multi-target tracking and comprised concealed objects of varying sizes, light intensities, and backgrounds.
In Fig. 15, the white frames represent the selected targets. Using the color models stored in memory, the corresponding color models were identified from the images, and then object tracking was achieved using enhanced agglomerative hierarchical clustering. All the subfigures show that the targets were well-tracked in all scenarios as long as their locations were at least dimly lit. This accomplishment is attributed to the enhanced YUV.
Furthermore, when a small object conceals the target, the target would not be misidentified as two separate targets. The target can still be easily tracked even if a large object conceals it and is not affected by the object concealing it. The tracking performance was also excellent against different backgrounds. These achievements are mainly due to the excellent identification capabilities of the enhanced agglomerative hierarchical clustering method, the ability of the improved seeded region growing method to effectively overcome the concealment problem and enhance the tracking accuracy, and the assistance of a series of well-known algorithms.
Last but not least, Fig. 16 shows the tracking status and tracking route displayed on the computer that controls and monitors the process wirelessly, while Fig. 17 shows the vehicle tracking on a 30∘ slope. We used a continuous-track vehicle because it has a large contact area with the ground; its weight is distributed evenly across the ground, and thus, it is prevented from sinking into the ground, and the track surface is firmly attached. The continuous-track vehicle has 88% more grip strength than a four-wheel vehicle and can travel across more uneven terrain.
Conclusions and future research
In this study, we successfully developed a real-time tracking system on a microprocessor. In object detection, we obtained multiple targets through background subtraction and morphology. We then efficiently separated the targets using the enhanced seeded region growth method. Then, during modeling, we built a color histogram model that efficiently reduces brightness impacts using the enhanced YUV color space method. We proposed the enhanced agglomerative hierarchical clustering method in object tracking, which has excellent and stable classification and identification abilities. Lastly, in vehicle tracking, we used the PID controller to control the motors of the lens and the vehicle to track the randomly selected target. Our proposed method performed better in general compared to other conventional tracking algorithms. Even though the computational time of the enhanced agglomerative hierarchical clustering method is longer than that of the conventional one, it is still compatible with current microprocessor speeds. It can still achieve successful real-time tracking without further delay.
In the future, we recommend applying the tracking system in embedded systems robot vision systems, or even other applications that require base station networks, such as long-distance remote monitoring or in-home care. This enables the creation of a more powerful and comprehensive tracking and recognition system.
