コード例 #1
0
    def on_click_inside(self, event, ax):
        import wbia.plottool as pt

        viztype = ph.get_plotdat(ax, 'viztype', None)
        logger.info('[ik] viztype=%r' % viztype)
        if viztype is None:
            pass
        elif viztype == 'keypoints':
            kpts = ph.get_plotdat(ax, 'kpts', [])
            if len(kpts) == 0:
                logger.info('...nokpts')
            else:
                logger.info('...nearest')
                x, y = event.xdata, event.ydata
                import vtool as vt

                fx = vt.nearest_point(x, y, kpts)[0]
                self._select_ith_kpt(fx)
        elif viztype == 'warped':
            hs_fx = ph.get_plotdat(ax, 'fx', None)
            if hs_fx is not None:
                kp = self.kpts[hs_fx]  # FIXME
                sift = self.vecs[hs_fx]
                df2.draw_keypoint_gradient_orientations(self.chip,
                                                        kp,
                                                        sift=sift,
                                                        mode='vec',
                                                        fnum=pt.next_fnum())
                pt.draw()
        elif viztype.startswith('colorbar'):
            pass
        else:
            logger.info('...unhandled')
        self.draw()
コード例 #2
0
    def show_each_dstncvs_chip(self, dodraw=True):
        """
        CommandLine:
            python -m wbia.viz.interact.interact_matches --test-show_each_dstncvs_chip --show

        Example:
            >>> # DISABLE_DOCTEST
            >>> from wbia.viz.interact.interact_matches import *  # NOQA
            >>> self = testdata_match_interact(mx=1)
            >>> self.show_each_dstncvs_chip(dodraw=False)
            >>> pt.show_if_requested()
        """
        dstncvs1, dstncvs2 = scoring.get_kpts_distinctiveness(
            self.ibs, [self.qaid, self.daid])
        logger.info('dstncvs1_stats = ' + ut.get_stats_str(dstncvs1))
        logger.info('dstncvs2_stats = ' + ut.get_stats_str(dstncvs2))
        weight_label = 'dstncvs'
        showkw = dict(weight_label=weight_label, ell=False, pts=True)
        viz_chip.show_chip(self.ibs,
                           self.qaid,
                           weights=dstncvs1,
                           fnum=pt.next_fnum(),
                           **showkw)
        viz_chip.show_chip(self.ibs,
                           self.daid,
                           weights=dstncvs2,
                           fnum=pt.next_fnum(),
                           **showkw)
        if dodraw:
            # self.draw()
            pt.draw()
コード例 #3
0
 def show_each_probchip(self):
     viz_hough.show_probability_chip(self.ibs,
                                     self.qaid,
                                     fnum=pt.next_fnum())
     viz_hough.show_probability_chip(self.ibs,
                                     self.daid,
                                     fnum=pt.next_fnum())
     pt.draw()
コード例 #4
0
 def show_each_chip(self):
     viz_chip.show_chip(self.ibs,
                        self.qaid,
                        fnum=pt.next_fnum(),
                        nokpts=True)
     viz_chip.show_chip(self.ibs,
                        self.daid,
                        fnum=pt.next_fnum(),
                        nokpts=True)
     pt.draw()
コード例 #5
0
 def show_each_fgweight_chip(self):
     viz_chip.show_chip(self.ibs,
                        self.qaid,
                        fnum=pt.next_fnum(),
                        weight_label='fg_weights')
     viz_chip.show_chip(self.ibs,
                        self.daid,
                        fnum=pt.next_fnum(),
                        weight_label='fg_weights')
     # self.draw()
     pt.draw()
コード例 #6
0
 def sv_view(self, dodraw=True):
     """spatial verification view"""
     # fnum = viz.FNUMS['special']
     aid = self.daid
     fnum = pt.next_fnum()
     fig = pt.figure(fnum=fnum, docla=True, doclf=True)
     ih.disconnect_callback(fig, 'button_press_event')
     viz.viz_sver.show_sver(self.ibs, self.qaid, aid2=aid, fnum=fnum)
     if dodraw:
         # self.draw()
         pt.draw()
コード例 #7
0
 def query_last_feature(self):
     ibs = self.ibs
     qaid = self.qaid
     viz.show_nearest_descriptors(ibs,
                                  qaid,
                                  self.last_fx,
                                  pt.next_fnum(),
                                  qreq_=self.qreq_,
                                  draw_chip=True)
     fig3 = pt.gcf()
     ih.connect_callback(fig3, 'button_press_event', self.on_click)
     pt.draw()
コード例 #8
0
    def show_coverage(self, dodraw=True):
        """
        CommandLine:
            python -m wbia.viz.interact.interact_matches --test-show_coverage --show
            python -m wbia.viz.interact.interact_matches --test-show_coverage

        Example:
            >>> # DISABLE_DOCTEST
            >>> from wbia.viz.interact.interact_matches import *  # NOQA
            >>> self = testdata_match_interact(mx=1)
            >>> self.show_coverage(dodraw=False)
            >>> pt.show_if_requested()
        """
        masks_list = scoring.get_masks(self.qreq_, self.cm)
        scoring.show_coverage_mask(self.qreq_, self.cm, masks_list)
        if dodraw:
            # self.draw()
            pt.draw()
コード例 #9
0
        def _wrp():
            import wbia.plottool as pt

            ret = func()
            pt.draw()
            return ret