199 create a set of cvgswarp versions that do not get an input gpumat - #200
Merged
morousg merged 3 commits intoAug 26, 2026
Conversation
…o-not-get-an-input-gpumat * main: Update fkl module
Contributor
There was a problem hiding this comment.
Pull request overview
Adds input-independent warp operation descriptors for flexible pipeline composition.
Changes:
- Adds standalone and batch no-input warp overloads.
- Extracts reusable
GpuMatreader construction. - Adds tests for no-input affine and perspective warping.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
include/cvGPUSpeedup.cuh |
Adds no-input warp overloads. |
include/cvGPUSpeedupHelpers.cuh |
Adds the reusable reader helper. |
tests/warping/test_warping_opencv.cu |
Exercises the new operation composition paths. |
Suppressed comments (2)
tests/warping/test_warping_opencv.cu:421
- Every per-image comparison is discarded and the test returns success unconditionally. Aggregate the comparison results and return them (using either the existing cvGS overload as the oracle or an explicit tolerance), otherwise batch-output regressions in the new overload remain undetected.
return true;
tests/warping/test_warping_opencv.cu:492
- This test also returns success regardless of every comparison. After switching it to the no-input overload, aggregate checks for the active planes and verify inactive planes against
defaultValue; do not compare inactive OpenCV buffers, because indicesusedPlanes..NUM_IMGS2were never initialized bywarpPerspective.
return true;
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| std::cout << "Perspective transformation: " << (correct ? "PASS" : "EXPECTED_FAIL") << std::endl; | ||
|
|
||
| return true; |
morousg
deleted the
199-create-a-set-of-cvgswarp-versions-that-do-not-get-an-input-gpumat
branch
August 26, 2026 20:59
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
Suppressed comments (4)
include/cvGPUSpeedup.cuh:484
usedPlanesis caller-controlled but is used as an array bound before any validation. Values greater thanBATCHindex pasttransform_matrices/dstSize, while negative values are forwarded to FKL. Reject values outside[0, BATCH]before entering the loop.
const int& usedPlanes, const cv::Scalar& defaultValue) {
for (int i = 0; i < usedPlanes; ++i) {
tests/warping/test_warping_opencv.cu:306
- This test always returns success even when the new no-input perspective pipeline produces an incorrect result;
correctonly affects the log. Since exact border equality is known not to hold, use a border-aware/tolerant assertion and return that predicate so this overload has effective regression coverage.
return true;
tests/warping/test_warping_opencv.cu:421
- Every per-plane comparison is discarded and the full-batch no-input test returns
trueunconditionally. Aggregate the comparison results (with the intended perspective-border tolerance) and return the aggregate so regressions in this new overload fail CTest.
return true;
tests/warping/test_warping_opencv.cu:491
- Only the first
usedPlanesOpenCV outputs are written, but this loop compares all ten planes, including uninitialized reference buffers, and then the function returns success regardless. Check active planes against OpenCV, explicitly validate the expected default for inactive planes, and return the aggregate result so the partial-batch overload is actually tested.
for (int i = 0; i < NUM_IMGS2; ++i) {
cv::Mat resultcv(d_resultscv[i]);
cv::Mat resultcvGS(d_resultscvGS[i]);
const bool correct = compareAndCheck<CV_8UC3>(resultcv, resultcvGS);
std::cout << "Perspective transformation batch " << i << ": " << (correct ? "PASS" : "EXPECTED_FAIL") << std::endl;
| namespace cvGS { | ||
|
|
||
| template <int InputType> | ||
| inline constexpr auto getReader(const cv::cuda::GpuMat& input) { |
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.
No description provided.