An Image Processing Pipeline for Automated Packaging Structure Recognition