-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
Update gauss blur #2284
Update gauss blur #2284
Conversation
Reviewer's Guide by SourceryThis pull request refactors the Gaussian Blur implementation to match PIL's implementation, including kernel size calculation and kernel generation. It also adds new tests to ensure the correctness of the implementation. Sequence diagram for updated Gaussian Blur processsequenceDiagram
participant Client
participant GaussianBlur
participant GaussianKernel
participant Convolution
Client->>GaussianBlur: apply_blur(image)
GaussianBlur->>GaussianBlur: get_params()
GaussianBlur->>GaussianKernel: create_gaussian_kernel(sigma, ksize)
Note over GaussianKernel: New kernel creation
Note over GaussianKernel: using PIL's approach
GaussianKernel-->>GaussianBlur: normalized_kernel
GaussianBlur->>Convolution: convolve(image, kernel)
Convolution-->>GaussianBlur: blurred_image
GaussianBlur-->>Client: blurred_image
Class diagram for updated Gaussian Blur implementationclassDiagram
class GaussianBlur {
+sigma_limit: tuple
+blur_limit: tuple
+apply(img, kernel)
+get_params_dependent_on_data()
+get_transform_init_args_names()
}
class BlurFunctional {
+create_gaussian_kernel(sigma, ksize)
+convolve(img, kernel)
}
GaussianBlur ..> BlurFunctional: uses
note for GaussianBlur "Changed to use custom kernel"
note for BlurFunctional "Added new kernel creation method"
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: all looks good
- 🟢 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 ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #2284 +/- ##
=========================================
+ Coverage 0 89.85% +89.85%
=========================================
Files 0 50 +50
Lines 0 8820 +8820
=========================================
+ Hits 0 7925 +7925
- Misses 0 895 +895
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
Summary by Sourcery
Tests: