Encapsulate edge detection pipeline with a class