Rotate image by 90, 180 or 270 degrees

后端 未结 11 2288
一个人的身影
一个人的身影 2020-12-01 07:48

I need to rotate an image by either 90, 180 or 270 degrees. In OpenCV4Android I can use:

Imgproc.getRotationMatrix2D(new Point(center, center), degrees, 1);         


        
11条回答
  •  天命终不由人
    2020-12-01 08:24

    This is the first result when you Google it and none of these solutions really answer the question or is correct or succinct.

    Core.rotate(Mat src, Mat dst, Core.ROTATE_90_CLOCKWISE); //ROTATE_180 or ROTATE_90_COUNTERCLOCKWISE
    

提交回复
热议问题