Autonomous Detection of Particles and Tracks in Optical Images

During its initial orbital phase in early 2019, the Origins, Spectral Interpretation, Resource Identification, and Security-Regolith Explorer (OSIRIS-REx) asteroid sample return mission detected small particles apparently emanating from the surface of the near-Earth asteroid (101955) Bennu in optical navigation images. Identification and characterization of the physical and dynamical properties of these objects became a mission priority in terms of both spacecraft safety and scientific investigation. Traditional techniques for particle identification and tracking typically rely on manual inspection and are often time-consuming. The large number of particles associated with the Bennu events and the mission criticality rendered manual inspection techniques infeasible for long-term operational support. In this work, we present techniques for autonomously detecting potential particles in monocular images and providing initial correspondences between observations in sequential images, as implemented for the OSIRIS-REx mission.


Introduction
In January 2019, the Origins, Spectral Interpretation, Resource Identification, and Security-Regolith Explorer (OSIRIS-REx) spacecraft entered into orbit about the near-Earth asteroid (101955) Bennu. Shortly after entering orbit, ejection events were observed from the surface of Bennu that produced orbiting and hyperbolic particles, with some surviving up to multiple days (Lauretta et al., in review). This observation triggered the decision to process images shortly following each downlink to (a) identify particle ejection events that could potentially impact spacecraft safety and (b) generate raw observables for downstream event reconstruction, particle characterization, and trajectory estimation. These goals require timely processing of up to 150 images per day depending on the mission phase, as well as efficient cataloging and dissemination of the raw data. This information is necessary both for spacecraft safety, to ensure that the spacecraft does not collide with any objects, and for the scientific and engineering insight that it provides about the asteroid environment (Leonard et al., in preparation; Pelgrift et al., in preparation; Lauretta et al., in review).
Traditionally, identifying and tracking moving objects has been handled either by manual inspection of monocular images and other sensor measurements, typically through a process known as blinking, or through automated processes that look for objects moving with similar velocity in multiple frames (Groeneveld & Kuiper, 1954;Gehrels, 1991;McMillan et al., 1986;Larsen et al., 2007;Helin et al., 1997). These techniques have largely been developed for terrestrial-based observations of planets, asteroids, and comets, where the distance between the observer and the target is very large, and thus the apparent motion in subsequent images is small and fairly linear. The techniques also frequently rely on a human analyst directly interacting with the data either for extraction or verification. While these methods are effective when there are a few bright objects that are captured in the field of view in each frame moving nearly linearly in the detector, they begin to break down when there is the potential for a large number of dim objects in each frame with substantial non-linear motion observed in the detector, as may be the case when encountering an active asteroid or comet.
In this paper, we describe two algorithms to automate the identification and tracking of many dim, fast-moving objects in optical images. The first algorithm autonomously extracts potential observations of objects from images using image processing techniques. The results from this algorithm can be used to assist an analyst with a manual blinking process by highlighting all of the potential objects in each frame beyond what is seen in the raw image, or they can be fed to an automated linking and tracking algorithm. The second algorithm autonomously generates potential linking and tracks of objects from frame to frame when fed with the sequential results from the first algorithm. These algorithms were implemented using the Goddard Image Analysis and Navigation Tool (GIANT) (Wright et al., 2018) for monitoring particles during the OSIRIS-REx proximity operations at active asteroid Bennu.
The algorithms described in this paper provide a new capability for fast, autonomous detection and tracking of objects in orbit about a celestial body. The autonomous detection technique is designed to enable detection of very dim objects in images where there is significant stray light due to an overexposed body located within the field of view. The autonomous tracking technique is designed to link detections of the same object across numerous image frames when both the observer and the target are moving quickly with respect to each other over the time period of the observations, and it is also robust to spurious detections and multiple objects in the same frame. Both of these techniques represent significant advancements in the current state of the art in space-based object tracking.
First, we describe the image processing steps required to extract potential objects from an optical image. Then we discuss ways to filter these potential objects to reject those that are caused by noise only. Next, we provide examples of how this data can be used to assist an analyst in the manual linking of objects from frame to frame. Finally, we describe a multiple object tracking extended Kalman filter (EKF) autonomous linking and tracking algorithm that can detect potential orbits of observed objects. Throughout the algorithm descriptions, we provide examples of their application to images taken by the NavCam 1 navigation camera onboard the OSIRIS-REx spacecraft .

Autonomous Detection of Potential Objects in Optical Images
Consider an image in which there are numerous small, dim objects in the field of view and one (or more) large, bright objects creating significant stray light throughout the detector. An example of this is shown in Fig. 1 taken on 6 January 2019 by the NavCam 1 navigation camera on the OSIRIS-REx spacecraft. The objective is to extract all of the observations of the particles from the image in an autonomous manner. If we assume that the majority of the objects are much smaller than the resolution of the detector in the angular sense, then we can assume that observations of each object are dominated by the point spread function (PSF) of the camera, and thus we need to identify bright spots that resemble a typical PSF. Because this is similar to the lost-in-space problem for attitude determination using a star field, we can borrow many of the steps that are typically used to extract stars from an image to extract these particles. Here we largely follow the steps in Lang et al. (2010) with some modifications needed for this specific application.
We begin by flattening the image by subtracting a 5 × 5 median-filtered version of the image from the original image as is done in Lang et al. (2010): where I is the original 2D grayscale image, medfilt applies a 2D median filter, and I f lat is the flattened image. This step removes some of the effects of stray light and elevated background signal and allows small, dim detections to stand out. The result of this processing on the example image is shown in Fig. 2

(A).
Now we need to determine the rough level of total noise (read noise, shot noise, etc.) in the intensity values (data number, DN) for each pixel for each image. This can be done in two different ways. If the detector has covered active pixels (pixels that are active but are not exposed to an actual light source), as is common in many engineering and science instruments, then we can take the standard deviation of these covered pixels to estimate the noise level of the detector during each image. If the detector does not have covered active pixels, then we can estimate the noise level by selecting a few thousand random pairs of pixels, computing the difference in each pair, and then computing the standard deviation of the differences, as is done in Lang et al. (2010). If the latter technique is being used and there is a large overexposed body in the field of view, it is most useful to use an outlier rejection criteria on the DN differences to throw out pairs where one pixel is on the body and one is off the body and avoid an overly high noise estimate. The modified z-score (Iglewicz & Hoaglin, 1993) is useful for this task.
Given the rough noise level in the image, we can threshold the median-flattened image to identify all pixels that are some sigma above the background: where I bin is the binary thresholded image, σ is the noise level for the image computed in the previous step, and x is the sigma multiplier. The pixels where this criterion is met can now be said to be "interesting pixels" that require further investigation. The number of sigma above the noise level that is used to perform the threshold can be adjusted higher or lower, depending on how dim detections are expected to be and how tolerant of false detections future processes are, but in our experience, as in Lang et al. (2010), a value of 8 has proven to be effective. The result of the noise estimation and thresholding on the example image is shown in Fig. 2 (B).
With the binary thresholded image available, we now need to stitch together blobs of interesting pixels into single observations. This can be done using a standard 8-connectivity connected components algorithm (Di Stefano & Bulgarelli, 1999). Labeling the image in this way enables us to consider individual interesting blobs, instead of individual pixels. This is especially helpful because we would typically expect the brightest objects to have signal in multiple pixels that meet the threshold requirements, and we want to consider these interesting pixels together. The result of the connected components labeling on the example image is shown in Fig. 2

(C).
We can now process each blob to find the center of the brightness representing each observation. There are a number of different ways this can be performed, with varying levels of accuracy. These range from simple algorithms, such as picking the peak pixel for each blob, to more complicated but more accurate algorithms, such as fitting a representative PSF to the DN values in a least squares sense (Jackman & Dumont, 2013). In our case, the end goal with this processing is to have a single (x, y) pixel location representing each unique blob identified in the labeling scheme.

Identifying Dimmer Particles
The previous steps can successfully identify the majority of particles detected in an image, but on occasion it may be desired to extract detections of particles that are very close to the noise level in the image. For these types of detections, the previous steps may be inadequate to autonomously extract them from an image, and an alternative approach is needed. In particular, the median-filter-flattened image does not remove enough stray light from the image, and using a single noise level does not accurately capture variations in the noise level throughout the image due to variations in stray light. When attempting to detect these particles, we therefore make the following variations to the above steps.
First, instead of using a median-filter-flattened image to remove stray light and locate bright spots in the image, we split the image into small subwindows (typically selected to have a size of 15 × 15 pixels so that enough of the background is captured without capturing too many other bright spots in the image) and estimate a background gradient using the DN levels in the subwindow. Mathematically, this is done by fitting to the DN values from the subwindows using a least squares estimator where bg ij is the background DN value at pixel (i, j), and A, B, and C are the coefficients that are fit in the least squares estimator. Once the background function has been fit, it is evaluated for each pixel in the subwindow and then subtracted from the DN values in the subwindow to produce the flattened DN values for that subwindow. This approach more accurately represents the variations in the stray light levels that can occur in small windows than does a median filter, thus allowing more of the background signature to be removed and dimmer objects to have a larger signal above the surrounding pixels in the flattened image. The flattened example image using this technique is shown in Fig. 3

(A).
Second, instead of using a global noise value for the entire image, the noise level is computed for the same subwindows from which the background was estimated. This is done by taking the standard deviation of the flattened window. Using localized noise levels helps to correct for the fact that the noise varies throughout the image. A global sigma multiplier is still used for the whole image for identifying the detections. The thresholded image using this alternative technique is shown in Fig. 3

(B).
Inserting both of these changes into the previous processing steps enables us to detect potential observations that are as low as 2 sigma above the local noise level, without capturing excessive noise.

Filtering Particle Detections
Whether using the general detection techniques or the techniques for extracting dim detections, it is common to have false positive detections that can distract from the real objects. Therefore, it is desirable to have the ability to filter the presented list of detections to remove some of the false positives.
To begin, we filter detections that correspond to known stars. This filtering involves matching the detections from the image with a catalogue of known stars (i.e., Zacharias et al., 2013;Hog et al., 2000;Brown et al., 2018). There are numerous examples of how to do this in the literature (i.e., Padgett & Kreutz-Delgado, 1997;Mortari et al., 2004;Spratling & Mortari, 2009;Jackman & Dumont, 2013;Lang et al., 2010). Any points that are matched to a known star can safely be ignored from the list of potential particles. If the star catalogue being used is not complete, there may still be stars contained in the list of potential detections. To remove these remaining stars, we need to use multiple images and search for potential detections that appear at the same (within the resolution of the detector) inertial right ascension and declination (according to the known camera model and pointing) multiple times. When there are observations of the same right ascension and declination in multiple images, there is a high probability that they represent a star that was not successfully matched to a known catalogue star, and these detections can be ignored. For our analysis we both match points to a star catalogue, as well as use the right ascension and declination matching to ensure as many stars as possible are removed. In practice, we have found that five detections with the right ascension and declination within 2 pixels of each other over a four-week period indicates a probable star.
The next filtering step is to remove detections that correspond to any extended bodies in the field. There are two different techniques that can be used together to filter these detections. The first technique is to ignore any points whose blobs (found from the connected components labeling) have a large number of points included. This technique effectively ignores extended bodies in the field of view. In our analysis, we have found a maximum blob size of 50 square pixels to be a sufficient threshold; however, this is highly dependent on the imager being used and the objects being imaged.
The second technique is to reject detections that are caused by any extended bodies in the field of view, but that are not large enough to be removed by the previous filtering. When the terrain of the extended body is mostly smooth, this step is not needed, but when the terrain is rough, as is the case for Bennu, the terminator can cause many false positive detections due to local terrain being illuminated in isolated pockets from the rest of the body (an example of how roughness can lead to false positive detections can be seen in Fig. 1). To reject these points, we need to rely on the knowledge of the relative state between the camera and the extended body, as well as the shape model of the extended body. Using this knowledge, we can perform a single bounce ray trace, from the camera, through the detection, to the target body's surface, and then to the light source (typically the Sun). If the ray successfully intersects the body, then does not intersect the body again on the way back to the Sun, we can label the detection as part of the illuminated extended body and thus ignore it. Due to the uncertainty in the relative state between the camera and the extended body, as well as uncertainty in the shape model of the extended body, this approach will not correctly reject 100 percent of points that are on the extended body, but it typically rejects enough so that further analysis is not overwhelmed with false positives along the terminator.
We now need to remove hot pixels from the list of possible detections. This can be done by comparing the list of detections with a list of known hot pixels (if one is maintained for the detector) and ignoring detections that are close to a known hot pixel. If a list of known hot pixels is not maintained for the detector, then we can attempt to identify them using multiple images, similarly to how we identify stars that are not successfully matched to a catalogue. In this case, we search for pixels that result in a possible detection in multiple images. When this occurs, it is probably a hot pixel, and the observations can be ignored. For the NavCam imager used on OSIRIS-REx , a list of known hot pixels is not maintained, therefore we develop the list using the technique described here. We have found that identifying pixels that have detections in more than 10 images over a four-week period is a useful method of finding hot pixels that can be ignored.
With stars, extended bodies, and hot pixels removed from the list of possible detections, we can now filter based on the properties of the detections themselves. We use a "quality code" that is tuned to work with the specific camera and observation conditions of the OSIRIS-REx proximity operations phases. Different cameras and observing conditions will likely require a modified definition and tuning.
The first component of the quality code is the area of the detection, A, defined as the number of connected pixels that are above the specified threshold used in the identification of interesting pixels (the number of the pixels in each blob identified by the connected-components algorithm). Typically, the area for detections ranges from one square pixel to upwards of 20-30 square pixels, depending on the brightness of the observed object and the threshold used. In practice, we have found that areas greater than five square pixels are highly likely to be an actual object, with the probability decreasing as the area decreases below this value.
The second component of the quality code is the deviation of the fit PSF from the expected PSF of the camera. Detections where the fit PSF significantly deviates from the expected PSF are more likely to be false positives than those where the former conforms to the latter. We measure the deviation of the PSF using the percent difference formula where d psf is the relative deviation from the expected PSF, σ e is the expected semimajor axis of the PSF, and σ m is the measured semimajor axis of the PSF. We have found that detections with PSF deviations greater than 100 percent are likely false positives. For NavCam 1, the expected semimajor axis of the PSF is 0.65 pixels.
The final component of the quality code is the signal-to-noise ratio of the detection, computed using the formula in Howell (2006) where s is the signal-to-noise ratio, i DN f i is the summed signal of the detection with background removed in electrons, i (DN f i + bg i ) is the summed signal of the detection and the background in electrons, n is the number of pixels that are summed, dc is the dark current per pixel according to the fit dark current profile for the detector, and rn is the read noise of the detector per pixel. We have found that summing over a 5 × 5 grid of pixels surrounding the peak of the detection provides a reliable measure of the overall signal-to-noise ratio of the detection. In addition, we have found that detections with signal-to-noise ratios higher than 15 are likely to be real, with the probability of a false detection increasing as the signal-to-noise ratio decreases.
Taking these three components, we can compute the quality of a detection using q = clip(A, 1, 5) + (5 − 4/3clip(d psf , 0, 3)) + clip(s/3, 1, 5) 3 where q is the quality, A is the area of the detection, clip(x, y, z) clips value x to be between y and z such that and all else is as defined previously. A quality of 5 indicates that the detection is highly likely to be real, while a quality of 1 indicates that the detection is likely a false positive.
In practice, quality values greater than 4 provide a set of data that is adequate for most human and automated inspections, while detailed analysis of dimmer detections may require quality values between 2 and 3. An example distribution of the quality codes for detections between 1 January 2019 and 3 May 2019 from NavCam 1 images are shown in Fig. 4.

Tracking of Particles Across Image Frames
With possible detections extracted for each image, the next step is to identify detections of the same object in multiple frames. This correspondence confirms whether detections are real objects or false positives and allows for more detailed analysis including event reconstruction (Pelgrift et al., in preparation), trajectory fitting (Leonard et al., in preparation), and other scientific investigations (Lauretta et al., in review).
We consider two primary ways that this information can be used to identify objects traversing multiple frames: (1) by generating visual aids for manual linking and (2) by providing detection data to automated linking algorithms. We discuss both cases here.

Visual Aids for Manual Linking of Particles
One of the most powerful ways to identify the same object in multiple frames is through manual inspection. Typically, this process involves "blinking" images from frame to frame so that a human analyst can visually track moving objects in each frame. This becomes more difficult when the orientation of the camera changes dramatically from frame to frame, the movement of a particle from frame to frame is large over the time scale of the observations, or there are numerous objects in each frame that need to be tracked. Using the possible detections extracted from each image, it becomes possible to create visual aids to make this process easier and faster.
To create a visual aid, we begin by taking all potential detections from images occurring less than four hours before the current image frame under consideration. For each detection, we (1) assume that the object resulting in the detection occurs at the same distance as the central body from the camera along the line-of-sight through the detection, (2) project this point onto a nadir-pointed image plane at the current time using the known camera orientation and the known camera model (Pelgrift et al., 2018), and (3) recenter the current image frame at the projected location of the central body. We then fade each detection according to how long it occurred before the current frame under consideration. For objects moving from frame to frame, this creates an easily distinguishable trail that is particularly apparent when blinking the visual aids from frame to frame. An example of one of these frames is shown in Fig. 5.

Automated Tracking of Particles
Even with the visual aids just described, it can be infeasible to manually track particles when there are thousands of frames that need to be considered. For this reason, we implemented a method for autonomously linking particles from image to image using extended Kalman filters (EKF) (Kalman, 1960;Al-Shakarji et al., 2017). This technique has proven capable of identifying correspondences between images with only a small number of incorrectly linked detections. As an added benefit, this technique also provides a guess at the initial state for the particles that can then be fed to other software for more detailed trajectory analysis. We next provide an overview of the algorithm and the EKF that was implemented, and we show example results of the linking process.

Automated Tracking Algorithm Overview
For the automated tracking of particles, we use a multiple object tracking algorithm to simultaneously link and fit trajectories to particles from frame to frame (Al-Shakarji et al., 2017). For each image k, we try to identify any tracks that begin in that image, while ignoring tracks that have already been identified as starting in previous images. This is done by using an EKF to predict the location of an object in future images, based on the information about that object from observations identified between the starting image k and the current image k + l. These steps are repeated for each image. A broad overview of the algorithm is shown in the flow chart in Fig. 6. More detailed descriptions of select steps are discussed in the following subsections.
We stress that we are forming one EKF for each potential path forward through the images. As an example, consider a particle observed in the first image (image 1) that has two potential initial pairs in the next image (image 2). After creating an EKF to follow each track (two EKFs), the EKFs are propagated to the next image (image 3), and the pairing process described later is performed to identify the next candidate points. This pairing process finds three potential points in image 3 for the first EKF and two potential points in image 3 for the second EKF. The EKFs are cloned to follow each path, resulting in five total EKFs to propagate to the next image (image 4). This process is repeated until there are no future images to consider, or there are no potential pairs in the remaining images that meet the requirements of the pairing algorithm. After all the EKFs have reached a terminal point, they are backwardssmoothed to identify which followed viable paths forward according to the dynamics (filtered based on the post-fit standard deviation of the measurement residuals). These EKFs are kept, and the observations that they include are removed from the pool of potential observations. The process begins again, but starting with image 2 instead of image 1.

Automated Tracking Initial Correspondence
At the beginning of processing for each new image, we do not know what the appropriate correspondences between the detections in the current image and the detections in the future images are, and we do not know how the particles corresponding to the detections in the current image are moving. Therefore, to do the initial correspondences, we need to allow for a wide range of potential pairings. To do this, we assume that the particle that resulted in each detection in the current image is located along the observed line-of-sight vector at the same distance from the camera as the central body. We then assume that the particle is stationary at this point, and we use the known camera attitudes, camera positions, and camera model to determine where this point in inertial space would appear in subsequent images. In each of the subsequent images, we compute the Euclidean distance between the projected particle locations from the first image and the observed particle locations from the image under consideration, and we accept all potential pairs that meet a specified threshold in pixels. Because we know that the particles are not stationary, and therefore the projected locations are not actually where the particles will appear in the subsequent images, we need to set the distance threshold to be large, but we do not want it to be so large that there are extreme numbers of potential pairings to track. In our case, we found a threshold of 400 pixels to be effective for this initial pairing, except in exceedingly crowded particle fields (such as an ejecta event) where a tighter initial distance of 200 pixels was used. We perform this initial pairing between points in all images captured less than 1 hour later than the first image. We are only looking for tracks that begin in the image under consideration. Therefore, any detections that have already been linked to tracks that start in previous images are ignored at this stage.

Extended Kalman Filter Design and Tuning
With the initial pairings made between the first image and subsequent images, we need a way to follow these potential tracks and determine whether we can link more observations to them. An EKF is ideally suited to this task because the prediction of the particle locations in future images improves as more valid observations are added to the track. It is also computationally efficient. EKFs are well described in the literature (Kalman, 1960;Al-Shakarji et al., 2017). Here we describe specific implementation details that we used in our processing.

Extended Kalman Filter Dynamics
At the heart of the EKF is the dynamics model used to predict the current state to a subsequent time. That dynamical model needs to be accurate enough to allow useful predictions, but simple enough that the EKF can run in a reasonable time, especially given that we are processing many different EKFs to identify the tracks. We are tracking objects that are orbiting a small body, with a small gravity field. Therefore, there are two dominant forces acting on the particles: the gravity field of the central body and the solar radiation pressure. We include the gravity as a point mass model and the solar radiation pressure as a basic cannonball model. The gravity assumes the estimated values obtained from the spacecraft's operations in proximity to the body (Scheeres et al., 2019). A scaling term is estimated as part of the state vector for the solar radiation pressure because the particles may have different sizes and masses.

Extended Kalman Filter State Vector
The state vector represents all of the information needed to describe the object being tracked and to predict to future time steps using the dynamics model. For our processing, the state vector includes the inertial position and velocity of the particle with respect to Bennu, as well as a solar radiation term to estimate the effects of solar radiation on the particles, leading to where p x−z are the components of the inertial position, v x−z are the components of the inertial velocity, and s is the solar radiation term assuming a cannonball model (Lucchesi, 2001). The solar radiation term represents the combination of the surface area of the object, the coefficient of reflection, and the mass of the object where c r is the coefficient of reflection, A is the surface area of the particle, and m is the mass of the particle. To initialize the state vector, we assume that the object is located along the line-of-sight vector through the observation at the same distance as the central body is from the camera; we further assume that the initial velocity with respect to Bennu is zero and the solar radiation term is 0.08 m 2 /kg.

Extended Kalman Filter Measurements
The measurements used to update the EKF are the observations of the particles in each image, expressed in pixels. The known attitude of the camera and the known geometric camera model are used to transform the state to the predicted observation at a given time. Partial derivatives of the camera model and rotation were derived to compute the measurement sensitivity matrix, used to linearly predict how a change in the state would change the predicted particle location and the resulting residual.

Extended Kalman Filter
Tuning EKFs need to be tuned to be effective. Aspects that should be tuned include the uncertainty on the initial state, the weighting assumed for each measurement, and the process noise included to account for deviations from the assumed dynamics. We assumed the measurements were each accurate to one tenth of a pixel (1σ), the uncertainty in the initial position was one tenth of a pixel in plane of sky and 5 km in the range direction (1σ), the initial uncertainty in the velocity was 50 cm/s (1σ), and the solar radiation term initial uncertainty was 1 m 2 /kg (1σ). For the process noise, we used a weighting scheme based on the range to the body, because the closer to the body the particle is, the greater the effects of the gravity mis-modeling from assuming a point mass. In addition, we kept the process noise large to reflect the overall uncertainty in the dynamical environment. We used a process noise of where q = −1.816 × 10 −6 (r − 250) + 1 × 10 −3 m/s/s 1/2 , r is the radial distance from the central body in meters, and q has a minimum value of 1 × 10 −6 m/s/s 1/2 at a range of 800 m. The process noise matrix is added directly to the time derivative of the covariance matrix usingṖ = FP + PF T + Q whereṖ is the covariance time derivative and F is the Jacobian matrix of the dynamics model with respect to a change in the state vector. This increases the velocity uncertainty between 0.7 mm/s and 70 cm/s (1σ) over the course of 30 minutes depending on the range to the body. This high level of process noise (particularly near the surface) helps to keep the filters from becoming locked onto a poor solution and has proven useful for fitting a range of particle trajectories.

Subsequent Detection Pairings
After the first pairs of detections are created (Section 3.2.2), EKFs are started for each pair. From this point on, the EKF is used to predict the location of the next observation in upcoming images. The predicted location from the EKF is then compared with the observed detections for the image under consideration using the Euclidean and Mahalanobis distance (Mahalanobis, 1936). If both the distance thresholds are met between the predicted location and the observed locations, they are considered a potential pair. For each potential pair, a new EKF is cloned from the detecting EKF to follow that track. The cloning process includes copying the current state and covariance up to the point of the cloning, as well as the history of all previous measurements ingested by the EKF to this point. For each clone, the paired measurement is provided as the next measurement, and the process continues until no more potential pairs meeting the threshold are found.
When performing this pairing, images with time stamps within one hour of the last image used to update the EKF are all considered. Therefore, a single EKF may have potential pairs from more than one image to clone and follow for the next step. This thoroughness helps to ensure that the correct path is followed.
The Euclidean distance threshold used in this step to identify possible pairings is determined by anticipating that the more measurements that have been ingested by the EKF, the better the prediction will be. We implemented the following linear distance threshold d thresh = 50(8 − n) + 10 (12) where d thresh is the distance threshold in pixels, n is the number of measurements that have been ingested by the EKF, and d thresh has a minimum value of 10 pixels. In addition to the Euclidean threshold, we use a Mahalanobis threshold, given by with m 2 being the squared Mahalanobis distance, y being the pixel location of the current observation under consideration,ŷ being the predicted location of the observation in the current image, P I x being the covariance of the state vector mapped into the measurement space, and R being the covariance matrix of the observation itself in the measurement space (Mahalanobis, 1936). In our analysis, we have excluded potential paths where the next detection has a Mahalanobis squared distance of more than 25. Using both the Euclidean distance and the Mahalanobis distance makes for a more robust system. The Euclidean distance threshold helps to ensure that the right path is followed early on, before the filter has converged on a solution, while the Mahalanobis distance helps to reject false paths once the filter has converged. This process is repeated until every EKF started from the first image has either run out of future images to consider, or has reached a point where no more potential pairs meet the distance thresholds.

Backwards Smoothing, Identification of Valid Tracks, and Next Images
Once the linking process is complete and the EKFs have been linked to the end of the available images, or to a point where the distance thresholds are no longer met by any future points, the EKFs are backwards smoothed to generate the best fit trajectory through all of the measurements. The residuals from this backward smoothing are then used to determine which EKFs found valid tracks. We find that valid tracks have smoothed residuals with a standard deviation less than 25 pixels (1σ); therefore, any tracks whose residuals meet this threshold are considered to be real tracks. The detections from these tracks are removed from the list of possible detections, and the next image is fed through the same process to identify tracks that start in it. The process is repeated to identify tracks that begin in each image until all images are processed.

Results from Automated Tracking of Particles
Applying the above algorithms to images captured by NavCam 1 while the OSIRIS-REx spacecraft was in orbit during January 2019 successfully produced 103 tracks. Manual tracking was also performed on these images, resulting in 95 tracks. The automated process successfully found 70 percent of the manually identified tracks, and also found 38 additional tracks that were not originally detected manually but were identified after observing the output of the automatic track generation tool. Some false positive tracks were detected, particularly near the location where the terminator and illuminated limb meet, due to a high number of false positive detections from the image processing in this region. We are currently investigating techniques to reject these false positives. The majority of the tracks that were not identified were caused by false positive identifications interfering with the track's path; therefore, finding a way to filter false positives should allow an even higher percentage of all tracks to be identified. Examples of the tracks identified by the automated algorithm are shown in Figs

Conclusion
We describe autonomous methods to extract and link detections of particles in orbit around a celestial body, as observed by a monocular camera. We demonstrate these techniques using images of particles ejected from the surface of the asteroid Bennu, acquired in January 2019 by the NavCam 1 camera onboard the OSIRIS-REx spacecraft. Our methods decrease the amount of manual effort that is required to examine these images and directly enable analysis of the ejected particles and their implications for Bennu. These algorithms are being applied to all images captured by OSIRIS-REx during proximity operations about Bennu so that longer-term trends in the frequency of the particles can be examined.
in the OSIRIS-REx PDS archive. Higher-level products including possible detections and tracks will be available in the Planetary Data System 1 year after departure from the asteroid in accordance with the OSIRIS-REx Data Management Plan.     occurring further from the current frame being more transparent; the gray box represents the field of view of the camera in the current frame; and the outline of the central body is shown as a point of reference. The points are shown in units of corrected pixels (assuming a pinhole projection camera with no lens distortion modeled after NavCam1) assuming the camera was pointed nadir toward the center-of-mass of Bennu. There is one evident track immediately to the right of Bennu and one evident track immediately below Bennu.
Identify potential correspondences from image k to future images assuming zero motion of detected object and Euclidean distance Use an EKF to combine measurements and predict the next location of the particle in subsequent images Identify potential pairs in subsequent images using Euclidean and Mahalanobis distances and the predicted locations Follow each potential pair using an EKF Backwards smooth EKFs and keep the best fits based on standard deviation of residuals Remove detections that have been tracked from list of potential detections and begin process again with next image

Potential pairs found No potential pairs found
Save identified tracks/fit states No more images to process More images to process