opencv_contrib
opencv_contrib copied to clipboard
Add letterbox resize feature
This PR adds a new letterbox resize function in ximgproc. For machine learning models, images often need to be resized to specific dimensions (width x height). In many cases, it is important to maintain the aspect ratio of an image while resizing. The image then needs to be padded either horizontally or vertically to change it to the specified size. See this page for an example: https://en.wikipedia.org/wiki/Letterboxing_(filming)
The new letterboxResize function performs resize while maintaining the aspect ratio, and pads (adds border to) the image to change it to the specified size.
Pull Request Readiness Checklist
See details at https://github.com/opencv/opencv/wiki/How_to_contribute#making-a-good-pull-request
- [X] I agree to contribute to the project under Apache 2 License.
- [X] To the best of my knowledge, the proposed patch is not based on a code under GPL or other license that is incompatible with OpenCV
- [X] The PR is proposed to proper branch
- [X] There is reference to original bug report and related work
- [X] There is accuracy test, performance test and test data in opencv_extra repository, if applicable Patch to opencv_extra has the same branch name.
- [X] The feature is well documented and sample code can be built with the project CMake
force_builders=linux,docs
Hello, Can you please let me know when this PR will be merged? Please let me know if I need to take some action. Thanks.
Hello, This PR is still not merged. Can you please let me know if I need to take any action? Thanks.
@alalek - I submitted this PR several months ago. It has not been merged yet. Can you please help me with the process to get it merged? Thanks.