Talei
10th April 2014, 11:15
Hello,
I'm looking for a way to detect shape that is QImage (I know that OpenCV can do that but I don't want to use that lib in code) or as QPainterPath.
Basically what I want to do is this: user draw rectangle, mouse move do create QPainterPath and now using that painter path I would like to detect shape that was drawn, in this case rectangle. The problem is that rectangle can have variable angle and can be imperfect. This also need to distinguish other shapes like circle, triangle etc.
Any idea about solving this problem are more then welcome.
I'm looking for a way to detect shape that is QImage (I know that OpenCV can do that but I don't want to use that lib in code) or as QPainterPath.
Basically what I want to do is this: user draw rectangle, mouse move do create QPainterPath and now using that painter path I would like to detect shape that was drawn, in this case rectangle. The problem is that rectangle can have variable angle and can be imperfect. This also need to distinguish other shapes like circle, triangle etc.
Any idea about solving this problem are more then welcome.