Currently, writing data in row-major order is slow, when there are multiple channels.
Since the data is converted with np.asfortranarray in this case. In order to get rid of this slow path, the Mat::copy_from method has to cope with row-major multi-channel data.
The input data is expected to have channels first. In the case of row-major order, this means that channels are not contiguous in memory. It probably makes sense to put the channel dimension last on the fly in the Mat::copy_from method.
Currently, writing data in row-major order is slow, when there are multiple channels. Since the data is converted with
np.asfortranarray
in this case. In order to get rid of this slow path, theMat::copy_from
method has to cope with row-major multi-channel data.The input data is expected to have channels first. In the case of row-major order, this means that channels are not contiguous in memory. It probably makes sense to put the channel dimension last on the fly in the
Mat::copy_from
method.