opencv_contrib icon indicating copy to clipboard operation
opencv_contrib copied to clipboard

Add letterbox resize feature

Open ptelang opened this issue 4 years ago • 3 comments

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

ptelang avatar Jun 29 '21 20:06 ptelang

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.

ptelang avatar Jul 30 '21 16:07 ptelang

Hello, This PR is still not merged. Can you please let me know if I need to take any action? Thanks.

ptelang avatar Nov 08 '21 13:11 ptelang

@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.

ptelang avatar Apr 28 '22 18:04 ptelang