mirror of
https://github.com/opencv/opencv.git
synced 2026-09-25 04:09:57 +03:00
Merge pull request #29571 from antonio-rojas:patch-1
Fix Rect dimensions in getChannelFromBlob
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 };
|
const int newShape[1] { length };
|
||||||
UMat reshaped = ublob.reshape(1, 1, newShape);
|
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);
|
m = roi.reshape(CV_MAT_CN(type), rows);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user