How can I change the following functions to opencv in java verison
Mat src = imread(argv[1], CV_LOAD_IMAGE_COLOR);
Mat padded;
int padding = 5;
padded.create(src.rows + 2 * padding, src.cols + 2 * padding, src.type());
padded.setTo(Scalar::all(255));
src.copyTo(padded(Rect(padding, padding, src.cols, src.rows)));
see copyMakeBorder
It is in C++ verison. I want to know how to change this "src.copyTo(padded(Rect(padding, padding, src.cols, src.rows)));" to that of java verison. Thanks in advance.
example usage :
I found it with Imgproc.copyMakeBorder(source,destination,top,bottom,left,right,borderType).