Skip to content

Conversation

@shivaibhavd
Copy link
Collaborator

IMPORTANT: All PRs must be linked to an issue (except for extremely trivial and straightforward changes).

Fixes ##396

Description

  1. Added the PerspectiveTransform module, which calculates the perspective transformation matrix and applies it to the input image using OpenCV.
  2. Included test cases for different image types (e.g., mono, BGR, RGB) to ensure the module works as expected.

Alternative(s) considered

Have you considered any alternatives? And if so, why have you chosen the approach in this PR?

Type

Type Choose one: (Feature)

Screenshots (if applicable)

Checklist

  • I have read the Contribution Guidelines
  • I have written Unit Tests
  • I have discussed my proposed solution with code owners in the linked issue(s) and we have agreed upon the general approach

@github-actions
Copy link
Contributor

github-actions bot commented Jan 28, 2025

Test Results Linux

  1 files  ± 0    1 suites  ±0   10m 17s ⏱️ -1s
325 tests +10  237 ✅ +9  83 💤 ±0  5 ❌ +1 
242 runs  +10  154 ✅ +9  83 💤 ±0  5 ❌ +1 

For more details on these failures, see this check.

Results for commit 2203627. ± Comparison against base commit d59bf55.

This pull request removes 1 and adds 11 tests. Note that renamed tests count towards both.
audioToTextXform_test ‑ checkEOS_asr
audioToTextXform_test ‑ check_eos_frame_asr
audioToTextXform_test ‑ check_flushed_buffer_asr
filereadermodule_tests ‑ custom_metadatasize_equal
filereadermodule_tests ‑ custom_metadatasize_larger
filereadermodule_tests ‑ custom_metadatasize_smaller
perspectivetransform_tests ‑ bgr_1080x720
perspectivetransform_tests ‑ dynamic_mode_rgb_320x180
perspectivetransform_tests ‑ getsetprops_basic_to_dynamic
perspectivetransform_tests ‑ mono_1920x960
perspectivetransform_tests ‑ pins_override_static_props
…

♻️ This comment has been updated with latest results.

@github-actions
Copy link
Contributor

github-actions bot commented Jan 28, 2025

Test Results Win-nocuda

  1 files  ± 0    1 suites  ±0   10m 34s ⏱️ +4s
319 tests +10  242 ✅ +10  77 💤 ±0  0 ❌ ±0 
242 runs  +10  165 ✅ +10  77 💤 ±0  0 ❌ ±0 

Results for commit 2203627. ± Comparison against base commit d59bf55.

This pull request removes 1 and adds 11 tests. Note that renamed tests count towards both.
audioToTextXform_test ‑ checkEOS_asr
audioToTextXform_test ‑ check_eos_frame_asr
audioToTextXform_test ‑ check_flushed_buffer_asr
filereadermodule_tests ‑ custom_metadatasize_equal
filereadermodule_tests ‑ custom_metadatasize_larger
filereadermodule_tests ‑ custom_metadatasize_smaller
perspectivetransform_tests ‑ bgr_1080x720
perspectivetransform_tests ‑ dynamic_mode_rgb_320x180
perspectivetransform_tests ‑ getsetprops_basic_to_dynamic
perspectivetransform_tests ‑ mono_1920x960
perspectivetransform_tests ‑ pins_override_static_props
…

♻️ This comment has been updated with latest results.

std::cout << "Transformation Matrix" << std::endl;
std::cout << mDetail->transformMatrix << std::endl;

cv::warpPerspective(mDetail->iImg, mDetail->oImg, mDetail->transformMatrix, mDetail->oImg.size());
Copy link
Collaborator

Choose a reason for hiding this comment

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

just create a wrapper in mDetail instead of making things public

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants