예제 #1
0
                                    pose_error.cus(R_e, t_e, R_g, t_g, K, ren,
                                                   obj_id)
                                ]
                            else:
                                e = [1.0]

                        elif p['error_type'] == 'proj':
                            e = [
                                pose_error.proj(R_e, t_e, R_g, t_g, K,
                                                models[obj_id]['pts'])
                            ]

                        elif p['error_type'] == 'rete':
                            e = [
                                pose_error.re(R_e, R_g),
                                pose_error.te(t_e, t_g)
                            ]

                        elif p['error_type'] == 're':
                            e = [pose_error.re(R_e, R_g)]

                        elif p['error_type'] == 'te':
                            e = [pose_error.te(t_e, t_g)]

                        else:
                            raise ValueError('Unknown pose error function.')

                        errs[gt_id] = e

                    # Save the calculated errors.
                    scene_errs.append({
예제 #2
0
                  e = [pose_error.adi(
                    R_e, t_e, R_g, t_g, models[obj_id]['pts'])]

            elif p['error_type'] == 'cus':
              if sphere_projections_overlap:
                e = [pose_error.cus(
                  R_e, t_e, R_g, t_g, K, ren, obj_id)]
              else:
                e = [1.0]

            elif p['error_type'] == 'proj':
              e = [pose_error.proj(
                R_e, t_e, R_g, t_g, K, models[obj_id]['pts'])]

            elif p['error_type'] == 'rete':
              e = [pose_error.re(R_e, R_g), pose_error.te(t_e, t_g)]

            elif p['error_type'] == 're':
              e = [pose_error.re(R_e, R_g)]

            elif p['error_type'] == 'te':
              e = [pose_error.te(t_e, t_g)]

            else:
              raise ValueError('Unknown pose error function.')

            errs[gt_id] = e

          # Save the calculated errors.
          scene_errs.append({
            'im_id': im_id,