mirror of
https://github.com/opencv/opencv.git
synced 2026-09-12 05:11:04 -05:00
Fix Rect dimensions in getChannelFromBlob
Fixes https://github.com/opencv/opencv/issues/29570
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user