bgsegm: gmg: Relax source type and add test#3760
Merged
asmorkalov merged 2 commits intoopencv:4.xfrom Jun 14, 2024
Merged
Conversation
mshabunin
reviewed
Jun 13, 2024
| TEST_P(bgsubgmg_allTypes, accuracy) | ||
| { | ||
| const int mtype = CV_MAKETYPE(get<0>(GetParam()), get<1>(GetParam())); | ||
| CV_BackgroundSubtractorTest test; |
Contributor
There was a problem hiding this comment.
Perhaps the whole test can be reworked in modern style since you've already done large part of this task. In order to do this we need to:
- Remove
CV_BackgroundSubtractorTestclass and move wholerunfunction body to the test body (mtypebecomes local variable) - Use
cv::theRNG()orTS::ptr()->get_rng()forrng - Use proper
EXPECT_/ASSERT_macros for error checking instead ofCV_Assertandts->set_failed_test_info(...). It can be as simple as just usingEXPECT_GE(TS::ptr()->cmpEps2(...), 0)or slightly more changed, e.g.EXPECT_MAT_NEAR(... ,..., ...)orEXPECT_LT(norm(..., ..., ...), some_eps)
Contributor
Author
There was a problem hiding this comment.
Thank you for your comment ! I fixed them.
mshabunin
approved these changes
Jun 14, 2024
Merged
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Close #3756
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
Patch to opencv_extra has the same branch name.