11/*
2- * Copyright (c) 2024 Qualcomm Innovation Center, Inc. All rights reserved.
2+ * Copyright (c) 2025 Qualcomm Innovation Center, Inc. All rights reserved.
33 * SPDX-License-Identifier: Apache-2.0
44*/
55
@@ -15,20 +15,18 @@ namespace fastcv {
1515// ! @{
1616
1717/* *
18- * @brief Down-scale the image by averaging each 2x2 pixel block.
19- * This function is not bit-exact with cv::resize but provides faster execution time on Qualcomm's processor.
20- * @param _src The first input image data, type CV_8UC1, src height must be a multiple of 2
21- * @param _dst The output image data, type CV_8UC1
22- */
23- CV_EXPORTS_W void resizeDownBy2 (cv::InputArray _src, cv::OutputArray _dst);
24-
25- /* *
26- * @brief Down-scale the image by averaging each 4x4 pixel block.
27- * This function is not bit-exact with cv::resize but provides faster execution time on Qualcomm's processor.
28- * @param _src The first input image data, type CV_8UC1, src height must be a multiple of 4
29- * @param _dst The output image data, type CV_8UC1
30- */
31- CV_EXPORTS_W void resizeDownBy4 (cv::InputArray _src, cv::OutputArray _dst);
18+ * @brief Down-scales the image using specified scaling factors or dimensions.
19+ * This function supports both single-channel (CV_8UC1) and two-channel (CV_8UC2) images.
20+ *
21+ * @param _src The input image data, type CV_8UC1 or CV_8UC2.
22+ * @param _dst The output image data, type CV_8UC1 or CV_8UC2.
23+ * @param dsize The desired size of the output image. If empty, it is calculated using inv_scale_x and inv_scale_y.
24+ * @param inv_scale_x The inverse scaling factor for the width. If dsize is provided, this parameter is ignored.
25+ * @param inv_scale_y The inverse scaling factor for the height. If dsize is provided, this parameter is ignored.
26+ *
27+ * @note If dsize is not specified, inv_scale_x and inv_scale_y must be strictly positive.
28+ */
29+ CV_EXPORTS_W void resizeDown (cv::InputArray _src, cv::OutputArray _dst, Size dsize, double inv_scale_x, double inv_scale_y);
3230
3331// ! @}
3432
0 commit comments