-
Notifications
You must be signed in to change notification settings - Fork 164
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 convolve function to numeric extension #347
Conversation
This function combines both `convolve_rows` and `convolve_cols` into single call for user convenience
I believe the names are a bit misleading. My first impression was that |
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.
Thanks for this utility.
Formally, it should have been rejected that due to missing tests :-)
but I will add those myself as I'm adding other tests for the convolution implementation
What names?
A |
@mloskot |
@simmplecoder Right. TBH, I did not find the function names too confusing myself, but I did find the |
void convolve(const SrcView& src, const Kernel& ker, const DstView& dst, | ||
convolve_boundary_option option=convolve_option_extend_zero) { | ||
convolve_rows<PixelAccum>(src, ker, dst, option); | ||
convolve_cols<PixelAccum>(dst, ker, dst, option); |
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.
@lpranam This source and destination views overlap in the second call makes me suspicious.
I always tend to use that with intermediate buffer.
On the other hand, the convolve_rows/cols
implementation does the buffering.
Minimal test for new function added in boostorg#347 (with identity kernel only).
Minimal test for new function added in #347 (with identity kernel only).
convolve
function added
Description
This function combines both
convolve_rows
andconvolve_cols
into a single call for user convenience.The need for such function came into the sight when @miralshah365 was implementing
adaptive_threshold
and encountered error due to multiple calls to convolve function with the same source instead of using the result of the first convolution as the source for other.References
Tasklist