Ejemplo n.º 1
0
    def show_compositions(self, report):
        # f_ba = report.figure()
        n = len(self.dds.actions)
        f_ab_norm = report.figure(cols=n, caption='Norm of AB')
        f_ab_phase = report.figure(cols=n, caption='Phase of AB')
        f_ab_info = report.figure(cols=n, caption='Certainty of AB')
        for a, b in iterate_indices((n, n)):
            A = self.dds.actions[a]
            B = self.dds.actions[b]
            AB = DiffeoAction.compose(A, B)
            norm_rgb = diffeo_to_rgb_norm(AB.diffeo.d)
            phase_rgb = diffeo_to_rgb_angle(AB.diffeo.d)
            info_rgb = scalaruncertainty2rgb(AB.diffeo.variance)

            label = '%s-%s' % (A.label, B.label)
            caption = '%s, %s' % (A.label, B.label)
            f_ab_norm.data_rgb('%s_norm' % label, norm_rgb, caption=caption)
            f_ab_phase.data_rgb('%s_phase' % label, phase_rgb, caption=caption)
            f_ab_info.data_rgb('%s_info' % label, info_rgb, caption=caption)
Ejemplo n.º 2
0
    def show_compositions(self, report):
        # f_ba = report.figure()
        n = len(self.dds.actions)
        f_ab_norm = report.figure(cols=n, caption='Norm of AB')
        f_ab_phase = report.figure(cols=n, caption='Phase of AB')
        f_ab_info = report.figure(cols=n, caption='Certainty of AB')
        for a, b in iterate_indices((n, n)):
            A = self.dds.actions[a]
            B = self.dds.actions[b]
            AB = DiffeoAction.compose(A, B)
            norm_rgb = diffeo_to_rgb_norm(AB.diffeo.d)
            phase_rgb = diffeo_to_rgb_angle(AB.diffeo.d)
            info_rgb = scalaruncertainty2rgb(AB.diffeo.variance)

            label = '%s-%s' % (A.label, B.label)
            caption = '%s, %s' % (A.label, B.label)
            f_ab_norm.data_rgb('%s_norm' % label, norm_rgb, caption=caption)
            f_ab_phase.data_rgb('%s_phase' % label, phase_rgb, caption=caption)
            f_ab_info.data_rgb('%s_info' % label, info_rgb, caption=caption)
Ejemplo n.º 3
0
def display_diffeo_images(diff, name):
    im_ang = Image.fromarray(diffeo_to_rgb_angle(diff)).resize((400, 300))
    im_norm = Image.fromarray(diffeo_to_rgb_norm(diff)).resize((400, 300))
    im_ang.save(name + 'ang.png')
    im_norm.save(name + 'norm.png')
Ejemplo n.º 4
0
def display_diffeo_images(diff, name):
    im_ang = Image.fromarray(diffeo_to_rgb_angle(diff)).resize((400, 300))
    im_norm = Image.fromarray(diffeo_to_rgb_norm(diff)).resize((400, 300))
    im_ang.save(name + "ang.png")
    im_norm.save(name + "norm.png")