Work on poles finding

- corrected bug that considers strange poles (now we consider the max and not the mean of the width/height)
- Improved recognition: don't try to recognize a rectangle if a square is found