2016-08-08 04:31:39 -0600 | received badge | ● Teacher (source) |
2016-08-01 09:39:35 -0600 | answered a question | How to sort contours left to right, while going top to bottom Firstly you need to use boundingRect() to generate Rect, which will give you coordination. (and looks like you did.) Then you can use sorted() with a key function to generate key value using (x, y), something like key = y * 3000 + x. This should do the work. |