-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add fisheye #2157
Add fisheye #2157
Conversation
Reviewer's Guide by SourceryThis PR adds a new fisheye distortion model to the OpticalDistortion transform class. The implementation splits the distortion logic into two separate models: the original camera matrix model and the new fisheye model. The changes include new utility functions for generating distortion maps and updates to the OpticalDistortion class to support both models. Class diagram for OpticalDistortion with fisheye modelclassDiagram
class OpticalDistortion {
-tuple[float, float] distort_limit
-tuple[float, float] shift_limit
-Literal["camera", "fisheye"] mode
-int interpolation
-int border_mode
-ColorType|None value
-ColorType|None mask_value
-int mask_interpolation
-float p
-bool|None always_apply
+get_params_dependent_on_data(params: dict[str, Any], data: dict[str, Any]) dict[str, Any]
+get_transform_init_args_names() tuple[str, ...]
}
note for OpticalDistortion "Supports two distortion models: camera and fisheye"
Class diagram for new utility functionsclassDiagram
class UtilityFunctions {
+get_camera_matrix_distortion_maps(image_shape: tuple[int, int], cx: float, cy: float, k: float) tuple[np.ndarray, np.ndarray]
+get_fisheye_distortion_maps(image_shape: tuple[int, int], cx: float, cy: float, k: float) tuple[np.ndarray, np.ndarray]
}
note for UtilityFunctions "Functions to generate distortion maps for camera and fisheye models"
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
Hey @ternaus - I've reviewed your changes and they look great!
Here's what I looked at during the review
- 🟡 General issues: 1 issue found
- 🟢 Security: all looks good
- 🟢 Testing: all looks good
- 🟡 Complexity: 1 issue found
- 🟢 Documentation: all looks good
Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2157 +/- ##
=========================================
+ Coverage 0 90.01% +90.01%
=========================================
Files 0 48 +48
Lines 0 8547 +8547
=========================================
+ Hits 0 7694 +7694
- Misses 0 853 +853 ☔ View full report in Codecov by Sentry. 🚨 Try these New Features:
|
Summary by Sourcery
Add fisheye distortion model to the OpticalDistortion class, enabling users to choose between camera matrix and fisheye models for image transformations.
New Features:
Enhancements: