# A Robust RANSAC-Based Planet Radius Estimation for Onboard Visual Based Navigation
## 4 Results
RANSAC estimation is in red, Least Squares Estimator (LSE) estimation is in blue. (b) Estimation errors for model parameters with frame distortion of an increasing amount of pixels. Figure 9: (a) Effect on parameter estimation for input image corrupted with additive Gaussian noise. (b) Model parameter estimation errors for increasing SNR. The error values \(x_{err}\), \(y_{err}\) and \(r_{err}\) are computed as the absolute difference between the parameter obtained from an uncorrupted image and the parameter obtained from the corrupted image. Our RANSAC-based method can support various levels of partial occlusion, due to other celestial bodies or projected shadows. In Figure 12, we provided an example of the robustness of our approach compared to LSE. We observed that the rings of Saturn give rise to numerous outliers, moreover the projected shadows behave similarly to scanline drops. Our pipeline depends on a small number of tunable parameters: background threshold \(\tau_{1}\), edge threshold \(\tau_{2}\), number of active sectors \(S\), and total number of sectors \(K\) for the sector binning step, RANSAC number of iterations, and RANSAC tolerance value. The background threshold value \(\tau_{1}\) can be estimated from the relative brightness of the target relative to the background. Generally, in space applications the target appears brighter than the background, thus the \(\tau_{1}\) parameter can be easily obtained from the analysis of the image histogram. Small objects in the background that result after applying background thresholding are removed in the successive steps of the pipeline. Similarly, for edge threshold \(\tau_{2}\), the threshold value can be obtained from the analysis of the magnitude of the image gradient. The edge threshold value is more relevant for the final estimation as it allows the detection of the target limb, therefore we performed grid-search with leave-one-out cross-validation to select the best value of \(\tau_{2}\) for our dataset. The \(K\) parameter for sector binning allows the user to describe the circle as a composition of \(K\) sectors, thus \(K\) is related to the resolution of the sector binning. Since the previous steps of the pipeline produce a point cloud that spans over a small arc of the total circle, the \(S\) parameter is used to represent the confidence level for the set of points to be included in the final RANSAC estimation. Both parameters \(K\) and \(S\) have been selected performing grid-search leave-one-out cross-validation. Finally, the RANSAC parameter _number of iterations_ can be computed  
Figure 11: (**a**) Effect of frame drop in sample images. RANSAC estimation is in red, LSE estimation is in cyan. (**b**) Estimation error for an increasing percentage of frame drop. It can be noted the robustness of RANSAC with respect to LSE. Figure 12: Estimation of Saturn radius comparison between RANSAC and LSE. RANSAC is able to provide accurate results even with a significant amount of outliers given by the rings of Saturn, whereas LSE is unable to provide satisfactory results. analytically from Equation (2), whereas the RANSAC tolerance value has been selected to a very low value in order to obtain accurate estimation. We expect our pipeline to be implemented on an onboard computer for spacecraft navigation, possible with constraints on maximum execution time to process an image. Thus, we report in Table 2 the relative amount of processing time required for each step of the pipeline. The most intensive step in the pipeline is the RANSAC step that is responsible for almost 45% of the total execution time. The total execution time, based on a set of 500 trials, on a softcore LEON3 (grlib-gpl 2019.2 b4241) implemented on Virtexo Field Programmable Gate Array (FPGA) (Development board ML605 REV E) is 542.22 \(\pm\) 4.90 ms.