Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Adding functions rbegin() and rend() functions to matrix class.#19967

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
alalek merged 5 commits intoopencv:masterfromHattrickGenerator:master
May 20, 2021

Conversation

@HattrickGenerator
Copy link
Contributor

@HattrickGeneratorHattrickGenerator commentedApr 23, 2021
edited by alalek
Loading

This is important to be more standard compliant with C++ and an ever increasing number of people using standard algorithms for better code readability- and maintainability.

The functions are copy pasted from their counterparts (even though they should probably call the counterparts but this gave me some trouble).
They return iterators using std::reverse_iterators

Follow up of an open feature request:
#4641

Edit: Additionally there should be a test implemented for it. This still has to be done.

Pull Request Readiness Checklist

See details athttps://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
force_builders=linux,docs,Custom,Win64build_image:Custom=centos:7buildworker:Custom=linux-1,linux-4,linux-6

@vpisarev
Copy link
Contributor

@HattrickGenerator, thank you for the contribution! Please, add regression tests for this functionality.

@HattrickGenerator
Copy link
ContributorAuthor

HattrickGenerator commentedMay 2, 2021
edited
Loading

@vpisarev, thanks for your comment. A contributor wrote a test for it and I merged it. Do I open a new PR in order to re-run the jenkins builds + tests?

Copy link
Member

@alalekalalek left a comment

Choose a reason for hiding this comment

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

Well done 👍

HattrickGenerator reacted with thumbs up emoji
@alalek
Copy link
Member

Please:

  • fix warnings from Windows builders
  • resolve conflicts (merge upstream code and resolve issues)

HattrickGeneratorand others added5 commitsMay 20, 2021 13:03
This is important to be more standard compliant with C++ and an ever increasing number of people using standard algorithms for better code readability- and maintainability.The functions are copy pated from their counterparts (even though they should probably call the counterparts but this gave me some troube).They return iterators using std::reverse_iteratorsFollow up of an open feature request:opencv#4641
…don't need to repeat the template argument.An instantiating cv::Mat_<int> for example can call it's rbegin() function and doesn't need rbegin<int>() with this convience addition.Follows what is done for forward iterators
@HattrickGenerator
Copy link
ContributorAuthor

Fixed the warning under windows and rebased my branch on master to keep a linear history.

alalek reacted with thumbs up emoji

@alalekalalek merged commit115e471 intoopencv:masterMay 20, 2021
@alalekalalek mentioned this pull requestJun 4, 2021
a-sajjad72 pushed a commit to a-sajjad72/opencv that referenced this pull requestMar 30, 2023
* Adding functions rbegin() and rend() functions to matrix class.This is important to be more standard compliant with C++ and an ever increasing number of people using standard algorithms for better code readability- and maintainability.The functions are copy pated from their counterparts (even though they should probably call the counterparts but this gave me some troube).They return iterators using std::reverse_iteratorsFollow up of an open feature request:opencv#4641* Fix rbegin() and rend() and provide tests for them* Removing unnecessary whitespaces* Adding rbegin and rend to Mat_ class with the right parameters so we don't need to repeat the template argument.An instantiating cv::Mat_<int> for example can call it's rbegin() function and doesn't need rbegin<int>() with this convience addition.Follows what is done for forward iterators* static cast the vector size (return size_t) to an int (that is required for opencv mat constructor)Co-authored-by: Stefan <stefan.gerl@tum.de>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@alalekalalekalalek approved these changes

@vpisarevvpisarevAwaiting requested review from vpisarev

Assignees

@alalekalalek

Projects

None yet

Milestone

4.5.3

Development

Successfully merging this pull request may close these issues.

4 participants

@HattrickGenerator@vpisarev@alalek@stefanhige

[8]ページ先頭

©2009-2025 Movatter.jp