In Android, I have:
1) matrix (size is 257x257, float[257][257], each element represents a parameter to the image pixel);
2) image(size is nx257, nx257, bytearray[n*257][n*257]n is float, >=1)
How can I scale matrix to image size,repeat element and like below: e.g.:
origin matrix:
1 2
3 4
scale double to:
Target matrix:
1 1 2 2
1 1 2 2
3 3 4 4
3 3 4 4
If n*257 is not an integer, the edge is allowed to be inaccurate. I know Python numpy how to do it,but in java/android,I haven't found a way to be efficient. Can anyone help me? Thank you!