added shape_context calculation