Many thanks @Claude31 . The link you supplied has the solution. I stopped depending on CIDetector & starts to depend on the Vision framework (which is supported by this third party) for detecting my envelopes & Al7amdulilah it works great with the aspect ratios of interest.
For future reference, I have already tried to modify CIDetector options you mentioned before while I was searching for a solution but none of them solved the issue.
Topic:
App & System Services
SubTopic:
Core OS
Tags: