How to check if four points form a rectangle

后端 未结 4 1794
隐瞒了意图╮
隐瞒了意图╮ 2021-02-14 15:52

I am working on a shape recognition app. At this moment a set of points (x,y) is determined by corner detector (red points, img. 2.). Four of these points (in red frames, img. 2

4条回答
  •  梦谈多话
    2021-02-14 16:25

    Calculate the set of 6 lengths that you will have between each pair of 4 distinct points. Within that set of 6 lengths if there are more than 3 distinct values, you do not have a rectangle (2 equal side lengths plus equal diagonal lengths)

提交回复
热议问题