/// <summary> /// show the most probable path taken by the robot /// </summary> /// <param name="img">image data within which to draw</param> /// <param name="width">width of the image</param> /// <param name="height">height of the image</param> /// <param name="r">red</param> /// <param name="g">green</param> /// <param name="b">blue</param> /// <param name="line_thickness">thickness of the path</param> /// <param name="min_x">bounding box top left x coordinate</param> /// <param name="min_y">bounding box top left y coordinate</param> /// <param name="max_x">bounding box bottom right x coordinate</param> /// <param name="max_y">bounding box bottom right y coordinate</param> /// <param name="clear_background">whether to clear the image before drawing</param> public void ShowPath(byte[] img, int width, int height, int r, int g, int b, int line_thickness, float min_x_mm, float min_y_mm, float max_x_mm, float max_y_mm, bool clear_background) { if (best_path != null) { best_path.Show(img, width, height, r, g, b, line_thickness, min_x_mm, min_y_mm, max_x_mm, max_y_mm, clear_background, 0); } }
/// <summary> /// show the tree of possible paths /// </summary> /// <param name="img"></param> /// <param name="width"></param> /// <param name="height"></param> /// <param name="r"></param> /// <param name="g"></param> /// <param name="b"></param> /// <param name="line_thickness"></param> public void ShowTree( byte[] img, int width, int height, int r, int g, int b, int line_thickness) { for (int i = 0; i < ActivePoses.Count; i++) { bool clearBackground = false; if (i == 0) { clearBackground = true; } particlePath path = ActivePoses[i]; path.Show(img, width, height, r, g, b, line_thickness, min_tree_x, min_tree_y, max_tree_x, max_tree_y, clearBackground, root_time_step); } }