How to translate this to Java?
Now I am studying openCV with Java(not so familier to Java and C++ though...), following C++ documentations online as well as textbooks of C++. I am trying to make a "fisheye lens effect" following the C++ code in a textbook, but I stuck completely.
How to translate the following code to Java?
Especially, I don't exactly understand the part around <uchar>. That seems like pointer but in Java version, I never found this kind of part...
for (int y=0; y<srcMat.rows; y++){
for (int x=0; x<srcMat.cols; x++){
for(int i=0;i<=2; i++){
// vx and vy are int that represent other positions
dstMat.at<uchar>(y, 3*x+i) = srcMat.at<uchar>(vy, 3*vx+i)
}
}
}
<uchar>
is a template parameter for a template function.uchar
means probablyunsigned char
as a typedef. Search for more info about c++ template functions.