Fix Rect dimensions in getChannelFromBlob

Fixes https://github.com/opencv/opencv/issues/29570
This commit is contained in:
Antonio Rojas
2026-07-22 00:48:28 +02:00
committed by GitHub
parent 8d69623051
commit fed23293c3

View File

@@ -60,7 +60,7 @@ void getChannelFromBlob(UMat& m, InputArray blob, int i, int j, int rows, int co
const int newShape[1] { length };
UMat reshaped = ublob.reshape(1, 1, newShape);
UMat roi = reshaped(Rect(0, offset, 1, rows * cols));
UMat roi = reshaped(Rect(offset, 0, rows * cols, 1));
m = roi.reshape(CV_MAT_CN(type), rows);
}