the current one is incorrect. https://github.com/iyotetsuya/RectangleDetection/blob/823dc19fce41abad018997957547657cabcb84f5/app/src/main/java/io/github/iyotetsuya/rectangledetection/utils/OpenCVHelper.java#L164 rough idea: 1. use four points to get center point 2. get angle values from the center point, (x,0) and each one of 4 points. 3. sort those angle values.
the current one is incorrect.
RectangleDetection/app/src/main/java/io/github/iyotetsuya/rectangledetection/utils/OpenCVHelper.java
Line 164 in 823dc19
rough idea: