コード例 #1
0
    #         # print("{} - {}".format(img, im.mean()))
    #         # exit()

    #     input_images_stacker = input_images_stacker_nonempty
    #     print("skipped {} images darker than {}".format(num_skipped, config.MIN_BRIGHTNESS_THRESHOLD))

    # sort

    if config.SORT_IMAGES:
        input_images_stacker = sorted(input_images_stacker, key=_sort_helper)

    # debug file sorting:
    # print(*input_images_stacker, sep="\n")
    # exit()

    stacker.NAMING_PREFIX = config.NAMING_PREFIX
    stacker.INPUT_DIRECTORY = config.INPUT_DIR_STACKER
    stacker.RESULT_DIRECTORY = config.OUTPUT_DIR_STACKER

    if config.FIXED_OUTPUT_NAME.endswith(config.EXTENSION):
        stacker.FIXED_OUTPUT_NAME = config.FIXED_OUTPUT_NAME
    else:
        stacker.FIXED_OUTPUT_NAME = config.FIXED_OUTPUT_NAME + config.EXTENSION

    stacker.BASE_DIR = BASE_DIR
    stacker.EXTENSION = config.EXTENSION
    stacker.PICKLE_NAME = config.PICKLE_NAME

    stacker.ALIGN = config.ALIGN

    if config.ALIGN:
コード例 #2
0
ファイル: compressor.py プロジェクト: volzotan/compressor
        setattr(config, directory, path_check_and_expand(variable))

    for directory in config.DIRS_TO_CREATE_STACKER:
        variable = getattr(config, directory)
        create_if_not_existing(variable)

    for directory in config.DIRS_ABORT_IF_MISSING_STACKER:
        variable = getattr(config, directory)
        abort_if_missing(variable)

    input_images_stacker = get_all_file_names(config.INPUT_DIR_STACKER)

    if config.SORT_IMAGES:
        input_images_stacker = sorted(input_images_stacker, key=_sort_helper)

    stacker.NAMING_PREFIX               = config.NAMING_PREFIX
    stacker.INPUT_DIRECTORY             = config.INPUT_DIR_STACKER
    stacker.RESULT_DIRECTORY            = config.OUTPUT_DIR_STACKER

    if config.FIXED_OUTPUT_NAME.endswith(config.EXTENSION):
        stacker.FIXED_OUTPUT_NAME       = config.FIXED_OUTPUT_NAME
    else:
        stacker.FIXED_OUTPUT_NAME       = config.FIXED_OUTPUT_NAME + config.EXTENSION

    stacker.BASE_DIR                    = BASE_DIR
    stacker.EXTENSION                   = config.EXTENSION
    stacker.PICKLE_NAME                 = config.PICKLE_NAME

    stacker.ALIGN                       = config.ALIGN
    stacker.DISPLAY_CURVE               = config.DISPLAY_CURVE
    stacker.APPLY_CURVE                 = config.APPLY_CURVE