i try to copy a small image stored in a Mat to a bigger image stored in a Mat. but i always end with a black big image. here is my code: JAVA
no1.copyTo(sudokuGrid.submat(new Rect(60 ,60 ,no1.width(), no1.height())));
1 | initial version |
i try to copy a small image stored in a Mat to a bigger image stored in a Mat. but i always end with a black big image. here is my code: JAVA
no1.copyTo(sudokuGrid.submat(new Rect(60 ,60 ,no1.width(), no1.height())));
2 | No.2 Revision |
i try to copy a small image stored in a Mat to a bigger image stored in a Mat. but i always end with a black big image. here is my code: JAVA
no1.copyTo(sudokuGrid.submat(new Rect(60 ,60 ,no1.width(), no1.height())));
Edit: When i use the code in C it works fine
small_image.copyTo(big_image(cv::Rect(x,y,small_image.cols, small_image.rows)));
3 | No.3 Revision |
i try to copy a small image stored in a Mat to a bigger image stored in a Mat. but i always end with a black big image. here is my code: JAVA
Mat no1 = Highgui.imread(Environment.getExternalStorageDirectory().getPath() + "/Pictures/no1.jpg");
Mat sudokuGrid = Highgui.imread(Environment.getExternalStorageDirectory().getPath() + "/Pictures/emptysudoku.jpg");
no1.copyTo(sudokuGrid.submat(new Rect(60 ,60 ,no1.width(), no1.height())));
Edit: When i use the code in C it works fine
small_image.copyTo(big_image(cv::Rect(x,y,small_image.cols, small_image.rows)));