Skip to content

filter2d: fix #13179#13252

Merged
opencv-pushbot merged 1 commit intoopencv:3.4from
take1014:filter2d_13179
Jun 26, 2019
Merged

filter2d: fix #13179#13252
opencv-pushbot merged 1 commit intoopencv:3.4from
take1014:filter2d_13179

Conversation

@take1014
Copy link
Copy Markdown
Contributor

fix #13179

Mat src = (src_step != dst_step) ? Mat(Size(width, height), stype, src_data, src_step) : Mat(Size(full_width-offset_x, full_height-offset_y), stype, src_data, src_step);
Mat dst = (src_step != dst_step) ? Mat(Size(width, height), dtype, dst_data, dst_step) : Mat(Size(full_width, full_height), dtype, dst_data, dst_step);
int _width = (src_step != dst_step) ? width : full_width;
int _height = (src_step != dst_step) ? height : full_height;
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

(src_step != dst_step)

I believe this condition should be improved (steps have no correlation with image sizes / ROIs).

@vpisarev vpisarev self-assigned this Feb 19, 2019
@vpisarev
Copy link
Copy Markdown
Contributor

ok, this looks good as a temporary solution; however, it looks like it solves the problem by disabling DFT-based convolution in some cases, which may result in significant speed degradation when we use ROI of the source image (e.g. we took 10000x10000 image and took 9990x9990 ROI of it to filter using 11x11 kernel - that would be very very slow). Nevertheless, let's merge it and wait for the subsequent, more efficient fixes 👍

@take1014
Copy link
Copy Markdown
Contributor Author

@vpisarev Many thanks for your follow-up. I resolved the merge conflict. I will work on improving this problem in the future.

@opencv-pushbot opencv-pushbot merged commit e0b664f into opencv:3.4 Jun 26, 2019
@alalek alalek mentioned this pull request Jun 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants