In some rare cases, image crops created using ROIs (cvImage(roi)) are not continuous matrices, this leads to an exception when this crop is reshaped for processing:
OpenCV(4.5.5) .../src/modules/core/src/matrix.cpp:1175: error: (-13:Image step is wrong) The matrix is not continuous, thus its number of rows can not be changed in function 'reshape'
This PR fixes that.
In some rare cases, image crops created using ROIs (
cvImage(roi)
) are not continuous matrices, this leads to an exception when this crop is reshaped for processing:OpenCV(4.5.5) .../src/modules/core/src/matrix.cpp:1175: error: (-13:Image step is wrong) The matrix is not continuous, thus its number of rows can not be changed in function 'reshape'
This PR fixes that.