Exemplo n.º 1
0
scale = 0.1  # Image scaling, 0.1 works well
sigma = 1  # Filter Size, 1 is default

# Start from initial contour for the series or use previous image's snake
start_from_initial = False

display = False  # Display the images when created

use_future = False  # Use future comparison in convergence
use_failure = True  # Use fault detection

relaxation = 5  # Relaxation parameter, used as a percentage for rightwards motion
difference = 150  # Total pixel distance allowed for each point in the snake

name = Contours.create_folder_name(ends, alpha, beta, w_line, w_edge, gamma,
                                   convergence, start_from_initial, scale,
                                   sigma)

# Path to results location

destination += "ReportImages/"
# destination += "Kronebreen_set" + name
destination += "tests/"

if os.path.exists(destination):
    destination += "{}".format(int(time.time())) + "/"
    os.makedirs(destination)
else:
    os.makedirs(destination)

# Save snake parameters to file for reference