Accelerating object extraction and detection using a hierarchical approach with shape descriptors