I want to convert the following code to java language. however I can't find the way of doing reinterpret_cast in java. please help me.
char *pixels= reinterpret_cast<char*>(FinalImage.data);
the program can be shown as follows.I want to detect blur image.
Mat newEx=new Mat();
final int MEDIAN_BLUR_FILTER_SIZE=15;
Imgproc.medianBlur(mat1, newEx, MEDIAN_BLUR_FILTER_SIZE);
Mat LaplacianImage= new Mat();
Imgproc.Laplacian(newEx, LaplacianImage,CvType.CV_8U);
Mat LaplacianImage8Bit=new Mat();
LaplacianImage8Bit.convertTo(LaplacianImage8Bit,CvType.CV_8UC1);
Mat FinalImage=new Mat();
Imgproc.cvtColor(LaplacianImage8Bit,FinalImage,Imgproc.COLOR_BGR2BGRA);
int rows= FinalImage.rows();
int cols= FinalImage.cols();
char *pixels= reinterpret_cast<char*>(FinalImage.data);