Skip to content

Commit c55cae4

Browse files
author
Peter Andreas Entschev
committed
Fixed homography documentation
1 parent 3e0abfa commit c55cae4

File tree

3 files changed

+15
-16
lines changed

3 files changed

+15
-16
lines changed

include/af/vision.h

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -306,22 +306,22 @@ AFAPI array dog(const array& in, const int radius1, const int radius2);
306306
\param[in] y_src y coordinates of the source points.
307307
\param[in] x_dst x coordinates of the destination points.
308308
\param[in] y_dst y coordinates of the destination points.
309+
\param[in] htype can be AF_HOMOGRAPHY_RANSAC, for which a RANdom SAmple Consensus will be
310+
used to evaluate the homography quality (e.g., number of inliers), or AF_HOMOGRAPHY_LMEDS,
311+
which will use Least Median of Squares method to evaluate homography quality
309312
\param[in] inlier_thr if htype is AF_HOMOGRAPHY_RANSAC, this parameter will five the maximum L2-distance
310313
for a point to be considered an inlier.
311314
\param[in] iterations maximum number of iterations when htype is AF_HOMOGRAPHY_RANSAC and backend is CPU,
312315
if backend is CUDA or OpenCL, iterations is the total number of iterations, an
313316
iteration is a selection of 4 random points for which the homography is estimated
314317
and evaluated for number of inliers.
315-
\param[in] af_homography_type can be AF_HOMOGRAPHY_RANSAC, for which a RANdom SAmple Consensus will be
316-
used to evaluate the homography quality (e.g., number of inliers), or AF_HOMOGRAPHY_LMEDS,
317-
which will use Least Median of Squares method to evaluate homography quality
318-
\param[in] dtype the array type for the homography output.
318+
\param[in] otype the array type for the homography output.
319319
320320
\ingroup cv_func_homography
321321
*/
322322
AFAPI void homography(array& H, int& inliers, const array& x_src, const array& y_src,
323323
const array& x_dst, const array& y_dst, const af_homography_type htype=AF_HOMOGRAPHY_RANSAC,
324-
const float inlier_thr=3.f, const unsigned iterations=1000, const dtype type=f32);
324+
const float inlier_thr=3.f, const unsigned iterations=1000, const dtype otype=f32);
325325
#endif
326326

327327
}
@@ -622,17 +622,16 @@ extern "C" {
622622
\param[in] y_src y coordinates of the source points.
623623
\param[in] x_dst x coordinates of the destination points.
624624
\param[in] y_dst y coordinates of the destination points.
625+
\param[in] htype can be AF_HOMOGRAPHY_RANSAC, for which a RANdom SAmple Consensus will be
626+
used to evaluate the homography quality (e.g., number of inliers), or AF_HOMOGRAPHY_LMEDS,
627+
which will use Least Median of Squares method to evaluate homography quality.
625628
\param[in] inlier_thr if htype is AF_HOMOGRAPHY_RANSAC, this parameter will five the maximum L2-distance
626629
for a point to be considered an inlier.
627630
\param[in] iterations maximum number of iterations when htype is AF_HOMOGRAPHY_RANSAC and backend is CPU,
628631
if backend is CUDA or OpenCL, iterations is the total number of iterations, an
629632
iteration is a selection of 4 random points for which the homography is estimated
630633
and evaluated for number of inliers.
631-
\param[in] af_homography_type can be AF_HOMOGRAPHY_RANSAC, for which a RANdom SAmple Consensus will be
632-
used to evaluate the homography quality (e.g., number of inliers), or AF_HOMOGRAPHY_LMEDS,
633-
which will use Least Median of Squares method to evaluate homography quality.
634-
\param[in] dtype the array type for the homography output.
635-
\param[out] out is difference of smoothed inputs.
634+
\param[in] otype the array type for the homography output.
636635
\return \ref AF_SUCCESS if the computation is is successful,
637636
otherwise an appropriate error code is returned.
638637
@@ -641,7 +640,7 @@ extern "C" {
641640
AFAPI af_err af_homography(af_array *H, int *inliers, const af_array x_src, const af_array y_src,
642641
const af_array x_dst, const af_array y_dst,
643642
const af_homography_type htype, const float inlier_thr,
644-
const unsigned iterations, const af_dtype type);
643+
const unsigned iterations, const af_dtype otype);
645644
#endif
646645

647646
#ifdef __cplusplus

src/api/c/homography.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ af_err af_homography(af_array *H, int *inliers,
4040
const af_array x_src, const af_array y_src,
4141
const af_array x_dst, const af_array y_dst,
4242
const af_homography_type htype, const float inlier_thr,
43-
const unsigned iterations, const af_dtype type)
43+
const unsigned iterations, const af_dtype otype)
4444
{
4545
try {
4646
ArrayInfo xsinfo = getInfo(x_src);
@@ -74,10 +74,10 @@ af_err af_homography(af_array *H, int *inliers,
7474
af_array outH;
7575
int outInl;
7676

77-
switch(type) {
77+
switch(otype) {
7878
case f32: homography<float >(outH, outInl, x_src, y_src, x_dst, y_dst, htype, inlier_thr, iterations); break;
7979
case f64: homography<double>(outH, outInl, x_src, y_src, x_dst, y_dst, htype, inlier_thr, iterations); break;
80-
default: TYPE_ERROR(1, type);
80+
default: TYPE_ERROR(1, otype);
8181
}
8282
std::swap(*H, outH);
8383
std::swap(*inliers, outInl);

src/api/cpp/homography.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ void homography(array &H, int &inliers,
1818
const array &x_src, const array &y_src,
1919
const array &x_dst, const array &y_dst,
2020
const af_homography_type htype, const float inlier_thr,
21-
const unsigned iterations, const af::dtype type)
21+
const unsigned iterations, const af::dtype otype)
2222
{
2323
af_array outH;
2424
AF_THROW(af_homography(&outH, &inliers,
2525
x_src.get(), y_src.get(),
2626
x_dst.get(), y_dst.get(),
27-
htype, inlier_thr, iterations, type));
27+
htype, inlier_thr, iterations, otype));
2828

2929
H = array(outH);
3030
}

0 commit comments

Comments
 (0)