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

imgproc: upgrade warpPerspective precision and fix RISC-V accuracy regressions#28144

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

Open
satyam102006 wants to merge2 commits intoopencv:5.x
base:5.x
Choose a base branch
Loading
fromsatyam102006:fix-27281-riscv-warp-double

Conversation

@satyam102006
Copy link
Contributor

Summary
This PR fixes accuracy regressions on RISC-V platforms forwarpPerspective andremap by upgrading the scalar fallback implementation to use double precision and enforcing its use on RISC-V.

Related Issues
Fixes#27281
Fixes#27279

Detailed Description
The RISC-V optimized kernels (RVV) currently use single-precision floating-point logic (v_float32). However, the OpenCV 5.x reference implementation requires double precisionto pass the strict accuracy tests.

To provide a complete implementation fix without disabling optimizations for other platforms, I have modified modules/imgproc/src/warp_kernels.simd.hpp:

  1. warpPerspective
    Upgraded Scalar Loop: The internal scalar fallback loop was upgraded to usedouble precision variables and matrix coefficients to match the C++ reference implementation.
    nforced Fallback: The SIMD optimization path is explicitly disabled for RISC-V (!defined(__riscv)). This forces execution to use the high-precision scalar loop.

  2. remap:
    Disabled the RISC-V SIMD path (!defined(__riscv)) to force fallback to the standard scalar implementation, preventing precision mismatches caused by vector floating-point logic.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

No reviews

Assignees

No one assigned

Projects

None yet

Milestone

5.0-release

Development

Successfully merging this pull request may close these issues.

2 participants

@satyam102006@asmorkalov

[8]ページ先頭

©2009-2025 Movatter.jp