mirror of
https://github.com/opencv/opencv_contrib.git
synced 2025-10-20 12:55:15 +08:00
Merge pull request #3787 from fengyuentau:imgproc/warpaffine_opt
slightly alter threshold for warpAffine optimization #3787 Merge with https://github.com/opencv/opencv/pull/25984 New`onfusionMatrixes[1]` is ``` [[45 0 0 0 0 0 0 0 0 0] [ 0 57 0 0 0 0 0 0 0 0] [ 0 0 58 2 0 0 0 0 1 0] [ 0 0 0 43 0 0 0 1 0 0] [ 0 0 0 0 39 0 0 0 0 1] [ 0 0 0 1 0 49 0 0 1 0] [ 0 0 0 0 0 0 52 0 0 0] [ 0 0 1 0 0 0 0 54 0 0] [ 0 0 0 0 0 0 0 0 47 0] [ 0 1 0 1 0 0 0 0 2 44]] ``` which is about of pixel value 1 shift in each 4x or 5x pixel value. ### Pull Request Readiness Checklist See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request - [x] I agree to contribute to the project under Apache 2 License. - [x] To the best of my knowledge, the proposed patch is not based on a code under GPL or another license that is incompatible with OpenCV - [ ] The PR is proposed to the proper branch - [ ] There is a reference to the 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 is contained in:
@@ -166,7 +166,7 @@ class digits_test(NewOpenCVTests):
|
||||
confusionMatrixes.append(confusion)
|
||||
|
||||
eps = 0.001
|
||||
normEps = len(samples_test) * 0.02
|
||||
normEps = len(samples_test) * 0.03
|
||||
|
||||
confusionKNN = [[45, 0, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
[ 0, 57, 0, 0, 0, 0, 0, 0, 0, 0],
|
||||
@@ -193,8 +193,8 @@ class digits_test(NewOpenCVTests):
|
||||
self.assertLess(cv.norm(confusionMatrixes[0] - confusionKNN, cv.NORM_L1), normEps)
|
||||
self.assertLess(cv.norm(confusionMatrixes[1] - confusionSVM, cv.NORM_L1), normEps)
|
||||
|
||||
self.assertLess(errors[0] - 0.034, eps)
|
||||
self.assertLess(errors[1] - 0.018, eps)
|
||||
self.assertLess(errors[0] - 0.038, eps)
|
||||
self.assertLess(errors[1] - 0.024, eps)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
|
Reference in New Issue
Block a user