def calibrate_illumination(tv): img_dir = xdg_config_dir() + "/stbt/" props = { "white-reference-image": "%s/vignetting-reference-white.png" % img_dir, "black-reference-image": "%s/vignetting-reference-black.png" % img_dir, } tv.show("blank-white") await_blank(255) _create_reference_png(props["white-reference-image"]) tv.show("blank-black") await_blank(0) _create_reference_png(props["black-reference-image"]) contraststretch = stbt._dut._display.source_pipeline.get_by_name("illumination_correction") for k, v in reversed(props.items()): contraststretch.set_property(k, v) set_config("global", "contraststretch_params", " ".join(["%s=%s" % (k, v) for k, v in props.items()]))
def calibrate_illumination(tv): img_dir = xdg_config_dir() + '/stbt/' props = { 'white-reference-image': '%s/vignetting-reference-white.png' % img_dir, 'black-reference-image': '%s/vignetting-reference-black.png' % img_dir, } tv.show("blank-white") await_blank(255) _create_reference_png(props['white-reference-image']) tv.show("blank-black") await_blank(0) _create_reference_png(props['black-reference-image']) contraststretch = stbt._display.source_pipeline.get_by_name( 'illumination_correction') for k, v in reversed(props.items()): contraststretch.set_property(k, v) set_config('global', 'contraststretch_params', ' '.join(["%s=%s" % (k, v) for k, v in props.items()]))
def calibrate_illumination(tv): img_dir = xdg_config_dir() + '/stbt/' props = { 'white-reference-image': '%s/vignetting-reference-white.png' % img_dir, 'black-reference-image': '%s/vignetting-reference-black.png' % img_dir, } tv.show("blank-white") await_blank(255) _create_reference_png(props['white-reference-image']) tv.show("blank-black") await_blank(0) _create_reference_png(props['black-reference-image']) contraststretch = stbt._dut._display.source_pipeline.get_by_name( 'illumination_correction') for k, v in reversed(props.items()): contraststretch.set_property(k, v) set_config( 'global', 'contraststretch_params', ' '.join(["%s=%s" % (k, v) for k, v in props.items()]))