"OpenCV Python到Java代码转换"

2024-10-03 15:30:50 发布

您现在位置:Python中文网/ 问答频道 /正文

我有一些代码想从python转换成java,以便在Android应用程序中使用。在

python代码是:

npaROIResized = imgROI.reshape((1, 600))      

其中imgROIResized是努比·恩达雷代表我从图像中找到的轮廓。在

我现在尝试的java代码是:

^{pr2}$

但我得到了一个错误:

OpenCV Error: Image step is wrong (The matrix is not continuous, 
thus its number of rows can not be changed) in 
cv::Mat cv::Mat::reshape(int, int) const, file

Tags: 代码图像应用程序isnot代表javacv