Sorry for my bad english. Learning OpenCV, do the program for android, required rotate the photo on the location of the eyes, the required code found in the book "Mastering OpenCV with Practical Computer Vision Projects" in Chapter 8, where we have the following code:
// Get the transformation matrix for the desired angle & size.
Mat rot_mat = getRotationMatrix2D(eyesCenter, angle, scale);
// Shift the center of the eyes to be the desired center.
double ex = DESIRED_FACE_WIDTH * 0.5f - eyesCenter.x;
double ey = DESIRED_FACE_HEIGHT * DESIRED_LEFT_EYE_Y –
eyesCenter.y;
rot_mat.at<double>(0, 2) += ex;
rot_mat.at<double>(1, 2) += ey;
// Transform the face image to the desired angle & size &
// position! Also clear the transformed image background to a
// default grey.
Mat warped = Mat(DESIRED_FACE_HEIGHT, DESIRED_FACE_WIDTH,
CV_8U, Scalar(128));
warpAffine(gray, warped, rot_mat, warped.size());
how to translate a string:
rot_mat.at<double>(0, 2) += ex;
rot_mat.at<double>(1, 2) += ey;
in Java?