def chip_montage(ibs, qaids, config=None): r""" CommandLine: python -m wbia.viz.viz_other chip_montage --show --db PZ_MTEST python -m wbia.viz.viz_other chip_montage --show --db GZ_ALL Example: >>> # DISABLE_DOCTEST >>> from wbia.viz.viz_other import * # NOQA >>> defaltdb = 'seaturtles' >>> import wbia >>> a = ['default'] >>> ibs = wbia.opendb(defaultdb=defaltdb) >>> ibs, qaids, daids = wbia.testdata_expanded_aids(ibs=ibs, a=a) >>> config = None >>> chip_montage(ibs, qaids, config) >>> ut.quit_if_noshow() >>> import wbia.plottool as pt >>> ut.show_if_requested() """ import vtool as vt chip_list = ibs.get_annot_chips(qaids, config2_=config) height = 2000 dsize = (int(height * ut.PHI), height) dst = vt.montage(chip_list, dsize) pt.imshow(dst)
def image_montage(ibs, gids, config=None): r""" CommandLine: python -m ibeis.viz.viz_other image_montage --show --db PZ_Master1 python -m ibeis.viz.viz_other image_montage --show --db GZ_ALL Example: >>> # DISABLE_DOCTEST >>> from ibeis.viz.viz_other import * # NOQA >>> defaltdb = 'seaturtles' >>> import ibeis >>> a = ['default'] >>> ibs = ibeis.opendb(defaultdb=defaltdb) >>> ibs, qaids, daids = ibeis.testdata_expanded_aids(ibs=ibs, a=a) >>> config = None >>> gids = ibs.get_annot_gids(qaids[0:1000]) >>> image_montage(ibs, gids, config) >>> ut.quit_if_noshow() >>> import plottool as pt >>> ut.show_if_requested() """ import vtool as vt img_list = ibs.get_images(gids, config2_=config) height = 2000 dsize = (int(height * ut.PHI), height) dst = vt.montage(img_list , dsize) pt.imshow(dst)
def chip_montage(ibs, qaids, config=None): r""" CommandLine: python -m ibeis.viz.viz_other chip_montage --show --db PZ_MTEST python -m ibeis.viz.viz_other chip_montage --show --db GZ_ALL Example: >>> # DISABLE_DOCTEST >>> from ibeis.viz.viz_other import * # NOQA >>> defaltdb = 'seaturtles' >>> import ibeis >>> a = ['default'] >>> ibs = ibeis.opendb(defaultdb=defaltdb) >>> ibs, qaids, daids = ibeis.testdata_expanded_aids(ibs=ibs, a=a) >>> config = None >>> chip_montage(ibs, qaids, config) >>> ut.quit_if_noshow() >>> import plottool as pt >>> ut.show_if_requested() """ import vtool as vt chip_list = ibs.get_annot_chips(qaids, config2_=config) height = 2000 dsize = (int(height * ut.PHI), height) dst = vt.montage(chip_list, dsize) pt.imshow(dst)
def multidb_montage(): r""" CommandLine: python -m ibeis.scripts.specialdraw multidb_montage --save montage.jpg --dpath ~/slides --diskshow --show Example: >>> # DISABLE_DOCTEST >>> from ibeis.scripts.specialdraw import * # NOQA >>> multidb_montage() """ import ibeis import plottool as pt import vtool as vt import numpy as np pt.ensure_pylab_qt4() ibs1 = ibeis.opendb('PZ_MTEST') ibs2 = ibeis.opendb('GZ_ALL') ibs3 = ibeis.opendb('GIRM_Master1') chip_lists = [] aids_list = [] for ibs in [ibs1, ibs2, ibs3]: aids = ibs.sample_annots_general(minqual='good', sample_size=400) aids_list.append(aids) print(ut.depth_profile(aids_list)) for ibs, aids in zip([ibs1, ibs2, ibs3], aids_list): chips = ibs.get_annot_chips(aids) chip_lists.append(chips) chip_list = ut.flatten(chip_lists) np.random.shuffle(chip_list) widescreen_ratio = 16 / 9 ratio = ut.PHI ratio = widescreen_ratio fpath = pt.get_save_directions() #height = 6000 width = 6000 #width = int(height * ratio) height = int(width / ratio) dsize = (width, height) dst = vt.montage(chip_list, dsize) vt.imwrite(fpath, dst) if ut.get_argflag('--show'): pt.imshow(dst)