Skip to content

Add Thickness parameter in drawMatches function#20232

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
gasparitiago:drawMatches3.4
Jun 18, 2021
Merged

Add Thickness parameter in drawMatches function#20232
opencv-pushbot merged 1 commit intoopencv:3.4from
gasparitiago:drawMatches3.4

Conversation

@gasparitiago
Copy link
Copy Markdown
Contributor

@gasparitiago gasparitiago commented Jun 7, 2021

This commit adds the feature of selecting the thickness
of the matches drawn by the drawMatches function.

In larger images, the default thickness of 1 pixel creates images
that are hard to visualize.

resolves #20095

Pull Request Readiness Checklist

See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request

  • I agree to contribute to the project under Apache 2 License.
  • To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
  • The PR is proposed to proper branch
  • There is reference to original bug report and related work
  • There is accuracy test, performance test and test data in opencv_extra repository, if applicable
    Patch to opencv_extra has the same branch name.
  • The feature is well documented and sample code can be built with the project CMake

This commit adds the feature of selecting the thickness
of the matches drawn by the drawMatches function.

In larger images, the default thickness of 1 pixel creates images
that are hard to visualize.
Copy link
Copy Markdown
Member

@alalek alalek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me 👍

There are some low priority questions about:

  • compatibility of Python bindings (we don't check them actually)
  • documentation of parameters

const std::vector<DMatch>& matches1to2, InputOutputArray outImg,
const int matchesThickness, const Scalar& matchColor=Scalar::all(-1),
const Scalar& singlePointColor=Scalar::all(-1), const std::vector<char>& matchesMask=std::vector<char>(),
int flags=DrawMatchesFlags::DEFAULT );
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vpisarev I believe we should define strategy about changes which should be migrated to OpenCV 5.0 major release

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Regarding Python bindings: I've tested the code provided by the author of #20095 and it's working fine.

Regarding the documentation: the new parameter should be documented when it's only used in an overloaded function? If so, I can take a look at it.
My first try was to include it as a parameter of the original function, but some errors happened due to the function names inside of binary files, that's why I've created a new function.

@opencv-pushbot opencv-pushbot merged commit c2263db into opencv:3.4 Jun 18, 2021
@alalek alalek mentioned this pull request Jun 19, 2021
@alalek alalek mentioned this pull request Oct 15, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants