# Difference between cv.homographyBasedEstimator.apply() and cv.findHomography()

**URL:** <https://forum.opencv.org/t/difference-between-cv-homographybasedestimator-apply-and-cv-findhomography/7643>\
**Category:** Python\
**Tags:** stitching\
**Created:** [February 18, 2022, 7:53am UTC](https://forum.opencv.org/t/difference-between-cv-homographybasedestimator-apply-and-cv-findhomography/7643 "2022-02-18T07:53:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![rllyryan](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/rllyryan/32/1401_2.png) [@rllyryan](https://forum.opencv.org/u/rllyryan)\
**Post date:** [February 18, 2022, 7:53am UTC](https://forum.opencv.org/t/difference-between-cv-homographybasedestimator-apply-and-cv-findhomography/7643/1 "2022-02-18T07:53:00Z")

</div>

Hi OpenCV community,

Could I ask what is the difference between cv.homographyBasedEstimator.apply() and cv.findHomography()? I find that findHomography produces a ‘better’ matrix to stitch images together (despite differences in rotation and scale). I am trying to convert the stitching\_detail.py file into one that accomodates findHomography instead, however findHomography does not have a pairwise matching utility iirc.

---

<div class="post-metadata">

**Author:** ![crackwitz](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.opencv.org/crackwitz/32/14_2.png) [@crackwitz](https://forum.opencv.org/u/crackwitz)\
**Post date:** [February 18, 2022, 10:00am UTC](https://forum.opencv.org/t/difference-between-cv-homographybasedestimator-apply-and-cv-findhomography/7643/2 "2022-02-18T10:00:32Z")

</div>

> [@rllyryan](#):
>
> however findHomography does not have a pairwise matching utility iirc.

it’s not supposed to. use the _feature matching_ parts of OpenCV for feature matching. that means FLANN in general, and the bruteforce matcher if you’ve just read a trash “tutorial”.

the stitching module is newer than `findHomography`. it does a lot of things in its own way, because it has to.

these two things aren’t interchangeable. each has its purpose.
