1 | initial version |
You need to detect somehow the rectangle, maybe with a threshold + findContours and then using minArea, you will find the rotated rectangle. By affine transformation, you can rotate it bac to the wanted "vertical position".
2 | No.2 Revision |
You need to detect somehow the rectangle, maybe with a threshold threshold + findContours findContours and then using minArea, minAreaRect, you will find the rotated rectangle. By affine transformation, transformation, you can rotate it bac to the wanted "vertical position".
3 | No.3 Revision |
You need to detect somehow the rectangle, maybe with a threshold + findContours and then using minAreaRect, you will find the rotated rectangle. By affine transformation, you can rotate it bac to the wanted "vertical position".
BTW I cannot access the second link...