Corrections on quadrilateral recognition algorithm

- line filter uses the correct highest line dependency
- simplified quadrilateral check