Exemple #1
0
def run():
    parameters = []
    parameters_set = helpers.Parameters()
    parameters_set.factor = float(argv[4])
    parameters_set.file_postfix = "_[enhanced" + argv[1].capitalize() + "]_[factor=" + str(parameters_set.factor) + "]"

    parameters.append(parameters_set)

    helpers.simple_process_directory(argv[2], argv[3], get_proper_processor(), parameters)
Exemple #2
0
def run():

    parameters = []

    stddevs = (3, 6, 9, 12, 15)

    for stddev in stddevs:
        parameters_set = helpers.Parameters()

        parameters_set.mean = 0
        parameters_set.stddev = stddev
        parameters_set.file_postfix = "_[noise]" + param_to_postfix(
            parameters_set)

        parameters.append(parameters_set)

    helpers.simple_process_directory(sys.argv[1], sys.argv[2], noise,
                                     parameters)

    for param_set in parameters:
        param_set.file_postfix = "_[noise_colored]" + param_to_postfix(
            param_set)

    helpers.simple_process_directory(sys.argv[1], sys.argv[2], colored_noise,
                                     parameters)

    parameters = []

    probabilities = (0.001, 0.005, 0.01, 0.02, 0.04, 0.08, 0.15)

    for probability in probabilities:
        parameters_set = helpers.Parameters()

        parameters_set.mean = 128
        parameters_set.stddev = 110
        parameters_set.probability = probability
        parameters_set.file_postfix = "_[noise_peak]_[probability=" + str(
            probability) + "]" + param_to_postfix(parameters_set)

        parameters.append(parameters_set)

    helpers.simple_process_directory(sys.argv[1], sys.argv[2], burned_pixels,
                                     parameters)
Exemple #3
0
def run():

    parameters = []
    parameters_set = helpers.Parameters()
    parameters_set.file_postfix = "_[smoothed]"

    parameters.append(parameters_set)

    helpers.simple_process_directory(sys.argv[1], sys.argv[2], smooth,
                                     parameters)
Exemple #4
0
def run():
    parameters = []
    parameters_set = helpers.Parameters()
    parameters_set.percent = argv[3]
    parameters_set.file_postfix = "_" + argv[3]

    parameters.append(parameters_set)

    helpers.simple_process_directory(argv[1], argv[2], wavlet_processor,
                                     parameters)
def run():
    number_of_objects_string = argv[3]
    parameters = []
    parameters_set = helpers.Parameters()
    parameters_set.file_postfix = "_[randomObjects]_[numberOfObjects=" + number_of_objects_string + "]"
    parameters_set.shapes_to_add = prepare_objects_data(int(number_of_objects_string))

    parameters.append(parameters_set)

    helpers.simple_process_directory(argv[1], argv[2], draw_objects, parameters)
def run():

    parameters = []

    for kernel_size in range( 1, 5 ):
        
        parameters_set = helpers.Parameters()
        parameters_set.kernel_size = kernel_size
        parameters_set.file_postfix = "_[blured]_" + "[kernel=" + str( kernel_size ) + "]"
        
        parameters.append( parameters_set )

    helpers.simple_process_directory( sys.argv[ 1 ], sys.argv[ 2 ], blur, parameters )
Exemple #7
0
def run():

    parameters = []

    watermark = Image.open(sys.argv[3])
    watermark = watermark.split()[
        0]  # one channel is enough as long image is whole white
    alphas = [0.01, 0.05, 0.1, 0.15, 0.25, 0.5]

    for alpha in alphas:
        parameters_set = helpers.Parameters()
        parameters_set.watermark = watermark
        parameters_set.alpha = alpha
        parameters_set.file_postfix = "_[watermark]_[alpha=" + str(alpha) + "]"

        parameters.append(parameters_set)

    helpers.simple_process_directory(sys.argv[1], sys.argv[2], add_watermark,
                                     parameters)
Exemple #8
0
def run():
    parameters = helpers.Parameters()
    parameters.watermark_filename = "watermark.png"
    helpers.process_directory(argv[1], argv[2], apply_watermark, parameters)