-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Add WarpPerspective in FastCV extension #3922
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 4.x
Are you sure you want to change the base?
Conversation
* @param _src Input 8-bit image. Size of buffer is srcStride*srcHeight bytes. | ||
* @param _dst Output 8-bit image. Size of buffer is dstStride*dstHeight bytes. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove the information about sizes. The destination buffer is allocated by the function itself automatically.
::testing::Values(perf::szVGA, perf::sz720p, perf::sz1080p)) | ||
{ | ||
cv::Size dstSize = GetParam(); | ||
cv::Mat img = imread(cvtest::findDataFile("cv/shared/baboon.png")); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add EXPECT_FALSE(img.empty());
after the line to check that test input is not empty.
int borderType = get<2>(GetParam()); | ||
cv::Scalar borderValue = Scalar::all(100); | ||
|
||
cv::Mat src = imread(cvtest::findDataFile("cv/shared/baboon.png"), cv::IMREAD_GRAYSCALE); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The same assert.
modules/fastcv/test/test_warp.cpp
Outdated
dst1.create(dstSize, CV_8UC1); | ||
dst2.create(dstSize, CV_8UC1); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no sense to create output buffer before the call. The further function should do it for you.
modules/fastcv/test/test_warp.cpp
Outdated
cv::Mat src = imread(cvtest::findDataFile("cv/shared/baboon.png"), cv::IMREAD_GRAYSCALE); | ||
cv::Mat dst, matrix, ref; | ||
matrix.create(3, 3, CV_32FC1); | ||
dst.create(dstSize, src.type()); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is no sense to create output buffer before the call. The further function should do it for you.
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.