How to iterate through a cvMat matrix in JavaCV?
问题 I have an IplImage that I converted in a Matrix, and now I want to iterate cell by cell. CvMat mtx = new CvMat(iplUltima); for (int i = 0; i < 100; i++) { //I need something like mtx[0][i] = someValue; } 回答1: ¡¡I DID IT!! I share it: CvMat mtx = new CvMat(iplUltima); for (int i = 0; i < 100; i++) { for (int j = 0; j < 100; j++) { opencv_core.cvSet2D(mtx, i, j, CvScalar.ONE); } } iplUltima = new IplImage (mtx); Where i = row and j = column 回答2: First, you need to import the following from