 How to detect the center region and remove margins, and then deskew the table for correct detection?