1 | initial version |
you can try to reshape() your 4d blob to a 2d one.
Mat m2 = oBlob.reshape(1, 8 * 45); // assuming W=45, H=80, and C=8
this should result in a Mat with 1 channel, 45 cols and 8*80 rows. (8 planes, stacked on top of each other)
you can now access a single plane easily using submat:
// 2nd plane:
Mat m = m2.submat(80,80+80, 0,45);
2 | No.2 Revision |
you can try to reshape() your 4d blob to a 2d one.
Mat m2 = oBlob.reshape(1, 8 * 45); 80); // assuming W=45, H=80, and C=8
this should result in a Mat with 1 channel, 45 cols and 8*80 rows. (8 planes, stacked on top of each other)
you can now access a single plane easily using submat:
// 2nd plane:
Mat m = m2.submat(80,80+80, 0,45);