mirror of
https://github.com/opencv/opencv.git
synced 2026-07-29 15:23:05 +04:00
Merge pull request #24539 from LaurentBerger:blobrecttoimage
Add blobrecttoimage #24539 ### Pull Request Readiness Checklist resolves https://github.com/opencv/opencv/issues/14659 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 another license that is incompatible with OpenCV - [x] The PR is proposed to the proper branch - [x] There is a reference to the original bug report and related work #14659 - [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
This commit is contained in:
@@ -1222,6 +1222,20 @@ CV__DNN_INLINE_NS_BEGIN
|
||||
CV_PROP_RW DataLayout datalayout; //!< Order of output dimensions. Choose DNN_LAYOUT_NCHW or DNN_LAYOUT_NHWC.
|
||||
CV_PROP_RW ImagePaddingMode paddingmode; //!< Image padding mode. @see ImagePaddingMode.
|
||||
CV_PROP_RW Scalar borderValue; //!< Value used in padding mode for padding.
|
||||
|
||||
/** @brief Get rectangle coordinates in original image system from rectangle in blob coordinates.
|
||||
* @param rBlob rect in blob coordinates.
|
||||
* @param size original input image size.
|
||||
* @returns rectangle in original image coordinates.
|
||||
*/
|
||||
CV_WRAP Rect blobRectToImageRect(const Rect &rBlob, const Size &size);
|
||||
|
||||
/** @brief Get rectangle coordinates in original image system from rectangle in blob coordinates.
|
||||
* @param rBlob rect in blob coordinates.
|
||||
* @param rImg result rect in image coordinates.
|
||||
* @param size original input image size.
|
||||
*/
|
||||
CV_WRAP void blobRectsToImageRects(const std::vector<Rect> &rBlob, CV_OUT std::vector<Rect>& rImg, const Size& size);
|
||||
};
|
||||
|
||||
/** @brief Creates 4-dimensional blob from image with given params.
|
||||
|
||||
Reference in New Issue
Block a user