Hi,
Is there python bindings for the Transform estimator algorithm of the VPI library? (I have not found them in the Python API reference)
Is this something planned or do I need to switch to C?
Thank you very much
Hi,
Is there python bindings for the Transform estimator algorithm of the VPI library? (I have not found them in the Python API reference)
Is this something planned or do I need to switch to C?
Thank you very much
Hi,
Yes, you can find it in the below link:
/opt/nvidia/vpi3/src/python/TransformEstimator.cpp
...
m.def("transform_estimator", &TransformEstimator, "source"_a, "target"_a, py::kw_only(), "backend"_a = BackendSet{},
"matches"_a = nullptr, "out_xform"_a = nullptr, "out_inliers"_a = nullptr, "range_rotation"_a = std::nullopt,
"range_xscale"_a = std::nullopt, "range_yscale"_a = std::nullopt, "range_xtranslation"_a = std::nullopt,
"range_ytranslation"_a = std::nullopt, "range_shear"_a = std::nullopt,
"is_affine"_a = params.xfcfg.constrainedHomography2D.isAffine,
"max_solver_iters"_a = params.solverMaxIterations, "max_ransac_iters"_a = params.ransacMaxIterations,
"ransac_reproj_error_tolerance"_a = params.ransacReprojErrorTolerance,
"ransac_confidence_level"_a = params.ransacConfidenceLevel,
"max_refinement_iters"_a = params.maxRefinementIterations, "stream"_a = nullptr, R"pbdoc(
Estimate transform that takes keypoints from source to target.
See also:
Refer to the :vpic:`algorithm explanation<algo_xform_estim>`
for more details and usage examples.
Args:
source (vpi.Array): Array with source keypoints.
target (vpi.Array): Array with target keypoints.
backend (vpi.Backend, optional): The backend to be used by the algorithm.
matches (vpi.Array, optional): Array with correspondence between source and target keypoints.
stream (vpi.Stream, optional): The stream to be used by the algorithm.
out_xform (vpi.Array, optional): Array that will store the estimated transform. If not specified, the function will return a new array.
out_inliers (vpi.Array, optional): Array with the inlier matches.
range_rotation (Tuple[float,float], optional): range with minimum and maximum rotation.
range_xscale (Tuple[float,float], optional): range with minimum and maximum horizontal scaling.
...
Thanks.