Convert two points to a rectangle (cv::Rect)

后端 未结 1 839
太阳男子
太阳男子 2021-02-15 19:41

I have two points (assumed to be from a rectangle and are its top-left corner & bottom-right corner).

Point pTopLeft;
Point pBottomRight;

I w

1条回答
  •  南笙
    南笙 (楼主)
    2021-02-15 20:42

    Since Rect::tl() and Rect::br() just return copies, not references, try a constructor:

    cv::Rect rRect(pTopLeft, pBottomRight);
    

    0 讨论(0)
提交回复
热议问题