MatOfInt hull = new MatOfInt();
MatOfPoint points = new MatOfPoint(pointMat);
Imgproc.convexHull(points, hull);
Point[] hp = new Point[hull.height()];
for(int i = 0; i < hull.height(); i++){
int index = (int)hull.get(i,0)[0];
hp[i] = new Point(pointMat.get(index,0));
}