OpenPTV / openptv

This is our central repository, holding only the community approved code and documentation
www.openptv.net
GNU Lesser General Public License v3.0
37 stars 28 forks source link

Epipolar curves in Python #134

Closed yosefm closed 7 years ago

yosefm commented 7 years ago

This is mostly a new epipolar curve drawer, not using the epi_* functions in the library, but reimplementing the algorithm in a more general way. It works on the pixel coordinates rather than staying in the flat metric coordinates. One can calculate any number of points along the curve, thus observing the effect of camera distortions more directly.

I've also included a true unit test - the C test for epipolar lines is just a regression test. We should consider backporting it, but not now, ok?

(This PR is the last I need for getting my replacement of the PyPTV main screen to be distributable.)

alexlib commented 7 years ago

Successfully tested on Mac OS X using pytest

` MacBook-Pro-2:test alex$ pytest --verbose ============================= test session starts ============================== platform darwin -- Python 2.7.13, pytest-3.0.5, py-1.4.32, pluggy-0.4.0 -- /Users/alex/anaconda2/bin/python cachedir: ../.cache rootdir: /Users/alex/Documents/OpenPTV/alexlib/py_bind, inifile: collected 49 items

test_calibration_binding.py::Test_Calibration::test_Calibration_instantiation PASSED test_calibration_binding.py::Test_Calibration::test_full_instantiate PASSED test_calibration_binding.py::Test_Calibration::test_set_angles PASSED test_calibration_binding.py::Test_Calibration::test_set_decentering PASSED test_calibration_binding.py::Test_Calibration::test_set_glass PASSED test_calibration_binding.py::Test_Calibration::test_set_pos PASSED test_calibration_binding.py::Test_Calibration::test_set_primary PASSED test_calibration_binding.py::Test_Calibration::test_set_radial PASSED test_corresp.py::TestMatchedCoords::test_instantiate PASSED test_corresp.py::TestCorresp::test_full_corresp PASSED test_epipolar.py::TestEpipolarCurve::test_two_cameras PASSED test_framebuf.py::TestTargets::test_fill_target PASSED test_framebuf.py::TestTargets::test_fill_target_array PASSED test_framebuf.py::TestTargets::test_read_targets PASSED test_framebuf.py::TestTargets::test_sort_y PASSED test_framebuf.py::TestTargets::test_write_targets PASSED test_framebuf.py::TestFrame::test_read_frame PASSED test_image_processing.py::Test_image_processing::test_arguments PASSED test_image_processing.py::Test_image_processing::test_preprocess_image PASSED test_img_coord.py::Test_image_coordinates::test_image_coord_regress PASSED test_img_coord.py::Test_image_coordinates::test_img_coord_typecheck PASSED test_orientation.py::Test_Orientation::test_match_detection_to_ref PASSED test_orientation.py::Test_Orientation::test_point_positions PASSED test_parameters_bindings.py::Test_MultimediaParams::test_mm_np_instantiation PASSED test_parameters_bindings.py::Test_TrackingParams::test_TrackingParams_getters PASSED test_parameters_bindings.py::Test_TrackingParams::test_TrackingParams_read_from_file PASSED test_parameters_bindings.py::Test_TrackingParams::test_comparison PASSED test_parameters_bindings.py::Test_SequenceParams::test_getters_setters PASSED test_parameters_bindings.py::Test_SequenceParams::test_read_sequence PASSED test_parameters_bindings.py::Test_SequenceParams::test_rich_compare PASSED test_parameters_bindings.py::Test_VolumeParams::test_init_kwargs PASSED test_parameters_bindings.py::Test_VolumeParams::test_read_volume PASSED test_parameters_bindings.py::Test_VolumeParams::test_rich_compare PASSED test_parameters_bindings.py::Test_VolumeParams::test_setters PASSED test_parameters_bindings.py::Test_ControlParams::test_getters_setters PASSED test_parameters_bindings.py::Test_ControlParams::test_instantiate_fast PASSED test_parameters_bindings.py::Test_ControlParams::test_read_control PASSED test_parameters_bindings.py::Test_ControlParams::test_rich_compare PASSED test_parameters_bindings.py::TestTargetParams::test_instantiate_fast PASSED test_parameters_bindings.py::TestTargetParams::test_read PASSED test_segmentation.py::TestTargRec::test_single_target PASSED test_segmentation.py::TestTargRec::test_two_targets PASSED test_trafo_bindings.py::Test_transforms::test_brown_affine PASSED test_trafo_bindings.py::Test_transforms::test_brown_affine_regress PASSED test_trafo_bindings.py::Test_transforms::test_brown_affine_types PASSED test_trafo_bindings.py::Test_transforms::test_full_correction PASSED test_trafo_bindings.py::Test_transforms::test_transforms PASSED test_trafo_bindings.py::Test_transforms::test_transforms_regress PASSED test_trafo_bindings.py::Test_transforms::test_transforms_typecheck PASSED

========================== 49 passed in 0.29 seconds =========================== `