Ask Your Question

Miro's profile - activity

2017-09-26 05:25:13 -0600 received badge  Notable Question (source)
2016-10-22 12:46:21 -0600 received badge  Popular Question (source)
2014-08-20 07:31:57 -0600 received badge  Self-Learner (source)
2014-08-20 07:02:29 -0600 answered a question copy small image in big image

no1.copyTo(sudokuGrid.submat(new Rect(x ,y ,no1.cols(), no1.rows()))); my fault was, not using cols() and rows()

2014-08-16 11:32:58 -0600 commented question copy small image in big image

i found a solution. will post it later :) ty berak!

2014-08-16 05:38:08 -0600 commented question copy small image in big image

i added how i load the images

2014-08-16 04:23:21 -0600 received badge  Editor (source)
2014-08-15 13:08:11 -0600 asked a question copy small image in big image

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)));