OpenCV on Android (java based)
opencv android samples on github
// Matrix of doubles (64-bit floats) with 480 rows and 640 column // CV_64F= 1 chanel, gretscake wiht 64 bits float Mat grayscaleImage(480, 640, CV_64F); // Matrix of 8-bit unsigned integers with 480 rows and 640 columns. // CV_8UC3= 3 chanels - color of 8 bits each Mat rgbImage(480, 640, CV_8UC3);
// Matrix of doubles (64-bit floats) with 480 rows and 640 column // CV_64F= 1 chanel, gretscake wiht 64 bits float Mat grayscaleImage(480, 640, CV_64F);
// Matrix of 8-bit unsigned integers with 480 rows and 640 columns. // CV_8UC3= 3 chanels - color of 8 bits each
Mat rgbImage(480, 640, CV_8UC3);
// matrix_1 allocates a new block of memory. Mat matrix_1(1024, 1024, CV_64F); // matrix_2 and matrix_2 share the same data. Mat matrix_2 = matrix_1; // matrix_1 and matrix_2 are both affected. matrix_2.at<double>(5, 7) = 42.0; // row_10 also shares the same data. Mat row_10 = matrix_1.row(10); // matrix_3 creates a copy of the data. Mat matrix_3 = matrix_1.clone();
// matrix_1 allocates a new block of memory. Mat matrix_1(1024, 1024, CV_64F);
// matrix_2 and matrix_2 share the same data. Mat matrix_2 = matrix_1;
// matrix_1 and matrix_2 are both affected. matrix_2.at<double>(5, 7) = 42.0;
// row_10 also shares the same data. Mat row_10 = matrix_1.row(10);
// matrix_3 creates a copy of the data. Mat matrix_3 = matrix_1.clone();