Skip to content

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

Open
wants to merge 2 commits into
base: 4.x
Choose a base branch
from

Conversation

quic-xuezha
Copy link
Contributor

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 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

@asmorkalov asmorkalov self-assigned this Apr 10, 2025
@asmorkalov asmorkalov self-requested a review April 10, 2025 05:31
Comment on lines 22 to 23
* @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.
Copy link
Contributor

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"));
Copy link
Contributor

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);
Copy link
Contributor

Choose a reason for hiding this comment

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

The same assert.

Comment on lines 50 to 51
dst1.create(dstSize, CV_8UC1);
dst2.create(dstSize, CV_8UC1);
Copy link
Contributor

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.

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());
Copy link
Contributor

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.

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.

2 participants