Ejemplo n.º 1
0
def test_corner_detection_stereo(omnistereo_model, calibrator,
                                 images_path_as_template,
                                 corner_extraction_args_top,
                                 corner_extraction_args_bottom, img_indices):
    # Corner selection test:
    calibrator.calibrate(omnistereo_model, images_path_as_template,
                         img_indices, corner_extraction_args_top,
                         corner_extraction_args_bottom)

    #     print("DEBUG: image_points", calibrator.calib_top.calibration_pairs[0].calib_img_top.image_points)
    #     print("DEBUG: obj_points", calibrator.calib_bottom.calibration_pairs[0].calib_img_top.obj_points)

    if len(omnistereo_model.top_model.calibrator.omni_monos) > 0 and len(
            omnistereo_model.bot_model.calibrator.omni_monos) > 0:
        from omnistereo.calibration import draw_detected_points_manually
        calibrator.calib_top.omni_monos[0].visualize_points(
            window_name=omnistereo_model.panorama_top.name + " corners " +
            str(0))
        calibrator.calib_bottom.omni_monos[0].visualize_points(
            window_name=omnistereo_model.panorama_bot.name + " corners " +
            str(0))
        draw_detected_points_manually(
            calibrator.calib_top.omni_monos[0].omni_image,
            calibrator.calib_top.omni_monos[0].image_points,
            5,
            show=True)
        draw_detected_points_manually(
            calibrator.calib_bottom.omni_monos[0].omni_image,
            calibrator.calib_bottom.omni_monos[0].image_points,
            5,
            show=True)
Ejemplo n.º 2
0
def test_corner_detection_individually(model, calibrator,
                                       images_path_as_template,
                                       corner_extraction_args, img_indices):
    from omnistereo.calibration import draw_detected_points_manually
    calibrator.calibrate(model, images_path_as_template, img_indices,
                         corner_extraction_args)
    draw_detected_points_manually(model.calibrator.omni_monos[0].omni_image,
                                  model.calibrator.omni_monos[0].image_points,
                                  -3,
                                  show=True)
def test_corner_detection_stereo(omnistereo_model, calibrator, images_path_as_template, corner_extraction_args_top, corner_extraction_args_bottom, img_indices):
    # Corner selection test:
    calibrator.calibrate(omnistereo_model, images_path_as_template, img_indices, corner_extraction_args_top, corner_extraction_args_bottom)

#     print("DEBUG: image_points", calibrator.calib_top.calibration_pairs[0].calib_img_top.image_points)
#     print("DEBUG: obj_points", calibrator.calib_bottom.calibration_pairs[0].calib_img_top.obj_points)

    if len(omnistereo_model.top_model.calibrator.omni_monos) > 0 and len(omnistereo_model.bot_model.calibrator.omni_monos) > 0:
        from omnistereo.calibration import draw_detected_points_manually
        calibrator.calib_top.omni_monos[0].visualize_points(window_name=omnistereo_model.panorama_top.name + " corners " + str(0))
        calibrator.calib_bottom.omni_monos[0].visualize_points(window_name=omnistereo_model.panorama_bot.name + " corners " + str(0))
        draw_detected_points_manually(calibrator.calib_top.omni_monos[0].omni_image, calibrator.calib_top.omni_monos[0].image_points, 5, show=True)
        draw_detected_points_manually(calibrator.calib_bottom.omni_monos[0].omni_image, calibrator.calib_bottom.omni_monos[0].image_points, 5, show=True)
def test_corner_detection_individually(model, calibrator, images_path_as_template, corner_extraction_args, img_indices):
    from omnistereo.calibration import draw_detected_points_manually
    calibrator.calibrate(model, images_path_as_template, img_indices, corner_extraction_args)
    draw_detected_points_manually(model.calibrator.omni_monos[0].omni_image, model.calibrator.omni_monos[0].image_points, -3, show=True)